@coralai/sps-cli 0.57.9 → 0.57.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/projectInit.d.ts.map +1 -1
- package/dist/commands/projectInit.js +6 -1
- package/dist/commands/projectInit.js.map +1 -1
- package/dist/commands/setup.d.ts +9 -4
- package/dist/commands/setup.d.ts.map +1 -1
- package/dist/commands/setup.js +35 -67
- package/dist/commands/setup.js.map +1 -1
- package/dist/commands/skillCommand.js +17 -14
- package/dist/commands/skillCommand.js.map +1 -1
- package/dist/commands/tick.d.ts.map +1 -1
- package/dist/commands/tick.js +28 -7
- package/dist/commands/tick.js.map +1 -1
- package/dist/console/index.d.ts.map +1 -1
- package/dist/console/index.js +4 -0
- package/dist/console/index.js.map +1 -1
- package/dist/console/routes/chat.d.ts.map +1 -1
- package/dist/console/routes/chat.js +12 -3
- package/dist/console/routes/chat.js.map +1 -1
- package/dist/console/routes/prompts.d.ts +9 -0
- package/dist/console/routes/prompts.d.ts.map +1 -0
- package/dist/console/routes/prompts.js +47 -0
- package/dist/console/routes/prompts.js.map +1 -0
- package/dist/console/routes/rules.d.ts +10 -0
- package/dist/console/routes/rules.d.ts.map +1 -0
- package/dist/console/routes/rules.js +20 -0
- package/dist/console/routes/rules.js.map +1 -0
- package/dist/console/routes/skills.d.ts.map +1 -1
- package/dist/console/routes/skills.js +36 -0
- package/dist/console/routes/skills.js.map +1 -1
- package/dist/console-assets/assets/index-Bre7v6yj.js +636 -0
- package/dist/console-assets/assets/index-dZyXNg_s.css +10 -0
- package/dist/console-assets/index.html +2 -2
- package/dist/core/agents/AcpBackend.d.ts +15 -2
- package/dist/core/agents/AcpBackend.d.ts.map +1 -1
- package/dist/core/agents/AcpBackend.js +59 -6
- package/dist/core/agents/AcpBackend.js.map +1 -1
- package/dist/core/agents/AgentBackend.d.ts +20 -4
- package/dist/core/agents/AgentBackend.d.ts.map +1 -1
- package/dist/core/agents/ClaudeSdkBackend.d.ts +3 -1
- package/dist/core/agents/ClaudeSdkBackend.d.ts.map +1 -1
- package/dist/core/agents/ClaudeSdkBackend.js +7 -3
- package/dist/core/agents/ClaudeSdkBackend.js.map +1 -1
- package/dist/core/agents/resolveBackend.d.ts +2 -0
- package/dist/core/agents/resolveBackend.d.ts.map +1 -1
- package/dist/core/agents/resolveBackend.js +1 -1
- package/dist/core/agents/resolveBackend.js.map +1 -1
- package/dist/core/flatfile/frontmatter.d.ts +15 -0
- package/dist/core/flatfile/frontmatter.d.ts.map +1 -0
- package/dist/core/flatfile/frontmatter.js +38 -0
- package/dist/core/flatfile/frontmatter.js.map +1 -0
- package/dist/core/prompts/PromptStore.d.ts +44 -0
- package/dist/core/prompts/PromptStore.d.ts.map +1 -0
- package/dist/core/prompts/PromptStore.js +164 -0
- package/dist/core/prompts/PromptStore.js.map +1 -0
- package/dist/core/skills/SkillsManager.d.ts +6 -1
- package/dist/core/skills/SkillsManager.d.ts.map +1 -1
- package/dist/core/skills/SkillsManager.js +7 -3
- package/dist/core/skills/SkillsManager.js.map +1 -1
- package/dist/core/skills/distribution.d.ts +17 -2
- package/dist/core/skills/distribution.d.ts.map +1 -1
- package/dist/core/skills/distribution.js +42 -4
- package/dist/core/skills/distribution.js.map +1 -1
- package/dist/core/skills/index.d.ts +2 -1
- package/dist/core/skills/index.d.ts.map +1 -1
- package/dist/core/skills/index.js +2 -1
- package/dist/core/skills/index.js.map +1 -1
- package/dist/core/skills/policy.d.ts +24 -0
- package/dist/core/skills/policy.d.ts.map +1 -0
- package/dist/core/skills/policy.js +91 -0
- package/dist/core/skills/policy.js.map +1 -0
- package/dist/core/skills/skillPackage.d.ts +37 -0
- package/dist/core/skills/skillPackage.d.ts.map +1 -0
- package/dist/core/skills/skillPackage.js +137 -0
- package/dist/core/skills/skillPackage.js.map +1 -0
- package/dist/core/skills/types.d.ts +2 -0
- package/dist/core/skills/types.d.ts.map +1 -1
- package/dist/daemon/daemonClient.d.ts +5 -0
- package/dist/daemon/daemonClient.d.ts.map +1 -1
- package/dist/daemon/daemonClient.js.map +1 -1
- package/dist/daemon/sessionDaemon.d.ts.map +1 -1
- package/dist/daemon/sessionDaemon.js.map +1 -1
- package/dist/engines/MonitorEngine.d.ts.map +1 -1
- package/dist/engines/MonitorEngine.js +7 -0
- package/dist/engines/MonitorEngine.js.map +1 -1
- package/dist/engines/smartarrange/PipelineWorkerExec.d.ts +1 -1
- package/dist/engines/smartarrange/runner.d.ts +0 -3
- package/dist/engines/smartarrange/runner.d.ts.map +1 -1
- package/dist/engines/smartarrange/runner.js +9 -72
- package/dist/engines/smartarrange/runner.js.map +1 -1
- package/dist/manager/worker-manager-impl.d.ts +21 -1
- package/dist/manager/worker-manager-impl.d.ts.map +1 -1
- package/dist/manager/worker-manager-impl.js +153 -17
- package/dist/manager/worker-manager-impl.js.map +1 -1
- package/dist/manager/worker-manager.d.ts +22 -0
- package/dist/manager/worker-manager.d.ts.map +1 -1
- package/dist/services/PromptService.d.ts +28 -0
- package/dist/services/PromptService.d.ts.map +1 -0
- package/dist/services/PromptService.js +64 -0
- package/dist/services/PromptService.js.map +1 -0
- package/dist/services/RulesService.d.ts +16 -0
- package/dist/services/RulesService.d.ts.map +1 -0
- package/dist/services/RulesService.js +42 -0
- package/dist/services/RulesService.js.map +1 -0
- package/dist/services/SkillService.d.ts +39 -0
- package/dist/services/SkillService.d.ts.map +1 -1
- package/dist/services/SkillService.js +73 -42
- package/dist/services/SkillService.js.map +1 -1
- package/dist/services/container.d.ts +4 -0
- package/dist/services/container.d.ts.map +1 -1
- package/dist/services/container.js +4 -0
- package/dist/services/container.js.map +1 -1
- package/dist/shared/domainEvents.d.ts +25 -1
- package/dist/shared/domainEvents.d.ts.map +1 -1
- package/dist/shared/domainEvents.js.map +1 -1
- package/dist/shared/projectRepo.d.ts +3 -0
- package/dist/shared/projectRepo.d.ts.map +1 -0
- package/dist/shared/projectRepo.js +23 -0
- package/dist/shared/projectRepo.js.map +1 -0
- package/dist/shared/runtimePaths.d.ts +2 -0
- package/dist/shared/runtimePaths.d.ts.map +1 -1
- package/dist/shared/runtimePaths.js +4 -0
- package/dist/shared/runtimePaths.js.map +1 -1
- package/package.json +1 -1
- package/dist/console-assets/assets/index-BOpxRNe1.css +0 -10
- package/dist/console-assets/assets/index-l-4ti4ol.js +0 -605
- package/dist/engines/smartarrange/AcpWorkerExec.d.ts +0 -35
- package/dist/engines/smartarrange/AcpWorkerExec.d.ts.map +0 -1
- package/dist/engines/smartarrange/AcpWorkerExec.js +0 -71
- package/dist/engines/smartarrange/AcpWorkerExec.js.map +0 -1
- package/project-template/.claude/CLAUDE.md +0 -66
- package/project-template/.claude/hooks/start.sh +0 -44
- package/project-template/.claude/hooks/stop.sh +0 -54
- package/project-template/.claude/rules/.gitkeep +0 -0
- package/project-template/.claude/settings.json +0 -32
- package/project-template/.claude/settings.local.json.template +0 -3
- package/project-template/.claude/skills/.gitkeep +0 -0
- package/project-template/README.md +0 -10
- package/project-template/batch_scheduler.sh +0 -8
- package/project-template/conf.template +0 -61
- package/project-template/deploy.sh +0 -3
- package/project-template/pm_meta/.gitkeep +0 -0
|
@@ -0,0 +1,636 @@
|
|
|
1
|
+
var vM=Object.defineProperty;var v1=e=>{throw TypeError(e)};var wM=(e,t,n)=>t in e?vM(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var w1=(e,t,n)=>wM(e,typeof t!="symbol"?t+"":t,n),dg=(e,t,n)=>t.has(e)||v1("Cannot "+n);var Z=(e,t,n)=>(dg(e,t,"read from private field"),n?n.call(e):t.get(e)),Be=(e,t,n)=>t.has(e)?v1("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),_e=(e,t,n,r)=>(dg(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Je=(e,t,n)=>(dg(e,t,"access private method"),n);var mf=(e,t,n,r)=>({set _(a){_e(e,t,a,n)},get _(){return Z(e,t,r)}});(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))r(a);new MutationObserver(a=>{for(const o of a)if(o.type==="childList")for(const l of o.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(a){const o={};return a.integrity&&(o.integrity=a.integrity),a.referrerPolicy&&(o.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?o.credentials="include":a.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(a){if(a.ep)return;a.ep=!0;const o=n(a);fetch(a.href,o)}})();function Bu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var fg={exports:{}},Vc={};/**
|
|
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 k1;function kM(){if(k1)return Vc;k1=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,a,o){var l=null;if(o!==void 0&&(l=""+o),a.key!==void 0&&(l=""+a.key),"key"in a){o={};for(var u in a)u!=="key"&&(o[u]=a[u])}else o=a;return a=o.ref,{$$typeof:e,type:r,key:l,ref:a!==void 0?a:null,props:o}}return Vc.Fragment=t,Vc.jsx=n,Vc.jsxs=n,Vc}var E1;function EM(){return E1||(E1=1,fg.exports=kM()),fg.exports}var d=EM(),hg={exports:{}},Ve={};/**
|
|
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 S1;function SM(){if(S1)return Ve;S1=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),m=Symbol.for("react.activity"),y=Symbol.iterator;function b(L){return L===null||typeof L!="object"?null:(L=y&&L[y]||L["@@iterator"],typeof L=="function"?L:null)}var k={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v=Object.assign,S={};function E(L,V,R){this.props=L,this.context=V,this.refs=S,this.updater=R||k}E.prototype.isReactComponent={},E.prototype.setState=function(L,V){if(typeof L!="object"&&typeof L!="function"&&L!=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,L,V,"setState")},E.prototype.forceUpdate=function(L){this.updater.enqueueForceUpdate(this,L,"forceUpdate")};function C(){}C.prototype=E.prototype;function N(L,V,R){this.props=L,this.context=V,this.refs=S,this.updater=R||k}var _=N.prototype=new C;_.constructor=N,v(_,E.prototype),_.isPureReactComponent=!0;var D=Array.isArray;function T(){}var M={H:null,A:null,T:null,S:null},I=Object.prototype.hasOwnProperty;function F(L,V,R){var se=R.ref;return{$$typeof:e,type:L,key:V,ref:se!==void 0?se:null,props:R}}function $(L,V){return F(L.type,V,L.props)}function U(L){return typeof L=="object"&&L!==null&&L.$$typeof===e}function K(L){var V={"=":"=0",":":"=2"};return"$"+L.replace(/[=:]/g,function(R){return V[R]})}var Q=/\/+/g;function B(L,V){return typeof L=="object"&&L!==null&&L.key!=null?K(""+L.key):V.toString(36)}function H(L){switch(L.status){case"fulfilled":return L.value;case"rejected":throw L.reason;default:switch(typeof L.status=="string"?L.then(T,T):(L.status="pending",L.then(function(V){L.status==="pending"&&(L.status="fulfilled",L.value=V)},function(V){L.status==="pending"&&(L.status="rejected",L.reason=V)})),L.status){case"fulfilled":return L.value;case"rejected":throw L.reason}}throw L}function z(L,V,R,se,ge){var ye=typeof L;(ye==="undefined"||ye==="boolean")&&(L=null);var xe=!1;if(L===null)xe=!0;else switch(ye){case"bigint":case"string":case"number":xe=!0;break;case"object":switch(L.$$typeof){case e:case t:xe=!0;break;case g:return xe=L._init,z(xe(L._payload),V,R,se,ge)}}if(xe)return ge=ge(L),xe=se===""?"."+B(L,0):se,D(ge)?(R="",xe!=null&&(R=xe.replace(Q,"$&/")+"/"),z(ge,V,R,"",function(ue){return ue})):ge!=null&&(U(ge)&&(ge=$(ge,R+(ge.key==null||L&&L.key===ge.key?"":(""+ge.key).replace(Q,"$&/")+"/")+xe)),V.push(ge)),1;xe=0;var q=se===""?".":se+":";if(D(L))for(var ne=0;ne<L.length;ne++)se=L[ne],ye=q+B(se,ne),xe+=z(se,V,R,ye,ge);else if(ne=b(L),typeof ne=="function")for(L=ne.call(L),ne=0;!(se=L.next()).done;)se=se.value,ye=q+B(se,ne++),xe+=z(se,V,R,ye,ge);else if(ye==="object"){if(typeof L.then=="function")return z(H(L),V,R,se,ge);throw V=String(L),Error("Objects are not valid as a React child (found: "+(V==="[object Object]"?"object with keys {"+Object.keys(L).join(", ")+"}":V)+"). If you meant to render a collection of children, use an array instead.")}return xe}function Y(L,V,R){if(L==null)return L;var se=[],ge=0;return z(L,se,"","",function(ye){return V.call(R,ye,ge++)}),se}function W(L){if(L._status===-1){var V=L._result;V=V(),V.then(function(R){(L._status===0||L._status===-1)&&(L._status=1,L._result=R)},function(R){(L._status===0||L._status===-1)&&(L._status=2,L._result=R)}),L._status===-1&&(L._status=0,L._result=V)}if(L._status===1)return L._result.default;throw L._result}var G=typeof reportError=="function"?reportError:function(L){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var V=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof L=="object"&&L!==null&&typeof L.message=="string"?String(L.message):String(L),error:L});if(!window.dispatchEvent(V))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",L);return}console.error(L)},O={map:Y,forEach:function(L,V,R){Y(L,function(){V.apply(this,arguments)},R)},count:function(L){var V=0;return Y(L,function(){V++}),V},toArray:function(L){return Y(L,function(V){return V})||[]},only:function(L){if(!U(L))throw Error("React.Children.only expected to receive a single React element child.");return L}};return Ve.Activity=m,Ve.Children=O,Ve.Component=E,Ve.Fragment=n,Ve.Profiler=a,Ve.PureComponent=N,Ve.StrictMode=r,Ve.Suspense=f,Ve.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=M,Ve.__COMPILER_RUNTIME={__proto__:null,c:function(L){return M.H.useMemoCache(L)}},Ve.cache=function(L){return function(){return L.apply(null,arguments)}},Ve.cacheSignal=function(){return null},Ve.cloneElement=function(L,V,R){if(L==null)throw Error("The argument must be a React element, but you passed "+L+".");var se=v({},L.props),ge=L.key;if(V!=null)for(ye in V.key!==void 0&&(ge=""+V.key),V)!I.call(V,ye)||ye==="key"||ye==="__self"||ye==="__source"||ye==="ref"&&V.ref===void 0||(se[ye]=V[ye]);var ye=arguments.length-2;if(ye===1)se.children=R;else if(1<ye){for(var xe=Array(ye),q=0;q<ye;q++)xe[q]=arguments[q+2];se.children=xe}return F(L.type,ge,se)},Ve.createContext=function(L){return L={$$typeof:l,_currentValue:L,_currentValue2:L,_threadCount:0,Provider:null,Consumer:null},L.Provider=L,L.Consumer={$$typeof:o,_context:L},L},Ve.createElement=function(L,V,R){var se,ge={},ye=null;if(V!=null)for(se in V.key!==void 0&&(ye=""+V.key),V)I.call(V,se)&&se!=="key"&&se!=="__self"&&se!=="__source"&&(ge[se]=V[se]);var xe=arguments.length-2;if(xe===1)ge.children=R;else if(1<xe){for(var q=Array(xe),ne=0;ne<xe;ne++)q[ne]=arguments[ne+2];ge.children=q}if(L&&L.defaultProps)for(se in xe=L.defaultProps,xe)ge[se]===void 0&&(ge[se]=xe[se]);return F(L,ye,ge)},Ve.createRef=function(){return{current:null}},Ve.forwardRef=function(L){return{$$typeof:u,render:L}},Ve.isValidElement=U,Ve.lazy=function(L){return{$$typeof:g,_payload:{_status:-1,_result:L},_init:W}},Ve.memo=function(L,V){return{$$typeof:h,type:L,compare:V===void 0?null:V}},Ve.startTransition=function(L){var V=M.T,R={};M.T=R;try{var se=L(),ge=M.S;ge!==null&&ge(R,se),typeof se=="object"&&se!==null&&typeof se.then=="function"&&se.then(T,G)}catch(ye){G(ye)}finally{V!==null&&R.types!==null&&(V.types=R.types),M.T=V}},Ve.unstable_useCacheRefresh=function(){return M.H.useCacheRefresh()},Ve.use=function(L){return M.H.use(L)},Ve.useActionState=function(L,V,R){return M.H.useActionState(L,V,R)},Ve.useCallback=function(L,V){return M.H.useCallback(L,V)},Ve.useContext=function(L){return M.H.useContext(L)},Ve.useDebugValue=function(){},Ve.useDeferredValue=function(L,V){return M.H.useDeferredValue(L,V)},Ve.useEffect=function(L,V){return M.H.useEffect(L,V)},Ve.useEffectEvent=function(L){return M.H.useEffectEvent(L)},Ve.useId=function(){return M.H.useId()},Ve.useImperativeHandle=function(L,V,R){return M.H.useImperativeHandle(L,V,R)},Ve.useInsertionEffect=function(L,V){return M.H.useInsertionEffect(L,V)},Ve.useLayoutEffect=function(L,V){return M.H.useLayoutEffect(L,V)},Ve.useMemo=function(L,V){return M.H.useMemo(L,V)},Ve.useOptimistic=function(L,V){return M.H.useOptimistic(L,V)},Ve.useReducer=function(L,V,R){return M.H.useReducer(L,V,R)},Ve.useRef=function(L){return M.H.useRef(L)},Ve.useState=function(L){return M.H.useState(L)},Ve.useSyncExternalStore=function(L,V,R){return M.H.useSyncExternalStore(L,V,R)},Ve.useTransition=function(){return M.H.useTransition()},Ve.version="19.2.5",Ve}var N1;function Uu(){return N1||(N1=1,hg.exports=SM()),hg.exports}var A=Uu();const NM=Bu(A);var pg={exports:{}},Yc={},mg={exports:{}},gg={};/**
|
|
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 _1;function _M(){return _1||(_1=1,(function(e){function t(z,Y){var W=z.length;z.push(Y);e:for(;0<W;){var G=W-1>>>1,O=z[G];if(0<a(O,Y))z[G]=Y,z[W]=O,W=G;else break e}}function n(z){return z.length===0?null:z[0]}function r(z){if(z.length===0)return null;var Y=z[0],W=z.pop();if(W!==Y){z[0]=W;e:for(var G=0,O=z.length,L=O>>>1;G<L;){var V=2*(G+1)-1,R=z[V],se=V+1,ge=z[se];if(0>a(R,W))se<O&&0>a(ge,R)?(z[G]=ge,z[se]=W,G=se):(z[G]=R,z[V]=W,G=V);else if(se<O&&0>a(ge,W))z[G]=ge,z[se]=W,G=se;else break e}}return Y}function a(z,Y){var W=z.sortIndex-Y.sortIndex;return W!==0?W:z.id-Y.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var l=Date,u=l.now();e.unstable_now=function(){return l.now()-u}}var f=[],h=[],g=1,m=null,y=3,b=!1,k=!1,v=!1,S=!1,E=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,N=typeof setImmediate<"u"?setImmediate:null;function _(z){for(var Y=n(h);Y!==null;){if(Y.callback===null)r(h);else if(Y.startTime<=z)r(h),Y.sortIndex=Y.expirationTime,t(f,Y);else break;Y=n(h)}}function D(z){if(v=!1,_(z),!k)if(n(f)!==null)k=!0,T||(T=!0,K());else{var Y=n(h);Y!==null&&H(D,Y.startTime-z)}}var T=!1,M=-1,I=5,F=-1;function $(){return S?!0:!(e.unstable_now()-F<I)}function U(){if(S=!1,T){var z=e.unstable_now();F=z;var Y=!0;try{e:{k=!1,v&&(v=!1,C(M),M=-1),b=!0;var W=y;try{t:{for(_(z),m=n(f);m!==null&&!(m.expirationTime>z&&$());){var G=m.callback;if(typeof G=="function"){m.callback=null,y=m.priorityLevel;var O=G(m.expirationTime<=z);if(z=e.unstable_now(),typeof O=="function"){m.callback=O,_(z),Y=!0;break t}m===n(f)&&r(f),_(z)}else r(f);m=n(f)}if(m!==null)Y=!0;else{var L=n(h);L!==null&&H(D,L.startTime-z),Y=!1}}break e}finally{m=null,y=W,b=!1}Y=void 0}}finally{Y?K():T=!1}}}var K;if(typeof N=="function")K=function(){N(U)};else if(typeof MessageChannel<"u"){var Q=new MessageChannel,B=Q.port2;Q.port1.onmessage=U,K=function(){B.postMessage(null)}}else K=function(){E(U,0)};function H(z,Y){M=E(function(){z(e.unstable_now())},Y)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(z){z.callback=null},e.unstable_forceFrameRate=function(z){0>z||125<z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):I=0<z?Math.floor(1e3/z):5},e.unstable_getCurrentPriorityLevel=function(){return y},e.unstable_next=function(z){switch(y){case 1:case 2:case 3:var Y=3;break;default:Y=y}var W=y;y=Y;try{return z()}finally{y=W}},e.unstable_requestPaint=function(){S=!0},e.unstable_runWithPriority=function(z,Y){switch(z){case 1:case 2:case 3:case 4:case 5:break;default:z=3}var W=y;y=z;try{return Y()}finally{y=W}},e.unstable_scheduleCallback=function(z,Y,W){var G=e.unstable_now();switch(typeof W=="object"&&W!==null?(W=W.delay,W=typeof W=="number"&&0<W?G+W:G):W=G,z){case 1:var O=-1;break;case 2:O=250;break;case 5:O=1073741823;break;case 4:O=1e4;break;default:O=5e3}return O=W+O,z={id:g++,callback:Y,priorityLevel:z,startTime:W,expirationTime:O,sortIndex:-1},W>G?(z.sortIndex=W,t(h,z),n(f)===null&&z===n(h)&&(v?(C(M),M=-1):v=!0,H(D,W-G))):(z.sortIndex=O,t(f,z),k||b||(k=!0,T||(T=!0,K()))),z},e.unstable_shouldYield=$,e.unstable_wrapCallback=function(z){var Y=y;return function(){var W=y;y=Y;try{return z.apply(this,arguments)}finally{y=W}}}})(gg)),gg}var C1;function CM(){return C1||(C1=1,mg.exports=_M()),mg.exports}var yg={exports:{}},Un={};/**
|
|
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 j1;function jM(){if(j1)return Un;j1=1;var e=Uu();function t(f){var h="https://react.dev/errors/"+f;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)h+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+f+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},a=Symbol.for("react.portal");function o(f,h,g){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:m==null?null:""+m,children:f,containerInfo:h,implementation:g}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(f,h){if(f==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return Un.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Un.createPortal=function(f,h){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(t(299));return o(f,h,null,g)},Un.flushSync=function(f){var h=l.T,g=r.p;try{if(l.T=null,r.p=2,f)return f()}finally{l.T=h,r.p=g,r.d.f()}},Un.preconnect=function(f,h){typeof f=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,r.d.C(f,h))},Un.prefetchDNS=function(f){typeof f=="string"&&r.d.D(f)},Un.preinit=function(f,h){if(typeof f=="string"&&h&&typeof h.as=="string"){var g=h.as,m=u(g,h.crossOrigin),y=typeof h.integrity=="string"?h.integrity:void 0,b=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;g==="style"?r.d.S(f,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:m,integrity:y,fetchPriority:b}):g==="script"&&r.d.X(f,{crossOrigin:m,integrity:y,fetchPriority:b,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},Un.preinitModule=function(f,h){if(typeof f=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var g=u(h.as,h.crossOrigin);r.d.M(f,{crossOrigin:g,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&r.d.M(f)},Un.preload=function(f,h){if(typeof f=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var g=h.as,m=u(g,h.crossOrigin);r.d.L(f,g,{crossOrigin:m,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},Un.preloadModule=function(f,h){if(typeof f=="string")if(h){var g=u(h.as,h.crossOrigin);r.d.m(f,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:g,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else r.d.m(f)},Un.requestFormReset=function(f){r.d.r(f)},Un.unstable_batchedUpdates=function(f,h){return f(h)},Un.useFormState=function(f,h,g){return l.H.useFormState(f,h,g)},Un.useFormStatus=function(){return l.H.useHostTransitionStatus()},Un.version="19.2.5",Un}var A1;function $S(){if(A1)return yg.exports;A1=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),yg.exports=jM(),yg.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 T1;function AM(){if(T1)return Yc;T1=1;var e=CM(),t=Uu(),n=$S();function r(i){var s="https://react.dev/errors/"+i;if(1<arguments.length){s+="?args[]="+encodeURIComponent(arguments[1]);for(var c=2;c<arguments.length;c++)s+="&args[]="+encodeURIComponent(arguments[c])}return"Minified React error #"+i+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function o(i){var s=i,c=i;if(i.alternate)for(;s.return;)s=s.return;else{i=s;do s=i,(s.flags&4098)!==0&&(c=s.return),i=s.return;while(i)}return s.tag===3?c:null}function l(i){if(i.tag===13){var s=i.memoizedState;if(s===null&&(i=i.alternate,i!==null&&(s=i.memoizedState)),s!==null)return s.dehydrated}return null}function u(i){if(i.tag===31){var s=i.memoizedState;if(s===null&&(i=i.alternate,i!==null&&(s=i.memoizedState)),s!==null)return s.dehydrated}return null}function f(i){if(o(i)!==i)throw Error(r(188))}function h(i){var s=i.alternate;if(!s){if(s=o(i),s===null)throw Error(r(188));return s!==i?null:i}for(var c=i,p=s;;){var x=c.return;if(x===null)break;var w=x.alternate;if(w===null){if(p=x.return,p!==null){c=p;continue}break}if(x.child===w.child){for(w=x.child;w;){if(w===c)return f(x),i;if(w===p)return f(x),s;w=w.sibling}throw Error(r(188))}if(c.return!==p.return)c=x,p=w;else{for(var j=!1,P=x.child;P;){if(P===c){j=!0,c=x,p=w;break}if(P===p){j=!0,p=x,c=w;break}P=P.sibling}if(!j){for(P=w.child;P;){if(P===c){j=!0,c=w,p=x;break}if(P===p){j=!0,p=w,c=x;break}P=P.sibling}if(!j)throw Error(r(189))}}if(c.alternate!==p)throw Error(r(190))}if(c.tag!==3)throw Error(r(188));return c.stateNode.current===c?i:s}function g(i){var s=i.tag;if(s===5||s===26||s===27||s===6)return i;for(i=i.child;i!==null;){if(s=g(i),s!==null)return s;i=i.sibling}return null}var m=Object.assign,y=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),k=Symbol.for("react.portal"),v=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),C=Symbol.for("react.consumer"),N=Symbol.for("react.context"),_=Symbol.for("react.forward_ref"),D=Symbol.for("react.suspense"),T=Symbol.for("react.suspense_list"),M=Symbol.for("react.memo"),I=Symbol.for("react.lazy"),F=Symbol.for("react.activity"),$=Symbol.for("react.memo_cache_sentinel"),U=Symbol.iterator;function K(i){return i===null||typeof i!="object"?null:(i=U&&i[U]||i["@@iterator"],typeof i=="function"?i:null)}var Q=Symbol.for("react.client.reference");function B(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===Q?null:i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case v:return"Fragment";case E:return"Profiler";case S:return"StrictMode";case D:return"Suspense";case T:return"SuspenseList";case F:return"Activity"}if(typeof i=="object")switch(i.$$typeof){case k:return"Portal";case N:return i.displayName||"Context";case C:return(i._context.displayName||"Context")+".Consumer";case _:var s=i.render;return i=i.displayName,i||(i=s.displayName||s.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case M:return s=i.displayName||null,s!==null?s:B(i.type)||"Memo";case I:s=i._payload,i=i._init;try{return B(i(s))}catch{}}return null}var H=Array.isArray,z=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W={pending:!1,data:null,method:null,action:null},G=[],O=-1;function L(i){return{current:i}}function V(i){0>O||(i.current=G[O],G[O]=null,O--)}function R(i,s){O++,G[O]=i.current,i.current=s}var se=L(null),ge=L(null),ye=L(null),xe=L(null);function q(i,s){switch(R(ye,s),R(ge,i),R(se,null),s.nodeType){case 9:case 11:i=(i=s.documentElement)&&(i=i.namespaceURI)?qw(i):0;break;default:if(i=s.tagName,s=s.namespaceURI)s=qw(s),i=Hw(s,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}V(se),R(se,i)}function ne(){V(se),V(ge),V(ye)}function ue(i){i.memoizedState!==null&&R(xe,i);var s=se.current,c=Hw(s,i.type);s!==c&&(R(ge,i),R(se,c))}function ce(i){ge.current===i&&(V(se),V(ge)),xe.current===i&&(V(xe),qc._currentValue=W)}var de,be;function je(i){if(de===void 0)try{throw Error()}catch(c){var s=c.stack.trim().match(/\n( *(at )?)/);de=s&&s[1]||"",be=-1<c.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<c.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+de+i+be}var De=!1;function we(i,s){if(!i||De)return"";De=!0;var c=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var p={DetermineComponentFrameRoot:function(){try{if(s){var me=function(){throw Error()};if(Object.defineProperty(me.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(me,[])}catch(oe){var ae=oe}Reflect.construct(i,[],me)}else{try{me.call()}catch(oe){ae=oe}i.call(me.prototype)}}else{try{throw Error()}catch(oe){ae=oe}(me=i())&&typeof me.catch=="function"&&me.catch(function(){})}}catch(oe){if(oe&&ae&&typeof oe.stack=="string")return[oe.stack,ae.stack]}return[null,null]}};p.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var x=Object.getOwnPropertyDescriptor(p.DetermineComponentFrameRoot,"name");x&&x.configurable&&Object.defineProperty(p.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var w=p.DetermineComponentFrameRoot(),j=w[0],P=w[1];if(j&&P){var X=j.split(`
|
|
44
|
+
`),ie=P.split(`
|
|
45
|
+
`);for(x=p=0;p<X.length&&!X[p].includes("DetermineComponentFrameRoot");)p++;for(;x<ie.length&&!ie[x].includes("DetermineComponentFrameRoot");)x++;if(p===X.length||x===ie.length)for(p=X.length-1,x=ie.length-1;1<=p&&0<=x&&X[p]!==ie[x];)x--;for(;1<=p&&0<=x;p--,x--)if(X[p]!==ie[x]){if(p!==1||x!==1)do if(p--,x--,0>x||X[p]!==ie[x]){var fe=`
|
|
46
|
+
`+X[p].replace(" at new "," at ");return i.displayName&&fe.includes("<anonymous>")&&(fe=fe.replace("<anonymous>",i.displayName)),fe}while(1<=p&&0<=x);break}}}finally{De=!1,Error.prepareStackTrace=c}return(c=i?i.displayName||i.name:"")?je(c):""}function ut(i,s){switch(i.tag){case 26:case 27:case 5:return je(i.type);case 16:return je("Lazy");case 13:return i.child!==s&&s!==null?je("Suspense Fallback"):je("Suspense");case 19:return je("SuspenseList");case 0:case 15:return we(i.type,!1);case 11:return we(i.type.render,!1);case 1:return we(i.type,!0);case 31:return je("Activity");default:return""}}function Bt(i){try{var s="",c=null;do s+=ut(i,c),c=i,i=i.return;while(i);return s}catch(p){return`
|
|
47
|
+
Error generating stack: `+p.message+`
|
|
48
|
+
`+p.stack}}var sn=Object.prototype.hasOwnProperty,cn=e.unstable_scheduleCallback,An=e.unstable_cancelCallback,Yr=e.unstable_shouldYield,Jn=e.unstable_requestPaint,xt=e.unstable_now,kn=e.unstable_getCurrentPriorityLevel,le=e.unstable_ImmediatePriority,ve=e.unstable_UserBlockingPriority,ze=e.unstable_NormalPriority,Xe=e.unstable_LowPriority,st=e.unstable_IdlePriority,Tn=e.log,hr=e.unstable_setDisableYieldValue,bn=null,Ft=null;function En(i){if(typeof Tn=="function"&&hr(i),Ft&&typeof Ft.setStrictMode=="function")try{Ft.setStrictMode(bn,i)}catch{}}var vt=Math.clz32?Math.clz32:xo,Ar=Math.log,Mn=Math.LN2;function xo(i){return i>>>=0,i===0?32:31-(Ar(i)/Mn|0)|0}var Ri=256,xa=262144,Li=4194304;function zn(i){var s=i&42;if(s!==0)return s;switch(i&-i){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 i&261888;case 262144:case 524288:case 1048576:case 2097152:return i&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return i&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return i}}function J(i,s,c){var p=i.pendingLanes;if(p===0)return 0;var x=0,w=i.suspendedLanes,j=i.pingedLanes;i=i.warmLanes;var P=p&134217727;return P!==0?(p=P&~w,p!==0?x=zn(p):(j&=P,j!==0?x=zn(j):c||(c=P&~i,c!==0&&(x=zn(c))))):(P=p&~w,P!==0?x=zn(P):j!==0?x=zn(j):c||(c=p&~i,c!==0&&(x=zn(c)))),x===0?0:s!==0&&s!==x&&(s&w)===0&&(w=x&-x,c=s&-s,w>=c||w===32&&(c&4194048)!==0)?s:x}function he(i,s){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&s)===0}function Ne(i,s){switch(i){case 1:case 2:case 4:case 8:case 64:return s+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 s+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 Ke(){var i=Li;return Li<<=1,(Li&62914560)===0&&(Li=4194304),i}function Dt(i){for(var s=[],c=0;31>c;c++)s.push(i);return s}function Et(i,s){i.pendingLanes|=s,s!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function Me(i,s,c,p,x,w){var j=i.pendingLanes;i.pendingLanes=c,i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0,i.expiredLanes&=c,i.entangledLanes&=c,i.errorRecoveryDisabledLanes&=c,i.shellSuspendCounter=0;var P=i.entanglements,X=i.expirationTimes,ie=i.hiddenUpdates;for(c=j&~c;0<c;){var fe=31-vt(c),me=1<<fe;P[fe]=0,X[fe]=-1;var ae=ie[fe];if(ae!==null)for(ie[fe]=null,fe=0;fe<ae.length;fe++){var oe=ae[fe];oe!==null&&(oe.lane&=-536870913)}c&=~me}p!==0&&Ce(i,p,0),w!==0&&x===0&&i.tag!==0&&(i.suspendedLanes|=w&~(j&~s))}function Ce(i,s,c){i.pendingLanes|=s,i.suspendedLanes&=~s;var p=31-vt(s);i.entangledLanes|=s,i.entanglements[p]=i.entanglements[p]|1073741824|c&261930}function Fe(i,s){var c=i.entangledLanes|=s;for(i=i.entanglements;c;){var p=31-vt(c),x=1<<p;x&s|i[p]&s&&(i[p]|=s),c&=~x}}function Yt(i,s){var c=s&-s;return c=(c&42)!==0?1:zt(c),(c&(i.suspendedLanes|s))!==0?0:c}function zt(i){switch(i){case 2:i=1;break;case 8:i=4;break;case 32:i=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:i=128;break;case 268435456:i=134217728;break;default:i=0}return i}function Qr(i){return i&=-i,2<i?8<i?(i&134217727)!==0?32:268435456:8:2}function va(){var i=Y.p;return i!==0?i:(i=window.event,i===void 0?32:h1(i.type))}function wa(i,s){var c=Y.p;try{return Y.p=i,s()}finally{Y.p=c}}var Tr=Math.random().toString(36).slice(2),Qt="__reactFiber$"+Tr,Sn="__reactProps$"+Tr,Wr="__reactContainer$"+Tr,ka="__reactEvents$"+Tr,ks="__reactListeners$"+Tr,Ea="__reactHandles$"+Tr,vo="__reactResources$"+Tr,Ii="__reactMarker$"+Tr;function Es(i){delete i[Qt],delete i[Sn],delete i[ka],delete i[ks],delete i[Ea]}function Dn(i){var s=i[Qt];if(s)return s;for(var c=i.parentNode;c;){if(s=c[Wr]||c[Qt]){if(c=s.alternate,s.child!==null||c!==null&&c.child!==null)for(i=Xw(i);i!==null;){if(c=i[Qt])return c;i=Xw(i)}return s}i=c,c=i.parentNode}return null}function Xr(i){if(i=i[Qt]||i[Wr]){var s=i.tag;if(s===5||s===6||s===13||s===31||s===26||s===27||s===3)return i}return null}function Zr(i){var s=i.tag;if(s===5||s===26||s===27||s===6)return i.stateNode;throw Error(r(33))}function gi(i){var s=i[vo];return s||(s=i[vo]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function en(i){i[Ii]=!0}var wo=new Set,zi={};function Jr(i,s){ke(i,s),ke(i+"Capture",s)}function ke(i,s){for(zi[i]=s,i=0;i<s.length;i++)wo.add(s[i])}var Pe=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]*$"),tt={},gt={};function Wt(i){return sn.call(gt,i)?!0:sn.call(tt,i)?!1:Pe.test(i)?gt[i]=!0:(tt[i]=!0,!1)}function Nn(i,s,c){if(Wt(s))if(c===null)i.removeAttribute(s);else{switch(typeof c){case"undefined":case"function":case"symbol":i.removeAttribute(s);return;case"boolean":var p=s.toLowerCase().slice(0,5);if(p!=="data-"&&p!=="aria-"){i.removeAttribute(s);return}}i.setAttribute(s,""+c)}}function Kn(i,s,c){if(c===null)i.removeAttribute(s);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(s);return}i.setAttribute(s,""+c)}}function Pn(i,s,c,p){if(p===null)i.removeAttribute(c);else{switch(typeof p){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(c);return}i.setAttributeNS(s,c,""+p)}}function Ct(i){switch(typeof i){case"bigint":case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function Gn(i){var s=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function ko(i,s,c){var p=Object.getOwnPropertyDescriptor(i.constructor.prototype,s);if(!i.hasOwnProperty(s)&&typeof p<"u"&&typeof p.get=="function"&&typeof p.set=="function"){var x=p.get,w=p.set;return Object.defineProperty(i,s,{configurable:!0,get:function(){return x.call(this)},set:function(j){c=""+j,w.call(this,j)}}),Object.defineProperty(i,s,{enumerable:p.enumerable}),{getValue:function(){return c},setValue:function(j){c=""+j},stopTracking:function(){i._valueTracker=null,delete i[s]}}}}function Sa(i){if(!i._valueTracker){var s=Gn(i)?"checked":"value";i._valueTracker=ko(i,s,""+i[s])}}function yi(i){if(!i)return!1;var s=i._valueTracker;if(!s)return!0;var c=s.getValue(),p="";return i&&(p=Gn(i)?i.checked?"true":"false":i.value),i=p,i!==c?(s.setValue(i),!0):!1}function Na(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}var Eo=/[\n"\\]/g;function Bn(i){return i.replace(Eo,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function Ss(i,s,c,p,x,w,j,P){i.name="",j!=null&&typeof j!="function"&&typeof j!="symbol"&&typeof j!="boolean"?i.type=j:i.removeAttribute("type"),s!=null?j==="number"?(s===0&&i.value===""||i.value!=s)&&(i.value=""+Ct(s)):i.value!==""+Ct(s)&&(i.value=""+Ct(s)):j!=="submit"&&j!=="reset"||i.removeAttribute("value"),s!=null?_a(i,j,Ct(s)):c!=null?_a(i,j,Ct(c)):p!=null&&i.removeAttribute("value"),x==null&&w!=null&&(i.defaultChecked=!!w),x!=null&&(i.checked=x&&typeof x!="function"&&typeof x!="symbol"),P!=null&&typeof P!="function"&&typeof P!="symbol"&&typeof P!="boolean"?i.name=""+Ct(P):i.removeAttribute("name")}function ei(i,s,c,p,x,w,j,P){if(w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"&&(i.type=w),s!=null||c!=null){if(!(w!=="submit"&&w!=="reset"||s!=null)){Sa(i);return}c=c!=null?""+Ct(c):"",s=s!=null?""+Ct(s):c,P||s===i.value||(i.value=s),i.defaultValue=s}p=p??x,p=typeof p!="function"&&typeof p!="symbol"&&!!p,i.checked=P?i.checked:!!p,i.defaultChecked=!!p,j!=null&&typeof j!="function"&&typeof j!="symbol"&&typeof j!="boolean"&&(i.name=j),Sa(i)}function _a(i,s,c){s==="number"&&Na(i.ownerDocument)===i||i.defaultValue===""+c||(i.defaultValue=""+c)}function xn(i,s,c,p){if(i=i.options,s){s={};for(var x=0;x<c.length;x++)s["$"+c[x]]=!0;for(c=0;c<i.length;c++)x=s.hasOwnProperty("$"+i[c].value),i[c].selected!==x&&(i[c].selected=x),x&&p&&(i[c].defaultSelected=!0)}else{for(c=""+Ct(c),s=null,x=0;x<i.length;x++){if(i[x].value===c){i[x].selected=!0,p&&(i[x].defaultSelected=!0);return}s!==null||i[x].disabled||(s=i[x])}s!==null&&(s.selected=!0)}}function Ns(i,s,c){if(s!=null&&(s=""+Ct(s),s!==i.value&&(i.value=s),c==null)){i.defaultValue!==s&&(i.defaultValue=s);return}i.defaultValue=c!=null?""+Ct(c):""}function So(i,s,c,p){if(s==null){if(p!=null){if(c!=null)throw Error(r(92));if(H(p)){if(1<p.length)throw Error(r(93));p=p[0]}c=p}c==null&&(c=""),s=c}c=Ct(s),i.defaultValue=c,p=i.textContent,p===c&&p!==""&&p!==null&&(i.value=p),Sa(i)}function He(i,s){if(s){var c=i.firstChild;if(c&&c===i.lastChild&&c.nodeType===3){c.nodeValue=s;return}}i.textContent=s}var id=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 un(i,s,c){var p=s.indexOf("--")===0;c==null||typeof c=="boolean"||c===""?p?i.setProperty(s,""):s==="float"?i.cssFloat="":i[s]="":p?i.setProperty(s,c):typeof c!="number"||c===0||id.has(s)?s==="float"?i.cssFloat=c:i[s]=(""+c).trim():i[s]=c+"px"}function St(i,s,c){if(s!=null&&typeof s!="object")throw Error(r(62));if(i=i.style,c!=null){for(var p in c)!c.hasOwnProperty(p)||s!=null&&s.hasOwnProperty(p)||(p.indexOf("--")===0?i.setProperty(p,""):p==="float"?i.cssFloat="":i[p]="");for(var x in s)p=s[x],s.hasOwnProperty(x)&&c[x]!==p&&un(i,x,p)}else for(var w in s)s.hasOwnProperty(w)&&un(i,w,s[w])}function Ca(i){if(i.indexOf("-")===-1)return!1;switch(i){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 Pi=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),ic=/^[\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 ja(i){return ic.test(""+i)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":i}function Se(){}var Oe=null;function Qe(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var ot=null,Xt=null;function Mr(i){var s=Xr(i);if(s&&(i=s.stateNode)){var c=i[Sn]||null;e:switch(i=s.stateNode,s.type){case"input":if(Ss(i,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name),s=c.name,c.type==="radio"&&s!=null){for(c=i;c.parentNode;)c=c.parentNode;for(c=c.querySelectorAll('input[name="'+Bn(""+s)+'"][type="radio"]'),s=0;s<c.length;s++){var p=c[s];if(p!==i&&p.form===i.form){var x=p[Sn]||null;if(!x)throw Error(r(90));Ss(p,x.value,x.defaultValue,x.defaultValue,x.checked,x.defaultChecked,x.type,x.name)}}for(s=0;s<c.length;s++)p=c[s],p.form===i.form&&yi(p)}break e;case"textarea":Ns(i,c.value,c.defaultValue);break e;case"select":s=c.value,s!=null&&xn(i,!!c.multiple,s,!1)}}}var ac=!1;function ad(i,s,c){if(ac)return i(s,c);ac=!0;try{var p=i(s);return p}finally{if(ac=!1,(ot!==null||Xt!==null)&&(Gd(),ot&&(s=ot,i=Xt,Xt=ot=null,Mr(s),i)))for(s=0;s<i.length;s++)Mr(i[s])}}function sc(i,s){var c=i.stateNode;if(c===null)return null;var p=c[Sn]||null;if(p===null)return null;c=p[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(p=!p.disabled)||(i=i.type,p=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!p;break e;default:i=!1}if(i)return null;if(c&&typeof c!="function")throw Error(r(231,s,typeof c));return c}var Bi=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),dp=!1;if(Bi)try{var oc={};Object.defineProperty(oc,"passive",{get:function(){dp=!0}}),window.addEventListener("test",oc,oc),window.removeEventListener("test",oc,oc)}catch{dp=!1}var Aa=null,fp=null,sd=null;function Hx(){if(sd)return sd;var i,s=fp,c=s.length,p,x="value"in Aa?Aa.value:Aa.textContent,w=x.length;for(i=0;i<c&&s[i]===x[i];i++);var j=c-i;for(p=1;p<=j&&s[c-p]===x[w-p];p++);return sd=x.slice(i,1<p?1-p:void 0)}function od(i){var s=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&s===13&&(i=13)):i=s,i===10&&(i=13),32<=i||i===13?i:0}function ld(){return!0}function Kx(){return!1}function er(i){function s(c,p,x,w,j){this._reactName=c,this._targetInst=x,this.type=p,this.nativeEvent=w,this.target=j,this.currentTarget=null;for(var P in i)i.hasOwnProperty(P)&&(c=i[P],this[P]=c?c(w):w[P]);return this.isDefaultPrevented=(w.defaultPrevented!=null?w.defaultPrevented:w.returnValue===!1)?ld:Kx,this.isPropagationStopped=Kx,this}return m(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var c=this.nativeEvent;c&&(c.preventDefault?c.preventDefault():typeof c.returnValue!="unknown"&&(c.returnValue=!1),this.isDefaultPrevented=ld)},stopPropagation:function(){var c=this.nativeEvent;c&&(c.stopPropagation?c.stopPropagation():typeof c.cancelBubble!="unknown"&&(c.cancelBubble=!0),this.isPropagationStopped=ld)},persist:function(){},isPersistent:ld}),s}var _s={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},cd=er(_s),lc=m({},_s,{view:0,detail:0}),bA=er(lc),hp,pp,cc,ud=m({},lc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:gp,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==cc&&(cc&&i.type==="mousemove"?(hp=i.screenX-cc.screenX,pp=i.screenY-cc.screenY):pp=hp=0,cc=i),hp)},movementY:function(i){return"movementY"in i?i.movementY:pp}}),Gx=er(ud),xA=m({},ud,{dataTransfer:0}),vA=er(xA),wA=m({},lc,{relatedTarget:0}),mp=er(wA),kA=m({},_s,{animationName:0,elapsedTime:0,pseudoElement:0}),EA=er(kA),SA=m({},_s,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),NA=er(SA),_A=m({},_s,{data:0}),Vx=er(_A),CA={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},jA={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"},AA={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function TA(i){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(i):(i=AA[i])?!!s[i]:!1}function gp(){return TA}var MA=m({},lc,{key:function(i){if(i.key){var s=CA[i.key]||i.key;if(s!=="Unidentified")return s}return i.type==="keypress"?(i=od(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?jA[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:gp,charCode:function(i){return i.type==="keypress"?od(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?od(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),DA=er(MA),OA=m({},ud,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Yx=er(OA),RA=m({},lc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:gp}),LA=er(RA),IA=m({},_s,{propertyName:0,elapsedTime:0,pseudoElement:0}),zA=er(IA),PA=m({},ud,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),BA=er(PA),UA=m({},_s,{newState:0,oldState:0}),$A=er(UA),FA=[9,13,27,32],yp=Bi&&"CompositionEvent"in window,uc=null;Bi&&"documentMode"in document&&(uc=document.documentMode);var qA=Bi&&"TextEvent"in window&&!uc,Qx=Bi&&(!yp||uc&&8<uc&&11>=uc),Wx=" ",Xx=!1;function Zx(i,s){switch(i){case"keyup":return FA.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Jx(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var No=!1;function HA(i,s){switch(i){case"compositionend":return Jx(s);case"keypress":return s.which!==32?null:(Xx=!0,Wx);case"textInput":return i=s.data,i===Wx&&Xx?null:i;default:return null}}function KA(i,s){if(No)return i==="compositionend"||!yp&&Zx(i,s)?(i=Hx(),sd=fp=Aa=null,No=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return Qx&&s.locale!=="ko"?null:s.data;default:return null}}var GA={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 ev(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s==="input"?!!GA[i.type]:s==="textarea"}function tv(i,s,c,p){ot?Xt?Xt.push(p):Xt=[p]:ot=p,s=Jd(s,"onChange"),0<s.length&&(c=new cd("onChange","change",null,c,p),i.push({event:c,listeners:s}))}var dc=null,fc=null;function VA(i){zw(i,0)}function dd(i){var s=Zr(i);if(yi(s))return i}function nv(i,s){if(i==="change")return s}var rv=!1;if(Bi){var bp;if(Bi){var xp="oninput"in document;if(!xp){var iv=document.createElement("div");iv.setAttribute("oninput","return;"),xp=typeof iv.oninput=="function"}bp=xp}else bp=!1;rv=bp&&(!document.documentMode||9<document.documentMode)}function av(){dc&&(dc.detachEvent("onpropertychange",sv),fc=dc=null)}function sv(i){if(i.propertyName==="value"&&dd(fc)){var s=[];tv(s,fc,i,Qe(i)),ad(VA,s)}}function YA(i,s,c){i==="focusin"?(av(),dc=s,fc=c,dc.attachEvent("onpropertychange",sv)):i==="focusout"&&av()}function QA(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return dd(fc)}function WA(i,s){if(i==="click")return dd(s)}function XA(i,s){if(i==="input"||i==="change")return dd(s)}function ZA(i,s){return i===s&&(i!==0||1/i===1/s)||i!==i&&s!==s}var pr=typeof Object.is=="function"?Object.is:ZA;function hc(i,s){if(pr(i,s))return!0;if(typeof i!="object"||i===null||typeof s!="object"||s===null)return!1;var c=Object.keys(i),p=Object.keys(s);if(c.length!==p.length)return!1;for(p=0;p<c.length;p++){var x=c[p];if(!sn.call(s,x)||!pr(i[x],s[x]))return!1}return!0}function ov(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function lv(i,s){var c=ov(i);i=0;for(var p;c;){if(c.nodeType===3){if(p=i+c.textContent.length,i<=s&&p>=s)return{node:c,offset:s-i};i=p}e:{for(;c;){if(c.nextSibling){c=c.nextSibling;break e}c=c.parentNode}c=void 0}c=ov(c)}}function cv(i,s){return i&&s?i===s?!0:i&&i.nodeType===3?!1:s&&s.nodeType===3?cv(i,s.parentNode):"contains"in i?i.contains(s):i.compareDocumentPosition?!!(i.compareDocumentPosition(s)&16):!1:!1}function uv(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var s=Na(i.document);s instanceof i.HTMLIFrameElement;){try{var c=typeof s.contentWindow.location.href=="string"}catch{c=!1}if(c)i=s.contentWindow;else break;s=Na(i.document)}return s}function vp(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s&&(s==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||s==="textarea"||i.contentEditable==="true")}var JA=Bi&&"documentMode"in document&&11>=document.documentMode,_o=null,wp=null,pc=null,kp=!1;function dv(i,s,c){var p=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;kp||_o==null||_o!==Na(p)||(p=_o,"selectionStart"in p&&vp(p)?p={start:p.selectionStart,end:p.selectionEnd}:(p=(p.ownerDocument&&p.ownerDocument.defaultView||window).getSelection(),p={anchorNode:p.anchorNode,anchorOffset:p.anchorOffset,focusNode:p.focusNode,focusOffset:p.focusOffset}),pc&&hc(pc,p)||(pc=p,p=Jd(wp,"onSelect"),0<p.length&&(s=new cd("onSelect","select",null,s,c),i.push({event:s,listeners:p}),s.target=_o)))}function Cs(i,s){var c={};return c[i.toLowerCase()]=s.toLowerCase(),c["Webkit"+i]="webkit"+s,c["Moz"+i]="moz"+s,c}var Co={animationend:Cs("Animation","AnimationEnd"),animationiteration:Cs("Animation","AnimationIteration"),animationstart:Cs("Animation","AnimationStart"),transitionrun:Cs("Transition","TransitionRun"),transitionstart:Cs("Transition","TransitionStart"),transitioncancel:Cs("Transition","TransitionCancel"),transitionend:Cs("Transition","TransitionEnd")},Ep={},fv={};Bi&&(fv=document.createElement("div").style,"AnimationEvent"in window||(delete Co.animationend.animation,delete Co.animationiteration.animation,delete Co.animationstart.animation),"TransitionEvent"in window||delete Co.transitionend.transition);function js(i){if(Ep[i])return Ep[i];if(!Co[i])return i;var s=Co[i],c;for(c in s)if(s.hasOwnProperty(c)&&c in fv)return Ep[i]=s[c];return i}var hv=js("animationend"),pv=js("animationiteration"),mv=js("animationstart"),eT=js("transitionrun"),tT=js("transitionstart"),nT=js("transitioncancel"),gv=js("transitionend"),yv=new Map,Sp="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Sp.push("scrollEnd");function ti(i,s){yv.set(i,s),Jr(s,[i])}var fd=typeof reportError=="function"?reportError:function(i){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var s=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof i=="object"&&i!==null&&typeof i.message=="string"?String(i.message):String(i),error:i});if(!window.dispatchEvent(s))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",i);return}console.error(i)},Dr=[],jo=0,Np=0;function hd(){for(var i=jo,s=Np=jo=0;s<i;){var c=Dr[s];Dr[s++]=null;var p=Dr[s];Dr[s++]=null;var x=Dr[s];Dr[s++]=null;var w=Dr[s];if(Dr[s++]=null,p!==null&&x!==null){var j=p.pending;j===null?x.next=x:(x.next=j.next,j.next=x),p.pending=x}w!==0&&bv(c,x,w)}}function pd(i,s,c,p){Dr[jo++]=i,Dr[jo++]=s,Dr[jo++]=c,Dr[jo++]=p,Np|=p,i.lanes|=p,i=i.alternate,i!==null&&(i.lanes|=p)}function _p(i,s,c,p){return pd(i,s,c,p),md(i)}function As(i,s){return pd(i,null,null,s),md(i)}function bv(i,s,c){i.lanes|=c;var p=i.alternate;p!==null&&(p.lanes|=c);for(var x=!1,w=i.return;w!==null;)w.childLanes|=c,p=w.alternate,p!==null&&(p.childLanes|=c),w.tag===22&&(i=w.stateNode,i===null||i._visibility&1||(x=!0)),i=w,w=w.return;return i.tag===3?(w=i.stateNode,x&&s!==null&&(x=31-vt(c),i=w.hiddenUpdates,p=i[x],p===null?i[x]=[s]:p.push(s),s.lane=c|536870912),w):null}function md(i){if(50<Ic)throw Ic=0,Lm=null,Error(r(185));for(var s=i.return;s!==null;)i=s,s=i.return;return i.tag===3?i.stateNode:null}var Ao={};function rT(i,s,c,p){this.tag=i,this.key=c,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=p,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function mr(i,s,c,p){return new rT(i,s,c,p)}function Cp(i){return i=i.prototype,!(!i||!i.isReactComponent)}function Ui(i,s){var c=i.alternate;return c===null?(c=mr(i.tag,s,i.key,i.mode),c.elementType=i.elementType,c.type=i.type,c.stateNode=i.stateNode,c.alternate=i,i.alternate=c):(c.pendingProps=s,c.type=i.type,c.flags=0,c.subtreeFlags=0,c.deletions=null),c.flags=i.flags&65011712,c.childLanes=i.childLanes,c.lanes=i.lanes,c.child=i.child,c.memoizedProps=i.memoizedProps,c.memoizedState=i.memoizedState,c.updateQueue=i.updateQueue,s=i.dependencies,c.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},c.sibling=i.sibling,c.index=i.index,c.ref=i.ref,c.refCleanup=i.refCleanup,c}function xv(i,s){i.flags&=65011714;var c=i.alternate;return c===null?(i.childLanes=0,i.lanes=s,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=c.childLanes,i.lanes=c.lanes,i.child=c.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=c.memoizedProps,i.memoizedState=c.memoizedState,i.updateQueue=c.updateQueue,i.type=c.type,s=c.dependencies,i.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),i}function gd(i,s,c,p,x,w){var j=0;if(p=i,typeof i=="function")Cp(i)&&(j=1);else if(typeof i=="string")j=lM(i,c,se.current)?26:i==="html"||i==="head"||i==="body"?27:5;else e:switch(i){case F:return i=mr(31,c,s,x),i.elementType=F,i.lanes=w,i;case v:return Ts(c.children,x,w,s);case S:j=8,x|=24;break;case E:return i=mr(12,c,s,x|2),i.elementType=E,i.lanes=w,i;case D:return i=mr(13,c,s,x),i.elementType=D,i.lanes=w,i;case T:return i=mr(19,c,s,x),i.elementType=T,i.lanes=w,i;default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case N:j=10;break e;case C:j=9;break e;case _:j=11;break e;case M:j=14;break e;case I:j=16,p=null;break e}j=29,c=Error(r(130,i===null?"null":typeof i,"")),p=null}return s=mr(j,c,s,x),s.elementType=i,s.type=p,s.lanes=w,s}function Ts(i,s,c,p){return i=mr(7,i,p,s),i.lanes=c,i}function jp(i,s,c){return i=mr(6,i,null,s),i.lanes=c,i}function vv(i){var s=mr(18,null,null,0);return s.stateNode=i,s}function Ap(i,s,c){return s=mr(4,i.children!==null?i.children:[],i.key,s),s.lanes=c,s.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},s}var wv=new WeakMap;function Or(i,s){if(typeof i=="object"&&i!==null){var c=wv.get(i);return c!==void 0?c:(s={value:i,source:s,stack:Bt(s)},wv.set(i,s),s)}return{value:i,source:s,stack:Bt(s)}}var To=[],Mo=0,yd=null,mc=0,Rr=[],Lr=0,Ta=null,bi=1,xi="";function $i(i,s){To[Mo++]=mc,To[Mo++]=yd,yd=i,mc=s}function kv(i,s,c){Rr[Lr++]=bi,Rr[Lr++]=xi,Rr[Lr++]=Ta,Ta=i;var p=bi;i=xi;var x=32-vt(p)-1;p&=~(1<<x),c+=1;var w=32-vt(s)+x;if(30<w){var j=x-x%5;w=(p&(1<<j)-1).toString(32),p>>=j,x-=j,bi=1<<32-vt(s)+x|c<<x|p,xi=w+i}else bi=1<<w|c<<x|p,xi=i}function Tp(i){i.return!==null&&($i(i,1),kv(i,1,0))}function Mp(i){for(;i===yd;)yd=To[--Mo],To[Mo]=null,mc=To[--Mo],To[Mo]=null;for(;i===Ta;)Ta=Rr[--Lr],Rr[Lr]=null,xi=Rr[--Lr],Rr[Lr]=null,bi=Rr[--Lr],Rr[Lr]=null}function Ev(i,s){Rr[Lr++]=bi,Rr[Lr++]=xi,Rr[Lr++]=Ta,bi=s.id,xi=s.overflow,Ta=i}var On=null,Ut=null,dt=!1,Ma=null,Ir=!1,Dp=Error(r(519));function Da(i){var s=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw gc(Or(s,i)),Dp}function Sv(i){var s=i.stateNode,c=i.type,p=i.memoizedProps;switch(s[Qt]=i,s[Sn]=p,c){case"dialog":it("cancel",s),it("close",s);break;case"iframe":case"object":case"embed":it("load",s);break;case"video":case"audio":for(c=0;c<Pc.length;c++)it(Pc[c],s);break;case"source":it("error",s);break;case"img":case"image":case"link":it("error",s),it("load",s);break;case"details":it("toggle",s);break;case"input":it("invalid",s),ei(s,p.value,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name,!0);break;case"select":it("invalid",s);break;case"textarea":it("invalid",s),So(s,p.value,p.defaultValue,p.children)}c=p.children,typeof c!="string"&&typeof c!="number"&&typeof c!="bigint"||s.textContent===""+c||p.suppressHydrationWarning===!0||$w(s.textContent,c)?(p.popover!=null&&(it("beforetoggle",s),it("toggle",s)),p.onScroll!=null&&it("scroll",s),p.onScrollEnd!=null&&it("scrollend",s),p.onClick!=null&&(s.onclick=Se),s=!0):s=!1,s||Da(i,!0)}function Nv(i){for(On=i.return;On;)switch(On.tag){case 5:case 31:case 13:Ir=!1;return;case 27:case 3:Ir=!0;return;default:On=On.return}}function Do(i){if(i!==On)return!1;if(!dt)return Nv(i),dt=!0,!1;var s=i.tag,c;if((c=s!==3&&s!==27)&&((c=s===5)&&(c=i.type,c=!(c!=="form"&&c!=="button")||Wm(i.type,i.memoizedProps)),c=!c),c&&Ut&&Da(i),Nv(i),s===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));Ut=Ww(i)}else if(s===31){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));Ut=Ww(i)}else s===27?(s=Ut,Ga(i.type)?(i=tg,tg=null,Ut=i):Ut=s):Ut=On?Pr(i.stateNode.nextSibling):null;return!0}function Ms(){Ut=On=null,dt=!1}function Op(){var i=Ma;return i!==null&&(ir===null?ir=i:ir.push.apply(ir,i),Ma=null),i}function gc(i){Ma===null?Ma=[i]:Ma.push(i)}var Rp=L(null),Ds=null,Fi=null;function Oa(i,s,c){R(Rp,s._currentValue),s._currentValue=c}function qi(i){i._currentValue=Rp.current,V(Rp)}function Lp(i,s,c){for(;i!==null;){var p=i.alternate;if((i.childLanes&s)!==s?(i.childLanes|=s,p!==null&&(p.childLanes|=s)):p!==null&&(p.childLanes&s)!==s&&(p.childLanes|=s),i===c)break;i=i.return}}function Ip(i,s,c,p){var x=i.child;for(x!==null&&(x.return=i);x!==null;){var w=x.dependencies;if(w!==null){var j=x.child;w=w.firstContext;e:for(;w!==null;){var P=w;w=x;for(var X=0;X<s.length;X++)if(P.context===s[X]){w.lanes|=c,P=w.alternate,P!==null&&(P.lanes|=c),Lp(w.return,c,i),p||(j=null);break e}w=P.next}}else if(x.tag===18){if(j=x.return,j===null)throw Error(r(341));j.lanes|=c,w=j.alternate,w!==null&&(w.lanes|=c),Lp(j,c,i),j=null}else j=x.child;if(j!==null)j.return=x;else for(j=x;j!==null;){if(j===i){j=null;break}if(x=j.sibling,x!==null){x.return=j.return,j=x;break}j=j.return}x=j}}function Oo(i,s,c,p){i=null;for(var x=s,w=!1;x!==null;){if(!w){if((x.flags&524288)!==0)w=!0;else if((x.flags&262144)!==0)break}if(x.tag===10){var j=x.alternate;if(j===null)throw Error(r(387));if(j=j.memoizedProps,j!==null){var P=x.type;pr(x.pendingProps.value,j.value)||(i!==null?i.push(P):i=[P])}}else if(x===xe.current){if(j=x.alternate,j===null)throw Error(r(387));j.memoizedState.memoizedState!==x.memoizedState.memoizedState&&(i!==null?i.push(qc):i=[qc])}x=x.return}i!==null&&Ip(s,i,c,p),s.flags|=262144}function bd(i){for(i=i.firstContext;i!==null;){if(!pr(i.context._currentValue,i.memoizedValue))return!0;i=i.next}return!1}function Os(i){Ds=i,Fi=null,i=i.dependencies,i!==null&&(i.firstContext=null)}function Rn(i){return _v(Ds,i)}function xd(i,s){return Ds===null&&Os(i),_v(i,s)}function _v(i,s){var c=s._currentValue;if(s={context:s,memoizedValue:c,next:null},Fi===null){if(i===null)throw Error(r(308));Fi=s,i.dependencies={lanes:0,firstContext:s},i.flags|=524288}else Fi=Fi.next=s;return c}var iT=typeof AbortController<"u"?AbortController:function(){var i=[],s=this.signal={aborted:!1,addEventListener:function(c,p){i.push(p)}};this.abort=function(){s.aborted=!0,i.forEach(function(c){return c()})}},aT=e.unstable_scheduleCallback,sT=e.unstable_NormalPriority,dn={$$typeof:N,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function zp(){return{controller:new iT,data:new Map,refCount:0}}function yc(i){i.refCount--,i.refCount===0&&aT(sT,function(){i.controller.abort()})}var bc=null,Pp=0,Ro=0,Lo=null;function oT(i,s){if(bc===null){var c=bc=[];Pp=0,Ro=$m(),Lo={status:"pending",value:void 0,then:function(p){c.push(p)}}}return Pp++,s.then(Cv,Cv),s}function Cv(){if(--Pp===0&&bc!==null){Lo!==null&&(Lo.status="fulfilled");var i=bc;bc=null,Ro=0,Lo=null;for(var s=0;s<i.length;s++)(0,i[s])()}}function lT(i,s){var c=[],p={status:"pending",value:null,reason:null,then:function(x){c.push(x)}};return i.then(function(){p.status="fulfilled",p.value=s;for(var x=0;x<c.length;x++)(0,c[x])(s)},function(x){for(p.status="rejected",p.reason=x,x=0;x<c.length;x++)(0,c[x])(void 0)}),p}var jv=z.S;z.S=function(i,s){dw=xt(),typeof s=="object"&&s!==null&&typeof s.then=="function"&&oT(i,s),jv!==null&&jv(i,s)};var Rs=L(null);function Bp(){var i=Rs.current;return i!==null?i:Ot.pooledCache}function vd(i,s){s===null?R(Rs,Rs.current):R(Rs,s.pool)}function Av(){var i=Bp();return i===null?null:{parent:dn._currentValue,pool:i}}var Io=Error(r(460)),Up=Error(r(474)),wd=Error(r(542)),kd={then:function(){}};function Tv(i){return i=i.status,i==="fulfilled"||i==="rejected"}function Mv(i,s,c){switch(c=i[c],c===void 0?i.push(s):c!==s&&(s.then(Se,Se),s=c),s.status){case"fulfilled":return s.value;case"rejected":throw i=s.reason,Ov(i),i;default:if(typeof s.status=="string")s.then(Se,Se);else{if(i=Ot,i!==null&&100<i.shellSuspendCounter)throw Error(r(482));i=s,i.status="pending",i.then(function(p){if(s.status==="pending"){var x=s;x.status="fulfilled",x.value=p}},function(p){if(s.status==="pending"){var x=s;x.status="rejected",x.reason=p}})}switch(s.status){case"fulfilled":return s.value;case"rejected":throw i=s.reason,Ov(i),i}throw Is=s,Io}}function Ls(i){try{var s=i._init;return s(i._payload)}catch(c){throw c!==null&&typeof c=="object"&&typeof c.then=="function"?(Is=c,Io):c}}var Is=null;function Dv(){if(Is===null)throw Error(r(459));var i=Is;return Is=null,i}function Ov(i){if(i===Io||i===wd)throw Error(r(483))}var zo=null,xc=0;function Ed(i){var s=xc;return xc+=1,zo===null&&(zo=[]),Mv(zo,i,s)}function vc(i,s){s=s.props.ref,i.ref=s!==void 0?s:null}function Sd(i,s){throw s.$$typeof===y?Error(r(525)):(i=Object.prototype.toString.call(s),Error(r(31,i==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":i)))}function Rv(i){function s(te,ee){if(i){var re=te.deletions;re===null?(te.deletions=[ee],te.flags|=16):re.push(ee)}}function c(te,ee){if(!i)return null;for(;ee!==null;)s(te,ee),ee=ee.sibling;return null}function p(te){for(var ee=new Map;te!==null;)te.key!==null?ee.set(te.key,te):ee.set(te.index,te),te=te.sibling;return ee}function x(te,ee){return te=Ui(te,ee),te.index=0,te.sibling=null,te}function w(te,ee,re){return te.index=re,i?(re=te.alternate,re!==null?(re=re.index,re<ee?(te.flags|=67108866,ee):re):(te.flags|=67108866,ee)):(te.flags|=1048576,ee)}function j(te){return i&&te.alternate===null&&(te.flags|=67108866),te}function P(te,ee,re,pe){return ee===null||ee.tag!==6?(ee=jp(re,te.mode,pe),ee.return=te,ee):(ee=x(ee,re),ee.return=te,ee)}function X(te,ee,re,pe){var Ue=re.type;return Ue===v?fe(te,ee,re.props.children,pe,re.key):ee!==null&&(ee.elementType===Ue||typeof Ue=="object"&&Ue!==null&&Ue.$$typeof===I&&Ls(Ue)===ee.type)?(ee=x(ee,re.props),vc(ee,re),ee.return=te,ee):(ee=gd(re.type,re.key,re.props,null,te.mode,pe),vc(ee,re),ee.return=te,ee)}function ie(te,ee,re,pe){return ee===null||ee.tag!==4||ee.stateNode.containerInfo!==re.containerInfo||ee.stateNode.implementation!==re.implementation?(ee=Ap(re,te.mode,pe),ee.return=te,ee):(ee=x(ee,re.children||[]),ee.return=te,ee)}function fe(te,ee,re,pe,Ue){return ee===null||ee.tag!==7?(ee=Ts(re,te.mode,pe,Ue),ee.return=te,ee):(ee=x(ee,re),ee.return=te,ee)}function me(te,ee,re){if(typeof ee=="string"&&ee!==""||typeof ee=="number"||typeof ee=="bigint")return ee=jp(""+ee,te.mode,re),ee.return=te,ee;if(typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case b:return re=gd(ee.type,ee.key,ee.props,null,te.mode,re),vc(re,ee),re.return=te,re;case k:return ee=Ap(ee,te.mode,re),ee.return=te,ee;case I:return ee=Ls(ee),me(te,ee,re)}if(H(ee)||K(ee))return ee=Ts(ee,te.mode,re,null),ee.return=te,ee;if(typeof ee.then=="function")return me(te,Ed(ee),re);if(ee.$$typeof===N)return me(te,xd(te,ee),re);Sd(te,ee)}return null}function ae(te,ee,re,pe){var Ue=ee!==null?ee.key:null;if(typeof re=="string"&&re!==""||typeof re=="number"||typeof re=="bigint")return Ue!==null?null:P(te,ee,""+re,pe);if(typeof re=="object"&&re!==null){switch(re.$$typeof){case b:return re.key===Ue?X(te,ee,re,pe):null;case k:return re.key===Ue?ie(te,ee,re,pe):null;case I:return re=Ls(re),ae(te,ee,re,pe)}if(H(re)||K(re))return Ue!==null?null:fe(te,ee,re,pe,null);if(typeof re.then=="function")return ae(te,ee,Ed(re),pe);if(re.$$typeof===N)return ae(te,ee,xd(te,re),pe);Sd(te,re)}return null}function oe(te,ee,re,pe,Ue){if(typeof pe=="string"&&pe!==""||typeof pe=="number"||typeof pe=="bigint")return te=te.get(re)||null,P(ee,te,""+pe,Ue);if(typeof pe=="object"&&pe!==null){switch(pe.$$typeof){case b:return te=te.get(pe.key===null?re:pe.key)||null,X(ee,te,pe,Ue);case k:return te=te.get(pe.key===null?re:pe.key)||null,ie(ee,te,pe,Ue);case I:return pe=Ls(pe),oe(te,ee,re,pe,Ue)}if(H(pe)||K(pe))return te=te.get(re)||null,fe(ee,te,pe,Ue,null);if(typeof pe.then=="function")return oe(te,ee,re,Ed(pe),Ue);if(pe.$$typeof===N)return oe(te,ee,re,xd(ee,pe),Ue);Sd(ee,pe)}return null}function Te(te,ee,re,pe){for(var Ue=null,yt=null,Re=ee,Ze=ee=0,ct=null;Re!==null&&Ze<re.length;Ze++){Re.index>Ze?(ct=Re,Re=null):ct=Re.sibling;var bt=ae(te,Re,re[Ze],pe);if(bt===null){Re===null&&(Re=ct);break}i&&Re&&bt.alternate===null&&s(te,Re),ee=w(bt,ee,Ze),yt===null?Ue=bt:yt.sibling=bt,yt=bt,Re=ct}if(Ze===re.length)return c(te,Re),dt&&$i(te,Ze),Ue;if(Re===null){for(;Ze<re.length;Ze++)Re=me(te,re[Ze],pe),Re!==null&&(ee=w(Re,ee,Ze),yt===null?Ue=Re:yt.sibling=Re,yt=Re);return dt&&$i(te,Ze),Ue}for(Re=p(Re);Ze<re.length;Ze++)ct=oe(Re,te,Ze,re[Ze],pe),ct!==null&&(i&&ct.alternate!==null&&Re.delete(ct.key===null?Ze:ct.key),ee=w(ct,ee,Ze),yt===null?Ue=ct:yt.sibling=ct,yt=ct);return i&&Re.forEach(function(Xa){return s(te,Xa)}),dt&&$i(te,Ze),Ue}function qe(te,ee,re,pe){if(re==null)throw Error(r(151));for(var Ue=null,yt=null,Re=ee,Ze=ee=0,ct=null,bt=re.next();Re!==null&&!bt.done;Ze++,bt=re.next()){Re.index>Ze?(ct=Re,Re=null):ct=Re.sibling;var Xa=ae(te,Re,bt.value,pe);if(Xa===null){Re===null&&(Re=ct);break}i&&Re&&Xa.alternate===null&&s(te,Re),ee=w(Xa,ee,Ze),yt===null?Ue=Xa:yt.sibling=Xa,yt=Xa,Re=ct}if(bt.done)return c(te,Re),dt&&$i(te,Ze),Ue;if(Re===null){for(;!bt.done;Ze++,bt=re.next())bt=me(te,bt.value,pe),bt!==null&&(ee=w(bt,ee,Ze),yt===null?Ue=bt:yt.sibling=bt,yt=bt);return dt&&$i(te,Ze),Ue}for(Re=p(Re);!bt.done;Ze++,bt=re.next())bt=oe(Re,te,Ze,bt.value,pe),bt!==null&&(i&&bt.alternate!==null&&Re.delete(bt.key===null?Ze:bt.key),ee=w(bt,ee,Ze),yt===null?Ue=bt:yt.sibling=bt,yt=bt);return i&&Re.forEach(function(xM){return s(te,xM)}),dt&&$i(te,Ze),Ue}function Tt(te,ee,re,pe){if(typeof re=="object"&&re!==null&&re.type===v&&re.key===null&&(re=re.props.children),typeof re=="object"&&re!==null){switch(re.$$typeof){case b:e:{for(var Ue=re.key;ee!==null;){if(ee.key===Ue){if(Ue=re.type,Ue===v){if(ee.tag===7){c(te,ee.sibling),pe=x(ee,re.props.children),pe.return=te,te=pe;break e}}else if(ee.elementType===Ue||typeof Ue=="object"&&Ue!==null&&Ue.$$typeof===I&&Ls(Ue)===ee.type){c(te,ee.sibling),pe=x(ee,re.props),vc(pe,re),pe.return=te,te=pe;break e}c(te,ee);break}else s(te,ee);ee=ee.sibling}re.type===v?(pe=Ts(re.props.children,te.mode,pe,re.key),pe.return=te,te=pe):(pe=gd(re.type,re.key,re.props,null,te.mode,pe),vc(pe,re),pe.return=te,te=pe)}return j(te);case k:e:{for(Ue=re.key;ee!==null;){if(ee.key===Ue)if(ee.tag===4&&ee.stateNode.containerInfo===re.containerInfo&&ee.stateNode.implementation===re.implementation){c(te,ee.sibling),pe=x(ee,re.children||[]),pe.return=te,te=pe;break e}else{c(te,ee);break}else s(te,ee);ee=ee.sibling}pe=Ap(re,te.mode,pe),pe.return=te,te=pe}return j(te);case I:return re=Ls(re),Tt(te,ee,re,pe)}if(H(re))return Te(te,ee,re,pe);if(K(re)){if(Ue=K(re),typeof Ue!="function")throw Error(r(150));return re=Ue.call(re),qe(te,ee,re,pe)}if(typeof re.then=="function")return Tt(te,ee,Ed(re),pe);if(re.$$typeof===N)return Tt(te,ee,xd(te,re),pe);Sd(te,re)}return typeof re=="string"&&re!==""||typeof re=="number"||typeof re=="bigint"?(re=""+re,ee!==null&&ee.tag===6?(c(te,ee.sibling),pe=x(ee,re),pe.return=te,te=pe):(c(te,ee),pe=jp(re,te.mode,pe),pe.return=te,te=pe),j(te)):c(te,ee)}return function(te,ee,re,pe){try{xc=0;var Ue=Tt(te,ee,re,pe);return zo=null,Ue}catch(Re){if(Re===Io||Re===wd)throw Re;var yt=mr(29,Re,null,te.mode);return yt.lanes=pe,yt.return=te,yt}finally{}}}var zs=Rv(!0),Lv=Rv(!1),Ra=!1;function $p(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Fp(i,s){i=i.updateQueue,s.updateQueue===i&&(s.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,callbacks:null})}function La(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function Ia(i,s,c){var p=i.updateQueue;if(p===null)return null;if(p=p.shared,(wt&2)!==0){var x=p.pending;return x===null?s.next=s:(s.next=x.next,x.next=s),p.pending=s,s=md(i),bv(i,null,c),s}return pd(i,p,s,c),md(i)}function wc(i,s,c){if(s=s.updateQueue,s!==null&&(s=s.shared,(c&4194048)!==0)){var p=s.lanes;p&=i.pendingLanes,c|=p,s.lanes=c,Fe(i,c)}}function qp(i,s){var c=i.updateQueue,p=i.alternate;if(p!==null&&(p=p.updateQueue,c===p)){var x=null,w=null;if(c=c.firstBaseUpdate,c!==null){do{var j={lane:c.lane,tag:c.tag,payload:c.payload,callback:null,next:null};w===null?x=w=j:w=w.next=j,c=c.next}while(c!==null);w===null?x=w=s:w=w.next=s}else x=w=s;c={baseState:p.baseState,firstBaseUpdate:x,lastBaseUpdate:w,shared:p.shared,callbacks:p.callbacks},i.updateQueue=c;return}i=c.lastBaseUpdate,i===null?c.firstBaseUpdate=s:i.next=s,c.lastBaseUpdate=s}var Hp=!1;function kc(){if(Hp){var i=Lo;if(i!==null)throw i}}function Ec(i,s,c,p){Hp=!1;var x=i.updateQueue;Ra=!1;var w=x.firstBaseUpdate,j=x.lastBaseUpdate,P=x.shared.pending;if(P!==null){x.shared.pending=null;var X=P,ie=X.next;X.next=null,j===null?w=ie:j.next=ie,j=X;var fe=i.alternate;fe!==null&&(fe=fe.updateQueue,P=fe.lastBaseUpdate,P!==j&&(P===null?fe.firstBaseUpdate=ie:P.next=ie,fe.lastBaseUpdate=X))}if(w!==null){var me=x.baseState;j=0,fe=ie=X=null,P=w;do{var ae=P.lane&-536870913,oe=ae!==P.lane;if(oe?(lt&ae)===ae:(p&ae)===ae){ae!==0&&ae===Ro&&(Hp=!0),fe!==null&&(fe=fe.next={lane:0,tag:P.tag,payload:P.payload,callback:null,next:null});e:{var Te=i,qe=P;ae=s;var Tt=c;switch(qe.tag){case 1:if(Te=qe.payload,typeof Te=="function"){me=Te.call(Tt,me,ae);break e}me=Te;break e;case 3:Te.flags=Te.flags&-65537|128;case 0:if(Te=qe.payload,ae=typeof Te=="function"?Te.call(Tt,me,ae):Te,ae==null)break e;me=m({},me,ae);break e;case 2:Ra=!0}}ae=P.callback,ae!==null&&(i.flags|=64,oe&&(i.flags|=8192),oe=x.callbacks,oe===null?x.callbacks=[ae]:oe.push(ae))}else oe={lane:ae,tag:P.tag,payload:P.payload,callback:P.callback,next:null},fe===null?(ie=fe=oe,X=me):fe=fe.next=oe,j|=ae;if(P=P.next,P===null){if(P=x.shared.pending,P===null)break;oe=P,P=oe.next,oe.next=null,x.lastBaseUpdate=oe,x.shared.pending=null}}while(!0);fe===null&&(X=me),x.baseState=X,x.firstBaseUpdate=ie,x.lastBaseUpdate=fe,w===null&&(x.shared.lanes=0),$a|=j,i.lanes=j,i.memoizedState=me}}function Iv(i,s){if(typeof i!="function")throw Error(r(191,i));i.call(s)}function zv(i,s){var c=i.callbacks;if(c!==null)for(i.callbacks=null,i=0;i<c.length;i++)Iv(c[i],s)}var Po=L(null),Nd=L(0);function Pv(i,s){i=Zi,R(Nd,i),R(Po,s),Zi=i|s.baseLanes}function Kp(){R(Nd,Zi),R(Po,Po.current)}function Gp(){Zi=Nd.current,V(Po),V(Nd)}var gr=L(null),zr=null;function za(i){var s=i.alternate;R(on,on.current&1),R(gr,i),zr===null&&(s===null||Po.current!==null||s.memoizedState!==null)&&(zr=i)}function Vp(i){R(on,on.current),R(gr,i),zr===null&&(zr=i)}function Bv(i){i.tag===22?(R(on,on.current),R(gr,i),zr===null&&(zr=i)):Pa()}function Pa(){R(on,on.current),R(gr,gr.current)}function yr(i){V(gr),zr===i&&(zr=null),V(on)}var on=L(0);function _d(i){for(var s=i;s!==null;){if(s.tag===13){var c=s.memoizedState;if(c!==null&&(c=c.dehydrated,c===null||Jm(c)||eg(c)))return s}else if(s.tag===19&&(s.memoizedProps.revealOrder==="forwards"||s.memoizedProps.revealOrder==="backwards"||s.memoizedProps.revealOrder==="unstable_legacy-backwards"||s.memoizedProps.revealOrder==="together")){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var Hi=0,We=null,jt=null,fn=null,Cd=!1,Bo=!1,Ps=!1,jd=0,Sc=0,Uo=null,cT=0;function tn(){throw Error(r(321))}function Yp(i,s){if(s===null)return!1;for(var c=0;c<s.length&&c<i.length;c++)if(!pr(i[c],s[c]))return!1;return!0}function Qp(i,s,c,p,x,w){return Hi=w,We=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,z.H=i===null||i.memoizedState===null?k0:um,Ps=!1,w=c(p,x),Ps=!1,Bo&&(w=$v(s,c,p,x)),Uv(i),w}function Uv(i){z.H=Cc;var s=jt!==null&&jt.next!==null;if(Hi=0,fn=jt=We=null,Cd=!1,Sc=0,Uo=null,s)throw Error(r(300));i===null||hn||(i=i.dependencies,i!==null&&bd(i)&&(hn=!0))}function $v(i,s,c,p){We=i;var x=0;do{if(Bo&&(Uo=null),Sc=0,Bo=!1,25<=x)throw Error(r(301));if(x+=1,fn=jt=null,i.updateQueue!=null){var w=i.updateQueue;w.lastEffect=null,w.events=null,w.stores=null,w.memoCache!=null&&(w.memoCache.index=0)}z.H=E0,w=s(c,p)}while(Bo);return w}function uT(){var i=z.H,s=i.useState()[0];return s=typeof s.then=="function"?Nc(s):s,i=i.useState()[0],(jt!==null?jt.memoizedState:null)!==i&&(We.flags|=1024),s}function Wp(){var i=jd!==0;return jd=0,i}function Xp(i,s,c){s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~c}function Zp(i){if(Cd){for(i=i.memoizedState;i!==null;){var s=i.queue;s!==null&&(s.pending=null),i=i.next}Cd=!1}Hi=0,fn=jt=We=null,Bo=!1,Sc=jd=0,Uo=null}function Vn(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return fn===null?We.memoizedState=fn=i:fn=fn.next=i,fn}function ln(){if(jt===null){var i=We.alternate;i=i!==null?i.memoizedState:null}else i=jt.next;var s=fn===null?We.memoizedState:fn.next;if(s!==null)fn=s,jt=i;else{if(i===null)throw We.alternate===null?Error(r(467)):Error(r(310));jt=i,i={memoizedState:jt.memoizedState,baseState:jt.baseState,baseQueue:jt.baseQueue,queue:jt.queue,next:null},fn===null?We.memoizedState=fn=i:fn=fn.next=i}return fn}function Ad(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Nc(i){var s=Sc;return Sc+=1,Uo===null&&(Uo=[]),i=Mv(Uo,i,s),s=We,(fn===null?s.memoizedState:fn.next)===null&&(s=s.alternate,z.H=s===null||s.memoizedState===null?k0:um),i}function Td(i){if(i!==null&&typeof i=="object"){if(typeof i.then=="function")return Nc(i);if(i.$$typeof===N)return Rn(i)}throw Error(r(438,String(i)))}function Jp(i){var s=null,c=We.updateQueue;if(c!==null&&(s=c.memoCache),s==null){var p=We.alternate;p!==null&&(p=p.updateQueue,p!==null&&(p=p.memoCache,p!=null&&(s={data:p.data.map(function(x){return x.slice()}),index:0})))}if(s==null&&(s={data:[],index:0}),c===null&&(c=Ad(),We.updateQueue=c),c.memoCache=s,c=s.data[s.index],c===void 0)for(c=s.data[s.index]=Array(i),p=0;p<i;p++)c[p]=$;return s.index++,c}function Ki(i,s){return typeof s=="function"?s(i):s}function Md(i){var s=ln();return em(s,jt,i)}function em(i,s,c){var p=i.queue;if(p===null)throw Error(r(311));p.lastRenderedReducer=c;var x=i.baseQueue,w=p.pending;if(w!==null){if(x!==null){var j=x.next;x.next=w.next,w.next=j}s.baseQueue=x=w,p.pending=null}if(w=i.baseState,x===null)i.memoizedState=w;else{s=x.next;var P=j=null,X=null,ie=s,fe=!1;do{var me=ie.lane&-536870913;if(me!==ie.lane?(lt&me)===me:(Hi&me)===me){var ae=ie.revertLane;if(ae===0)X!==null&&(X=X.next={lane:0,revertLane:0,gesture:null,action:ie.action,hasEagerState:ie.hasEagerState,eagerState:ie.eagerState,next:null}),me===Ro&&(fe=!0);else if((Hi&ae)===ae){ie=ie.next,ae===Ro&&(fe=!0);continue}else me={lane:0,revertLane:ie.revertLane,gesture:null,action:ie.action,hasEagerState:ie.hasEagerState,eagerState:ie.eagerState,next:null},X===null?(P=X=me,j=w):X=X.next=me,We.lanes|=ae,$a|=ae;me=ie.action,Ps&&c(w,me),w=ie.hasEagerState?ie.eagerState:c(w,me)}else ae={lane:me,revertLane:ie.revertLane,gesture:ie.gesture,action:ie.action,hasEagerState:ie.hasEagerState,eagerState:ie.eagerState,next:null},X===null?(P=X=ae,j=w):X=X.next=ae,We.lanes|=me,$a|=me;ie=ie.next}while(ie!==null&&ie!==s);if(X===null?j=w:X.next=P,!pr(w,i.memoizedState)&&(hn=!0,fe&&(c=Lo,c!==null)))throw c;i.memoizedState=w,i.baseState=j,i.baseQueue=X,p.lastRenderedState=w}return x===null&&(p.lanes=0),[i.memoizedState,p.dispatch]}function tm(i){var s=ln(),c=s.queue;if(c===null)throw Error(r(311));c.lastRenderedReducer=i;var p=c.dispatch,x=c.pending,w=s.memoizedState;if(x!==null){c.pending=null;var j=x=x.next;do w=i(w,j.action),j=j.next;while(j!==x);pr(w,s.memoizedState)||(hn=!0),s.memoizedState=w,s.baseQueue===null&&(s.baseState=w),c.lastRenderedState=w}return[w,p]}function Fv(i,s,c){var p=We,x=ln(),w=dt;if(w){if(c===void 0)throw Error(r(407));c=c()}else c=s();var j=!pr((jt||x).memoizedState,c);if(j&&(x.memoizedState=c,hn=!0),x=x.queue,im(Kv.bind(null,p,x,i),[i]),x.getSnapshot!==s||j||fn!==null&&fn.memoizedState.tag&1){if(p.flags|=2048,$o(9,{destroy:void 0},Hv.bind(null,p,x,c,s),null),Ot===null)throw Error(r(349));w||(Hi&127)!==0||qv(p,s,c)}return c}function qv(i,s,c){i.flags|=16384,i={getSnapshot:s,value:c},s=We.updateQueue,s===null?(s=Ad(),We.updateQueue=s,s.stores=[i]):(c=s.stores,c===null?s.stores=[i]:c.push(i))}function Hv(i,s,c,p){s.value=c,s.getSnapshot=p,Gv(s)&&Vv(i)}function Kv(i,s,c){return c(function(){Gv(s)&&Vv(i)})}function Gv(i){var s=i.getSnapshot;i=i.value;try{var c=s();return!pr(i,c)}catch{return!0}}function Vv(i){var s=As(i,2);s!==null&&ar(s,i,2)}function nm(i){var s=Vn();if(typeof i=="function"){var c=i;if(i=c(),Ps){En(!0);try{c()}finally{En(!1)}}}return s.memoizedState=s.baseState=i,s.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ki,lastRenderedState:i},s}function Yv(i,s,c,p){return i.baseState=c,em(i,jt,typeof p=="function"?p:Ki)}function dT(i,s,c,p,x){if(Rd(i))throw Error(r(485));if(i=s.action,i!==null){var w={payload:x,action:i,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(j){w.listeners.push(j)}};z.T!==null?c(!0):w.isTransition=!1,p(w),c=s.pending,c===null?(w.next=s.pending=w,Qv(s,w)):(w.next=c.next,s.pending=c.next=w)}}function Qv(i,s){var c=s.action,p=s.payload,x=i.state;if(s.isTransition){var w=z.T,j={};z.T=j;try{var P=c(x,p),X=z.S;X!==null&&X(j,P),Wv(i,s,P)}catch(ie){rm(i,s,ie)}finally{w!==null&&j.types!==null&&(w.types=j.types),z.T=w}}else try{w=c(x,p),Wv(i,s,w)}catch(ie){rm(i,s,ie)}}function Wv(i,s,c){c!==null&&typeof c=="object"&&typeof c.then=="function"?c.then(function(p){Xv(i,s,p)},function(p){return rm(i,s,p)}):Xv(i,s,c)}function Xv(i,s,c){s.status="fulfilled",s.value=c,Zv(s),i.state=c,s=i.pending,s!==null&&(c=s.next,c===s?i.pending=null:(c=c.next,s.next=c,Qv(i,c)))}function rm(i,s,c){var p=i.pending;if(i.pending=null,p!==null){p=p.next;do s.status="rejected",s.reason=c,Zv(s),s=s.next;while(s!==p)}i.action=null}function Zv(i){i=i.listeners;for(var s=0;s<i.length;s++)(0,i[s])()}function Jv(i,s){return s}function e0(i,s){if(dt){var c=Ot.formState;if(c!==null){e:{var p=We;if(dt){if(Ut){t:{for(var x=Ut,w=Ir;x.nodeType!==8;){if(!w){x=null;break t}if(x=Pr(x.nextSibling),x===null){x=null;break t}}w=x.data,x=w==="F!"||w==="F"?x:null}if(x){Ut=Pr(x.nextSibling),p=x.data==="F!";break e}}Da(p)}p=!1}p&&(s=c[0])}}return c=Vn(),c.memoizedState=c.baseState=s,p={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Jv,lastRenderedState:s},c.queue=p,c=x0.bind(null,We,p),p.dispatch=c,p=nm(!1),w=cm.bind(null,We,!1,p.queue),p=Vn(),x={state:s,dispatch:null,action:i,pending:null},p.queue=x,c=dT.bind(null,We,x,w,c),x.dispatch=c,p.memoizedState=i,[s,c,!1]}function t0(i){var s=ln();return n0(s,jt,i)}function n0(i,s,c){if(s=em(i,s,Jv)[0],i=Md(Ki)[0],typeof s=="object"&&s!==null&&typeof s.then=="function")try{var p=Nc(s)}catch(j){throw j===Io?wd:j}else p=s;s=ln();var x=s.queue,w=x.dispatch;return c!==s.memoizedState&&(We.flags|=2048,$o(9,{destroy:void 0},fT.bind(null,x,c),null)),[p,w,i]}function fT(i,s){i.action=s}function r0(i){var s=ln(),c=jt;if(c!==null)return n0(s,c,i);ln(),s=s.memoizedState,c=ln();var p=c.queue.dispatch;return c.memoizedState=i,[s,p,!1]}function $o(i,s,c,p){return i={tag:i,create:c,deps:p,inst:s,next:null},s=We.updateQueue,s===null&&(s=Ad(),We.updateQueue=s),c=s.lastEffect,c===null?s.lastEffect=i.next=i:(p=c.next,c.next=i,i.next=p,s.lastEffect=i),i}function i0(){return ln().memoizedState}function Dd(i,s,c,p){var x=Vn();We.flags|=i,x.memoizedState=$o(1|s,{destroy:void 0},c,p===void 0?null:p)}function Od(i,s,c,p){var x=ln();p=p===void 0?null:p;var w=x.memoizedState.inst;jt!==null&&p!==null&&Yp(p,jt.memoizedState.deps)?x.memoizedState=$o(s,w,c,p):(We.flags|=i,x.memoizedState=$o(1|s,w,c,p))}function a0(i,s){Dd(8390656,8,i,s)}function im(i,s){Od(2048,8,i,s)}function hT(i){We.flags|=4;var s=We.updateQueue;if(s===null)s=Ad(),We.updateQueue=s,s.events=[i];else{var c=s.events;c===null?s.events=[i]:c.push(i)}}function s0(i){var s=ln().memoizedState;return hT({ref:s,nextImpl:i}),function(){if((wt&2)!==0)throw Error(r(440));return s.impl.apply(void 0,arguments)}}function o0(i,s){return Od(4,2,i,s)}function l0(i,s){return Od(4,4,i,s)}function c0(i,s){if(typeof s=="function"){i=i();var c=s(i);return function(){typeof c=="function"?c():s(null)}}if(s!=null)return i=i(),s.current=i,function(){s.current=null}}function u0(i,s,c){c=c!=null?c.concat([i]):null,Od(4,4,c0.bind(null,s,i),c)}function am(){}function d0(i,s){var c=ln();s=s===void 0?null:s;var p=c.memoizedState;return s!==null&&Yp(s,p[1])?p[0]:(c.memoizedState=[i,s],i)}function f0(i,s){var c=ln();s=s===void 0?null:s;var p=c.memoizedState;if(s!==null&&Yp(s,p[1]))return p[0];if(p=i(),Ps){En(!0);try{i()}finally{En(!1)}}return c.memoizedState=[p,s],p}function sm(i,s,c){return c===void 0||(Hi&1073741824)!==0&&(lt&261930)===0?i.memoizedState=s:(i.memoizedState=c,i=hw(),We.lanes|=i,$a|=i,c)}function h0(i,s,c,p){return pr(c,s)?c:Po.current!==null?(i=sm(i,c,p),pr(i,s)||(hn=!0),i):(Hi&42)===0||(Hi&1073741824)!==0&&(lt&261930)===0?(hn=!0,i.memoizedState=c):(i=hw(),We.lanes|=i,$a|=i,s)}function p0(i,s,c,p,x){var w=Y.p;Y.p=w!==0&&8>w?w:8;var j=z.T,P={};z.T=P,cm(i,!1,s,c);try{var X=x(),ie=z.S;if(ie!==null&&ie(P,X),X!==null&&typeof X=="object"&&typeof X.then=="function"){var fe=lT(X,p);_c(i,s,fe,vr(i))}else _c(i,s,p,vr(i))}catch(me){_c(i,s,{then:function(){},status:"rejected",reason:me},vr())}finally{Y.p=w,j!==null&&P.types!==null&&(j.types=P.types),z.T=j}}function pT(){}function om(i,s,c,p){if(i.tag!==5)throw Error(r(476));var x=m0(i).queue;p0(i,x,s,W,c===null?pT:function(){return g0(i),c(p)})}function m0(i){var s=i.memoizedState;if(s!==null)return s;s={memoizedState:W,baseState:W,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ki,lastRenderedState:W},next:null};var c={};return s.next={memoizedState:c,baseState:c,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ki,lastRenderedState:c},next:null},i.memoizedState=s,i=i.alternate,i!==null&&(i.memoizedState=s),s}function g0(i){var s=m0(i);s.next===null&&(s=i.alternate.memoizedState),_c(i,s.next.queue,{},vr())}function lm(){return Rn(qc)}function y0(){return ln().memoizedState}function b0(){return ln().memoizedState}function mT(i){for(var s=i.return;s!==null;){switch(s.tag){case 24:case 3:var c=vr();i=La(c);var p=Ia(s,i,c);p!==null&&(ar(p,s,c),wc(p,s,c)),s={cache:zp()},i.payload=s;return}s=s.return}}function gT(i,s,c){var p=vr();c={lane:p,revertLane:0,gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},Rd(i)?v0(s,c):(c=_p(i,s,c,p),c!==null&&(ar(c,i,p),w0(c,s,p)))}function x0(i,s,c){var p=vr();_c(i,s,c,p)}function _c(i,s,c,p){var x={lane:p,revertLane:0,gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null};if(Rd(i))v0(s,x);else{var w=i.alternate;if(i.lanes===0&&(w===null||w.lanes===0)&&(w=s.lastRenderedReducer,w!==null))try{var j=s.lastRenderedState,P=w(j,c);if(x.hasEagerState=!0,x.eagerState=P,pr(P,j))return pd(i,s,x,0),Ot===null&&hd(),!1}catch{}finally{}if(c=_p(i,s,x,p),c!==null)return ar(c,i,p),w0(c,s,p),!0}return!1}function cm(i,s,c,p){if(p={lane:2,revertLane:$m(),gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null},Rd(i)){if(s)throw Error(r(479))}else s=_p(i,c,p,2),s!==null&&ar(s,i,2)}function Rd(i){var s=i.alternate;return i===We||s!==null&&s===We}function v0(i,s){Bo=Cd=!0;var c=i.pending;c===null?s.next=s:(s.next=c.next,c.next=s),i.pending=s}function w0(i,s,c){if((c&4194048)!==0){var p=s.lanes;p&=i.pendingLanes,c|=p,s.lanes=c,Fe(i,c)}}var Cc={readContext:Rn,use:Td,useCallback:tn,useContext:tn,useEffect:tn,useImperativeHandle:tn,useLayoutEffect:tn,useInsertionEffect:tn,useMemo:tn,useReducer:tn,useRef:tn,useState:tn,useDebugValue:tn,useDeferredValue:tn,useTransition:tn,useSyncExternalStore:tn,useId:tn,useHostTransitionStatus:tn,useFormState:tn,useActionState:tn,useOptimistic:tn,useMemoCache:tn,useCacheRefresh:tn};Cc.useEffectEvent=tn;var k0={readContext:Rn,use:Td,useCallback:function(i,s){return Vn().memoizedState=[i,s===void 0?null:s],i},useContext:Rn,useEffect:a0,useImperativeHandle:function(i,s,c){c=c!=null?c.concat([i]):null,Dd(4194308,4,c0.bind(null,s,i),c)},useLayoutEffect:function(i,s){return Dd(4194308,4,i,s)},useInsertionEffect:function(i,s){Dd(4,2,i,s)},useMemo:function(i,s){var c=Vn();s=s===void 0?null:s;var p=i();if(Ps){En(!0);try{i()}finally{En(!1)}}return c.memoizedState=[p,s],p},useReducer:function(i,s,c){var p=Vn();if(c!==void 0){var x=c(s);if(Ps){En(!0);try{c(s)}finally{En(!1)}}}else x=s;return p.memoizedState=p.baseState=x,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:x},p.queue=i,i=i.dispatch=gT.bind(null,We,i),[p.memoizedState,i]},useRef:function(i){var s=Vn();return i={current:i},s.memoizedState=i},useState:function(i){i=nm(i);var s=i.queue,c=x0.bind(null,We,s);return s.dispatch=c,[i.memoizedState,c]},useDebugValue:am,useDeferredValue:function(i,s){var c=Vn();return sm(c,i,s)},useTransition:function(){var i=nm(!1);return i=p0.bind(null,We,i.queue,!0,!1),Vn().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,s,c){var p=We,x=Vn();if(dt){if(c===void 0)throw Error(r(407));c=c()}else{if(c=s(),Ot===null)throw Error(r(349));(lt&127)!==0||qv(p,s,c)}x.memoizedState=c;var w={value:c,getSnapshot:s};return x.queue=w,a0(Kv.bind(null,p,w,i),[i]),p.flags|=2048,$o(9,{destroy:void 0},Hv.bind(null,p,w,c,s),null),c},useId:function(){var i=Vn(),s=Ot.identifierPrefix;if(dt){var c=xi,p=bi;c=(p&~(1<<32-vt(p)-1)).toString(32)+c,s="_"+s+"R_"+c,c=jd++,0<c&&(s+="H"+c.toString(32)),s+="_"}else c=cT++,s="_"+s+"r_"+c.toString(32)+"_";return i.memoizedState=s},useHostTransitionStatus:lm,useFormState:e0,useActionState:e0,useOptimistic:function(i){var s=Vn();s.memoizedState=s.baseState=i;var c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return s.queue=c,s=cm.bind(null,We,!0,c),c.dispatch=s,[i,s]},useMemoCache:Jp,useCacheRefresh:function(){return Vn().memoizedState=mT.bind(null,We)},useEffectEvent:function(i){var s=Vn(),c={impl:i};return s.memoizedState=c,function(){if((wt&2)!==0)throw Error(r(440));return c.impl.apply(void 0,arguments)}}},um={readContext:Rn,use:Td,useCallback:d0,useContext:Rn,useEffect:im,useImperativeHandle:u0,useInsertionEffect:o0,useLayoutEffect:l0,useMemo:f0,useReducer:Md,useRef:i0,useState:function(){return Md(Ki)},useDebugValue:am,useDeferredValue:function(i,s){var c=ln();return h0(c,jt.memoizedState,i,s)},useTransition:function(){var i=Md(Ki)[0],s=ln().memoizedState;return[typeof i=="boolean"?i:Nc(i),s]},useSyncExternalStore:Fv,useId:y0,useHostTransitionStatus:lm,useFormState:t0,useActionState:t0,useOptimistic:function(i,s){var c=ln();return Yv(c,jt,i,s)},useMemoCache:Jp,useCacheRefresh:b0};um.useEffectEvent=s0;var E0={readContext:Rn,use:Td,useCallback:d0,useContext:Rn,useEffect:im,useImperativeHandle:u0,useInsertionEffect:o0,useLayoutEffect:l0,useMemo:f0,useReducer:tm,useRef:i0,useState:function(){return tm(Ki)},useDebugValue:am,useDeferredValue:function(i,s){var c=ln();return jt===null?sm(c,i,s):h0(c,jt.memoizedState,i,s)},useTransition:function(){var i=tm(Ki)[0],s=ln().memoizedState;return[typeof i=="boolean"?i:Nc(i),s]},useSyncExternalStore:Fv,useId:y0,useHostTransitionStatus:lm,useFormState:r0,useActionState:r0,useOptimistic:function(i,s){var c=ln();return jt!==null?Yv(c,jt,i,s):(c.baseState=i,[i,c.queue.dispatch])},useMemoCache:Jp,useCacheRefresh:b0};E0.useEffectEvent=s0;function dm(i,s,c,p){s=i.memoizedState,c=c(p,s),c=c==null?s:m({},s,c),i.memoizedState=c,i.lanes===0&&(i.updateQueue.baseState=c)}var fm={enqueueSetState:function(i,s,c){i=i._reactInternals;var p=vr(),x=La(p);x.payload=s,c!=null&&(x.callback=c),s=Ia(i,x,p),s!==null&&(ar(s,i,p),wc(s,i,p))},enqueueReplaceState:function(i,s,c){i=i._reactInternals;var p=vr(),x=La(p);x.tag=1,x.payload=s,c!=null&&(x.callback=c),s=Ia(i,x,p),s!==null&&(ar(s,i,p),wc(s,i,p))},enqueueForceUpdate:function(i,s){i=i._reactInternals;var c=vr(),p=La(c);p.tag=2,s!=null&&(p.callback=s),s=Ia(i,p,c),s!==null&&(ar(s,i,c),wc(s,i,c))}};function S0(i,s,c,p,x,w,j){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(p,w,j):s.prototype&&s.prototype.isPureReactComponent?!hc(c,p)||!hc(x,w):!0}function N0(i,s,c,p){i=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(c,p),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(c,p),s.state!==i&&fm.enqueueReplaceState(s,s.state,null)}function Bs(i,s){var c=s;if("ref"in s){c={};for(var p in s)p!=="ref"&&(c[p]=s[p])}if(i=i.defaultProps){c===s&&(c=m({},c));for(var x in i)c[x]===void 0&&(c[x]=i[x])}return c}function _0(i){fd(i)}function C0(i){console.error(i)}function j0(i){fd(i)}function Ld(i,s){try{var c=i.onUncaughtError;c(s.value,{componentStack:s.stack})}catch(p){setTimeout(function(){throw p})}}function A0(i,s,c){try{var p=i.onCaughtError;p(c.value,{componentStack:c.stack,errorBoundary:s.tag===1?s.stateNode:null})}catch(x){setTimeout(function(){throw x})}}function hm(i,s,c){return c=La(c),c.tag=3,c.payload={element:null},c.callback=function(){Ld(i,s)},c}function T0(i){return i=La(i),i.tag=3,i}function M0(i,s,c,p){var x=c.type.getDerivedStateFromError;if(typeof x=="function"){var w=p.value;i.payload=function(){return x(w)},i.callback=function(){A0(s,c,p)}}var j=c.stateNode;j!==null&&typeof j.componentDidCatch=="function"&&(i.callback=function(){A0(s,c,p),typeof x!="function"&&(Fa===null?Fa=new Set([this]):Fa.add(this));var P=p.stack;this.componentDidCatch(p.value,{componentStack:P!==null?P:""})})}function yT(i,s,c,p,x){if(c.flags|=32768,p!==null&&typeof p=="object"&&typeof p.then=="function"){if(s=c.alternate,s!==null&&Oo(s,c,x,!0),c=gr.current,c!==null){switch(c.tag){case 31:case 13:return zr===null?Vd():c.alternate===null&&nn===0&&(nn=3),c.flags&=-257,c.flags|=65536,c.lanes=x,p===kd?c.flags|=16384:(s=c.updateQueue,s===null?c.updateQueue=new Set([p]):s.add(p),Pm(i,p,x)),!1;case 22:return c.flags|=65536,p===kd?c.flags|=16384:(s=c.updateQueue,s===null?(s={transitions:null,markerInstances:null,retryQueue:new Set([p])},c.updateQueue=s):(c=s.retryQueue,c===null?s.retryQueue=new Set([p]):c.add(p)),Pm(i,p,x)),!1}throw Error(r(435,c.tag))}return Pm(i,p,x),Vd(),!1}if(dt)return s=gr.current,s!==null?((s.flags&65536)===0&&(s.flags|=256),s.flags|=65536,s.lanes=x,p!==Dp&&(i=Error(r(422),{cause:p}),gc(Or(i,c)))):(p!==Dp&&(s=Error(r(423),{cause:p}),gc(Or(s,c))),i=i.current.alternate,i.flags|=65536,x&=-x,i.lanes|=x,p=Or(p,c),x=hm(i.stateNode,p,x),qp(i,x),nn!==4&&(nn=2)),!1;var w=Error(r(520),{cause:p});if(w=Or(w,c),Lc===null?Lc=[w]:Lc.push(w),nn!==4&&(nn=2),s===null)return!0;p=Or(p,c),c=s;do{switch(c.tag){case 3:return c.flags|=65536,i=x&-x,c.lanes|=i,i=hm(c.stateNode,p,i),qp(c,i),!1;case 1:if(s=c.type,w=c.stateNode,(c.flags&128)===0&&(typeof s.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(Fa===null||!Fa.has(w))))return c.flags|=65536,x&=-x,c.lanes|=x,x=T0(x),M0(x,i,c,p),qp(c,x),!1}c=c.return}while(c!==null);return!1}var pm=Error(r(461)),hn=!1;function Ln(i,s,c,p){s.child=i===null?Lv(s,null,c,p):zs(s,i.child,c,p)}function D0(i,s,c,p,x){c=c.render;var w=s.ref;if("ref"in p){var j={};for(var P in p)P!=="ref"&&(j[P]=p[P])}else j=p;return Os(s),p=Qp(i,s,c,j,w,x),P=Wp(),i!==null&&!hn?(Xp(i,s,x),Gi(i,s,x)):(dt&&P&&Tp(s),s.flags|=1,Ln(i,s,p,x),s.child)}function O0(i,s,c,p,x){if(i===null){var w=c.type;return typeof w=="function"&&!Cp(w)&&w.defaultProps===void 0&&c.compare===null?(s.tag=15,s.type=w,R0(i,s,w,p,x)):(i=gd(c.type,null,p,s,s.mode,x),i.ref=s.ref,i.return=s,s.child=i)}if(w=i.child,!km(i,x)){var j=w.memoizedProps;if(c=c.compare,c=c!==null?c:hc,c(j,p)&&i.ref===s.ref)return Gi(i,s,x)}return s.flags|=1,i=Ui(w,p),i.ref=s.ref,i.return=s,s.child=i}function R0(i,s,c,p,x){if(i!==null){var w=i.memoizedProps;if(hc(w,p)&&i.ref===s.ref)if(hn=!1,s.pendingProps=p=w,km(i,x))(i.flags&131072)!==0&&(hn=!0);else return s.lanes=i.lanes,Gi(i,s,x)}return mm(i,s,c,p,x)}function L0(i,s,c,p){var x=p.children,w=i!==null?i.memoizedState:null;if(i===null&&s.stateNode===null&&(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),p.mode==="hidden"){if((s.flags&128)!==0){if(w=w!==null?w.baseLanes|c:c,i!==null){for(p=s.child=i.child,x=0;p!==null;)x=x|p.lanes|p.childLanes,p=p.sibling;p=x&~w}else p=0,s.child=null;return I0(i,s,w,c,p)}if((c&536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},i!==null&&vd(s,w!==null?w.cachePool:null),w!==null?Pv(s,w):Kp(),Bv(s);else return p=s.lanes=536870912,I0(i,s,w!==null?w.baseLanes|c:c,c,p)}else w!==null?(vd(s,w.cachePool),Pv(s,w),Pa(),s.memoizedState=null):(i!==null&&vd(s,null),Kp(),Pa());return Ln(i,s,x,c),s.child}function jc(i,s){return i!==null&&i.tag===22||s.stateNode!==null||(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.sibling}function I0(i,s,c,p,x){var w=Bp();return w=w===null?null:{parent:dn._currentValue,pool:w},s.memoizedState={baseLanes:c,cachePool:w},i!==null&&vd(s,null),Kp(),Bv(s),i!==null&&Oo(i,s,p,!0),s.childLanes=x,null}function Id(i,s){return s=Pd({mode:s.mode,children:s.children},i.mode),s.ref=i.ref,i.child=s,s.return=i,s}function z0(i,s,c){return zs(s,i.child,null,c),i=Id(s,s.pendingProps),i.flags|=2,yr(s),s.memoizedState=null,i}function bT(i,s,c){var p=s.pendingProps,x=(s.flags&128)!==0;if(s.flags&=-129,i===null){if(dt){if(p.mode==="hidden")return i=Id(s,p),s.lanes=536870912,jc(null,i);if(Vp(s),(i=Ut)?(i=Qw(i,Ir),i=i!==null&&i.data==="&"?i:null,i!==null&&(s.memoizedState={dehydrated:i,treeContext:Ta!==null?{id:bi,overflow:xi}:null,retryLane:536870912,hydrationErrors:null},c=vv(i),c.return=s,s.child=c,On=s,Ut=null)):i=null,i===null)throw Da(s);return s.lanes=536870912,null}return Id(s,p)}var w=i.memoizedState;if(w!==null){var j=w.dehydrated;if(Vp(s),x)if(s.flags&256)s.flags&=-257,s=z0(i,s,c);else if(s.memoizedState!==null)s.child=i.child,s.flags|=128,s=null;else throw Error(r(558));else if(hn||Oo(i,s,c,!1),x=(c&i.childLanes)!==0,hn||x){if(p=Ot,p!==null&&(j=Yt(p,c),j!==0&&j!==w.retryLane))throw w.retryLane=j,As(i,j),ar(p,i,j),pm;Vd(),s=z0(i,s,c)}else i=w.treeContext,Ut=Pr(j.nextSibling),On=s,dt=!0,Ma=null,Ir=!1,i!==null&&Ev(s,i),s=Id(s,p),s.flags|=4096;return s}return i=Ui(i.child,{mode:p.mode,children:p.children}),i.ref=s.ref,s.child=i,i.return=s,i}function zd(i,s){var c=s.ref;if(c===null)i!==null&&i.ref!==null&&(s.flags|=4194816);else{if(typeof c!="function"&&typeof c!="object")throw Error(r(284));(i===null||i.ref!==c)&&(s.flags|=4194816)}}function mm(i,s,c,p,x){return Os(s),c=Qp(i,s,c,p,void 0,x),p=Wp(),i!==null&&!hn?(Xp(i,s,x),Gi(i,s,x)):(dt&&p&&Tp(s),s.flags|=1,Ln(i,s,c,x),s.child)}function P0(i,s,c,p,x,w){return Os(s),s.updateQueue=null,c=$v(s,p,c,x),Uv(i),p=Wp(),i!==null&&!hn?(Xp(i,s,w),Gi(i,s,w)):(dt&&p&&Tp(s),s.flags|=1,Ln(i,s,c,w),s.child)}function B0(i,s,c,p,x){if(Os(s),s.stateNode===null){var w=Ao,j=c.contextType;typeof j=="object"&&j!==null&&(w=Rn(j)),w=new c(p,w),s.memoizedState=w.state!==null&&w.state!==void 0?w.state:null,w.updater=fm,s.stateNode=w,w._reactInternals=s,w=s.stateNode,w.props=p,w.state=s.memoizedState,w.refs={},$p(s),j=c.contextType,w.context=typeof j=="object"&&j!==null?Rn(j):Ao,w.state=s.memoizedState,j=c.getDerivedStateFromProps,typeof j=="function"&&(dm(s,c,j,p),w.state=s.memoizedState),typeof c.getDerivedStateFromProps=="function"||typeof w.getSnapshotBeforeUpdate=="function"||typeof w.UNSAFE_componentWillMount!="function"&&typeof w.componentWillMount!="function"||(j=w.state,typeof w.componentWillMount=="function"&&w.componentWillMount(),typeof w.UNSAFE_componentWillMount=="function"&&w.UNSAFE_componentWillMount(),j!==w.state&&fm.enqueueReplaceState(w,w.state,null),Ec(s,p,w,x),kc(),w.state=s.memoizedState),typeof w.componentDidMount=="function"&&(s.flags|=4194308),p=!0}else if(i===null){w=s.stateNode;var P=s.memoizedProps,X=Bs(c,P);w.props=X;var ie=w.context,fe=c.contextType;j=Ao,typeof fe=="object"&&fe!==null&&(j=Rn(fe));var me=c.getDerivedStateFromProps;fe=typeof me=="function"||typeof w.getSnapshotBeforeUpdate=="function",P=s.pendingProps!==P,fe||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(P||ie!==j)&&N0(s,w,p,j),Ra=!1;var ae=s.memoizedState;w.state=ae,Ec(s,p,w,x),kc(),ie=s.memoizedState,P||ae!==ie||Ra?(typeof me=="function"&&(dm(s,c,me,p),ie=s.memoizedState),(X=Ra||S0(s,c,X,p,ae,ie,j))?(fe||typeof w.UNSAFE_componentWillMount!="function"&&typeof w.componentWillMount!="function"||(typeof w.componentWillMount=="function"&&w.componentWillMount(),typeof w.UNSAFE_componentWillMount=="function"&&w.UNSAFE_componentWillMount()),typeof w.componentDidMount=="function"&&(s.flags|=4194308)):(typeof w.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=p,s.memoizedState=ie),w.props=p,w.state=ie,w.context=j,p=X):(typeof w.componentDidMount=="function"&&(s.flags|=4194308),p=!1)}else{w=s.stateNode,Fp(i,s),j=s.memoizedProps,fe=Bs(c,j),w.props=fe,me=s.pendingProps,ae=w.context,ie=c.contextType,X=Ao,typeof ie=="object"&&ie!==null&&(X=Rn(ie)),P=c.getDerivedStateFromProps,(ie=typeof P=="function"||typeof w.getSnapshotBeforeUpdate=="function")||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(j!==me||ae!==X)&&N0(s,w,p,X),Ra=!1,ae=s.memoizedState,w.state=ae,Ec(s,p,w,x),kc();var oe=s.memoizedState;j!==me||ae!==oe||Ra||i!==null&&i.dependencies!==null&&bd(i.dependencies)?(typeof P=="function"&&(dm(s,c,P,p),oe=s.memoizedState),(fe=Ra||S0(s,c,fe,p,ae,oe,X)||i!==null&&i.dependencies!==null&&bd(i.dependencies))?(ie||typeof w.UNSAFE_componentWillUpdate!="function"&&typeof w.componentWillUpdate!="function"||(typeof w.componentWillUpdate=="function"&&w.componentWillUpdate(p,oe,X),typeof w.UNSAFE_componentWillUpdate=="function"&&w.UNSAFE_componentWillUpdate(p,oe,X)),typeof w.componentDidUpdate=="function"&&(s.flags|=4),typeof w.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof w.componentDidUpdate!="function"||j===i.memoizedProps&&ae===i.memoizedState||(s.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||j===i.memoizedProps&&ae===i.memoizedState||(s.flags|=1024),s.memoizedProps=p,s.memoizedState=oe),w.props=p,w.state=oe,w.context=X,p=fe):(typeof w.componentDidUpdate!="function"||j===i.memoizedProps&&ae===i.memoizedState||(s.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||j===i.memoizedProps&&ae===i.memoizedState||(s.flags|=1024),p=!1)}return w=p,zd(i,s),p=(s.flags&128)!==0,w||p?(w=s.stateNode,c=p&&typeof c.getDerivedStateFromError!="function"?null:w.render(),s.flags|=1,i!==null&&p?(s.child=zs(s,i.child,null,x),s.child=zs(s,null,c,x)):Ln(i,s,c,x),s.memoizedState=w.state,i=s.child):i=Gi(i,s,x),i}function U0(i,s,c,p){return Ms(),s.flags|=256,Ln(i,s,c,p),s.child}var gm={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function ym(i){return{baseLanes:i,cachePool:Av()}}function bm(i,s,c){return i=i!==null?i.childLanes&~c:0,s&&(i|=xr),i}function $0(i,s,c){var p=s.pendingProps,x=!1,w=(s.flags&128)!==0,j;if((j=w)||(j=i!==null&&i.memoizedState===null?!1:(on.current&2)!==0),j&&(x=!0,s.flags&=-129),j=(s.flags&32)!==0,s.flags&=-33,i===null){if(dt){if(x?za(s):Pa(),(i=Ut)?(i=Qw(i,Ir),i=i!==null&&i.data!=="&"?i:null,i!==null&&(s.memoizedState={dehydrated:i,treeContext:Ta!==null?{id:bi,overflow:xi}:null,retryLane:536870912,hydrationErrors:null},c=vv(i),c.return=s,s.child=c,On=s,Ut=null)):i=null,i===null)throw Da(s);return eg(i)?s.lanes=32:s.lanes=536870912,null}var P=p.children;return p=p.fallback,x?(Pa(),x=s.mode,P=Pd({mode:"hidden",children:P},x),p=Ts(p,x,c,null),P.return=s,p.return=s,P.sibling=p,s.child=P,p=s.child,p.memoizedState=ym(c),p.childLanes=bm(i,j,c),s.memoizedState=gm,jc(null,p)):(za(s),xm(s,P))}var X=i.memoizedState;if(X!==null&&(P=X.dehydrated,P!==null)){if(w)s.flags&256?(za(s),s.flags&=-257,s=vm(i,s,c)):s.memoizedState!==null?(Pa(),s.child=i.child,s.flags|=128,s=null):(Pa(),P=p.fallback,x=s.mode,p=Pd({mode:"visible",children:p.children},x),P=Ts(P,x,c,null),P.flags|=2,p.return=s,P.return=s,p.sibling=P,s.child=p,zs(s,i.child,null,c),p=s.child,p.memoizedState=ym(c),p.childLanes=bm(i,j,c),s.memoizedState=gm,s=jc(null,p));else if(za(s),eg(P)){if(j=P.nextSibling&&P.nextSibling.dataset,j)var ie=j.dgst;j=ie,p=Error(r(419)),p.stack="",p.digest=j,gc({value:p,source:null,stack:null}),s=vm(i,s,c)}else if(hn||Oo(i,s,c,!1),j=(c&i.childLanes)!==0,hn||j){if(j=Ot,j!==null&&(p=Yt(j,c),p!==0&&p!==X.retryLane))throw X.retryLane=p,As(i,p),ar(j,i,p),pm;Jm(P)||Vd(),s=vm(i,s,c)}else Jm(P)?(s.flags|=192,s.child=i.child,s=null):(i=X.treeContext,Ut=Pr(P.nextSibling),On=s,dt=!0,Ma=null,Ir=!1,i!==null&&Ev(s,i),s=xm(s,p.children),s.flags|=4096);return s}return x?(Pa(),P=p.fallback,x=s.mode,X=i.child,ie=X.sibling,p=Ui(X,{mode:"hidden",children:p.children}),p.subtreeFlags=X.subtreeFlags&65011712,ie!==null?P=Ui(ie,P):(P=Ts(P,x,c,null),P.flags|=2),P.return=s,p.return=s,p.sibling=P,s.child=p,jc(null,p),p=s.child,P=i.child.memoizedState,P===null?P=ym(c):(x=P.cachePool,x!==null?(X=dn._currentValue,x=x.parent!==X?{parent:X,pool:X}:x):x=Av(),P={baseLanes:P.baseLanes|c,cachePool:x}),p.memoizedState=P,p.childLanes=bm(i,j,c),s.memoizedState=gm,jc(i.child,p)):(za(s),c=i.child,i=c.sibling,c=Ui(c,{mode:"visible",children:p.children}),c.return=s,c.sibling=null,i!==null&&(j=s.deletions,j===null?(s.deletions=[i],s.flags|=16):j.push(i)),s.child=c,s.memoizedState=null,c)}function xm(i,s){return s=Pd({mode:"visible",children:s},i.mode),s.return=i,i.child=s}function Pd(i,s){return i=mr(22,i,null,s),i.lanes=0,i}function vm(i,s,c){return zs(s,i.child,null,c),i=xm(s,s.pendingProps.children),i.flags|=2,s.memoizedState=null,i}function F0(i,s,c){i.lanes|=s;var p=i.alternate;p!==null&&(p.lanes|=s),Lp(i.return,s,c)}function wm(i,s,c,p,x,w){var j=i.memoizedState;j===null?i.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:p,tail:c,tailMode:x,treeForkCount:w}:(j.isBackwards=s,j.rendering=null,j.renderingStartTime=0,j.last=p,j.tail=c,j.tailMode=x,j.treeForkCount=w)}function q0(i,s,c){var p=s.pendingProps,x=p.revealOrder,w=p.tail;p=p.children;var j=on.current,P=(j&2)!==0;if(P?(j=j&1|2,s.flags|=128):j&=1,R(on,j),Ln(i,s,p,c),p=dt?mc:0,!P&&i!==null&&(i.flags&128)!==0)e:for(i=s.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&F0(i,c,s);else if(i.tag===19)F0(i,c,s);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===s)break e;for(;i.sibling===null;){if(i.return===null||i.return===s)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}switch(x){case"forwards":for(c=s.child,x=null;c!==null;)i=c.alternate,i!==null&&_d(i)===null&&(x=c),c=c.sibling;c=x,c===null?(x=s.child,s.child=null):(x=c.sibling,c.sibling=null),wm(s,!1,x,c,w,p);break;case"backwards":case"unstable_legacy-backwards":for(c=null,x=s.child,s.child=null;x!==null;){if(i=x.alternate,i!==null&&_d(i)===null){s.child=x;break}i=x.sibling,x.sibling=c,c=x,x=i}wm(s,!0,c,null,w,p);break;case"together":wm(s,!1,null,null,void 0,p);break;default:s.memoizedState=null}return s.child}function Gi(i,s,c){if(i!==null&&(s.dependencies=i.dependencies),$a|=s.lanes,(c&s.childLanes)===0)if(i!==null){if(Oo(i,s,c,!1),(c&s.childLanes)===0)return null}else return null;if(i!==null&&s.child!==i.child)throw Error(r(153));if(s.child!==null){for(i=s.child,c=Ui(i,i.pendingProps),s.child=c,c.return=s;i.sibling!==null;)i=i.sibling,c=c.sibling=Ui(i,i.pendingProps),c.return=s;c.sibling=null}return s.child}function km(i,s){return(i.lanes&s)!==0?!0:(i=i.dependencies,!!(i!==null&&bd(i)))}function xT(i,s,c){switch(s.tag){case 3:q(s,s.stateNode.containerInfo),Oa(s,dn,i.memoizedState.cache),Ms();break;case 27:case 5:ue(s);break;case 4:q(s,s.stateNode.containerInfo);break;case 10:Oa(s,s.type,s.memoizedProps.value);break;case 31:if(s.memoizedState!==null)return s.flags|=128,Vp(s),null;break;case 13:var p=s.memoizedState;if(p!==null)return p.dehydrated!==null?(za(s),s.flags|=128,null):(c&s.child.childLanes)!==0?$0(i,s,c):(za(s),i=Gi(i,s,c),i!==null?i.sibling:null);za(s);break;case 19:var x=(i.flags&128)!==0;if(p=(c&s.childLanes)!==0,p||(Oo(i,s,c,!1),p=(c&s.childLanes)!==0),x){if(p)return q0(i,s,c);s.flags|=128}if(x=s.memoizedState,x!==null&&(x.rendering=null,x.tail=null,x.lastEffect=null),R(on,on.current),p)break;return null;case 22:return s.lanes=0,L0(i,s,c,s.pendingProps);case 24:Oa(s,dn,i.memoizedState.cache)}return Gi(i,s,c)}function H0(i,s,c){if(i!==null)if(i.memoizedProps!==s.pendingProps)hn=!0;else{if(!km(i,c)&&(s.flags&128)===0)return hn=!1,xT(i,s,c);hn=(i.flags&131072)!==0}else hn=!1,dt&&(s.flags&1048576)!==0&&kv(s,mc,s.index);switch(s.lanes=0,s.tag){case 16:e:{var p=s.pendingProps;if(i=Ls(s.elementType),s.type=i,typeof i=="function")Cp(i)?(p=Bs(i,p),s.tag=1,s=B0(null,s,i,p,c)):(s.tag=0,s=mm(null,s,i,p,c));else{if(i!=null){var x=i.$$typeof;if(x===_){s.tag=11,s=D0(null,s,i,p,c);break e}else if(x===M){s.tag=14,s=O0(null,s,i,p,c);break e}}throw s=B(i)||i,Error(r(306,s,""))}}return s;case 0:return mm(i,s,s.type,s.pendingProps,c);case 1:return p=s.type,x=Bs(p,s.pendingProps),B0(i,s,p,x,c);case 3:e:{if(q(s,s.stateNode.containerInfo),i===null)throw Error(r(387));p=s.pendingProps;var w=s.memoizedState;x=w.element,Fp(i,s),Ec(s,p,null,c);var j=s.memoizedState;if(p=j.cache,Oa(s,dn,p),p!==w.cache&&Ip(s,[dn],c,!0),kc(),p=j.element,w.isDehydrated)if(w={element:p,isDehydrated:!1,cache:j.cache},s.updateQueue.baseState=w,s.memoizedState=w,s.flags&256){s=U0(i,s,p,c);break e}else if(p!==x){x=Or(Error(r(424)),s),gc(x),s=U0(i,s,p,c);break e}else{switch(i=s.stateNode.containerInfo,i.nodeType){case 9:i=i.body;break;default:i=i.nodeName==="HTML"?i.ownerDocument.body:i}for(Ut=Pr(i.firstChild),On=s,dt=!0,Ma=null,Ir=!0,c=Lv(s,null,p,c),s.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling}else{if(Ms(),p===x){s=Gi(i,s,c);break e}Ln(i,s,p,c)}s=s.child}return s;case 26:return zd(i,s),i===null?(c=t1(s.type,null,s.pendingProps,null))?s.memoizedState=c:dt||(c=s.type,i=s.pendingProps,p=ef(ye.current).createElement(c),p[Qt]=s,p[Sn]=i,In(p,c,i),en(p),s.stateNode=p):s.memoizedState=t1(s.type,i.memoizedProps,s.pendingProps,i.memoizedState),null;case 27:return ue(s),i===null&&dt&&(p=s.stateNode=Zw(s.type,s.pendingProps,ye.current),On=s,Ir=!0,x=Ut,Ga(s.type)?(tg=x,Ut=Pr(p.firstChild)):Ut=x),Ln(i,s,s.pendingProps.children,c),zd(i,s),i===null&&(s.flags|=4194304),s.child;case 5:return i===null&&dt&&((x=p=Ut)&&(p=QT(p,s.type,s.pendingProps,Ir),p!==null?(s.stateNode=p,On=s,Ut=Pr(p.firstChild),Ir=!1,x=!0):x=!1),x||Da(s)),ue(s),x=s.type,w=s.pendingProps,j=i!==null?i.memoizedProps:null,p=w.children,Wm(x,w)?p=null:j!==null&&Wm(x,j)&&(s.flags|=32),s.memoizedState!==null&&(x=Qp(i,s,uT,null,null,c),qc._currentValue=x),zd(i,s),Ln(i,s,p,c),s.child;case 6:return i===null&&dt&&((i=c=Ut)&&(c=WT(c,s.pendingProps,Ir),c!==null?(s.stateNode=c,On=s,Ut=null,i=!0):i=!1),i||Da(s)),null;case 13:return $0(i,s,c);case 4:return q(s,s.stateNode.containerInfo),p=s.pendingProps,i===null?s.child=zs(s,null,p,c):Ln(i,s,p,c),s.child;case 11:return D0(i,s,s.type,s.pendingProps,c);case 7:return Ln(i,s,s.pendingProps,c),s.child;case 8:return Ln(i,s,s.pendingProps.children,c),s.child;case 12:return Ln(i,s,s.pendingProps.children,c),s.child;case 10:return p=s.pendingProps,Oa(s,s.type,p.value),Ln(i,s,p.children,c),s.child;case 9:return x=s.type._context,p=s.pendingProps.children,Os(s),x=Rn(x),p=p(x),s.flags|=1,Ln(i,s,p,c),s.child;case 14:return O0(i,s,s.type,s.pendingProps,c);case 15:return R0(i,s,s.type,s.pendingProps,c);case 19:return q0(i,s,c);case 31:return bT(i,s,c);case 22:return L0(i,s,c,s.pendingProps);case 24:return Os(s),p=Rn(dn),i===null?(x=Bp(),x===null&&(x=Ot,w=zp(),x.pooledCache=w,w.refCount++,w!==null&&(x.pooledCacheLanes|=c),x=w),s.memoizedState={parent:p,cache:x},$p(s),Oa(s,dn,x)):((i.lanes&c)!==0&&(Fp(i,s),Ec(s,null,null,c),kc()),x=i.memoizedState,w=s.memoizedState,x.parent!==p?(x={parent:p,cache:p},s.memoizedState=x,s.lanes===0&&(s.memoizedState=s.updateQueue.baseState=x),Oa(s,dn,p)):(p=w.cache,Oa(s,dn,p),p!==x.cache&&Ip(s,[dn],c,!0))),Ln(i,s,s.pendingProps.children,c),s.child;case 29:throw s.pendingProps}throw Error(r(156,s.tag))}function Vi(i){i.flags|=4}function Em(i,s,c,p,x){if((s=(i.mode&32)!==0)&&(s=!1),s){if(i.flags|=16777216,(x&335544128)===x)if(i.stateNode.complete)i.flags|=8192;else if(yw())i.flags|=8192;else throw Is=kd,Up}else i.flags&=-16777217}function K0(i,s){if(s.type!=="stylesheet"||(s.state.loading&4)!==0)i.flags&=-16777217;else if(i.flags|=16777216,!s1(s))if(yw())i.flags|=8192;else throw Is=kd,Up}function Bd(i,s){s!==null&&(i.flags|=4),i.flags&16384&&(s=i.tag!==22?Ke():536870912,i.lanes|=s,Ko|=s)}function Ac(i,s){if(!dt)switch(i.tailMode){case"hidden":s=i.tail;for(var c=null;s!==null;)s.alternate!==null&&(c=s),s=s.sibling;c===null?i.tail=null:c.sibling=null;break;case"collapsed":c=i.tail;for(var p=null;c!==null;)c.alternate!==null&&(p=c),c=c.sibling;p===null?s||i.tail===null?i.tail=null:i.tail.sibling=null:p.sibling=null}}function $t(i){var s=i.alternate!==null&&i.alternate.child===i.child,c=0,p=0;if(s)for(var x=i.child;x!==null;)c|=x.lanes|x.childLanes,p|=x.subtreeFlags&65011712,p|=x.flags&65011712,x.return=i,x=x.sibling;else for(x=i.child;x!==null;)c|=x.lanes|x.childLanes,p|=x.subtreeFlags,p|=x.flags,x.return=i,x=x.sibling;return i.subtreeFlags|=p,i.childLanes=c,s}function vT(i,s,c){var p=s.pendingProps;switch(Mp(s),s.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return $t(s),null;case 1:return $t(s),null;case 3:return c=s.stateNode,p=null,i!==null&&(p=i.memoizedState.cache),s.memoizedState.cache!==p&&(s.flags|=2048),qi(dn),ne(),c.pendingContext&&(c.context=c.pendingContext,c.pendingContext=null),(i===null||i.child===null)&&(Do(s)?Vi(s):i===null||i.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,Op())),$t(s),null;case 26:var x=s.type,w=s.memoizedState;return i===null?(Vi(s),w!==null?($t(s),K0(s,w)):($t(s),Em(s,x,null,p,c))):w?w!==i.memoizedState?(Vi(s),$t(s),K0(s,w)):($t(s),s.flags&=-16777217):(i=i.memoizedProps,i!==p&&Vi(s),$t(s),Em(s,x,i,p,c)),null;case 27:if(ce(s),c=ye.current,x=s.type,i!==null&&s.stateNode!=null)i.memoizedProps!==p&&Vi(s);else{if(!p){if(s.stateNode===null)throw Error(r(166));return $t(s),null}i=se.current,Do(s)?Sv(s):(i=Zw(x,p,c),s.stateNode=i,Vi(s))}return $t(s),null;case 5:if(ce(s),x=s.type,i!==null&&s.stateNode!=null)i.memoizedProps!==p&&Vi(s);else{if(!p){if(s.stateNode===null)throw Error(r(166));return $t(s),null}if(w=se.current,Do(s))Sv(s);else{var j=ef(ye.current);switch(w){case 1:w=j.createElementNS("http://www.w3.org/2000/svg",x);break;case 2:w=j.createElementNS("http://www.w3.org/1998/Math/MathML",x);break;default:switch(x){case"svg":w=j.createElementNS("http://www.w3.org/2000/svg",x);break;case"math":w=j.createElementNS("http://www.w3.org/1998/Math/MathML",x);break;case"script":w=j.createElement("div"),w.innerHTML="<script><\/script>",w=w.removeChild(w.firstChild);break;case"select":w=typeof p.is=="string"?j.createElement("select",{is:p.is}):j.createElement("select"),p.multiple?w.multiple=!0:p.size&&(w.size=p.size);break;default:w=typeof p.is=="string"?j.createElement(x,{is:p.is}):j.createElement(x)}}w[Qt]=s,w[Sn]=p;e:for(j=s.child;j!==null;){if(j.tag===5||j.tag===6)w.appendChild(j.stateNode);else if(j.tag!==4&&j.tag!==27&&j.child!==null){j.child.return=j,j=j.child;continue}if(j===s)break e;for(;j.sibling===null;){if(j.return===null||j.return===s)break e;j=j.return}j.sibling.return=j.return,j=j.sibling}s.stateNode=w;e:switch(In(w,x,p),x){case"button":case"input":case"select":case"textarea":p=!!p.autoFocus;break e;case"img":p=!0;break e;default:p=!1}p&&Vi(s)}}return $t(s),Em(s,s.type,i===null?null:i.memoizedProps,s.pendingProps,c),null;case 6:if(i&&s.stateNode!=null)i.memoizedProps!==p&&Vi(s);else{if(typeof p!="string"&&s.stateNode===null)throw Error(r(166));if(i=ye.current,Do(s)){if(i=s.stateNode,c=s.memoizedProps,p=null,x=On,x!==null)switch(x.tag){case 27:case 5:p=x.memoizedProps}i[Qt]=s,i=!!(i.nodeValue===c||p!==null&&p.suppressHydrationWarning===!0||$w(i.nodeValue,c)),i||Da(s,!0)}else i=ef(i).createTextNode(p),i[Qt]=s,s.stateNode=i}return $t(s),null;case 31:if(c=s.memoizedState,i===null||i.memoizedState!==null){if(p=Do(s),c!==null){if(i===null){if(!p)throw Error(r(318));if(i=s.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(557));i[Qt]=s}else Ms(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;$t(s),i=!1}else c=Op(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=c),i=!0;if(!i)return s.flags&256?(yr(s),s):(yr(s),null);if((s.flags&128)!==0)throw Error(r(558))}return $t(s),null;case 13:if(p=s.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(x=Do(s),p!==null&&p.dehydrated!==null){if(i===null){if(!x)throw Error(r(318));if(x=s.memoizedState,x=x!==null?x.dehydrated:null,!x)throw Error(r(317));x[Qt]=s}else Ms(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;$t(s),x=!1}else x=Op(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=x),x=!0;if(!x)return s.flags&256?(yr(s),s):(yr(s),null)}return yr(s),(s.flags&128)!==0?(s.lanes=c,s):(c=p!==null,i=i!==null&&i.memoizedState!==null,c&&(p=s.child,x=null,p.alternate!==null&&p.alternate.memoizedState!==null&&p.alternate.memoizedState.cachePool!==null&&(x=p.alternate.memoizedState.cachePool.pool),w=null,p.memoizedState!==null&&p.memoizedState.cachePool!==null&&(w=p.memoizedState.cachePool.pool),w!==x&&(p.flags|=2048)),c!==i&&c&&(s.child.flags|=8192),Bd(s,s.updateQueue),$t(s),null);case 4:return ne(),i===null&&Km(s.stateNode.containerInfo),$t(s),null;case 10:return qi(s.type),$t(s),null;case 19:if(V(on),p=s.memoizedState,p===null)return $t(s),null;if(x=(s.flags&128)!==0,w=p.rendering,w===null)if(x)Ac(p,!1);else{if(nn!==0||i!==null&&(i.flags&128)!==0)for(i=s.child;i!==null;){if(w=_d(i),w!==null){for(s.flags|=128,Ac(p,!1),i=w.updateQueue,s.updateQueue=i,Bd(s,i),s.subtreeFlags=0,i=c,c=s.child;c!==null;)xv(c,i),c=c.sibling;return R(on,on.current&1|2),dt&&$i(s,p.treeForkCount),s.child}i=i.sibling}p.tail!==null&&xt()>Hd&&(s.flags|=128,x=!0,Ac(p,!1),s.lanes=4194304)}else{if(!x)if(i=_d(w),i!==null){if(s.flags|=128,x=!0,i=i.updateQueue,s.updateQueue=i,Bd(s,i),Ac(p,!0),p.tail===null&&p.tailMode==="hidden"&&!w.alternate&&!dt)return $t(s),null}else 2*xt()-p.renderingStartTime>Hd&&c!==536870912&&(s.flags|=128,x=!0,Ac(p,!1),s.lanes=4194304);p.isBackwards?(w.sibling=s.child,s.child=w):(i=p.last,i!==null?i.sibling=w:s.child=w,p.last=w)}return p.tail!==null?(i=p.tail,p.rendering=i,p.tail=i.sibling,p.renderingStartTime=xt(),i.sibling=null,c=on.current,R(on,x?c&1|2:c&1),dt&&$i(s,p.treeForkCount),i):($t(s),null);case 22:case 23:return yr(s),Gp(),p=s.memoizedState!==null,i!==null?i.memoizedState!==null!==p&&(s.flags|=8192):p&&(s.flags|=8192),p?(c&536870912)!==0&&(s.flags&128)===0&&($t(s),s.subtreeFlags&6&&(s.flags|=8192)):$t(s),c=s.updateQueue,c!==null&&Bd(s,c.retryQueue),c=null,i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(c=i.memoizedState.cachePool.pool),p=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(p=s.memoizedState.cachePool.pool),p!==c&&(s.flags|=2048),i!==null&&V(Rs),null;case 24:return c=null,i!==null&&(c=i.memoizedState.cache),s.memoizedState.cache!==c&&(s.flags|=2048),qi(dn),$t(s),null;case 25:return null;case 30:return null}throw Error(r(156,s.tag))}function wT(i,s){switch(Mp(s),s.tag){case 1:return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 3:return qi(dn),ne(),i=s.flags,(i&65536)!==0&&(i&128)===0?(s.flags=i&-65537|128,s):null;case 26:case 27:case 5:return ce(s),null;case 31:if(s.memoizedState!==null){if(yr(s),s.alternate===null)throw Error(r(340));Ms()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 13:if(yr(s),i=s.memoizedState,i!==null&&i.dehydrated!==null){if(s.alternate===null)throw Error(r(340));Ms()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 19:return V(on),null;case 4:return ne(),null;case 10:return qi(s.type),null;case 22:case 23:return yr(s),Gp(),i!==null&&V(Rs),i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 24:return qi(dn),null;case 25:return null;default:return null}}function G0(i,s){switch(Mp(s),s.tag){case 3:qi(dn),ne();break;case 26:case 27:case 5:ce(s);break;case 4:ne();break;case 31:s.memoizedState!==null&&yr(s);break;case 13:yr(s);break;case 19:V(on);break;case 10:qi(s.type);break;case 22:case 23:yr(s),Gp(),i!==null&&V(Rs);break;case 24:qi(dn)}}function Tc(i,s){try{var c=s.updateQueue,p=c!==null?c.lastEffect:null;if(p!==null){var x=p.next;c=x;do{if((c.tag&i)===i){p=void 0;var w=c.create,j=c.inst;p=w(),j.destroy=p}c=c.next}while(c!==x)}}catch(P){_t(s,s.return,P)}}function Ba(i,s,c){try{var p=s.updateQueue,x=p!==null?p.lastEffect:null;if(x!==null){var w=x.next;p=w;do{if((p.tag&i)===i){var j=p.inst,P=j.destroy;if(P!==void 0){j.destroy=void 0,x=s;var X=c,ie=P;try{ie()}catch(fe){_t(x,X,fe)}}}p=p.next}while(p!==w)}}catch(fe){_t(s,s.return,fe)}}function V0(i){var s=i.updateQueue;if(s!==null){var c=i.stateNode;try{zv(s,c)}catch(p){_t(i,i.return,p)}}}function Y0(i,s,c){c.props=Bs(i.type,i.memoizedProps),c.state=i.memoizedState;try{c.componentWillUnmount()}catch(p){_t(i,s,p)}}function Mc(i,s){try{var c=i.ref;if(c!==null){switch(i.tag){case 26:case 27:case 5:var p=i.stateNode;break;case 30:p=i.stateNode;break;default:p=i.stateNode}typeof c=="function"?i.refCleanup=c(p):c.current=p}}catch(x){_t(i,s,x)}}function vi(i,s){var c=i.ref,p=i.refCleanup;if(c!==null)if(typeof p=="function")try{p()}catch(x){_t(i,s,x)}finally{i.refCleanup=null,i=i.alternate,i!=null&&(i.refCleanup=null)}else if(typeof c=="function")try{c(null)}catch(x){_t(i,s,x)}else c.current=null}function Q0(i){var s=i.type,c=i.memoizedProps,p=i.stateNode;try{e:switch(s){case"button":case"input":case"select":case"textarea":c.autoFocus&&p.focus();break e;case"img":c.src?p.src=c.src:c.srcSet&&(p.srcset=c.srcSet)}}catch(x){_t(i,i.return,x)}}function Sm(i,s,c){try{var p=i.stateNode;qT(p,i.type,c,s),p[Sn]=s}catch(x){_t(i,i.return,x)}}function W0(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27&&Ga(i.type)||i.tag===4}function Nm(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||W0(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.tag===27&&Ga(i.type)||i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function _m(i,s,c){var p=i.tag;if(p===5||p===6)i=i.stateNode,s?(c.nodeType===9?c.body:c.nodeName==="HTML"?c.ownerDocument.body:c).insertBefore(i,s):(s=c.nodeType===9?c.body:c.nodeName==="HTML"?c.ownerDocument.body:c,s.appendChild(i),c=c._reactRootContainer,c!=null||s.onclick!==null||(s.onclick=Se));else if(p!==4&&(p===27&&Ga(i.type)&&(c=i.stateNode,s=null),i=i.child,i!==null))for(_m(i,s,c),i=i.sibling;i!==null;)_m(i,s,c),i=i.sibling}function Ud(i,s,c){var p=i.tag;if(p===5||p===6)i=i.stateNode,s?c.insertBefore(i,s):c.appendChild(i);else if(p!==4&&(p===27&&Ga(i.type)&&(c=i.stateNode),i=i.child,i!==null))for(Ud(i,s,c),i=i.sibling;i!==null;)Ud(i,s,c),i=i.sibling}function X0(i){var s=i.stateNode,c=i.memoizedProps;try{for(var p=i.type,x=s.attributes;x.length;)s.removeAttributeNode(x[0]);In(s,p,c),s[Qt]=i,s[Sn]=c}catch(w){_t(i,i.return,w)}}var Yi=!1,pn=!1,Cm=!1,Z0=typeof WeakSet=="function"?WeakSet:Set,_n=null;function kT(i,s){if(i=i.containerInfo,Ym=lf,i=uv(i),vp(i)){if("selectionStart"in i)var c={start:i.selectionStart,end:i.selectionEnd};else e:{c=(c=i.ownerDocument)&&c.defaultView||window;var p=c.getSelection&&c.getSelection();if(p&&p.rangeCount!==0){c=p.anchorNode;var x=p.anchorOffset,w=p.focusNode;p=p.focusOffset;try{c.nodeType,w.nodeType}catch{c=null;break e}var j=0,P=-1,X=-1,ie=0,fe=0,me=i,ae=null;t:for(;;){for(var oe;me!==c||x!==0&&me.nodeType!==3||(P=j+x),me!==w||p!==0&&me.nodeType!==3||(X=j+p),me.nodeType===3&&(j+=me.nodeValue.length),(oe=me.firstChild)!==null;)ae=me,me=oe;for(;;){if(me===i)break t;if(ae===c&&++ie===x&&(P=j),ae===w&&++fe===p&&(X=j),(oe=me.nextSibling)!==null)break;me=ae,ae=me.parentNode}me=oe}c=P===-1||X===-1?null:{start:P,end:X}}else c=null}c=c||{start:0,end:0}}else c=null;for(Qm={focusedElem:i,selectionRange:c},lf=!1,_n=s;_n!==null;)if(s=_n,i=s.child,(s.subtreeFlags&1028)!==0&&i!==null)i.return=s,_n=i;else for(;_n!==null;){switch(s=_n,w=s.alternate,i=s.flags,s.tag){case 0:if((i&4)!==0&&(i=s.updateQueue,i=i!==null?i.events:null,i!==null))for(c=0;c<i.length;c++)x=i[c],x.ref.impl=x.nextImpl;break;case 11:case 15:break;case 1:if((i&1024)!==0&&w!==null){i=void 0,c=s,x=w.memoizedProps,w=w.memoizedState,p=c.stateNode;try{var Te=Bs(c.type,x);i=p.getSnapshotBeforeUpdate(Te,w),p.__reactInternalSnapshotBeforeUpdate=i}catch(qe){_t(c,c.return,qe)}}break;case 3:if((i&1024)!==0){if(i=s.stateNode.containerInfo,c=i.nodeType,c===9)Zm(i);else if(c===1)switch(i.nodeName){case"HEAD":case"HTML":case"BODY":Zm(i);break;default:i.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((i&1024)!==0)throw Error(r(163))}if(i=s.sibling,i!==null){i.return=s.return,_n=i;break}_n=s.return}}function J0(i,s,c){var p=c.flags;switch(c.tag){case 0:case 11:case 15:Wi(i,c),p&4&&Tc(5,c);break;case 1:if(Wi(i,c),p&4)if(i=c.stateNode,s===null)try{i.componentDidMount()}catch(j){_t(c,c.return,j)}else{var x=Bs(c.type,s.memoizedProps);s=s.memoizedState;try{i.componentDidUpdate(x,s,i.__reactInternalSnapshotBeforeUpdate)}catch(j){_t(c,c.return,j)}}p&64&&V0(c),p&512&&Mc(c,c.return);break;case 3:if(Wi(i,c),p&64&&(i=c.updateQueue,i!==null)){if(s=null,c.child!==null)switch(c.child.tag){case 27:case 5:s=c.child.stateNode;break;case 1:s=c.child.stateNode}try{zv(i,s)}catch(j){_t(c,c.return,j)}}break;case 27:s===null&&p&4&&X0(c);case 26:case 5:Wi(i,c),s===null&&p&4&&Q0(c),p&512&&Mc(c,c.return);break;case 12:Wi(i,c);break;case 31:Wi(i,c),p&4&&nw(i,c);break;case 13:Wi(i,c),p&4&&rw(i,c),p&64&&(i=c.memoizedState,i!==null&&(i=i.dehydrated,i!==null&&(c=MT.bind(null,c),XT(i,c))));break;case 22:if(p=c.memoizedState!==null||Yi,!p){s=s!==null&&s.memoizedState!==null||pn,x=Yi;var w=pn;Yi=p,(pn=s)&&!w?Xi(i,c,(c.subtreeFlags&8772)!==0):Wi(i,c),Yi=x,pn=w}break;case 30:break;default:Wi(i,c)}}function ew(i){var s=i.alternate;s!==null&&(i.alternate=null,ew(s)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(s=i.stateNode,s!==null&&Es(s)),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}var qt=null,tr=!1;function Qi(i,s,c){for(c=c.child;c!==null;)tw(i,s,c),c=c.sibling}function tw(i,s,c){if(Ft&&typeof Ft.onCommitFiberUnmount=="function")try{Ft.onCommitFiberUnmount(bn,c)}catch{}switch(c.tag){case 26:pn||vi(c,s),Qi(i,s,c),c.memoizedState?c.memoizedState.count--:c.stateNode&&(c=c.stateNode,c.parentNode.removeChild(c));break;case 27:pn||vi(c,s);var p=qt,x=tr;Ga(c.type)&&(qt=c.stateNode,tr=!1),Qi(i,s,c),Uc(c.stateNode),qt=p,tr=x;break;case 5:pn||vi(c,s);case 6:if(p=qt,x=tr,qt=null,Qi(i,s,c),qt=p,tr=x,qt!==null)if(tr)try{(qt.nodeType===9?qt.body:qt.nodeName==="HTML"?qt.ownerDocument.body:qt).removeChild(c.stateNode)}catch(w){_t(c,s,w)}else try{qt.removeChild(c.stateNode)}catch(w){_t(c,s,w)}break;case 18:qt!==null&&(tr?(i=qt,Vw(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,c.stateNode),Jo(i)):Vw(qt,c.stateNode));break;case 4:p=qt,x=tr,qt=c.stateNode.containerInfo,tr=!0,Qi(i,s,c),qt=p,tr=x;break;case 0:case 11:case 14:case 15:Ba(2,c,s),pn||Ba(4,c,s),Qi(i,s,c);break;case 1:pn||(vi(c,s),p=c.stateNode,typeof p.componentWillUnmount=="function"&&Y0(c,s,p)),Qi(i,s,c);break;case 21:Qi(i,s,c);break;case 22:pn=(p=pn)||c.memoizedState!==null,Qi(i,s,c),pn=p;break;default:Qi(i,s,c)}}function nw(i,s){if(s.memoizedState===null&&(i=s.alternate,i!==null&&(i=i.memoizedState,i!==null))){i=i.dehydrated;try{Jo(i)}catch(c){_t(s,s.return,c)}}}function rw(i,s){if(s.memoizedState===null&&(i=s.alternate,i!==null&&(i=i.memoizedState,i!==null&&(i=i.dehydrated,i!==null))))try{Jo(i)}catch(c){_t(s,s.return,c)}}function ET(i){switch(i.tag){case 31:case 13:case 19:var s=i.stateNode;return s===null&&(s=i.stateNode=new Z0),s;case 22:return i=i.stateNode,s=i._retryCache,s===null&&(s=i._retryCache=new Z0),s;default:throw Error(r(435,i.tag))}}function $d(i,s){var c=ET(i);s.forEach(function(p){if(!c.has(p)){c.add(p);var x=DT.bind(null,i,p);p.then(x,x)}})}function nr(i,s){var c=s.deletions;if(c!==null)for(var p=0;p<c.length;p++){var x=c[p],w=i,j=s,P=j;e:for(;P!==null;){switch(P.tag){case 27:if(Ga(P.type)){qt=P.stateNode,tr=!1;break e}break;case 5:qt=P.stateNode,tr=!1;break e;case 3:case 4:qt=P.stateNode.containerInfo,tr=!0;break e}P=P.return}if(qt===null)throw Error(r(160));tw(w,j,x),qt=null,tr=!1,w=x.alternate,w!==null&&(w.return=null),x.return=null}if(s.subtreeFlags&13886)for(s=s.child;s!==null;)iw(s,i),s=s.sibling}var ni=null;function iw(i,s){var c=i.alternate,p=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:nr(s,i),rr(i),p&4&&(Ba(3,i,i.return),Tc(3,i),Ba(5,i,i.return));break;case 1:nr(s,i),rr(i),p&512&&(pn||c===null||vi(c,c.return)),p&64&&Yi&&(i=i.updateQueue,i!==null&&(p=i.callbacks,p!==null&&(c=i.shared.hiddenCallbacks,i.shared.hiddenCallbacks=c===null?p:c.concat(p))));break;case 26:var x=ni;if(nr(s,i),rr(i),p&512&&(pn||c===null||vi(c,c.return)),p&4){var w=c!==null?c.memoizedState:null;if(p=i.memoizedState,c===null)if(p===null)if(i.stateNode===null){e:{p=i.type,c=i.memoizedProps,x=x.ownerDocument||x;t:switch(p){case"title":w=x.getElementsByTagName("title")[0],(!w||w[Ii]||w[Qt]||w.namespaceURI==="http://www.w3.org/2000/svg"||w.hasAttribute("itemprop"))&&(w=x.createElement(p),x.head.insertBefore(w,x.querySelector("head > title"))),In(w,p,c),w[Qt]=i,en(w),p=w;break e;case"link":var j=i1("link","href",x).get(p+(c.href||""));if(j){for(var P=0;P<j.length;P++)if(w=j[P],w.getAttribute("href")===(c.href==null||c.href===""?null:c.href)&&w.getAttribute("rel")===(c.rel==null?null:c.rel)&&w.getAttribute("title")===(c.title==null?null:c.title)&&w.getAttribute("crossorigin")===(c.crossOrigin==null?null:c.crossOrigin)){j.splice(P,1);break t}}w=x.createElement(p),In(w,p,c),x.head.appendChild(w);break;case"meta":if(j=i1("meta","content",x).get(p+(c.content||""))){for(P=0;P<j.length;P++)if(w=j[P],w.getAttribute("content")===(c.content==null?null:""+c.content)&&w.getAttribute("name")===(c.name==null?null:c.name)&&w.getAttribute("property")===(c.property==null?null:c.property)&&w.getAttribute("http-equiv")===(c.httpEquiv==null?null:c.httpEquiv)&&w.getAttribute("charset")===(c.charSet==null?null:c.charSet)){j.splice(P,1);break t}}w=x.createElement(p),In(w,p,c),x.head.appendChild(w);break;default:throw Error(r(468,p))}w[Qt]=i,en(w),p=w}i.stateNode=p}else a1(x,i.type,i.stateNode);else i.stateNode=r1(x,p,i.memoizedProps);else w!==p?(w===null?c.stateNode!==null&&(c=c.stateNode,c.parentNode.removeChild(c)):w.count--,p===null?a1(x,i.type,i.stateNode):r1(x,p,i.memoizedProps)):p===null&&i.stateNode!==null&&Sm(i,i.memoizedProps,c.memoizedProps)}break;case 27:nr(s,i),rr(i),p&512&&(pn||c===null||vi(c,c.return)),c!==null&&p&4&&Sm(i,i.memoizedProps,c.memoizedProps);break;case 5:if(nr(s,i),rr(i),p&512&&(pn||c===null||vi(c,c.return)),i.flags&32){x=i.stateNode;try{He(x,"")}catch(Te){_t(i,i.return,Te)}}p&4&&i.stateNode!=null&&(x=i.memoizedProps,Sm(i,x,c!==null?c.memoizedProps:x)),p&1024&&(Cm=!0);break;case 6:if(nr(s,i),rr(i),p&4){if(i.stateNode===null)throw Error(r(162));p=i.memoizedProps,c=i.stateNode;try{c.nodeValue=p}catch(Te){_t(i,i.return,Te)}}break;case 3:if(rf=null,x=ni,ni=tf(s.containerInfo),nr(s,i),ni=x,rr(i),p&4&&c!==null&&c.memoizedState.isDehydrated)try{Jo(s.containerInfo)}catch(Te){_t(i,i.return,Te)}Cm&&(Cm=!1,aw(i));break;case 4:p=ni,ni=tf(i.stateNode.containerInfo),nr(s,i),rr(i),ni=p;break;case 12:nr(s,i),rr(i);break;case 31:nr(s,i),rr(i),p&4&&(p=i.updateQueue,p!==null&&(i.updateQueue=null,$d(i,p)));break;case 13:nr(s,i),rr(i),i.child.flags&8192&&i.memoizedState!==null!=(c!==null&&c.memoizedState!==null)&&(qd=xt()),p&4&&(p=i.updateQueue,p!==null&&(i.updateQueue=null,$d(i,p)));break;case 22:x=i.memoizedState!==null;var X=c!==null&&c.memoizedState!==null,ie=Yi,fe=pn;if(Yi=ie||x,pn=fe||X,nr(s,i),pn=fe,Yi=ie,rr(i),p&8192)e:for(s=i.stateNode,s._visibility=x?s._visibility&-2:s._visibility|1,x&&(c===null||X||Yi||pn||Us(i)),c=null,s=i;;){if(s.tag===5||s.tag===26){if(c===null){X=c=s;try{if(w=X.stateNode,x)j=w.style,typeof j.setProperty=="function"?j.setProperty("display","none","important"):j.display="none";else{P=X.stateNode;var me=X.memoizedProps.style,ae=me!=null&&me.hasOwnProperty("display")?me.display:null;P.style.display=ae==null||typeof ae=="boolean"?"":(""+ae).trim()}}catch(Te){_t(X,X.return,Te)}}}else if(s.tag===6){if(c===null){X=s;try{X.stateNode.nodeValue=x?"":X.memoizedProps}catch(Te){_t(X,X.return,Te)}}}else if(s.tag===18){if(c===null){X=s;try{var oe=X.stateNode;x?Yw(oe,!0):Yw(X.stateNode,!1)}catch(Te){_t(X,X.return,Te)}}}else if((s.tag!==22&&s.tag!==23||s.memoizedState===null||s===i)&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===i)break e;for(;s.sibling===null;){if(s.return===null||s.return===i)break e;c===s&&(c=null),s=s.return}c===s&&(c=null),s.sibling.return=s.return,s=s.sibling}p&4&&(p=i.updateQueue,p!==null&&(c=p.retryQueue,c!==null&&(p.retryQueue=null,$d(i,c))));break;case 19:nr(s,i),rr(i),p&4&&(p=i.updateQueue,p!==null&&(i.updateQueue=null,$d(i,p)));break;case 30:break;case 21:break;default:nr(s,i),rr(i)}}function rr(i){var s=i.flags;if(s&2){try{for(var c,p=i.return;p!==null;){if(W0(p)){c=p;break}p=p.return}if(c==null)throw Error(r(160));switch(c.tag){case 27:var x=c.stateNode,w=Nm(i);Ud(i,w,x);break;case 5:var j=c.stateNode;c.flags&32&&(He(j,""),c.flags&=-33);var P=Nm(i);Ud(i,P,j);break;case 3:case 4:var X=c.stateNode.containerInfo,ie=Nm(i);_m(i,ie,X);break;default:throw Error(r(161))}}catch(fe){_t(i,i.return,fe)}i.flags&=-3}s&4096&&(i.flags&=-4097)}function aw(i){if(i.subtreeFlags&1024)for(i=i.child;i!==null;){var s=i;aw(s),s.tag===5&&s.flags&1024&&s.stateNode.reset(),i=i.sibling}}function Wi(i,s){if(s.subtreeFlags&8772)for(s=s.child;s!==null;)J0(i,s.alternate,s),s=s.sibling}function Us(i){for(i=i.child;i!==null;){var s=i;switch(s.tag){case 0:case 11:case 14:case 15:Ba(4,s,s.return),Us(s);break;case 1:vi(s,s.return);var c=s.stateNode;typeof c.componentWillUnmount=="function"&&Y0(s,s.return,c),Us(s);break;case 27:Uc(s.stateNode);case 26:case 5:vi(s,s.return),Us(s);break;case 22:s.memoizedState===null&&Us(s);break;case 30:Us(s);break;default:Us(s)}i=i.sibling}}function Xi(i,s,c){for(c=c&&(s.subtreeFlags&8772)!==0,s=s.child;s!==null;){var p=s.alternate,x=i,w=s,j=w.flags;switch(w.tag){case 0:case 11:case 15:Xi(x,w,c),Tc(4,w);break;case 1:if(Xi(x,w,c),p=w,x=p.stateNode,typeof x.componentDidMount=="function")try{x.componentDidMount()}catch(ie){_t(p,p.return,ie)}if(p=w,x=p.updateQueue,x!==null){var P=p.stateNode;try{var X=x.shared.hiddenCallbacks;if(X!==null)for(x.shared.hiddenCallbacks=null,x=0;x<X.length;x++)Iv(X[x],P)}catch(ie){_t(p,p.return,ie)}}c&&j&64&&V0(w),Mc(w,w.return);break;case 27:X0(w);case 26:case 5:Xi(x,w,c),c&&p===null&&j&4&&Q0(w),Mc(w,w.return);break;case 12:Xi(x,w,c);break;case 31:Xi(x,w,c),c&&j&4&&nw(x,w);break;case 13:Xi(x,w,c),c&&j&4&&rw(x,w);break;case 22:w.memoizedState===null&&Xi(x,w,c),Mc(w,w.return);break;case 30:break;default:Xi(x,w,c)}s=s.sibling}}function jm(i,s){var c=null;i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(c=i.memoizedState.cachePool.pool),i=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(i=s.memoizedState.cachePool.pool),i!==c&&(i!=null&&i.refCount++,c!=null&&yc(c))}function Am(i,s){i=null,s.alternate!==null&&(i=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==i&&(s.refCount++,i!=null&&yc(i))}function ri(i,s,c,p){if(s.subtreeFlags&10256)for(s=s.child;s!==null;)sw(i,s,c,p),s=s.sibling}function sw(i,s,c,p){var x=s.flags;switch(s.tag){case 0:case 11:case 15:ri(i,s,c,p),x&2048&&Tc(9,s);break;case 1:ri(i,s,c,p);break;case 3:ri(i,s,c,p),x&2048&&(i=null,s.alternate!==null&&(i=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==i&&(s.refCount++,i!=null&&yc(i)));break;case 12:if(x&2048){ri(i,s,c,p),i=s.stateNode;try{var w=s.memoizedProps,j=w.id,P=w.onPostCommit;typeof P=="function"&&P(j,s.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(X){_t(s,s.return,X)}}else ri(i,s,c,p);break;case 31:ri(i,s,c,p);break;case 13:ri(i,s,c,p);break;case 23:break;case 22:w=s.stateNode,j=s.alternate,s.memoizedState!==null?w._visibility&2?ri(i,s,c,p):Dc(i,s):w._visibility&2?ri(i,s,c,p):(w._visibility|=2,Fo(i,s,c,p,(s.subtreeFlags&10256)!==0||!1)),x&2048&&jm(j,s);break;case 24:ri(i,s,c,p),x&2048&&Am(s.alternate,s);break;default:ri(i,s,c,p)}}function Fo(i,s,c,p,x){for(x=x&&((s.subtreeFlags&10256)!==0||!1),s=s.child;s!==null;){var w=i,j=s,P=c,X=p,ie=j.flags;switch(j.tag){case 0:case 11:case 15:Fo(w,j,P,X,x),Tc(8,j);break;case 23:break;case 22:var fe=j.stateNode;j.memoizedState!==null?fe._visibility&2?Fo(w,j,P,X,x):Dc(w,j):(fe._visibility|=2,Fo(w,j,P,X,x)),x&&ie&2048&&jm(j.alternate,j);break;case 24:Fo(w,j,P,X,x),x&&ie&2048&&Am(j.alternate,j);break;default:Fo(w,j,P,X,x)}s=s.sibling}}function Dc(i,s){if(s.subtreeFlags&10256)for(s=s.child;s!==null;){var c=i,p=s,x=p.flags;switch(p.tag){case 22:Dc(c,p),x&2048&&jm(p.alternate,p);break;case 24:Dc(c,p),x&2048&&Am(p.alternate,p);break;default:Dc(c,p)}s=s.sibling}}var Oc=8192;function qo(i,s,c){if(i.subtreeFlags&Oc)for(i=i.child;i!==null;)ow(i,s,c),i=i.sibling}function ow(i,s,c){switch(i.tag){case 26:qo(i,s,c),i.flags&Oc&&i.memoizedState!==null&&cM(c,ni,i.memoizedState,i.memoizedProps);break;case 5:qo(i,s,c);break;case 3:case 4:var p=ni;ni=tf(i.stateNode.containerInfo),qo(i,s,c),ni=p;break;case 22:i.memoizedState===null&&(p=i.alternate,p!==null&&p.memoizedState!==null?(p=Oc,Oc=16777216,qo(i,s,c),Oc=p):qo(i,s,c));break;default:qo(i,s,c)}}function lw(i){var s=i.alternate;if(s!==null&&(i=s.child,i!==null)){s.child=null;do s=i.sibling,i.sibling=null,i=s;while(i!==null)}}function Rc(i){var s=i.deletions;if((i.flags&16)!==0){if(s!==null)for(var c=0;c<s.length;c++){var p=s[c];_n=p,uw(p,i)}lw(i)}if(i.subtreeFlags&10256)for(i=i.child;i!==null;)cw(i),i=i.sibling}function cw(i){switch(i.tag){case 0:case 11:case 15:Rc(i),i.flags&2048&&Ba(9,i,i.return);break;case 3:Rc(i);break;case 12:Rc(i);break;case 22:var s=i.stateNode;i.memoizedState!==null&&s._visibility&2&&(i.return===null||i.return.tag!==13)?(s._visibility&=-3,Fd(i)):Rc(i);break;default:Rc(i)}}function Fd(i){var s=i.deletions;if((i.flags&16)!==0){if(s!==null)for(var c=0;c<s.length;c++){var p=s[c];_n=p,uw(p,i)}lw(i)}for(i=i.child;i!==null;){switch(s=i,s.tag){case 0:case 11:case 15:Ba(8,s,s.return),Fd(s);break;case 22:c=s.stateNode,c._visibility&2&&(c._visibility&=-3,Fd(s));break;default:Fd(s)}i=i.sibling}}function uw(i,s){for(;_n!==null;){var c=_n;switch(c.tag){case 0:case 11:case 15:Ba(8,c,s);break;case 23:case 22:if(c.memoizedState!==null&&c.memoizedState.cachePool!==null){var p=c.memoizedState.cachePool.pool;p!=null&&p.refCount++}break;case 24:yc(c.memoizedState.cache)}if(p=c.child,p!==null)p.return=c,_n=p;else e:for(c=i;_n!==null;){p=_n;var x=p.sibling,w=p.return;if(ew(p),p===c){_n=null;break e}if(x!==null){x.return=w,_n=x;break e}_n=w}}}var ST={getCacheForType:function(i){var s=Rn(dn),c=s.data.get(i);return c===void 0&&(c=i(),s.data.set(i,c)),c},cacheSignal:function(){return Rn(dn).controller.signal}},NT=typeof WeakMap=="function"?WeakMap:Map,wt=0,Ot=null,rt=null,lt=0,Nt=0,br=null,Ua=!1,Ho=!1,Tm=!1,Zi=0,nn=0,$a=0,$s=0,Mm=0,xr=0,Ko=0,Lc=null,ir=null,Dm=!1,qd=0,dw=0,Hd=1/0,Kd=null,Fa=null,vn=0,qa=null,Go=null,Ji=0,Om=0,Rm=null,fw=null,Ic=0,Lm=null;function vr(){return(wt&2)!==0&<!==0?lt&-lt:z.T!==null?$m():va()}function hw(){if(xr===0)if((lt&536870912)===0||dt){var i=xa;xa<<=1,(xa&3932160)===0&&(xa=262144),xr=i}else xr=536870912;return i=gr.current,i!==null&&(i.flags|=32),xr}function ar(i,s,c){(i===Ot&&(Nt===2||Nt===9)||i.cancelPendingCommit!==null)&&(Vo(i,0),Ha(i,lt,xr,!1)),Et(i,c),((wt&2)===0||i!==Ot)&&(i===Ot&&((wt&2)===0&&($s|=c),nn===4&&Ha(i,lt,xr,!1)),wi(i))}function pw(i,s,c){if((wt&6)!==0)throw Error(r(327));var p=!c&&(s&127)===0&&(s&i.expiredLanes)===0||he(i,s),x=p?jT(i,s):zm(i,s,!0),w=p;do{if(x===0){Ho&&!p&&Ha(i,s,0,!1);break}else{if(c=i.current.alternate,w&&!_T(c)){x=zm(i,s,!1),w=!1;continue}if(x===2){if(w=s,i.errorRecoveryDisabledLanes&w)var j=0;else j=i.pendingLanes&-536870913,j=j!==0?j:j&536870912?536870912:0;if(j!==0){s=j;e:{var P=i;x=Lc;var X=P.current.memoizedState.isDehydrated;if(X&&(Vo(P,j).flags|=256),j=zm(P,j,!1),j!==2){if(Tm&&!X){P.errorRecoveryDisabledLanes|=w,$s|=w,x=4;break e}w=ir,ir=x,w!==null&&(ir===null?ir=w:ir.push.apply(ir,w))}x=j}if(w=!1,x!==2)continue}}if(x===1){Vo(i,0),Ha(i,s,0,!0);break}e:{switch(p=i,w=x,w){case 0:case 1:throw Error(r(345));case 4:if((s&4194048)!==s)break;case 6:Ha(p,s,xr,!Ua);break e;case 2:ir=null;break;case 3:case 5:break;default:throw Error(r(329))}if((s&62914560)===s&&(x=qd+300-xt(),10<x)){if(Ha(p,s,xr,!Ua),J(p,0,!0)!==0)break e;Ji=s,p.timeoutHandle=Kw(mw.bind(null,p,c,ir,Kd,Dm,s,xr,$s,Ko,Ua,w,"Throttled",-0,0),x);break e}mw(p,c,ir,Kd,Dm,s,xr,$s,Ko,Ua,w,null,-0,0)}}break}while(!0);wi(i)}function mw(i,s,c,p,x,w,j,P,X,ie,fe,me,ae,oe){if(i.timeoutHandle=-1,me=s.subtreeFlags,me&8192||(me&16785408)===16785408){me={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Se},ow(s,w,me);var Te=(w&62914560)===w?qd-xt():(w&4194048)===w?dw-xt():0;if(Te=uM(me,Te),Te!==null){Ji=w,i.cancelPendingCommit=Te(Ew.bind(null,i,s,w,c,p,x,j,P,X,fe,me,null,ae,oe)),Ha(i,w,j,!ie);return}}Ew(i,s,w,c,p,x,j,P,X)}function _T(i){for(var s=i;;){var c=s.tag;if((c===0||c===11||c===15)&&s.flags&16384&&(c=s.updateQueue,c!==null&&(c=c.stores,c!==null)))for(var p=0;p<c.length;p++){var x=c[p],w=x.getSnapshot;x=x.value;try{if(!pr(w(),x))return!1}catch{return!1}}if(c=s.child,s.subtreeFlags&16384&&c!==null)c.return=s,s=c;else{if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function Ha(i,s,c,p){s&=~Mm,s&=~$s,i.suspendedLanes|=s,i.pingedLanes&=~s,p&&(i.warmLanes|=s),p=i.expirationTimes;for(var x=s;0<x;){var w=31-vt(x),j=1<<w;p[w]=-1,x&=~j}c!==0&&Ce(i,c,s)}function Gd(){return(wt&6)===0?(zc(0),!1):!0}function Im(){if(rt!==null){if(Nt===0)var i=rt.return;else i=rt,Fi=Ds=null,Zp(i),zo=null,xc=0,i=rt;for(;i!==null;)G0(i.alternate,i),i=i.return;rt=null}}function Vo(i,s){var c=i.timeoutHandle;c!==-1&&(i.timeoutHandle=-1,GT(c)),c=i.cancelPendingCommit,c!==null&&(i.cancelPendingCommit=null,c()),Ji=0,Im(),Ot=i,rt=c=Ui(i.current,null),lt=s,Nt=0,br=null,Ua=!1,Ho=he(i,s),Tm=!1,Ko=xr=Mm=$s=$a=nn=0,ir=Lc=null,Dm=!1,(s&8)!==0&&(s|=s&32);var p=i.entangledLanes;if(p!==0)for(i=i.entanglements,p&=s;0<p;){var x=31-vt(p),w=1<<x;s|=i[x],p&=~w}return Zi=s,hd(),c}function gw(i,s){We=null,z.H=Cc,s===Io||s===wd?(s=Dv(),Nt=3):s===Up?(s=Dv(),Nt=4):Nt=s===pm?8:s!==null&&typeof s=="object"&&typeof s.then=="function"?6:1,br=s,rt===null&&(nn=1,Ld(i,Or(s,i.current)))}function yw(){var i=gr.current;return i===null?!0:(lt&4194048)===lt?zr===null:(lt&62914560)===lt||(lt&536870912)!==0?i===zr:!1}function bw(){var i=z.H;return z.H=Cc,i===null?Cc:i}function xw(){var i=z.A;return z.A=ST,i}function Vd(){nn=4,Ua||(lt&4194048)!==lt&&gr.current!==null||(Ho=!0),($a&134217727)===0&&($s&134217727)===0||Ot===null||Ha(Ot,lt,xr,!1)}function zm(i,s,c){var p=wt;wt|=2;var x=bw(),w=xw();(Ot!==i||lt!==s)&&(Kd=null,Vo(i,s)),s=!1;var j=nn;e:do try{if(Nt!==0&&rt!==null){var P=rt,X=br;switch(Nt){case 8:Im(),j=6;break e;case 3:case 2:case 9:case 6:gr.current===null&&(s=!0);var ie=Nt;if(Nt=0,br=null,Yo(i,P,X,ie),c&&Ho){j=0;break e}break;default:ie=Nt,Nt=0,br=null,Yo(i,P,X,ie)}}CT(),j=nn;break}catch(fe){gw(i,fe)}while(!0);return s&&i.shellSuspendCounter++,Fi=Ds=null,wt=p,z.H=x,z.A=w,rt===null&&(Ot=null,lt=0,hd()),j}function CT(){for(;rt!==null;)vw(rt)}function jT(i,s){var c=wt;wt|=2;var p=bw(),x=xw();Ot!==i||lt!==s?(Kd=null,Hd=xt()+500,Vo(i,s)):Ho=he(i,s);e:do try{if(Nt!==0&&rt!==null){s=rt;var w=br;t:switch(Nt){case 1:Nt=0,br=null,Yo(i,s,w,1);break;case 2:case 9:if(Tv(w)){Nt=0,br=null,ww(s);break}s=function(){Nt!==2&&Nt!==9||Ot!==i||(Nt=7),wi(i)},w.then(s,s);break e;case 3:Nt=7;break e;case 4:Nt=5;break e;case 7:Tv(w)?(Nt=0,br=null,ww(s)):(Nt=0,br=null,Yo(i,s,w,7));break;case 5:var j=null;switch(rt.tag){case 26:j=rt.memoizedState;case 5:case 27:var P=rt;if(j?s1(j):P.stateNode.complete){Nt=0,br=null;var X=P.sibling;if(X!==null)rt=X;else{var ie=P.return;ie!==null?(rt=ie,Yd(ie)):rt=null}break t}}Nt=0,br=null,Yo(i,s,w,5);break;case 6:Nt=0,br=null,Yo(i,s,w,6);break;case 8:Im(),nn=6;break e;default:throw Error(r(462))}}AT();break}catch(fe){gw(i,fe)}while(!0);return Fi=Ds=null,z.H=p,z.A=x,wt=c,rt!==null?0:(Ot=null,lt=0,hd(),nn)}function AT(){for(;rt!==null&&!Yr();)vw(rt)}function vw(i){var s=H0(i.alternate,i,Zi);i.memoizedProps=i.pendingProps,s===null?Yd(i):rt=s}function ww(i){var s=i,c=s.alternate;switch(s.tag){case 15:case 0:s=P0(c,s,s.pendingProps,s.type,void 0,lt);break;case 11:s=P0(c,s,s.pendingProps,s.type.render,s.ref,lt);break;case 5:Zp(s);default:G0(c,s),s=rt=xv(s,Zi),s=H0(c,s,Zi)}i.memoizedProps=i.pendingProps,s===null?Yd(i):rt=s}function Yo(i,s,c,p){Fi=Ds=null,Zp(s),zo=null,xc=0;var x=s.return;try{if(yT(i,x,s,c,lt)){nn=1,Ld(i,Or(c,i.current)),rt=null;return}}catch(w){if(x!==null)throw rt=x,w;nn=1,Ld(i,Or(c,i.current)),rt=null;return}s.flags&32768?(dt||p===1?i=!0:Ho||(lt&536870912)!==0?i=!1:(Ua=i=!0,(p===2||p===9||p===3||p===6)&&(p=gr.current,p!==null&&p.tag===13&&(p.flags|=16384))),kw(s,i)):Yd(s)}function Yd(i){var s=i;do{if((s.flags&32768)!==0){kw(s,Ua);return}i=s.return;var c=vT(s.alternate,s,Zi);if(c!==null){rt=c;return}if(s=s.sibling,s!==null){rt=s;return}rt=s=i}while(s!==null);nn===0&&(nn=5)}function kw(i,s){do{var c=wT(i.alternate,i);if(c!==null){c.flags&=32767,rt=c;return}if(c=i.return,c!==null&&(c.flags|=32768,c.subtreeFlags=0,c.deletions=null),!s&&(i=i.sibling,i!==null)){rt=i;return}rt=i=c}while(i!==null);nn=6,rt=null}function Ew(i,s,c,p,x,w,j,P,X){i.cancelPendingCommit=null;do Qd();while(vn!==0);if((wt&6)!==0)throw Error(r(327));if(s!==null){if(s===i.current)throw Error(r(177));if(w=s.lanes|s.childLanes,w|=Np,Me(i,c,w,j,P,X),i===Ot&&(rt=Ot=null,lt=0),Go=s,qa=i,Ji=c,Om=w,Rm=x,fw=p,(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?(i.callbackNode=null,i.callbackPriority=0,OT(ze,function(){return jw(),null})):(i.callbackNode=null,i.callbackPriority=0),p=(s.flags&13878)!==0,(s.subtreeFlags&13878)!==0||p){p=z.T,z.T=null,x=Y.p,Y.p=2,j=wt,wt|=4;try{kT(i,s,c)}finally{wt=j,Y.p=x,z.T=p}}vn=1,Sw(),Nw(),_w()}}function Sw(){if(vn===1){vn=0;var i=qa,s=Go,c=(s.flags&13878)!==0;if((s.subtreeFlags&13878)!==0||c){c=z.T,z.T=null;var p=Y.p;Y.p=2;var x=wt;wt|=4;try{iw(s,i);var w=Qm,j=uv(i.containerInfo),P=w.focusedElem,X=w.selectionRange;if(j!==P&&P&&P.ownerDocument&&cv(P.ownerDocument.documentElement,P)){if(X!==null&&vp(P)){var ie=X.start,fe=X.end;if(fe===void 0&&(fe=ie),"selectionStart"in P)P.selectionStart=ie,P.selectionEnd=Math.min(fe,P.value.length);else{var me=P.ownerDocument||document,ae=me&&me.defaultView||window;if(ae.getSelection){var oe=ae.getSelection(),Te=P.textContent.length,qe=Math.min(X.start,Te),Tt=X.end===void 0?qe:Math.min(X.end,Te);!oe.extend&&qe>Tt&&(j=Tt,Tt=qe,qe=j);var te=lv(P,qe),ee=lv(P,Tt);if(te&&ee&&(oe.rangeCount!==1||oe.anchorNode!==te.node||oe.anchorOffset!==te.offset||oe.focusNode!==ee.node||oe.focusOffset!==ee.offset)){var re=me.createRange();re.setStart(te.node,te.offset),oe.removeAllRanges(),qe>Tt?(oe.addRange(re),oe.extend(ee.node,ee.offset)):(re.setEnd(ee.node,ee.offset),oe.addRange(re))}}}}for(me=[],oe=P;oe=oe.parentNode;)oe.nodeType===1&&me.push({element:oe,left:oe.scrollLeft,top:oe.scrollTop});for(typeof P.focus=="function"&&P.focus(),P=0;P<me.length;P++){var pe=me[P];pe.element.scrollLeft=pe.left,pe.element.scrollTop=pe.top}}lf=!!Ym,Qm=Ym=null}finally{wt=x,Y.p=p,z.T=c}}i.current=s,vn=2}}function Nw(){if(vn===2){vn=0;var i=qa,s=Go,c=(s.flags&8772)!==0;if((s.subtreeFlags&8772)!==0||c){c=z.T,z.T=null;var p=Y.p;Y.p=2;var x=wt;wt|=4;try{J0(i,s.alternate,s)}finally{wt=x,Y.p=p,z.T=c}}vn=3}}function _w(){if(vn===4||vn===3){vn=0,Jn();var i=qa,s=Go,c=Ji,p=fw;(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?vn=5:(vn=0,Go=qa=null,Cw(i,i.pendingLanes));var x=i.pendingLanes;if(x===0&&(Fa=null),Qr(c),s=s.stateNode,Ft&&typeof Ft.onCommitFiberRoot=="function")try{Ft.onCommitFiberRoot(bn,s,void 0,(s.current.flags&128)===128)}catch{}if(p!==null){s=z.T,x=Y.p,Y.p=2,z.T=null;try{for(var w=i.onRecoverableError,j=0;j<p.length;j++){var P=p[j];w(P.value,{componentStack:P.stack})}}finally{z.T=s,Y.p=x}}(Ji&3)!==0&&Qd(),wi(i),x=i.pendingLanes,(c&261930)!==0&&(x&42)!==0?i===Lm?Ic++:(Ic=0,Lm=i):Ic=0,zc(0)}}function Cw(i,s){(i.pooledCacheLanes&=s)===0&&(s=i.pooledCache,s!=null&&(i.pooledCache=null,yc(s)))}function Qd(){return Sw(),Nw(),_w(),jw()}function jw(){if(vn!==5)return!1;var i=qa,s=Om;Om=0;var c=Qr(Ji),p=z.T,x=Y.p;try{Y.p=32>c?32:c,z.T=null,c=Rm,Rm=null;var w=qa,j=Ji;if(vn=0,Go=qa=null,Ji=0,(wt&6)!==0)throw Error(r(331));var P=wt;if(wt|=4,cw(w.current),sw(w,w.current,j,c),wt=P,zc(0,!1),Ft&&typeof Ft.onPostCommitFiberRoot=="function")try{Ft.onPostCommitFiberRoot(bn,w)}catch{}return!0}finally{Y.p=x,z.T=p,Cw(i,s)}}function Aw(i,s,c){s=Or(c,s),s=hm(i.stateNode,s,2),i=Ia(i,s,2),i!==null&&(Et(i,2),wi(i))}function _t(i,s,c){if(i.tag===3)Aw(i,i,c);else for(;s!==null;){if(s.tag===3){Aw(s,i,c);break}else if(s.tag===1){var p=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof p.componentDidCatch=="function"&&(Fa===null||!Fa.has(p))){i=Or(c,i),c=T0(2),p=Ia(s,c,2),p!==null&&(M0(c,p,s,i),Et(p,2),wi(p));break}}s=s.return}}function Pm(i,s,c){var p=i.pingCache;if(p===null){p=i.pingCache=new NT;var x=new Set;p.set(s,x)}else x=p.get(s),x===void 0&&(x=new Set,p.set(s,x));x.has(c)||(Tm=!0,x.add(c),i=TT.bind(null,i,s,c),s.then(i,i))}function TT(i,s,c){var p=i.pingCache;p!==null&&p.delete(s),i.pingedLanes|=i.suspendedLanes&c,i.warmLanes&=~c,Ot===i&&(lt&c)===c&&(nn===4||nn===3&&(lt&62914560)===lt&&300>xt()-qd?(wt&2)===0&&Vo(i,0):Mm|=c,Ko===lt&&(Ko=0)),wi(i)}function Tw(i,s){s===0&&(s=Ke()),i=As(i,s),i!==null&&(Et(i,s),wi(i))}function MT(i){var s=i.memoizedState,c=0;s!==null&&(c=s.retryLane),Tw(i,c)}function DT(i,s){var c=0;switch(i.tag){case 31:case 13:var p=i.stateNode,x=i.memoizedState;x!==null&&(c=x.retryLane);break;case 19:p=i.stateNode;break;case 22:p=i.stateNode._retryCache;break;default:throw Error(r(314))}p!==null&&p.delete(s),Tw(i,c)}function OT(i,s){return cn(i,s)}var Wd=null,Qo=null,Bm=!1,Xd=!1,Um=!1,Ka=0;function wi(i){i!==Qo&&i.next===null&&(Qo===null?Wd=Qo=i:Qo=Qo.next=i),Xd=!0,Bm||(Bm=!0,LT())}function zc(i,s){if(!Um&&Xd){Um=!0;do for(var c=!1,p=Wd;p!==null;){if(i!==0){var x=p.pendingLanes;if(x===0)var w=0;else{var j=p.suspendedLanes,P=p.pingedLanes;w=(1<<31-vt(42|i)+1)-1,w&=x&~(j&~P),w=w&201326741?w&201326741|1:w?w|2:0}w!==0&&(c=!0,Rw(p,w))}else w=lt,w=J(p,p===Ot?w:0,p.cancelPendingCommit!==null||p.timeoutHandle!==-1),(w&3)===0||he(p,w)||(c=!0,Rw(p,w));p=p.next}while(c);Um=!1}}function RT(){Mw()}function Mw(){Xd=Bm=!1;var i=0;Ka!==0&&KT()&&(i=Ka);for(var s=xt(),c=null,p=Wd;p!==null;){var x=p.next,w=Dw(p,s);w===0?(p.next=null,c===null?Wd=x:c.next=x,x===null&&(Qo=c)):(c=p,(i!==0||(w&3)!==0)&&(Xd=!0)),p=x}vn!==0&&vn!==5||zc(i),Ka!==0&&(Ka=0)}function Dw(i,s){for(var c=i.suspendedLanes,p=i.pingedLanes,x=i.expirationTimes,w=i.pendingLanes&-62914561;0<w;){var j=31-vt(w),P=1<<j,X=x[j];X===-1?((P&c)===0||(P&p)!==0)&&(x[j]=Ne(P,s)):X<=s&&(i.expiredLanes|=P),w&=~P}if(s=Ot,c=lt,c=J(i,i===s?c:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),p=i.callbackNode,c===0||i===s&&(Nt===2||Nt===9)||i.cancelPendingCommit!==null)return p!==null&&p!==null&&An(p),i.callbackNode=null,i.callbackPriority=0;if((c&3)===0||he(i,c)){if(s=c&-c,s===i.callbackPriority)return s;switch(p!==null&&An(p),Qr(c)){case 2:case 8:c=ve;break;case 32:c=ze;break;case 268435456:c=st;break;default:c=ze}return p=Ow.bind(null,i),c=cn(c,p),i.callbackPriority=s,i.callbackNode=c,s}return p!==null&&p!==null&&An(p),i.callbackPriority=2,i.callbackNode=null,2}function Ow(i,s){if(vn!==0&&vn!==5)return i.callbackNode=null,i.callbackPriority=0,null;var c=i.callbackNode;if(Qd()&&i.callbackNode!==c)return null;var p=lt;return p=J(i,i===Ot?p:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),p===0?null:(pw(i,p,s),Dw(i,xt()),i.callbackNode!=null&&i.callbackNode===c?Ow.bind(null,i):null)}function Rw(i,s){if(Qd())return null;pw(i,s,!0)}function LT(){VT(function(){(wt&6)!==0?cn(le,RT):Mw()})}function $m(){if(Ka===0){var i=Ro;i===0&&(i=Ri,Ri<<=1,(Ri&261888)===0&&(Ri=256)),Ka=i}return Ka}function Lw(i){return i==null||typeof i=="symbol"||typeof i=="boolean"?null:typeof i=="function"?i:ja(""+i)}function Iw(i,s){var c=s.ownerDocument.createElement("input");return c.name=s.name,c.value=s.value,i.id&&c.setAttribute("form",i.id),s.parentNode.insertBefore(c,s),i=new FormData(i),c.parentNode.removeChild(c),i}function IT(i,s,c,p,x){if(s==="submit"&&c&&c.stateNode===x){var w=Lw((x[Sn]||null).action),j=p.submitter;j&&(s=(s=j[Sn]||null)?Lw(s.formAction):j.getAttribute("formAction"),s!==null&&(w=s,j=null));var P=new cd("action","action",null,p,x);i.push({event:P,listeners:[{instance:null,listener:function(){if(p.defaultPrevented){if(Ka!==0){var X=j?Iw(x,j):new FormData(x);om(c,{pending:!0,data:X,method:x.method,action:w},null,X)}}else typeof w=="function"&&(P.preventDefault(),X=j?Iw(x,j):new FormData(x),om(c,{pending:!0,data:X,method:x.method,action:w},w,X))},currentTarget:x}]})}}for(var Fm=0;Fm<Sp.length;Fm++){var qm=Sp[Fm],zT=qm.toLowerCase(),PT=qm[0].toUpperCase()+qm.slice(1);ti(zT,"on"+PT)}ti(hv,"onAnimationEnd"),ti(pv,"onAnimationIteration"),ti(mv,"onAnimationStart"),ti("dblclick","onDoubleClick"),ti("focusin","onFocus"),ti("focusout","onBlur"),ti(eT,"onTransitionRun"),ti(tT,"onTransitionStart"),ti(nT,"onTransitionCancel"),ti(gv,"onTransitionEnd"),ke("onMouseEnter",["mouseout","mouseover"]),ke("onMouseLeave",["mouseout","mouseover"]),ke("onPointerEnter",["pointerout","pointerover"]),ke("onPointerLeave",["pointerout","pointerover"]),Jr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Jr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Jr("onBeforeInput",["compositionend","keypress","textInput","paste"]),Jr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Jr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Jr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Pc="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(" "),BT=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Pc));function zw(i,s){s=(s&4)!==0;for(var c=0;c<i.length;c++){var p=i[c],x=p.event;p=p.listeners;e:{var w=void 0;if(s)for(var j=p.length-1;0<=j;j--){var P=p[j],X=P.instance,ie=P.currentTarget;if(P=P.listener,X!==w&&x.isPropagationStopped())break e;w=P,x.currentTarget=ie;try{w(x)}catch(fe){fd(fe)}x.currentTarget=null,w=X}else for(j=0;j<p.length;j++){if(P=p[j],X=P.instance,ie=P.currentTarget,P=P.listener,X!==w&&x.isPropagationStopped())break e;w=P,x.currentTarget=ie;try{w(x)}catch(fe){fd(fe)}x.currentTarget=null,w=X}}}}function it(i,s){var c=s[ka];c===void 0&&(c=s[ka]=new Set);var p=i+"__bubble";c.has(p)||(Pw(s,i,2,!1),c.add(p))}function Hm(i,s,c){var p=0;s&&(p|=4),Pw(c,i,p,s)}var Zd="_reactListening"+Math.random().toString(36).slice(2);function Km(i){if(!i[Zd]){i[Zd]=!0,wo.forEach(function(c){c!=="selectionchange"&&(BT.has(c)||Hm(c,!1,i),Hm(c,!0,i))});var s=i.nodeType===9?i:i.ownerDocument;s===null||s[Zd]||(s[Zd]=!0,Hm("selectionchange",!1,s))}}function Pw(i,s,c,p){switch(h1(s)){case 2:var x=hM;break;case 8:x=pM;break;default:x=sg}c=x.bind(null,s,c,i),x=void 0,!dp||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(x=!0),p?x!==void 0?i.addEventListener(s,c,{capture:!0,passive:x}):i.addEventListener(s,c,!0):x!==void 0?i.addEventListener(s,c,{passive:x}):i.addEventListener(s,c,!1)}function Gm(i,s,c,p,x){var w=p;if((s&1)===0&&(s&2)===0&&p!==null)e:for(;;){if(p===null)return;var j=p.tag;if(j===3||j===4){var P=p.stateNode.containerInfo;if(P===x)break;if(j===4)for(j=p.return;j!==null;){var X=j.tag;if((X===3||X===4)&&j.stateNode.containerInfo===x)return;j=j.return}for(;P!==null;){if(j=Dn(P),j===null)return;if(X=j.tag,X===5||X===6||X===26||X===27){p=w=j;continue e}P=P.parentNode}}p=p.return}ad(function(){var ie=w,fe=Qe(c),me=[];e:{var ae=yv.get(i);if(ae!==void 0){var oe=cd,Te=i;switch(i){case"keypress":if(od(c)===0)break e;case"keydown":case"keyup":oe=DA;break;case"focusin":Te="focus",oe=mp;break;case"focusout":Te="blur",oe=mp;break;case"beforeblur":case"afterblur":oe=mp;break;case"click":if(c.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":oe=Gx;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":oe=vA;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":oe=LA;break;case hv:case pv:case mv:oe=EA;break;case gv:oe=zA;break;case"scroll":case"scrollend":oe=bA;break;case"wheel":oe=BA;break;case"copy":case"cut":case"paste":oe=NA;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":oe=Yx;break;case"toggle":case"beforetoggle":oe=$A}var qe=(s&4)!==0,Tt=!qe&&(i==="scroll"||i==="scrollend"),te=qe?ae!==null?ae+"Capture":null:ae;qe=[];for(var ee=ie,re;ee!==null;){var pe=ee;if(re=pe.stateNode,pe=pe.tag,pe!==5&&pe!==26&&pe!==27||re===null||te===null||(pe=sc(ee,te),pe!=null&&qe.push(Bc(ee,pe,re))),Tt)break;ee=ee.return}0<qe.length&&(ae=new oe(ae,Te,null,c,fe),me.push({event:ae,listeners:qe}))}}if((s&7)===0){e:{if(ae=i==="mouseover"||i==="pointerover",oe=i==="mouseout"||i==="pointerout",ae&&c!==Oe&&(Te=c.relatedTarget||c.fromElement)&&(Dn(Te)||Te[Wr]))break e;if((oe||ae)&&(ae=fe.window===fe?fe:(ae=fe.ownerDocument)?ae.defaultView||ae.parentWindow:window,oe?(Te=c.relatedTarget||c.toElement,oe=ie,Te=Te?Dn(Te):null,Te!==null&&(Tt=o(Te),qe=Te.tag,Te!==Tt||qe!==5&&qe!==27&&qe!==6)&&(Te=null)):(oe=null,Te=ie),oe!==Te)){if(qe=Gx,pe="onMouseLeave",te="onMouseEnter",ee="mouse",(i==="pointerout"||i==="pointerover")&&(qe=Yx,pe="onPointerLeave",te="onPointerEnter",ee="pointer"),Tt=oe==null?ae:Zr(oe),re=Te==null?ae:Zr(Te),ae=new qe(pe,ee+"leave",oe,c,fe),ae.target=Tt,ae.relatedTarget=re,pe=null,Dn(fe)===ie&&(qe=new qe(te,ee+"enter",Te,c,fe),qe.target=re,qe.relatedTarget=Tt,pe=qe),Tt=pe,oe&&Te)t:{for(qe=UT,te=oe,ee=Te,re=0,pe=te;pe;pe=qe(pe))re++;pe=0;for(var Ue=ee;Ue;Ue=qe(Ue))pe++;for(;0<re-pe;)te=qe(te),re--;for(;0<pe-re;)ee=qe(ee),pe--;for(;re--;){if(te===ee||ee!==null&&te===ee.alternate){qe=te;break t}te=qe(te),ee=qe(ee)}qe=null}else qe=null;oe!==null&&Bw(me,ae,oe,qe,!1),Te!==null&&Tt!==null&&Bw(me,Tt,Te,qe,!0)}}e:{if(ae=ie?Zr(ie):window,oe=ae.nodeName&&ae.nodeName.toLowerCase(),oe==="select"||oe==="input"&&ae.type==="file")var yt=nv;else if(ev(ae))if(rv)yt=XA;else{yt=QA;var Re=YA}else oe=ae.nodeName,!oe||oe.toLowerCase()!=="input"||ae.type!=="checkbox"&&ae.type!=="radio"?ie&&Ca(ie.elementType)&&(yt=nv):yt=WA;if(yt&&(yt=yt(i,ie))){tv(me,yt,c,fe);break e}Re&&Re(i,ae,ie),i==="focusout"&&ie&&ae.type==="number"&&ie.memoizedProps.value!=null&&_a(ae,"number",ae.value)}switch(Re=ie?Zr(ie):window,i){case"focusin":(ev(Re)||Re.contentEditable==="true")&&(_o=Re,wp=ie,pc=null);break;case"focusout":pc=wp=_o=null;break;case"mousedown":kp=!0;break;case"contextmenu":case"mouseup":case"dragend":kp=!1,dv(me,c,fe);break;case"selectionchange":if(JA)break;case"keydown":case"keyup":dv(me,c,fe)}var Ze;if(yp)e:{switch(i){case"compositionstart":var ct="onCompositionStart";break e;case"compositionend":ct="onCompositionEnd";break e;case"compositionupdate":ct="onCompositionUpdate";break e}ct=void 0}else No?Zx(i,c)&&(ct="onCompositionEnd"):i==="keydown"&&c.keyCode===229&&(ct="onCompositionStart");ct&&(Qx&&c.locale!=="ko"&&(No||ct!=="onCompositionStart"?ct==="onCompositionEnd"&&No&&(Ze=Hx()):(Aa=fe,fp="value"in Aa?Aa.value:Aa.textContent,No=!0)),Re=Jd(ie,ct),0<Re.length&&(ct=new Vx(ct,i,null,c,fe),me.push({event:ct,listeners:Re}),Ze?ct.data=Ze:(Ze=Jx(c),Ze!==null&&(ct.data=Ze)))),(Ze=qA?HA(i,c):KA(i,c))&&(ct=Jd(ie,"onBeforeInput"),0<ct.length&&(Re=new Vx("onBeforeInput","beforeinput",null,c,fe),me.push({event:Re,listeners:ct}),Re.data=Ze)),IT(me,i,ie,c,fe)}zw(me,s)})}function Bc(i,s,c){return{instance:i,listener:s,currentTarget:c}}function Jd(i,s){for(var c=s+"Capture",p=[];i!==null;){var x=i,w=x.stateNode;if(x=x.tag,x!==5&&x!==26&&x!==27||w===null||(x=sc(i,c),x!=null&&p.unshift(Bc(i,x,w)),x=sc(i,s),x!=null&&p.push(Bc(i,x,w))),i.tag===3)return p;i=i.return}return[]}function UT(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5&&i.tag!==27);return i||null}function Bw(i,s,c,p,x){for(var w=s._reactName,j=[];c!==null&&c!==p;){var P=c,X=P.alternate,ie=P.stateNode;if(P=P.tag,X!==null&&X===p)break;P!==5&&P!==26&&P!==27||ie===null||(X=ie,x?(ie=sc(c,w),ie!=null&&j.unshift(Bc(c,ie,X))):x||(ie=sc(c,w),ie!=null&&j.push(Bc(c,ie,X)))),c=c.return}j.length!==0&&i.push({event:s,listeners:j})}var $T=/\r\n?/g,FT=/\u0000|\uFFFD/g;function Uw(i){return(typeof i=="string"?i:""+i).replace($T,`
|
|
49
|
+
`).replace(FT,"")}function $w(i,s){return s=Uw(s),Uw(i)===s}function At(i,s,c,p,x,w){switch(c){case"children":typeof p=="string"?s==="body"||s==="textarea"&&p===""||He(i,p):(typeof p=="number"||typeof p=="bigint")&&s!=="body"&&He(i,""+p);break;case"className":Kn(i,"class",p);break;case"tabIndex":Kn(i,"tabindex",p);break;case"dir":case"role":case"viewBox":case"width":case"height":Kn(i,c,p);break;case"style":St(i,p,w);break;case"data":if(s!=="object"){Kn(i,"data",p);break}case"src":case"href":if(p===""&&(s!=="a"||c!=="href")){i.removeAttribute(c);break}if(p==null||typeof p=="function"||typeof p=="symbol"||typeof p=="boolean"){i.removeAttribute(c);break}p=ja(""+p),i.setAttribute(c,p);break;case"action":case"formAction":if(typeof p=="function"){i.setAttribute(c,"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 w=="function"&&(c==="formAction"?(s!=="input"&&At(i,s,"name",x.name,x,null),At(i,s,"formEncType",x.formEncType,x,null),At(i,s,"formMethod",x.formMethod,x,null),At(i,s,"formTarget",x.formTarget,x,null)):(At(i,s,"encType",x.encType,x,null),At(i,s,"method",x.method,x,null),At(i,s,"target",x.target,x,null)));if(p==null||typeof p=="symbol"||typeof p=="boolean"){i.removeAttribute(c);break}p=ja(""+p),i.setAttribute(c,p);break;case"onClick":p!=null&&(i.onclick=Se);break;case"onScroll":p!=null&&it("scroll",i);break;case"onScrollEnd":p!=null&&it("scrollend",i);break;case"dangerouslySetInnerHTML":if(p!=null){if(typeof p!="object"||!("__html"in p))throw Error(r(61));if(c=p.__html,c!=null){if(x.children!=null)throw Error(r(60));i.innerHTML=c}}break;case"multiple":i.multiple=p&&typeof p!="function"&&typeof p!="symbol";break;case"muted":i.muted=p&&typeof p!="function"&&typeof p!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(p==null||typeof p=="function"||typeof p=="boolean"||typeof p=="symbol"){i.removeAttribute("xlink:href");break}c=ja(""+p),i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",c);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":p!=null&&typeof p!="function"&&typeof p!="symbol"?i.setAttribute(c,""+p):i.removeAttribute(c);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":p&&typeof p!="function"&&typeof p!="symbol"?i.setAttribute(c,""):i.removeAttribute(c);break;case"capture":case"download":p===!0?i.setAttribute(c,""):p!==!1&&p!=null&&typeof p!="function"&&typeof p!="symbol"?i.setAttribute(c,p):i.removeAttribute(c);break;case"cols":case"rows":case"size":case"span":p!=null&&typeof p!="function"&&typeof p!="symbol"&&!isNaN(p)&&1<=p?i.setAttribute(c,p):i.removeAttribute(c);break;case"rowSpan":case"start":p==null||typeof p=="function"||typeof p=="symbol"||isNaN(p)?i.removeAttribute(c):i.setAttribute(c,p);break;case"popover":it("beforetoggle",i),it("toggle",i),Nn(i,"popover",p);break;case"xlinkActuate":Pn(i,"http://www.w3.org/1999/xlink","xlink:actuate",p);break;case"xlinkArcrole":Pn(i,"http://www.w3.org/1999/xlink","xlink:arcrole",p);break;case"xlinkRole":Pn(i,"http://www.w3.org/1999/xlink","xlink:role",p);break;case"xlinkShow":Pn(i,"http://www.w3.org/1999/xlink","xlink:show",p);break;case"xlinkTitle":Pn(i,"http://www.w3.org/1999/xlink","xlink:title",p);break;case"xlinkType":Pn(i,"http://www.w3.org/1999/xlink","xlink:type",p);break;case"xmlBase":Pn(i,"http://www.w3.org/XML/1998/namespace","xml:base",p);break;case"xmlLang":Pn(i,"http://www.w3.org/XML/1998/namespace","xml:lang",p);break;case"xmlSpace":Pn(i,"http://www.w3.org/XML/1998/namespace","xml:space",p);break;case"is":Nn(i,"is",p);break;case"innerText":case"textContent":break;default:(!(2<c.length)||c[0]!=="o"&&c[0]!=="O"||c[1]!=="n"&&c[1]!=="N")&&(c=Pi.get(c)||c,Nn(i,c,p))}}function Vm(i,s,c,p,x,w){switch(c){case"style":St(i,p,w);break;case"dangerouslySetInnerHTML":if(p!=null){if(typeof p!="object"||!("__html"in p))throw Error(r(61));if(c=p.__html,c!=null){if(x.children!=null)throw Error(r(60));i.innerHTML=c}}break;case"children":typeof p=="string"?He(i,p):(typeof p=="number"||typeof p=="bigint")&&He(i,""+p);break;case"onScroll":p!=null&&it("scroll",i);break;case"onScrollEnd":p!=null&&it("scrollend",i);break;case"onClick":p!=null&&(i.onclick=Se);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!zi.hasOwnProperty(c))e:{if(c[0]==="o"&&c[1]==="n"&&(x=c.endsWith("Capture"),s=c.slice(2,x?c.length-7:void 0),w=i[Sn]||null,w=w!=null?w[c]:null,typeof w=="function"&&i.removeEventListener(s,w,x),typeof p=="function")){typeof w!="function"&&w!==null&&(c in i?i[c]=null:i.hasAttribute(c)&&i.removeAttribute(c)),i.addEventListener(s,p,x);break e}c in i?i[c]=p:p===!0?i.setAttribute(c,""):Nn(i,c,p)}}}function In(i,s,c){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":it("error",i),it("load",i);var p=!1,x=!1,w;for(w in c)if(c.hasOwnProperty(w)){var j=c[w];if(j!=null)switch(w){case"src":p=!0;break;case"srcSet":x=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,s));default:At(i,s,w,j,c,null)}}x&&At(i,s,"srcSet",c.srcSet,c,null),p&&At(i,s,"src",c.src,c,null);return;case"input":it("invalid",i);var P=w=j=x=null,X=null,ie=null;for(p in c)if(c.hasOwnProperty(p)){var fe=c[p];if(fe!=null)switch(p){case"name":x=fe;break;case"type":j=fe;break;case"checked":X=fe;break;case"defaultChecked":ie=fe;break;case"value":w=fe;break;case"defaultValue":P=fe;break;case"children":case"dangerouslySetInnerHTML":if(fe!=null)throw Error(r(137,s));break;default:At(i,s,p,fe,c,null)}}ei(i,w,P,X,ie,j,x,!1);return;case"select":it("invalid",i),p=j=w=null;for(x in c)if(c.hasOwnProperty(x)&&(P=c[x],P!=null))switch(x){case"value":w=P;break;case"defaultValue":j=P;break;case"multiple":p=P;default:At(i,s,x,P,c,null)}s=w,c=j,i.multiple=!!p,s!=null?xn(i,!!p,s,!1):c!=null&&xn(i,!!p,c,!0);return;case"textarea":it("invalid",i),w=x=p=null;for(j in c)if(c.hasOwnProperty(j)&&(P=c[j],P!=null))switch(j){case"value":p=P;break;case"defaultValue":x=P;break;case"children":w=P;break;case"dangerouslySetInnerHTML":if(P!=null)throw Error(r(91));break;default:At(i,s,j,P,c,null)}So(i,p,x,w);return;case"option":for(X in c)if(c.hasOwnProperty(X)&&(p=c[X],p!=null))switch(X){case"selected":i.selected=p&&typeof p!="function"&&typeof p!="symbol";break;default:At(i,s,X,p,c,null)}return;case"dialog":it("beforetoggle",i),it("toggle",i),it("cancel",i),it("close",i);break;case"iframe":case"object":it("load",i);break;case"video":case"audio":for(p=0;p<Pc.length;p++)it(Pc[p],i);break;case"image":it("error",i),it("load",i);break;case"details":it("toggle",i);break;case"embed":case"source":case"link":it("error",i),it("load",i);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ie in c)if(c.hasOwnProperty(ie)&&(p=c[ie],p!=null))switch(ie){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,s));default:At(i,s,ie,p,c,null)}return;default:if(Ca(s)){for(fe in c)c.hasOwnProperty(fe)&&(p=c[fe],p!==void 0&&Vm(i,s,fe,p,c,void 0));return}}for(P in c)c.hasOwnProperty(P)&&(p=c[P],p!=null&&At(i,s,P,p,c,null))}function qT(i,s,c,p){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var x=null,w=null,j=null,P=null,X=null,ie=null,fe=null;for(oe in c){var me=c[oe];if(c.hasOwnProperty(oe)&&me!=null)switch(oe){case"checked":break;case"value":break;case"defaultValue":X=me;default:p.hasOwnProperty(oe)||At(i,s,oe,null,p,me)}}for(var ae in p){var oe=p[ae];if(me=c[ae],p.hasOwnProperty(ae)&&(oe!=null||me!=null))switch(ae){case"type":w=oe;break;case"name":x=oe;break;case"checked":ie=oe;break;case"defaultChecked":fe=oe;break;case"value":j=oe;break;case"defaultValue":P=oe;break;case"children":case"dangerouslySetInnerHTML":if(oe!=null)throw Error(r(137,s));break;default:oe!==me&&At(i,s,ae,oe,p,me)}}Ss(i,j,P,X,ie,fe,w,x);return;case"select":oe=j=P=ae=null;for(w in c)if(X=c[w],c.hasOwnProperty(w)&&X!=null)switch(w){case"value":break;case"multiple":oe=X;default:p.hasOwnProperty(w)||At(i,s,w,null,p,X)}for(x in p)if(w=p[x],X=c[x],p.hasOwnProperty(x)&&(w!=null||X!=null))switch(x){case"value":ae=w;break;case"defaultValue":P=w;break;case"multiple":j=w;default:w!==X&&At(i,s,x,w,p,X)}s=P,c=j,p=oe,ae!=null?xn(i,!!c,ae,!1):!!p!=!!c&&(s!=null?xn(i,!!c,s,!0):xn(i,!!c,c?[]:"",!1));return;case"textarea":oe=ae=null;for(P in c)if(x=c[P],c.hasOwnProperty(P)&&x!=null&&!p.hasOwnProperty(P))switch(P){case"value":break;case"children":break;default:At(i,s,P,null,p,x)}for(j in p)if(x=p[j],w=c[j],p.hasOwnProperty(j)&&(x!=null||w!=null))switch(j){case"value":ae=x;break;case"defaultValue":oe=x;break;case"children":break;case"dangerouslySetInnerHTML":if(x!=null)throw Error(r(91));break;default:x!==w&&At(i,s,j,x,p,w)}Ns(i,ae,oe);return;case"option":for(var Te in c)if(ae=c[Te],c.hasOwnProperty(Te)&&ae!=null&&!p.hasOwnProperty(Te))switch(Te){case"selected":i.selected=!1;break;default:At(i,s,Te,null,p,ae)}for(X in p)if(ae=p[X],oe=c[X],p.hasOwnProperty(X)&&ae!==oe&&(ae!=null||oe!=null))switch(X){case"selected":i.selected=ae&&typeof ae!="function"&&typeof ae!="symbol";break;default:At(i,s,X,ae,p,oe)}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 qe in c)ae=c[qe],c.hasOwnProperty(qe)&&ae!=null&&!p.hasOwnProperty(qe)&&At(i,s,qe,null,p,ae);for(ie in p)if(ae=p[ie],oe=c[ie],p.hasOwnProperty(ie)&&ae!==oe&&(ae!=null||oe!=null))switch(ie){case"children":case"dangerouslySetInnerHTML":if(ae!=null)throw Error(r(137,s));break;default:At(i,s,ie,ae,p,oe)}return;default:if(Ca(s)){for(var Tt in c)ae=c[Tt],c.hasOwnProperty(Tt)&&ae!==void 0&&!p.hasOwnProperty(Tt)&&Vm(i,s,Tt,void 0,p,ae);for(fe in p)ae=p[fe],oe=c[fe],!p.hasOwnProperty(fe)||ae===oe||ae===void 0&&oe===void 0||Vm(i,s,fe,ae,p,oe);return}}for(var te in c)ae=c[te],c.hasOwnProperty(te)&&ae!=null&&!p.hasOwnProperty(te)&&At(i,s,te,null,p,ae);for(me in p)ae=p[me],oe=c[me],!p.hasOwnProperty(me)||ae===oe||ae==null&&oe==null||At(i,s,me,ae,p,oe)}function Fw(i){switch(i){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function HT(){if(typeof performance.getEntriesByType=="function"){for(var i=0,s=0,c=performance.getEntriesByType("resource"),p=0;p<c.length;p++){var x=c[p],w=x.transferSize,j=x.initiatorType,P=x.duration;if(w&&P&&Fw(j)){for(j=0,P=x.responseEnd,p+=1;p<c.length;p++){var X=c[p],ie=X.startTime;if(ie>P)break;var fe=X.transferSize,me=X.initiatorType;fe&&Fw(me)&&(X=X.responseEnd,j+=fe*(X<P?1:(P-ie)/(X-ie)))}if(--p,s+=8*(w+j)/(x.duration/1e3),i++,10<i)break}}if(0<i)return s/i/1e6}return navigator.connection&&(i=navigator.connection.downlink,typeof i=="number")?i:5}var Ym=null,Qm=null;function ef(i){return i.nodeType===9?i:i.ownerDocument}function qw(i){switch(i){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Hw(i,s){if(i===0)switch(s){case"svg":return 1;case"math":return 2;default:return 0}return i===1&&s==="foreignObject"?0:i}function Wm(i,s){return i==="textarea"||i==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.children=="bigint"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var Xm=null;function KT(){var i=window.event;return i&&i.type==="popstate"?i===Xm?!1:(Xm=i,!0):(Xm=null,!1)}var Kw=typeof setTimeout=="function"?setTimeout:void 0,GT=typeof clearTimeout=="function"?clearTimeout:void 0,Gw=typeof Promise=="function"?Promise:void 0,VT=typeof queueMicrotask=="function"?queueMicrotask:typeof Gw<"u"?function(i){return Gw.resolve(null).then(i).catch(YT)}:Kw;function YT(i){setTimeout(function(){throw i})}function Ga(i){return i==="head"}function Vw(i,s){var c=s,p=0;do{var x=c.nextSibling;if(i.removeChild(c),x&&x.nodeType===8)if(c=x.data,c==="/$"||c==="/&"){if(p===0){i.removeChild(x),Jo(s);return}p--}else if(c==="$"||c==="$?"||c==="$~"||c==="$!"||c==="&")p++;else if(c==="html")Uc(i.ownerDocument.documentElement);else if(c==="head"){c=i.ownerDocument.head,Uc(c);for(var w=c.firstChild;w;){var j=w.nextSibling,P=w.nodeName;w[Ii]||P==="SCRIPT"||P==="STYLE"||P==="LINK"&&w.rel.toLowerCase()==="stylesheet"||c.removeChild(w),w=j}}else c==="body"&&Uc(i.ownerDocument.body);c=x}while(c);Jo(s)}function Yw(i,s){var c=i;i=0;do{var p=c.nextSibling;if(c.nodeType===1?s?(c._stashedDisplay=c.style.display,c.style.display="none"):(c.style.display=c._stashedDisplay||"",c.getAttribute("style")===""&&c.removeAttribute("style")):c.nodeType===3&&(s?(c._stashedText=c.nodeValue,c.nodeValue=""):c.nodeValue=c._stashedText||""),p&&p.nodeType===8)if(c=p.data,c==="/$"){if(i===0)break;i--}else c!=="$"&&c!=="$?"&&c!=="$~"&&c!=="$!"||i++;c=p}while(c)}function Zm(i){var s=i.firstChild;for(s&&s.nodeType===10&&(s=s.nextSibling);s;){var c=s;switch(s=s.nextSibling,c.nodeName){case"HTML":case"HEAD":case"BODY":Zm(c),Es(c);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(c.rel.toLowerCase()==="stylesheet")continue}i.removeChild(c)}}function QT(i,s,c,p){for(;i.nodeType===1;){var x=c;if(i.nodeName.toLowerCase()!==s.toLowerCase()){if(!p&&(i.nodeName!=="INPUT"||i.type!=="hidden"))break}else if(p){if(!i[Ii])switch(s){case"meta":if(!i.hasAttribute("itemprop"))break;return i;case"link":if(w=i.getAttribute("rel"),w==="stylesheet"&&i.hasAttribute("data-precedence"))break;if(w!==x.rel||i.getAttribute("href")!==(x.href==null||x.href===""?null:x.href)||i.getAttribute("crossorigin")!==(x.crossOrigin==null?null:x.crossOrigin)||i.getAttribute("title")!==(x.title==null?null:x.title))break;return i;case"style":if(i.hasAttribute("data-precedence"))break;return i;case"script":if(w=i.getAttribute("src"),(w!==(x.src==null?null:x.src)||i.getAttribute("type")!==(x.type==null?null:x.type)||i.getAttribute("crossorigin")!==(x.crossOrigin==null?null:x.crossOrigin))&&w&&i.hasAttribute("async")&&!i.hasAttribute("itemprop"))break;return i;default:return i}}else if(s==="input"&&i.type==="hidden"){var w=x.name==null?null:""+x.name;if(x.type==="hidden"&&i.getAttribute("name")===w)return i}else return i;if(i=Pr(i.nextSibling),i===null)break}return null}function WT(i,s,c){if(s==="")return null;for(;i.nodeType!==3;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!c||(i=Pr(i.nextSibling),i===null))return null;return i}function Qw(i,s){for(;i.nodeType!==8;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!s||(i=Pr(i.nextSibling),i===null))return null;return i}function Jm(i){return i.data==="$?"||i.data==="$~"}function eg(i){return i.data==="$!"||i.data==="$?"&&i.ownerDocument.readyState!=="loading"}function XT(i,s){var c=i.ownerDocument;if(i.data==="$~")i._reactRetry=s;else if(i.data!=="$?"||c.readyState!=="loading")s();else{var p=function(){s(),c.removeEventListener("DOMContentLoaded",p)};c.addEventListener("DOMContentLoaded",p),i._reactRetry=p}}function Pr(i){for(;i!=null;i=i.nextSibling){var s=i.nodeType;if(s===1||s===3)break;if(s===8){if(s=i.data,s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"||s==="F!"||s==="F")break;if(s==="/$"||s==="/&")return null}}return i}var tg=null;function Ww(i){i=i.nextSibling;for(var s=0;i;){if(i.nodeType===8){var c=i.data;if(c==="/$"||c==="/&"){if(s===0)return Pr(i.nextSibling);s--}else c!=="$"&&c!=="$!"&&c!=="$?"&&c!=="$~"&&c!=="&"||s++}i=i.nextSibling}return null}function Xw(i){i=i.previousSibling;for(var s=0;i;){if(i.nodeType===8){var c=i.data;if(c==="$"||c==="$!"||c==="$?"||c==="$~"||c==="&"){if(s===0)return i;s--}else c!=="/$"&&c!=="/&"||s++}i=i.previousSibling}return null}function Zw(i,s,c){switch(s=ef(c),i){case"html":if(i=s.documentElement,!i)throw Error(r(452));return i;case"head":if(i=s.head,!i)throw Error(r(453));return i;case"body":if(i=s.body,!i)throw Error(r(454));return i;default:throw Error(r(451))}}function Uc(i){for(var s=i.attributes;s.length;)i.removeAttributeNode(s[0]);Es(i)}var Br=new Map,Jw=new Set;function tf(i){return typeof i.getRootNode=="function"?i.getRootNode():i.nodeType===9?i:i.ownerDocument}var ea=Y.d;Y.d={f:ZT,r:JT,D:eM,C:tM,L:nM,m:rM,X:aM,S:iM,M:sM};function ZT(){var i=ea.f(),s=Gd();return i||s}function JT(i){var s=Xr(i);s!==null&&s.tag===5&&s.type==="form"?g0(s):ea.r(i)}var Wo=typeof document>"u"?null:document;function e1(i,s,c){var p=Wo;if(p&&typeof s=="string"&&s){var x=Bn(s);x='link[rel="'+i+'"][href="'+x+'"]',typeof c=="string"&&(x+='[crossorigin="'+c+'"]'),Jw.has(x)||(Jw.add(x),i={rel:i,crossOrigin:c,href:s},p.querySelector(x)===null&&(s=p.createElement("link"),In(s,"link",i),en(s),p.head.appendChild(s)))}}function eM(i){ea.D(i),e1("dns-prefetch",i,null)}function tM(i,s){ea.C(i,s),e1("preconnect",i,s)}function nM(i,s,c){ea.L(i,s,c);var p=Wo;if(p&&i&&s){var x='link[rel="preload"][as="'+Bn(s)+'"]';s==="image"&&c&&c.imageSrcSet?(x+='[imagesrcset="'+Bn(c.imageSrcSet)+'"]',typeof c.imageSizes=="string"&&(x+='[imagesizes="'+Bn(c.imageSizes)+'"]')):x+='[href="'+Bn(i)+'"]';var w=x;switch(s){case"style":w=Xo(i);break;case"script":w=Zo(i)}Br.has(w)||(i=m({rel:"preload",href:s==="image"&&c&&c.imageSrcSet?void 0:i,as:s},c),Br.set(w,i),p.querySelector(x)!==null||s==="style"&&p.querySelector($c(w))||s==="script"&&p.querySelector(Fc(w))||(s=p.createElement("link"),In(s,"link",i),en(s),p.head.appendChild(s)))}}function rM(i,s){ea.m(i,s);var c=Wo;if(c&&i){var p=s&&typeof s.as=="string"?s.as:"script",x='link[rel="modulepreload"][as="'+Bn(p)+'"][href="'+Bn(i)+'"]',w=x;switch(p){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":w=Zo(i)}if(!Br.has(w)&&(i=m({rel:"modulepreload",href:i},s),Br.set(w,i),c.querySelector(x)===null)){switch(p){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(c.querySelector(Fc(w)))return}p=c.createElement("link"),In(p,"link",i),en(p),c.head.appendChild(p)}}}function iM(i,s,c){ea.S(i,s,c);var p=Wo;if(p&&i){var x=gi(p).hoistableStyles,w=Xo(i);s=s||"default";var j=x.get(w);if(!j){var P={loading:0,preload:null};if(j=p.querySelector($c(w)))P.loading=5;else{i=m({rel:"stylesheet",href:i,"data-precedence":s},c),(c=Br.get(w))&&ng(i,c);var X=j=p.createElement("link");en(X),In(X,"link",i),X._p=new Promise(function(ie,fe){X.onload=ie,X.onerror=fe}),X.addEventListener("load",function(){P.loading|=1}),X.addEventListener("error",function(){P.loading|=2}),P.loading|=4,nf(j,s,p)}j={type:"stylesheet",instance:j,count:1,state:P},x.set(w,j)}}}function aM(i,s){ea.X(i,s);var c=Wo;if(c&&i){var p=gi(c).hoistableScripts,x=Zo(i),w=p.get(x);w||(w=c.querySelector(Fc(x)),w||(i=m({src:i,async:!0},s),(s=Br.get(x))&&rg(i,s),w=c.createElement("script"),en(w),In(w,"link",i),c.head.appendChild(w)),w={type:"script",instance:w,count:1,state:null},p.set(x,w))}}function sM(i,s){ea.M(i,s);var c=Wo;if(c&&i){var p=gi(c).hoistableScripts,x=Zo(i),w=p.get(x);w||(w=c.querySelector(Fc(x)),w||(i=m({src:i,async:!0,type:"module"},s),(s=Br.get(x))&&rg(i,s),w=c.createElement("script"),en(w),In(w,"link",i),c.head.appendChild(w)),w={type:"script",instance:w,count:1,state:null},p.set(x,w))}}function t1(i,s,c,p){var x=(x=ye.current)?tf(x):null;if(!x)throw Error(r(446));switch(i){case"meta":case"title":return null;case"style":return typeof c.precedence=="string"&&typeof c.href=="string"?(s=Xo(c.href),c=gi(x).hoistableStyles,p=c.get(s),p||(p={type:"style",instance:null,count:0,state:null},c.set(s,p)),p):{type:"void",instance:null,count:0,state:null};case"link":if(c.rel==="stylesheet"&&typeof c.href=="string"&&typeof c.precedence=="string"){i=Xo(c.href);var w=gi(x).hoistableStyles,j=w.get(i);if(j||(x=x.ownerDocument||x,j={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},w.set(i,j),(w=x.querySelector($c(i)))&&!w._p&&(j.instance=w,j.state.loading=5),Br.has(i)||(c={rel:"preload",as:"style",href:c.href,crossOrigin:c.crossOrigin,integrity:c.integrity,media:c.media,hrefLang:c.hrefLang,referrerPolicy:c.referrerPolicy},Br.set(i,c),w||oM(x,i,c,j.state))),s&&p===null)throw Error(r(528,""));return j}if(s&&p!==null)throw Error(r(529,""));return null;case"script":return s=c.async,c=c.src,typeof c=="string"&&s&&typeof s!="function"&&typeof s!="symbol"?(s=Zo(c),c=gi(x).hoistableScripts,p=c.get(s),p||(p={type:"script",instance:null,count:0,state:null},c.set(s,p)),p):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,i))}}function Xo(i){return'href="'+Bn(i)+'"'}function $c(i){return'link[rel="stylesheet"]['+i+"]"}function n1(i){return m({},i,{"data-precedence":i.precedence,precedence:null})}function oM(i,s,c,p){i.querySelector('link[rel="preload"][as="style"]['+s+"]")?p.loading=1:(s=i.createElement("link"),p.preload=s,s.addEventListener("load",function(){return p.loading|=1}),s.addEventListener("error",function(){return p.loading|=2}),In(s,"link",c),en(s),i.head.appendChild(s))}function Zo(i){return'[src="'+Bn(i)+'"]'}function Fc(i){return"script[async]"+i}function r1(i,s,c){if(s.count++,s.instance===null)switch(s.type){case"style":var p=i.querySelector('style[data-href~="'+Bn(c.href)+'"]');if(p)return s.instance=p,en(p),p;var x=m({},c,{"data-href":c.href,"data-precedence":c.precedence,href:null,precedence:null});return p=(i.ownerDocument||i).createElement("style"),en(p),In(p,"style",x),nf(p,c.precedence,i),s.instance=p;case"stylesheet":x=Xo(c.href);var w=i.querySelector($c(x));if(w)return s.state.loading|=4,s.instance=w,en(w),w;p=n1(c),(x=Br.get(x))&&ng(p,x),w=(i.ownerDocument||i).createElement("link"),en(w);var j=w;return j._p=new Promise(function(P,X){j.onload=P,j.onerror=X}),In(w,"link",p),s.state.loading|=4,nf(w,c.precedence,i),s.instance=w;case"script":return w=Zo(c.src),(x=i.querySelector(Fc(w)))?(s.instance=x,en(x),x):(p=c,(x=Br.get(w))&&(p=m({},c),rg(p,x)),i=i.ownerDocument||i,x=i.createElement("script"),en(x),In(x,"link",p),i.head.appendChild(x),s.instance=x);case"void":return null;default:throw Error(r(443,s.type))}else s.type==="stylesheet"&&(s.state.loading&4)===0&&(p=s.instance,s.state.loading|=4,nf(p,c.precedence,i));return s.instance}function nf(i,s,c){for(var p=c.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),x=p.length?p[p.length-1]:null,w=x,j=0;j<p.length;j++){var P=p[j];if(P.dataset.precedence===s)w=P;else if(w!==x)break}w?w.parentNode.insertBefore(i,w.nextSibling):(s=c.nodeType===9?c.head:c,s.insertBefore(i,s.firstChild))}function ng(i,s){i.crossOrigin==null&&(i.crossOrigin=s.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=s.referrerPolicy),i.title==null&&(i.title=s.title)}function rg(i,s){i.crossOrigin==null&&(i.crossOrigin=s.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=s.referrerPolicy),i.integrity==null&&(i.integrity=s.integrity)}var rf=null;function i1(i,s,c){if(rf===null){var p=new Map,x=rf=new Map;x.set(c,p)}else x=rf,p=x.get(c),p||(p=new Map,x.set(c,p));if(p.has(i))return p;for(p.set(i,null),c=c.getElementsByTagName(i),x=0;x<c.length;x++){var w=c[x];if(!(w[Ii]||w[Qt]||i==="link"&&w.getAttribute("rel")==="stylesheet")&&w.namespaceURI!=="http://www.w3.org/2000/svg"){var j=w.getAttribute(s)||"";j=i+j;var P=p.get(j);P?P.push(w):p.set(j,[w])}}return p}function a1(i,s,c){i=i.ownerDocument||i,i.head.insertBefore(c,s==="title"?i.querySelector("head > title"):null)}function lM(i,s,c){if(c===1||s.itemProp!=null)return!1;switch(i){case"meta":case"title":return!0;case"style":if(typeof s.precedence!="string"||typeof s.href!="string"||s.href==="")break;return!0;case"link":if(typeof s.rel!="string"||typeof s.href!="string"||s.href===""||s.onLoad||s.onError)break;switch(s.rel){case"stylesheet":return i=s.disabled,typeof s.precedence=="string"&&i==null;default:return!0}case"script":if(s.async&&typeof s.async!="function"&&typeof s.async!="symbol"&&!s.onLoad&&!s.onError&&s.src&&typeof s.src=="string")return!0}return!1}function s1(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}function cM(i,s,c,p){if(c.type==="stylesheet"&&(typeof p.media!="string"||matchMedia(p.media).matches!==!1)&&(c.state.loading&4)===0){if(c.instance===null){var x=Xo(p.href),w=s.querySelector($c(x));if(w){s=w._p,s!==null&&typeof s=="object"&&typeof s.then=="function"&&(i.count++,i=af.bind(i),s.then(i,i)),c.state.loading|=4,c.instance=w,en(w);return}w=s.ownerDocument||s,p=n1(p),(x=Br.get(x))&&ng(p,x),w=w.createElement("link"),en(w);var j=w;j._p=new Promise(function(P,X){j.onload=P,j.onerror=X}),In(w,"link",p),c.instance=w}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(c,s),(s=c.state.preload)&&(c.state.loading&3)===0&&(i.count++,c=af.bind(i),s.addEventListener("load",c),s.addEventListener("error",c))}}var ig=0;function uM(i,s){return i.stylesheets&&i.count===0&&of(i,i.stylesheets),0<i.count||0<i.imgCount?function(c){var p=setTimeout(function(){if(i.stylesheets&&of(i,i.stylesheets),i.unsuspend){var w=i.unsuspend;i.unsuspend=null,w()}},6e4+s);0<i.imgBytes&&ig===0&&(ig=62500*HT());var x=setTimeout(function(){if(i.waitingForImages=!1,i.count===0&&(i.stylesheets&&of(i,i.stylesheets),i.unsuspend)){var w=i.unsuspend;i.unsuspend=null,w()}},(i.imgBytes>ig?50:800)+s);return i.unsuspend=c,function(){i.unsuspend=null,clearTimeout(p),clearTimeout(x)}}:null}function af(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)of(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var sf=null;function of(i,s){i.stylesheets=null,i.unsuspend!==null&&(i.count++,sf=new Map,s.forEach(dM,i),sf=null,af.call(i))}function dM(i,s){if(!(s.state.loading&4)){var c=sf.get(i);if(c)var p=c.get(null);else{c=new Map,sf.set(i,c);for(var x=i.querySelectorAll("link[data-precedence],style[data-precedence]"),w=0;w<x.length;w++){var j=x[w];(j.nodeName==="LINK"||j.getAttribute("media")!=="not all")&&(c.set(j.dataset.precedence,j),p=j)}p&&c.set(null,p)}x=s.instance,j=x.getAttribute("data-precedence"),w=c.get(j)||p,w===p&&c.set(null,x),c.set(j,x),this.count++,p=af.bind(this),x.addEventListener("load",p),x.addEventListener("error",p),w?w.parentNode.insertBefore(x,w.nextSibling):(i=i.nodeType===9?i.head:i,i.insertBefore(x,i.firstChild)),s.state.loading|=4}}var qc={$$typeof:N,Provider:null,Consumer:null,_currentValue:W,_currentValue2:W,_threadCount:0};function fM(i,s,c,p,x,w,j,P,X){this.tag=1,this.containerInfo=i,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=Dt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Dt(0),this.hiddenUpdates=Dt(null),this.identifierPrefix=p,this.onUncaughtError=x,this.onCaughtError=w,this.onRecoverableError=j,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=X,this.incompleteTransitions=new Map}function o1(i,s,c,p,x,w,j,P,X,ie,fe,me){return i=new fM(i,s,c,j,X,ie,fe,me,P),s=1,w===!0&&(s|=24),w=mr(3,null,null,s),i.current=w,w.stateNode=i,s=zp(),s.refCount++,i.pooledCache=s,s.refCount++,w.memoizedState={element:p,isDehydrated:c,cache:s},$p(w),i}function l1(i){return i?(i=Ao,i):Ao}function c1(i,s,c,p,x,w){x=l1(x),p.context===null?p.context=x:p.pendingContext=x,p=La(s),p.payload={element:c},w=w===void 0?null:w,w!==null&&(p.callback=w),c=Ia(i,p,s),c!==null&&(ar(c,i,s),wc(c,i,s))}function u1(i,s){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var c=i.retryLane;i.retryLane=c!==0&&c<s?c:s}}function ag(i,s){u1(i,s),(i=i.alternate)&&u1(i,s)}function d1(i){if(i.tag===13||i.tag===31){var s=As(i,67108864);s!==null&&ar(s,i,67108864),ag(i,67108864)}}function f1(i){if(i.tag===13||i.tag===31){var s=vr();s=zt(s);var c=As(i,s);c!==null&&ar(c,i,s),ag(i,s)}}var lf=!0;function hM(i,s,c,p){var x=z.T;z.T=null;var w=Y.p;try{Y.p=2,sg(i,s,c,p)}finally{Y.p=w,z.T=x}}function pM(i,s,c,p){var x=z.T;z.T=null;var w=Y.p;try{Y.p=8,sg(i,s,c,p)}finally{Y.p=w,z.T=x}}function sg(i,s,c,p){if(lf){var x=og(p);if(x===null)Gm(i,s,p,cf,c),p1(i,p);else if(gM(x,i,s,c,p))p.stopPropagation();else if(p1(i,p),s&4&&-1<mM.indexOf(i)){for(;x!==null;){var w=Xr(x);if(w!==null)switch(w.tag){case 3:if(w=w.stateNode,w.current.memoizedState.isDehydrated){var j=zn(w.pendingLanes);if(j!==0){var P=w;for(P.pendingLanes|=2,P.entangledLanes|=2;j;){var X=1<<31-vt(j);P.entanglements[1]|=X,j&=~X}wi(w),(wt&6)===0&&(Hd=xt()+500,zc(0))}}break;case 31:case 13:P=As(w,2),P!==null&&ar(P,w,2),Gd(),ag(w,2)}if(w=og(p),w===null&&Gm(i,s,p,cf,c),w===x)break;x=w}x!==null&&p.stopPropagation()}else Gm(i,s,p,null,c)}}function og(i){return i=Qe(i),lg(i)}var cf=null;function lg(i){if(cf=null,i=Dn(i),i!==null){var s=o(i);if(s===null)i=null;else{var c=s.tag;if(c===13){if(i=l(s),i!==null)return i;i=null}else if(c===31){if(i=u(s),i!==null)return i;i=null}else if(c===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;i=null}else s!==i&&(i=null)}}return cf=i,null}function h1(i){switch(i){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(kn()){case le:return 2;case ve:return 8;case ze:case Xe:return 32;case st:return 268435456;default:return 32}default:return 32}}var cg=!1,Va=null,Ya=null,Qa=null,Hc=new Map,Kc=new Map,Wa=[],mM="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 p1(i,s){switch(i){case"focusin":case"focusout":Va=null;break;case"dragenter":case"dragleave":Ya=null;break;case"mouseover":case"mouseout":Qa=null;break;case"pointerover":case"pointerout":Hc.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":Kc.delete(s.pointerId)}}function Gc(i,s,c,p,x,w){return i===null||i.nativeEvent!==w?(i={blockedOn:s,domEventName:c,eventSystemFlags:p,nativeEvent:w,targetContainers:[x]},s!==null&&(s=Xr(s),s!==null&&d1(s)),i):(i.eventSystemFlags|=p,s=i.targetContainers,x!==null&&s.indexOf(x)===-1&&s.push(x),i)}function gM(i,s,c,p,x){switch(s){case"focusin":return Va=Gc(Va,i,s,c,p,x),!0;case"dragenter":return Ya=Gc(Ya,i,s,c,p,x),!0;case"mouseover":return Qa=Gc(Qa,i,s,c,p,x),!0;case"pointerover":var w=x.pointerId;return Hc.set(w,Gc(Hc.get(w)||null,i,s,c,p,x)),!0;case"gotpointercapture":return w=x.pointerId,Kc.set(w,Gc(Kc.get(w)||null,i,s,c,p,x)),!0}return!1}function m1(i){var s=Dn(i.target);if(s!==null){var c=o(s);if(c!==null){if(s=c.tag,s===13){if(s=l(c),s!==null){i.blockedOn=s,wa(i.priority,function(){f1(c)});return}}else if(s===31){if(s=u(c),s!==null){i.blockedOn=s,wa(i.priority,function(){f1(c)});return}}else if(s===3&&c.stateNode.current.memoizedState.isDehydrated){i.blockedOn=c.tag===3?c.stateNode.containerInfo:null;return}}}i.blockedOn=null}function uf(i){if(i.blockedOn!==null)return!1;for(var s=i.targetContainers;0<s.length;){var c=og(i.nativeEvent);if(c===null){c=i.nativeEvent;var p=new c.constructor(c.type,c);Oe=p,c.target.dispatchEvent(p),Oe=null}else return s=Xr(c),s!==null&&d1(s),i.blockedOn=c,!1;s.shift()}return!0}function g1(i,s,c){uf(i)&&c.delete(s)}function yM(){cg=!1,Va!==null&&uf(Va)&&(Va=null),Ya!==null&&uf(Ya)&&(Ya=null),Qa!==null&&uf(Qa)&&(Qa=null),Hc.forEach(g1),Kc.forEach(g1)}function df(i,s){i.blockedOn===s&&(i.blockedOn=null,cg||(cg=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,yM)))}var ff=null;function y1(i){ff!==i&&(ff=i,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){ff===i&&(ff=null);for(var s=0;s<i.length;s+=3){var c=i[s],p=i[s+1],x=i[s+2];if(typeof p!="function"){if(lg(p||c)===null)continue;break}var w=Xr(c);w!==null&&(i.splice(s,3),s-=3,om(w,{pending:!0,data:x,method:c.method,action:p},p,x))}}))}function Jo(i){function s(X){return df(X,i)}Va!==null&&df(Va,i),Ya!==null&&df(Ya,i),Qa!==null&&df(Qa,i),Hc.forEach(s),Kc.forEach(s);for(var c=0;c<Wa.length;c++){var p=Wa[c];p.blockedOn===i&&(p.blockedOn=null)}for(;0<Wa.length&&(c=Wa[0],c.blockedOn===null);)m1(c),c.blockedOn===null&&Wa.shift();if(c=(i.ownerDocument||i).$$reactFormReplay,c!=null)for(p=0;p<c.length;p+=3){var x=c[p],w=c[p+1],j=x[Sn]||null;if(typeof w=="function")j||y1(c);else if(j){var P=null;if(w&&w.hasAttribute("formAction")){if(x=w,j=w[Sn]||null)P=j.formAction;else if(lg(x)!==null)continue}else P=j.action;typeof P=="function"?c[p+1]=P:(c.splice(p,3),p-=3),y1(c)}}}function b1(){function i(w){w.canIntercept&&w.info==="react-transition"&&w.intercept({handler:function(){return new Promise(function(j){return x=j})},focusReset:"manual",scroll:"manual"})}function s(){x!==null&&(x(),x=null),p||setTimeout(c,20)}function c(){if(!p&&!navigation.transition){var w=navigation.currentEntry;w&&w.url!=null&&navigation.navigate(w.url,{state:w.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var p=!1,x=null;return navigation.addEventListener("navigate",i),navigation.addEventListener("navigatesuccess",s),navigation.addEventListener("navigateerror",s),setTimeout(c,100),function(){p=!0,navigation.removeEventListener("navigate",i),navigation.removeEventListener("navigatesuccess",s),navigation.removeEventListener("navigateerror",s),x!==null&&(x(),x=null)}}}function ug(i){this._internalRoot=i}hf.prototype.render=ug.prototype.render=function(i){var s=this._internalRoot;if(s===null)throw Error(r(409));var c=s.current,p=vr();c1(c,p,i,s,null,null)},hf.prototype.unmount=ug.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var s=i.containerInfo;c1(i.current,2,null,i,null,null),Gd(),s[Wr]=null}};function hf(i){this._internalRoot=i}hf.prototype.unstable_scheduleHydration=function(i){if(i){var s=va();i={blockedOn:null,target:i,priority:s};for(var c=0;c<Wa.length&&s!==0&&s<Wa[c].priority;c++);Wa.splice(c,0,i),c===0&&m1(i)}};var x1=t.version;if(x1!=="19.2.5")throw Error(r(527,x1,"19.2.5"));Y.findDOMNode=function(i){var s=i._reactInternals;if(s===void 0)throw typeof i.render=="function"?Error(r(188)):(i=Object.keys(i).join(","),Error(r(268,i)));return i=h(s),i=i!==null?g(i):null,i=i===null?null:i.stateNode,i};var bM={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:z,reconcilerVersion:"19.2.5"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var pf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!pf.isDisabled&&pf.supportsFiber)try{bn=pf.inject(bM),Ft=pf}catch{}}return Yc.createRoot=function(i,s){if(!a(i))throw Error(r(299));var c=!1,p="",x=_0,w=C0,j=j0;return s!=null&&(s.unstable_strictMode===!0&&(c=!0),s.identifierPrefix!==void 0&&(p=s.identifierPrefix),s.onUncaughtError!==void 0&&(x=s.onUncaughtError),s.onCaughtError!==void 0&&(w=s.onCaughtError),s.onRecoverableError!==void 0&&(j=s.onRecoverableError)),s=o1(i,1,!1,null,null,c,p,null,x,w,j,b1),i[Wr]=s.current,Km(i),new ug(s)},Yc.hydrateRoot=function(i,s,c){if(!a(i))throw Error(r(299));var p=!1,x="",w=_0,j=C0,P=j0,X=null;return c!=null&&(c.unstable_strictMode===!0&&(p=!0),c.identifierPrefix!==void 0&&(x=c.identifierPrefix),c.onUncaughtError!==void 0&&(w=c.onUncaughtError),c.onCaughtError!==void 0&&(j=c.onCaughtError),c.onRecoverableError!==void 0&&(P=c.onRecoverableError),c.formState!==void 0&&(X=c.formState)),s=o1(i,1,!0,s,c??null,p,x,X,w,j,P,b1),s.context=l1(null),c=s.current,p=vr(),p=zt(p),x=La(p),x.callback=null,Ia(c,x,p),c=p,s.current.lanes=c,Et(s,c),wi(s),i[Wr]=s.current,Km(i),new hf(s)},Yc.version="19.2.5",Yc}var M1;function TM(){if(M1)return pg.exports;M1=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),pg.exports=AM(),pg.exports}var MM=TM(),ql=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Qs,as,wl,TS,DM=(TS=class extends ql{constructor(){super();Be(this,Qs);Be(this,as);Be(this,wl);_e(this,wl,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){Z(this,as)||this.setEventListener(Z(this,wl))}onUnsubscribe(){var t;this.hasListeners()||((t=Z(this,as))==null||t.call(this),_e(this,as,void 0))}setEventListener(t){var n;_e(this,wl,t),(n=Z(this,as))==null||n.call(this),_e(this,as,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){Z(this,Qs)!==t&&(_e(this,Qs,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof Z(this,Qs)=="boolean"?Z(this,Qs):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Qs=new WeakMap,as=new WeakMap,wl=new WeakMap,TS),mb=new DM,OM={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},ss,pb,MS,RM=(MS=class{constructor(){Be(this,ss,OM);Be(this,pb,!1)}setTimeoutProvider(e){_e(this,ss,e)}setTimeout(e,t){return Z(this,ss).setTimeout(e,t)}clearTimeout(e){Z(this,ss).clearTimeout(e)}setInterval(e,t){return Z(this,ss).setInterval(e,t)}clearInterval(e){Z(this,ss).clearInterval(e)}},ss=new WeakMap,pb=new WeakMap,MS),Hs=new RM;function LM(e){setTimeout(e,0)}var IM=typeof window>"u"||"Deno"in globalThis;function Wn(){}function zM(e,t){return typeof e=="function"?e(t):e}function my(e){return typeof e=="number"&&e>=0&&e!==1/0}function FS(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ps(e,t){return typeof e=="function"?e(t):e}function Fr(e,t){return typeof e=="function"?e(t):e}function D1(e,t){const{type:n="all",exact:r,fetchStatus:a,predicate:o,queryKey:l,stale:u}=e;if(l){if(r){if(t.queryHash!==gb(l,t.options))return!1}else if(!pu(t.queryKey,l))return!1}if(n!=="all"){const f=t.isActive();if(n==="active"&&!f||n==="inactive"&&f)return!1}return!(typeof u=="boolean"&&t.isStale()!==u||a&&a!==t.state.fetchStatus||o&&!o(t))}function O1(e,t){const{exact:n,status:r,predicate:a,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(so(t.options.mutationKey)!==so(o))return!1}else if(!pu(t.options.mutationKey,o))return!1}return!(r&&t.state.status!==r||a&&!a(t))}function gb(e,t){return((t==null?void 0:t.queryKeyHashFn)||so)(e)}function so(e){return JSON.stringify(e,(t,n)=>gy(n)?Object.keys(n).sort().reduce((r,a)=>(r[a]=n[a],r),{}):n)}function pu(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>pu(e[n],t[n])):!1}var PM=Object.prototype.hasOwnProperty;function qS(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=R1(e)&&R1(t);if(!r&&!(gy(e)&&gy(t)))return t;const o=(r?e:Object.keys(e)).length,l=r?t:Object.keys(t),u=l.length,f=r?new Array(u):{};let h=0;for(let g=0;g<u;g++){const m=r?g:l[g],y=e[m],b=t[m];if(y===b){f[m]=y,(r?g<o:PM.call(e,m))&&h++;continue}if(y===null||b===null||typeof y!="object"||typeof b!="object"){f[m]=b;continue}const k=qS(y,b,n+1);f[m]=k,k===y&&h++}return o===u&&h===o?e:f}function nh(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function R1(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function gy(e){if(!L1(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!L1(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function L1(e){return Object.prototype.toString.call(e)==="[object Object]"}function BM(e){return new Promise(t=>{Hs.setTimeout(t,e)})}function yy(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?qS(e,t):t}function UM(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function $M(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var yb=Symbol();function HS(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===yb?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function bb(e,t){return typeof e=="function"?e(...t):!!e}function FM(e,t,n){let r=!1,a;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(a??(a=t()),r||(r=!0,a.aborted?n():a.addEventListener("abort",n,{once:!0})),a)}),e}var mu=(()=>{let e=()=>IM;return{isServer(){return e()},setIsServer(t){e=t}}})();function by(){let e,t;const n=new Promise((a,o)=>{e=a,t=o});n.status="pending",n.catch(()=>{});function r(a){Object.assign(n,a),delete n.resolve,delete n.reject}return n.resolve=a=>{r({status:"fulfilled",value:a}),e(a)},n.reject=a=>{r({status:"rejected",reason:a}),t(a)},n}var qM=LM;function HM(){let e=[],t=0,n=u=>{u()},r=u=>{u()},a=qM;const o=u=>{t?e.push(u):a(()=>{n(u)})},l=()=>{const u=e;e=[],u.length&&a(()=>{r(()=>{u.forEach(f=>{n(f)})})})};return{batch:u=>{let f;t++;try{f=u()}finally{t--,t||l()}return f},batchCalls:u=>(...f)=>{o(()=>{u(...f)})},schedule:o,setNotifyFunction:u=>{n=u},setBatchNotifyFunction:u=>{r=u},setScheduler:u=>{a=u}}}var wn=HM(),kl,os,El,DS,KM=(DS=class extends ql{constructor(){super();Be(this,kl,!0);Be(this,os);Be(this,El);_e(this,El,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){Z(this,os)||this.setEventListener(Z(this,El))}onUnsubscribe(){var t;this.hasListeners()||((t=Z(this,os))==null||t.call(this),_e(this,os,void 0))}setEventListener(t){var n;_e(this,El,t),(n=Z(this,os))==null||n.call(this),_e(this,os,t(this.setOnline.bind(this)))}setOnline(t){Z(this,kl)!==t&&(_e(this,kl,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return Z(this,kl)}},kl=new WeakMap,os=new WeakMap,El=new WeakMap,DS),rh=new KM;function GM(e){return Math.min(1e3*2**e,3e4)}function KS(e){return(e??"online")==="online"?rh.isOnline():!0}var xy=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function GS(e){let t=!1,n=0,r;const a=by(),o=()=>a.status!=="pending",l=v=>{var S;if(!o()){const E=new xy(v);y(E),(S=e.onCancel)==null||S.call(e,E)}},u=()=>{t=!0},f=()=>{t=!1},h=()=>mb.isFocused()&&(e.networkMode==="always"||rh.isOnline())&&e.canRun(),g=()=>KS(e.networkMode)&&e.canRun(),m=v=>{o()||(r==null||r(),a.resolve(v))},y=v=>{o()||(r==null||r(),a.reject(v))},b=()=>new Promise(v=>{var S;r=E=>{(o()||h())&&v(E)},(S=e.onPause)==null||S.call(e)}).then(()=>{var v;r=void 0,o()||(v=e.onContinue)==null||v.call(e)}),k=()=>{if(o())return;let v;const S=n===0?e.initialPromise:void 0;try{v=S??e.fn()}catch(E){v=Promise.reject(E)}Promise.resolve(v).then(m).catch(E=>{var T;if(o())return;const C=e.retry??(mu.isServer()?0:3),N=e.retryDelay??GM,_=typeof N=="function"?N(n,E):N,D=C===!0||typeof C=="number"&&n<C||typeof C=="function"&&C(n,E);if(t||!D){y(E);return}n++,(T=e.onFail)==null||T.call(e,n,E),BM(_).then(()=>h()?void 0:b()).then(()=>{t?y(E):k()})})};return{promise:a,status:()=>a.status,cancel:l,continue:()=>(r==null||r(),a),cancelRetry:u,continueRetry:f,canStart:g,start:()=>(g()?k():b().then(k),a)}}var Ws,OS,VS=(OS=class{constructor(){Be(this,Ws)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),my(this.gcTime)&&_e(this,Ws,Hs.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(mu.isServer()?1/0:300*1e3))}clearGcTimeout(){Z(this,Ws)!==void 0&&(Hs.clearTimeout(Z(this,Ws)),_e(this,Ws,void 0))}},Ws=new WeakMap,OS),Xs,Sl,$r,Zs,Cn,Ru,Js,kr,YS,na,RS,VM=(RS=class extends VS{constructor(t){super();Be(this,kr);Be(this,Xs);Be(this,Sl);Be(this,$r);Be(this,Zs);Be(this,Cn);Be(this,Ru);Be(this,Js);_e(this,Js,!1),_e(this,Ru,t.defaultOptions),this.setOptions(t.options),this.observers=[],_e(this,Zs,t.client),_e(this,$r,Z(this,Zs).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,_e(this,Xs,z1(this.options)),this.state=t.state??Z(this,Xs),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=Z(this,Cn))==null?void 0:t.promise}setOptions(t){if(this.options={...Z(this,Ru),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=z1(this.options);n.data!==void 0&&(this.setState(I1(n.data,n.dataUpdatedAt)),_e(this,Xs,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&Z(this,$r).remove(this)}setData(t,n){const r=yy(this.state.data,t,this.options);return Je(this,kr,na).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){Je(this,kr,na).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,a;const n=(r=Z(this,Cn))==null?void 0:r.promise;return(a=Z(this,Cn))==null||a.cancel(t),n?n.then(Wn).catch(Wn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return Z(this,Xs)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>Fr(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===yb||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>ps(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!FS(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=Z(this,Cn))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=Z(this,Cn))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),Z(this,$r).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(Z(this,Cn)&&(Z(this,Js)||Je(this,kr,YS).call(this)?Z(this,Cn).cancel({revert:!0}):Z(this,Cn).cancelRetry()),this.scheduleGc()),Z(this,$r).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Je(this,kr,na).call(this,{type:"invalidate"})}async fetch(t,n){var f,h,g,m,y,b,k,v,S,E,C,N;if(this.state.fetchStatus!=="idle"&&((f=Z(this,Cn))==null?void 0:f.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(Z(this,Cn))return Z(this,Cn).continueRetry(),Z(this,Cn).promise}if(t&&this.setOptions(t),!this.options.queryFn){const _=this.observers.find(D=>D.options.queryFn);_&&this.setOptions(_.options)}const r=new AbortController,a=_=>{Object.defineProperty(_,"signal",{enumerable:!0,get:()=>(_e(this,Js,!0),r.signal)})},o=()=>{const _=HS(this.options,n),T=(()=>{const M={client:Z(this,Zs),queryKey:this.queryKey,meta:this.meta};return a(M),M})();return _e(this,Js,!1),this.options.persister?this.options.persister(_,T,this):_(T)},u=(()=>{const _={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:Z(this,Zs),state:this.state,fetchFn:o};return a(_),_})();(h=this.options.behavior)==null||h.onFetch(u,this),_e(this,Sl,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((g=u.fetchOptions)==null?void 0:g.meta))&&Je(this,kr,na).call(this,{type:"fetch",meta:(m=u.fetchOptions)==null?void 0:m.meta}),_e(this,Cn,GS({initialPromise:n==null?void 0:n.initialPromise,fn:u.fetchFn,onCancel:_=>{_ instanceof xy&&_.revert&&this.setState({...Z(this,Sl),fetchStatus:"idle"}),r.abort()},onFail:(_,D)=>{Je(this,kr,na).call(this,{type:"failed",failureCount:_,error:D})},onPause:()=>{Je(this,kr,na).call(this,{type:"pause"})},onContinue:()=>{Je(this,kr,na).call(this,{type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode,canRun:()=>!0}));try{const _=await Z(this,Cn).start();if(_===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(_),(b=(y=Z(this,$r).config).onSuccess)==null||b.call(y,_,this),(v=(k=Z(this,$r).config).onSettled)==null||v.call(k,_,this.state.error,this),_}catch(_){if(_ instanceof xy){if(_.silent)return Z(this,Cn).promise;if(_.revert){if(this.state.data===void 0)throw _;return this.state.data}}throw Je(this,kr,na).call(this,{type:"error",error:_}),(E=(S=Z(this,$r).config).onError)==null||E.call(S,_,this),(N=(C=Z(this,$r).config).onSettled)==null||N.call(C,this.state.data,_,this),_}finally{this.scheduleGc()}}},Xs=new WeakMap,Sl=new WeakMap,$r=new WeakMap,Zs=new WeakMap,Cn=new WeakMap,Ru=new WeakMap,Js=new WeakMap,kr=new WeakSet,YS=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},na=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...QS(r.data,this.options),fetchMeta:t.meta??null};case"success":const a={...r,...I1(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return _e(this,Sl,t.manual?a:void 0),a;case"error":const o=t.error;return{...r,error:o,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),wn.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),Z(this,$r).notify({query:this,type:"updated",action:t})})},RS);function QS(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:KS(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function I1(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function z1(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var or,ft,Lu,Yn,eo,Nl,ra,ls,Iu,_l,Cl,to,no,cs,jl,kt,iu,vy,wy,ky,Ey,Sy,Ny,_y,WS,LS,YM=(LS=class extends ql{constructor(t,n){super();Be(this,kt);Be(this,or);Be(this,ft);Be(this,Lu);Be(this,Yn);Be(this,eo);Be(this,Nl);Be(this,ra);Be(this,ls);Be(this,Iu);Be(this,_l);Be(this,Cl);Be(this,to);Be(this,no);Be(this,cs);Be(this,jl,new Set);this.options=n,_e(this,or,t),_e(this,ls,null),_e(this,ra,by()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(Z(this,ft).addObserver(this),P1(Z(this,ft),this.options)?Je(this,kt,iu).call(this):this.updateResult(),Je(this,kt,Ey).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Cy(Z(this,ft),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Cy(Z(this,ft),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Je(this,kt,Sy).call(this),Je(this,kt,Ny).call(this),Z(this,ft).removeObserver(this)}setOptions(t){const n=this.options,r=Z(this,ft);if(this.options=Z(this,or).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Fr(this.options.enabled,Z(this,ft))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Je(this,kt,_y).call(this),Z(this,ft).setOptions(this.options),n._defaulted&&!nh(this.options,n)&&Z(this,or).getQueryCache().notify({type:"observerOptionsUpdated",query:Z(this,ft),observer:this});const a=this.hasListeners();a&&B1(Z(this,ft),r,this.options,n)&&Je(this,kt,iu).call(this),this.updateResult(),a&&(Z(this,ft)!==r||Fr(this.options.enabled,Z(this,ft))!==Fr(n.enabled,Z(this,ft))||ps(this.options.staleTime,Z(this,ft))!==ps(n.staleTime,Z(this,ft)))&&Je(this,kt,vy).call(this);const o=Je(this,kt,wy).call(this);a&&(Z(this,ft)!==r||Fr(this.options.enabled,Z(this,ft))!==Fr(n.enabled,Z(this,ft))||o!==Z(this,cs))&&Je(this,kt,ky).call(this,o)}getOptimisticResult(t){const n=Z(this,or).getQueryCache().build(Z(this,or),t),r=this.createResult(n,t);return WM(this,r)&&(_e(this,Yn,r),_e(this,Nl,this.options),_e(this,eo,Z(this,ft).state)),r}getCurrentResult(){return Z(this,Yn)}trackResult(t,n){return new Proxy(t,{get:(r,a)=>(this.trackProp(a),n==null||n(a),a==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&Z(this,ra).status==="pending"&&Z(this,ra).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,a))})}trackProp(t){Z(this,jl).add(t)}getCurrentQuery(){return Z(this,ft)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=Z(this,or).defaultQueryOptions(t),r=Z(this,or).getQueryCache().build(Z(this,or),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return Je(this,kt,iu).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),Z(this,Yn)))}createResult(t,n){var F;const r=Z(this,ft),a=this.options,o=Z(this,Yn),l=Z(this,eo),u=Z(this,Nl),h=t!==r?t.state:Z(this,Lu),{state:g}=t;let m={...g},y=!1,b;if(n._optimisticResults){const $=this.hasListeners(),U=!$&&P1(t,n),K=$&&B1(t,r,n,a);(U||K)&&(m={...m,...QS(g.data,t.options)}),n._optimisticResults==="isRestoring"&&(m.fetchStatus="idle")}let{error:k,errorUpdatedAt:v,status:S}=m;b=m.data;let E=!1;if(n.placeholderData!==void 0&&b===void 0&&S==="pending"){let $;o!=null&&o.isPlaceholderData&&n.placeholderData===(u==null?void 0:u.placeholderData)?($=o.data,E=!0):$=typeof n.placeholderData=="function"?n.placeholderData((F=Z(this,Cl))==null?void 0:F.state.data,Z(this,Cl)):n.placeholderData,$!==void 0&&(S="success",b=yy(o==null?void 0:o.data,$,n),y=!0)}if(n.select&&b!==void 0&&!E)if(o&&b===(l==null?void 0:l.data)&&n.select===Z(this,Iu))b=Z(this,_l);else try{_e(this,Iu,n.select),b=n.select(b),b=yy(o==null?void 0:o.data,b,n),_e(this,_l,b),_e(this,ls,null)}catch($){_e(this,ls,$)}Z(this,ls)&&(k=Z(this,ls),b=Z(this,_l),v=Date.now(),S="error");const C=m.fetchStatus==="fetching",N=S==="pending",_=S==="error",D=N&&C,T=b!==void 0,I={status:S,fetchStatus:m.fetchStatus,isPending:N,isSuccess:S==="success",isError:_,isInitialLoading:D,isLoading:D,data:b,dataUpdatedAt:m.dataUpdatedAt,error:k,errorUpdatedAt:v,failureCount:m.fetchFailureCount,failureReason:m.fetchFailureReason,errorUpdateCount:m.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:m.dataUpdateCount>h.dataUpdateCount||m.errorUpdateCount>h.errorUpdateCount,isFetching:C,isRefetching:C&&!N,isLoadingError:_&&!T,isPaused:m.fetchStatus==="paused",isPlaceholderData:y,isRefetchError:_&&T,isStale:xb(t,n),refetch:this.refetch,promise:Z(this,ra),isEnabled:Fr(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const $=I.data!==void 0,U=I.status==="error"&&!$,K=H=>{U?H.reject(I.error):$&&H.resolve(I.data)},Q=()=>{const H=_e(this,ra,I.promise=by());K(H)},B=Z(this,ra);switch(B.status){case"pending":t.queryHash===r.queryHash&&K(B);break;case"fulfilled":(U||I.data!==B.value)&&Q();break;case"rejected":(!U||I.error!==B.reason)&&Q();break}}return I}updateResult(){const t=Z(this,Yn),n=this.createResult(Z(this,ft),this.options);if(_e(this,eo,Z(this,ft).state),_e(this,Nl,this.options),Z(this,eo).data!==void 0&&_e(this,Cl,Z(this,ft)),nh(n,t))return;_e(this,Yn,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:a}=this.options,o=typeof a=="function"?a():a;if(o==="all"||!o&&!Z(this,jl).size)return!0;const l=new Set(o??Z(this,jl));return this.options.throwOnError&&l.add("error"),Object.keys(Z(this,Yn)).some(u=>{const f=u;return Z(this,Yn)[f]!==t[f]&&l.has(f)})};Je(this,kt,WS).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Je(this,kt,Ey).call(this)}},or=new WeakMap,ft=new WeakMap,Lu=new WeakMap,Yn=new WeakMap,eo=new WeakMap,Nl=new WeakMap,ra=new WeakMap,ls=new WeakMap,Iu=new WeakMap,_l=new WeakMap,Cl=new WeakMap,to=new WeakMap,no=new WeakMap,cs=new WeakMap,jl=new WeakMap,kt=new WeakSet,iu=function(t){Je(this,kt,_y).call(this);let n=Z(this,ft).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Wn)),n},vy=function(){Je(this,kt,Sy).call(this);const t=ps(this.options.staleTime,Z(this,ft));if(mu.isServer()||Z(this,Yn).isStale||!my(t))return;const r=FS(Z(this,Yn).dataUpdatedAt,t)+1;_e(this,to,Hs.setTimeout(()=>{Z(this,Yn).isStale||this.updateResult()},r))},wy=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(Z(this,ft)):this.options.refetchInterval)??!1},ky=function(t){Je(this,kt,Ny).call(this),_e(this,cs,t),!(mu.isServer()||Fr(this.options.enabled,Z(this,ft))===!1||!my(Z(this,cs))||Z(this,cs)===0)&&_e(this,no,Hs.setInterval(()=>{(this.options.refetchIntervalInBackground||mb.isFocused())&&Je(this,kt,iu).call(this)},Z(this,cs)))},Ey=function(){Je(this,kt,vy).call(this),Je(this,kt,ky).call(this,Je(this,kt,wy).call(this))},Sy=function(){Z(this,to)!==void 0&&(Hs.clearTimeout(Z(this,to)),_e(this,to,void 0))},Ny=function(){Z(this,no)!==void 0&&(Hs.clearInterval(Z(this,no)),_e(this,no,void 0))},_y=function(){const t=Z(this,or).getQueryCache().build(Z(this,or),this.options);if(t===Z(this,ft))return;const n=Z(this,ft);_e(this,ft,t),_e(this,Lu,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},WS=function(t){wn.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(Z(this,Yn))}),Z(this,or).getQueryCache().notify({query:Z(this,ft),type:"observerResultsUpdated"})})},LS);function QM(e,t){return Fr(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function P1(e,t){return QM(e,t)||e.state.data!==void 0&&Cy(e,t,t.refetchOnMount)}function Cy(e,t,n){if(Fr(t.enabled,e)!==!1&&ps(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&xb(e,t)}return!1}function B1(e,t,n,r){return(e!==t||Fr(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&xb(e,n)}function xb(e,t){return Fr(t.enabled,e)!==!1&&e.isStaleByTime(ps(t.staleTime,e))}function WM(e,t){return!nh(e.getCurrentResult(),t)}function U1(e){return{onFetch:(t,n)=>{var g,m,y,b,k;const r=t.options,a=(y=(m=(g=t.fetchOptions)==null?void 0:g.meta)==null?void 0:m.fetchMore)==null?void 0:y.direction,o=((b=t.state.data)==null?void 0:b.pages)||[],l=((k=t.state.data)==null?void 0:k.pageParams)||[];let u={pages:[],pageParams:[]},f=0;const h=async()=>{let v=!1;const S=N=>{FM(N,()=>t.signal,()=>v=!0)},E=HS(t.options,t.fetchOptions),C=async(N,_,D)=>{if(v)return Promise.reject();if(_==null&&N.pages.length)return Promise.resolve(N);const M=(()=>{const U={client:t.client,queryKey:t.queryKey,pageParam:_,direction:D?"backward":"forward",meta:t.options.meta};return S(U),U})(),I=await E(M),{maxPages:F}=t.options,$=D?$M:UM;return{pages:$(N.pages,I,F),pageParams:$(N.pageParams,_,F)}};if(a&&o.length){const N=a==="backward",_=N?XM:$1,D={pages:o,pageParams:l},T=_(r,D);u=await C(D,T,N)}else{const N=e??o.length;do{const _=f===0?l[0]??r.initialPageParam:$1(r,u);if(f>0&&_==null)break;u=await C(u,_),f++}while(f<N)}return u};t.options.persister?t.fetchFn=()=>{var v,S;return(S=(v=t.options).persister)==null?void 0:S.call(v,h,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=h}}}function $1(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function XM(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var zu,Si,$n,ro,Ni,ns,IS,ZM=(IS=class extends VS{constructor(t){super();Be(this,Ni);Be(this,zu);Be(this,Si);Be(this,$n);Be(this,ro);_e(this,zu,t.client),this.mutationId=t.mutationId,_e(this,$n,t.mutationCache),_e(this,Si,[]),this.state=t.state||XS(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){Z(this,Si).includes(t)||(Z(this,Si).push(t),this.clearGcTimeout(),Z(this,$n).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){_e(this,Si,Z(this,Si).filter(n=>n!==t)),this.scheduleGc(),Z(this,$n).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){Z(this,Si).length||(this.state.status==="pending"?this.scheduleGc():Z(this,$n).remove(this))}continue(){var t;return((t=Z(this,ro))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var l,u,f,h,g,m,y,b,k,v,S,E,C,N,_,D,T,M;const n=()=>{Je(this,Ni,ns).call(this,{type:"continue"})},r={client:Z(this,zu),meta:this.options.meta,mutationKey:this.options.mutationKey};_e(this,ro,GS({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(I,F)=>{Je(this,Ni,ns).call(this,{type:"failed",failureCount:I,error:F})},onPause:()=>{Je(this,Ni,ns).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>Z(this,$n).canRun(this)}));const a=this.state.status==="pending",o=!Z(this,ro).canStart();try{if(a)n();else{Je(this,Ni,ns).call(this,{type:"pending",variables:t,isPaused:o}),Z(this,$n).config.onMutate&&await Z(this,$n).config.onMutate(t,this,r);const F=await((u=(l=this.options).onMutate)==null?void 0:u.call(l,t,r));F!==this.state.context&&Je(this,Ni,ns).call(this,{type:"pending",context:F,variables:t,isPaused:o})}const I=await Z(this,ro).start();return await((h=(f=Z(this,$n).config).onSuccess)==null?void 0:h.call(f,I,t,this.state.context,this,r)),await((m=(g=this.options).onSuccess)==null?void 0:m.call(g,I,t,this.state.context,r)),await((b=(y=Z(this,$n).config).onSettled)==null?void 0:b.call(y,I,null,this.state.variables,this.state.context,this,r)),await((v=(k=this.options).onSettled)==null?void 0:v.call(k,I,null,t,this.state.context,r)),Je(this,Ni,ns).call(this,{type:"success",data:I}),I}catch(I){try{await((E=(S=Z(this,$n).config).onError)==null?void 0:E.call(S,I,t,this.state.context,this,r))}catch(F){Promise.reject(F)}try{await((N=(C=this.options).onError)==null?void 0:N.call(C,I,t,this.state.context,r))}catch(F){Promise.reject(F)}try{await((D=(_=Z(this,$n).config).onSettled)==null?void 0:D.call(_,void 0,I,this.state.variables,this.state.context,this,r))}catch(F){Promise.reject(F)}try{await((M=(T=this.options).onSettled)==null?void 0:M.call(T,void 0,I,t,this.state.context,r))}catch(F){Promise.reject(F)}throw Je(this,Ni,ns).call(this,{type:"error",error:I}),I}finally{Z(this,$n).runNext(this)}}},zu=new WeakMap,Si=new WeakMap,$n=new WeakMap,ro=new WeakMap,Ni=new WeakSet,ns=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),wn.batch(()=>{Z(this,Si).forEach(r=>{r.onMutationUpdate(t)}),Z(this,$n).notify({mutation:this,type:"updated",action:t})})},IS);function XS(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ia,ai,Pu,zS,JM=(zS=class extends ql{constructor(t={}){super();Be(this,ia);Be(this,ai);Be(this,Pu);this.config=t,_e(this,ia,new Set),_e(this,ai,new Map),_e(this,Pu,0)}build(t,n,r){const a=new ZM({client:t,mutationCache:this,mutationId:++mf(this,Pu)._,options:t.defaultMutationOptions(n),state:r});return this.add(a),a}add(t){Z(this,ia).add(t);const n=gf(t);if(typeof n=="string"){const r=Z(this,ai).get(n);r?r.push(t):Z(this,ai).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(Z(this,ia).delete(t)){const n=gf(t);if(typeof n=="string"){const r=Z(this,ai).get(n);if(r)if(r.length>1){const a=r.indexOf(t);a!==-1&&r.splice(a,1)}else r[0]===t&&Z(this,ai).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=gf(t);if(typeof n=="string"){const r=Z(this,ai).get(n),a=r==null?void 0:r.find(o=>o.state.status==="pending");return!a||a===t}else return!0}runNext(t){var r;const n=gf(t);if(typeof n=="string"){const a=(r=Z(this,ai).get(n))==null?void 0:r.find(o=>o!==t&&o.state.isPaused);return(a==null?void 0:a.continue())??Promise.resolve()}else return Promise.resolve()}clear(){wn.batch(()=>{Z(this,ia).forEach(t=>{this.notify({type:"removed",mutation:t})}),Z(this,ia).clear(),Z(this,ai).clear()})}getAll(){return Array.from(Z(this,ia))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>O1(n,r))}findAll(t={}){return this.getAll().filter(n=>O1(t,n))}notify(t){wn.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return wn.batch(()=>Promise.all(t.map(n=>n.continue().catch(Wn))))}},ia=new WeakMap,ai=new WeakMap,Pu=new WeakMap,zS);function gf(e){var t;return(t=e.options.scope)==null?void 0:t.id}var aa,us,lr,sa,da,qf,jy,PS,eD=(PS=class extends ql{constructor(n,r){super();Be(this,da);Be(this,aa);Be(this,us);Be(this,lr);Be(this,sa);_e(this,aa,n),this.setOptions(r),this.bindMethods(),Je(this,da,qf).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var a;const r=this.options;this.options=Z(this,aa).defaultMutationOptions(n),nh(this.options,r)||Z(this,aa).getMutationCache().notify({type:"observerOptionsUpdated",mutation:Z(this,lr),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&so(r.mutationKey)!==so(this.options.mutationKey)?this.reset():((a=Z(this,lr))==null?void 0:a.state.status)==="pending"&&Z(this,lr).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=Z(this,lr))==null||n.removeObserver(this)}onMutationUpdate(n){Je(this,da,qf).call(this),Je(this,da,jy).call(this,n)}getCurrentResult(){return Z(this,us)}reset(){var n;(n=Z(this,lr))==null||n.removeObserver(this),_e(this,lr,void 0),Je(this,da,qf).call(this),Je(this,da,jy).call(this)}mutate(n,r){var a;return _e(this,sa,r),(a=Z(this,lr))==null||a.removeObserver(this),_e(this,lr,Z(this,aa).getMutationCache().build(Z(this,aa),this.options)),Z(this,lr).addObserver(this),Z(this,lr).execute(n)}},aa=new WeakMap,us=new WeakMap,lr=new WeakMap,sa=new WeakMap,da=new WeakSet,qf=function(){var r;const n=((r=Z(this,lr))==null?void 0:r.state)??XS();_e(this,us,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},jy=function(n){wn.batch(()=>{var r,a,o,l,u,f,h,g;if(Z(this,sa)&&this.hasListeners()){const m=Z(this,us).variables,y=Z(this,us).context,b={client:Z(this,aa),meta:this.options.meta,mutationKey:this.options.mutationKey};if((n==null?void 0:n.type)==="success"){try{(a=(r=Z(this,sa)).onSuccess)==null||a.call(r,n.data,m,y,b)}catch(k){Promise.reject(k)}try{(l=(o=Z(this,sa)).onSettled)==null||l.call(o,n.data,null,m,y,b)}catch(k){Promise.reject(k)}}else if((n==null?void 0:n.type)==="error"){try{(f=(u=Z(this,sa)).onError)==null||f.call(u,n.error,m,y,b)}catch(k){Promise.reject(k)}try{(g=(h=Z(this,sa)).onSettled)==null||g.call(h,void 0,n.error,m,y,b)}catch(k){Promise.reject(k)}}}this.listeners.forEach(m=>{m(Z(this,us))})})},PS),_i,BS,tD=(BS=class extends ql{constructor(t={}){super();Be(this,_i);this.config=t,_e(this,_i,new Map)}build(t,n,r){const a=n.queryKey,o=n.queryHash??gb(a,n);let l=this.get(o);return l||(l=new VM({client:t,queryKey:a,queryHash:o,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(a)}),this.add(l)),l}add(t){Z(this,_i).has(t.queryHash)||(Z(this,_i).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=Z(this,_i).get(t.queryHash);n&&(t.destroy(),n===t&&Z(this,_i).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){wn.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return Z(this,_i).get(t)}getAll(){return[...Z(this,_i).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>D1(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>D1(t,r)):n}notify(t){wn.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){wn.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){wn.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},_i=new WeakMap,BS),rn,ds,fs,Al,Tl,hs,Ml,Dl,US,nD=(US=class{constructor(e={}){Be(this,rn);Be(this,ds);Be(this,fs);Be(this,Al);Be(this,Tl);Be(this,hs);Be(this,Ml);Be(this,Dl);_e(this,rn,e.queryCache||new tD),_e(this,ds,e.mutationCache||new JM),_e(this,fs,e.defaultOptions||{}),_e(this,Al,new Map),_e(this,Tl,new Map),_e(this,hs,0)}mount(){mf(this,hs)._++,Z(this,hs)===1&&(_e(this,Ml,mb.subscribe(async e=>{e&&(await this.resumePausedMutations(),Z(this,rn).onFocus())})),_e(this,Dl,rh.subscribe(async e=>{e&&(await this.resumePausedMutations(),Z(this,rn).onOnline())})))}unmount(){var e,t;mf(this,hs)._--,Z(this,hs)===0&&((e=Z(this,Ml))==null||e.call(this),_e(this,Ml,void 0),(t=Z(this,Dl))==null||t.call(this),_e(this,Dl,void 0))}isFetching(e){return Z(this,rn).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return Z(this,ds).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=Z(this,rn).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=Z(this,rn).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(ps(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return Z(this,rn).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),a=Z(this,rn).get(r.queryHash),o=a==null?void 0:a.state.data,l=zM(t,o);if(l!==void 0)return Z(this,rn).build(this,r).setData(l,{...n,manual:!0})}setQueriesData(e,t,n){return wn.batch(()=>Z(this,rn).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=Z(this,rn).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=Z(this,rn);wn.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=Z(this,rn);return wn.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=wn.batch(()=>Z(this,rn).findAll(e).map(a=>a.cancel(n)));return Promise.all(r).then(Wn).catch(Wn)}invalidateQueries(e,t={}){return wn.batch(()=>(Z(this,rn).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=wn.batch(()=>Z(this,rn).findAll(e).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let o=a.fetch(void 0,n);return n.throwOnError||(o=o.catch(Wn)),a.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(Wn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=Z(this,rn).build(this,t);return n.isStaleByTime(ps(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Wn).catch(Wn)}fetchInfiniteQuery(e){return e.behavior=U1(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Wn).catch(Wn)}ensureInfiniteQueryData(e){return e.behavior=U1(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return rh.isOnline()?Z(this,ds).resumePausedMutations():Promise.resolve()}getQueryCache(){return Z(this,rn)}getMutationCache(){return Z(this,ds)}getDefaultOptions(){return Z(this,fs)}setDefaultOptions(e){_e(this,fs,e)}setQueryDefaults(e,t){Z(this,Al).set(so(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...Z(this,Al).values()],n={};return t.forEach(r=>{pu(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){Z(this,Tl).set(so(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...Z(this,Tl).values()],n={};return t.forEach(r=>{pu(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...Z(this,fs).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=gb(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===yb&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...Z(this,fs).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){Z(this,rn).clear(),Z(this,ds).clear()}},rn=new WeakMap,ds=new WeakMap,fs=new WeakMap,Al=new WeakMap,Tl=new WeakMap,hs=new WeakMap,Ml=new WeakMap,Dl=new WeakMap,US),ZS=A.createContext(void 0),an=e=>{const t=A.useContext(ZS);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},rD=({client:e,children:t})=>(A.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),d.jsx(ZS.Provider,{value:e,children:t})),JS=A.createContext(!1),iD=()=>A.useContext(JS);JS.Provider;function aD(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var sD=A.createContext(aD()),oD=()=>A.useContext(sD),lD=(e,t,n)=>{const r=n!=null&&n.state.error&&typeof e.throwOnError=="function"?bb(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},cD=e=>{A.useEffect(()=>{e.clearReset()},[e])},uD=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:a})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(a&&e.data===void 0||bb(n,[e.error,r])),dD=e=>{if(e.suspense){const n=a=>a==="static"?a:Math.max(a??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...a)=>n(r(...a)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},fD=(e,t)=>e.isLoading&&e.isFetching&&!t,hD=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,F1=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function pD(e,t,n){var y,b,k,v;const r=iD(),a=oD(),o=an(),l=o.defaultQueryOptions(e);(b=(y=o.getDefaultOptions().queries)==null?void 0:y._experimental_beforeQuery)==null||b.call(y,l);const u=o.getQueryCache().get(l.queryHash);l._optimisticResults=r?"isRestoring":"optimistic",dD(l),lD(l,a,u),cD(a);const f=!o.getQueryCache().get(l.queryHash),[h]=A.useState(()=>new t(o,l)),g=h.getOptimisticResult(l),m=!r&&e.subscribed!==!1;if(A.useSyncExternalStore(A.useCallback(S=>{const E=m?h.subscribe(wn.batchCalls(S)):Wn;return h.updateResult(),E},[h,m]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),A.useEffect(()=>{h.setOptions(l)},[l,h]),hD(l,g))throw F1(l,h,a);if(uD({result:g,errorResetBoundary:a,throwOnError:l.throwOnError,query:u,suspense:l.suspense}))throw g.error;if((v=(k=o.getDefaultOptions().queries)==null?void 0:k._experimental_afterQuery)==null||v.call(k,l,g),l.experimental_prefetchInRender&&!mu.isServer()&&fD(g,r)){const S=f?F1(l,h,a):u==null?void 0:u.promise;S==null||S.catch(Wn).finally(()=>{h.updateResult()})}return l.notifyOnChangeProps?g:h.trackResult(g)}function Ge(e,t){return pD(e,YM)}function Rt(e,t){const n=an(),[r]=A.useState(()=>new eD(n,e));A.useEffect(()=>{r.setOptions(e)},[r,e]);const a=A.useSyncExternalStore(A.useCallback(l=>r.subscribe(wn.batchCalls(l)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),o=A.useCallback((l,u)=>{r.mutate(l,u).catch(Wn)},[r]);if(a.error&&bb(r.options.throwOnError,[a.error]))throw a.error;return{...a,mutate:o,mutateAsync:a.mutate}}/**
|
|
50
|
+
* react-router v7.14.2
|
|
51
|
+
*
|
|
52
|
+
* Copyright (c) Remix Software Inc.
|
|
53
|
+
*
|
|
54
|
+
* This source code is licensed under the MIT license found in the
|
|
55
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
56
|
+
*
|
|
57
|
+
* @license MIT
|
|
58
|
+
*/var q1="popstate";function H1(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function mD(e={}){function t(r,a){var h;let o=(h=a.state)==null?void 0:h.masked,{pathname:l,search:u,hash:f}=o||r.location;return Ay("",{pathname:l,search:u,hash:f},a.state&&a.state.usr||null,a.state&&a.state.key||"default",o?{pathname:r.location.pathname,search:r.location.search,hash:r.location.hash}:void 0)}function n(r,a){return typeof a=="string"?a:gu(a)}return yD(t,n,null,e)}function Ht(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Kr(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function gD(){return Math.random().toString(36).substring(2,10)}function K1(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function Ay(e,t,n=null,r,a){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Hl(t):t,state:n,key:t&&t.key||r||gD(),unstable_mask:a}}function gu({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Hl(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function yD(e,t,n,r={}){let{window:a=document.defaultView,v5Compat:o=!1}=r,l=a.history,u="POP",f=null,h=g();h==null&&(h=0,l.replaceState({...l.state,idx:h},""));function g(){return(l.state||{idx:null}).idx}function m(){u="POP";let S=g(),E=S==null?null:S-h;h=S,f&&f({action:u,location:v.location,delta:E})}function y(S,E){u="PUSH";let C=H1(S)?S:Ay(v.location,S,E);h=g()+1;let N=K1(C,h),_=v.createHref(C.unstable_mask||C);try{l.pushState(N,"",_)}catch(D){if(D instanceof DOMException&&D.name==="DataCloneError")throw D;a.location.assign(_)}o&&f&&f({action:u,location:v.location,delta:1})}function b(S,E){u="REPLACE";let C=H1(S)?S:Ay(v.location,S,E);h=g();let N=K1(C,h),_=v.createHref(C.unstable_mask||C);l.replaceState(N,"",_),o&&f&&f({action:u,location:v.location,delta:0})}function k(S){return bD(S)}let v={get action(){return u},get location(){return e(a,l)},listen(S){if(f)throw new Error("A history only accepts one active listener");return a.addEventListener(q1,m),f=S,()=>{a.removeEventListener(q1,m),f=null}},createHref(S){return t(a,S)},createURL:k,encodeLocation(S){let E=k(S);return{pathname:E.pathname,search:E.search,hash:E.hash}},push:y,replace:b,go(S){return l.go(S)}};return v}function bD(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),Ht(n,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:gu(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function eN(e,t,n="/"){return xD(e,t,n,!1)}function xD(e,t,n,r){let a=typeof t=="string"?Hl(t):t,o=fa(a.pathname||"/",n);if(o==null)return null;let l=tN(e);vD(l);let u=null;for(let f=0;u==null&&f<l.length;++f){let h=MD(o);u=AD(l[f],h,r)}return u}function tN(e,t=[],n=[],r="",a=!1){let o=(l,u,f=a,h)=>{let g={relativePath:h===void 0?l.path||"":h,caseSensitive:l.caseSensitive===!0,childrenIndex:u,route:l};if(g.relativePath.startsWith("/")){if(!g.relativePath.startsWith(r)&&f)return;Ht(g.relativePath.startsWith(r),`Absolute route path "${g.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),g.relativePath=g.relativePath.slice(r.length)}let m=ui([r,g.relativePath]),y=n.concat(g);l.children&&l.children.length>0&&(Ht(l.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${m}".`),tN(l.children,t,y,m,f)),!(l.path==null&&!l.index)&&t.push({path:m,score:CD(m,l.index),routesMeta:y})};return e.forEach((l,u)=>{var f;if(l.path===""||!((f=l.path)!=null&&f.includes("?")))o(l,u);else for(let h of nN(l.path))o(l,u,!0,h)}),t}function nN(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,a=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return a?[o,""]:[o];let l=nN(r.join("/")),u=[];return u.push(...l.map(f=>f===""?o:[o,f].join("/"))),a&&u.push(...l),u.map(f=>e.startsWith("/")&&f===""?"/":f)}function vD(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:jD(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var wD=/^:[\w-]+$/,kD=3,ED=2,SD=1,ND=10,_D=-2,G1=e=>e==="*";function CD(e,t){let n=e.split("/"),r=n.length;return n.some(G1)&&(r+=_D),t&&(r+=ED),n.filter(a=>!G1(a)).reduce((a,o)=>a+(wD.test(o)?kD:o===""?SD:ND),r)}function jD(e,t){return e.length===t.length&&e.slice(0,-1).every((r,a)=>r===t[a])?e[e.length-1]-t[t.length-1]:0}function AD(e,t,n=!1){let{routesMeta:r}=e,a={},o="/",l=[];for(let u=0;u<r.length;++u){let f=r[u],h=u===r.length-1,g=o==="/"?t:t.slice(o.length)||"/",m=ih({path:f.relativePath,caseSensitive:f.caseSensitive,end:h},g),y=f.route;if(!m&&h&&n&&!r[r.length-1].route.index&&(m=ih({path:f.relativePath,caseSensitive:f.caseSensitive,end:!1},g)),!m)return null;Object.assign(a,m.params),l.push({params:a,pathname:ui([o,m.pathname]),pathnameBase:LD(ui([o,m.pathnameBase])),route:y}),m.pathnameBase!=="/"&&(o=ui([o,m.pathnameBase]))}return l}function ih(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=TD(e.path,e.caseSensitive,e.end),a=t.match(n);if(!a)return null;let o=a[0],l=o.replace(/(.)\/+$/,"$1"),u=a.slice(1);return{params:r.reduce((h,{paramName:g,isOptional:m},y)=>{if(g==="*"){let k=u[y]||"";l=o.slice(0,o.length-k.length).replace(/(.)\/+$/,"$1")}const b=u[y];return m&&!b?h[g]=void 0:h[g]=(b||"").replace(/%2F/g,"/"),h},{}),pathname:o,pathnameBase:l,pattern:e}}function TD(e,t=!1,n=!0){Kr(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,u,f,h,g)=>{if(r.push({paramName:u,isOptional:f!=null}),f){let m=g.charAt(h+l.length);return m&&m!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),r]}function MD(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Kr(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function fa(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}var DD=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function OD(e,t="/"){let{pathname:n,search:r="",hash:a=""}=typeof e=="string"?Hl(e):e,o;return n?(n=rN(n),n.startsWith("/")?o=V1(n.substring(1),"/"):o=V1(n,t)):o=t,{pathname:o,search:ID(r),hash:zD(a)}}function V1(e,t){let n=ah(t).split("/");return e.split("/").forEach(a=>{a===".."?n.length>1&&n.pop():a!=="."&&n.push(a)}),n.length>1?n.join("/"):"/"}function bg(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function RD(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function vb(e){let t=RD(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function Th(e,t,n,r=!1){let a;typeof e=="string"?a=Hl(e):(a={...e},Ht(!a.pathname||!a.pathname.includes("?"),bg("?","pathname","search",a)),Ht(!a.pathname||!a.pathname.includes("#"),bg("#","pathname","hash",a)),Ht(!a.search||!a.search.includes("#"),bg("#","search","hash",a)));let o=e===""||a.pathname==="",l=o?"/":a.pathname,u;if(l==null)u=n;else{let m=t.length-1;if(!r&&l.startsWith("..")){let y=l.split("/");for(;y[0]==="..";)y.shift(),m-=1;a.pathname=y.join("/")}u=m>=0?t[m]:"/"}let f=OD(a,u),h=l&&l!=="/"&&l.endsWith("/"),g=(o||l===".")&&n.endsWith("/");return!f.pathname.endsWith("/")&&(h||g)&&(f.pathname+="/"),f}var rN=e=>e.replace(/\/\/+/g,"/"),ui=e=>rN(e.join("/")),ah=e=>e.replace(/\/+$/,""),LD=e=>ah(e).replace(/^\/*/,"/"),ID=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,zD=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,PD=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function BD(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function UD(e){let t=e.map(n=>n.route.path).filter(Boolean);return ui(t)||"/"}var iN=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function aN(e,t){let n=e;if(typeof n!="string"||!DD.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,a=!1;if(iN)try{let o=new URL(window.location.href),l=n.startsWith("//")?new URL(o.protocol+n):new URL(n),u=fa(l.pathname,t);l.origin===o.origin&&u!=null?n=u+l.search+l.hash:a=!0}catch{Kr(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:a,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var sN=["POST","PUT","PATCH","DELETE"];new Set(sN);var $D=["GET",...sN];new Set($D);var Kl=A.createContext(null);Kl.displayName="DataRouter";var Mh=A.createContext(null);Mh.displayName="DataRouterState";var oN=A.createContext(!1);function FD(){return A.useContext(oN)}var lN=A.createContext({isTransitioning:!1});lN.displayName="ViewTransition";var qD=A.createContext(new Map);qD.displayName="Fetchers";var HD=A.createContext(null);HD.displayName="Await";var Cr=A.createContext(null);Cr.displayName="Navigation";var $u=A.createContext(null);$u.displayName="Location";var Vr=A.createContext({outlet:null,matches:[],isDataRoute:!1});Vr.displayName="Route";var wb=A.createContext(null);wb.displayName="RouteError";var cN="REACT_ROUTER_ERROR",KD="REDIRECT",GD="ROUTE_ERROR_RESPONSE";function VD(e){if(e.startsWith(`${cN}:${KD}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function YD(e){if(e.startsWith(`${cN}:${GD}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new PD(t.status,t.statusText,t.data)}catch{}}function QD(e,{relative:t}={}){Ht(Gl(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=A.useContext(Cr),{hash:a,pathname:o,search:l}=Fu(e,{relative:t}),u=o;return n!=="/"&&(u=o==="/"?n:ui([n,o])),r.createHref({pathname:u,search:l,hash:a})}function Gl(){return A.useContext($u)!=null}function hi(){return Ht(Gl(),"useLocation() may be used only in the context of a <Router> component."),A.useContext($u).location}var uN="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function dN(e){A.useContext(Cr).static||A.useLayoutEffect(e)}function bs(){let{isDataRoute:e}=A.useContext(Vr);return e?uO():WD()}function WD(){Ht(Gl(),"useNavigate() may be used only in the context of a <Router> component.");let e=A.useContext(Kl),{basename:t,navigator:n}=A.useContext(Cr),{matches:r}=A.useContext(Vr),{pathname:a}=hi(),o=JSON.stringify(vb(r)),l=A.useRef(!1);return dN(()=>{l.current=!0}),A.useCallback((f,h={})=>{if(Kr(l.current,uN),!l.current)return;if(typeof f=="number"){n.go(f);return}let g=Th(f,JSON.parse(o),a,h.relative==="path");e==null&&t!=="/"&&(g.pathname=g.pathname==="/"?t:ui([t,g.pathname])),(h.replace?n.replace:n.push)(g,h.state,h)},[t,n,o,a,e])}var XD=A.createContext(null);function ZD(e){let t=A.useContext(Vr).outlet;return A.useMemo(()=>t&&A.createElement(XD.Provider,{value:e},t),[t,e])}function fN(){let{matches:e}=A.useContext(Vr),t=e[e.length-1];return(t==null?void 0:t.params)??{}}function Fu(e,{relative:t}={}){let{matches:n}=A.useContext(Vr),{pathname:r}=hi(),a=JSON.stringify(vb(n));return A.useMemo(()=>Th(e,JSON.parse(a),r,t==="path"),[e,a,r,t])}function JD(e,t){return hN(e,t)}function hN(e,t,n){var S;Ht(Gl(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:r}=A.useContext(Cr),{matches:a}=A.useContext(Vr),o=a[a.length-1],l=o?o.params:{},u=o?o.pathname:"/",f=o?o.pathnameBase:"/",h=o&&o.route;{let E=h&&h.path||"";mN(u,!h||E.endsWith("*")||E.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${u}" (under <Route path="${E}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
59
|
+
|
|
60
|
+
Please change the parent <Route path="${E}"> to <Route path="${E==="/"?"*":`${E}/*`}">.`)}let g=hi(),m;if(t){let E=typeof t=="string"?Hl(t):t;Ht(f==="/"||((S=E.pathname)==null?void 0:S.startsWith(f)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${f}" but pathname "${E.pathname}" was given in the \`location\` prop.`),m=E}else m=g;let y=m.pathname||"/",b=y;if(f!=="/"){let E=f.replace(/^\//,"").split("/");b="/"+y.replace(/^\//,"").split("/").slice(E.length).join("/")}let k=eN(e,{pathname:b});Kr(h||k!=null,`No routes matched location "${m.pathname}${m.search}${m.hash}" `),Kr(k==null||k[k.length-1].route.element!==void 0||k[k.length-1].route.Component!==void 0||k[k.length-1].route.lazy!==void 0,`Matched leaf route at location "${m.pathname}${m.search}${m.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let v=iO(k&&k.map(E=>Object.assign({},E,{params:Object.assign({},l,E.params),pathname:ui([f,r.encodeLocation?r.encodeLocation(E.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:E.pathname]),pathnameBase:E.pathnameBase==="/"?f:ui([f,r.encodeLocation?r.encodeLocation(E.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:E.pathnameBase])})),a,n);return t&&v?A.createElement($u.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...m},navigationType:"POP"}},v):v}function eO(){let e=cO(),t=BD(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:r},o={padding:"2px 4px",backgroundColor:r},l=null;return console.error("Error handled by React Router default ErrorBoundary:",e),l=A.createElement(A.Fragment,null,A.createElement("p",null,"💿 Hey developer 👋"),A.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",A.createElement("code",{style:o},"ErrorBoundary")," or"," ",A.createElement("code",{style:o},"errorElement")," prop on your route.")),A.createElement(A.Fragment,null,A.createElement("h2",null,"Unexpected Application Error!"),A.createElement("h3",{style:{fontStyle:"italic"}},t),n?A.createElement("pre",{style:a},n):null,l)}var tO=A.createElement(eO,null),pN=class extends A.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=YD(e.digest);n&&(e=n)}let t=e!==void 0?A.createElement(Vr.Provider,{value:this.props.routeContext},A.createElement(wb.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?A.createElement(nO,{error:e},t):t}};pN.contextType=oN;var xg=new WeakMap;function nO({children:e,error:t}){let{basename:n}=A.useContext(Cr);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let r=VD(t.digest);if(r){let a=xg.get(t);if(a)throw a;let o=aN(r.location,n);if(iN&&!xg.get(t))if(o.isExternal||r.reloadDocument)window.location.href=o.absoluteURL||o.to;else{const l=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:r.replace}));throw xg.set(t,l),l}return A.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o.absoluteURL||o.to}`})}}return e}function rO({routeContext:e,match:t,children:n}){let r=A.useContext(Kl);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),A.createElement(Vr.Provider,{value:e},n)}function iO(e,t=[],n){let r=n==null?void 0:n.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let a=e,o=r==null?void 0:r.errors;if(o!=null){let g=a.findIndex(m=>m.route.id&&(o==null?void 0:o[m.route.id])!==void 0);Ht(g>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),a=a.slice(0,Math.min(a.length,g+1))}let l=!1,u=-1;if(n&&r){l=r.renderFallback;for(let g=0;g<a.length;g++){let m=a[g];if((m.route.HydrateFallback||m.route.hydrateFallbackElement)&&(u=g),m.route.id){let{loaderData:y,errors:b}=r,k=m.route.loader&&!y.hasOwnProperty(m.route.id)&&(!b||b[m.route.id]===void 0);if(m.route.lazy||k){n.isStatic&&(l=!0),u>=0?a=a.slice(0,u+1):a=[a[0]];break}}}}let f=n==null?void 0:n.onError,h=r&&f?(g,m)=>{var y,b;f(g,{location:r.location,params:((b=(y=r.matches)==null?void 0:y[0])==null?void 0:b.params)??{},unstable_pattern:UD(r.matches),errorInfo:m})}:void 0;return a.reduceRight((g,m,y)=>{let b,k=!1,v=null,S=null;r&&(b=o&&m.route.id?o[m.route.id]:void 0,v=m.route.errorElement||tO,l&&(u<0&&y===0?(mN("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),k=!0,S=null):u===y&&(k=!0,S=m.route.hydrateFallbackElement||null)));let E=t.concat(a.slice(0,y+1)),C=()=>{let N;return b?N=v:k?N=S:m.route.Component?N=A.createElement(m.route.Component,null):m.route.element?N=m.route.element:N=g,A.createElement(rO,{match:m,routeContext:{outlet:g,matches:E,isDataRoute:r!=null},children:N})};return r&&(m.route.ErrorBoundary||m.route.errorElement||y===0)?A.createElement(pN,{location:r.location,revalidation:r.revalidation,component:v,error:b,children:C(),routeContext:{outlet:null,matches:E,isDataRoute:!0},onError:h}):C()},null)}function kb(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function aO(e){let t=A.useContext(Kl);return Ht(t,kb(e)),t}function sO(e){let t=A.useContext(Mh);return Ht(t,kb(e)),t}function oO(e){let t=A.useContext(Vr);return Ht(t,kb(e)),t}function Eb(e){let t=oO(e),n=t.matches[t.matches.length-1];return Ht(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function lO(){return Eb("useRouteId")}function cO(){var r;let e=A.useContext(wb),t=sO("useRouteError"),n=Eb("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function uO(){let{router:e}=aO("useNavigate"),t=Eb("useNavigate"),n=A.useRef(!1);return dN(()=>{n.current=!0}),A.useCallback(async(a,o={})=>{Kr(n.current,uN),n.current&&(typeof a=="number"?await e.navigate(a):await e.navigate(a,{fromRouteId:t,...o}))},[e,t])}var Y1={};function mN(e,t,n){!t&&!Y1[e]&&(Y1[e]=!0,Kr(!1,n))}A.memo(dO);function dO({routes:e,future:t,state:n,isStatic:r,onError:a}){return hN(e,void 0,{state:n,isStatic:r,onError:a})}function fO({to:e,replace:t,state:n,relative:r}){Ht(Gl(),"<Navigate> may be used only in the context of a <Router> component.");let{static:a}=A.useContext(Cr);Kr(!a,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:o}=A.useContext(Vr),{pathname:l}=hi(),u=bs(),f=Th(e,vb(o),l,r==="path"),h=JSON.stringify(f);return A.useEffect(()=>{u(JSON.parse(h),{replace:t,state:n,relative:r})},[u,h,r,t,n]),null}function hO(e){return ZD(e.context)}function mn(e){Ht(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function pO({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:a,static:o=!1,unstable_useTransitions:l}){Ht(!Gl(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let u=e.replace(/^\/*/,"/"),f=A.useMemo(()=>({basename:u,navigator:a,static:o,unstable_useTransitions:l,future:{}}),[u,a,o,l]);typeof n=="string"&&(n=Hl(n));let{pathname:h="/",search:g="",hash:m="",state:y=null,key:b="default",unstable_mask:k}=n,v=A.useMemo(()=>{let S=fa(h,u);return S==null?null:{location:{pathname:S,search:g,hash:m,state:y,key:b,unstable_mask:k},navigationType:r}},[u,h,g,m,y,b,r,k]);return Kr(v!=null,`<Router basename="${u}"> is not able to match the URL "${h}${g}${m}" because it does not start with the basename, so the <Router> won't render anything.`),v==null?null:A.createElement(Cr.Provider,{value:f},A.createElement($u.Provider,{children:t,value:v}))}function mO({children:e,location:t}){return JD(Ty(e),t)}function Ty(e,t=[]){let n=[];return A.Children.forEach(e,(r,a)=>{if(!A.isValidElement(r))return;let o=[...t,a];if(r.type===A.Fragment){n.push.apply(n,Ty(r.props.children,o));return}Ht(r.type===mn,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Ht(!r.props.index||!r.props.children,"An index route cannot have child routes.");let l={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(l.children=Ty(r.props.children,o)),n.push(l)}),n}var Hf="get",Kf="application/x-www-form-urlencoded";function Dh(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function gO(e){return Dh(e)&&e.tagName.toLowerCase()==="button"}function yO(e){return Dh(e)&&e.tagName.toLowerCase()==="form"}function bO(e){return Dh(e)&&e.tagName.toLowerCase()==="input"}function xO(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function vO(e,t){return e.button===0&&(!t||t==="_self")&&!xO(e)}function My(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(a=>[n,a]):[[n,r]])},[]))}function wO(e,t){let n=My(e);return t&&t.forEach((r,a)=>{n.has(a)||t.getAll(a).forEach(o=>{n.append(a,o)})}),n}var yf=null;function kO(){if(yf===null)try{new FormData(document.createElement("form"),0),yf=!1}catch{yf=!0}return yf}var EO=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function vg(e){return e!=null&&!EO.has(e)?(Kr(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Kf}"`),null):e}function SO(e,t){let n,r,a,o,l;if(yO(e)){let u=e.getAttribute("action");r=u?fa(u,t):null,n=e.getAttribute("method")||Hf,a=vg(e.getAttribute("enctype"))||Kf,o=new FormData(e)}else if(gO(e)||bO(e)&&(e.type==="submit"||e.type==="image")){let u=e.form;if(u==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let f=e.getAttribute("formaction")||u.getAttribute("action");if(r=f?fa(f,t):null,n=e.getAttribute("formmethod")||u.getAttribute("method")||Hf,a=vg(e.getAttribute("formenctype"))||vg(u.getAttribute("enctype"))||Kf,o=new FormData(u,e),!kO()){let{name:h,type:g,value:m}=e;if(g==="image"){let y=h?`${h}.`:"";o.append(`${y}x`,"0"),o.append(`${y}y`,"0")}else h&&o.append(h,m)}}else{if(Dh(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Hf,r=null,a=Kf,l=e}return o&&a==="text/plain"&&(l=o,o=void 0),{action:r,method:n.toLowerCase(),encType:a,formData:o,body:l}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Sb(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function gN(e,t,n,r){let a=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?a.pathname.endsWith("/")?a.pathname=`${a.pathname}_.${r}`:a.pathname=`${a.pathname}.${r}`:a.pathname==="/"?a.pathname=`_root.${r}`:t&&fa(a.pathname,t)==="/"?a.pathname=`${ah(t)}/_root.${r}`:a.pathname=`${ah(a.pathname)}.${r}`,a}async function NO(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function _O(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function CO(e,t,n){let r=await Promise.all(e.map(async a=>{let o=t.routes[a.route.id];if(o){let l=await NO(o,n);return l.links?l.links():[]}return[]}));return MO(r.flat(1).filter(_O).filter(a=>a.rel==="stylesheet"||a.rel==="preload").map(a=>a.rel==="stylesheet"?{...a,rel:"prefetch",as:"style"}:{...a,rel:"prefetch"}))}function Q1(e,t,n,r,a,o){let l=(f,h)=>n[h]?f.route.id!==n[h].route.id:!0,u=(f,h)=>{var g;return n[h].pathname!==f.pathname||((g=n[h].route.path)==null?void 0:g.endsWith("*"))&&n[h].params["*"]!==f.params["*"]};return o==="assets"?t.filter((f,h)=>l(f,h)||u(f,h)):o==="data"?t.filter((f,h)=>{var m;let g=r.routes[f.route.id];if(!g||!g.hasLoader)return!1;if(l(f,h)||u(f,h))return!0;if(f.route.shouldRevalidate){let y=f.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:((m=n[0])==null?void 0:m.params)||{},nextUrl:new URL(e,window.origin),nextParams:f.params,defaultShouldRevalidate:!0});if(typeof y=="boolean")return y}return!0}):[]}function jO(e,t,{includeHydrateFallback:n}={}){return AO(e.map(r=>{let a=t.routes[r.route.id];if(!a)return[];let o=[a.module];return a.clientActionModule&&(o=o.concat(a.clientActionModule)),a.clientLoaderModule&&(o=o.concat(a.clientLoaderModule)),n&&a.hydrateFallbackModule&&(o=o.concat(a.hydrateFallbackModule)),a.imports&&(o=o.concat(a.imports)),o}).flat(1))}function AO(e){return[...new Set(e)]}function TO(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function MO(e,t){let n=new Set;return new Set(t),e.reduce((r,a)=>{let o=JSON.stringify(TO(a));return n.has(o)||(n.add(o),r.push({key:o,link:a})),r},[])}function Nb(){let e=A.useContext(Kl);return Sb(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function DO(){let e=A.useContext(Mh);return Sb(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var _b=A.createContext(void 0);_b.displayName="FrameworkContext";function Cb(){let e=A.useContext(_b);return Sb(e,"You must render this element inside a <HydratedRouter> element"),e}function OO(e,t){let n=A.useContext(_b),[r,a]=A.useState(!1),[o,l]=A.useState(!1),{onFocus:u,onBlur:f,onMouseEnter:h,onMouseLeave:g,onTouchStart:m}=t,y=A.useRef(null);A.useEffect(()=>{if(e==="render"&&l(!0),e==="viewport"){let v=E=>{E.forEach(C=>{l(C.isIntersecting)})},S=new IntersectionObserver(v,{threshold:.5});return y.current&&S.observe(y.current),()=>{S.disconnect()}}},[e]),A.useEffect(()=>{if(r){let v=setTimeout(()=>{l(!0)},100);return()=>{clearTimeout(v)}}},[r]);let b=()=>{a(!0)},k=()=>{a(!1),l(!1)};return n?e!=="intent"?[o,y,{}]:[o,y,{onFocus:Qc(u,b),onBlur:Qc(f,k),onMouseEnter:Qc(h,b),onMouseLeave:Qc(g,k),onTouchStart:Qc(m,b)}]:[!1,y,{}]}function Qc(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function RO({page:e,...t}){let n=FD(),{router:r}=Nb(),a=A.useMemo(()=>eN(r.routes,e,r.basename),[r.routes,e,r.basename]);return a?n?A.createElement(IO,{page:e,matches:a,...t}):A.createElement(zO,{page:e,matches:a,...t}):null}function LO(e){let{manifest:t,routeModules:n}=Cb(),[r,a]=A.useState([]);return A.useEffect(()=>{let o=!1;return CO(e,t,n).then(l=>{o||a(l)}),()=>{o=!0}},[e,t,n]),r}function IO({page:e,matches:t,...n}){let r=hi(),{future:a}=Cb(),{basename:o}=Nb(),l=A.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let u=gN(e,o,a.unstable_trailingSlashAwareDataRequests,"rsc"),f=!1,h=[];for(let g of t)typeof g.route.shouldRevalidate=="function"?f=!0:h.push(g.route.id);return f&&h.length>0&&u.searchParams.set("_routes",h.join(",")),[u.pathname+u.search]},[o,a.unstable_trailingSlashAwareDataRequests,e,r,t]);return A.createElement(A.Fragment,null,l.map(u=>A.createElement("link",{key:u,rel:"prefetch",as:"fetch",href:u,...n})))}function zO({page:e,matches:t,...n}){let r=hi(),{future:a,manifest:o,routeModules:l}=Cb(),{basename:u}=Nb(),{loaderData:f,matches:h}=DO(),g=A.useMemo(()=>Q1(e,t,h,o,r,"data"),[e,t,h,o,r]),m=A.useMemo(()=>Q1(e,t,h,o,r,"assets"),[e,t,h,o,r]),y=A.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let v=new Set,S=!1;if(t.forEach(C=>{var _;let N=o.routes[C.route.id];!N||!N.hasLoader||(!g.some(D=>D.route.id===C.route.id)&&C.route.id in f&&((_=l[C.route.id])!=null&&_.shouldRevalidate)||N.hasClientLoader?S=!0:v.add(C.route.id))}),v.size===0)return[];let E=gN(e,u,a.unstable_trailingSlashAwareDataRequests,"data");return S&&v.size>0&&E.searchParams.set("_routes",t.filter(C=>v.has(C.route.id)).map(C=>C.route.id).join(",")),[E.pathname+E.search]},[u,a.unstable_trailingSlashAwareDataRequests,f,r,o,g,t,e,l]),b=A.useMemo(()=>jO(m,o),[m,o]),k=LO(m);return A.createElement(A.Fragment,null,y.map(v=>A.createElement("link",{key:v,rel:"prefetch",as:"fetch",href:v,...n})),b.map(v=>A.createElement("link",{key:v,rel:"modulepreload",href:v,...n})),k.map(({key:v,link:S})=>A.createElement("link",{key:v,nonce:n.nonce,...S,crossOrigin:S.crossOrigin??n.crossOrigin})))}function PO(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var BO=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{BO&&(window.__reactRouterVersion="7.14.2")}catch{}function UO({basename:e,children:t,unstable_useTransitions:n,window:r}){let a=A.useRef();a.current==null&&(a.current=mD({window:r,v5Compat:!0}));let o=a.current,[l,u]=A.useState({action:o.action,location:o.location}),f=A.useCallback(h=>{n===!1?u(h):A.startTransition(()=>u(h))},[n]);return A.useLayoutEffect(()=>o.listen(f),[o,f]),A.createElement(pO,{basename:e,children:t,location:l.location,navigationType:l.action,navigator:o,unstable_useTransitions:n})}var yN=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ha=A.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:a,reloadDocument:o,replace:l,unstable_mask:u,state:f,target:h,to:g,preventScrollReset:m,viewTransition:y,unstable_defaultShouldRevalidate:b,...k},v){let{basename:S,navigator:E,unstable_useTransitions:C}=A.useContext(Cr),N=typeof g=="string"&&yN.test(g),_=aN(g,S);g=_.to;let D=QD(g,{relative:a}),T=hi(),M=null;if(u){let H=Th(u,[],T.unstable_mask?T.unstable_mask.pathname:"/",!0);S!=="/"&&(H.pathname=H.pathname==="/"?S:ui([S,H.pathname])),M=E.createHref(H)}let[I,F,$]=OO(r,k),U=qO(g,{replace:l,unstable_mask:u,state:f,target:h,preventScrollReset:m,relative:a,viewTransition:y,unstable_defaultShouldRevalidate:b,unstable_useTransitions:C});function K(H){t&&t(H),H.defaultPrevented||U(H)}let Q=!(_.isExternal||o),B=A.createElement("a",{...k,...$,href:(Q?M:void 0)||_.absoluteURL||D,onClick:Q?K:t,ref:PO(v,F),target:h,"data-discover":!N&&n==="render"?"true":void 0});return I&&!N?A.createElement(A.Fragment,null,B,A.createElement(RO,{page:D})):B});ha.displayName="Link";var bN=A.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:a=!1,style:o,to:l,viewTransition:u,children:f,...h},g){let m=Fu(l,{relative:h.relative}),y=hi(),b=A.useContext(Mh),{navigator:k,basename:v}=A.useContext(Cr),S=b!=null&&YO(m)&&u===!0,E=k.encodeLocation?k.encodeLocation(m).pathname:m.pathname,C=y.pathname,N=b&&b.navigation&&b.navigation.location?b.navigation.location.pathname:null;n||(C=C.toLowerCase(),N=N?N.toLowerCase():null,E=E.toLowerCase()),N&&v&&(N=fa(N,v)||N);const _=E!=="/"&&E.endsWith("/")?E.length-1:E.length;let D=C===E||!a&&C.startsWith(E)&&C.charAt(_)==="/",T=N!=null&&(N===E||!a&&N.startsWith(E)&&N.charAt(E.length)==="/"),M={isActive:D,isPending:T,isTransitioning:S},I=D?t:void 0,F;typeof r=="function"?F=r(M):F=[r,D?"active":null,T?"pending":null,S?"transitioning":null].filter(Boolean).join(" ");let $=typeof o=="function"?o(M):o;return A.createElement(ha,{...h,"aria-current":I,className:F,ref:g,style:$,to:l,viewTransition:u},typeof f=="function"?f(M):f)});bN.displayName="NavLink";var $O=A.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:a,state:o,method:l=Hf,action:u,onSubmit:f,relative:h,preventScrollReset:g,viewTransition:m,unstable_defaultShouldRevalidate:y,...b},k)=>{let{unstable_useTransitions:v}=A.useContext(Cr),S=GO(),E=VO(u,{relative:h}),C=l.toLowerCase()==="get"?"get":"post",N=typeof u=="string"&&yN.test(u),_=D=>{if(f&&f(D),D.defaultPrevented)return;D.preventDefault();let T=D.nativeEvent.submitter,M=(T==null?void 0:T.getAttribute("formmethod"))||l,I=()=>S(T||D.currentTarget,{fetcherKey:t,method:M,navigate:n,replace:a,state:o,relative:h,preventScrollReset:g,viewTransition:m,unstable_defaultShouldRevalidate:y});v&&n!==!1?A.startTransition(()=>I()):I()};return A.createElement("form",{ref:k,method:C,action:E,onSubmit:r?f:_,...b,"data-discover":!N&&e==="render"?"true":void 0})});$O.displayName="Form";function FO(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function xN(e){let t=A.useContext(Kl);return Ht(t,FO(e)),t}function qO(e,{target:t,replace:n,unstable_mask:r,state:a,preventScrollReset:o,relative:l,viewTransition:u,unstable_defaultShouldRevalidate:f,unstable_useTransitions:h}={}){let g=bs(),m=hi(),y=Fu(e,{relative:l});return A.useCallback(b=>{if(vO(b,t)){b.preventDefault();let k=n!==void 0?n:gu(m)===gu(y),v=()=>g(e,{replace:k,unstable_mask:r,state:a,preventScrollReset:o,relative:l,viewTransition:u,unstable_defaultShouldRevalidate:f});h?A.startTransition(()=>v()):v()}},[m,g,y,n,r,a,t,e,o,l,u,f,h])}function vN(e){Kr(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=A.useRef(My(e)),n=A.useRef(!1),r=hi(),a=A.useMemo(()=>wO(r.search,n.current?null:t.current),[r.search]),o=bs(),l=A.useCallback((u,f)=>{const h=My(typeof u=="function"?u(new URLSearchParams(a)):u);n.current=!0,o("?"+h,f)},[o,a]);return[a,l]}var HO=0,KO=()=>`__${String(++HO)}__`;function GO(){let{router:e}=xN("useSubmit"),{basename:t}=A.useContext(Cr),n=lO(),r=e.fetch,a=e.navigate;return A.useCallback(async(o,l={})=>{let{action:u,method:f,encType:h,formData:g,body:m}=SO(o,t);if(l.navigate===!1){let y=l.fetcherKey||KO();await r(y,n,l.action||u,{unstable_defaultShouldRevalidate:l.unstable_defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:g,body:m,formMethod:l.method||f,formEncType:l.encType||h,flushSync:l.flushSync})}else await a(l.action||u,{unstable_defaultShouldRevalidate:l.unstable_defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:g,body:m,formMethod:l.method||f,formEncType:l.encType||h,replace:l.replace,state:l.state,fromRouteId:n,flushSync:l.flushSync,viewTransition:l.viewTransition})},[r,a,t,n])}function VO(e,{relative:t}={}){let{basename:n}=A.useContext(Cr),r=A.useContext(Vr);Ht(r,"useFormAction must be used inside a RouteContext");let[a]=r.matches.slice(-1),o={...Fu(e||".",{relative:t})},l=hi();if(e==null){o.search=l.search;let u=new URLSearchParams(o.search),f=u.getAll("index");if(f.some(g=>g==="")){u.delete("index"),f.filter(m=>m).forEach(m=>u.append("index",m));let g=u.toString();o.search=g?`?${g}`:""}}return(!e||e===".")&&a.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(o.pathname=o.pathname==="/"?n:ui([n,o.pathname])),gu(o)}function YO(e,{relative:t}={}){let n=A.useContext(lN);Ht(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=xN("useViewTransitionState"),a=Fu(e,{relative:t});if(!n.isTransitioning)return!1;let o=fa(n.currentLocation.pathname,r)||n.currentLocation.pathname,l=fa(n.nextLocation.pathname,r)||n.nextLocation.pathname;return ih(a.pathname,l)!=null||ih(a.pathname,o)!=null}$S();/**
|
|
61
|
+
* @license lucide-react v0.544.0 - ISC
|
|
62
|
+
*
|
|
63
|
+
* This source code is licensed under the ISC license.
|
|
64
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
65
|
+
*/const QO=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),WO=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),W1=e=>{const t=WO(e);return t.charAt(0).toUpperCase()+t.slice(1)},wN=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),XO=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
|
|
66
|
+
* @license lucide-react v0.544.0 - ISC
|
|
67
|
+
*
|
|
68
|
+
* This source code is licensed under the ISC license.
|
|
69
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
70
|
+
*/var ZO={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"};/**
|
|
71
|
+
* @license lucide-react v0.544.0 - ISC
|
|
72
|
+
*
|
|
73
|
+
* This source code is licensed under the ISC license.
|
|
74
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
75
|
+
*/const JO=A.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:a="",children:o,iconNode:l,...u},f)=>A.createElement("svg",{ref:f,...ZO,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:wN("lucide",a),...!o&&!XO(u)&&{"aria-hidden":"true"},...u},[...l.map(([h,g])=>A.createElement(h,g)),...Array.isArray(o)?o:[o]]));/**
|
|
76
|
+
* @license lucide-react v0.544.0 - ISC
|
|
77
|
+
*
|
|
78
|
+
* This source code is licensed under the ISC license.
|
|
79
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
80
|
+
*/const Ae=(e,t)=>{const n=A.forwardRef(({className:r,...a},o)=>A.createElement(JO,{ref:o,iconNode:t,className:wN(`lucide-${QO(W1(e))}`,`lucide-${e}`,r),...a}));return n.displayName=W1(e),n};/**
|
|
81
|
+
* @license lucide-react v0.544.0 - ISC
|
|
82
|
+
*
|
|
83
|
+
* This source code is licensed under the ISC license.
|
|
84
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
85
|
+
*/const eR=[["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"}]],Oh=Ae("activity",eR);/**
|
|
86
|
+
* @license lucide-react v0.544.0 - ISC
|
|
87
|
+
*
|
|
88
|
+
* This source code is licensed under the ISC license.
|
|
89
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
90
|
+
*/const tR=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],kN=Ae("arrow-left",tR);/**
|
|
91
|
+
* @license lucide-react v0.544.0 - ISC
|
|
92
|
+
*
|
|
93
|
+
* This source code is licensed under the ISC license.
|
|
94
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
95
|
+
*/const nR=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],rR=Ae("arrow-up",nR);/**
|
|
96
|
+
* @license lucide-react v0.544.0 - ISC
|
|
97
|
+
*
|
|
98
|
+
* This source code is licensed under the ISC license.
|
|
99
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
100
|
+
*/const iR=[["path",{d:"M18 6V4a2 2 0 1 0-4 0v2",key:"1aquzs"}],["path",{d:"M20 15v6a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"1rkj32"}],["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H10",key:"18wgow"}],["rect",{x:"12",y:"6",width:"8",height:"5",rx:"1",key:"73l30o"}]],aR=Ae("book-lock",iR);/**
|
|
101
|
+
* @license lucide-react v0.544.0 - ISC
|
|
102
|
+
*
|
|
103
|
+
* This source code is licensed under the ISC license.
|
|
104
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
105
|
+
*/const sR=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],oR=Ae("brain",sR);/**
|
|
106
|
+
* @license lucide-react v0.544.0 - ISC
|
|
107
|
+
*
|
|
108
|
+
* This source code is licensed under the ISC license.
|
|
109
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
110
|
+
*/const lR=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],cR=Ae("check",lR);/**
|
|
111
|
+
* @license lucide-react v0.544.0 - ISC
|
|
112
|
+
*
|
|
113
|
+
* This source code is licensed under the ISC license.
|
|
114
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
115
|
+
*/const uR=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Vl=Ae("chevron-down",uR);/**
|
|
116
|
+
* @license lucide-react v0.544.0 - ISC
|
|
117
|
+
*
|
|
118
|
+
* This source code is licensed under the ISC license.
|
|
119
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
120
|
+
*/const dR=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Yl=Ae("chevron-right",dR);/**
|
|
121
|
+
* @license lucide-react v0.544.0 - ISC
|
|
122
|
+
*
|
|
123
|
+
* This source code is licensed under the ISC license.
|
|
124
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
125
|
+
*/const fR=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],hR=Ae("chevron-up",fR);/**
|
|
126
|
+
* @license lucide-react v0.544.0 - ISC
|
|
127
|
+
*
|
|
128
|
+
* This source code is licensed under the ISC license.
|
|
129
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
130
|
+
*/const pR=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],yu=Ae("circle-alert",pR);/**
|
|
131
|
+
* @license lucide-react v0.544.0 - ISC
|
|
132
|
+
*
|
|
133
|
+
* This source code is licensed under the ISC license.
|
|
134
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
135
|
+
*/const mR=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],sh=Ae("circle-check-big",mR);/**
|
|
136
|
+
* @license lucide-react v0.544.0 - ISC
|
|
137
|
+
*
|
|
138
|
+
* This source code is licensed under the ISC license.
|
|
139
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
140
|
+
*/const gR=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],bu=Ae("circle-check",gR);/**
|
|
141
|
+
* @license lucide-react v0.544.0 - ISC
|
|
142
|
+
*
|
|
143
|
+
* This source code is licensed under the ISC license.
|
|
144
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
145
|
+
*/const yR=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],EN=Ae("circle-x",yR);/**
|
|
146
|
+
* @license lucide-react v0.544.0 - ISC
|
|
147
|
+
*
|
|
148
|
+
* This source code is licensed under the ISC license.
|
|
149
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
150
|
+
*/const bR=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],SN=Ae("clock",bR);/**
|
|
151
|
+
* @license lucide-react v0.544.0 - ISC
|
|
152
|
+
*
|
|
153
|
+
* This source code is licensed under the ISC license.
|
|
154
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
155
|
+
*/const xR=[["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"}]],vR=Ae("copy",xR);/**
|
|
156
|
+
* @license lucide-react v0.544.0 - ISC
|
|
157
|
+
*
|
|
158
|
+
* This source code is licensed under the ISC license.
|
|
159
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
160
|
+
*/const wR=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]],oh=Ae("cpu",wR);/**
|
|
161
|
+
* @license lucide-react v0.544.0 - ISC
|
|
162
|
+
*
|
|
163
|
+
* This source code is licensed under the ISC license.
|
|
164
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
165
|
+
*/const kR=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],jb=Ae("download",kR);/**
|
|
166
|
+
* @license lucide-react v0.544.0 - ISC
|
|
167
|
+
*
|
|
168
|
+
* This source code is licensed under the ISC license.
|
|
169
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
170
|
+
*/const ER=[["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"}]],SR=Ae("eye",ER);/**
|
|
171
|
+
* @license lucide-react v0.544.0 - ISC
|
|
172
|
+
*
|
|
173
|
+
* This source code is licensed under the ISC license.
|
|
174
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
175
|
+
*/const NR=[["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z",key:"1mlx9k"}]],X1=Ae("file-code",NR);/**
|
|
176
|
+
* @license lucide-react v0.544.0 - ISC
|
|
177
|
+
*
|
|
178
|
+
* This source code is licensed under the ISC license.
|
|
179
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
180
|
+
*/const _R=[["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"}]],qu=Ae("file-text",_R);/**
|
|
181
|
+
* @license lucide-react v0.544.0 - ISC
|
|
182
|
+
*
|
|
183
|
+
* This source code is licensed under the ISC license.
|
|
184
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
185
|
+
*/const CR=[["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["path",{d:"M18 19c-2.8 0-5-2.2-5-5v8",key:"pkpw2h"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]],jR=Ae("folder-git-2",CR);/**
|
|
186
|
+
* @license lucide-react v0.544.0 - ISC
|
|
187
|
+
*
|
|
188
|
+
* This source code is licensed under the ISC license.
|
|
189
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
190
|
+
*/const AR=[["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"}]],NN=Ae("folder-open",AR);/**
|
|
191
|
+
* @license lucide-react v0.544.0 - ISC
|
|
192
|
+
*
|
|
193
|
+
* This source code is licensed under the ISC license.
|
|
194
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
195
|
+
*/const TR=[["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"}]],xu=Ae("folder",TR);/**
|
|
196
|
+
* @license lucide-react v0.544.0 - ISC
|
|
197
|
+
*
|
|
198
|
+
* This source code is licensed under the ISC license.
|
|
199
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
200
|
+
*/const MR=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],DR=Ae("funnel",MR);/**
|
|
201
|
+
* @license lucide-react v0.544.0 - ISC
|
|
202
|
+
*
|
|
203
|
+
* This source code is licensed under the ISC license.
|
|
204
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
205
|
+
*/const OR=[["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"}]],RR=Ae("git-branch",OR);/**
|
|
206
|
+
* @license lucide-react v0.544.0 - ISC
|
|
207
|
+
*
|
|
208
|
+
* This source code is licensed under the ISC license.
|
|
209
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
210
|
+
*/const LR=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],IR=Ae("globe",LR);/**
|
|
211
|
+
* @license lucide-react v0.544.0 - ISC
|
|
212
|
+
*
|
|
213
|
+
* This source code is licensed under the ISC license.
|
|
214
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
215
|
+
*/const zR=[["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"}]],PR=Ae("history",zR);/**
|
|
216
|
+
* @license lucide-react v0.544.0 - ISC
|
|
217
|
+
*
|
|
218
|
+
* This source code is licensed under the ISC license.
|
|
219
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
220
|
+
*/const BR=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],UR=Ae("house",BR);/**
|
|
221
|
+
* @license lucide-react v0.544.0 - ISC
|
|
222
|
+
*
|
|
223
|
+
* This source code is licensed under the ISC license.
|
|
224
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
225
|
+
*/const $R=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],FR=Ae("image",$R);/**
|
|
226
|
+
* @license lucide-react v0.544.0 - ISC
|
|
227
|
+
*
|
|
228
|
+
* This source code is licensed under the ISC license.
|
|
229
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
230
|
+
*/const qR=[["path",{d:"M5 3v14",key:"9nsxs2"}],["path",{d:"M12 3v8",key:"1h2ygw"}],["path",{d:"M19 3v18",key:"1sk56x"}]],HR=Ae("kanban",qR);/**
|
|
231
|
+
* @license lucide-react v0.544.0 - ISC
|
|
232
|
+
*
|
|
233
|
+
* This source code is licensed under the ISC license.
|
|
234
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
235
|
+
*/const KR=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]],_N=Ae("layout-grid",KR);/**
|
|
236
|
+
* @license lucide-react v0.544.0 - ISC
|
|
237
|
+
*
|
|
238
|
+
* This source code is licensed under the ISC license.
|
|
239
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
240
|
+
*/const GR=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],nt=Ae("loader-circle",GR);/**
|
|
241
|
+
* @license lucide-react v0.544.0 - ISC
|
|
242
|
+
*
|
|
243
|
+
* This source code is licensed under the ISC license.
|
|
244
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
245
|
+
*/const VR=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]],Z1=Ae("message-circle",VR);/**
|
|
246
|
+
* @license lucide-react v0.544.0 - ISC
|
|
247
|
+
*
|
|
248
|
+
* This source code is licensed under the ISC license.
|
|
249
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
250
|
+
*/const YR=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],CN=Ae("message-square",YR);/**
|
|
251
|
+
* @license lucide-react v0.544.0 - ISC
|
|
252
|
+
*
|
|
253
|
+
* This source code is licensed under the ISC license.
|
|
254
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
255
|
+
*/const QR=[["path",{d:"M13.4 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7.4",key:"re6nr2"}],["path",{d:"M2 6h4",key:"aawbzj"}],["path",{d:"M2 10h4",key:"l0bgd4"}],["path",{d:"M2 14h4",key:"1gsvsf"}],["path",{d:"M2 18h4",key:"1bu2t1"}],["path",{d:"M21.378 5.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"pqwjuv"}]],jN=Ae("notebook-pen",QR);/**
|
|
256
|
+
* @license lucide-react v0.544.0 - ISC
|
|
257
|
+
*
|
|
258
|
+
* This source code is licensed under the ISC license.
|
|
259
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
260
|
+
*/const WR=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}],["path",{d:"m8 9 3 3-3 3",key:"12hl5m"}]],XR=Ae("panel-right-close",WR);/**
|
|
261
|
+
* @license lucide-react v0.544.0 - ISC
|
|
262
|
+
*
|
|
263
|
+
* This source code is licensed under the ISC license.
|
|
264
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
265
|
+
*/const ZR=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],JR=Ae("paperclip",ZR);/**
|
|
266
|
+
* @license lucide-react v0.544.0 - ISC
|
|
267
|
+
*
|
|
268
|
+
* This source code is licensed under the ISC license.
|
|
269
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
270
|
+
*/const eL=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]],tL=Ae("pause",eL);/**
|
|
271
|
+
* @license lucide-react v0.544.0 - ISC
|
|
272
|
+
*
|
|
273
|
+
* This source code is licensed under the ISC license.
|
|
274
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
275
|
+
*/const nL=[["path",{d:"M13 21h8",key:"1jsn5i"}],["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"}]],Ab=Ae("pen-line",nL);/**
|
|
276
|
+
* @license lucide-react v0.544.0 - ISC
|
|
277
|
+
*
|
|
278
|
+
* This source code is licensed under the ISC license.
|
|
279
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
280
|
+
*/const rL=[["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"}]],iL=Ae("pencil",rL);/**
|
|
281
|
+
* @license lucide-react v0.544.0 - ISC
|
|
282
|
+
*
|
|
283
|
+
* This source code is licensed under the ISC license.
|
|
284
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
285
|
+
*/const aL=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],Hu=Ae("play",aL);/**
|
|
286
|
+
* @license lucide-react v0.544.0 - ISC
|
|
287
|
+
*
|
|
288
|
+
* This source code is licensed under the ISC license.
|
|
289
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
290
|
+
*/const sL=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],jr=Ae("plus",sL);/**
|
|
291
|
+
* @license lucide-react v0.544.0 - ISC
|
|
292
|
+
*
|
|
293
|
+
* This source code is licensed under the ISC license.
|
|
294
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
295
|
+
*/const oL=[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",key:"w46dr5"}]],lL=Ae("puzzle",oL);/**
|
|
296
|
+
* @license lucide-react v0.544.0 - ISC
|
|
297
|
+
*
|
|
298
|
+
* This source code is licensed under the ISC license.
|
|
299
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
300
|
+
*/const cL=[["path",{d:"M16.247 7.761a6 6 0 0 1 0 8.478",key:"1fwjs5"}],["path",{d:"M19.075 4.933a10 10 0 0 1 0 14.134",key:"ehdyv1"}],["path",{d:"M4.925 19.067a10 10 0 0 1 0-14.134",key:"1q22gi"}],["path",{d:"M7.753 16.239a6 6 0 0 1 0-8.478",key:"r2q7qm"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],AN=Ae("radio",cL);/**
|
|
301
|
+
* @license lucide-react v0.544.0 - ISC
|
|
302
|
+
*
|
|
303
|
+
* This source code is licensed under the ISC license.
|
|
304
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
305
|
+
*/const uL=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],gs=Ae("refresh-cw",uL);/**
|
|
306
|
+
* @license lucide-react v0.544.0 - ISC
|
|
307
|
+
*
|
|
308
|
+
* This source code is licensed under the ISC license.
|
|
309
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
310
|
+
*/const dL=[["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"}]],Tb=Ae("rotate-ccw",dL);/**
|
|
311
|
+
* @license lucide-react v0.544.0 - ISC
|
|
312
|
+
*
|
|
313
|
+
* This source code is licensed under the ISC license.
|
|
314
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
315
|
+
*/const fL=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M21 9H3",key:"1338ky"}],["path",{d:"M21 15H3",key:"9uk58r"}]],hL=Ae("rows-3",fL);/**
|
|
316
|
+
* @license lucide-react v0.544.0 - ISC
|
|
317
|
+
*
|
|
318
|
+
* This source code is licensed under the ISC license.
|
|
319
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
320
|
+
*/const pL=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],ma=Ae("save",pL);/**
|
|
321
|
+
* @license lucide-react v0.544.0 - ISC
|
|
322
|
+
*
|
|
323
|
+
* This source code is licensed under the ISC license.
|
|
324
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
325
|
+
*/const mL=[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]],TN=Ae("scroll-text",mL);/**
|
|
326
|
+
* @license lucide-react v0.544.0 - ISC
|
|
327
|
+
*
|
|
328
|
+
* This source code is licensed under the ISC license.
|
|
329
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
330
|
+
*/const gL=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Ol=Ae("search",gL);/**
|
|
331
|
+
* @license lucide-react v0.544.0 - ISC
|
|
332
|
+
*
|
|
333
|
+
* This source code is licensed under the ISC license.
|
|
334
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
335
|
+
*/const yL=[["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"}]],bL=Ae("send",yL);/**
|
|
336
|
+
* @license lucide-react v0.544.0 - ISC
|
|
337
|
+
*
|
|
338
|
+
* This source code is licensed under the ISC license.
|
|
339
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
340
|
+
*/const xL=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],MN=Ae("settings",xL);/**
|
|
341
|
+
* @license lucide-react v0.544.0 - ISC
|
|
342
|
+
*
|
|
343
|
+
* This source code is licensed under the ISC license.
|
|
344
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
345
|
+
*/const vL=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],DN=Ae("shield-check",vL);/**
|
|
346
|
+
* @license lucide-react v0.544.0 - ISC
|
|
347
|
+
*
|
|
348
|
+
* This source code is licensed under the ISC license.
|
|
349
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
350
|
+
*/const wL=[["path",{d:"m12.5 17-.5-1-.5 1h1z",key:"3me087"}],["path",{d:"M15 22a1 1 0 0 0 1-1v-1a2 2 0 0 0 1.56-3.25 8 8 0 1 0-11.12 0A2 2 0 0 0 8 20v1a1 1 0 0 0 1 1z",key:"1o5pge"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}]],kL=Ae("skull",wL);/**
|
|
351
|
+
* @license lucide-react v0.544.0 - ISC
|
|
352
|
+
*
|
|
353
|
+
* This source code is licensed under the ISC license.
|
|
354
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
355
|
+
*/const EL=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],Mb=Ae("square",EL);/**
|
|
356
|
+
* @license lucide-react v0.544.0 - ISC
|
|
357
|
+
*
|
|
358
|
+
* This source code is licensed under the ISC license.
|
|
359
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
360
|
+
*/const SL=[["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"}]],NL=Ae("star",SL);/**
|
|
361
|
+
* @license lucide-react v0.544.0 - ISC
|
|
362
|
+
*
|
|
363
|
+
* This source code is licensed under the ISC license.
|
|
364
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
365
|
+
*/const _L=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],ON=Ae("terminal",_L);/**
|
|
366
|
+
* @license lucide-react v0.544.0 - ISC
|
|
367
|
+
*
|
|
368
|
+
* This source code is licensed under the ISC license.
|
|
369
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
370
|
+
*/const CL=[["path",{d:"M10 2h4",key:"n1abiw"}],["path",{d:"M12 14v-4",key:"1evpnu"}],["path",{d:"M4 13a8 8 0 0 1 8-7 8 8 0 1 1-5.3 14L4 17.6",key:"1ts96g"}],["path",{d:"M9 17H4v5",key:"8t5av"}]],jL=Ae("timer-reset",CL);/**
|
|
371
|
+
* @license lucide-react v0.544.0 - ISC
|
|
372
|
+
*
|
|
373
|
+
* This source code is licensed under the ISC license.
|
|
374
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
375
|
+
*/const AL=[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]],TL=Ae("timer",AL);/**
|
|
376
|
+
* @license lucide-react v0.544.0 - ISC
|
|
377
|
+
*
|
|
378
|
+
* This source code is licensed under the ISC license.
|
|
379
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
380
|
+
*/const ML=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],xs=Ae("trash-2",ML);/**
|
|
381
|
+
* @license lucide-react v0.544.0 - ISC
|
|
382
|
+
*
|
|
383
|
+
* This source code is licensed under the ISC license.
|
|
384
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
385
|
+
*/const DL=[["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"}]],OL=Ae("triangle-alert",DL);/**
|
|
386
|
+
* @license lucide-react v0.544.0 - ISC
|
|
387
|
+
*
|
|
388
|
+
* This source code is licensed under the ISC license.
|
|
389
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
390
|
+
*/const RL=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],RN=Ae("upload",RL);/**
|
|
391
|
+
* @license lucide-react v0.544.0 - ISC
|
|
392
|
+
*
|
|
393
|
+
* This source code is licensed under the ISC license.
|
|
394
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
395
|
+
*/const LL=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],LN=Ae("users",LL);/**
|
|
396
|
+
* @license lucide-react v0.544.0 - ISC
|
|
397
|
+
*
|
|
398
|
+
* This source code is licensed under the ISC license.
|
|
399
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
400
|
+
*/const IL=[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]],Db=Ae("workflow",IL);/**
|
|
401
|
+
* @license lucide-react v0.544.0 - ISC
|
|
402
|
+
*
|
|
403
|
+
* This source code is licensed under the ISC license.
|
|
404
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
405
|
+
*/const zL=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],IN=Ae("wrench",zL);/**
|
|
406
|
+
* @license lucide-react v0.544.0 - ISC
|
|
407
|
+
*
|
|
408
|
+
* This source code is licensed under the ISC license.
|
|
409
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
410
|
+
*/const PL=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],dr=Ae("x",PL);/**
|
|
411
|
+
* @license lucide-react v0.544.0 - ISC
|
|
412
|
+
*
|
|
413
|
+
* This source code is licensed under the ISC license.
|
|
414
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
415
|
+
*/const BL=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],UL=Ae("zap",BL),$L={"app.title":"SPS Console","nav.chat":"Chat","nav.projects":"Projects","nav.board":"Board","nav.workers":"Workers","nav.logs":"Logs","nav.skills":"Skills","nav.system":"System","nav.processes":"Processes","nav.audit":"Audit Log","nav.memory":"Memory","nav.plugins":"Plugins","plugins.h1":"Plugins 🧩","plugins.desc":"Global plugin toggles. Applies to newly dispatched cards.","plugins.tab.memory":"Memory","plugins.tab.channel":"Channel","plugins.tab.model":"Model","plugins.tab.tool":"Tool","plugins.comingSoon":"Coming soon","plugins.model.title":"Agent models","plugins.model.desc":"Configure both agents (global). worker=claude executes, review·designer=openai supervises+orchestrates.","plugins.model.worker":"Worker (executes / claude)","plugins.model.reviewer":"Review·Designer (supervisor / openai)","plugins.model.provider":"Provider","plugins.model.model":"Model","plugins.model.official":"Official claude (default)","plugins.model.save":"Save","plugins.model.saved":"Saved","plugins.model.error":"Save failed","nav.arrange":"Arrange","arrange.h1":"SmartArrange 🧭","arrange.project":"Project","arrange.none":'Not started — click "Start" above to launch (task list appears in seconds; approve to run). If the dropdown is empty, create a project in SmartArrange mode first.',"arrange.start":"Start","arrange.stop":"Stop","arrange.startErr":"Start/stop failed","arrange.view":"Toggle canvas view","arrange.viewFree":"Free","arrange.viewLane":"Lanes","arrange.starting":"Starting — breaking down the task list…","arrange.planning":"Breaking down the task list…","arrange.orchestrating":"Orchestrating…","arrange.status":"Status","arrange.goal":"Goal","arrange.plan":"Task list + card chain","arrange.approve":"Approve plan","arrange.approveErr":"Approve failed","arrange.tasks":"Task list","arrange.collapse":"Collapse","arrange.expand":"Expand task list","arrange.noCards":"No cards yet — waiting for the orchestrator to dispatch (starts after approval).","arrange.cardPrompt":"Card prompt","arrange.cardSkills":"Skills","arrange.cardTask":"Task","arrange.cardLog":"Log","arrange.close":"Close","arrange.cardsCount":"cards","nav.aria":"Main navigation","memory.sub":"Cross-project memory · agentmemory proxied behind console auth","memory.searchPlaceholder":"Search memory… (e.g. how to fix the art race)","memory.search":"Search","memory.results":"Results","memory.rawHint":"(raw observation · distilled lessons appear after live capture + compression)","memory.sessions":"Recent sessions","memory.empty":"No memory yet · accumulates after live capture (P1)","processes.title":"Processes","processes.subtitle":"Claude processes launched by SPS ACP (others, e.g. your own session, are not shown)","processes.refresh":"Refresh","processes.aliveCount":"{n} running","processes.col.kind":"Type","processes.col.slot":"Slot","processes.col.project":"Project","processes.col.state":"State","processes.col.memory":"Memory","processes.col.action":"Action","processes.empty":"No SPS processes","processes.filter.all":"All","processes.filter.alive":"Running","processes.filter.offline":"Offline","processes.kind.all":"All types","processes.kind.worker":"Worker","processes.kind.chat":"Chat","processes.kill":"Kill","processes.killConfirm":"Kill process {slot}?","audit.title":"Audit Log","audit.subtitle":"Project lifecycle: create / modify / delete","audit.refresh":"Refresh","audit.filter.all":"All","audit.action.create":"Create","audit.action.modify":"Modify","audit.action.delete":"Delete","audit.action.daemon":"Daemon","audit.col.time":"Time","audit.col.action":"Action","audit.col.project":"Project","audit.col.detail":"Detail","audit.empty":"No audit records","lang.toggle.aria":"Switch interface language","lang.en":"EN","lang.zh":"中","status.server":"server","status.offline":"offline","status.sse.open":"SSE","status.sse.connecting":"SSE·connect","status.sse.down":"SSE·down","status.pipelines.tooltip":"Active pipelines","status.workers.tooltip":"Active workers","status.pipeline.unit":"pipeline","status.worker.unit":"worker","common.save":"Save","common.cancel":"Cancel","common.delete":"Delete","common.confirm":"Confirm","common.create":"Create","common.edit":"Edit","common.close":"Close","common.loading":"Loading…","common.error":"Error","common.retry":"Retry","common.empty":"Nothing here yet","common.search":"Search","common.refresh":"Refresh","common.copy":"Copy","common.copied":"Copied","common.yes":"Yes","common.no":"No","common.required":"Required","common.optional":"Optional","common.ok":"OK","projects.title":"Projects 🎯","projects.count":"{count} local project(s)","projects.refresh.hint":"Click refresh to retry","projects.new":"New project","projects.sort.label":"Sort by","projects.sort.activity":"Activity","projects.sort.date":"Modified","projects.sort.name":"Name","projects.load.failed":"Failed to load","projects.empty.title":"No projects yet ✨","projects.empty.hint":"Run {cmd} to create your first project.","newProject.title":"New project","newProject.subtitle":"Set up a project; the worker will run automatically","newProject.field.mode":"Execution mode","newProject.field.mode.pipeline":"Auto pipeline","newProject.field.mode.pipelineDesc":"Fixed-stage pipeline, claude worker runs cards","newProject.field.mode.smart":"SmartArrange","newProject.field.mode.smartDesc":"OpenAI monitor dispatches cards + claude worker","newProject.field.mode.pipelineHint":"Classic mode: you create cards, worker runs them by stage.","newProject.field.mode.smartHint":"Give one goal; the OpenAI monitor probes output each round, dispatches task cards dynamically, drives claude to finish.","newProject.field.goal":"Goal (GOAL.md)","newProject.field.goal.hint":"Written to docs/GOAL.md; SmartArrange derives the task list from it. Missing → tick skips the project.","newProject.field.goal.placeholder":"e.g. Build a pure-frontend, single-file Snake browser game…","newProject.field.name":"Project name","newProject.field.name.help":"Lowercase letters, digits, _ and - only","newProject.field.dir":"Parent directory","newProject.field.dir.preview":"Project will be created at →","newProject.field.dir.help":"Absolute path; will be created if missing","newProject.field.branch":"Merge target branch","newProject.field.branch.help":"Default: main","newProject.field.maxWorkers":"Max concurrent workers","newProject.field.maxWorkers.help":"Per-project worker count (1 recommended)","newProject.field.ackTimeout":"ACK timeout (seconds)","newProject.field.ackTimeout.help":"How long to wait for the worker to ACK (default 300)","newProject.field.gitlabProject":"GitLab/GitHub remote","newProject.field.gitlabProject.help":"Format: user/repo (optional)","newProject.field.matrixRoom":"Matrix room ID","newProject.field.matrixRoom.help":"Optional, falls back to global default","newProject.field.git":"Enable git","newProject.field.git.help":"Off → non-code project, no commit/push/MR steps","newProject.submit":"Create project","newProject.creating":"Creating…","newProject.created":"Project created","newProject.error.dirRequired":"Project directory is required","newProject.dir.browse":"Browse","newProject.dir.browseAria":"Pick directory","newProject.back":"Back","newProject.back.aria":"Back to projects","newProject.field.name.placeholder":"e.g. acme-web","newProject.field.name.example":"Letters, digits, underscore, hyphen. e.g. acme-web","newProject.field.name.invalid":"Name only allows a-z A-Z 0-9 _ -","newProject.field.dir.long":"Absolute path of the PARENT directory. The project gets its own <name> subdir created under it (like git clone), avoiding accidental use of a shared directory.","newProject.field.dir.placeholder":"/home/you/projects","newProject.field.dir.createIfMissing":"Auto-create if missing (recommended — otherwise .claude/ install gets skipped)","newProject.field.dir.pickerTitle":"Pick project directory","newProject.field.maxWorkers.short":"Max workers","newProject.field.ackTimeout.minutes":"ACK timeout (min)","newProject.field.ackTimeout.minutes.help":"How long after dispatch before the worker is considered failed if no ACK","newProject.field.git.label":"Enable Git (worker auto commit + push)","newProject.field.git.detail":"When off, the worker only does the task, no version control — fits docs / data-processing non-code projects.","newProject.field.git.branch":"Merge branch","newProject.field.gitlabProject.label":"Git remote project path","newProject.field.gitlabProject.help2":"Like user/repo. Empty = skip remote API (commit/push local only)","newProject.field.gitlabProject.placeholder":"user/repo","newProject.field.gitlabProjectId":"GitLab project ID","newProject.field.gitlabProjectId.help":"Number; leave blank for GitHub","newProject.field.gitlabProjectId.placeholder":"42","newProject.section.notifications":"Notifications","newProject.field.matrixRoom.label":"Matrix room ID","newProject.field.matrixRoom.help2":"Empty = use global config; blank = no notifications","newProject.field.matrixRoom.placeholder":"!abc:matrix.example.com","newProject.error.create.title":"Create failed","projectDetail.tab.pipeline":"Pipeline","projectDetail.tab.conf":"Conf","projectDetail.tab.delete":"Delete project","projectDetail.delete.title":"Delete this project","projectDetail.delete.warn":"This will remove the project conf, runtime, and worktrees. The repository under {repoDir} is untouched.","projectDetail.delete.confirmLabel":"Type the project name to confirm","projectDetail.delete.button":"Delete project","projectDetail.delete.deleting":"Deleting…","projectDetail.lastActivity":"Last activity","projectDetail.notFound":"Project not found","projectDetail.notFoundHint":"It may have been deleted or renamed.","projectDetail.backToList":"Back to projects","pipeline.editor.title":"Pipeline YAML","pipeline.editor.savedAt":"Saved {time}","pipeline.editor.unsaved":"Unsaved changes","pipeline.editor.save":"Save","pipeline.editor.saving":"Saving…","pipeline.editor.reload":"Reload from disk","pipeline.editor.discard.title":"Discard unsaved changes?","pipeline.editor.discard.body":"Your edits will be lost.","pipeline.editor.errors":"YAML parse errors","pipeline.editor.list":"Pipelines","pipeline.editor.list.add":"New pipeline","pipeline.editor.list.delete":"Delete pipeline","pipeline.editor.list.use":"Use as active","pipeline.editor.list.activeBadge":"active","pipeline.editor.list.sample":"sample","pipeline.editor.delete.confirm.title":"Delete pipeline {name}?","pipeline.editor.delete.confirm.body":"This action cannot be undone.","pipeline.newDialog.title":"New pipeline","pipeline.newDialog.field.filename":"Filename","pipeline.newDialog.field.filename.help":"Letters, digits, _ and - only; .yaml will be appended","pipeline.newDialog.field.copyFrom":"Copy from","pipeline.newDialog.copyFrom.sample":"sample template","pipeline.newDialog.copyFrom.active":"current active","pipeline.newDialog.create":"Create","projectDetail.tab.overview":"Overview","projectDetail.tab.config":"Config","projectDetail.tab.pipelines":"Pipelines","projectDetail.tab.danger":"Danger zone","projectDetail.openBoard":"Board","projectDetail.overview.repoDir":"Repo path","projectDetail.overview.pmBackend":"PM backend","projectDetail.overview.agent":"Agent","projectDetail.overview.cards":"Cards","projectDetail.overview.cards.value":"{total} total · {inprogress} in progress · {done} done","projectDetail.overview.workers":"Workers","projectDetail.overview.workers.value":"{total} total ({active} active)","projectDetail.overview.pipeline":"Pipeline","projectDetail.overview.lastActivity":"Last activity","projectDetail.overview.notFound":"Project {name} not found or unreadable.","projectDetail.config.confDirty":"● Unsaved changes","projectDetail.config.reload":"Reload","projectDetail.config.save":"Save","projectDetail.config.saveAria":"Save config","projectDetail.config.editorAria":"conf file editor","projectDetail.config.error.conflict.title":"Config was modified elsewhere","projectDetail.config.error.conflict.body":"The conf file was changed while you were editing. Click Reload, then re-edit.","projectDetail.config.error.save.title":"Save failed","projectDetail.config.error.load":"Load failed: {detail}","projectDetail.pipelines.title":"Pipelines","projectDetail.pipelines.add":"New pipeline","projectDetail.pipelines.empty":'No pipeline files yet. Click "New pipeline" to start.',"projectDetail.pipelines.activeBadge":"active","projectDetail.pipelines.edit":"Edit","projectDetail.pipelines.editAria":"Edit {name}","projectDetail.pipelines.switch":"Switch","projectDetail.pipelines.switchAria":"Switch to {name}","projectDetail.pipelines.switch.confirm.title":"Switch to {name}","projectDetail.pipelines.switch.confirm.body":"The current project.yaml will be overwritten with the contents of {name}. Continue?","projectDetail.pipelines.switch.confirm.button":"Switch","projectDetail.pipelines.switch.error":"Switch failed","projectDetail.pipelines.delete.confirm.title":"Delete {name}","projectDetail.pipelines.delete.confirm.body":"This pipeline file will be permanently deleted.","projectDetail.pipelines.delete.error":"Delete failed","projectDetail.pipelines.deleteAria":"Delete {name}","projectDetail.pipelines.create.error":"Create failed","projectDetail.danger.title":"Delete project","projectDetail.danger.body":"This clears {path} (all cards, runtime, logs).","projectDetail.danger.includeClaude.label":"Also clear repo's .claude/","projectDetail.danger.includeClaude.note":"The repo itself is untouched; only this directory is cleaned.","projectDetail.danger.confirmPrompt":"Type the project name {name} to confirm:","projectDetail.danger.deleteAria":"Permanently delete project","projectDetail.danger.deleteButton":"Permanently delete","projectDetail.danger.deleted.title":"Deleted","projectDetail.danger.deleted.bodyWithList":`Project deleted. Also cleaned up:
|
|
416
|
+
{paths}`,"projectDetail.danger.deleted.body":"Project deleted.","projectDetail.danger.error":"Delete failed","pipelineEditor.close":"Close","pipelineEditor.error.conflict.title":"File was modified elsewhere","pipelineEditor.error.yaml.title":"YAML syntax error","pipelineEditor.error.save.title":"Save failed","pipelineEditor.error.serialize.title":"YAML serialize failed","pipelineEditor.error.load":"Load failed: {detail}","pipelineEditor.mode.structured":"Structured","pipelineEditor.mode.yaml":"Raw YAML","pipelineEditor.parseError.prefix":"YAML parse: {detail}","pipelineEditor.activeWarning":"⚠ This is the active pipeline — saving will take effect on the next tick","pipelineEditor.yamlAria":"pipeline YAML editor","pipelineEditor.status.unsaved":"● Unsaved","pipelineEditor.status.saved":"Saved","pipelineEditor.status.noChanges":"No changes","pipelineEditor.reload":"Reload","pipelineEditor.save":"Save","pipelineEditor.saveAria":"Save pipeline","pipelineEditor.activeBadge":"active","pipelineEditor.modeHint":"project = event-driven pipeline (default) · steps = sequential script","pipelineEditor.stages.heading":"Stages ({count})","pipelineEditor.stages.add":"Add stage","pipelineEditor.stages.empty":'No stages yet. Click "Add stage" to start.',"pipelineEditor.stage.name.hint":"Unique stage name","pipelineEditor.stage.profile.hint":"skill profile, may be empty","pipelineEditor.stage.cardState.hint":"Card state during this stage","pipelineEditor.stage.timeout.hint":"Optional, e.g. 30m 2h","pipelineEditor.stage.trigger.hint":"Trigger condition, blank uses default","pipelineEditor.stage.onComplete.hint":"Action on success","pipelineEditor.stage.onFail.action.hint":"Action on failure, e.g. label NEEDS-FIX","pipelineEditor.stage.onFail.comment.hint":"Comment written on the card","pipelineEditor.stage.halt.note":"(stops pipeline on failure; uncheck to continue with next card)","pipelineEditor.stage.moveUp":"Move up","pipelineEditor.stage.moveDown":"Move down","pipelineEditor.stage.remove":"Remove stage","newPipelineDialog.title":"New pipeline","newPipelineDialog.field.filename.label":"Filename","newPipelineDialog.field.filename.placeholder":"e.g. ci","newPipelineDialog.field.filename.help":"Will be saved as {filename}. Only a-z A-Z 0-9 _ - allowed; an existing file errors 409.","newPipelineDialog.section.template":"Initial content","newPipelineDialog.template.blank.label":"Blank template","newPipelineDialog.template.blank.desc":"Minimal 1-stage pipeline (develop → Done)","newPipelineDialog.template.sample.label":"Tutorial template","newPipelineDialog.template.sample.desc":"Copied from sample.yaml.example (annotated, every field explained)","newPipelineDialog.template.sample.unavailable":"sample.yaml.example does not exist","newPipelineDialog.template.active.label":"Copy current active","newPipelineDialog.template.active.desc":"Copied from project.yaml (build on the current config)","newPipelineDialog.template.active.unavailable":"project.yaml does not exist","newPipelineDialog.create.aria":"Create pipeline","newPipelineDialog.cancel":"Cancel","board.title":"Board ✨","board.title.bare":"Board","board.subtitle":"{name} · {cards} cards · {workers} workers active","board.pickPrompt.title":"Pick a project 🎯","board.pickPrompt.body":"The board is per-project. Pick one to start:","board.action.start":"Start","board.action.stop":"Stop","board.action.startAria":"Start pipeline","board.action.stopAria":"Stop pipeline","board.action.startError":"Failed to start pipeline","board.action.stopError":"Failed to stop pipeline","board.action.reset":"Reset","board.action.resetError":"Reset failed","board.action.reset.confirm.title":"Reset the entire pipeline","board.action.reset.confirm.body":"This clears all cards’ run state, worker markers, and branches. Cannot be undone.","board.action.reset.confirm.button":"Reset all","board.action.newCard":"New card","board.action.newCard.error":"Failed to create card","board.action.moveCard.error":"Failed to move card","board.search.placeholder":"Search title / skill / label…","board.search.aria":"Search cards","board.filter.clear":"Clear","board.filter.clearAria":"Clear filters","board.filter.aria":"Filter by {label}","board.filter.clearSelection":"Clear selection","board.error.loadCards":"Failed to load cards","board.col.planning":"Planning","board.col.backlog":"Backlog","board.col.todo":"Todo","board.col.inprogress":"Inprogress","board.col.qa":"QA / Review","board.col.done":"Done","kanban.checklist.label":"Checklist {done}/{total}","kanban.checklist.more":"… {count} more","kanban.column.empty":"— empty —","kanban.time.justNow":"just now","kanban.time.minutes":"{n}m ago","kanban.time.hours":"{n}h ago","kanban.time.days":"{n}d ago","newCard.title":"New card","newCard.field.title":"Title *","newCard.field.title.placeholder":"e.g. Add GitHub OAuth login","newCard.field.title.help":"Short, clear goal (<200 chars)","newCard.field.description":"Description","newCard.field.description.placeholder":"User story, requirements, acceptance criteria, references… Claude reads this when starting","newCard.field.description.help":"Markdown supported. If empty, Claude only sees the title.","newCard.field.skills":"Skills","newCard.field.skills.help":"Pick which skills get loaded (via frontmatter `skills:`). Optional — worker falls back to project-level skills.","newCard.field.skills.loading":"Loading skills…","newCard.field.skills.error":"Failed to load skills (creation still works): {detail}","newCard.field.skills.selected":"{count} selected: {names}","newCard.field.dispatch":"Dispatch","newCard.field.dispatch.label":"Dispatch immediately (go straight to Backlog)","newCard.field.dispatch.help":"Default off: card lands in Planning to wait; drag to Backlog when ready. On: skip Planning, the next tick assigns a worker.","newCard.create.aria":"Create card","cardDetail.loading":"Loading…","cardDetail.error.load":"Failed to load card","cardDetail.tabs.overview":"Overview","cardDetail.tabs.body":"Description","cardDetail.tabs.checklist":"Checklist","cardDetail.tabs.history":"History","cardDetail.tabs.actions":"Actions","cardDetail.field.state":"State","cardDetail.field.skills":"Skills","cardDetail.field.labels":"Labels","cardDetail.field.branch":"Branch","cardDetail.field.assignee":"Assignee","cardDetail.field.created":"Created","cardDetail.field.updated":"Updated","cardDetail.field.empty":"—","cardDetail.actions.delete":"Delete card","cardDetail.actions.delete.confirm.title":"Delete card #{seq}","cardDetail.actions.delete.confirm.body":"This card will be permanently deleted.","cardDetail.actions.delete.error":"Delete failed","cardDetail.actions.update.error":"Update failed","cardDetail.body.empty":"No description","cardDetail.checklist.empty":"No checklist","cardDetail.checklist.progress":"Progress {done}/{total}","cardDetail.history.empty":"No history","cardDetail.notFound":"Card #{seq} not found","cardDetail.copy.aria":"Copy seq","cardDetail.close.aria":"Close","cardDetail.save":"Save","cardDetail.saving":"Saving…","workers.title":"Workers 👷","workers.summary":"Across {projects} projects · {running} running · {starting} starting · {stuck} stuck · {crashed} crashed · {idle} idle","workers.summary.stuck":"{n} stuck","workers.summary.crashed":"{n} crashed","workers.refresh.aria":"Refresh","workers.refresh":"Refresh","workers.error.load":"Load failed: {detail}","workers.empty.hint":"Click a project / worker to see details","logs.title":"Logs 📜","logs.subtitle.allProjects":"All projects","logs.subtitle.project":"{name} live tail","logs.filter.errors":"Errors only","logs.filter.errors.aria":"Show errors only","logs.filter.search.placeholder":"Filter messages…","logs.empty":"No logs yet — waiting for events","logs.error.load":"Failed to load logs","logs.refresh":"Refresh","logs.refresh.aria":"Refresh logs","logs.scroll.bottom.aria":"Scroll to bottom","logs.scroll.pause":"Paused (autoscroll off)","logs.scroll.resume":"Resume autoscroll","logs.subtitle.allProjectsCount":"All projects ({count})","logs.poll.5s":"5s polling","logs.paused":"⏸ PAUSED","logs.mode.live":"Live","logs.mode.history":"History","logs.history.startAria":"Query start time","logs.history.queryAria":"Query","logs.history.query":"Query","logs.filter.project.aria":"Filter project","logs.filter.project.all":"All projects","logs.filter.keyword.placeholder":"Filter keyword…","logs.filter.keyword.aria":"Filter logs","logs.empty.match":"No matching logs","skills.title":"Skills 🧠","skills.subtitle":"Skills shared across projects (managed via `sps skill ...`)","skills.empty.title":"No skills yet","skills.empty.hint":"Run {cmd} to sync the bundled skills.","skills.linked.tooltip":"linked into this project","skills.frozen.tooltip":"frozen (per-project copy)","skills.category.all":"All","skills.category.language":"language","skills.category.end":"end","skills.category.persona":"persona","skills.category.workflow":"workflow","skills.category.other":"other","skills.subtitleCount":"{count} user-level skill(s)","skills.search.placeholder":"Search skill…","skills.search.aria":"Search skill","skillDetail.actionFailed":"{label} failed","skillDetail.unfreezeAction":"Unfreeze","skillDetail.freezeAction":"Freeze","skillDetail.removeAction":"Remove","skillDetail.removeConfirm.title":"Remove {name} from {project}","skillDetail.removeConfirm.body":"The skill link will be removed; the project will not see this skill on next run.","skillDetail.removeConfirm.button":"Remove","skillDetail.unfreezeConfirm.title":"Unfreeze {name} @ {project}","skillDetail.unfreezeConfirm.body":"Local changes to this skill will be overwritten with the latest shared version.","skillDetail.unfreezeConfirm.button":"Unfreeze","skillDetail.close.aria":"Close","skillDetail.loading":"Loading…","skillDetail.error.load":"Load failed: {detail}","skillDetail.section.projects":"Per-project link status","skillDetail.section.empty":"No projects yet. Create one first.","skillDetail.section.preview":"SKILL.md preview","skillDetail.toggleSection.aria":"{action} {file}","skillDetail.expand":"Expand","skillDetail.collapse":"Collapse","system.title":"System 🛠","system.subtitle":"Global config + diagnostics + upgrades","system.section.env":"Global env","system.section.env.help":"Stored in ~/.coral/env (mode 600). Used by all projects.","system.section.env.save":"Save env","system.section.env.error.conflict":"env was modified elsewhere","system.section.env.error.save":"Failed to save env","system.section.env.error.load":"Failed to load env","system.section.env.dirtyDot":"● Unsaved","system.section.env.aria":"env editor","system.section.env.reload":"Reload","system.section.upgrade":"Upgrade","system.section.upgrade.current":"Current: v{version}","system.section.upgrade.latest":"Latest on npm: v{version}","system.section.upgrade.uptodate":"Up to date","system.section.upgrade.update":"Upgrade now","system.section.upgrade.upgrading":"Upgrading…","system.section.upgrade.checking":"Checking npm…","system.section.upgrade.checkError":"Check failed: {detail}","system.section.upgrade.upgradeError":"Upgrade failed: {detail}","system.section.upgrade.upgradeError.title":"Upgrade failed","system.section.upgrade.command":"Or run in terminal: {cmd}","system.section.upgrade.runningPipelines":"Pipelines running — stop them first: {projects}","system.section.diagnostics":"Diagnostics","system.section.diagnostics.help":"Run sps doctor across all projects, see failures at a glance","system.section.diagnostics.run":"Run diagnostics","system.section.diagnostics.running":"Running…","system.section.diagnostics.empty":"No projects","system.section.diagnostics.checkAria":"Check {project}","system.section.diagnostics.statusOk":"OK","system.section.diagnostics.statusFail":"Issues","system.section.diagnostics.error":"Diagnostic failed: {detail}","system.h1":"System ⚙️","system.runtime":"Runtime","system.memory.title":"Memory backend","system.memory.desc":"Global setting: which backend workers read/write memory through. Applies to newly dispatched cards.","system.memory.provider":"Backend","system.memory.url":"Custom URL","system.memory.url.placeholder":"http://127.0.0.1:3111","system.memory.save":"Save","system.memory.save.aria":"Save memory backend setting","system.memory.saved":"Saved","system.memory.error":"Save failed","system.memory.opt.none":"Off (none)","system.memory.opt.builtin":"Local file memory (builtin)","system.memory.opt.agentmemory":"agentmemory (semantic)","system.memory.opt.custom":"Custom REST (custom)","system.env.title.code":"~/.coral/env","system.env.title.prefix":"Global config ","system.env.edit.aria":"Edit env file","system.env.edit.button":"Edit","system.env.editing.label":"⚠ Editing","system.env.empty.before":'env file does not exist. Click "Edit" or run ',"system.env.empty.after":" in the terminal.","system.env.warning":"⚠ This file contains plaintext credentials. Keep mode 0600 on save.","system.env.aria":"env editor","system.env.dirtyMark":" · ● Unsaved","system.env.cancel":"Cancel","system.env.save":"Save","system.env.save.aria":"Save env","system.env.error.conflict.title":"env was modified elsewhere","system.env.error.save.title":"Save failed","system.env.error.conflict.body":"Cancel and reopen the editor.","system.upgrade.title":"Version","system.upgrade.checkLatest.aria":"Check latest version","system.upgrade.checkUpdate":"Check update","system.upgrade.label.current":"sps-cli (current)","system.upgrade.label.latest":"npm (latest)","system.upgrade.latestPill":"latest","system.upgrade.button.upgradeAria":"Upgrade to latest","system.upgrade.button.upgrade":"Upgrade","system.upgrade.button.copyAria":"Copy upgrade command","system.upgrade.button.copyTitle":"Copy command (run manually if auto upgrade fails)","system.upgrade.button.copy":"Copy command","system.upgrade.label.installed":"Installed","system.upgrade.installed.ok":"Active (restart console to see)","system.upgrade.installed.fail":"Upgrade not effective","system.upgrade.label.check":"Check","system.upgrade.confirm.title":"Upgrade sps-cli","system.upgrade.confirm.body":"Current {current}, upgrade to {latest}. Requires all pipelines stopped. Restart sps console after upgrade.","system.upgrade.confirm.button":"Upgrade","system.upgrade.success.title":"Upgrade complete","system.upgrade.success.body":'Installed v{version}. Run `pkill -f "sps console"` and restart to see it.',"system.upgrade.notEffective.title":"Upgrade not effective","system.upgrade.notEffective.same":"npm finished but the version did not change (still {version}) — likely a permissions or registry issue. Copy the command below to run manually.","system.upgrade.notEffective.notInstalled":"npm did not install a new version. Copy the command to run manually, or check the log below.","system.upgrade.error.title":"Upgrade failed","system.upgrade.copy.success.title":"Command copied","system.upgrade.copy.success.body":`Paste it into a terminal:
|
|
417
|
+
{cmd}`,"system.upgrade.copy.fail.title":"Copy failed","system.upgrade.copy.fail.body":`Copy manually:
|
|
418
|
+
{cmd}`,"system.diagnostics.title":"Project health check","system.diagnostics.checkAll":"Check all","system.diagnostics.empty":"No projects yet.","system.diagnostics.expandAria":"Expand","system.diagnostics.collapseAria":"Collapse","system.diagnostics.never":'Click "Check" to run sps doctor',"system.diagnostics.checkAria":"Check","system.diagnostics.check":"Check","system.diagnostics.noFixesNeeded":"Nothing to fix","system.diagnostics.fix.tip":"Run sps doctor <proj> --fix: auto-create .claude/hooks/stop.sh, state.json, etc.","system.diagnostics.fixAria":"Auto fix","system.diagnostics.fix":"Fix","system.diagnostics.fixed":"Fixed","system.diagnostics.error.fix":"doctor fix failed","system.diagnostics.error.check":"doctor check failed","chat.title":"Chat 💬","chat.empty.title":"Chat 💬","chat.empty.hint":'Click "New chat" on the left to start a session, or just type below — a session will be auto-created.',"chat.empty.shortcuts":"Enter to send · Shift+Enter for newline · streamed reply","chat.list.heading":"History {count}","chat.list.new":"New chat","chat.list.empty":"No chats yet. Click above to start.","chat.list.delete.aria":"Delete chat","chat.list.deleteCli.aria":"Remove this CLI session from the Console (does not affect Claude jsonl history)","chat.list.openAria":"Open chat {title}{cwd}","chat.list.cwdSuffix":" (cwd: {cwd})","chat.list.msgs":"{count} msg · {time}","chat.list.olderToggle":"Earlier · {count}","chat.detail.model.tooltip":"Current model in use","chat.detail.claudeSession.tooltip":"Underlying claude session id — the anchor for resuming session & memory","chat.delete.confirm.title":"Delete chat","chat.delete.confirm.body.cli":"Will be removed from the Console list (the daemon session is stopped). The Claude CLI history under ~/.claude/projects is preserved — to continue, run `sps agent --chat --name <name>` in a terminal.","chat.delete.confirm.body.console":"Chat history will be permanently deleted.","chat.delete.confirm.button":"Delete","chat.cli.banner.bold":"CLI session","chat.cli.banner":"This session was created by sps agent. The Console only shows history. To continue, run in a terminal:","chat.input.placeholder":"Say something… (Enter to send, Shift+Enter for newline, drag files / paste images)","chat.input.dragOver":"Drop to attach…","chat.input.aria":"Message input","chat.input.attach.aria":"Attach a local file","chat.input.attach.title":"Attach a local file (also drag / paste images)","chat.input.send":"Send","chat.input.send.aria":"Send","chat.input.interrupt":"Stop","chat.input.interrupt.aria":"Stop generation","chat.input.uploading":"Uploading…","chat.input.removeAttachment":"Remove {name}","chat.error.interrupt.title":"Interrupt failed","chat.cliBadge":"CLI","chat.cliBadge.tooltip":"Created by sps agent CLI; history is read live from Claude jsonl (read-only).","chat.session.title":"{title}","chat.session.id":"{id}","chat.session.empty":"Type a question below to start · Enter to send · Shift+Enter for newline","notFound.title":"404","notFound.body":"This page does not exist.","notFound.home":"Back to home","workers.active.empty":"No workers running.","workers.alerts.allHealthy":"All workers healthy","workers.alerts.pidDead":"PID dead.","workers.alerts.markerStale":"marker stale {ago}.","workers.capacity.col.project":"Project","workers.capacity.col.usage":"Usage","workers.capacity.col.other":"Other","workers.capacity.detailHint":"details →","workers.panel.boardLink":"Board →","workers.panel.loading":"Loading workers…","workers.panel.empty.slots":"This project has no worker slots.","workers.panel.empty.noWorker":"No workers","workers.panel.empty.pickOne":"Pick a worker","workers.panel.idle.short":"idle","workers.panel.section.currentCard":"Current card","workers.panel.idle.full":"Slot idle, no current card.","workers.panel.section.claudeOutput":"Claude output · last {n} lines","workers.panel.output.loading":"Loading…","workers.panel.output.empty":"No session output yet. The worker needs a few seconds to start.","workers.panel.section.heartbeat":"Supervisor heartbeat · last {n} lines","workers.panel.heartbeat.fullLog":"View full log →","workers.panel.action.restart":"Restart","workers.panel.action.restart.confirm.title":"Restart worker-{slot}","workers.panel.action.restart.confirm.body":"Kill the process, then re-launch onto #{seq}","workers.panel.action.restart.confirm.button":"Restart","workers.panel.action.restart.error":"Restart failed","workers.panel.action.kill":"Kill","workers.panel.action.kill.confirm.title":"Kill worker-{slot}","workers.panel.action.kill.confirm.body":"The current task will be force-aborted.","workers.panel.action.kill.confirm.button":"Kill","workers.panel.action.kill.error":"Kill failed","dialog.confirm.default":"OK","dialog.alert.default":"Got it","dialog.cancel.default":"Cancel","dirPicker.title.default":"Pick a directory","dirPicker.close.aria":"Close","dirPicker.up.aria":"Parent directory","dirPicker.up.title":"Parent directory","dirPicker.home.aria":"Back to home","dirPicker.home.title":"Back to home","dirPicker.loading":"Loading…","dirPicker.error.title":"Read failed","dirPicker.empty":"— empty —","dirPicker.enter.aria":"Enter {name}/","dirPicker.pickFile.aria":"Pick {name} (double-click to confirm)","dirPicker.fileLocked":"File not selectable","dirPicker.cancel":"Cancel","dirPicker.useFile":"Use this file","dirPicker.useFile.tooltip.empty":"Click a file first","dirPicker.useDir":"Use this directory","errorBoundary.title":"💥 UI crashed","errorBoundary.refresh":"Refresh page","chat.error.create.title":"Failed to create chat","chat.error.send.title":"Send failed","chat.error.fileTooBig.title":"File too large","chat.error.fileTooBig.body":"Per-file limit is 50 MB; this is {size} MB ({name})","chat.error.uploadAttachment.title":"Attachment upload failed","chat.placeholder.attachment":"(attachment)","chat.placeholder.viewAttachment":"(see attachment)","chat.placeholder.attachmentTitle":"Attachment","chat.attachment.previewTooltip":`{name}
|
|
419
|
+
{path}
|
|
420
|
+
Click to preview`,"chat.attachment.previewSimpleTooltip":`{name}
|
|
421
|
+
Click to zoom`,"chat.attachment.preview.aria":"Preview {name}","chat.attachment.close.aria":"Close","chat.attachment.readErr":"Read failed: {detail}","chat.attachment.loading":"Loading…","chat.attachment.unsupported":"This file type cannot be previewed inline.","chat.attachment.download":"Download","chat.message.role.you":"You","chat.message.role.error":"Error","chat.message.role.assistant":"assistant","chat.message.truncated":"⚠ Output exceeded 10MB and was truncated","chat.filePicker.title":"Pick attachment file","chat.newSession.title":"New chat","chat.newSession.title.aria":"New chat","chat.newSession.close.aria":"Close","chat.newSession.field.agent":"Agent","chat.newSession.field.title":"Title (optional)","chat.newSession.field.title.placeholder":"Empty = auto-generate from first message","chat.newSession.field.cwd":"Working directory (optional)","chat.newSession.field.cwd.browse":"Browse","chat.newSession.field.cwd.browseAria":"Pick directory","chat.newSession.field.cwd.title":"Pick directory","chat.newSession.field.cwd.help1":"The agent reads/writes files here. Absolute path; must exist.","chat.newSession.field.cwd.help2":"Empty = use the daemon’s startup cwd.","chat.newSession.cancel":"Cancel","chat.newSession.create":"Create","cardModal.editing":"⚠ Editing","cardModal.title.aria":"Card title","cardModal.editAria":"Edit card","cardModal.edit":"Edit","cardModal.close.aria":"Close","cardModal.error.save.title":"Save failed","cardModal.error.load":"Load failed: {detail}","cardModal.skills.loading":"Loading skill list…","cardModal.label.removeAria":"Remove {label}","cardModal.label.addPlaceholder":"+ Add label","cardModal.label.addAria":"Add label","cardModal.label.note":"Note: AI-PIPELINE / STARTED-* / COMPLETED-* / NEEDS-FIX are managed by the pipeline; manual changes may be overwritten","cardModal.section.description":"Description","cardModal.section.empty":"(empty)","cardModal.section.checklist":"Checklist","cardModal.checklist.empty":"No checklist items. Add `- [ ] item` syntax in the description.","cardModal.section.log":"Log","cardModal.body.aria":"Card description","cardModal.body.replaceNote":'Only replaces the "## Description" section; checklist and log sections are untouched.',"cardModal.action.launch":"Launch worker","cardModal.action.launch.disabledDone":"Card is done; drag back to Todo to launch","cardModal.action.launch.disabledRunning":"Pipeline is running — supervisor dispatches automatically, no manual launch needed","cardModal.action.launch.error":"Launch worker failed","cardModal.action.reset":"Reset card","cardModal.action.reset.confirm.title":"Reset card #{seq}","cardModal.action.reset.confirm.body":"Card state goes back to initial; checklist progress is cleared.","cardModal.action.reset.confirm.button":"Reset","cardModal.action.reset.error":"Reset failed","cardModal.action.delete":"Delete card","cardModal.action.delete.confirm1.title":"Delete card #{seq}","cardModal.action.delete.confirm1.body":'About to delete "{title}". This cannot be undone (the md file is physically removed). Continue?',"cardModal.action.delete.confirm1.button":"Continue","cardModal.action.delete.confirm2.title":"Final confirmation","cardModal.action.delete.confirm2.body":"Please re-confirm deleting card #{seq}.","projectDetail.tab.skills":"Skills","projectDetail.tab.rules":"Rules","projectDetail.skills.title":"Skill whitelist","projectDetail.skills.desc":"Pick which skills this project loads. Narrows what workers, subagents and chat see — cuts token cost.","projectDetail.skills.noPolicy":"No whitelist — all skills are available (subagents load the full set from disk).","projectDetail.skills.hasPolicy":"Whitelist active — {count} skill(s) eligible.","projectDetail.skills.save":"Save whitelist","projectDetail.skills.clear":"Clear (load all)","projectDetail.skills.saveError":"Failed to save whitelist","projectDetail.skills.applied":"Saved. Projected {linked} linked, {pruned} pruned.","projectDetail.skills.unknown":"Unknown skill name(s), ignored: {names}","projectDetail.skills.empty":"No skills installed. Run `sps skill sync` first.","projectDetail.skills.selectAll":"Select all","projectDetail.skills.selectNone":"Select none","projectDetail.rules.title":"Project rules (read-only)","projectDetail.rules.readonly":"sps-cli only reads these. Editing is done at project creation or by an agent later.","projectDetail.rules.missing":"Not present","nav.prompts":"Prompts","prompts.title":"Prompt library","prompts.desc":"Reusable prompts with {{variable}} templates. Insert them into chat.","prompts.new":"New prompt","prompts.search":"Search prompts…","prompts.empty":"No prompts yet. Create one.","prompts.name":"Name","prompts.namePlaceholder":"kebab-case, e.g. code-review","prompts.nameError":"Name must be kebab-case (a-z, 0-9, dashes).","prompts.description":"Description","prompts.tags":"Tags","prompts.tagsPlaceholder":"comma,separated","prompts.body":"Body","prompts.bodyPlaceholder":"Write your prompt. Use {{variable}} for fill-ins.","prompts.favorite":"Favorite","prompts.save":"Save","prompts.delete":"Delete","prompts.deleteConfirm":'Delete prompt "{name}"? This removes the file.',"prompts.saveError":"Failed to save prompt","prompts.vars":"Variables: {names}","prompts.noVars":"No variables","prompts.insert":"Insert a prompt","skills.import":"Import","skills.import.title":"Import a skill","skills.import.name":"Name (kebab-case)","skills.import.body":"SKILL.md content","skills.import.submit":"Import","skills.import.error":"Import failed","skills.export":"Export SKILL.md","skills.updates.badge":"{count} update(s) available","skills.updates.none":"Up to date"},FL={"app.title":"SPS 控制台","nav.chat":"对话","nav.projects":"项目","nav.board":"看板","nav.workers":"Workers","nav.logs":"日志","nav.skills":"技能","nav.system":"系统","nav.processes":"进程","nav.audit":"审计日志","nav.memory":"记忆","nav.plugins":"插件","plugins.h1":"插件 🧩","plugins.desc":"全局插件开关。改动对之后新派发的卡生效。","plugins.tab.memory":"记忆","plugins.tab.channel":"频道","plugins.tab.model":"模型","plugins.tab.tool":"工具","plugins.comingSoon":"即将上线","plugins.model.title":"智能体模型","plugins.model.desc":"配置两个智能体的模型(全局)。worker=claude 执行、review·designer=openai 监工+编排。","plugins.model.worker":"Worker(执行 / claude)","plugins.model.reviewer":"Review·Designer(监工 / openai)","plugins.model.provider":"Provider","plugins.model.model":"模型","plugins.model.official":"官方 claude(默认)","plugins.model.save":"保存","plugins.model.saved":"已保存","plugins.model.error":"保存失败","nav.arrange":"编排","arrange.h1":"智能编排 🧭","arrange.project":"项目","arrange.none":"尚未开始 — 点上方「启动」拉起编排(几秒后出任务清单,确认即跑)。若下拉无项目,先在「新建项目」选智能编排模式。","arrange.start":"启动","arrange.stop":"停止","arrange.startErr":"启动/停止失败","arrange.view":"切换画板视图","arrange.viewFree":"自由","arrange.viewLane":"泳道","arrange.starting":"启动中,正在拆解任务清单…","arrange.planning":"正在拆解任务清单…","arrange.orchestrating":"正在编排中…","arrange.status":"状态","arrange.goal":"目标","arrange.plan":"任务清单 + 卡链路","arrange.approve":"确认任务清单","arrange.approveErr":"确认失败","arrange.tasks":"任务清单","arrange.collapse":"收起","arrange.expand":"展开任务清单","arrange.noCards":"暂无卡片 — 等待 orchestrator 派卡(确认清单后开始)。","arrange.cardPrompt":"卡片提示词","arrange.cardSkills":"技能","arrange.cardTask":"所属任务","arrange.cardLog":"日志","arrange.close":"关闭","arrange.cardsCount":"张卡","nav.aria":"主导航","memory.sub":"跨项目记忆 · 经 console 鉴权代理 agentmemory","memory.searchPlaceholder":"搜索记忆…(如:三消美术竞态怎么修)","memory.search":"搜索","memory.results":"召回结果","memory.rawHint":"(原始观察 · 接入实时捕获+压缩后这里会显示提炼的教训)","memory.sessions":"最近会话","memory.empty":"暂无记忆 · 接入实时捕获(P1)后自动累积","processes.title":"进程监控","processes.subtitle":"SPS ACP 启动的 claude 进程(其它途径启动的,如你自己的会话,不显示)","processes.refresh":"刷新","processes.aliveCount":"运行中 {n}","processes.col.kind":"类型","processes.col.slot":"会话槽","processes.col.project":"项目","processes.col.state":"状态","processes.col.memory":"内存","processes.col.action":"操作","processes.empty":"没有 SPS 进程","processes.filter.all":"全部","processes.filter.alive":"运行中","processes.filter.offline":"离线","processes.kind.all":"全部类型","processes.kind.worker":"构建 Worker","processes.kind.chat":"对话","processes.kill":"关闭","processes.killConfirm":"确定关闭进程 {slot}?","audit.title":"审计日志","audit.subtitle":"项目生命周期:创建 / 修改 / 删除","audit.refresh":"刷新","audit.filter.all":"全部","audit.action.create":"创建","audit.action.modify":"修改","audit.action.delete":"删除","audit.action.daemon":"Daemon","audit.col.time":"时间","audit.col.action":"动作","audit.col.project":"项目","audit.col.detail":"详情","audit.empty":"暂无审计记录","lang.toggle.aria":"切换界面语言","lang.en":"EN","lang.zh":"中","status.server":"服务","status.offline":"离线","status.sse.open":"SSE","status.sse.connecting":"SSE·连接中","status.sse.down":"SSE·断开","status.pipelines.tooltip":"活跃流水线数","status.workers.tooltip":"活跃 Worker 数","status.pipeline.unit":"流水线","status.worker.unit":"Worker","common.save":"保存","common.cancel":"取消","common.delete":"删除","common.confirm":"确认","common.create":"创建","common.edit":"编辑","common.close":"关闭","common.loading":"加载中…","common.error":"出错","common.retry":"重试","common.empty":"暂无内容","common.search":"搜索","common.refresh":"刷新","common.copy":"复制","common.copied":"已复制","common.yes":"是","common.no":"否","common.required":"必填","common.optional":"可选","common.ok":"好","projects.title":"项目 🎯","projects.count":"本机有 {count} 个项目","projects.refresh.hint":"点击刷新重试","projects.new":"新建项目","projects.sort.label":"排序方式","projects.sort.activity":"活跃度","projects.sort.date":"修改日期","projects.sort.name":"名字","projects.load.failed":"加载失败","projects.empty.title":"还没有项目 ✨","projects.empty.hint":"运行 {cmd} 创建第一个项目。","newProject.title":"新建项目","newProject.subtitle":"配置一个项目,worker 自动开跑","newProject.field.mode":"执行模式","newProject.field.mode.pipeline":"自动工作流","newProject.field.mode.pipelineDesc":"固定阶段流水线,claude worker 按卡执行","newProject.field.mode.smart":"智能编排","newProject.field.mode.smartDesc":"OpenAI 监工动态派卡 + claude worker 执行","newProject.field.mode.pipelineHint":"传统模式:你建卡片,worker 按阶段跑。","newProject.field.mode.smartHint":"给一个总目标,OpenAI 监工每轮探查产物、动态生成任务卡、驱动 claude 完成。","newProject.field.goal":"总目标 (GOAL.md)","newProject.field.goal.hint":"写入 docs/GOAL.md;智能编排据此拆任务清单。缺失则 tick 跳过该项目。","newProject.field.goal.placeholder":"例:做一个纯前端、单文件可运行的贪吃蛇网页小游戏…","newProject.field.name":"项目名","newProject.field.name.help":"只允许小写字母、数字、_ 和 -","newProject.field.dir":"父目录","newProject.field.dir.preview":"项目将创建在 →","newProject.field.dir.help":"绝对路径;不存在会自动创建","newProject.field.branch":"合并目标分支","newProject.field.branch.help":"默认 main","newProject.field.maxWorkers":"最大并发 Worker 数","newProject.field.maxWorkers.help":"单项目并发数(推荐 1)","newProject.field.ackTimeout":"ACK 超时(秒)","newProject.field.ackTimeout.help":"Worker 响应等待秒数(默认 300)","newProject.field.gitlabProject":"GitLab/GitHub 远程","newProject.field.gitlabProject.help":"格式:用户名/仓库(可选)","newProject.field.matrixRoom":"Matrix 房间 ID","newProject.field.matrixRoom.help":"可选;不填则用全局默认","newProject.field.git":"启用 git","newProject.field.git.help":"关闭 → 非代码项目,跳过 commit/push/MR","newProject.submit":"创建项目","newProject.creating":"创建中…","newProject.created":"项目已创建","newProject.error.dirRequired":"项目目录必填","newProject.dir.browse":"浏览","newProject.dir.browseAria":"选择目录","newProject.back":"返回","newProject.back.aria":"返回项目列表","newProject.field.name.placeholder":"例如:acme-web","newProject.field.name.example":"只能用字母、数字、下划线、连字符。例如 acme-web","newProject.field.name.invalid":"名称只能包含 a-z A-Z 0-9 _ -","newProject.field.dir.long":"本机绝对路径的【父目录】。项目会在它下面自动建一个【项目名】子目录(类似 git clone),避免误用共享目录。","newProject.field.dir.placeholder":"/home/you/projects","newProject.field.dir.createIfMissing":"目录不存在时自动创建(推荐 —— 否则 .claude/ 安装会被跳过)","newProject.field.dir.pickerTitle":"选择项目目录","newProject.field.maxWorkers.short":"最大 Worker 数","newProject.field.ackTimeout.minutes":"ACK 超时(分钟)","newProject.field.ackTimeout.minutes.help":"Worker 启动后多久没 ACK 视为失败","newProject.field.git.label":"启用 Git(Worker 自动 commit + push)","newProject.field.git.detail":"关闭后 Worker 只做任务、不做版本控制;适合文档/数据处理等非代码项目。","newProject.field.git.branch":"合并分支","newProject.field.gitlabProject.label":"Git 远程项目路径","newProject.field.gitlabProject.help2":"如 user/repo,空则跳过远程 API(只本地 commit/push)","newProject.field.gitlabProject.placeholder":"user/repo","newProject.field.gitlabProjectId":"GitLab 项目 ID","newProject.field.gitlabProjectId.help":"数字;GitHub 用户留空","newProject.field.gitlabProjectId.placeholder":"42","newProject.section.notifications":"通知","newProject.field.matrixRoom.label":"Matrix 房间 ID","newProject.field.matrixRoom.help2":"空则使用全局配置;不填 = 不通知","newProject.field.matrixRoom.placeholder":"!abc:matrix.example.com","newProject.error.create.title":"创建失败","projectDetail.tab.pipeline":"流水线","projectDetail.tab.conf":"配置","projectDetail.tab.delete":"删除项目","projectDetail.delete.title":"删除该项目","projectDetail.delete.warn":"会删除项目配置、运行时和 worktree。{repoDir} 下的代码仓库不动。","projectDetail.delete.confirmLabel":"输入项目名以确认","projectDetail.delete.button":"删除项目","projectDetail.delete.deleting":"删除中…","projectDetail.lastActivity":"最后活跃","projectDetail.notFound":"项目不存在","projectDetail.notFoundHint":"可能已被删除或重命名。","projectDetail.backToList":"返回项目列表","pipeline.editor.title":"流水线 YAML","pipeline.editor.savedAt":"{time} 已保存","pipeline.editor.unsaved":"有未保存的修改","pipeline.editor.save":"保存","pipeline.editor.saving":"保存中…","pipeline.editor.reload":"从磁盘重新加载","pipeline.editor.discard.title":"放弃未保存的修改?","pipeline.editor.discard.body":"你的编辑会丢失。","pipeline.editor.errors":"YAML 解析错误","pipeline.editor.list":"流水线","pipeline.editor.list.add":"新建流水线","pipeline.editor.list.delete":"删除流水线","pipeline.editor.list.use":"设为当前","pipeline.editor.list.activeBadge":"当前","pipeline.editor.list.sample":"示例","pipeline.editor.delete.confirm.title":"删除流水线 {name}?","pipeline.editor.delete.confirm.body":"此操作不可撤销。","pipeline.newDialog.title":"新建流水线","pipeline.newDialog.field.filename":"文件名","pipeline.newDialog.field.filename.help":"只允许字母、数字、_ 和 -;自动追加 .yaml","pipeline.newDialog.field.copyFrom":"复制自","pipeline.newDialog.copyFrom.sample":"示例模板","pipeline.newDialog.copyFrom.active":"当前活动","pipeline.newDialog.create":"创建","projectDetail.tab.overview":"概览","projectDetail.tab.config":"配置","projectDetail.tab.pipelines":"流水线","projectDetail.tab.danger":"危险操作","projectDetail.openBoard":"看板","projectDetail.overview.repoDir":"仓库路径","projectDetail.overview.pmBackend":"PM 后端","projectDetail.overview.agent":"Agent","projectDetail.overview.cards":"卡片","projectDetail.overview.cards.value":"共 {total} 张 · {inprogress} 进行中 · {done} 完成","projectDetail.overview.workers":"Worker","projectDetail.overview.workers.value":"共 {total} 个({active} 活跃)","projectDetail.overview.pipeline":"Pipeline","projectDetail.overview.lastActivity":"最近活动","projectDetail.overview.notFound":"项目 {name} 不存在或无法读取。","projectDetail.config.confDirty":"● 未保存的修改","projectDetail.config.reload":"重新加载","projectDetail.config.save":"保存","projectDetail.config.saveAria":"保存配置","projectDetail.config.editorAria":"conf 文件编辑器","projectDetail.config.error.conflict.title":"配置已被其他地方修改","projectDetail.config.error.conflict.body":'conf 文件在你编辑期间被改过。点"重新加载"后再编辑。',"projectDetail.config.error.save.title":"保存失败","projectDetail.config.error.load":"加载失败:{detail}","projectDetail.pipelines.title":"流水线","projectDetail.pipelines.add":"新建流水线","projectDetail.pipelines.empty":'还没有流水线文件。点"新建流水线"开始。',"projectDetail.pipelines.activeBadge":"当前","projectDetail.pipelines.edit":"编辑","projectDetail.pipelines.editAria":"编辑 {name}","projectDetail.pipelines.switch":"切换","projectDetail.pipelines.switchAria":"切换到 {name}","projectDetail.pipelines.switch.confirm.title":"切换到 {name}","projectDetail.pipelines.switch.confirm.body":"当前 project.yaml 会被 {name} 的内容覆盖。继续?","projectDetail.pipelines.switch.confirm.button":"切换","projectDetail.pipelines.switch.error":"切换失败","projectDetail.pipelines.delete.confirm.title":"删除 {name}","projectDetail.pipelines.delete.confirm.body":"这个流水线文件会被永久删除。","projectDetail.pipelines.delete.error":"删除失败","projectDetail.pipelines.deleteAria":"删除 {name}","projectDetail.pipelines.create.error":"创建失败","projectDetail.danger.title":"删除项目","projectDetail.danger.body":"这会清理 {path}(包括所有卡片、runtime、logs)。","projectDetail.danger.includeClaude.label":"同时清理 repo 的 .claude/","projectDetail.danger.includeClaude.note":"repo 本身不动,只清这个目录。","projectDetail.danger.confirmPrompt":"输入项目名 {name} 确认:","projectDetail.danger.deleteAria":"永久删除项目","projectDetail.danger.deleteButton":"永久删除","projectDetail.danger.deleted.title":"已删除","projectDetail.danger.deleted.bodyWithList":`项目已删除。同时清理了:
|
|
422
|
+
{paths}`,"projectDetail.danger.deleted.body":"项目已删除。","projectDetail.danger.error":"删除失败","pipelineEditor.close":"关闭","pipelineEditor.error.conflict.title":"文件已被其他地方修改","pipelineEditor.error.yaml.title":"YAML 语法错误","pipelineEditor.error.save.title":"保存失败","pipelineEditor.error.serialize.title":"YAML 序列化失败","pipelineEditor.error.load":"加载失败:{detail}","pipelineEditor.mode.structured":"结构化","pipelineEditor.mode.yaml":"原始 YAML","pipelineEditor.parseError.prefix":"YAML 解析:{detail}","pipelineEditor.activeWarning":"⚠ 这是当前激活的流水线,保存后下一轮 tick 生效","pipelineEditor.yamlAria":"pipeline YAML 编辑器","pipelineEditor.status.unsaved":"● 未保存","pipelineEditor.status.saved":"已保存","pipelineEditor.status.noChanges":"无变化","pipelineEditor.reload":"重新加载","pipelineEditor.save":"保存","pipelineEditor.saveAria":"保存 pipeline","pipelineEditor.activeBadge":"当前","pipelineEditor.modeHint":"project = 事件驱动流水线(默认) · steps = 顺序脚本","pipelineEditor.stages.heading":"Stages({count})","pipelineEditor.stages.add":"添加 stage","pipelineEditor.stages.empty":'还没 stage。点"添加 stage"开始。',"pipelineEditor.stage.name.hint":"stage 唯一名","pipelineEditor.stage.profile.hint":"skill 画像,可空","pipelineEditor.stage.cardState.hint":"本 stage 期间卡片状态","pipelineEditor.stage.timeout.hint":"可选,如 30m 2h","pipelineEditor.stage.trigger.hint":"触发条件,可空走默认","pipelineEditor.stage.onComplete.hint":"成功后动作","pipelineEditor.stage.onFail.action.hint":"失败时动作,如 label NEEDS-FIX","pipelineEditor.stage.onFail.comment.hint":"写进卡片的注释","pipelineEditor.stage.halt.note":"(失败后停流水线;去掉则继续下一张卡)","pipelineEditor.stage.moveUp":"上移","pipelineEditor.stage.moveDown":"下移","pipelineEditor.stage.remove":"删除 stage","newPipelineDialog.title":"新建流水线","newPipelineDialog.field.filename.label":"文件名","newPipelineDialog.field.filename.placeholder":"例如 ci","newPipelineDialog.field.filename.help":"实际会保存为 {filename}。只允许 a-z A-Z 0-9 _ -;已有同名文件会 409 报错。","newPipelineDialog.section.template":"初始内容","newPipelineDialog.template.blank.label":"空白模板","newPipelineDialog.template.blank.desc":"最简 1 stage(develop → Done)","newPipelineDialog.template.sample.label":"教学模板","newPipelineDialog.template.sample.desc":"从 sample.yaml.example 复制(带注释,讲解所有字段)","newPipelineDialog.template.sample.unavailable":"sample.yaml.example 不存在","newPipelineDialog.template.active.label":"复制当前活动的","newPipelineDialog.template.active.desc":"从 project.yaml 复制(基于目前的配置改)","newPipelineDialog.template.active.unavailable":"project.yaml 不存在","newPipelineDialog.create.aria":"创建 pipeline","newPipelineDialog.cancel":"取消","board.title":"看板 ✨","board.title.bare":"看板","board.subtitle":"{name} · {cards} 张卡片 · {workers} workers 活跃","board.pickPrompt.title":"选择一个项目 🎯","board.pickPrompt.body":"看板按项目分。挑一个开始:","board.action.start":"启动","board.action.stop":"停止","board.action.startAria":"启动 pipeline","board.action.stopAria":"停止 pipeline","board.action.startError":"启动 pipeline 失败","board.action.stopError":"停止 pipeline 失败","board.action.reset":"重置","board.action.resetError":"重置失败","board.action.reset.confirm.title":"重置整个流水线","board.action.reset.confirm.body":"这会清空所有卡片的运行状态、worker marker、分支。不可撤销。","board.action.reset.confirm.button":"重置全部","board.action.newCard":"新卡片","board.action.newCard.error":"新建卡片失败","board.action.moveCard.error":"移动卡片失败","board.search.placeholder":"搜索标题 / skill / label…","board.search.aria":"搜索卡片","board.filter.clear":"清空","board.filter.clearAria":"清空筛选","board.filter.aria":"按 {label} 筛选","board.filter.clearSelection":"清空选择","board.error.loadCards":"加载卡片失败","board.col.planning":"Planning","board.col.backlog":"Backlog","board.col.todo":"Todo","board.col.inprogress":"Inprogress","board.col.qa":"QA / Review","board.col.done":"Done","kanban.checklist.label":"检查清单 {done}/{total}","kanban.checklist.more":"… 还有 {count} 条","kanban.column.empty":"— 空 —","kanban.time.justNow":"刚才","kanban.time.minutes":"{n} 分钟前","kanban.time.hours":"{n} 小时前","kanban.time.days":"{n} 天前","newCard.title":"新建卡片","newCard.field.title":"标题 *","newCard.field.title.placeholder":"例如:接入 GitHub OAuth 登录","newCard.field.title.help":"写简短明了的目标(<200 字符)","newCard.field.description":"描述","newCard.field.description.placeholder":"用户故事、需求、验收标准、参考资料… Claude 启动时会读这里的内容","newCard.field.description.help":"支持 markdown。空的话就只有 title,Claude 只能靠 title 推断要做啥。","newCard.field.skills":"技能","newCard.field.skills.help":"勾选哪些 skill 会被加载(走 frontmatter `skills:`)。不选也行,Worker 默认加载项目级 skills。","newCard.field.skills.loading":"加载 skill 列表…","newCard.field.skills.error":"skill 列表加载失败,不影响创建:{detail}","newCard.field.skills.selected":"已选 {count} 个:{names}","newCard.field.dispatch":"派发","newCard.field.dispatch.label":"立即派发执行(直接进 Backlog)","newCard.field.dispatch.help":"默认不勾:卡进 Planning 暂存,等你看板上拖到 Backlog 再开工。勾上:跳过暂存,下次 tick 直接派 worker 跑。","newCard.create.aria":"创建卡片","cardDetail.loading":"加载中…","cardDetail.error.load":"卡片加载失败","cardDetail.tabs.overview":"概览","cardDetail.tabs.body":"描述","cardDetail.tabs.checklist":"检查清单","cardDetail.tabs.history":"历史","cardDetail.tabs.actions":"操作","cardDetail.field.state":"状态","cardDetail.field.skills":"技能","cardDetail.field.labels":"标签","cardDetail.field.branch":"分支","cardDetail.field.assignee":"处理人","cardDetail.field.created":"创建时间","cardDetail.field.updated":"更新时间","cardDetail.field.empty":"—","cardDetail.actions.delete":"删除卡片","cardDetail.actions.delete.confirm.title":"删除卡片 #{seq}","cardDetail.actions.delete.confirm.body":"该卡片会被永久删除。","cardDetail.actions.delete.error":"删除失败","cardDetail.actions.update.error":"更新失败","cardDetail.body.empty":"没有描述","cardDetail.checklist.empty":"没有检查清单","cardDetail.checklist.progress":"进度 {done}/{total}","cardDetail.history.empty":"没有历史记录","cardDetail.notFound":"卡片 #{seq} 不存在","cardDetail.copy.aria":"复制 seq","cardDetail.close.aria":"关闭","cardDetail.save":"保存","cardDetail.saving":"保存中…","workers.title":"Workers 👷","workers.summary":"跨 {projects} 项目 · {running} 跑 · {starting} 启动 · {stuck} 卡 · {crashed} 崩 · {idle} 闲","workers.summary.stuck":"{n} 卡","workers.summary.crashed":"{n} 崩","workers.refresh.aria":"刷新","workers.refresh":"刷新","workers.error.load":"加载失败:{detail}","workers.empty.hint":"点击项目 / worker 查看详情","logs.title":"日志 📜","logs.subtitle.allProjects":"全部项目","logs.subtitle.project":"{name} 实时日志","logs.filter.errors":"只看错误","logs.filter.errors.aria":"只显示错误","logs.filter.search.placeholder":"过滤消息…","logs.empty":"还没有日志 —— 等待事件中","logs.error.load":"日志加载失败","logs.refresh":"刷新","logs.refresh.aria":"刷新日志","logs.scroll.bottom.aria":"滚动到底部","logs.scroll.pause":"已暂停(自动滚动关闭)","logs.scroll.resume":"恢复自动滚动","logs.subtitle.allProjectsCount":"全部项目({count})","logs.poll.5s":"5s 轮询","logs.paused":"⏸ 已暂停","logs.mode.live":"实时","logs.mode.history":"历史","logs.history.startAria":"查询起始时间","logs.history.queryAria":"查询","logs.history.query":"查询","logs.filter.project.aria":"筛选项目","logs.filter.project.all":"全部项目","logs.filter.keyword.placeholder":"过滤关键字…","logs.filter.keyword.aria":"过滤日志","logs.empty.match":"没有匹配的日志","skills.title":"技能 🧠","skills.subtitle":"跨项目共用的 skill(用 `sps skill ...` 管理)","skills.empty.title":"还没有 skill","skills.empty.hint":"运行 {cmd} 同步 bundled skills。","skills.linked.tooltip":"已链接到该项目","skills.frozen.tooltip":"已冻结(项目独立副本)","skills.category.all":"全部","skills.category.language":"语言","skills.category.end":"终端","skills.category.persona":"角色","skills.category.workflow":"流程","skills.category.other":"其它","skills.subtitleCount":"{count} 个 user-level skill","skills.search.placeholder":"搜索 skill…","skills.search.aria":"搜索 skill","skillDetail.actionFailed":"{label}失败","skillDetail.unfreezeAction":"解冻","skillDetail.freezeAction":"冻结","skillDetail.removeAction":"移除","skillDetail.removeConfirm.title":"从 {project} 移除 {name}","skillDetail.removeConfirm.body":"skill 链接会被解除,项目后续运行时将无法使用该 skill。","skillDetail.removeConfirm.button":"移除","skillDetail.unfreezeConfirm.title":"解冻 {name} @ {project}","skillDetail.unfreezeConfirm.body":"本地对这个 skill 的改动会被覆盖,回到最新共享版本。","skillDetail.unfreezeConfirm.button":"解冻","skillDetail.close.aria":"关闭","skillDetail.loading":"加载中…","skillDetail.error.load":"加载失败:{detail}","skillDetail.section.projects":"项目链接状态","skillDetail.section.empty":"还没有任何项目。先去创建一个项目。","skillDetail.section.preview":"SKILL.md 预览","skillDetail.toggleSection.aria":"{action} {file}","skillDetail.expand":"展开","skillDetail.collapse":"收起","system.title":"系统 🛠","system.subtitle":"全局配置 + 诊断 + 升级","system.section.env":"全局 env","system.section.env.help":"存储在 ~/.coral/env(mode 600)。所有项目共用。","system.section.env.save":"保存 env","system.section.env.error.conflict":"env 已被其它地方修改","system.section.env.error.save":"保存 env 失败","system.section.env.error.load":"加载 env 失败","system.section.env.dirtyDot":"● 未保存","system.section.env.aria":"env 编辑器","system.section.env.reload":"重新加载","system.section.upgrade":"升级","system.section.upgrade.current":"当前:v{version}","system.section.upgrade.latest":"npm 最新:v{version}","system.section.upgrade.uptodate":"已是最新","system.section.upgrade.update":"立即升级","system.section.upgrade.upgrading":"升级中…","system.section.upgrade.checking":"正在查询 npm…","system.section.upgrade.checkError":"查询失败:{detail}","system.section.upgrade.upgradeError":"升级失败:{detail}","system.section.upgrade.upgradeError.title":"升级失败","system.section.upgrade.command":"或在终端执行:{cmd}","system.section.upgrade.runningPipelines":"有 pipeline 在跑,先停止:{projects}","system.section.diagnostics":"诊断","system.section.diagnostics.help":"一次性跑所有项目的 sps doctor,看哪些项目出问题","system.section.diagnostics.run":"运行诊断","system.section.diagnostics.running":"运行中…","system.section.diagnostics.empty":"没有项目","system.section.diagnostics.checkAria":"检查 {project}","system.section.diagnostics.statusOk":"正常","system.section.diagnostics.statusFail":"有问题","system.section.diagnostics.error":"诊断失败:{detail}","system.h1":"系统 ⚙️","system.runtime":"运行时","system.memory.title":"记忆后端","system.memory.desc":"全局设置:worker 的记忆读写走哪个后端。改动对新派发的卡生效。","system.memory.provider":"后端","system.memory.url":"自定义 URL","system.memory.url.placeholder":"http://127.0.0.1:3111","system.memory.save":"保存","system.memory.save.aria":"保存记忆后端设置","system.memory.saved":"已保存","system.memory.error":"保存失败","system.memory.opt.none":"关闭(none)","system.memory.opt.builtin":"本地文件记忆(builtin)","system.memory.opt.agentmemory":"agentmemory(语义库)","system.memory.opt.custom":"自定义 REST(custom)","system.env.title.code":"~/.coral/env","system.env.title.prefix":"全局配置 ","system.env.edit.aria":"编辑 env 文件","system.env.edit.button":"编辑","system.env.editing.label":"⚠ 编辑模式","system.env.empty.before":'env 文件不存在。点"编辑"或者终端运行 ',"system.env.empty.after":"。","system.env.warning":"⚠ 文件包含凭证明文。保存时保持 0600 权限。","system.env.aria":"env 文件编辑器","system.env.dirtyMark":" · ● 未保存","system.env.cancel":"取消","system.env.save":"保存","system.env.save.aria":"保存 env","system.env.error.conflict.title":"env 被其他地方修改了","system.env.error.save.title":"保存失败","system.env.error.conflict.body":"请点取消后重开编辑。","system.upgrade.title":"版本","system.upgrade.checkLatest.aria":"检查最新版本","system.upgrade.checkUpdate":"检查更新","system.upgrade.label.current":"sps-cli(当前)","system.upgrade.label.latest":"npm(最新)","system.upgrade.latestPill":"最新","system.upgrade.button.upgradeAria":"升级到最新版本","system.upgrade.button.upgrade":"升级","system.upgrade.button.copyAria":"复制升级命令","system.upgrade.button.copyTitle":"自动升级失败时手动跑","system.upgrade.button.copy":"复制命令","system.upgrade.label.installed":"已安装","system.upgrade.installed.ok":"已生效(重启 console 后可见)","system.upgrade.installed.fail":"未升级成功","system.upgrade.label.check":"检查","system.upgrade.confirm.title":"升级 sps-cli","system.upgrade.confirm.body":"当前 {current},升级到 {latest}。要求所有 pipeline 已停止。升级后请重启 sps console 生效。","system.upgrade.confirm.button":"升级","system.upgrade.success.title":"升级完成","system.upgrade.success.body":'装上了 v{version}。请 `pkill -f "sps console"` 再重启以生效。',"system.upgrade.notEffective.title":"升级未生效","system.upgrade.notEffective.same":"npm 执行完毕但版本没变(仍 {version})——多半是权限或 registry 问题。可复制下面的命令在终端手动跑。","system.upgrade.notEffective.notInstalled":"npm 没装上新版本。可复制命令手动跑,或看下面日志定位。","system.upgrade.error.title":"升级失败","system.upgrade.copy.success.title":"命令已复制","system.upgrade.copy.success.body":`粘贴到终端运行即可:
|
|
423
|
+
{cmd}`,"system.upgrade.copy.fail.title":"复制失败","system.upgrade.copy.fail.body":`请手动复制:
|
|
424
|
+
{cmd}`,"system.diagnostics.title":"项目健康检查","system.diagnostics.checkAll":"检查全部","system.diagnostics.empty":"还没有项目。","system.diagnostics.expandAria":"展开","system.diagnostics.collapseAria":"折叠","system.diagnostics.never":'点 "检查" 运行 sps doctor',"system.diagnostics.checkAria":"检查","system.diagnostics.check":"检查","system.diagnostics.noFixesNeeded":"已无可修问题","system.diagnostics.fix.tip":"调 sps doctor <proj> --fix:自动创建 .claude/hooks/stop.sh、state.json 等","system.diagnostics.fixAria":"自动修复","system.diagnostics.fix":"修复","system.diagnostics.fixed":"已修复","system.diagnostics.error.fix":"doctor 修复失败","system.diagnostics.error.check":"doctor 检查失败","chat.title":"对话 💬","chat.empty.title":"对话 💬","chat.empty.hint":'点左上角"新建对话"开始一个 session。或直接在下方输入,会自动建 session。',"chat.empty.shortcuts":"Enter 发送 · Shift+Enter 换行 · 内容流式返回","chat.list.heading":"历史 {count}","chat.list.new":"新建对话","chat.list.empty":"还没对话。点上面新建。","chat.list.delete.aria":"删除对话","chat.list.deleteCli.aria":"从 Console 移除该 CLI 会话(不影响 Claude jsonl 存档)","chat.list.openAria":"打开对话 {title}{cwd}","chat.list.cwdSuffix":"(工作目录 {cwd})","chat.list.msgs":"{count} 条 · {time}","chat.list.olderToggle":"更早 · {count} 条","chat.detail.model.tooltip":"当前使用的模型","chat.detail.claudeSession.tooltip":"底层 claude 会话 id —— 恢复会话与记忆的锚","chat.delete.confirm.title":"删除对话","chat.delete.confirm.body.cli":"会从 Console 列表移除(停 daemon 会话)。Claude CLI 在 ~/.claude/projects 下的对话存档会保留 —— 想恢复到终端继续聊就重新跑 sps agent --chat --name <名>。","chat.delete.confirm.body.console":"对话记录会永久删除,不可恢复。","chat.delete.confirm.button":"删除","chat.cli.banner.bold":"CLI 会话","chat.cli.banner":"这是 CLI 会话(由 sps agent 创建),Console 仅展示历史。续聊请在终端运行:","chat.input.placeholder":"说点什么… (Enter 发送,Shift+Enter 换行,可拖入文件 / 粘贴图片)","chat.input.dragOver":"松开鼠标以附加文件…","chat.input.aria":"消息输入","chat.input.attach.aria":"附加本地文件","chat.input.attach.title":"附加本地文件(也可拖拽 / 粘贴图片)","chat.input.send":"发送","chat.input.send.aria":"发送","chat.input.interrupt":"中断","chat.input.interrupt.aria":"中断生成","chat.input.uploading":"上传中…","chat.input.removeAttachment":"移除 {name}","chat.error.interrupt.title":"中断失败","chat.cliBadge":"CLI","chat.cliBadge.tooltip":"该会话由 sps agent CLI 创建,从 Claude jsonl 实时读取(只读)","chat.session.title":"{title}","chat.session.id":"{id}","chat.session.empty":"下方输入问题开始对话 · Enter 发送 · Shift+Enter 换行","notFound.title":"404","notFound.body":"这个页面不存在。","notFound.home":"回到首页","workers.active.empty":"没有 worker 在运行。","workers.alerts.allHealthy":"全部 worker 健康","workers.alerts.pidDead":"PID 已死。","workers.alerts.markerStale":"marker 停 {ago}。","workers.capacity.col.project":"项目","workers.capacity.col.usage":"占用","workers.capacity.col.other":"其它","workers.capacity.detailHint":"详情 →","workers.panel.boardLink":"看板 →","workers.panel.loading":"加载 workers…","workers.panel.empty.slots":"该项目没有 worker slot。","workers.panel.empty.noWorker":"无 worker","workers.panel.empty.pickOne":"请选择一个 worker","workers.panel.idle.short":"空闲","workers.panel.section.currentCard":"当前卡片","workers.panel.idle.full":"slot 空闲,没有当前卡片。","workers.panel.section.claudeOutput":"Claude 输出 · 最近 {n} 行","workers.panel.output.loading":"加载中…","workers.panel.output.empty":"还没收到 session 输出。Worker 刚启动时需要几秒。","workers.panel.section.heartbeat":"Supervisor 心跳 · 最近 {n} 行","workers.panel.heartbeat.fullLog":"查看完整 log →","workers.panel.action.restart":"重启","workers.panel.action.restart.confirm.title":"重启 worker-{slot}","workers.panel.action.restart.confirm.body":"先杀进程,再重新 launch 到 #{seq}","workers.panel.action.restart.confirm.button":"重启","workers.panel.action.restart.error":"重启失败","workers.panel.action.kill":"终止","workers.panel.action.kill.confirm.title":"终止 worker-{slot}","workers.panel.action.kill.confirm.body":"当前任务强制中断。","workers.panel.action.kill.confirm.button":"终止","workers.panel.action.kill.error":"终止失败","dialog.confirm.default":"确定","dialog.alert.default":"知道了","dialog.cancel.default":"取消","dirPicker.title.default":"选择目录","dirPicker.close.aria":"关闭","dirPicker.up.aria":"上级目录","dirPicker.up.title":"上级目录","dirPicker.home.aria":"回到 Home","dirPicker.home.title":"回到 Home","dirPicker.loading":"加载中...","dirPicker.error.title":"读取失败","dirPicker.empty":"— 空目录 —","dirPicker.enter.aria":"进入 {name}/","dirPicker.pickFile.aria":"选择 {name}(双击直接确认)","dirPicker.fileLocked":"文件不可选","dirPicker.cancel":"取消","dirPicker.useFile":"使用此文件","dirPicker.useFile.tooltip.empty":"请先点选一个文件","dirPicker.useDir":"选此目录","errorBoundary.title":"💥 UI 崩了","errorBoundary.refresh":"刷新页面","chat.error.create.title":"新建对话失败","chat.error.send.title":"发送失败","chat.error.fileTooBig.title":"文件超过上限","chat.error.fileTooBig.body":"单文件上限 50 MB;当前 {size} MB({name})","chat.error.uploadAttachment.title":"附件上传失败","chat.placeholder.attachment":"(附件)","chat.placeholder.viewAttachment":"(请查看附件)","chat.placeholder.attachmentTitle":"附件","chat.attachment.previewTooltip":`{name}
|
|
425
|
+
{path}
|
|
426
|
+
点击预览`,"chat.attachment.previewSimpleTooltip":`{name}
|
|
427
|
+
点击放大`,"chat.attachment.preview.aria":"预览 {name}","chat.attachment.close.aria":"关闭","chat.attachment.readErr":"读取失败:{detail}","chat.attachment.loading":"加载中...","chat.attachment.unsupported":"此文件类型不支持内联预览。","chat.attachment.download":"下载","chat.message.role.you":"你","chat.message.role.error":"错误","chat.message.role.assistant":"assistant","chat.message.truncated":"⚠ 输出超过 10MB,已截断","chat.filePicker.title":"选择附件文件","chat.newSession.title":"新建对话","chat.newSession.title.aria":"新建对话","chat.newSession.close.aria":"关闭","chat.newSession.field.agent":"Agent","chat.newSession.field.title":"标题(可选)","chat.newSession.field.title.placeholder":"留空 = 自动用首条消息生成","chat.newSession.field.cwd":"工作目录(可选)","chat.newSession.field.cwd.browse":"浏览","chat.newSession.field.cwd.browseAria":"浏览选择目录","chat.newSession.field.cwd.title":"选择目录","chat.newSession.field.cwd.help1":"Agent 在该目录下读写文件。绝对路径,必须存在。","chat.newSession.field.cwd.help2":"留空则用 daemon 启动时的目录。","chat.newSession.cancel":"取消","chat.newSession.create":"创建","cardModal.editing":"⚠ 编辑中","cardModal.title.aria":"卡片标题","cardModal.editAria":"编辑卡片","cardModal.edit":"编辑","cardModal.close.aria":"关闭","cardModal.error.save.title":"保存失败","cardModal.error.load":"加载失败:{detail}","cardModal.skills.loading":"加载 skill 列表…","cardModal.label.removeAria":"删除 {label}","cardModal.label.addPlaceholder":"+ 添加 label","cardModal.label.addAria":"添加 label","cardModal.label.note":"注意:AI-PIPELINE / STARTED-* / COMPLETED-* / NEEDS-FIX 由流水线自动管理,手动改可能被覆盖","cardModal.section.description":"描述","cardModal.section.empty":"(空)","cardModal.section.checklist":"检查清单","cardModal.checklist.empty":"暂无清单项。在描述里用 `- [ ] 项` 语法添加。","cardModal.section.log":"日志","cardModal.body.aria":"卡片描述","cardModal.body.replaceNote":'只替换 "## 描述" 段的内容;检查清单和日志段不动。',"cardModal.action.launch":"启动 worker","cardModal.action.launch.disabledDone":"卡片已完成;先拖回 Todo 再启动","cardModal.action.launch.disabledRunning":"Pipeline 正在跑——supervisor 会自动 dispatch,无需手动启动","cardModal.action.launch.error":"启动 worker 失败","cardModal.action.reset":"重置卡片","cardModal.action.reset.confirm.title":"重置卡片 #{seq}","cardModal.action.reset.confirm.body":"卡片状态会回到初始,已做的 checklist 会清空。","cardModal.action.reset.confirm.button":"重置","cardModal.action.reset.error":"重置失败","cardModal.action.delete":"删除卡片","cardModal.action.delete.confirm1.title":"删除卡片 #{seq}","cardModal.action.delete.confirm1.body":'即将删除 "{title}"。此操作不可恢复(md 文件将被物理删除)。是否继续?',"cardModal.action.delete.confirm1.button":"继续","cardModal.action.delete.confirm2.title":"最终确认","cardModal.action.delete.confirm2.body":"请再次确认删除卡片 #{seq}。","projectDetail.tab.skills":"技能","projectDetail.tab.rules":"规则","projectDetail.skills.title":"Skill 白名单","projectDetail.skills.desc":"选择本项目加载哪些 skill。收窄 worker、subagent 与 chat 能看到的范围,降低 token 消耗。","projectDetail.skills.noPolicy":"未设白名单 —— 全部 skill 都可用(subagent 会从磁盘吃全量)。","projectDetail.skills.hasPolicy":"白名单已生效 —— {count} 个 skill 合格。","projectDetail.skills.save":"保存白名单","projectDetail.skills.clear":"清除(加载全部)","projectDetail.skills.saveError":"保存白名单失败","projectDetail.skills.applied":"已保存。投影 {linked} 个链接,清理 {pruned} 个。","projectDetail.skills.unknown":"未识别的 skill 名(已忽略):{names}","projectDetail.skills.empty":"尚无已安装的 skill,先跑 `sps skill sync`。","projectDetail.skills.selectAll":"全选","projectDetail.skills.selectNone":"全不选","projectDetail.rules.title":"项目规则(只读)","projectDetail.rules.readonly":"sps-cli 只读这些文件。编辑在项目创建时或日后由 agent 协助完成。","projectDetail.rules.missing":"不存在","nav.prompts":"提示词","prompts.title":"提示词库","prompts.desc":"带 {{变量}} 模板的可复用提示词,可插入到会话中。","prompts.new":"新建提示词","prompts.search":"搜索提示词…","prompts.empty":"还没有提示词,新建一个。","prompts.name":"名称","prompts.namePlaceholder":"kebab-case,如 code-review","prompts.nameError":"名称须为 kebab-case(小写字母、数字、连字符)。","prompts.description":"描述","prompts.tags":"标签","prompts.tagsPlaceholder":"逗号,分隔","prompts.body":"正文","prompts.bodyPlaceholder":"写你的提示词。用 {{变量}} 做填充位。","prompts.favorite":"收藏","prompts.save":"保存","prompts.delete":"删除","prompts.deleteConfirm":"删除提示词「{name}」?会移除文件。","prompts.saveError":"保存提示词失败","prompts.vars":"变量:{names}","prompts.noVars":"无变量","prompts.insert":"插入提示词","skills.import":"导入","skills.import.title":"导入 Skill","skills.import.name":"名称(kebab-case)","skills.import.body":"SKILL.md 内容","skills.import.submit":"导入","skills.import.error":"导入失败","skills.export":"导出 SKILL.md","skills.updates.badge":"有 {count} 个可更新","skills.updates.none":"已是最新"},zN=A.createContext(null),PN="sps-console-lang";function qL(){if(typeof window>"u")return"en";try{const e=window.localStorage.getItem(PN);if(e==="en"||e==="zh")return e}catch{}return"en"}function HL(e){try{window.localStorage.setItem(PN,e)}catch{}}function KL({children:e}){const[t,n]=A.useState(()=>qL());A.useEffect(()=>{typeof document<"u"&&(document.documentElement.lang=t==="zh"?"zh-CN":"en")},[t]);const r=A.useCallback(l=>{n(l),HL(l)},[]),a=A.useMemo(()=>{const l=t==="zh"?FL:$L;return(u,f)=>{let h=l[u]??u;if(f)for(const[g,m]of Object.entries(f))m!==void 0&&(h=h.replace(`{${g}}`,String(m)));return h}},[t]),o=A.useMemo(()=>({lang:t,setLang:r,t:a}),[t,r,a]);return d.jsx(zN.Provider,{value:o,children:e})}function BN(){const e=A.useContext(zN);if(!e)throw new Error("useLang must be used inside I18nProvider");return e}function Le(){return BN().t}function GL(){const{lang:e,setLang:t,t:n}=BN();return d.jsxs("div",{role:"group","aria-label":n("lang.toggle.aria"),className:"flex border-2 border-[var(--color-text)] rounded-lg overflow-hidden shadow-[2px_2px_0_var(--color-text)]",children:[d.jsx(J1,{active:e==="en",onClick:()=>t("en"),label:n("lang.en"),ariaLabel:"English"}),d.jsx(J1,{active:e==="zh",onClick:()=>t("zh"),label:n("lang.zh"),ariaLabel:"中文"})]})}function J1({active:e,onClick:t,label:n,ariaLabel:r}){return d.jsx("button",{type:"button",onClick:t,"aria-label":r,"aria-pressed":e,className:["flex-1 py-1.5 text-xs font-bold font-[family-name:var(--font-mono)] cursor-pointer transition-colors",e?"bg-[var(--color-accent-mint)] text-[var(--color-text)]":"bg-[var(--color-bg)] text-[var(--color-text-muted)] hover:bg-[var(--color-bg-cream)]"].join(" "),children:n})}const VL=[{to:"/chat",labelKey:"nav.chat",icon:CN},{to:"/projects",labelKey:"nav.projects",icon:_N},{to:"/board",labelKey:"nav.board",icon:HR},{to:"/workers",labelKey:"nav.workers",icon:LN},{to:"/logs",labelKey:"nav.logs",icon:qu},{to:"/skills",labelKey:"nav.skills",icon:IR},{to:"/prompts",labelKey:"nav.prompts",icon:jN},{to:"/arrange",labelKey:"nav.arrange",icon:Db},{to:"/plugins",labelKey:"nav.plugins",icon:lL},{to:"/system",labelKey:"nav.system",icon:MN},{to:"/processes",labelKey:"nav.processes",icon:oh},{to:"/audit",labelKey:"nav.audit",icon:TN},{to:"/memory",labelKey:"nav.memory",icon:oR}];function YL(){const e=Le();return d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"font-[family-name:var(--font-heading)] font-bold text-lg px-3 pt-2 pb-4 flex items-center gap-3 text-[var(--color-text)]",children:[d.jsx("span",{className:"w-5 h-5 rounded-md bg-[var(--color-accent-mint)] border-2 border-[var(--color-text)] shadow-[2px_2px_0_var(--color-text)]"}),e("app.title")]}),d.jsx("nav",{className:"flex flex-col gap-1.5 mt-2","aria-label":e("nav.aria"),children:VL.map(t=>{const n=t.icon;return d.jsxs(bN,{to:t.to,className:({isActive:r})=>["flex items-center gap-3 px-3 py-2.5 rounded-xl font-semibold text-sm cursor-pointer transition-transform duration-150","border-2 border-transparent",r?"bg-[var(--color-accent-mint)] border-[var(--color-text)] shadow-[3px_3px_0_var(--color-text)] font-bold":"text-[var(--color-text)] hover:bg-[var(--color-bg-cream)] hover:border-[var(--color-text)] hover:shadow-[3px_3px_0_var(--color-text)] hover:-translate-x-px hover:-translate-y-px"].join(" "),children:[d.jsx(n,{size:18,strokeWidth:2.5}),e(t.labelKey)]},t.to)})}),d.jsx("div",{className:"mt-auto pt-3",children:d.jsx(GL,{})})]})}class Ob extends Error{constructor(t,n,r){super(n),this.status=t,this.detail=r,this.name="ApiError"}}async function ht(e){const t=await fetch(e,{headers:{Accept:"application/json"}});if(!t.ok){let n;try{n=await t.json()}catch{n=await t.text()}throw new Ob(t.status,`${t.status} ${t.statusText}`,n)}return await t.json()}async function Rb(e,t){return $N("POST",e,t)}async function UN(e,t){return $N("PUT",e,t)}async function QL(e){const t=await fetch(e,{method:"DELETE",headers:{Accept:"application/json"}});if(!t.ok){let n;try{n=await t.json()}catch{n=await t.text()}throw new Ob(t.status,`${t.status} ${t.statusText}`,n)}}async function $N(e,t,n){const r=await fetch(t,{method:e,headers:{Accept:"application/json","Content-Type":"application/json"},body:n===void 0?void 0:JSON.stringify(n)});if(!r.ok){let a;try{a=await r.json()}catch{a=await r.text()}throw new Ob(r.status,`${r.status} ${r.statusText}`,a)}return await r.json()}function FN(){return ht("/api/system/info")}function WL(){return ht("/api/system/env")}function XL(){return ht("/api/system/env/raw")}async function ZL(e,t){const n=await fetch("/api/system/env",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:e,etag:t})});if(!n.ok){const r=await n.text(),a=new Error(`${n.status}: ${r}`);throw a.status=n.status,a}return n.json()}function JL(){return ht("/api/system/memory")}async function e3(e,t){const n=await fetch("/api/system/memory",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:e,url:t})});if(!n.ok)throw new Error(`${n.status}: ${await n.text()}`);return n.json()}function qN(){return ht("/api/system/agents")}async function t3(e){const t=await fetch("/api/system/agents",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw new Error(`${t.status}: ${await t.text()}`);return t.json()}function n3(){return ht("/api/system/latest-version")}async function r3(){const e=await fetch("/api/system/upgrade",{method:"POST"});if(!e.ok&&e.status!==409)throw new Error(`${e.status}: ${await e.text()}`);return e.json()}async function i3(e,t=!1){const n=t?"?fix=1":"",r=await fetch(`/api/system/doctor/${encodeURIComponent(e)}${n}`,{method:"POST"});if(!r.ok)throw new Error(`${r.status}: ${await r.text()}`);return r.json()}function ga(){return ht("/api/projects")}function a3(e){return ht(`/api/projects/${encodeURIComponent(e)}`)}async function s3(e){const t=await fetch("/api/projects",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok){const n=await t.text();throw new Error(`${t.status}: ${n}`)}return t.json()}function o3(e){return ht(`/api/projects/${encodeURIComponent(e)}/conf`)}async function l3(e,t,n){const r=await fetch(`/api/projects/${encodeURIComponent(e)}/conf`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:t,etag:n})});if(!r.ok){const a=await r.text(),o=new Error(`${r.status}: ${a}`);throw o.status=r.status,o}return r.json()}async function c3(e,t={}){const n=await fetch(`/api/projects/${encodeURIComponent(e)}`,{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){const r=await n.text();throw new Error(`${n.status}: ${r}`)}return n.json()}function u3(e){return ht(`/api/projects/${encodeURIComponent(e)}/pipelines`)}async function d3(e,t){const n=await fetch(`/api/projects/${encodeURIComponent(e)}/pipeline`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({pipeline:t})});if(!n.ok){const r=await n.text();throw new Error(`${n.status}: ${r}`)}return n.json()}function f3(e,t){return ht(`/api/projects/${encodeURIComponent(e)}/pipelines/${encodeURIComponent(t)}`)}async function h3(e,t,n,r){const a=await fetch(`/api/projects/${encodeURIComponent(e)}/pipelines/${encodeURIComponent(t)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:n,etag:r})});if(!a.ok){const o=await a.text(),l=new Error(`${a.status}: ${o}`);throw l.status=a.status,l}return a.json()}async function p3(e,t,n="blank"){const r=await fetch(`/api/projects/${encodeURIComponent(e)}/pipelines`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:t,template:n})});if(!r.ok){const a=await r.text();throw new Error(`${r.status}: ${a}`)}return r.json()}async function m3(e,t){const n=await fetch(`/api/projects/${encodeURIComponent(e)}/pipelines/${encodeURIComponent(t)}`,{method:"DELETE"});if(!n.ok){const r=await n.text();throw new Error(`${n.status}: ${r}`)}}function g3(){var f;const e=Le(),t=Ge({queryKey:["system-info"],queryFn:FN,refetchInterval:3e4}),n=Ge({queryKey:["projects"],queryFn:ga,refetchInterval:1e4}),r=b3(),a=!t.isError,o=((f=n.data)==null?void 0:f.data)??[],l=o.filter(h=>h.pipelineStatus==="running").length,u=o.reduce((h,g)=>h+g.workers.active,0);return d.jsxs("div",{className:"h-10 flex items-center gap-3 px-6 font-[family-name:var(--font-mono)] text-[11px] text-[var(--color-text-muted)]",children:[d.jsx("span",{className:"nb-status",style:{background:a?"var(--color-running-bg)":"var(--color-crashed-bg)",color:a?"var(--color-running)":"var(--color-crashed)",padding:"2px 8px 2px 7px"},children:e(a?"status.server":"status.offline")}),d.jsx(y3,{state:r}),d.jsx("span",{className:"text-[var(--color-text-subtle)]",children:"·"}),d.jsxs("span",{className:"flex items-center gap-1",title:e("status.pipelines.tooltip"),children:[d.jsx(Oh,{size:10,strokeWidth:2.5}),d.jsx("span",{className:"font-bold text-[var(--color-text)]",children:l})," ",e("status.pipeline.unit")]}),d.jsx("span",{className:"text-[var(--color-text-subtle)]",children:"·"}),d.jsxs("span",{className:"flex items-center gap-1",title:e("status.workers.tooltip"),children:[d.jsx(AN,{size:10,strokeWidth:2.5}),d.jsx("span",{className:"font-bold text-[var(--color-text)]",children:u})," ",e("status.worker.unit")]}),d.jsx("span",{className:"text-[var(--color-text-subtle)]",children:"·"}),d.jsxs("span",{children:["localhost:",window.location.port]}),t.data&&d.jsxs(d.Fragment,{children:[d.jsx("span",{className:"text-[var(--color-text-subtle)]",children:"·"}),d.jsxs("span",{children:["v",t.data.version]}),d.jsx("span",{className:"text-[var(--color-text-subtle)]",children:"·"}),d.jsxs("span",{children:["node ",t.data.nodeVersion]})]})]})}function y3({state:e}){const t=Le();return e==="open"?d.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)",padding:"2px 8px 2px 7px"},children:t("status.sse.open")}):e==="connecting"?d.jsx("span",{className:"nb-status",style:{background:"var(--color-stuck-bg)",color:"var(--color-stuck)",padding:"2px 8px 2px 7px"},children:t("status.sse.connecting")}):d.jsxs("span",{className:"nb-status",style:{background:"var(--color-crashed-bg)",color:"var(--color-crashed)",padding:"2px 8px 2px 7px"},children:[d.jsx(yu,{size:9,strokeWidth:2.5}),t("status.sse.down")]})}function b3(){const[e,t]=A.useState("connecting");return A.useEffect(()=>{let n=null,r=null,a=!1;const o=()=>{a||(n=new EventSource("/stream/heartbeat"),n.addEventListener("server.heartbeat",()=>t("open")),n.addEventListener("open",()=>t("open")),n.addEventListener("error",()=>{(n==null?void 0:n.readyState)===EventSource.CLOSED?(t("closed"),r==null&&(r=setTimeout(()=>{r=null,n==null||n.close(),o()},1e4))):t("connecting")}))};return o(),()=>{a=!0,r!=null&&clearTimeout(r),n==null||n.close()}},[]),e}function x3(){return d.jsxs("div",{className:"grid grid-cols-[240px_1fr] grid-rows-[1fr_40px] h-screen",children:[d.jsx("aside",{className:"row-span-1 row-start-1 border-r-[3px] border-[var(--color-text)] bg-[var(--color-bg)] p-4 flex flex-col",children:d.jsx(YL,{})}),d.jsx("main",{className:"row-start-1 overflow-auto p-6 flex flex-col gap-4",children:d.jsx(hO,{})}),d.jsx("footer",{className:"col-span-2 row-start-2 border-t-[3px] border-[var(--color-text)] bg-[var(--color-bg)]",children:d.jsx(g3,{})})]})}function Dy(e,t){try{const n=JSON.stringify({message:(e instanceof Error?e.message:String(e)).slice(0,1e3),stack:(e instanceof Error?e.stack??"":"").slice(0,4e3),url:typeof window<"u"?window.location.href:"",ua:typeof navigator<"u"?navigator.userAgent:"",ts:new Date().toISOString(),context:t==null?void 0:t.slice(0,200)});fetch("/api/system/client-errors",{method:"POST",headers:{"Content-Type":"application/json"},body:n,keepalive:!0}).catch(()=>{})}catch{}}function v3(){typeof window>"u"||(window.addEventListener("error",e=>{Dy(e.error??e.message??"unknown error","window.error")}),window.addEventListener("unhandledrejection",e=>{const t=e.reason;Dy(t instanceof Error?t:String(t),"unhandledrejection")}))}class w3 extends A.Component{constructor(){super(...arguments);w1(this,"state",{error:null})}static getDerivedStateFromError(n){return{error:n}}componentDidCatch(n,r){var a;Dy(n,`ErrorBoundary: ${((a=r.componentStack)==null?void 0:a.slice(0,200))??""}`),console.error("[ErrorBoundary]",n,r)}render(){if(this.state.error){const n=(()=>{try{return window.localStorage.getItem("sps-console-lang")==="zh"?"zh":"en"}catch{return"en"}})(),r=n==="zh"?"💥 UI 崩了":"💥 UI crashed",a=n==="zh"?"刷新页面":"Refresh page";return d.jsx("div",{className:"p-6",children:d.jsxs("div",{className:"nb-card max-w-2xl bg-[var(--color-crashed-bg)]",children:[d.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-2xl font-bold mb-2",children:r}),d.jsx("p",{className:"text-sm mb-3 text-[var(--color-text-muted)]",children:this.state.error.message}),d.jsxs("details",{className:"text-xs mb-4",children:[d.jsx("summary",{className:"cursor-pointer font-semibold",children:"stack"}),d.jsx("pre",{className:"mt-2 font-[family-name:var(--font-mono)] overflow-auto max-h-60 bg-[var(--color-bg)] border-2 border-[var(--color-text)] rounded-md p-3",children:this.state.error.stack??"(no stack)"})]}),d.jsx("button",{className:"nb-btn nb-btn-mint",type:"button",onClick:()=>{this.setState({error:null}),window.location.reload()},children:a})]})})}return this.props.children}}const bf=e=>e.lastActivityAt?Date.parse(e.lastActivityAt):0;function Lb(e,t){const n=[...e];return t==="name"?n.sort((r,a)=>r.name.localeCompare(a.name)):t==="date"?n.sort((r,a)=>bf(a)-bf(r)):n.sort((r,a)=>{const o=r.pipelineStatus==="running"?1:0,l=a.pipelineStatus==="running"?1:0;return o!==l?l-o:bf(a)-bf(r)})}const k3=["activity","date","name"];function E3(){const e=Le(),t=bs(),[n,r]=A.useState("activity"),{data:a,isLoading:o,isError:l,error:u,refetch:f}=Ge({queryKey:["projects"],queryFn:ga});return d.jsxs("div",{className:"flex flex-col gap-6 w-full",children:[d.jsxs("header",{className:"flex items-center justify-between flex-wrap gap-3",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold tracking-tight",children:e("projects.title")}),d.jsx("p",{className:"text-[var(--color-text-muted)] text-sm mt-1",children:a?e("projects.count",{count:a.data.length}):e(o?"common.loading":"projects.refresh.hint")})]}),d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("div",{className:"inline-flex border-[3px] border-[var(--color-text)] rounded-xl overflow-hidden shadow-[3px_3px_0_var(--color-text)]",role:"group","aria-label":e("projects.sort.label"),children:k3.map(h=>d.jsx("button",{type:"button","aria-pressed":n===h,onClick:()=>r(h),className:["px-3 py-2 text-xs font-bold font-[family-name:var(--font-mono)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-text)]",n===h?"bg-[var(--color-accent-mint)]":"bg-[var(--color-bg)] hover:bg-[var(--color-bg-cream)]"].join(" "),children:e(`projects.sort.${h}`)},h))}),d.jsxs("button",{className:"nb-btn nb-btn-yellow",onClick:()=>f(),type:"button",children:[d.jsx(Oh,{size:16,strokeWidth:2.5}),e("common.refresh")]}),d.jsxs("button",{className:"nb-btn nb-btn-primary",type:"button",onClick:()=>t("/projects/new"),"aria-label":e("projects.new"),children:[d.jsx(jr,{size:16,strokeWidth:3}),e("projects.new")]})]})]}),o&&d.jsx(_3,{}),l&&d.jsxs("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:[d.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold mb-2",children:e("projects.load.failed")}),d.jsx("p",{className:"text-sm text-[var(--color-text)]",children:u instanceof Error?u.message:String(u)}),d.jsx("button",{className:"nb-btn mt-4",onClick:()=>f(),type:"button",children:e("common.retry")})]}),a&&a.data.length===0&&d.jsx(C3,{}),a&&a.data.length>0&&d.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:Lb(a.data,n).map(h=>d.jsx(S3,{project:h},h.name))})]})}function S3({project:e}){const t=e.pipelineStatus==="running";return d.jsxs(ha,{to:`/projects/${encodeURIComponent(e.name)}`,className:"nb-card nb-card-interactive block no-underline text-[var(--color-text)]",children:[d.jsxs("div",{className:"flex items-center justify-between mb-3",children:[d.jsx("h3",{className:"font-[family-name:var(--font-heading)] font-bold text-xl truncate",children:e.name}),d.jsx(N3,{status:e.pipelineStatus})]}),e.repoDir&&d.jsx("p",{className:"text-xs font-[family-name:var(--font-mono)] text-[var(--color-text-muted)] truncate mb-3",children:e.repoDir}),d.jsxs("div",{className:"grid grid-cols-3 gap-2 text-sm mt-4 pt-3 border-t-[1.5px] border-dashed border-[var(--color-border-light)]",children:[d.jsx(wg,{label:"cards",value:e.cards.total,accent:"purple"}),d.jsx(wg,{label:"inprogress",value:e.cards.inprogress,accent:e.cards.inprogress>0?"yellow":"idle"}),d.jsx(wg,{label:"workers",value:`${e.workers.active}/${e.workers.total}`,accent:t?"mint":"idle"})]})]})}function wg({label:e,value:t,accent:n}){const r={purple:"var(--color-accent-purple)",yellow:"var(--color-accent-yellow)",mint:"var(--color-accent-mint)",idle:"var(--color-bg-cream)"};return d.jsxs("div",{className:"flex flex-col items-center justify-center py-2 rounded-lg border-2 border-[var(--color-text)]",style:{background:r[n]},children:[d.jsx("span",{className:"font-[family-name:var(--font-mono)] font-bold text-lg",children:t}),d.jsx("span",{className:"text-[10px] uppercase tracking-wider text-[var(--color-text-muted)] font-semibold",children:e})]})}function N3({status:e}){const t={running:{bg:"var(--color-running-bg)",label:"running"},idle:{bg:"var(--color-idle-bg)",label:"idle"},stopping:{bg:"var(--color-stuck-bg)",label:"stopping"},error:{bg:"var(--color-crashed-bg)",label:"error"}},{bg:n,label:r}=t[e],a=e==="running"?"var(--color-running)":e==="error"?"var(--color-crashed)":e==="stopping"?"var(--color-stuck)":"var(--color-idle)";return d.jsx("span",{className:"nb-status",style:{background:n,color:a},children:r})}function _3(){return d.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[0,1,2].map(e=>d.jsxs("div",{className:"nb-card opacity-60 animate-pulse",children:[d.jsx("div",{className:"h-6 w-32 bg-[var(--color-border-light)] rounded-md mb-3"}),d.jsx("div",{className:"h-3 w-full bg-[var(--color-border-light)] rounded-md mb-2"}),d.jsx("div",{className:"h-3 w-2/3 bg-[var(--color-border-light)] rounded-md"})]},e))})}function C3(){const e=Le(),t=e("projects.empty.hint",{cmd:"__CMD__"}),[n,r]=t.split("__CMD__");return d.jsxs("div",{className:"nb-card bg-[var(--color-accent-yellow)] flex items-center gap-6 p-8",children:[d.jsx("div",{className:"w-20 h-20 rounded-2xl bg-[var(--color-accent-mint)] border-[3px] border-[var(--color-text)] shadow-[3px_3px_0_var(--color-text)] flex items-center justify-center",children:d.jsx(LN,{size:32,strokeWidth:2.5})}),d.jsxs("div",{className:"flex-1",children:[d.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-2xl font-bold mb-2",children:e("projects.empty.title")}),d.jsxs("p",{className:"text-sm text-[var(--color-text)] mb-4",children:[n,d.jsx("code",{className:"bg-[var(--color-bg)] border-2 border-[var(--color-text)] px-2 py-0.5 rounded-md font-[family-name:var(--font-mono)]",children:"sps project init <name>"}),r]}),d.jsxs("button",{className:"nb-btn nb-btn-primary",type:"button",children:[d.jsx(jr,{size:16,strokeWidth:3}),e("projects.new")]})]})]})}function j3(e){const t=e?`?path=${encodeURIComponent(e)}`:"";return ht(`/api/fs/browse${t}`)}const HN=50*1024*1024;async function A3(e,t){if(t.size>HN)throw new Error(`文件超过 50 MB 上限(当前 ${(t.size/1024/1024).toFixed(2)} MB)`);const n=new FormData;n.append("sessionId",e),n.append("file",t,t.name);const r=await fetch("/api/fs/upload",{method:"POST",body:n});if(!r.ok){const a=await r.text();throw new Error(`${r.status}: ${a}`)}return await r.json()}function Oy(e,t){return`/api/fs/file?${new URLSearchParams({path:t,sessionId:e}).toString()}`}function Ib({initialPath:e,onCancel:t,onSelect:n,title:r,mode:a="directory"}){var v,S,E;const o=Le(),l=r??o("dirPicker.title.default"),[u,f]=A.useState(e??null),[h,g]=A.useState(null),m=Ge({queryKey:["fs-browse",u],queryFn:()=>j3(u??void 0),staleTime:0,gcTime:0}),y=((v=m.data)==null?void 0:v.path)??u??"",b=((S=m.data)==null?void 0:S.parent)??null,k=((E=m.data)==null?void 0:E.home)??null;return A.useEffect(()=>{const C=N=>{N.key==="Escape"&&(N.preventDefault(),t())};return window.addEventListener("keydown",C),()=>window.removeEventListener("keydown",C)},[t]),d.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-[rgba(45,55,72,0.5)] p-4",role:"presentation",children:d.jsxs("div",{className:"nb-card bg-[var(--color-bg)] max-w-lg w-full p-5 flex flex-col",style:{maxHeight:"70vh"},role:"dialog","aria-modal":"true","aria-label":l,children:[d.jsxs("header",{className:"flex items-center justify-between mb-3 shrink-0",children:[d.jsx("h3",{className:"font-[family-name:var(--font-heading)] font-bold text-base",children:l}),d.jsx("button",{type:"button",className:"p-1 hover:bg-[var(--color-bg-cream)] rounded",onClick:t,"aria-label":o("dirPicker.close.aria"),children:d.jsx(dr,{size:14,strokeWidth:3})})]}),d.jsxs("div",{className:"flex items-center gap-2 mb-3 shrink-0",children:[d.jsx("button",{type:"button",className:"nb-btn flex-shrink-0",style:{padding:"4px 10px",fontSize:12},onClick:()=>b&&f(b),disabled:!b||m.isLoading,"aria-label":o("dirPicker.up.aria"),title:o("dirPicker.up.title"),children:d.jsx(rR,{size:12,strokeWidth:3})}),d.jsx("button",{type:"button",className:"nb-btn flex-shrink-0",style:{padding:"4px 10px",fontSize:12},onClick:()=>k&&f(k),disabled:!k||m.isLoading,"aria-label":o("dirPicker.home.aria"),title:o("dirPicker.home.title"),children:d.jsx(UR,{size:12,strokeWidth:3})}),d.jsx("div",{className:"flex-1 min-w-0 nb-input font-[family-name:var(--font-mono)] text-xs px-2 py-1.5 truncate",title:y,dir:"rtl",children:y||"..."})]}),d.jsxs("div",{className:"flex-1 overflow-y-auto border-2 border-[var(--color-text)] rounded-lg bg-[var(--color-bg-cream)] min-h-0",children:[m.isLoading&&d.jsxs("div",{className:"flex items-center justify-center py-12 text-[var(--color-text-muted)]",children:[d.jsx(nt,{size:16,strokeWidth:3,className:"animate-spin mr-2"}),o("dirPicker.loading")]}),m.isError&&d.jsxs("div",{className:"p-4 text-sm text-[var(--color-crashed)]",children:[d.jsx("p",{className:"font-bold mb-1",children:o("dirPicker.error.title")}),d.jsx("p",{className:"text-xs font-[family-name:var(--font-mono)] break-all",children:m.error instanceof Error?m.error.message:String(m.error)})]}),m.data&&d.jsxs("ul",{className:"divide-y-2 divide-[var(--color-text)]/20",children:[m.data.entries.length===0&&d.jsx("li",{className:"p-4 text-xs text-[var(--color-text-subtle)] italic text-center",children:o("dirPicker.empty")}),m.data.entries.map(C=>{const N=(()=>{const T=y.endsWith("/")||y.endsWith("\\")?"":"/";return`${y}${T}${C.name}`})(),_=a==="file"&&h===N,D=C.isDirectory||a==="file";return d.jsx("li",{children:d.jsxs("button",{type:"button",className:["w-full flex items-center gap-2 px-3 py-2 text-left text-sm font-[family-name:var(--font-mono)]","disabled:opacity-50 disabled:cursor-not-allowed",_?"bg-[var(--color-accent-mint)] font-bold":"hover:bg-[var(--color-accent-mint)]"].join(" "),disabled:!D,onClick:()=>{C.isDirectory?(g(null),f(N)):a==="file"&&g(N)},onDoubleClick:()=>{a==="file"&&!C.isDirectory&&n(N)},title:C.isDirectory?o("dirPicker.enter.aria",{name:C.name}):a==="file"?o("dirPicker.pickFile.aria",{name:C.name}):o("dirPicker.fileLocked"),children:[C.isDirectory?d.jsx(xu,{size:14,strokeWidth:2.5,className:"flex-shrink-0 text-[var(--color-text)]"}):d.jsx("span",{className:"w-3.5 h-3.5 flex-shrink-0"}),d.jsx("span",{className:"truncate",children:C.name}),C.isDirectory&&d.jsx(Yl,{size:12,strokeWidth:2.5,className:"ml-auto flex-shrink-0 text-[var(--color-text-muted)]"})]})},C.name)})]})]}),d.jsxs("div",{className:"flex gap-2 justify-end pt-3 shrink-0",children:[d.jsx("button",{type:"button",className:"nb-btn",onClick:t,children:o("dirPicker.cancel")}),a==="file"?d.jsxs("button",{type:"button",className:"nb-btn nb-btn-primary",onClick:()=>h&&n(h),disabled:!h||m.isLoading||m.isError,title:h??o("dirPicker.useFile.tooltip.empty"),children:[d.jsx(bu,{size:14,strokeWidth:3}),o("dirPicker.useFile")]}):d.jsxs("button",{type:"button",className:"nb-btn nb-btn-primary",onClick:()=>n(y),disabled:!y||m.isLoading||m.isError,children:[d.jsx(bu,{size:14,strokeWidth:3}),o("dirPicker.useDir")]})]})]})})}function T3({title:e,body:t,confirm:n,cancel:r,onConfirm:a,onCancel:o,danger:l}){const u=Le();return A.useEffect(()=>{const f=h=>{h.key==="Escape"&&o()};return window.addEventListener("keydown",f),()=>window.removeEventListener("keydown",f)},[o]),d.jsx("div",{role:"dialog","aria-modal":"true","aria-labelledby":"confirm-title",className:"fixed inset-0 z-50 flex items-center justify-center p-6 bg-black/30",children:d.jsxs("div",{className:"nb-card max-w-md w-full",children:[d.jsx("h2",{id:"confirm-title",className:"font-[family-name:var(--font-heading)] text-xl font-bold mb-2",children:e}),d.jsx("p",{className:"text-sm text-[var(--color-text-muted)] mb-5",children:t}),d.jsxs("div",{className:"flex gap-3 justify-end",children:[d.jsx("button",{className:"nb-btn",onClick:o,type:"button",children:r??u("dialog.cancel.default")}),d.jsx("button",{className:l?"nb-btn nb-btn-danger":"nb-btn nb-btn-yellow",onClick:async()=>{await a()},type:"button",children:n})]})]})})}const KN=A.createContext(null);function M3({children:e}){const t=Le(),[n,r]=A.useState(null),a=A.useCallback(u=>new Promise(f=>{r({kind:"confirm",opts:u,resolve:h=>{r(null),f(h)}})}),[]),o=A.useCallback(u=>new Promise(f=>{r({kind:"alert",opts:u,resolve:()=>{r(null),f()}})}),[]),l=A.useCallback(u=>new Promise(f=>{r({kind:"prompt",opts:u,resolve:h=>{r(null),f(h)}})}),[]);return d.jsxs(KN.Provider,{value:{confirm:a,alert:o,prompt:l},children:[e,(n==null?void 0:n.kind)==="confirm"&&d.jsx(T3,{title:n.opts.title,body:n.opts.body,confirm:n.opts.confirm??t("dialog.confirm.default"),cancel:n.opts.cancel,danger:n.opts.danger,onConfirm:()=>n.resolve(!0),onCancel:()=>n.resolve(!1)}),(n==null?void 0:n.kind)==="alert"&&d.jsx(D3,{title:n.opts.title,body:n.opts.body,confirm:n.opts.confirm??t("dialog.alert.default"),onClose:()=>n.resolve()}),(n==null?void 0:n.kind)==="prompt"&&d.jsx(O3,{title:n.opts.title,body:n.opts.body,placeholder:n.opts.placeholder,defaultValue:n.opts.defaultValue,confirm:n.opts.confirm??t("dialog.confirm.default"),cancel:n.opts.cancel??t("dialog.cancel.default"),onConfirm:u=>n.resolve(u),onCancel:()=>n.resolve(null)})]})}function jn(){const e=A.useContext(KN);if(!e)throw new Error("useDialog must be used inside <DialogProvider>");return e}function D3({title:e,body:t,confirm:n,onClose:r}){return A.useEffect(()=>{const a=o=>{(o.key==="Escape"||o.key==="Enter")&&r()};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[r]),d.jsx("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 z-50 flex items-center justify-center p-6 bg-black/30",children:d.jsxs("div",{className:"nb-card max-w-md w-full",children:[d.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold mb-2",children:e}),d.jsx("p",{className:"text-sm text-[var(--color-text-muted)] mb-5 whitespace-pre-wrap break-words",children:t}),d.jsx("div",{className:"flex gap-3 justify-end",children:d.jsx("button",{className:"nb-btn nb-btn-primary",onClick:r,type:"button",autoFocus:!0,children:n})})]})})}function O3({title:e,body:t,placeholder:n,defaultValue:r,confirm:a,cancel:o,onConfirm:l,onCancel:u}){const[f,h]=A.useState(r??""),g=A.useRef(null);A.useEffect(()=>{var b,k;(b=g.current)==null||b.focus(),(k=g.current)==null||k.select();const y=v=>{v.key==="Escape"&&u()};return window.addEventListener("keydown",y),()=>window.removeEventListener("keydown",y)},[u]);const m=()=>{const y=f.trim();y&&l(y)};return d.jsx("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 z-50 flex items-center justify-center p-6 bg-black/30",children:d.jsxs("div",{className:"nb-card max-w-md w-full",children:[d.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold mb-2",children:e}),t&&d.jsx("p",{className:"text-sm text-[var(--color-text-muted)] mb-3 whitespace-pre-wrap break-words",children:t}),d.jsx("input",{ref:g,type:"text",className:"nb-input w-full mb-5",placeholder:n,value:f,onChange:y=>h(y.target.value),onKeyDown:y=>{y.key==="Enter"&&!y.nativeEvent.isComposing&&(y.preventDefault(),m())}}),d.jsxs("div",{className:"flex gap-3 justify-end",children:[d.jsx("button",{className:"nb-btn",onClick:u,type:"button",children:o}),d.jsx("button",{className:"nb-btn nb-btn-primary",onClick:m,type:"button",disabled:!f.trim(),children:a})]})]})})}function R3(){var N,_,D,T;const e=Le(),t=bs(),n=an(),{alert:r}=jn(),[a,o]=A.useState({name:"",projectDir:"",enableGit:!0,createIfMissing:!0,mergeBranch:"main",maxWorkers:"1",ackTimeoutMin:"5",pipelineMode:"pipeline"}),l=a.pipelineMode==="smartArrange",u=Ge({queryKey:["system-agents"],queryFn:qN}),f=((N=u.data)==null?void 0:N.agents.worker.model)??"",h=((_=u.data)==null?void 0:_.agents.reviewer.model)??"",g=[...new Set((((D=u.data)==null?void 0:D.providers.anthropic)??[]).flatMap(M=>M.models))],m=[...new Set((((T=u.data)==null?void 0:T.providers.openai)??[]).flatMap(M=>M.models))],[y,b]=A.useState(!1),k=Rt({mutationFn:M=>s3(M),onSuccess:M=>{n.invalidateQueries({queryKey:["projects"]}),t(`/projects/${encodeURIComponent(M.name)}`)},onError:M=>{r({title:e("newProject.error.create.title"),body:M instanceof Error?M.message:String(M)})}}),v=/^[a-zA-Z0-9_-]+$/.test(a.name),S=v&&a.projectDir.trim()!==""&&!k.isPending,E=a.projectDir.trim().replace(/\/+$/,""),C=E&&a.name?E.split("/").pop()===a.name?E:`${E}/${a.name}`:"";return d.jsxs("div",{className:"flex flex-col gap-5 max-w-2xl",children:[d.jsxs("header",{className:"flex items-center gap-3",children:[d.jsxs("button",{type:"button",onClick:()=>t("/projects"),className:"nb-btn",style:{padding:"6px 12px"},"aria-label":e("newProject.back.aria"),children:[d.jsx(kN,{size:14,strokeWidth:3}),e("newProject.back")]}),d.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-3xl font-bold",children:e("newProject.title")})]}),d.jsx("div",{className:"nb-card",children:d.jsxs("form",{onSubmit:M=>{M.preventDefault(),S&&k.mutate(a)},className:"flex flex-col gap-5",children:[d.jsx(Ur,{label:e("newProject.field.mode"),hint:e(l?"newProject.field.mode.smartHint":"newProject.field.mode.pipelineHint"),children:d.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:["pipeline","smartArrange"].map(M=>{const I=a.pipelineMode===M;return d.jsxs("button",{type:"button",onClick:()=>o({...a,pipelineMode:M}),"aria-pressed":I,className:["text-left rounded-xl border-2 p-3 transition-all",I?"bg-[var(--color-accent-mint)] border-[var(--color-text)] shadow-[3px_3px_0_var(--color-text)] font-bold":"bg-[var(--color-bg)] border-[var(--color-border-light)] hover:border-[var(--color-text)]"].join(" "),children:[d.jsx("div",{className:"text-sm font-bold",children:e(M==="pipeline"?"newProject.field.mode.pipeline":"newProject.field.mode.smart")}),d.jsx("div",{className:"text-xs text-[var(--color-text-muted)] mt-0.5",children:e(M==="pipeline"?"newProject.field.mode.pipelineDesc":"newProject.field.mode.smartDesc")})]},M)})})}),l&&d.jsx(Ur,{label:e("newProject.field.goal"),hint:e("newProject.field.goal.hint"),children:d.jsx("textarea",{className:"nb-input w-full font-[family-name:var(--font-mono)] text-sm",style:{minHeight:110,resize:"vertical"},placeholder:e("newProject.field.goal.placeholder"),value:a.goal??"",onChange:M=>o({...a,goal:M.target.value})})}),d.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[d.jsxs(Ur,{label:"Worker 模型",hint:`默认:${f||"全局默认"}(留空用默认)`,children:[d.jsx("input",{className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:a.workerModel??"",onChange:M=>o({...a,workerModel:M.target.value}),placeholder:f,list:"np-worker-models",spellCheck:!1}),d.jsx("datalist",{id:"np-worker-models",children:g.map(M=>d.jsx("option",{value:M},M))})]}),l&&d.jsxs(Ur,{label:"OpenAI Agent(监工)模型",hint:`默认:${h||"全局默认"}(留空用默认)`,children:[d.jsx("input",{className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:a.reviewerModel??"",onChange:M=>o({...a,reviewerModel:M.target.value}),placeholder:h,list:"np-reviewer-models",spellCheck:!1}),d.jsx("datalist",{id:"np-reviewer-models",children:m.map(M=>d.jsx("option",{value:M},M))})]})]}),d.jsxs(Ur,{label:e("newProject.field.name"),hint:e("newProject.field.name.example"),children:[d.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",placeholder:e("newProject.field.name.placeholder"),value:a.name,onChange:M=>o({...a,name:M.target.value}),autoFocus:!0,required:!0}),a.name&&!v&&d.jsx("p",{className:"text-xs text-[var(--color-crashed)] mt-1",children:e("newProject.field.name.invalid")})]}),d.jsxs(Ur,{label:e("newProject.field.dir"),hint:e("newProject.field.dir.long"),children:[d.jsxs("div",{className:"flex gap-2",children:[d.jsx("input",{type:"text",className:"nb-input flex-1 font-[family-name:var(--font-mono)]",placeholder:e("newProject.field.dir.placeholder"),value:a.projectDir,onChange:M=>o({...a,projectDir:M.target.value}),required:!0}),d.jsxs("button",{type:"button",className:"nb-btn flex-shrink-0",onClick:()=>b(!0),"aria-label":e("newProject.dir.browseAria"),title:e("newProject.dir.browseAria"),children:[d.jsx(NN,{size:14,strokeWidth:2.5}),e("newProject.dir.browse")]})]}),C&&d.jsxs("p",{className:"text-xs mt-1.5 font-[family-name:var(--font-mono)]",children:[d.jsxs("span",{className:"text-[var(--color-text-muted)]",children:[e("newProject.field.dir.preview")," "]}),d.jsx("span",{className:"font-bold",children:C})]}),d.jsxs("label",{className:"flex items-center gap-2 mt-2 cursor-pointer select-none",children:[d.jsx("input",{type:"checkbox",checked:a.createIfMissing!==!1,onChange:M=>o({...a,createIfMissing:M.target.checked}),className:"w-4 h-4 cursor-pointer"}),d.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:e("newProject.field.dir.createIfMissing")})]})]}),d.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[d.jsx(Ur,{label:e("newProject.field.maxWorkers.short"),children:d.jsx("input",{type:"number",min:"1",max:"8",className:"nb-input w-full font-[family-name:var(--font-mono)]",value:a.maxWorkers,onChange:M=>o({...a,maxWorkers:M.target.value})})}),d.jsx(Ur,{label:e("newProject.field.ackTimeout.minutes"),hint:e("newProject.field.ackTimeout.minutes.help"),children:d.jsx("input",{type:"number",min:"1",max:"30",className:"nb-input w-full font-[family-name:var(--font-mono)]",value:a.ackTimeoutMin??"5",onChange:M=>o({...a,ackTimeoutMin:M.target.value})})})]}),d.jsxs("div",{className:"pt-3 border-t-2 border-[var(--color-text)] border-dashed",children:[d.jsxs("label",{className:"flex items-center gap-3 mb-3 cursor-pointer select-none",children:[d.jsx("input",{type:"checkbox",checked:a.enableGit??!0,onChange:M=>o({...a,enableGit:M.target.checked}),className:"w-4 h-4 cursor-pointer"}),d.jsx("span",{className:"text-sm font-bold",children:e("newProject.field.git.label")})]}),d.jsx("p",{className:"text-xs text-[var(--color-text-muted)] mb-3",children:e("newProject.field.git.detail")}),a.enableGit!==!1&&d.jsxs("div",{className:"flex flex-col gap-4 bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg p-4",children:[d.jsx(Ur,{label:e("newProject.field.git.branch"),children:d.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",value:a.mergeBranch??"main",onChange:M=>o({...a,mergeBranch:M.target.value})})}),d.jsx(Ur,{label:e("newProject.field.gitlabProject.label"),hint:e("newProject.field.gitlabProject.help2"),children:d.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",placeholder:e("newProject.field.gitlabProject.placeholder"),value:a.gitlabProject??"",onChange:M=>o({...a,gitlabProject:M.target.value})})}),a.gitlabProject&&d.jsx(Ur,{label:e("newProject.field.gitlabProjectId"),hint:e("newProject.field.gitlabProjectId.help"),children:d.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",placeholder:e("newProject.field.gitlabProjectId.placeholder"),value:a.gitlabProjectId??"",onChange:M=>o({...a,gitlabProjectId:M.target.value})})})]})]}),d.jsxs("div",{className:"pt-3 border-t-2 border-[var(--color-text)] border-dashed",children:[d.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold uppercase tracking-wider mb-3 text-[var(--color-text-muted)]",children:e("newProject.section.notifications")}),d.jsx(Ur,{label:e("newProject.field.matrixRoom.label"),hint:e("newProject.field.matrixRoom.help2"),children:d.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",placeholder:e("newProject.field.matrixRoom.placeholder"),value:a.matrixRoomId??"",onChange:M=>o({...a,matrixRoomId:M.target.value})})})]}),d.jsxs("div",{className:"flex gap-3 justify-end pt-3",children:[d.jsx("button",{type:"button",className:"nb-btn",onClick:()=>t("/projects"),disabled:k.isPending,children:e("common.cancel")}),d.jsx("button",{type:"submit",className:"nb-btn nb-btn-primary",disabled:!S,"aria-label":e("newProject.submit"),children:k.isPending?d.jsxs(d.Fragment,{children:[d.jsx(nt,{size:14,strokeWidth:3,className:"animate-spin"}),e("newProject.creating")]}):d.jsxs(d.Fragment,{children:[d.jsx(jr,{size:14,strokeWidth:3}),e("common.create")]})})]})]})}),y&&d.jsx(Ib,{title:e("newProject.field.dir.pickerTitle"),initialPath:a.projectDir.trim()||void 0,onCancel:()=>b(!1),onSelect:M=>{o({...a,projectDir:M}),b(!1)}})]})}function Ur({label:e,hint:t,children:n}){return d.jsxs("label",{className:"flex flex-col gap-1.5",children:[d.jsx("span",{className:"text-sm font-bold",children:e}),n,t&&d.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:t})]})}const zb=Symbol.for("yaml.alias"),Ry=Symbol.for("yaml.document"),ms=Symbol.for("yaml.map"),GN=Symbol.for("yaml.pair"),Mi=Symbol.for("yaml.scalar"),Ql=Symbol.for("yaml.seq"),Gr=Symbol.for("yaml.node.type"),vs=e=>!!e&&typeof e=="object"&&e[Gr]===zb,mo=e=>!!e&&typeof e=="object"&&e[Gr]===Ry,Wl=e=>!!e&&typeof e=="object"&&e[Gr]===ms,Kt=e=>!!e&&typeof e=="object"&&e[Gr]===GN,It=e=>!!e&&typeof e=="object"&&e[Gr]===Mi,Xl=e=>!!e&&typeof e=="object"&&e[Gr]===Ql;function Zt(e){if(e&&typeof e=="object")switch(e[Gr]){case ms:case Ql:return!0}return!1}function Jt(e){if(e&&typeof e=="object")switch(e[Gr]){case zb:case ms:case Mi:case Ql:return!0}return!1}const VN=e=>(It(e)||Zt(e))&&!!e.anchor,cr=Symbol("break visit"),YN=Symbol("skip children"),Ai=Symbol("remove node");function go(e,t){const n=QN(t);mo(e)?ul(null,e.contents,n,Object.freeze([e]))===Ai&&(e.contents=null):ul(null,e,n,Object.freeze([]))}go.BREAK=cr;go.SKIP=YN;go.REMOVE=Ai;function ul(e,t,n,r){const a=WN(e,t,n,r);if(Jt(a)||Kt(a))return XN(e,r,a),ul(e,a,n,r);if(typeof a!="symbol"){if(Zt(t)){r=Object.freeze(r.concat(t));for(let o=0;o<t.items.length;++o){const l=ul(o,t.items[o],n,r);if(typeof l=="number")o=l-1;else{if(l===cr)return cr;l===Ai&&(t.items.splice(o,1),o-=1)}}}else if(Kt(t)){r=Object.freeze(r.concat(t));const o=ul("key",t.key,n,r);if(o===cr)return cr;o===Ai&&(t.key=null);const l=ul("value",t.value,n,r);if(l===cr)return cr;l===Ai&&(t.value=null)}}return a}async function Rh(e,t){const n=QN(t);mo(e)?await dl(null,e.contents,n,Object.freeze([e]))===Ai&&(e.contents=null):await dl(null,e,n,Object.freeze([]))}Rh.BREAK=cr;Rh.SKIP=YN;Rh.REMOVE=Ai;async function dl(e,t,n,r){const a=await WN(e,t,n,r);if(Jt(a)||Kt(a))return XN(e,r,a),dl(e,a,n,r);if(typeof a!="symbol"){if(Zt(t)){r=Object.freeze(r.concat(t));for(let o=0;o<t.items.length;++o){const l=await dl(o,t.items[o],n,r);if(typeof l=="number")o=l-1;else{if(l===cr)return cr;l===Ai&&(t.items.splice(o,1),o-=1)}}}else if(Kt(t)){r=Object.freeze(r.concat(t));const o=await dl("key",t.key,n,r);if(o===cr)return cr;o===Ai&&(t.key=null);const l=await dl("value",t.value,n,r);if(l===cr)return cr;l===Ai&&(t.value=null)}}return a}function QN(e){return typeof e=="object"&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function WN(e,t,n,r){var a,o,l,u,f;if(typeof n=="function")return n(e,t,r);if(Wl(t))return(a=n.Map)==null?void 0:a.call(n,e,t,r);if(Xl(t))return(o=n.Seq)==null?void 0:o.call(n,e,t,r);if(Kt(t))return(l=n.Pair)==null?void 0:l.call(n,e,t,r);if(It(t))return(u=n.Scalar)==null?void 0:u.call(n,e,t,r);if(vs(t))return(f=n.Alias)==null?void 0:f.call(n,e,t,r)}function XN(e,t,n){const r=t[t.length-1];if(Zt(r))r.items[e]=n;else if(Kt(r))e==="key"?r.key=n:r.value=n;else if(mo(r))r.contents=n;else{const a=vs(r)?"alias":"scalar";throw new Error(`Cannot replace node with ${a} parent`)}}const L3={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},I3=e=>e.replace(/[!,[\]{}]/g,t=>L3[t]);class Xn{constructor(t,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},Xn.defaultYaml,t),this.tags=Object.assign({},Xn.defaultTags,n)}clone(){const t=new Xn(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){const t=new Xn(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:Xn.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},Xn.defaultTags);break}return t}add(t,n){this.atNextDocument&&(this.yaml={explicit:Xn.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},Xn.defaultTags),this.atNextDocument=!1);const r=t.trim().split(/[ \t]+/),a=r.shift();switch(a){case"%TAG":{if(r.length!==2&&(n(0,"%TAG directive should contain exactly two parts"),r.length<2))return!1;const[o,l]=r;return this.tags[o]=l,!0}case"%YAML":{if(this.yaml.explicit=!0,r.length!==1)return n(0,"%YAML directive should contain exactly one part"),!1;const[o]=r;if(o==="1.1"||o==="1.2")return this.yaml.version=o,!0;{const l=/^\d+\.\d+$/.test(o);return n(6,`Unsupported YAML version ${o}`,l),!1}}default:return n(0,`Unknown directive ${a}`,!0),!1}}tagName(t,n){if(t==="!")return"!";if(t[0]!=="!")return n(`Not a valid tag: ${t}`),null;if(t[1]==="<"){const l=t.slice(2,-1);return l==="!"||l==="!!"?(n(`Verbatim tags aren't resolved, so ${t} is invalid.`),null):(t[t.length-1]!==">"&&n("Verbatim tags must end with a >"),l)}const[,r,a]=t.match(/^(.*!)([^!]*)$/s);a||n(`The ${t} tag has no suffix`);const o=this.tags[r];if(o)try{return o+decodeURIComponent(a)}catch(l){return n(String(l)),null}return r==="!"?t:(n(`Could not resolve tag: ${t}`),null)}tagString(t){for(const[n,r]of Object.entries(this.tags))if(t.startsWith(r))return n+I3(t.substring(r.length));return t[0]==="!"?t:`!<${t}>`}toString(t){const n=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],r=Object.entries(this.tags);let a;if(t&&r.length>0&&Jt(t.contents)){const o={};go(t.contents,(l,u)=>{Jt(u)&&u.tag&&(o[u.tag]=!0)}),a=Object.keys(o)}else a=[];for(const[o,l]of r)o==="!!"&&l==="tag:yaml.org,2002:"||(!t||a.some(u=>u.startsWith(l)))&&n.push(`%TAG ${o} ${l}`);return n.join(`
|
|
428
|
+
`)}}Xn.defaultYaml={explicit:!1,version:"1.2"};Xn.defaultTags={"!!":"tag:yaml.org,2002:"};function ZN(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){const n=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw new Error(n)}return!0}function JN(e){const t=new Set;return go(e,{Value(n,r){r.anchor&&t.add(r.anchor)}}),t}function e_(e,t){for(let n=1;;++n){const r=`${e}${n}`;if(!t.has(r))return r}}function z3(e,t){const n=[],r=new Map;let a=null;return{onAnchor:o=>{n.push(o),a??(a=JN(e));const l=e_(t,a);return a.add(l),l},setAnchors:()=>{for(const o of n){const l=r.get(o);if(typeof l=="object"&&l.anchor&&(It(l.node)||Zt(l.node)))l.node.anchor=l.anchor;else{const u=new Error("Failed to resolve repeated object (this should not happen)");throw u.source=o,u}}},sourceObjects:r}}function fl(e,t,n,r){if(r&&typeof r=="object")if(Array.isArray(r))for(let a=0,o=r.length;a<o;++a){const l=r[a],u=fl(e,r,String(a),l);u===void 0?delete r[a]:u!==l&&(r[a]=u)}else if(r instanceof Map)for(const a of Array.from(r.keys())){const o=r.get(a),l=fl(e,r,a,o);l===void 0?r.delete(a):l!==o&&r.set(a,l)}else if(r instanceof Set)for(const a of Array.from(r)){const o=fl(e,r,a,a);o===void 0?r.delete(a):o!==a&&(r.delete(a),r.add(o))}else for(const[a,o]of Object.entries(r)){const l=fl(e,r,a,o);l===void 0?delete r[a]:l!==o&&(r[a]=l)}return e.call(t,n,r)}function Hr(e,t,n){if(Array.isArray(e))return e.map((r,a)=>Hr(r,String(a),n));if(e&&typeof e.toJSON=="function"){if(!n||!VN(e))return e.toJSON(t,n);const r={aliasCount:0,count:1,res:void 0};n.anchors.set(e,r),n.onCreate=o=>{r.res=o,delete n.onCreate};const a=e.toJSON(t,n);return n.onCreate&&n.onCreate(a),a}return typeof e=="bigint"&&!(n!=null&&n.keep)?Number(e):e}class Pb{constructor(t){Object.defineProperty(this,Gr,{value:t})}clone(){const t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(t.range=this.range.slice()),t}toJS(t,{mapAsMap:n,maxAliasCount:r,onAnchor:a,reviver:o}={}){if(!mo(t))throw new TypeError("A document argument is required");const l={anchors:new Map,doc:t,keep:!0,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof r=="number"?r:100},u=Hr(this,"",l);if(typeof a=="function")for(const{count:f,res:h}of l.anchors.values())a(h,f);return typeof o=="function"?fl(o,{"":u},"",u):u}}class Lh extends Pb{constructor(t){super(zb),this.source=t,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(t,n){let r;n!=null&&n.aliasResolveCache?r=n.aliasResolveCache:(r=[],go(t,{Node:(o,l)=>{(vs(l)||VN(l))&&r.push(l)}}),n&&(n.aliasResolveCache=r));let a;for(const o of r){if(o===this)break;o.anchor===this.source&&(a=o)}return a}toJSON(t,n){if(!n)return{source:this.source};const{anchors:r,doc:a,maxAliasCount:o}=n,l=this.resolve(a,n);if(!l){const f=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(f)}let u=r.get(l);if(u||(Hr(l,null,n),u=r.get(l)),(u==null?void 0:u.res)===void 0){const f="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(f)}if(o>=0&&(u.count+=1,u.aliasCount===0&&(u.aliasCount=Gf(a,l,r)),u.count*u.aliasCount>o)){const f="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(f)}return u.res}toString(t,n,r){const a=`*${this.source}`;if(t){if(ZN(this.source),t.options.verifyAliasOrder&&!t.anchors.has(this.source)){const o=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(o)}if(t.implicitKey)return`${a} `}return a}}function Gf(e,t,n){if(vs(t)){const r=t.resolve(e),a=n&&r&&n.get(r);return a?a.count*a.aliasCount:0}else if(Zt(t)){let r=0;for(const a of t.items){const o=Gf(e,a,n);o>r&&(r=o)}return r}else if(Kt(t)){const r=Gf(e,t.key,n),a=Gf(e,t.value,n);return Math.max(r,a)}return 1}const t_=e=>!e||typeof e!="function"&&typeof e!="object";class Ye extends Pb{constructor(t){super(Mi),this.value=t}toJSON(t,n){return n!=null&&n.keep?this.value:Hr(this.value,t,n)}toString(){return String(this.value)}}Ye.BLOCK_FOLDED="BLOCK_FOLDED";Ye.BLOCK_LITERAL="BLOCK_LITERAL";Ye.PLAIN="PLAIN";Ye.QUOTE_DOUBLE="QUOTE_DOUBLE";Ye.QUOTE_SINGLE="QUOTE_SINGLE";const P3="tag:yaml.org,2002:";function B3(e,t,n){if(t){const r=n.filter(o=>o.tag===t),a=r.find(o=>!o.format)??r[0];if(!a)throw new Error(`Tag ${t} not found`);return a}return n.find(r=>{var a;return((a=r.identify)==null?void 0:a.call(r,e))&&!r.format})}function vu(e,t,n){var m,y,b;if(mo(e)&&(e=e.contents),Jt(e))return e;if(Kt(e)){const k=(y=(m=n.schema[ms]).createNode)==null?void 0:y.call(m,n.schema,null,n);return k.items.push(e),k}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<"u"&&e instanceof BigInt)&&(e=e.valueOf());const{aliasDuplicateObjects:r,onAnchor:a,onTagObj:o,schema:l,sourceObjects:u}=n;let f;if(r&&e&&typeof e=="object"){if(f=u.get(e),f)return f.anchor??(f.anchor=a(e)),new Lh(f.anchor);f={anchor:null,node:null},u.set(e,f)}t!=null&&t.startsWith("!!")&&(t=P3+t.slice(2));let h=B3(e,t,l.tags);if(!h){if(e&&typeof e.toJSON=="function"&&(e=e.toJSON()),!e||typeof e!="object"){const k=new Ye(e);return f&&(f.node=k),k}h=e instanceof Map?l[ms]:Symbol.iterator in Object(e)?l[Ql]:l[ms]}o&&(o(h),delete n.onTagObj);const g=h!=null&&h.createNode?h.createNode(n.schema,e,n):typeof((b=h==null?void 0:h.nodeClass)==null?void 0:b.from)=="function"?h.nodeClass.from(n.schema,e,n):new Ye(e);return t?g.tag=t:h.default||(g.tag=h.tag),f&&(f.node=g),g}function lh(e,t,n){let r=n;for(let a=t.length-1;a>=0;--a){const o=t[a];if(typeof o=="number"&&Number.isInteger(o)&&o>=0){const l=[];l[o]=r,r=l}else r=new Map([[o,r]])}return vu(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}const au=e=>e==null||typeof e=="object"&&!!e[Symbol.iterator]().next().done;class n_ extends Pb{constructor(t,n){super(t),Object.defineProperty(this,"schema",{value:n,configurable:!0,enumerable:!1,writable:!0})}clone(t){const n=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return t&&(n.schema=t),n.items=n.items.map(r=>Jt(r)||Kt(r)?r.clone(t):r),this.range&&(n.range=this.range.slice()),n}addIn(t,n){if(au(t))this.add(n);else{const[r,...a]=t,o=this.get(r,!0);if(Zt(o))o.addIn(a,n);else if(o===void 0&&this.schema)this.set(r,lh(this.schema,a,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${a}`)}}deleteIn(t){const[n,...r]=t;if(r.length===0)return this.delete(n);const a=this.get(n,!0);if(Zt(a))return a.deleteIn(r);throw new Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}getIn(t,n){const[r,...a]=t,o=this.get(r,!0);return a.length===0?!n&&It(o)?o.value:o:Zt(o)?o.getIn(a,n):void 0}hasAllNullValues(t){return this.items.every(n=>{if(!Kt(n))return!1;const r=n.value;return r==null||t&&It(r)&&r.value==null&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(t){const[n,...r]=t;if(r.length===0)return this.has(n);const a=this.get(n,!0);return Zt(a)?a.hasIn(r):!1}setIn(t,n){const[r,...a]=t;if(a.length===0)this.set(r,n);else{const o=this.get(r,!0);if(Zt(o))o.setIn(a,n);else if(o===void 0&&this.schema)this.set(r,lh(this.schema,a,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${a}`)}}}const U3=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function oa(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}const Ks=(e,t,n)=>e.endsWith(`
|
|
429
|
+
`)?oa(n,t):n.includes(`
|
|
430
|
+
`)?`
|
|
431
|
+
`+oa(n,t):(e.endsWith(" ")?"":" ")+n,r_="flow",Ly="block",Vf="quoted";function Ih(e,t,n="flow",{indentAtStart:r,lineWidth:a=80,minContentWidth:o=20,onFold:l,onOverflow:u}={}){if(!a||a<0)return e;a<o&&(o=0);const f=Math.max(1+o,1+a-t.length);if(e.length<=f)return e;const h=[],g={};let m=a-t.length;typeof r=="number"&&(r>a-Math.max(2,o)?h.push(0):m=a-r);let y,b,k=!1,v=-1,S=-1,E=-1;n===Ly&&(v=ek(e,v,t.length),v!==-1&&(m=v+f));for(let N;N=e[v+=1];){if(n===Vf&&N==="\\"){switch(S=v,e[v+1]){case"x":v+=3;break;case"u":v+=5;break;case"U":v+=9;break;default:v+=1}E=v}if(N===`
|
|
432
|
+
`)n===Ly&&(v=ek(e,v,t.length)),m=v+t.length+f,y=void 0;else{if(N===" "&&b&&b!==" "&&b!==`
|
|
433
|
+
`&&b!==" "){const _=e[v+1];_&&_!==" "&&_!==`
|
|
434
|
+
`&&_!==" "&&(y=v)}if(v>=m)if(y)h.push(y),m=y+f,y=void 0;else if(n===Vf){for(;b===" "||b===" ";)b=N,N=e[v+=1],k=!0;const _=v>E+1?v-2:S-1;if(g[_])return e;h.push(_),g[_]=!0,m=_+f,y=void 0}else k=!0}b=N}if(k&&u&&u(),h.length===0)return e;l&&l();let C=e.slice(0,h[0]);for(let N=0;N<h.length;++N){const _=h[N],D=h[N+1]||e.length;_===0?C=`
|
|
435
|
+
${t}${e.slice(0,D)}`:(n===Vf&&g[_]&&(C+=`${e[_]}\\`),C+=`
|
|
436
|
+
${t}${e.slice(_+1,D)}`)}return C}function ek(e,t,n){let r=t,a=t+1,o=e[a];for(;o===" "||o===" ";)if(t<a+n)o=e[++t];else{do o=e[++t];while(o&&o!==`
|
|
437
|
+
`);r=t,a=t+1,o=e[a]}return r}const zh=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),Ph=e=>/^(%|---|\.\.\.)/m.test(e);function $3(e,t,n){if(!t||t<0)return!1;const r=t-n,a=e.length;if(a<=r)return!1;for(let o=0,l=0;o<a;++o)if(e[o]===`
|
|
438
|
+
`){if(o-l>r)return!0;if(l=o+1,a-l<=r)return!1}return!0}function lu(e,t){const n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;const{implicitKey:r}=t,a=t.options.doubleQuotedMinMultiLineLength,o=t.indent||(Ph(e)?" ":"");let l="",u=0;for(let f=0,h=n[f];h;h=n[++f])if(h===" "&&n[f+1]==="\\"&&n[f+2]==="n"&&(l+=n.slice(u,f)+"\\ ",f+=1,u=f,h="\\"),h==="\\")switch(n[f+1]){case"u":{l+=n.slice(u,f);const g=n.substr(f+2,4);switch(g){case"0000":l+="\\0";break;case"0007":l+="\\a";break;case"000b":l+="\\v";break;case"001b":l+="\\e";break;case"0085":l+="\\N";break;case"00a0":l+="\\_";break;case"2028":l+="\\L";break;case"2029":l+="\\P";break;default:g.substr(0,2)==="00"?l+="\\x"+g.substr(2):l+=n.substr(f,6)}f+=5,u=f+1}break;case"n":if(r||n[f+2]==='"'||n.length<a)f+=1;else{for(l+=n.slice(u,f)+`
|
|
439
|
+
|
|
440
|
+
`;n[f+2]==="\\"&&n[f+3]==="n"&&n[f+4]!=='"';)l+=`
|
|
441
|
+
`,f+=2;l+=o,n[f+2]===" "&&(l+="\\"),f+=1,u=f+1}break;default:f+=1}return l=u?l+n.slice(u):n,r?l:Ih(l,o,Vf,zh(t,!1))}function Iy(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes(`
|
|
442
|
+
`)||/[ \t]\n|\n[ \t]/.test(e))return lu(e,t);const n=t.indent||(Ph(e)?" ":""),r="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&
|
|
443
|
+
${n}`)+"'";return t.implicitKey?r:Ih(r,n,r_,zh(t,!1))}function hl(e,t){const{singleQuote:n}=t.options;let r;if(n===!1)r=lu;else{const a=e.includes('"'),o=e.includes("'");a&&!o?r=Iy:o&&!a?r=lu:r=n?Iy:lu}return r(e,t)}let zy;try{zy=new RegExp(`(^|(?<!
|
|
444
|
+
))
|
|
445
|
+
+(?!
|
|
446
|
+
|$)`,"g")}catch{zy=/\n+(?!\n|$)/g}function Yf({comment:e,type:t,value:n},r,a,o){const{blockQuote:l,commentString:u,lineWidth:f}=r.options;if(!l||/\n[\t ]+$/.test(n))return hl(n,r);const h=r.indent||(r.forceBlockIndent||Ph(n)?" ":""),g=l==="literal"?!0:l==="folded"||t===Ye.BLOCK_FOLDED?!1:t===Ye.BLOCK_LITERAL?!0:!$3(n,f,h.length);if(!n)return g?`|
|
|
447
|
+
`:`>
|
|
448
|
+
`;let m,y;for(y=n.length;y>0;--y){const D=n[y-1];if(D!==`
|
|
449
|
+
`&&D!==" "&&D!==" ")break}let b=n.substring(y);const k=b.indexOf(`
|
|
450
|
+
`);k===-1?m="-":n===b||k!==b.length-1?(m="+",o&&o()):m="",b&&(n=n.slice(0,-b.length),b[b.length-1]===`
|
|
451
|
+
`&&(b=b.slice(0,-1)),b=b.replace(zy,`$&${h}`));let v=!1,S,E=-1;for(S=0;S<n.length;++S){const D=n[S];if(D===" ")v=!0;else if(D===`
|
|
452
|
+
`)E=S;else break}let C=n.substring(0,E<S?E+1:S);C&&(n=n.substring(C.length),C=C.replace(/\n+/g,`$&${h}`));let _=(v?h?"2":"1":"")+m;if(e&&(_+=" "+u(e.replace(/ ?[\r\n]+/g," ")),a&&a()),!g){const D=n.replace(/\n+/g,`
|
|
453
|
+
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${h}`);let T=!1;const M=zh(r,!0);l!=="folded"&&t!==Ye.BLOCK_FOLDED&&(M.onOverflow=()=>{T=!0});const I=Ih(`${C}${D}${b}`,h,Ly,M);if(!T)return`>${_}
|
|
454
|
+
${h}${I}`}return n=n.replace(/\n+/g,`$&${h}`),`|${_}
|
|
455
|
+
${h}${C}${n}${b}`}function F3(e,t,n,r){const{type:a,value:o}=e,{actualString:l,implicitKey:u,indent:f,indentStep:h,inFlow:g}=t;if(u&&o.includes(`
|
|
456
|
+
`)||g&&/[[\]{},]/.test(o))return hl(o,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(o))return u||g||!o.includes(`
|
|
457
|
+
`)?hl(o,t):Yf(e,t,n,r);if(!u&&!g&&a!==Ye.PLAIN&&o.includes(`
|
|
458
|
+
`))return Yf(e,t,n,r);if(Ph(o)){if(f==="")return t.forceBlockIndent=!0,Yf(e,t,n,r);if(u&&f===h)return hl(o,t)}const m=o.replace(/\n+/g,`$&
|
|
459
|
+
${f}`);if(l){const y=v=>{var S;return v.default&&v.tag!=="tag:yaml.org,2002:str"&&((S=v.test)==null?void 0:S.test(m))},{compat:b,tags:k}=t.doc.schema;if(k.some(y)||b!=null&&b.some(y))return hl(o,t)}return u?m:Ih(m,f,r_,zh(t,!1))}function Ku(e,t,n,r){const{implicitKey:a,inFlow:o}=t,l=typeof e.value=="string"?e:Object.assign({},e,{value:String(e.value)});let{type:u}=e;u!==Ye.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(l.value)&&(u=Ye.QUOTE_DOUBLE);const f=g=>{switch(g){case Ye.BLOCK_FOLDED:case Ye.BLOCK_LITERAL:return a||o?hl(l.value,t):Yf(l,t,n,r);case Ye.QUOTE_DOUBLE:return lu(l.value,t);case Ye.QUOTE_SINGLE:return Iy(l.value,t);case Ye.PLAIN:return F3(l,t,n,r);default:return null}};let h=f(u);if(h===null){const{defaultKeyType:g,defaultStringType:m}=t.options,y=a&&g||m;if(h=f(y),h===null)throw new Error(`Unsupported default string type ${y}`)}return h}function i_(e,t){const n=Object.assign({blockQuote:!0,commentString:U3,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,t);let r;switch(n.collectionStyle){case"block":r=!1;break;case"flow":r=!0;break;default:r=null}return{anchors:new Set,doc:e,flowCollectionPadding:n.flowCollectionPadding?" ":"",indent:"",indentStep:typeof n.indent=="number"?" ".repeat(n.indent):" ",inFlow:r,options:n}}function q3(e,t){var a;if(t.tag){const o=e.filter(l=>l.tag===t.tag);if(o.length>0)return o.find(l=>l.format===t.format)??o[0]}let n,r;if(It(t)){r=t.value;let o=e.filter(l=>{var u;return(u=l.identify)==null?void 0:u.call(l,r)});if(o.length>1){const l=o.filter(u=>u.test);l.length>0&&(o=l)}n=o.find(l=>l.format===t.format)??o.find(l=>!l.format)}else r=t,n=e.find(o=>o.nodeClass&&r instanceof o.nodeClass);if(!n){const o=((a=r==null?void 0:r.constructor)==null?void 0:a.name)??(r===null?"null":typeof r);throw new Error(`Tag not resolved for ${o} value`)}return n}function H3(e,t,{anchors:n,doc:r}){if(!r.directives)return"";const a=[],o=(It(e)||Zt(e))&&e.anchor;o&&ZN(o)&&(n.add(o),a.push(`&${o}`));const l=e.tag??(t.default?null:t.tag);return l&&a.push(r.directives.tagString(l)),a.join(" ")}function Rl(e,t,n,r){var f;if(Kt(e))return e.toString(t,n,r);if(vs(e)){if(t.doc.directives)return e.toString(t);if((f=t.resolvedAliases)!=null&&f.has(e))throw new TypeError("Cannot stringify circular structure without alias nodes");t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let a;const o=Jt(e)?e:t.doc.createNode(e,{onTagObj:h=>a=h});a??(a=q3(t.doc.schema.tags,o));const l=H3(o,a,t);l.length>0&&(t.indentAtStart=(t.indentAtStart??0)+l.length+1);const u=typeof a.stringify=="function"?a.stringify(o,t,n,r):It(o)?Ku(o,t,n,r):o.toString(t,n,r);return l?It(o)||u[0]==="{"||u[0]==="["?`${l} ${u}`:`${l}
|
|
460
|
+
${t.indent}${u}`:u}function K3({key:e,value:t},n,r,a){const{allNullValues:o,doc:l,indent:u,indentStep:f,options:{commentString:h,indentSeq:g,simpleKeys:m}}=n;let y=Jt(e)&&e.comment||null;if(m){if(y)throw new Error("With simple keys, key nodes cannot have comments");if(Zt(e)||!Jt(e)&&typeof e=="object"){const M="With simple keys, collection cannot be used as a key value";throw new Error(M)}}let b=!m&&(!e||y&&t==null&&!n.inFlow||Zt(e)||(It(e)?e.type===Ye.BLOCK_FOLDED||e.type===Ye.BLOCK_LITERAL:typeof e=="object"));n=Object.assign({},n,{allNullValues:!1,implicitKey:!b&&(m||!o),indent:u+f});let k=!1,v=!1,S=Rl(e,n,()=>k=!0,()=>v=!0);if(!b&&!n.inFlow&&S.length>1024){if(m)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");b=!0}if(n.inFlow){if(o||t==null)return k&&r&&r(),S===""?"?":b?`? ${S}`:S}else if(o&&!m||t==null&&b)return S=`? ${S}`,y&&!k?S+=Ks(S,n.indent,h(y)):v&&a&&a(),S;k&&(y=null),b?(y&&(S+=Ks(S,n.indent,h(y))),S=`? ${S}
|
|
461
|
+
${u}:`):(S=`${S}:`,y&&(S+=Ks(S,n.indent,h(y))));let E,C,N;Jt(t)?(E=!!t.spaceBefore,C=t.commentBefore,N=t.comment):(E=!1,C=null,N=null,t&&typeof t=="object"&&(t=l.createNode(t))),n.implicitKey=!1,!b&&!y&&It(t)&&(n.indentAtStart=S.length+1),v=!1,!g&&f.length>=2&&!n.inFlow&&!b&&Xl(t)&&!t.flow&&!t.tag&&!t.anchor&&(n.indent=n.indent.substring(2));let _=!1;const D=Rl(t,n,()=>_=!0,()=>v=!0);let T=" ";if(y||E||C){if(T=E?`
|
|
462
|
+
`:"",C){const M=h(C);T+=`
|
|
463
|
+
${oa(M,n.indent)}`}D===""&&!n.inFlow?T===`
|
|
464
|
+
`&&N&&(T=`
|
|
465
|
+
|
|
466
|
+
`):T+=`
|
|
467
|
+
${n.indent}`}else if(!b&&Zt(t)){const M=D[0],I=D.indexOf(`
|
|
468
|
+
`),F=I!==-1,$=n.inFlow??t.flow??t.items.length===0;if(F||!$){let U=!1;if(F&&(M==="&"||M==="!")){let K=D.indexOf(" ");M==="&"&&K!==-1&&K<I&&D[K+1]==="!"&&(K=D.indexOf(" ",K+1)),(K===-1||I<K)&&(U=!0)}U||(T=`
|
|
469
|
+
${n.indent}`)}}else(D===""||D[0]===`
|
|
470
|
+
`)&&(T="");return S+=T+D,n.inFlow?_&&r&&r():N&&!_?S+=Ks(S,n.indent,h(N)):v&&a&&a(),S}function a_(e,t){(e==="debug"||e==="warn")&&console.warn(t)}const xf="<<",ca={identify:e=>e===xf||typeof e=="symbol"&&e.description===xf,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new Ye(Symbol(xf)),{addToJSMap:s_}),stringify:()=>xf},G3=(e,t)=>(ca.identify(t)||It(t)&&(!t.type||t.type===Ye.PLAIN)&&ca.identify(t.value))&&(e==null?void 0:e.doc.schema.tags.some(n=>n.tag===ca.tag&&n.default));function s_(e,t,n){if(n=e&&vs(n)?n.resolve(e.doc):n,Xl(n))for(const r of n.items)kg(e,t,r);else if(Array.isArray(n))for(const r of n)kg(e,t,r);else kg(e,t,n)}function kg(e,t,n){const r=e&&vs(n)?n.resolve(e.doc):n;if(!Wl(r))throw new Error("Merge sources must be maps or map aliases");const a=r.toJSON(null,e,Map);for(const[o,l]of a)t instanceof Map?t.has(o)||t.set(o,l):t instanceof Set?t.add(o):Object.prototype.hasOwnProperty.call(t,o)||Object.defineProperty(t,o,{value:l,writable:!0,enumerable:!0,configurable:!0});return t}function o_(e,t,{key:n,value:r}){if(Jt(n)&&n.addToJSMap)n.addToJSMap(e,t,r);else if(G3(e,n))s_(e,t,r);else{const a=Hr(n,"",e);if(t instanceof Map)t.set(a,Hr(r,a,e));else if(t instanceof Set)t.add(a);else{const o=V3(n,a,e),l=Hr(r,o,e);o in t?Object.defineProperty(t,o,{value:l,writable:!0,enumerable:!0,configurable:!0}):t[o]=l}}return t}function V3(e,t,n){if(t===null)return"";if(typeof t!="object")return String(t);if(Jt(e)&&(n!=null&&n.doc)){const r=i_(n.doc,{});r.anchors=new Set;for(const o of n.anchors.keys())r.anchors.add(o.anchor);r.inFlow=!0,r.inStringifyKey=!0;const a=e.toString(r);if(!n.mapKeyWarned){let o=JSON.stringify(a);o.length>40&&(o=o.substring(0,36)+'..."'),a_(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${o}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return a}return JSON.stringify(t)}function Bb(e,t,n){const r=vu(e,void 0,n),a=vu(t,void 0,n);return new qn(r,a)}class qn{constructor(t,n=null){Object.defineProperty(this,Gr,{value:GN}),this.key=t,this.value=n}clone(t){let{key:n,value:r}=this;return Jt(n)&&(n=n.clone(t)),Jt(r)&&(r=r.clone(t)),new qn(n,r)}toJSON(t,n){const r=n!=null&&n.mapAsMap?new Map:{};return o_(n,r,this)}toString(t,n,r){return t!=null&&t.doc?K3(this,t,n,r):JSON.stringify(this)}}function l_(e,t,n){return(t.inFlow??e.flow?Q3:Y3)(e,t,n)}function Y3({comment:e,items:t},n,{blockItemPrefix:r,flowChars:a,itemIndent:o,onChompKeep:l,onComment:u}){const{indent:f,options:{commentString:h}}=n,g=Object.assign({},n,{indent:o,type:null});let m=!1;const y=[];for(let k=0;k<t.length;++k){const v=t[k];let S=null;if(Jt(v))!m&&v.spaceBefore&&y.push(""),ch(n,y,v.commentBefore,m),v.comment&&(S=v.comment);else if(Kt(v)){const C=Jt(v.key)?v.key:null;C&&(!m&&C.spaceBefore&&y.push(""),ch(n,y,C.commentBefore,m))}m=!1;let E=Rl(v,g,()=>S=null,()=>m=!0);S&&(E+=Ks(E,o,h(S))),m&&S&&(m=!1),y.push(r+E)}let b;if(y.length===0)b=a.start+a.end;else{b=y[0];for(let k=1;k<y.length;++k){const v=y[k];b+=v?`
|
|
471
|
+
${f}${v}`:`
|
|
472
|
+
`}}return e?(b+=`
|
|
473
|
+
`+oa(h(e),f),u&&u()):m&&l&&l(),b}function Q3({items:e},t,{flowChars:n,itemIndent:r}){const{indent:a,indentStep:o,flowCollectionPadding:l,options:{commentString:u}}=t;r+=o;const f=Object.assign({},t,{indent:r,inFlow:!0,type:null});let h=!1,g=0;const m=[];for(let k=0;k<e.length;++k){const v=e[k];let S=null;if(Jt(v))v.spaceBefore&&m.push(""),ch(t,m,v.commentBefore,!1),v.comment&&(S=v.comment);else if(Kt(v)){const C=Jt(v.key)?v.key:null;C&&(C.spaceBefore&&m.push(""),ch(t,m,C.commentBefore,!1),C.comment&&(h=!0));const N=Jt(v.value)?v.value:null;N?(N.comment&&(S=N.comment),N.commentBefore&&(h=!0)):v.value==null&&(C!=null&&C.comment)&&(S=C.comment)}S&&(h=!0);let E=Rl(v,f,()=>S=null);h||(h=m.length>g||E.includes(`
|
|
474
|
+
`)),k<e.length-1?E+=",":t.options.trailingComma&&(t.options.lineWidth>0&&(h||(h=m.reduce((C,N)=>C+N.length+2,2)+(E.length+2)>t.options.lineWidth)),h&&(E+=",")),S&&(E+=Ks(E,r,u(S))),m.push(E),g=m.length}const{start:y,end:b}=n;if(m.length===0)return y+b;if(!h){const k=m.reduce((v,S)=>v+S.length+2,2);h=t.options.lineWidth>0&&k>t.options.lineWidth}if(h){let k=y;for(const v of m)k+=v?`
|
|
475
|
+
${o}${a}${v}`:`
|
|
476
|
+
`;return`${k}
|
|
477
|
+
${a}${b}`}else return`${y}${l}${m.join(" ")}${l}${b}`}function ch({indent:e,options:{commentString:t}},n,r,a){if(r&&a&&(r=r.replace(/^\n+/,"")),r){const o=oa(t(r),e);n.push(o.trimStart())}}function Gs(e,t){const n=It(t)?t.value:t;for(const r of e)if(Kt(r)&&(r.key===t||r.key===n||It(r.key)&&r.key.value===n))return r}class Er extends n_{static get tagName(){return"tag:yaml.org,2002:map"}constructor(t){super(ms,t),this.items=[]}static from(t,n,r){const{keepUndefined:a,replacer:o}=r,l=new this(t),u=(f,h)=>{if(typeof o=="function")h=o.call(n,f,h);else if(Array.isArray(o)&&!o.includes(f))return;(h!==void 0||a)&&l.items.push(Bb(f,h,r))};if(n instanceof Map)for(const[f,h]of n)u(f,h);else if(n&&typeof n=="object")for(const f of Object.keys(n))u(f,n[f]);return typeof t.sortMapEntries=="function"&&l.items.sort(t.sortMapEntries),l}add(t,n){var l;let r;Kt(t)?r=t:!t||typeof t!="object"||!("key"in t)?r=new qn(t,t==null?void 0:t.value):r=new qn(t.key,t.value);const a=Gs(this.items,r.key),o=(l=this.schema)==null?void 0:l.sortMapEntries;if(a){if(!n)throw new Error(`Key ${r.key} already set`);It(a.value)&&t_(r.value)?a.value.value=r.value:a.value=r.value}else if(o){const u=this.items.findIndex(f=>o(r,f)<0);u===-1?this.items.push(r):this.items.splice(u,0,r)}else this.items.push(r)}delete(t){const n=Gs(this.items,t);return n?this.items.splice(this.items.indexOf(n),1).length>0:!1}get(t,n){const r=Gs(this.items,t),a=r==null?void 0:r.value;return(!n&&It(a)?a.value:a)??void 0}has(t){return!!Gs(this.items,t)}set(t,n){this.add(new qn(t,n),!0)}toJSON(t,n,r){const a=r?new r:n!=null&&n.mapAsMap?new Map:{};n!=null&&n.onCreate&&n.onCreate(a);for(const o of this.items)o_(n,a,o);return a}toString(t,n,r){if(!t)return JSON.stringify(this);for(const a of this.items)if(!Kt(a))throw new Error(`Map items must all be pairs; found ${JSON.stringify(a)} instead`);return!t.allNullValues&&this.hasAllNullValues(!1)&&(t=Object.assign({},t,{allNullValues:!0})),l_(this,t,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:t.indent||"",onChompKeep:r,onComment:n})}}const Zl={collection:"map",default:!0,nodeClass:Er,tag:"tag:yaml.org,2002:map",resolve(e,t){return Wl(e)||t("Expected a mapping for this tag"),e},createNode:(e,t,n)=>Er.from(e,t,n)};class ys extends n_{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(t){super(Ql,t),this.items=[]}add(t){this.items.push(t)}delete(t){const n=vf(t);return typeof n!="number"?!1:this.items.splice(n,1).length>0}get(t,n){const r=vf(t);if(typeof r!="number")return;const a=this.items[r];return!n&&It(a)?a.value:a}has(t){const n=vf(t);return typeof n=="number"&&n<this.items.length}set(t,n){const r=vf(t);if(typeof r!="number")throw new Error(`Expected a valid index, not ${t}.`);const a=this.items[r];It(a)&&t_(n)?a.value=n:this.items[r]=n}toJSON(t,n){const r=[];n!=null&&n.onCreate&&n.onCreate(r);let a=0;for(const o of this.items)r.push(Hr(o,String(a++),n));return r}toString(t,n,r){return t?l_(this,t,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(t.indent||"")+" ",onChompKeep:r,onComment:n}):JSON.stringify(this)}static from(t,n,r){const{replacer:a}=r,o=new this(t);if(n&&Symbol.iterator in Object(n)){let l=0;for(let u of n){if(typeof a=="function"){const f=n instanceof Set?u:String(l++);u=a.call(n,f,u)}o.items.push(vu(u,void 0,r))}}return o}}function vf(e){let t=It(e)?e.value:e;return t&&typeof t=="string"&&(t=Number(t)),typeof t=="number"&&Number.isInteger(t)&&t>=0?t:null}const Jl={collection:"seq",default:!0,nodeClass:ys,tag:"tag:yaml.org,2002:seq",resolve(e,t){return Xl(e)||t("Expected a sequence for this tag"),e},createNode:(e,t,n)=>ys.from(e,t,n)},Bh={identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify(e,t,n,r){return t=Object.assign({actualString:!0},t),Ku(e,t,n,r)}},Uh={identify:e=>e==null,createNode:()=>new Ye(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new Ye(null),stringify:({source:e},t)=>typeof e=="string"&&Uh.test.test(e)?e:t.options.nullStr},Ub={identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new Ye(e[0]==="t"||e[0]==="T"),stringify({source:e,value:t},n){if(e&&Ub.test.test(e)){const r=e[0]==="t"||e[0]==="T";if(t===r)return e}return t?n.options.trueStr:n.options.falseStr}};function pi({format:e,minFractionDigits:t,tag:n,value:r}){if(typeof r=="bigint")return String(r);const a=typeof r=="number"?r:Number(r);if(!isFinite(a))return isNaN(a)?".nan":a<0?"-.inf":".inf";let o=Object.is(r,-0)?"-0":JSON.stringify(r);if(!e&&t&&(!n||n==="tag:yaml.org,2002:float")&&/^\d/.test(o)){let l=o.indexOf(".");l<0&&(l=o.length,o+=".");let u=t-(o.length-l-1);for(;u-- >0;)o+="0"}return o}const c_={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:pi},u_={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():pi(e)}},d_={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){const t=new Ye(parseFloat(e)),n=e.indexOf(".");return n!==-1&&e[e.length-1]==="0"&&(t.minFractionDigits=e.length-n-1),t},stringify:pi},$h=e=>typeof e=="bigint"||Number.isInteger(e),$b=(e,t,n,{intAsBigInt:r})=>r?BigInt(e):parseInt(e.substring(t),n);function f_(e,t,n){const{value:r}=e;return $h(r)&&r>=0?n+r.toString(t):pi(e)}const h_={identify:e=>$h(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,n)=>$b(e,2,8,n),stringify:e=>f_(e,8,"0o")},p_={identify:$h,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,n)=>$b(e,0,10,n),stringify:pi},m_={identify:e=>$h(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,n)=>$b(e,2,16,n),stringify:e=>f_(e,16,"0x")},W3=[Zl,Jl,Bh,Uh,Ub,h_,p_,m_,c_,u_,d_];function tk(e){return typeof e=="bigint"||Number.isInteger(e)}const wf=({value:e})=>JSON.stringify(e),X3=[{identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:wf},{identify:e=>e==null,createNode:()=>new Ye(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:wf},{identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:e=>e==="true",stringify:wf},{identify:tk,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:n})=>n?BigInt(e):parseInt(e,10),stringify:({value:e})=>tk(e)?e.toString():JSON.stringify(e)},{identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:wf}],Z3={default:!0,tag:"",test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}},J3=[Zl,Jl].concat(X3,Z3),Fb={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(e,t){if(typeof atob=="function"){const n=atob(e.replace(/[\n\r]/g,"")),r=new Uint8Array(n.length);for(let a=0;a<n.length;++a)r[a]=n.charCodeAt(a);return r}else return t("This environment does not support reading binary tags; either Buffer or atob is required"),e},stringify({comment:e,type:t,value:n},r,a,o){if(!n)return"";const l=n;let u;if(typeof btoa=="function"){let f="";for(let h=0;h<l.length;++h)f+=String.fromCharCode(l[h]);u=btoa(f)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(t??(t=Ye.BLOCK_LITERAL),t!==Ye.QUOTE_DOUBLE){const f=Math.max(r.options.lineWidth-r.indent.length,r.options.minContentWidth),h=Math.ceil(u.length/f),g=new Array(h);for(let m=0,y=0;m<h;++m,y+=f)g[m]=u.substr(y,f);u=g.join(t===Ye.BLOCK_LITERAL?`
|
|
478
|
+
`:" ")}return Ku({comment:e,type:t,value:u},r,a,o)}};function g_(e,t){if(Xl(e))for(let n=0;n<e.items.length;++n){let r=e.items[n];if(!Kt(r)){if(Wl(r)){r.items.length>1&&t("Each pair must have its own sequence indicator");const a=r.items[0]||new qn(new Ye(null));if(r.commentBefore&&(a.key.commentBefore=a.key.commentBefore?`${r.commentBefore}
|
|
479
|
+
${a.key.commentBefore}`:r.commentBefore),r.comment){const o=a.value??a.key;o.comment=o.comment?`${r.comment}
|
|
480
|
+
${o.comment}`:r.comment}r=a}e.items[n]=Kt(r)?r:new qn(r)}}else t("Expected a sequence for this tag");return e}function y_(e,t,n){const{replacer:r}=n,a=new ys(e);a.tag="tag:yaml.org,2002:pairs";let o=0;if(t&&Symbol.iterator in Object(t))for(let l of t){typeof r=="function"&&(l=r.call(t,String(o++),l));let u,f;if(Array.isArray(l))if(l.length===2)u=l[0],f=l[1];else throw new TypeError(`Expected [key, value] tuple: ${l}`);else if(l&&l instanceof Object){const h=Object.keys(l);if(h.length===1)u=h[0],f=l[u];else throw new TypeError(`Expected tuple with one key, not ${h.length} keys`)}else u=l;a.items.push(Bb(u,f,n))}return a}const qb={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:g_,createNode:y_};class gl extends ys{constructor(){super(),this.add=Er.prototype.add.bind(this),this.delete=Er.prototype.delete.bind(this),this.get=Er.prototype.get.bind(this),this.has=Er.prototype.has.bind(this),this.set=Er.prototype.set.bind(this),this.tag=gl.tag}toJSON(t,n){if(!n)return super.toJSON(t);const r=new Map;n!=null&&n.onCreate&&n.onCreate(r);for(const a of this.items){let o,l;if(Kt(a)?(o=Hr(a.key,"",n),l=Hr(a.value,o,n)):o=Hr(a,"",n),r.has(o))throw new Error("Ordered maps must not include duplicate keys");r.set(o,l)}return r}static from(t,n,r){const a=y_(t,n,r),o=new this;return o.items=a.items,o}}gl.tag="tag:yaml.org,2002:omap";const Hb={collection:"seq",identify:e=>e instanceof Map,nodeClass:gl,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){const n=g_(e,t),r=[];for(const{key:a}of n.items)It(a)&&(r.includes(a.value)?t(`Ordered maps must not include duplicate keys: ${a.value}`):r.push(a.value));return Object.assign(new gl,n)},createNode:(e,t,n)=>gl.from(e,t,n)};function b_({value:e,source:t},n){return t&&(e?x_:v_).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}const x_={identify:e=>e===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new Ye(!0),stringify:b_},v_={identify:e=>e===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new Ye(!1),stringify:b_},eI={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:pi},tI={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,"")),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():pi(e)}},nI={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){const t=new Ye(parseFloat(e.replace(/_/g,""))),n=e.indexOf(".");if(n!==-1){const r=e.substring(n+1).replace(/_/g,"");r[r.length-1]==="0"&&(t.minFractionDigits=r.length)}return t},stringify:pi},Gu=e=>typeof e=="bigint"||Number.isInteger(e);function Fh(e,t,n,{intAsBigInt:r}){const a=e[0];if((a==="-"||a==="+")&&(t+=1),e=e.substring(t).replace(/_/g,""),r){switch(n){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`;break}const l=BigInt(e);return a==="-"?BigInt(-1)*l:l}const o=parseInt(e,n);return a==="-"?-1*o:o}function Kb(e,t,n){const{value:r}=e;if(Gu(r)){const a=r.toString(t);return r<0?"-"+n+a.substr(1):n+a}return pi(e)}const rI={identify:Gu,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,n)=>Fh(e,2,2,n),stringify:e=>Kb(e,2,"0b")},iI={identify:Gu,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,n)=>Fh(e,1,8,n),stringify:e=>Kb(e,8,"0")},aI={identify:Gu,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,n)=>Fh(e,0,10,n),stringify:pi},sI={identify:Gu,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,n)=>Fh(e,2,16,n),stringify:e=>Kb(e,16,"0x")};class yl extends Er{constructor(t){super(t),this.tag=yl.tag}add(t){let n;Kt(t)?n=t:t&&typeof t=="object"&&"key"in t&&"value"in t&&t.value===null?n=new qn(t.key,null):n=new qn(t,null),Gs(this.items,n.key)||this.items.push(n)}get(t,n){const r=Gs(this.items,t);return!n&&Kt(r)?It(r.key)?r.key.value:r.key:r}set(t,n){if(typeof n!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof n}`);const r=Gs(this.items,t);r&&!n?this.items.splice(this.items.indexOf(r),1):!r&&n&&this.items.push(new qn(t))}toJSON(t,n){return super.toJSON(t,n,Set)}toString(t,n,r){if(!t)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},t,{allNullValues:!0}),n,r);throw new Error("Set items must all have null values")}static from(t,n,r){const{replacer:a}=r,o=new this(t);if(n&&Symbol.iterator in Object(n))for(let l of n)typeof a=="function"&&(l=a.call(n,l,l)),o.items.push(Bb(l,null,r));return o}}yl.tag="tag:yaml.org,2002:set";const Gb={collection:"map",identify:e=>e instanceof Set,nodeClass:yl,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,n)=>yl.from(e,t,n),resolve(e,t){if(Wl(e)){if(e.hasAllNullValues(!0))return Object.assign(new yl,e);t("Set items must all have null values")}else t("Expected a mapping for this tag");return e}};function Vb(e,t){const n=e[0],r=n==="-"||n==="+"?e.substring(1):e,a=l=>t?BigInt(l):Number(l),o=r.replace(/_/g,"").split(":").reduce((l,u)=>l*a(60)+a(u),a(0));return n==="-"?a(-1)*o:o}function w_(e){let{value:t}=e,n=l=>l;if(typeof t=="bigint")n=l=>BigInt(l);else if(isNaN(t)||!isFinite(t))return pi(e);let r="";t<0&&(r="-",t*=n(-1));const a=n(60),o=[t%a];return t<60?o.unshift(0):(t=(t-o[0])/a,o.unshift(t%a),t>=60&&(t=(t-o[0])/a,o.unshift(t))),r+o.map(l=>String(l).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const k_={identify:e=>typeof e=="bigint"||Number.isInteger(e),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:n})=>Vb(e,n),stringify:w_},E_={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>Vb(e,!1),stringify:w_},qh={identify:e=>e instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(e){const t=e.match(qh.test);if(!t)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,n,r,a,o,l,u]=t.map(Number),f=t[7]?Number((t[7]+"00").substr(1,3)):0;let h=Date.UTC(n,r-1,a,o||0,l||0,u||0,f);const g=t[8];if(g&&g!=="Z"){let m=Vb(g,!1);Math.abs(m)<30&&(m*=60),h-=6e4*m}return new Date(h)},stringify:({value:e})=>(e==null?void 0:e.toISOString().replace(/(T00:00:00)?\.000Z$/,""))??""},nk=[Zl,Jl,Bh,Uh,x_,v_,rI,iI,aI,sI,eI,tI,nI,Fb,ca,Hb,qb,Gb,k_,E_,qh],rk=new Map([["core",W3],["failsafe",[Zl,Jl,Bh]],["json",J3],["yaml11",nk],["yaml-1.1",nk]]),ik={binary:Fb,bool:Ub,float:d_,floatExp:u_,floatNaN:c_,floatTime:E_,int:p_,intHex:m_,intOct:h_,intTime:k_,map:Zl,merge:ca,null:Uh,omap:Hb,pairs:qb,seq:Jl,set:Gb,timestamp:qh},oI={"tag:yaml.org,2002:binary":Fb,"tag:yaml.org,2002:merge":ca,"tag:yaml.org,2002:omap":Hb,"tag:yaml.org,2002:pairs":qb,"tag:yaml.org,2002:set":Gb,"tag:yaml.org,2002:timestamp":qh};function Eg(e,t,n){const r=rk.get(t);if(r&&!e)return n&&!r.includes(ca)?r.concat(ca):r.slice();let a=r;if(!a)if(Array.isArray(e))a=[];else{const o=Array.from(rk.keys()).filter(l=>l!=="yaml11").map(l=>JSON.stringify(l)).join(", ");throw new Error(`Unknown schema "${t}"; use one of ${o} or define customTags array`)}if(Array.isArray(e))for(const o of e)a=a.concat(o);else typeof e=="function"&&(a=e(a.slice()));return n&&(a=a.concat(ca)),a.reduce((o,l)=>{const u=typeof l=="string"?ik[l]:l;if(!u){const f=JSON.stringify(l),h=Object.keys(ik).map(g=>JSON.stringify(g)).join(", ");throw new Error(`Unknown custom tag ${f}; use one of ${h}`)}return o.includes(u)||o.push(u),o},[])}const lI=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0;let S_=class N_{constructor({compat:t,customTags:n,merge:r,resolveKnownTags:a,schema:o,sortMapEntries:l,toStringDefaults:u}){this.compat=Array.isArray(t)?Eg(t,"compat"):t?Eg(null,t):null,this.name=typeof o=="string"&&o||"core",this.knownTags=a?oI:{},this.tags=Eg(n,this.name,r),this.toStringOptions=u??null,Object.defineProperty(this,ms,{value:Zl}),Object.defineProperty(this,Mi,{value:Bh}),Object.defineProperty(this,Ql,{value:Jl}),this.sortMapEntries=typeof l=="function"?l:l===!0?lI:null}clone(){const t=Object.create(N_.prototype,Object.getOwnPropertyDescriptors(this));return t.tags=this.tags.slice(),t}};function cI(e,t){var f;const n=[];let r=t.directives===!0;if(t.directives!==!1&&e.directives){const h=e.directives.toString(e);h?(n.push(h),r=!0):e.directives.docStart&&(r=!0)}r&&n.push("---");const a=i_(e,t),{commentString:o}=a.options;if(e.commentBefore){n.length!==1&&n.unshift("");const h=o(e.commentBefore);n.unshift(oa(h,""))}let l=!1,u=null;if(e.contents){if(Jt(e.contents)){if(e.contents.spaceBefore&&r&&n.push(""),e.contents.commentBefore){const m=o(e.contents.commentBefore);n.push(oa(m,""))}a.forceBlockIndent=!!e.comment,u=e.contents.comment}const h=u?void 0:()=>l=!0;let g=Rl(e.contents,a,()=>u=null,h);u&&(g+=Ks(g,"",o(u))),(g[0]==="|"||g[0]===">")&&n[n.length-1]==="---"?n[n.length-1]=`--- ${g}`:n.push(g)}else n.push(Rl(e.contents,a));if((f=e.directives)!=null&&f.docEnd)if(e.comment){const h=o(e.comment);h.includes(`
|
|
481
|
+
`)?(n.push("..."),n.push(oa(h,""))):n.push(`... ${h}`)}else n.push("...");else{let h=e.comment;h&&l&&(h=h.replace(/^\n+/,"")),h&&((!l||u)&&n[n.length-1]!==""&&n.push(""),n.push(oa(o(h),"")))}return n.join(`
|
|
482
|
+
`)+`
|
|
483
|
+
`}class ec{constructor(t,n,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,Gr,{value:Ry});let a=null;typeof n=="function"||Array.isArray(n)?a=n:r===void 0&&n&&(r=n,n=void 0);const o=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},r);this.options=o;let{version:l}=o;r!=null&&r._directives?(this.directives=r._directives.atDocument(),this.directives.yaml.explicit&&(l=this.directives.yaml.version)):this.directives=new Xn({version:l}),this.setSchema(l,r),this.contents=t===void 0?null:this.createNode(t,a,r)}clone(){const t=Object.create(ec.prototype,{[Gr]:{value:Ry}});return t.commentBefore=this.commentBefore,t.comment=this.comment,t.errors=this.errors.slice(),t.warnings=this.warnings.slice(),t.options=Object.assign({},this.options),this.directives&&(t.directives=this.directives.clone()),t.schema=this.schema.clone(),t.contents=Jt(this.contents)?this.contents.clone(t.schema):this.contents,this.range&&(t.range=this.range.slice()),t}add(t){el(this.contents)&&this.contents.add(t)}addIn(t,n){el(this.contents)&&this.contents.addIn(t,n)}createAlias(t,n){if(!t.anchor){const r=JN(this);t.anchor=!n||r.has(n)?e_(n||"a",r):n}return new Lh(t.anchor)}createNode(t,n,r){let a;if(typeof n=="function")t=n.call({"":t},"",t),a=n;else if(Array.isArray(n)){const S=C=>typeof C=="number"||C instanceof String||C instanceof Number,E=n.filter(S).map(String);E.length>0&&(n=n.concat(E)),a=n}else r===void 0&&n&&(r=n,n=void 0);const{aliasDuplicateObjects:o,anchorPrefix:l,flow:u,keepUndefined:f,onTagObj:h,tag:g}=r??{},{onAnchor:m,setAnchors:y,sourceObjects:b}=z3(this,l||"a"),k={aliasDuplicateObjects:o??!0,keepUndefined:f??!1,onAnchor:m,onTagObj:h,replacer:a,schema:this.schema,sourceObjects:b},v=vu(t,g,k);return u&&Zt(v)&&(v.flow=!0),y(),v}createPair(t,n,r={}){const a=this.createNode(t,null,r),o=this.createNode(n,null,r);return new qn(a,o)}delete(t){return el(this.contents)?this.contents.delete(t):!1}deleteIn(t){return au(t)?this.contents==null?!1:(this.contents=null,!0):el(this.contents)?this.contents.deleteIn(t):!1}get(t,n){return Zt(this.contents)?this.contents.get(t,n):void 0}getIn(t,n){return au(t)?!n&&It(this.contents)?this.contents.value:this.contents:Zt(this.contents)?this.contents.getIn(t,n):void 0}has(t){return Zt(this.contents)?this.contents.has(t):!1}hasIn(t){return au(t)?this.contents!==void 0:Zt(this.contents)?this.contents.hasIn(t):!1}set(t,n){this.contents==null?this.contents=lh(this.schema,[t],n):el(this.contents)&&this.contents.set(t,n)}setIn(t,n){au(t)?this.contents=n:this.contents==null?this.contents=lh(this.schema,Array.from(t),n):el(this.contents)&&this.contents.setIn(t,n)}setSchema(t,n={}){typeof t=="number"&&(t=String(t));let r;switch(t){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new Xn({version:"1.1"}),r={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=t:this.directives=new Xn({version:t}),r={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,r=null;break;default:{const a=JSON.stringify(t);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${a}`)}}if(n.schema instanceof Object)this.schema=n.schema;else if(r)this.schema=new S_(Object.assign(r,n));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:t,jsonArg:n,mapAsMap:r,maxAliasCount:a,onAnchor:o,reviver:l}={}){const u={anchors:new Map,doc:this,keep:!t,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof a=="number"?a:100},f=Hr(this.contents,n??"",u);if(typeof o=="function")for(const{count:h,res:g}of u.anchors.values())o(g,h);return typeof l=="function"?fl(l,{"":f},"",f):f}toJSON(t,n){return this.toJS({json:!0,jsonArg:t,mapAsMap:!1,onAnchor:n})}toString(t={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in t&&(!Number.isInteger(t.indent)||Number(t.indent)<=0)){const n=JSON.stringify(t.indent);throw new Error(`"indent" option must be a positive integer, not ${n}`)}return cI(this,t)}}function el(e){if(Zt(e))return!0;throw new Error("Expected a YAML collection as document contents")}class Yb extends Error{constructor(t,n,r,a){super(),this.name=t,this.code=r,this.message=a,this.pos=n}}class Vs extends Yb{constructor(t,n,r){super("YAMLParseError",t,n,r)}}class __ extends Yb{constructor(t,n,r){super("YAMLWarning",t,n,r)}}const uh=(e,t)=>n=>{if(n.pos[0]===-1)return;n.linePos=n.pos.map(u=>t.linePos(u));const{line:r,col:a}=n.linePos[0];n.message+=` at line ${r}, column ${a}`;let o=a-1,l=e.substring(t.lineStarts[r-1],t.lineStarts[r]).replace(/[\n\r]+$/,"");if(o>=60&&l.length>80){const u=Math.min(o-39,l.length-79);l="…"+l.substring(u),o-=u-1}if(l.length>80&&(l=l.substring(0,79)+"…"),r>1&&/^ *$/.test(l.substring(0,o))){let u=e.substring(t.lineStarts[r-2],t.lineStarts[r-1]);u.length>80&&(u=u.substring(0,79)+`…
|
|
484
|
+
`),l=u+l}if(/[^ ]/.test(l)){let u=1;const f=n.linePos[1];(f==null?void 0:f.line)===r&&f.col>a&&(u=Math.max(1,Math.min(f.col-a,80-o)));const h=" ".repeat(o)+"^".repeat(u);n.message+=`:
|
|
485
|
+
|
|
486
|
+
${l}
|
|
487
|
+
${h}
|
|
488
|
+
`}};function Ll(e,{flow:t,indicator:n,next:r,offset:a,onError:o,parentIndent:l,startOnNewline:u}){let f=!1,h=u,g=u,m="",y="",b=!1,k=!1,v=null,S=null,E=null,C=null,N=null,_=null,D=null;for(const I of e)switch(k&&(I.type!=="space"&&I.type!=="newline"&&I.type!=="comma"&&o(I.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),k=!1),v&&(h&&I.type!=="comment"&&I.type!=="newline"&&o(v,"TAB_AS_INDENT","Tabs are not allowed as indentation"),v=null),I.type){case"space":!t&&(n!=="doc-start"||(r==null?void 0:r.type)!=="flow-collection")&&I.source.includes(" ")&&(v=I),g=!0;break;case"comment":{g||o(I,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const F=I.source.substring(1)||" ";m?m+=y+F:m=F,y="",h=!1;break}case"newline":h?m?m+=I.source:(!_||n!=="seq-item-ind")&&(f=!0):y+=I.source,h=!0,b=!0,(S||E)&&(C=I),g=!0;break;case"anchor":S&&o(I,"MULTIPLE_ANCHORS","A node can have at most one anchor"),I.source.endsWith(":")&&o(I.offset+I.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),S=I,D??(D=I.offset),h=!1,g=!1,k=!0;break;case"tag":{E&&o(I,"MULTIPLE_TAGS","A node can have at most one tag"),E=I,D??(D=I.offset),h=!1,g=!1,k=!0;break}case n:(S||E)&&o(I,"BAD_PROP_ORDER",`Anchors and tags must be after the ${I.source} indicator`),_&&o(I,"UNEXPECTED_TOKEN",`Unexpected ${I.source} in ${t??"collection"}`),_=I,h=n==="seq-item-ind"||n==="explicit-key-ind",g=!1;break;case"comma":if(t){N&&o(I,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),N=I,h=!1,g=!1;break}default:o(I,"UNEXPECTED_TOKEN",`Unexpected ${I.type} token`),h=!1,g=!1}const T=e[e.length-1],M=T?T.offset+T.source.length:a;return k&&r&&r.type!=="space"&&r.type!=="newline"&&r.type!=="comma"&&(r.type!=="scalar"||r.source!=="")&&o(r.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),v&&(h&&v.indent<=l||(r==null?void 0:r.type)==="block-map"||(r==null?void 0:r.type)==="block-seq")&&o(v,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:N,found:_,spaceBefore:f,comment:m,hasNewline:b,anchor:S,tag:E,newlineAfterProp:C,end:M,start:D??M}}function wu(e){if(!e)return null;switch(e.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(e.source.includes(`
|
|
489
|
+
`))return!0;if(e.end){for(const t of e.end)if(t.type==="newline")return!0}return!1;case"flow-collection":for(const t of e.items){for(const n of t.start)if(n.type==="newline")return!0;if(t.sep){for(const n of t.sep)if(n.type==="newline")return!0}if(wu(t.key)||wu(t.value))return!0}return!1;default:return!0}}function Py(e,t,n){if((t==null?void 0:t.type)==="flow-collection"){const r=t.end[0];r.indent===e&&(r.source==="]"||r.source==="}")&&wu(t)&&n(r,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function C_(e,t,n){const{uniqueKeys:r}=e.options;if(r===!1)return!1;const a=typeof r=="function"?r:(o,l)=>o===l||It(o)&&It(l)&&o.value===l.value;return t.some(o=>a(o.key,n))}const ak="All mapping items must start at the same column";function uI({composeNode:e,composeEmptyNode:t},n,r,a,o){var g;const l=(o==null?void 0:o.nodeClass)??Er,u=new l(n.schema);n.atRoot&&(n.atRoot=!1);let f=r.offset,h=null;for(const m of r.items){const{start:y,key:b,sep:k,value:v}=m,S=Ll(y,{indicator:"explicit-key-ind",next:b??(k==null?void 0:k[0]),offset:f,onError:a,parentIndent:r.indent,startOnNewline:!0}),E=!S.found;if(E){if(b&&(b.type==="block-seq"?a(f,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in b&&b.indent!==r.indent&&a(f,"BAD_INDENT",ak)),!S.anchor&&!S.tag&&!k){h=S.end,S.comment&&(u.comment?u.comment+=`
|
|
490
|
+
`+S.comment:u.comment=S.comment);continue}(S.newlineAfterProp||wu(b))&&a(b??y[y.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else((g=S.found)==null?void 0:g.indent)!==r.indent&&a(f,"BAD_INDENT",ak);n.atKey=!0;const C=S.end,N=b?e(n,b,S,a):t(n,C,y,null,S,a);n.schema.compat&&Py(r.indent,b,a),n.atKey=!1,C_(n,u.items,N)&&a(C,"DUPLICATE_KEY","Map keys must be unique");const _=Ll(k??[],{indicator:"map-value-ind",next:v,offset:N.range[2],onError:a,parentIndent:r.indent,startOnNewline:!b||b.type==="block-scalar"});if(f=_.end,_.found){E&&((v==null?void 0:v.type)==="block-map"&&!_.hasNewline&&a(f,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),n.options.strict&&S.start<_.found.offset-1024&&a(N.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const D=v?e(n,v,_,a):t(n,f,k,null,_,a);n.schema.compat&&Py(r.indent,v,a),f=D.range[2];const T=new qn(N,D);n.options.keepSourceTokens&&(T.srcToken=m),u.items.push(T)}else{E&&a(N.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),_.comment&&(N.comment?N.comment+=`
|
|
491
|
+
`+_.comment:N.comment=_.comment);const D=new qn(N);n.options.keepSourceTokens&&(D.srcToken=m),u.items.push(D)}}return h&&h<f&&a(h,"IMPOSSIBLE","Map comment with trailing content"),u.range=[r.offset,f,h??f],u}function dI({composeNode:e,composeEmptyNode:t},n,r,a,o){const l=(o==null?void 0:o.nodeClass)??ys,u=new l(n.schema);n.atRoot&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let f=r.offset,h=null;for(const{start:g,value:m}of r.items){const y=Ll(g,{indicator:"seq-item-ind",next:m,offset:f,onError:a,parentIndent:r.indent,startOnNewline:!0});if(!y.found)if(y.anchor||y.tag||m)(m==null?void 0:m.type)==="block-seq"?a(y.end,"BAD_INDENT","All sequence items must start at the same column"):a(f,"MISSING_CHAR","Sequence item without - indicator");else{h=y.end,y.comment&&(u.comment=y.comment);continue}const b=m?e(n,m,y,a):t(n,y.end,g,null,y,a);n.schema.compat&&Py(r.indent,m,a),f=b.range[2],u.items.push(b)}return u.range=[r.offset,f,h??f],u}function Vu(e,t,n,r){let a="";if(e){let o=!1,l="";for(const u of e){const{source:f,type:h}=u;switch(h){case"space":o=!0;break;case"comment":{n&&!o&&r(u,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const g=f.substring(1)||" ";a?a+=l+g:a=g,l="";break}case"newline":a&&(l+=f),o=!0;break;default:r(u,"UNEXPECTED_TOKEN",`Unexpected ${h} at node end`)}t+=f.length}}return{comment:a,offset:t}}const Sg="Block collections are not allowed within flow collections",Ng=e=>e&&(e.type==="block-map"||e.type==="block-seq");function fI({composeNode:e,composeEmptyNode:t},n,r,a,o){var S;const l=r.start.source==="{",u=l?"flow map":"flow sequence",f=(o==null?void 0:o.nodeClass)??(l?Er:ys),h=new f(n.schema);h.flow=!0;const g=n.atRoot;g&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let m=r.offset+r.start.source.length;for(let E=0;E<r.items.length;++E){const C=r.items[E],{start:N,key:_,sep:D,value:T}=C,M=Ll(N,{flow:u,indicator:"explicit-key-ind",next:_??(D==null?void 0:D[0]),offset:m,onError:a,parentIndent:r.indent,startOnNewline:!1});if(!M.found){if(!M.anchor&&!M.tag&&!D&&!T){E===0&&M.comma?a(M.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${u}`):E<r.items.length-1&&a(M.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${u}`),M.comment&&(h.comment?h.comment+=`
|
|
492
|
+
`+M.comment:h.comment=M.comment),m=M.end;continue}!l&&n.options.strict&&wu(_)&&a(_,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(E===0)M.comma&&a(M.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${u}`);else if(M.comma||a(M.start,"MISSING_CHAR",`Missing , between ${u} items`),M.comment){let I="";e:for(const F of N)switch(F.type){case"comma":case"space":break;case"comment":I=F.source.substring(1);break e;default:break e}if(I){let F=h.items[h.items.length-1];Kt(F)&&(F=F.value??F.key),F.comment?F.comment+=`
|
|
493
|
+
`+I:F.comment=I,M.comment=M.comment.substring(I.length+1)}}if(!l&&!D&&!M.found){const I=T?e(n,T,M,a):t(n,M.end,D,null,M,a);h.items.push(I),m=I.range[2],Ng(T)&&a(I.range,"BLOCK_IN_FLOW",Sg)}else{n.atKey=!0;const I=M.end,F=_?e(n,_,M,a):t(n,I,N,null,M,a);Ng(_)&&a(F.range,"BLOCK_IN_FLOW",Sg),n.atKey=!1;const $=Ll(D??[],{flow:u,indicator:"map-value-ind",next:T,offset:F.range[2],onError:a,parentIndent:r.indent,startOnNewline:!1});if($.found){if(!l&&!M.found&&n.options.strict){if(D)for(const Q of D){if(Q===$.found)break;if(Q.type==="newline"){a(Q,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}M.start<$.found.offset-1024&&a($.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else T&&("source"in T&&((S=T.source)==null?void 0:S[0])===":"?a(T,"MISSING_CHAR",`Missing space after : in ${u}`):a($.start,"MISSING_CHAR",`Missing , or : between ${u} items`));const U=T?e(n,T,$,a):$.found?t(n,$.end,D,null,$,a):null;U?Ng(T)&&a(U.range,"BLOCK_IN_FLOW",Sg):$.comment&&(F.comment?F.comment+=`
|
|
494
|
+
`+$.comment:F.comment=$.comment);const K=new qn(F,U);if(n.options.keepSourceTokens&&(K.srcToken=C),l){const Q=h;C_(n,Q.items,F)&&a(I,"DUPLICATE_KEY","Map keys must be unique"),Q.items.push(K)}else{const Q=new Er(n.schema);Q.flow=!0,Q.items.push(K);const B=(U??F).range;Q.range=[F.range[0],B[1],B[2]],h.items.push(Q)}m=U?U.range[2]:$.end}}const y=l?"}":"]",[b,...k]=r.end;let v=m;if((b==null?void 0:b.source)===y)v=b.offset+b.source.length;else{const E=u[0].toUpperCase()+u.substring(1),C=g?`${E} must end with a ${y}`:`${E} in block collection must be sufficiently indented and end with a ${y}`;a(m,g?"MISSING_CHAR":"BAD_INDENT",C),b&&b.source.length!==1&&k.unshift(b)}if(k.length>0){const E=Vu(k,v,n.options.strict,a);E.comment&&(h.comment?h.comment+=`
|
|
495
|
+
`+E.comment:h.comment=E.comment),h.range=[r.offset,v,E.offset]}else h.range=[r.offset,v,v];return h}function _g(e,t,n,r,a,o){const l=n.type==="block-map"?uI(e,t,n,r,o):n.type==="block-seq"?dI(e,t,n,r,o):fI(e,t,n,r,o),u=l.constructor;return a==="!"||a===u.tagName?(l.tag=u.tagName,l):(a&&(l.tag=a),l)}function hI(e,t,n,r,a){var y;const o=r.tag,l=o?t.directives.tagName(o.source,b=>a(o,"TAG_RESOLVE_FAILED",b)):null;if(n.type==="block-seq"){const{anchor:b,newlineAfterProp:k}=r,v=b&&o?b.offset>o.offset?b:o:b??o;v&&(!k||k.offset<v.offset)&&a(v,"MISSING_CHAR","Missing newline after block sequence props")}const u=n.type==="block-map"?"map":n.type==="block-seq"?"seq":n.start.source==="{"?"map":"seq";if(!o||!l||l==="!"||l===Er.tagName&&u==="map"||l===ys.tagName&&u==="seq")return _g(e,t,n,a,l);let f=t.schema.tags.find(b=>b.tag===l&&b.collection===u);if(!f){const b=t.schema.knownTags[l];if((b==null?void 0:b.collection)===u)t.schema.tags.push(Object.assign({},b,{default:!1})),f=b;else return b?a(o,"BAD_COLLECTION_TYPE",`${b.tag} used for ${u} collection, but expects ${b.collection??"scalar"}`,!0):a(o,"TAG_RESOLVE_FAILED",`Unresolved tag: ${l}`,!0),_g(e,t,n,a,l)}const h=_g(e,t,n,a,l,f),g=((y=f.resolve)==null?void 0:y.call(f,h,b=>a(o,"TAG_RESOLVE_FAILED",b),t.options))??h,m=Jt(g)?g:new Ye(g);return m.range=h.range,m.tag=l,f!=null&&f.format&&(m.format=f.format),m}function j_(e,t,n){const r=t.offset,a=pI(t,e.options.strict,n);if(!a)return{value:"",type:null,comment:"",range:[r,r,r]};const o=a.mode===">"?Ye.BLOCK_FOLDED:Ye.BLOCK_LITERAL,l=t.source?mI(t.source):[];let u=l.length;for(let v=l.length-1;v>=0;--v){const S=l[v][1];if(S===""||S==="\r")u=v;else break}if(u===0){const v=a.chomp==="+"&&l.length>0?`
|
|
496
|
+
`.repeat(Math.max(1,l.length-1)):"";let S=r+a.length;return t.source&&(S+=t.source.length),{value:v,type:o,comment:a.comment,range:[r,S,S]}}let f=t.indent+a.indent,h=t.offset+a.length,g=0;for(let v=0;v<u;++v){const[S,E]=l[v];if(E===""||E==="\r")a.indent===0&&S.length>f&&(f=S.length);else{S.length<f&&n(h+S.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),a.indent===0&&(f=S.length),g=v,f===0&&!e.atRoot&&n(h,"BAD_INDENT","Block scalar values in collections must be indented");break}h+=S.length+E.length+1}for(let v=l.length-1;v>=u;--v)l[v][0].length>f&&(u=v+1);let m="",y="",b=!1;for(let v=0;v<g;++v)m+=l[v][0].slice(f)+`
|
|
497
|
+
`;for(let v=g;v<u;++v){let[S,E]=l[v];h+=S.length+E.length+1;const C=E[E.length-1]==="\r";if(C&&(E=E.slice(0,-1)),E&&S.length<f){const _=`Block scalar lines must not be less indented than their ${a.indent?"explicit indentation indicator":"first line"}`;n(h-E.length-(C?2:1),"BAD_INDENT",_),S=""}o===Ye.BLOCK_LITERAL?(m+=y+S.slice(f)+E,y=`
|
|
498
|
+
`):S.length>f||E[0]===" "?(y===" "?y=`
|
|
499
|
+
`:!b&&y===`
|
|
500
|
+
`&&(y=`
|
|
501
|
+
|
|
502
|
+
`),m+=y+S.slice(f)+E,y=`
|
|
503
|
+
`,b=!0):E===""?y===`
|
|
504
|
+
`?m+=`
|
|
505
|
+
`:y=`
|
|
506
|
+
`:(m+=y+E,y=" ",b=!1)}switch(a.chomp){case"-":break;case"+":for(let v=u;v<l.length;++v)m+=`
|
|
507
|
+
`+l[v][0].slice(f);m[m.length-1]!==`
|
|
508
|
+
`&&(m+=`
|
|
509
|
+
`);break;default:m+=`
|
|
510
|
+
`}const k=r+a.length+t.source.length;return{value:m,type:o,comment:a.comment,range:[r,k,k]}}function pI({offset:e,props:t},n,r){if(t[0].type!=="block-scalar-header")return r(t[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:a}=t[0],o=a[0];let l=0,u="",f=-1;for(let y=1;y<a.length;++y){const b=a[y];if(!u&&(b==="-"||b==="+"))u=b;else{const k=Number(b);!l&&k?l=k:f===-1&&(f=e+y)}}f!==-1&&r(f,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${a}`);let h=!1,g="",m=a.length;for(let y=1;y<t.length;++y){const b=t[y];switch(b.type){case"space":h=!0;case"newline":m+=b.source.length;break;case"comment":n&&!h&&r(b,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),m+=b.source.length,g=b.source.substring(1);break;case"error":r(b,"UNEXPECTED_TOKEN",b.message),m+=b.source.length;break;default:{const k=`Unexpected token in block scalar header: ${b.type}`;r(b,"UNEXPECTED_TOKEN",k);const v=b.source;v&&typeof v=="string"&&(m+=v.length)}}}return{mode:o,indent:l,chomp:u,comment:g,length:m}}function mI(e){const t=e.split(/\n( *)/),n=t[0],r=n.match(/^( *)/),o=[r!=null&&r[1]?[r[1],n.slice(r[1].length)]:["",n]];for(let l=1;l<t.length;l+=2)o.push([t[l],t[l+1]]);return o}function A_(e,t,n){const{offset:r,type:a,source:o,end:l}=e;let u,f;const h=(y,b,k)=>n(r+y,b,k);switch(a){case"scalar":u=Ye.PLAIN,f=gI(o,h);break;case"single-quoted-scalar":u=Ye.QUOTE_SINGLE,f=yI(o,h);break;case"double-quoted-scalar":u=Ye.QUOTE_DOUBLE,f=bI(o,h);break;default:return n(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${a}`),{value:"",type:null,comment:"",range:[r,r+o.length,r+o.length]}}const g=r+o.length,m=Vu(l,g,t,n);return{value:f,type:u,comment:m.comment,range:[r,g,m.offset]}}function gI(e,t){let n="";switch(e[0]){case" ":n="a tab character";break;case",":n="flow indicator character ,";break;case"%":n="directive indicator character %";break;case"|":case">":{n=`block scalar indicator ${e[0]}`;break}case"@":case"`":{n=`reserved character ${e[0]}`;break}}return n&&t(0,"BAD_SCALAR_START",`Plain value cannot start with ${n}`),T_(e)}function yI(e,t){return(e[e.length-1]!=="'"||e.length===1)&&t(e.length,"MISSING_CHAR","Missing closing 'quote"),T_(e.slice(1,-1)).replace(/''/g,"'")}function T_(e){let t,n;try{t=new RegExp(`(.*?)(?<![ ])[ ]*\r?
|
|
511
|
+
`,"sy"),n=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
|
|
512
|
+
`,"sy")}catch{t=/(.*?)[ \t]*\r?\n/sy,n=/[ \t]*(.*?)[ \t]*\r?\n/sy}let r=t.exec(e);if(!r)return e;let a=r[1],o=" ",l=t.lastIndex;for(n.lastIndex=l;r=n.exec(e);)r[1]===""?o===`
|
|
513
|
+
`?a+=o:o=`
|
|
514
|
+
`:(a+=o+r[1],o=" "),l=n.lastIndex;const u=/[ \t]*(.*)/sy;return u.lastIndex=l,r=u.exec(e),a+o+((r==null?void 0:r[1])??"")}function bI(e,t){let n="";for(let r=1;r<e.length-1;++r){const a=e[r];if(!(a==="\r"&&e[r+1]===`
|
|
515
|
+
`))if(a===`
|
|
516
|
+
`){const{fold:o,offset:l}=xI(e,r);n+=o,r=l}else if(a==="\\"){let o=e[++r];const l=vI[o];if(l)n+=l;else if(o===`
|
|
517
|
+
`)for(o=e[r+1];o===" "||o===" ";)o=e[++r+1];else if(o==="\r"&&e[r+1]===`
|
|
518
|
+
`)for(o=e[++r+1];o===" "||o===" ";)o=e[++r+1];else if(o==="x"||o==="u"||o==="U"){const u={x:2,u:4,U:8}[o];n+=wI(e,r+1,u,t),r+=u}else{const u=e.substr(r-1,2);t(r-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${u}`),n+=u}}else if(a===" "||a===" "){const o=r;let l=e[r+1];for(;l===" "||l===" ";)l=e[++r+1];l!==`
|
|
519
|
+
`&&!(l==="\r"&&e[r+2]===`
|
|
520
|
+
`)&&(n+=r>o?e.slice(o,r+1):a)}else n+=a}return(e[e.length-1]!=='"'||e.length===1)&&t(e.length,"MISSING_CHAR",'Missing closing "quote'),n}function xI(e,t){let n="",r=e[t+1];for(;(r===" "||r===" "||r===`
|
|
521
|
+
`||r==="\r")&&!(r==="\r"&&e[t+2]!==`
|
|
522
|
+
`);)r===`
|
|
523
|
+
`&&(n+=`
|
|
524
|
+
`),t+=1,r=e[t+1];return n||(n=" "),{fold:n,offset:t}}const vI={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
|
|
525
|
+
`,r:"\r",t:" ",v:"\v",N:"
",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function wI(e,t,n,r){const a=e.substr(t,n),l=a.length===n&&/^[0-9a-fA-F]+$/.test(a)?parseInt(a,16):NaN;if(isNaN(l)){const u=e.substr(t-2,n+2);return r(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${u}`),u}return String.fromCodePoint(l)}function M_(e,t,n,r){const{value:a,type:o,comment:l,range:u}=t.type==="block-scalar"?j_(e,t,r):A_(t,e.options.strict,r),f=n?e.directives.tagName(n.source,m=>r(n,"TAG_RESOLVE_FAILED",m)):null;let h;e.options.stringKeys&&e.atKey?h=e.schema[Mi]:f?h=kI(e.schema,a,f,n,r):t.type==="scalar"?h=EI(e,a,t,r):h=e.schema[Mi];let g;try{const m=h.resolve(a,y=>r(n??t,"TAG_RESOLVE_FAILED",y),e.options);g=It(m)?m:new Ye(m)}catch(m){const y=m instanceof Error?m.message:String(m);r(n??t,"TAG_RESOLVE_FAILED",y),g=new Ye(a)}return g.range=u,g.source=a,o&&(g.type=o),f&&(g.tag=f),h.format&&(g.format=h.format),l&&(g.comment=l),g}function kI(e,t,n,r,a){var u;if(n==="!")return e[Mi];const o=[];for(const f of e.tags)if(!f.collection&&f.tag===n)if(f.default&&f.test)o.push(f);else return f;for(const f of o)if((u=f.test)!=null&&u.test(t))return f;const l=e.knownTags[n];return l&&!l.collection?(e.tags.push(Object.assign({},l,{default:!1,test:void 0})),l):(a(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${n}`,n!=="tag:yaml.org,2002:str"),e[Mi])}function EI({atKey:e,directives:t,schema:n},r,a,o){const l=n.tags.find(u=>{var f;return(u.default===!0||e&&u.default==="key")&&((f=u.test)==null?void 0:f.test(r))})||n[Mi];if(n.compat){const u=n.compat.find(f=>{var h;return f.default&&((h=f.test)==null?void 0:h.test(r))})??n[Mi];if(l.tag!==u.tag){const f=t.tagString(l.tag),h=t.tagString(u.tag),g=`Value may be parsed as either ${f} or ${h}`;o(a,"TAG_RESOLVE_FAILED",g,!0)}}return l}function SI(e,t,n){if(t){n??(n=t.length);for(let r=n-1;r>=0;--r){let a=t[r];switch(a.type){case"space":case"comment":case"newline":e-=a.source.length;continue}for(a=t[++r];(a==null?void 0:a.type)==="space";)e+=a.source.length,a=t[++r];break}}return e}const NI={composeNode:D_,composeEmptyNode:Qb};function D_(e,t,n,r){const a=e.atKey,{spaceBefore:o,comment:l,anchor:u,tag:f}=n;let h,g=!0;switch(t.type){case"alias":h=_I(e,t,r),(u||f)&&r(t,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":h=M_(e,t,f,r),u&&(h.anchor=u.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{h=hI(NI,e,t,n,r),u&&(h.anchor=u.source.substring(1))}catch(m){const y=m instanceof Error?m.message:String(m);r(t,"RESOURCE_EXHAUSTION",y)}break;default:{const m=t.type==="error"?t.message:`Unsupported token (type: ${t.type})`;r(t,"UNEXPECTED_TOKEN",m),g=!1}}return h??(h=Qb(e,t.offset,void 0,null,n,r)),u&&h.anchor===""&&r(u,"BAD_ALIAS","Anchor cannot be an empty string"),a&&e.options.stringKeys&&(!It(h)||typeof h.value!="string"||h.tag&&h.tag!=="tag:yaml.org,2002:str")&&r(f??t,"NON_STRING_KEY","With stringKeys, all keys must be strings"),o&&(h.spaceBefore=!0),l&&(t.type==="scalar"&&t.source===""?h.comment=l:h.commentBefore=l),e.options.keepSourceTokens&&g&&(h.srcToken=t),h}function Qb(e,t,n,r,{spaceBefore:a,comment:o,anchor:l,tag:u,end:f},h){const g={type:"scalar",offset:SI(t,n,r),indent:-1,source:""},m=M_(e,g,u,h);return l&&(m.anchor=l.source.substring(1),m.anchor===""&&h(l,"BAD_ALIAS","Anchor cannot be an empty string")),a&&(m.spaceBefore=!0),o&&(m.comment=o,m.range[2]=f),m}function _I({options:e},{offset:t,source:n,end:r},a){const o=new Lh(n.substring(1));o.source===""&&a(t,"BAD_ALIAS","Alias cannot be an empty string"),o.source.endsWith(":")&&a(t+n.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const l=t+n.length,u=Vu(r,l,e.strict,a);return o.range=[t,l,u.offset],u.comment&&(o.comment=u.comment),o}function CI(e,t,{offset:n,start:r,value:a,end:o},l){const u=Object.assign({_directives:t},e),f=new ec(void 0,u),h={atKey:!1,atRoot:!0,directives:f.directives,options:f.options,schema:f.schema},g=Ll(r,{indicator:"doc-start",next:a??(o==null?void 0:o[0]),offset:n,onError:l,parentIndent:0,startOnNewline:!0});g.found&&(f.directives.docStart=!0,a&&(a.type==="block-map"||a.type==="block-seq")&&!g.hasNewline&&l(g.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),f.contents=a?D_(h,a,g,l):Qb(h,g.end,r,null,g,l);const m=f.contents.range[2],y=Vu(o,m,!1,l);return y.comment&&(f.comment=y.comment),f.range=[n,m,y.offset],f}function Wc(e){if(typeof e=="number")return[e,e+1];if(Array.isArray(e))return e.length===2?e:[e[0],e[1]];const{offset:t,source:n}=e;return[t,t+(typeof n=="string"?n.length:1)]}function sk(e){var a;let t="",n=!1,r=!1;for(let o=0;o<e.length;++o){const l=e[o];switch(l[0]){case"#":t+=(t===""?"":r?`
|
|
526
|
+
|
|
527
|
+
`:`
|
|
528
|
+
`)+(l.substring(1)||" "),n=!0,r=!1;break;case"%":((a=e[o+1])==null?void 0:a[0])!=="#"&&(o+=1),n=!1;break;default:n||(r=!0),n=!1}}return{comment:t,afterEmptyLine:r}}class Wb{constructor(t={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(n,r,a,o)=>{const l=Wc(n);o?this.warnings.push(new __(l,r,a)):this.errors.push(new Vs(l,r,a))},this.directives=new Xn({version:t.version||"1.2"}),this.options=t}decorate(t,n){const{comment:r,afterEmptyLine:a}=sk(this.prelude);if(r){const o=t.contents;if(n)t.comment=t.comment?`${t.comment}
|
|
529
|
+
${r}`:r;else if(a||t.directives.docStart||!o)t.commentBefore=r;else if(Zt(o)&&!o.flow&&o.items.length>0){let l=o.items[0];Kt(l)&&(l=l.key);const u=l.commentBefore;l.commentBefore=u?`${r}
|
|
530
|
+
${u}`:r}else{const l=o.commentBefore;o.commentBefore=l?`${r}
|
|
531
|
+
${l}`:r}}n?(Array.prototype.push.apply(t.errors,this.errors),Array.prototype.push.apply(t.warnings,this.warnings)):(t.errors=this.errors,t.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:sk(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(t,n=!1,r=-1){for(const a of t)yield*this.next(a);yield*this.end(n,r)}*next(t){switch(t.type){case"directive":this.directives.add(t.source,(n,r,a)=>{const o=Wc(t);o[0]+=n,this.onError(o,"BAD_DIRECTIVE",r,a)}),this.prelude.push(t.source),this.atDirectives=!0;break;case"document":{const n=CI(this.options,this.directives,t,this.onError);this.atDirectives&&!n.directives.docStart&&this.onError(t,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(n,!1),this.doc&&(yield this.doc),this.doc=n,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(t.source);break;case"error":{const n=t.source?`${t.message}: ${JSON.stringify(t.source)}`:t.message,r=new Vs(Wc(t),"UNEXPECTED_TOKEN",n);this.atDirectives||!this.doc?this.errors.push(r):this.doc.errors.push(r);break}case"doc-end":{if(!this.doc){const r="Unexpected doc-end without preceding document";this.errors.push(new Vs(Wc(t),"UNEXPECTED_TOKEN",r));break}this.doc.directives.docEnd=!0;const n=Vu(t.end,t.offset+t.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),n.comment){const r=this.doc.comment;this.doc.comment=r?`${r}
|
|
532
|
+
${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.push(new Vs(Wc(t),"UNEXPECTED_TOKEN",`Unsupported token ${t.type}`))}}*end(t=!1,n=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(t){const r=Object.assign({_directives:this.directives},this.options),a=new ec(void 0,r);this.atDirectives&&this.onError(n,"MISSING_CHAR","Missing directives-end indicator line"),a.range=[0,n,n],this.decorate(a,!1),yield a}}}function jI(e,t=!0,n){if(e){const r=(a,o,l)=>{const u=typeof a=="number"?a:Array.isArray(a)?a[0]:a.offset;if(n)n(u,o,l);else throw new Vs([u,u+1],o,l)};switch(e.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return A_(e,t,r);case"block-scalar":return j_({options:{strict:t}},e,r)}}return null}function AI(e,t){const{implicitKey:n=!1,indent:r,inFlow:a=!1,offset:o=-1,type:l="PLAIN"}=t,u=Ku({type:l,value:e},{implicitKey:n,indent:r>0?" ".repeat(r):"",inFlow:a,options:{blockQuote:!0,lineWidth:-1}}),f=t.end??[{type:"newline",offset:-1,indent:r,source:`
|
|
533
|
+
`}];switch(u[0]){case"|":case">":{const h=u.indexOf(`
|
|
534
|
+
`),g=u.substring(0,h),m=u.substring(h+1)+`
|
|
535
|
+
`,y=[{type:"block-scalar-header",offset:o,indent:r,source:g}];return O_(y,f)||y.push({type:"newline",offset:-1,indent:r,source:`
|
|
536
|
+
`}),{type:"block-scalar",offset:o,indent:r,props:y,source:m}}case'"':return{type:"double-quoted-scalar",offset:o,indent:r,source:u,end:f};case"'":return{type:"single-quoted-scalar",offset:o,indent:r,source:u,end:f};default:return{type:"scalar",offset:o,indent:r,source:u,end:f}}}function TI(e,t,n={}){let{afterKey:r=!1,implicitKey:a=!1,inFlow:o=!1,type:l}=n,u="indent"in e?e.indent:null;if(r&&typeof u=="number"&&(u+=2),!l)switch(e.type){case"single-quoted-scalar":l="QUOTE_SINGLE";break;case"double-quoted-scalar":l="QUOTE_DOUBLE";break;case"block-scalar":{const h=e.props[0];if(h.type!=="block-scalar-header")throw new Error("Invalid block scalar header");l=h.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:l="PLAIN"}const f=Ku({type:l,value:t},{implicitKey:a||u===null,indent:u!==null&&u>0?" ".repeat(u):"",inFlow:o,options:{blockQuote:!0,lineWidth:-1}});switch(f[0]){case"|":case">":MI(e,f);break;case'"':Cg(e,f,"double-quoted-scalar");break;case"'":Cg(e,f,"single-quoted-scalar");break;default:Cg(e,f,"scalar")}}function MI(e,t){const n=t.indexOf(`
|
|
537
|
+
`),r=t.substring(0,n),a=t.substring(n+1)+`
|
|
538
|
+
`;if(e.type==="block-scalar"){const o=e.props[0];if(o.type!=="block-scalar-header")throw new Error("Invalid block scalar header");o.source=r,e.source=a}else{const{offset:o}=e,l="indent"in e?e.indent:-1,u=[{type:"block-scalar-header",offset:o,indent:l,source:r}];O_(u,"end"in e?e.end:void 0)||u.push({type:"newline",offset:-1,indent:l,source:`
|
|
539
|
+
`});for(const f of Object.keys(e))f!=="type"&&f!=="offset"&&delete e[f];Object.assign(e,{type:"block-scalar",indent:l,props:u,source:a})}}function O_(e,t){if(t)for(const n of t)switch(n.type){case"space":case"comment":e.push(n);break;case"newline":return e.push(n),!0}return!1}function Cg(e,t,n){switch(e.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":e.type=n,e.source=t;break;case"block-scalar":{const r=e.props.slice(1);let a=t.length;e.props[0].type==="block-scalar-header"&&(a-=e.props[0].source.length);for(const o of r)o.offset+=a;delete e.props,Object.assign(e,{type:n,source:t,end:r});break}case"block-map":case"block-seq":{const a={type:"newline",offset:e.offset+t.length,indent:e.indent,source:`
|
|
540
|
+
`};delete e.items,Object.assign(e,{type:n,source:t,end:[a]});break}default:{const r="indent"in e?e.indent:-1,a="end"in e&&Array.isArray(e.end)?e.end.filter(o=>o.type==="space"||o.type==="comment"||o.type==="newline"):[];for(const o of Object.keys(e))o!=="type"&&o!=="offset"&&delete e[o];Object.assign(e,{type:n,indent:r,source:t,end:a})}}}const DI=e=>"type"in e?dh(e):Qf(e);function dh(e){switch(e.type){case"block-scalar":{let t="";for(const n of e.props)t+=dh(n);return t+e.source}case"block-map":case"block-seq":{let t="";for(const n of e.items)t+=Qf(n);return t}case"flow-collection":{let t=e.start.source;for(const n of e.items)t+=Qf(n);for(const n of e.end)t+=n.source;return t}case"document":{let t=Qf(e);if(e.end)for(const n of e.end)t+=n.source;return t}default:{let t=e.source;if("end"in e&&e.end)for(const n of e.end)t+=n.source;return t}}}function Qf({start:e,key:t,sep:n,value:r}){let a="";for(const o of e)a+=o.source;if(t&&(a+=dh(t)),n)for(const o of n)a+=o.source;return r&&(a+=dh(r)),a}const By=Symbol("break visit"),OI=Symbol("skip children"),R_=Symbol("remove item");function oo(e,t){"type"in e&&e.type==="document"&&(e={start:e.start,value:e.value}),L_(Object.freeze([]),e,t)}oo.BREAK=By;oo.SKIP=OI;oo.REMOVE=R_;oo.itemAtPath=(e,t)=>{let n=e;for(const[r,a]of t){const o=n==null?void 0:n[r];if(o&&"items"in o)n=o.items[a];else return}return n};oo.parentCollection=(e,t)=>{const n=oo.itemAtPath(e,t.slice(0,-1)),r=t[t.length-1][0],a=n==null?void 0:n[r];if(a&&"items"in a)return a;throw new Error("Parent collection not found")};function L_(e,t,n){let r=n(t,e);if(typeof r=="symbol")return r;for(const a of["key","value"]){const o=t[a];if(o&&"items"in o){for(let l=0;l<o.items.length;++l){const u=L_(Object.freeze(e.concat([[a,l]])),o.items[l],n);if(typeof u=="number")l=u-1;else{if(u===By)return By;u===R_&&(o.items.splice(l,1),l-=1)}}typeof r=="function"&&a==="key"&&(r=r(t,e))}}return typeof r=="function"?r(t,e):r}const Hh="\uFEFF",Kh="",Gh="",ku="",RI=e=>!!e&&"items"in e,LI=e=>!!e&&(e.type==="scalar"||e.type==="single-quoted-scalar"||e.type==="double-quoted-scalar"||e.type==="block-scalar");function II(e){switch(e){case Hh:return"<BOM>";case Kh:return"<DOC>";case Gh:return"<FLOW_END>";case ku:return"<SCALAR>";default:return JSON.stringify(e)}}function I_(e){switch(e){case Hh:return"byte-order-mark";case Kh:return"doc-mode";case Gh:return"flow-error-end";case ku:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
|
|
541
|
+
`:case`\r
|
|
542
|
+
`:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(e[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}const zI=Object.freeze(Object.defineProperty({__proto__:null,BOM:Hh,DOCUMENT:Kh,FLOW_END:Gh,SCALAR:ku,createScalarToken:AI,isCollection:RI,isScalar:LI,prettyToken:II,resolveAsScalar:jI,setScalarValue:TI,stringify:DI,tokenType:I_,visit:oo},Symbol.toStringTag,{value:"Module"}));function ii(e){switch(e){case void 0:case" ":case`
|
|
543
|
+
`:case"\r":case" ":return!0;default:return!1}}const ok=new Set("0123456789ABCDEFabcdef"),PI=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),kf=new Set(",[]{}"),BI=new Set(` ,[]{}
|
|
544
|
+
\r `),jg=e=>!e||BI.has(e);class z_{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(t,n=!1){if(t){if(typeof t!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+t:t,this.lineEndPos=null}this.atEnd=!n;let r=this.next??"stream";for(;r&&(n||this.hasChars(1));)r=yield*this.parseNext(r)}atLineEnd(){let t=this.pos,n=this.buffer[t];for(;n===" "||n===" ";)n=this.buffer[++t];return!n||n==="#"||n===`
|
|
545
|
+
`?!0:n==="\r"?this.buffer[t+1]===`
|
|
546
|
+
`:!1}charAt(t){return this.buffer[this.pos+t]}continueScalar(t){let n=this.buffer[t];if(this.indentNext>0){let r=0;for(;n===" ";)n=this.buffer[++r+t];if(n==="\r"){const a=this.buffer[r+t+1];if(a===`
|
|
547
|
+
`||!a&&!this.atEnd)return t+r+1}return n===`
|
|
548
|
+
`||r>=this.indentNext||!n&&!this.atEnd?t+r:-1}if(n==="-"||n==="."){const r=this.buffer.substr(t,3);if((r==="---"||r==="...")&&ii(this.buffer[t+3]))return-1}return t}getLine(){let t=this.lineEndPos;return(typeof t!="number"||t!==-1&&t<this.pos)&&(t=this.buffer.indexOf(`
|
|
549
|
+
`,this.pos),this.lineEndPos=t),t===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[t-1]==="\r"&&(t-=1),this.buffer.substring(this.pos,t))}hasChars(t){return this.pos+t<=this.buffer.length}setNext(t){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=t,null}peek(t){return this.buffer.substr(this.pos,t)}*parseNext(t){switch(t){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let t=this.getLine();if(t===null)return this.setNext("stream");if(t[0]===Hh&&(yield*this.pushCount(1),t=t.substring(1)),t[0]==="%"){let n=t.length,r=t.indexOf("#");for(;r!==-1;){const o=t[r-1];if(o===" "||o===" "){n=r-1;break}else r=t.indexOf("#",r+1)}for(;;){const o=t[n-1];if(o===" "||o===" ")n-=1;else break}const a=(yield*this.pushCount(n))+(yield*this.pushSpaces(!0));return yield*this.pushCount(t.length-a),this.pushNewline(),"stream"}if(this.atLineEnd()){const n=yield*this.pushSpaces(!0);return yield*this.pushCount(t.length-n),yield*this.pushNewline(),"stream"}return yield Kh,yield*this.parseLineStart()}*parseLineStart(){const t=this.charAt(0);if(!t&&!this.atEnd)return this.setNext("line-start");if(t==="-"||t==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");const n=this.peek(3);if((n==="---"||n==="...")&&ii(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,n==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!ii(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[t,n]=this.peek(2);if(!n&&!this.atEnd)return this.setNext("block-start");if((t==="-"||t==="?"||t===":")&&ii(n)){const r=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=r,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const t=this.getLine();if(t===null)return this.setNext("doc");let n=yield*this.pushIndicators();switch(t[n]){case"#":yield*this.pushCount(t.length-n);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(jg),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return n+=yield*this.parseBlockScalarHeader(),n+=yield*this.pushSpaces(!0),yield*this.pushCount(t.length-n),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let t,n,r=-1;do t=yield*this.pushNewline(),t>0?(n=yield*this.pushSpaces(!1),this.indentValue=r=n):n=0,n+=yield*this.pushSpaces(!0);while(t+n>0);const a=this.getLine();if(a===null)return this.setNext("flow");if((r!==-1&&r<this.indentNext&&a[0]!=="#"||r===0&&(a.startsWith("---")||a.startsWith("..."))&&ii(a[3]))&&!(r===this.indentNext-1&&this.flowLevel===1&&(a[0]==="]"||a[0]==="}")))return this.flowLevel=0,yield Gh,yield*this.parseLineStart();let o=0;for(;a[o]===",";)o+=yield*this.pushCount(1),o+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(o+=yield*this.pushIndicators(),a[o]){case void 0:return"flow";case"#":return yield*this.pushCount(a.length-o),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(jg),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const l=this.charAt(1);if(this.flowKey||ii(l)||l===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){const t=this.charAt(0);let n=this.buffer.indexOf(t,this.pos+1);if(t==="'")for(;n!==-1&&this.buffer[n+1]==="'";)n=this.buffer.indexOf("'",n+2);else for(;n!==-1;){let o=0;for(;this.buffer[n-1-o]==="\\";)o+=1;if(o%2===0)break;n=this.buffer.indexOf('"',n+1)}const r=this.buffer.substring(0,n);let a=r.indexOf(`
|
|
550
|
+
`,this.pos);if(a!==-1){for(;a!==-1;){const o=this.continueScalar(a+1);if(o===-1)break;a=r.indexOf(`
|
|
551
|
+
`,o)}a!==-1&&(n=a-(r[a-1]==="\r"?2:1))}if(n===-1){if(!this.atEnd)return this.setNext("quoted-scalar");n=this.buffer.length}return yield*this.pushToIndex(n+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let t=this.pos;for(;;){const n=this.buffer[++t];if(n==="+")this.blockScalarKeep=!0;else if(n>"0"&&n<="9")this.blockScalarIndent=Number(n)-1;else if(n!=="-")break}return yield*this.pushUntil(n=>ii(n)||n==="#")}*parseBlockScalar(){let t=this.pos-1,n=0,r;e:for(let o=this.pos;r=this.buffer[o];++o)switch(r){case" ":n+=1;break;case`
|
|
552
|
+
`:t=o,n=0;break;case"\r":{const l=this.buffer[o+1];if(!l&&!this.atEnd)return this.setNext("block-scalar");if(l===`
|
|
553
|
+
`)break}default:break e}if(!r&&!this.atEnd)return this.setNext("block-scalar");if(n>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=n:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{const o=this.continueScalar(t+1);if(o===-1)break;t=this.buffer.indexOf(`
|
|
554
|
+
`,o)}while(t!==-1);if(t===-1){if(!this.atEnd)return this.setNext("block-scalar");t=this.buffer.length}}let a=t+1;for(r=this.buffer[a];r===" ";)r=this.buffer[++a];if(r===" "){for(;r===" "||r===" "||r==="\r"||r===`
|
|
555
|
+
`;)r=this.buffer[++a];t=a-1}else if(!this.blockScalarKeep)do{let o=t-1,l=this.buffer[o];l==="\r"&&(l=this.buffer[--o]);const u=o;for(;l===" ";)l=this.buffer[--o];if(l===`
|
|
556
|
+
`&&o>=this.pos&&o+1+n>u)t=o;else break}while(!0);return yield ku,yield*this.pushToIndex(t+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const t=this.flowLevel>0;let n=this.pos-1,r=this.pos-1,a;for(;a=this.buffer[++r];)if(a===":"){const o=this.buffer[r+1];if(ii(o)||t&&kf.has(o))break;n=r}else if(ii(a)){let o=this.buffer[r+1];if(a==="\r"&&(o===`
|
|
557
|
+
`?(r+=1,a=`
|
|
558
|
+
`,o=this.buffer[r+1]):n=r),o==="#"||t&&kf.has(o))break;if(a===`
|
|
559
|
+
`){const l=this.continueScalar(r+1);if(l===-1)break;r=Math.max(r,l-2)}}else{if(t&&kf.has(a))break;n=r}return!a&&!this.atEnd?this.setNext("plain-scalar"):(yield ku,yield*this.pushToIndex(n+1,!0),t?"flow":"doc")}*pushCount(t){return t>0?(yield this.buffer.substr(this.pos,t),this.pos+=t,t):0}*pushToIndex(t,n){const r=this.buffer.slice(this.pos,t);return r?(yield r,this.pos+=r.length,r.length):(n&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(jg))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const t=this.flowLevel>0,n=this.charAt(1);if(ii(n)||t&&kf.has(n))return t?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)==="<"){let t=this.pos+2,n=this.buffer[t];for(;!ii(n)&&n!==">";)n=this.buffer[++t];return yield*this.pushToIndex(n===">"?t+1:t,!1)}else{let t=this.pos+1,n=this.buffer[t];for(;n;)if(PI.has(n))n=this.buffer[++t];else if(n==="%"&&ok.has(this.buffer[t+1])&&ok.has(this.buffer[t+2]))n=this.buffer[t+=3];else break;return yield*this.pushToIndex(t,!1)}}*pushNewline(){const t=this.buffer[this.pos];return t===`
|
|
560
|
+
`?yield*this.pushCount(1):t==="\r"&&this.charAt(1)===`
|
|
561
|
+
`?yield*this.pushCount(2):0}*pushSpaces(t){let n=this.pos-1,r;do r=this.buffer[++n];while(r===" "||t&&r===" ");const a=n-this.pos;return a>0&&(yield this.buffer.substr(this.pos,a),this.pos=n),a}*pushUntil(t){let n=this.pos,r=this.buffer[n];for(;!t(r);)r=this.buffer[++n];return yield*this.pushToIndex(n,!1)}}class P_{constructor(){this.lineStarts=[],this.addNewLine=t=>this.lineStarts.push(t),this.linePos=t=>{let n=0,r=this.lineStarts.length;for(;n<r;){const o=n+r>>1;this.lineStarts[o]<t?n=o+1:r=o}if(this.lineStarts[n]===t)return{line:n+1,col:1};if(n===0)return{line:0,col:t};const a=this.lineStarts[n-1];return{line:n,col:t-a+1}}}}function rs(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function lk(e){for(let t=0;t<e.length;++t)switch(e[t].type){case"space":case"comment":case"newline":break;default:return t}return-1}function B_(e){switch(e==null?void 0:e.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function Ef(e){switch(e.type){case"document":return e.start;case"block-map":{const t=e.items[e.items.length-1];return t.sep??t.start}case"block-seq":return e.items[e.items.length-1].start;default:return[]}}function tl(e){var n;if(e.length===0)return[];let t=e.length;e:for(;--t>=0;)switch(e[t].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;((n=e[++t])==null?void 0:n.type)==="space";);return e.splice(t,e.length)}function ck(e){if(e.start.type==="flow-seq-start")for(const t of e.items)t.sep&&!t.value&&!rs(t.start,"explicit-key-ind")&&!rs(t.sep,"map-value-ind")&&(t.key&&(t.value=t.key),delete t.key,B_(t.value)?t.value.end?Array.prototype.push.apply(t.value.end,t.sep):t.value.end=t.sep:Array.prototype.push.apply(t.start,t.sep),delete t.sep)}class Xb{constructor(t){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new z_,this.onNewLine=t}*parse(t,n=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(const r of this.lexer.lex(t,n))yield*this.next(r);n||(yield*this.end())}*next(t){if(this.source=t,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=t.length;return}const n=I_(t);if(n)if(n==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=n,yield*this.step(),n){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+t.length);break;case"space":this.atNewLine&&t[0]===" "&&(this.indent+=t.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=t.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=t.length}else{const r=`Not a YAML token: ${t}`;yield*this.pop({type:"error",offset:this.offset,message:r,source:t}),this.offset+=t.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){const t=this.peek(1);if(this.type==="doc-end"&&(t==null?void 0:t.type)!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!t)return yield*this.stream();switch(t.type){case"document":return yield*this.document(t);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(t);case"block-scalar":return yield*this.blockScalar(t);case"block-map":return yield*this.blockMap(t);case"block-seq":return yield*this.blockSequence(t);case"flow-collection":return yield*this.flowCollection(t);case"doc-end":return yield*this.documentEnd(t)}yield*this.pop()}peek(t){return this.stack[this.stack.length-t]}*pop(t){const n=t??this.stack.pop();if(!n)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield n;else{const r=this.peek(1);switch(n.type==="block-scalar"?n.indent="indent"in r?r.indent:0:n.type==="flow-collection"&&r.type==="document"&&(n.indent=0),n.type==="flow-collection"&&ck(n),r.type){case"document":r.value=n;break;case"block-scalar":r.props.push(n);break;case"block-map":{const a=r.items[r.items.length-1];if(a.value){r.items.push({start:[],key:n,sep:[]}),this.onKeyLine=!0;return}else if(a.sep)a.value=n;else{Object.assign(a,{key:n,sep:[]}),this.onKeyLine=!a.explicitKey;return}break}case"block-seq":{const a=r.items[r.items.length-1];a.value?r.items.push({start:[],value:n}):a.value=n;break}case"flow-collection":{const a=r.items[r.items.length-1];!a||a.value?r.items.push({start:[],key:n,sep:[]}):a.sep?a.value=n:Object.assign(a,{key:n,sep:[]});return}default:yield*this.pop(),yield*this.pop(n)}if((r.type==="document"||r.type==="block-map"||r.type==="block-seq")&&(n.type==="block-map"||n.type==="block-seq")){const a=n.items[n.items.length-1];a&&!a.sep&&!a.value&&a.start.length>0&&lk(a.start)===-1&&(n.indent===0||a.start.every(o=>o.type!=="comment"||o.indent<n.indent))&&(r.type==="document"?r.end=a.start:r.items.push({start:a.start}),n.items.splice(-1,1))}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{const t={type:"document",offset:this.offset,start:[]};this.type==="doc-start"&&t.start.push(this.sourceToken),this.stack.push(t);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(t){if(t.value)return yield*this.lineEnd(t);switch(this.type){case"doc-start":{lk(t.start)!==-1?(yield*this.pop(),yield*this.step()):t.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":t.start.push(this.sourceToken);return}const n=this.startBlockValue(t);n?this.stack.push(n):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(t){if(this.type==="map-value-ind"){const n=Ef(this.peek(2)),r=tl(n);let a;t.end?(a=t.end,a.push(this.sourceToken),delete t.end):a=[this.sourceToken];const o={type:"block-map",offset:t.offset,indent:t.indent,items:[{start:r,key:t,sep:a}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=o}else yield*this.lineEnd(t)}*blockScalar(t){switch(this.type){case"space":case"comment":case"newline":t.props.push(this.sourceToken);return;case"scalar":if(t.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let n=this.source.indexOf(`
|
|
562
|
+
`)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
|
|
563
|
+
`,n)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(t){var r;const n=t.items[t.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,n.value){const a="end"in n.value?n.value.end:void 0,o=Array.isArray(a)?a[a.length-1]:void 0;(o==null?void 0:o.type)==="comment"?a==null||a.push(this.sourceToken):t.items.push({start:[this.sourceToken]})}else n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)t.items.push({start:[this.sourceToken]});else if(n.sep)n.sep.push(this.sourceToken);else{if(this.atIndentedComment(n.start,t.indent)){const a=t.items[t.items.length-2],o=(r=a==null?void 0:a.value)==null?void 0:r.end;if(Array.isArray(o)){Array.prototype.push.apply(o,n.start),o.push(this.sourceToken),t.items.pop();return}}n.start.push(this.sourceToken)}return}if(this.indent>=t.indent){const a=!this.onKeyLine&&this.indent===t.indent,o=a&&(n.sep||n.explicitKey)&&this.type!=="seq-item-ind";let l=[];if(o&&n.sep&&!n.value){const u=[];for(let f=0;f<n.sep.length;++f){const h=n.sep[f];switch(h.type){case"newline":u.push(f);break;case"space":break;case"comment":h.indent>t.indent&&(u.length=0);break;default:u.length=0}}u.length>=2&&(l=n.sep.splice(u[1]))}switch(this.type){case"anchor":case"tag":o||n.value?(l.push(this.sourceToken),t.items.push({start:l}),this.onKeyLine=!0):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"explicit-key-ind":!n.sep&&!n.explicitKey?(n.start.push(this.sourceToken),n.explicitKey=!0):o||n.value?(l.push(this.sourceToken),t.items.push({start:l,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(n.explicitKey)if(n.sep)if(n.value)t.items.push({start:[],key:null,sep:[this.sourceToken]});else if(rs(n.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:l,key:null,sep:[this.sourceToken]}]});else if(B_(n.key)&&!rs(n.sep,"newline")){const u=tl(n.start),f=n.key,h=n.sep;h.push(this.sourceToken),delete n.key,delete n.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:u,key:f,sep:h}]})}else l.length>0?n.sep=n.sep.concat(l,this.sourceToken):n.sep.push(this.sourceToken);else if(rs(n.start,"newline"))Object.assign(n,{key:null,sep:[this.sourceToken]});else{const u=tl(n.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:u,key:null,sep:[this.sourceToken]}]})}else n.sep?n.value||o?t.items.push({start:l,key:null,sep:[this.sourceToken]}):rs(n.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const u=this.flowScalar(this.type);o||n.value?(t.items.push({start:l,key:u,sep:[]}),this.onKeyLine=!0):n.sep?this.stack.push(u):(Object.assign(n,{key:u,sep:[]}),this.onKeyLine=!0);return}default:{const u=this.startBlockValue(t);if(u){if(u.type==="block-seq"){if(!n.explicitKey&&n.sep&&!rs(n.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else a&&t.items.push({start:l});this.stack.push(u);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(t){var r;const n=t.items[t.items.length-1];switch(this.type){case"newline":if(n.value){const a="end"in n.value?n.value.end:void 0,o=Array.isArray(a)?a[a.length-1]:void 0;(o==null?void 0:o.type)==="comment"?a==null||a.push(this.sourceToken):t.items.push({start:[this.sourceToken]})}else n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)t.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(n.start,t.indent)){const a=t.items[t.items.length-2],o=(r=a==null?void 0:a.value)==null?void 0:r.end;if(Array.isArray(o)){Array.prototype.push.apply(o,n.start),o.push(this.sourceToken),t.items.pop();return}}n.start.push(this.sourceToken)}return;case"anchor":case"tag":if(n.value||this.indent<=t.indent)break;n.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==t.indent)break;n.value||rs(n.start,"seq-item-ind")?t.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return}if(this.indent>t.indent){const a=this.startBlockValue(t);if(a){this.stack.push(a);return}}yield*this.pop(),yield*this.step()}*flowCollection(t){const n=t.items[t.items.length-1];if(this.type==="flow-error-end"){let r;do yield*this.pop(),r=this.peek(1);while((r==null?void 0:r.type)==="flow-collection")}else if(t.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!n||n.sep?t.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return;case"map-value-ind":!n||n.value?t.items.push({start:[],key:null,sep:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!n||n.value?t.items.push({start:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const a=this.flowScalar(this.type);!n||n.value?t.items.push({start:[],key:a,sep:[]}):n.sep?this.stack.push(a):Object.assign(n,{key:a,sep:[]});return}case"flow-map-end":case"flow-seq-end":t.end.push(this.sourceToken);return}const r=this.startBlockValue(t);r?this.stack.push(r):(yield*this.pop(),yield*this.step())}else{const r=this.peek(2);if(r.type==="block-map"&&(this.type==="map-value-ind"&&r.indent===t.indent||this.type==="newline"&&!r.items[r.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&r.type!=="flow-collection"){const a=Ef(r),o=tl(a);ck(t);const l=t.end.splice(1,t.end.length);l.push(this.sourceToken);const u={type:"block-map",offset:t.offset,indent:t.indent,items:[{start:o,key:t,sep:l}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=u}else yield*this.lineEnd(t)}}flowScalar(t){if(this.onNewLine){let n=this.source.indexOf(`
|
|
564
|
+
`)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
|
|
565
|
+
`,n)+1}return{type:t,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(t){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const n=Ef(t),r=tl(n);return r.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const n=Ef(t),r=tl(n);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(t,n){return this.type!=="comment"||this.indent<=n?!1:t.every(r=>r.type==="newline"||r.type==="space")}*documentEnd(t){this.type!=="doc-mode"&&(t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(t){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}}function U_(e){const t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new P_||null,prettyErrors:t}}function UI(e,t={}){const{lineCounter:n,prettyErrors:r}=U_(t),a=new Xb(n==null?void 0:n.addNewLine),o=new Wb(t),l=Array.from(o.compose(a.parse(e)));if(r&&n)for(const u of l)u.errors.forEach(uh(e,n)),u.warnings.forEach(uh(e,n));return l.length>0?l:Object.assign([],{empty:!0},o.streamInfo())}function $_(e,t={}){const{lineCounter:n,prettyErrors:r}=U_(t),a=new Xb(n==null?void 0:n.addNewLine),o=new Wb(t);let l=null;for(const u of o.compose(a.parse(e),!0,e.length))if(!l)l=u;else if(l.options.logLevel!=="silent"){l.errors.push(new Vs(u.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return r&&n&&(l.errors.forEach(uh(e,n)),l.warnings.forEach(uh(e,n))),l}function $I(e,t,n){let r;typeof t=="function"?r=t:n===void 0&&t&&typeof t=="object"&&(n=t);const a=$_(e,n);if(!a)return null;if(a.warnings.forEach(o=>a_(a.options.logLevel,o)),a.errors.length>0){if(a.options.logLevel!=="silent")throw a.errors[0];a.errors=[]}return a.toJS(Object.assign({reviver:r},n))}function FI(e,t,n){let r=null;if(typeof t=="function"||Array.isArray(t)?r=t:n===void 0&&t&&(n=t),typeof n=="string"&&(n=n.length),typeof n=="number"){const a=Math.round(n);n=a<1?void 0:a>8?{indent:8}:{indent:a}}if(e===void 0){const{keepUndefined:a}=n??t??{};if(!a)return}return mo(e)&&!r?e.toString(n):new ec(e,r,n).toString(n)}const uk=Object.freeze(Object.defineProperty({__proto__:null,Alias:Lh,CST:zI,Composer:Wb,Document:ec,Lexer:z_,LineCounter:P_,Pair:qn,Parser:Xb,Scalar:Ye,Schema:S_,YAMLError:Yb,YAMLMap:Er,YAMLParseError:Vs,YAMLSeq:ys,YAMLWarning:__,isAlias:vs,isCollection:Zt,isDocument:mo,isMap:Wl,isNode:Jt,isPair:Kt,isScalar:It,isSeq:Xl,parse:$I,parseAllDocuments:UI,parseDocument:$_,stringify:FI,visit:go,visitAsync:Rh},Symbol.toStringTag,{value:"Module"}));function qI({projectName:e,file:t,onClose:n,onSaved:r}){const a=Le(),o=an(),{alert:l}=jn(),{data:u,isLoading:f,isError:h,error:g,refetch:m}=Ge({queryKey:["pipeline-file",e,t],queryFn:()=>f3(e,t)}),[y,b]=A.useState("structured"),[k,v]=A.useState(null),[S,E]=A.useState(null);A.useEffect(()=>{u&&k===null&&(v(u.content),E(u.etag),u.parseError&&b("yaml"))},[u,k]),A.useEffect(()=>{const M=I=>{I.key==="Escape"&&n()};return window.addEventListener("keydown",M),()=>window.removeEventListener("keydown",M)},[n]);const C=Rt({mutationFn:()=>{if(k===null||S===null)throw new Error("no draft");return h3(e,t,k,S)},onSuccess:M=>{E(M.etag),o.invalidateQueries({queryKey:["pipeline-file",e,t]}),o.invalidateQueries({queryKey:["project-pipelines",e]}),r()},onError:M=>{const I=M.status;l({title:a(I===409?"pipelineEditor.error.conflict.title":I===422?"pipelineEditor.error.yaml.title":"pipelineEditor.error.save.title"),body:M instanceof Error?M.message:String(M)})}}),N=k!==null&&u&&k!==u.content,{parsed:_,parseError:D}=A.useMemo(()=>{if(k===null)return{parsed:null,parseError:null};try{return{parsed:uk.parse(k)??{},parseError:null}}catch(M){return{parsed:null,parseError:M instanceof Error?M.message:String(M)}}},[k]),T=M=>{try{const I=uk.stringify(M,{lineWidth:0});v(I)}catch(I){l({title:a("pipelineEditor.error.serialize.title"),body:I instanceof Error?I.message:String(I)})}};return d.jsx("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 z-40 flex items-start justify-center p-6 bg-black/30 overflow-auto",children:d.jsxs("div",{className:"nb-card mt-8 w-full max-w-4xl flex flex-col",style:{maxHeight:"calc(100vh - 64px)"},children:[d.jsxs("header",{className:"flex items-start justify-between gap-3 mb-3 flex-shrink-0",children:[d.jsxs("div",{children:[d.jsxs("h2",{className:"font-[family-name:var(--font-heading)] text-2xl font-bold flex items-center gap-2",children:[d.jsx(X1,{size:20,strokeWidth:2.5}),d.jsx("code",{className:"font-[family-name:var(--font-mono)] text-lg",children:t}),(u==null?void 0:u.isActive)&&d.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)",padding:"2px 8px"},children:a("pipelineEditor.activeBadge")})]}),d.jsxs("p",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] mt-1",children:[e,"/pipelines/",t,S&&` · etag ${S}`]})]}),d.jsx("button",{className:"nb-btn nb-btn-mint p-2",onClick:n,type:"button","aria-label":a("pipelineEditor.close"),children:d.jsx(dr,{size:14,strokeWidth:3})})]}),f&&d.jsx("p",{className:"text-[var(--color-text-muted)]",children:a("common.loading")}),h&&d.jsx("p",{className:"text-[var(--color-crashed)]",children:a("pipelineEditor.error.load",{detail:g instanceof Error?g.message:String(g)})}),u&&k!==null&&d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"flex items-center gap-3 mb-3 flex-shrink-0 flex-wrap",children:[d.jsxs("div",{className:"flex gap-1 p-1 bg-[var(--color-bg)] border-[2px] border-[var(--color-text)] rounded-full shadow-[2px_2px_0_var(--color-text)]",children:[d.jsxs("button",{type:"button",onClick:()=>b("structured"),"aria-pressed":y==="structured",disabled:!!D,className:["px-3 py-1 rounded-full text-xs font-bold flex items-center gap-1.5",y==="structured"?"bg-[var(--color-primary)] text-[var(--color-text)] shadow-[1px_1px_0_var(--color-text)]":"text-[var(--color-text-muted)]",D?"opacity-50 cursor-not-allowed":""].join(" "),title:D??void 0,children:[d.jsx(qu,{size:11,strokeWidth:2.5}),a("pipelineEditor.mode.structured")]}),d.jsxs("button",{type:"button",onClick:()=>b("yaml"),"aria-pressed":y==="yaml",className:["px-3 py-1 rounded-full text-xs font-bold flex items-center gap-1.5",y==="yaml"?"bg-[var(--color-primary)] text-[var(--color-text)] shadow-[1px_1px_0_var(--color-text)]":"text-[var(--color-text-muted)]"].join(" "),children:[d.jsx(X1,{size:11,strokeWidth:2.5}),a("pipelineEditor.mode.yaml")]})]}),D&&d.jsxs("div",{className:"flex items-center gap-1 text-xs text-[var(--color-crashed)] font-bold",children:[d.jsx(yu,{size:12,strokeWidth:2.5}),a("pipelineEditor.parseError.prefix",{detail:D})]}),(u==null?void 0:u.isActive)&&d.jsx("span",{className:"text-xs text-[var(--color-stuck)] font-bold ml-auto",children:a("pipelineEditor.activeWarning")})]}),d.jsxs("div",{className:"flex-1 overflow-auto",children:[y==="structured"&&_&&d.jsx(HI,{parsed:_,onChange:T}),y==="yaml"&&d.jsx("textarea",{className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",style:{minHeight:400,resize:"vertical"},value:k,onChange:M=>v(M.target.value),spellCheck:!1,"aria-label":a("pipelineEditor.yamlAria")})]}),d.jsxs("div",{className:"flex items-center justify-between mt-3 pt-3 border-t-2 border-dashed border-[var(--color-text)] flex-shrink-0",children:[d.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:N?d.jsx("span",{className:"text-[var(--color-stuck)] font-bold",children:a("pipelineEditor.status.unsaved")}):C.isSuccess?d.jsxs("span",{className:"text-[var(--color-running)] font-bold flex items-center gap-1",children:[d.jsx(bu,{size:12,strokeWidth:2.5})," ",a("pipelineEditor.status.saved")]}):a("pipelineEditor.status.noChanges")}),d.jsxs("div",{className:"flex gap-2",children:[d.jsx("button",{className:"nb-btn",style:{padding:"6px 14px"},onClick:()=>{v(null),m()},disabled:C.isPending,type:"button",children:a("pipelineEditor.reload")}),d.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"6px 14px"},onClick:()=>C.mutate(),disabled:!N||C.isPending,type:"button","aria-label":a("pipelineEditor.saveAria"),children:[C.isPending?d.jsx(nt,{size:13,strokeWidth:3,className:"animate-spin"}):d.jsx(ma,{size:13,strokeWidth:3}),a("pipelineEditor.save")]})]})]})]})]})})}function HI({parsed:e,onChange:t}){const n=Le(),r=e.stages??[],a=h=>{t({...e,stages:h})},o=()=>{a([...r,{name:`stage-${r.length+1}`,on_complete:"move_card Done"}])},l=h=>{a(r.filter((g,m)=>m!==h))},u=(h,g)=>{const m=[...r],y=h+g;y<0||y>=m.length||([m[h],m[y]]=[m[y],m[h]],a(m))},f=(h,g)=>{a(r.map((m,y)=>y===h?{...m,...g}:m))};return d.jsxs("div",{className:"flex flex-col gap-4",children:[d.jsxs("div",{className:"flex items-center gap-3 p-3 bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg",children:[d.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[d.jsx("span",{className:"font-bold",children:"mode:"}),d.jsxs("select",{className:"nb-input",style:{padding:"4px 10px",fontSize:12},value:e.mode??"project",onChange:h=>t({...e,mode:h.target.value}),children:[d.jsx("option",{value:"project",children:"project"}),d.jsx("option",{value:"steps",children:"steps"})]})]}),d.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:n("pipelineEditor.modeHint")})]}),d.jsxs("div",{children:[d.jsxs("div",{className:"flex items-center justify-between mb-2",children:[d.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold uppercase tracking-wider",children:n("pipelineEditor.stages.heading",{count:r.length})}),d.jsxs("button",{type:"button",className:"nb-btn nb-btn-mint",style:{padding:"4px 12px",fontSize:12},onClick:o,"aria-label":n("pipelineEditor.stages.add"),children:[d.jsx(jr,{size:11,strokeWidth:3})," ",n("pipelineEditor.stages.add")]})]}),r.length===0?d.jsx("p",{className:"text-sm text-[var(--color-text-muted)] italic p-4 border-2 border-dashed border-[var(--color-text)] rounded-lg text-center",children:n("pipelineEditor.stages.empty")}):d.jsx("div",{className:"flex flex-col gap-3",children:r.map((h,g)=>d.jsx(KI,{stage:h,index:g,total:r.length,onChange:m=>f(g,m),onRemove:()=>l(g),onMoveUp:()=>u(g,-1),onMoveDown:()=>u(g,1)},g))})]})]})}function KI({stage:e,index:t,total:n,onChange:r,onRemove:a,onMoveUp:o,onMoveDown:l}){const u=Le(),f=e.on_fail??{};return d.jsxs("div",{className:"nb-card bg-[var(--color-bg-cream)] p-4",children:[d.jsxs("div",{className:"flex items-center justify-between mb-3",children:[d.jsxs("h4",{className:"font-[family-name:var(--font-heading)] font-bold text-sm",children:["Stage #",t+1,e.name&&d.jsx("code",{className:"ml-2 text-xs font-[family-name:var(--font-mono)] bg-[var(--color-bg)] border-2 border-[var(--color-text)] px-2 py-0.5 rounded",children:e.name})]}),d.jsxs("div",{className:"flex gap-1",children:[d.jsx("button",{type:"button",className:"nb-btn",style:{padding:"3px 8px"},onClick:o,disabled:t===0,"aria-label":u("pipelineEditor.stage.moveUp"),children:d.jsx(hR,{size:12,strokeWidth:3})}),d.jsx("button",{type:"button",className:"nb-btn",style:{padding:"3px 8px"},onClick:l,disabled:t===n-1,"aria-label":u("pipelineEditor.stage.moveDown"),children:d.jsx(Vl,{size:12,strokeWidth:3})}),d.jsx("button",{type:"button",className:"nb-btn nb-btn-danger",style:{padding:"3px 8px"},onClick:a,"aria-label":u("pipelineEditor.stage.remove"),children:d.jsx(xs,{size:12,strokeWidth:3})})]})]}),d.jsxs("div",{className:"grid grid-cols-2 gap-3 text-sm",children:[d.jsx(Za,{label:"name",hint:u("pipelineEditor.stage.name.hint"),children:d.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:e.name??"",onChange:h=>r({name:h.target.value}),placeholder:"develop"})}),d.jsx(Za,{label:"profile",hint:u("pipelineEditor.stage.profile.hint"),children:d.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:e.profile??"",onChange:h=>r({profile:h.target.value||void 0}),placeholder:"fullstack"})}),d.jsx(Za,{label:"card_state",hint:u("pipelineEditor.stage.cardState.hint"),children:d.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:e.card_state??"",onChange:h=>r({card_state:h.target.value||void 0}),placeholder:"Inprogress"})}),d.jsx(Za,{label:"timeout",hint:u("pipelineEditor.stage.timeout.hint"),children:d.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:e.timeout??"",onChange:h=>r({timeout:h.target.value||void 0}),placeholder:"2h"})}),d.jsx(Za,{label:"trigger",hint:u("pipelineEditor.stage.trigger.hint"),children:d.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:e.trigger??"",onChange:h=>r({trigger:h.target.value||void 0}),placeholder:"card_enters 'Todo'"})}),d.jsx(Za,{label:"on_complete",hint:u("pipelineEditor.stage.onComplete.hint"),children:d.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:e.on_complete??"",onChange:h=>r({on_complete:h.target.value}),placeholder:"move_card Done"})})]}),d.jsxs("div",{className:"mt-4 pt-3 border-t-2 border-dashed border-[var(--color-text)]",children:[d.jsx("h5",{className:"text-xs font-bold uppercase tracking-wider mb-2 text-[var(--color-text-muted)]",children:"on_fail"}),d.jsxs("div",{className:"grid grid-cols-2 gap-3 text-sm",children:[d.jsx(Za,{label:"action",hint:u("pipelineEditor.stage.onFail.action.hint"),children:d.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:f.action??"",onChange:h=>r({on_fail:{...f,action:h.target.value||void 0}}),placeholder:"label NEEDS-FIX"})}),d.jsx(Za,{label:"comment",hint:u("pipelineEditor.stage.onFail.comment.hint"),children:d.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:f.comment??"",onChange:h=>r({on_fail:{...f,comment:h.target.value||void 0}}),placeholder:"Worker failed. Check logs."})})]}),d.jsxs("label",{className:"flex items-center gap-2 mt-3 text-sm cursor-pointer",children:[d.jsx("input",{type:"checkbox",checked:f.halt??!0,onChange:h=>r({on_fail:{...f,halt:h.target.checked}})}),d.jsx("span",{className:"font-bold",children:"halt"}),d.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:u("pipelineEditor.stage.halt.note")})]})]})]})}function Za({label:e,hint:t,children:n}){return d.jsxs("label",{className:"flex flex-col gap-1",children:[d.jsx("span",{className:"text-xs font-bold font-[family-name:var(--font-mono)]",children:e}),n,t&&d.jsx("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:t})]})}function GI({onCancel:e,onCreate:t,hasActive:n,hasSample:r,isPending:a}){const o=Le(),[l,u]=A.useState(""),[f,h]=A.useState("blank");A.useEffect(()=>{const S=E=>{E.key==="Escape"&&e()};return window.addEventListener("keydown",S),()=>window.removeEventListener("keydown",S)},[e]);const g=l.trim(),m=g.endsWith(".yaml")?g:g?`${g}.yaml`:"",y=m&&/^[a-zA-Z0-9_.-]+\.yaml$/.test(m),b=()=>{!y||a||t(m,f)},v=o("newPipelineDialog.field.filename.help",{filename:"__FN__"}).split("__FN__");return d.jsx("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 z-50 flex items-center justify-center p-6 bg-black/30",children:d.jsxs("div",{className:"nb-card max-w-md w-full",children:[d.jsxs("header",{className:"flex items-start justify-between mb-4",children:[d.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold",children:o("newPipelineDialog.title")}),d.jsx("button",{className:"nb-btn nb-btn-mint p-2",onClick:e,type:"button","aria-label":o("common.close"),children:d.jsx(dr,{size:14,strokeWidth:3})})]}),d.jsxs("form",{onSubmit:S=>{S.preventDefault(),b()},className:"flex flex-col gap-4",children:[d.jsxs("label",{className:"flex flex-col gap-1.5",children:[d.jsx("span",{className:"text-sm font-bold",children:o("newPipelineDialog.field.filename.label")}),d.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",placeholder:o("newPipelineDialog.field.filename.placeholder"),value:l,onChange:S=>u(S.target.value),autoFocus:!0}),d.jsxs("span",{className:"text-xs text-[var(--color-text-muted)]",children:[v[0],d.jsx("code",{className:"font-[family-name:var(--font-mono)]",children:m||"xxx.yaml"}),v[1]]})]}),d.jsxs("fieldset",{className:"flex flex-col gap-2",children:[d.jsx("legend",{className:"text-sm font-bold mb-1",children:o("newPipelineDialog.section.template")}),d.jsx(Ag,{value:"blank",current:f,label:o("newPipelineDialog.template.blank.label"),desc:o("newPipelineDialog.template.blank.desc"),onSelect:h}),d.jsx(Ag,{value:"sample",current:f,label:o("newPipelineDialog.template.sample.label"),desc:o("newPipelineDialog.template.sample.desc"),onSelect:h,disabled:!r,disabledReason:o("newPipelineDialog.template.sample.unavailable")}),d.jsx(Ag,{value:"active",current:f,label:o("newPipelineDialog.template.active.label"),desc:o("newPipelineDialog.template.active.desc"),onSelect:h,disabled:!n,disabledReason:o("newPipelineDialog.template.active.unavailable")})]}),d.jsxs("div",{className:"flex gap-3 justify-end pt-2",children:[d.jsx("button",{className:"nb-btn",onClick:e,type:"button",disabled:a,children:o("common.cancel")}),d.jsxs("button",{className:"nb-btn nb-btn-primary",type:"submit",disabled:!y||a,"aria-label":o("newPipelineDialog.create.aria"),children:[a?d.jsx(nt,{size:13,strokeWidth:3,className:"animate-spin"}):d.jsx(jr,{size:13,strokeWidth:3}),o("common.create")]})]})]})]})})}function Ag({value:e,current:t,label:n,desc:r,onSelect:a,disabled:o,disabledReason:l}){const u=t===e;return d.jsxs("label",{className:["flex items-start gap-2 p-2 rounded-lg border-2 cursor-pointer",o?"border-[var(--color-border-light)] opacity-50 cursor-not-allowed":u?"bg-[var(--color-accent-mint)] border-[var(--color-text)] shadow-[2px_2px_0_var(--color-text)]":"border-[var(--color-border-light)] hover:bg-[var(--color-bg-cream)] hover:border-[var(--color-text)]"].join(" "),children:[d.jsx("input",{type:"radio",name:"pipeline-template",value:e,checked:u,disabled:o,onChange:()=>a(e),className:"mt-1 flex-shrink-0"}),d.jsxs("div",{className:"flex-1",children:[d.jsx("div",{className:"text-sm font-bold",children:n}),d.jsx("div",{className:"text-xs text-[var(--color-text-muted)]",children:o?l:r})]})]})}function VI(e){return ht(`/api/rules/${encodeURIComponent(e)}`)}function Zb(e){const t=e?`?project=${encodeURIComponent(e)}`:"";return ht(`/api/skills${t}`)}function YI(e){return ht(`/api/skills/${encodeURIComponent(e)}`)}function QI(e,t){return ht(`/api/skills/${encodeURIComponent(e)}/references/${encodeURIComponent(t)}`)}async function WI(e,t){const n=await fetch(e,{method:"POST",headers:void 0,body:void 0});if(!n.ok)throw new Error(`${n.status}: ${await n.text()}`);return n.json().catch(()=>({}))}function XI(){return WI("/api/skills/sync")}function ZI(e){return ht(`/api/skills/policy/${encodeURIComponent(e)}`)}function JI(e,t){return UN(`/api/skills/policy/${encodeURIComponent(e)}`,t)}function ez(){return ht("/api/skills/updates")}function tz(e,t,n){return Rb("/api/skills/import",{name:e,files:t,overwrite:n})}function nz(e){return ht(`/api/skills/${encodeURIComponent(e)}/export`)}function F_(){return d.jsx("div",{className:"nb-card",children:d.jsxs("p",{className:"text-[var(--color-text-muted)] flex items-center gap-2",children:[d.jsx(nt,{size:14,className:"animate-spin"})," …"]})})}function q_({msg:e}){return d.jsx("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:d.jsx("p",{children:e})})}function rz({name:e}){var b,k;const t=Le(),n=an(),{alert:r}=jn(),a=Ge({queryKey:["skill-policy",e],queryFn:()=>ZI(e),enabled:!!e}),o=(b=a.data)==null?void 0:b.data,[l,u]=A.useState(null),[f,h]=A.useState(null);A.useEffect(()=>{var v;o&&l===null&&u((v=o.policy.allow)!=null&&v.length?new Set(o.policy.allow):new Set(o.skills.map(S=>S.name)))},[o,l]);const g=Rt({mutationFn:v=>JI(e,v),onSuccess:v=>{h(v),u(null),n.invalidateQueries({queryKey:["skill-policy",e]})},onError:v=>void r({title:t("projectDetail.skills.saveError"),body:v instanceof Error?v.message:String(v)})});if(a.isLoading||o&&l===null)return d.jsx(F_,{});if(a.isError)return d.jsx(q_,{msg:a.error instanceof Error?a.error.message:String(a.error)});if(!o||!l)return null;if(o.skills.length===0)return d.jsx("div",{className:"nb-card",children:d.jsx("p",{className:"text-[var(--color-text-muted)]",children:t("projectDetail.skills.empty")})});const m=o.eligible!==null,y=v=>u(S=>{const E=new Set(S);return E.has(v)?E.delete(v):E.add(v),E});return d.jsxs("div",{className:"nb-card flex flex-col gap-4",children:[d.jsxs("div",{children:[d.jsxs("h2",{className:"font-[family-name:var(--font-heading)] text-lg font-bold flex items-center gap-2",children:[d.jsx(DN,{size:18,strokeWidth:2.5}),t("projectDetail.skills.title")]}),d.jsx("p",{className:"text-sm text-[var(--color-text-muted)] mt-1",children:t("projectDetail.skills.desc")}),d.jsx("p",{className:"text-sm mt-1 font-medium",children:m?t("projectDetail.skills.hasPolicy",{count:String(((k=o.eligible)==null?void 0:k.length)??0)}):t("projectDetail.skills.noPolicy")})]}),d.jsxs("div",{className:"flex gap-2",children:[d.jsx("button",{type:"button",className:"nb-btn",style:{padding:"4px 10px",fontSize:12},onClick:()=>u(new Set(o.skills.map(v=>v.name))),children:t("projectDetail.skills.selectAll")}),d.jsx("button",{type:"button",className:"nb-btn",style:{padding:"4px 10px",fontSize:12},onClick:()=>u(new Set),children:t("projectDetail.skills.selectNone")})]}),d.jsx("div",{className:"flex flex-col gap-1 max-h-96 overflow-auto border-2 border-[var(--color-text)] rounded p-2",children:o.skills.map(v=>d.jsxs("label",{className:"flex items-start gap-2 px-2 py-1 rounded hover:bg-[var(--color-bg-cream)] cursor-pointer",children:[d.jsx("input",{type:"checkbox",checked:l.has(v.name),onChange:()=>y(v.name),className:"mt-1"}),d.jsxs("span",{className:"flex-1",children:[d.jsx("code",{className:"font-[family-name:var(--font-mono)] text-sm font-bold",children:v.name}),d.jsx("span",{className:"ml-2 text-[10px] uppercase text-[var(--color-text-muted)]",children:v.category}),v.description&&d.jsx("span",{className:"block text-xs text-[var(--color-text-muted)]",children:v.description})]})]},v.name))}),d.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[d.jsxs("button",{type:"button",className:"nb-btn nb-btn-mint",disabled:g.isPending,onClick:()=>g.mutate({allow:[...l]}),children:[g.isPending?d.jsx(nt,{size:14,className:"animate-spin"}):d.jsx(ma,{size:14,strokeWidth:3}),t("projectDetail.skills.save")]}),d.jsxs("button",{type:"button",className:"nb-btn",disabled:g.isPending,onClick:()=>g.mutate({}),children:[d.jsx(Tb,{size:14,strokeWidth:3}),t("projectDetail.skills.clear")]}),d.jsxs("span",{className:"text-sm text-[var(--color-text-muted)]",children:[l.size,"/",o.skills.length]})]}),f&&d.jsxs("div",{className:"text-sm border-2 border-[var(--color-text)] rounded p-2 bg-[var(--color-bg-cream)]",children:[d.jsx("p",{children:t("projectDetail.skills.applied",{linked:String(f.applied.linked),pruned:String(f.applied.pruned)})}),f.unknown.length>0&&d.jsx("p",{className:"text-[var(--color-text-muted)]",children:t("projectDetail.skills.unknown",{names:f.unknown.join(", ")})})]})]})}function iz({name:e}){var a;const t=Le(),n=Ge({queryKey:["rules",e],queryFn:()=>VI(e),enabled:!!e});if(n.isLoading)return d.jsx(F_,{});if(n.isError)return d.jsx(q_,{msg:n.error instanceof Error?n.error.message:String(n.error)});const r=((a=n.data)==null?void 0:a.data)??[];return d.jsxs("div",{className:"flex flex-col gap-4",children:[d.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:t("projectDetail.rules.readonly")}),r.map(o=>d.jsxs("div",{className:"nb-card",children:[d.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[d.jsx("code",{className:"font-[family-name:var(--font-mono)] text-sm font-bold bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] px-2 py-0.5 rounded",children:o.name}),!o.exists&&d.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:t("projectDetail.rules.missing")})]}),o.exists&&d.jsx("pre",{className:"overflow-auto max-h-[28rem] text-xs font-[family-name:var(--font-mono)] whitespace-pre-wrap break-words bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded p-3",children:o.content})]},o.name))]})}function az(){var l;const e=Le(),{name:t=""}=fN(),n=bs(),[r,a]=A.useState("overview"),o=Ge({queryKey:["project",t],queryFn:()=>a3(t),enabled:!!t});return d.jsxs("div",{className:"flex flex-col gap-5 max-w-4xl",children:[d.jsxs("header",{className:"flex items-center gap-3",children:[d.jsxs("button",{type:"button",onClick:()=>n("/projects"),className:"nb-btn",style:{padding:"6px 12px"},"aria-label":e("newProject.back.aria"),children:[d.jsx(kN,{size:14,strokeWidth:3}),e("newProject.back")]}),d.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-3xl font-bold flex-1",children:t}),d.jsx(ha,{to:`/board?project=${encodeURIComponent(t)}`,className:"nb-btn nb-btn-mint",children:e("projectDetail.openBoard")})]}),d.jsxs("nav",{className:"flex gap-2 flex-wrap",children:[d.jsx(nl,{current:r,value:"overview",onSelect:a,icon:jR,children:e("projectDetail.tab.overview")}),d.jsx(nl,{current:r,value:"config",onSelect:a,icon:MN,children:e("projectDetail.tab.config")}),d.jsx(nl,{current:r,value:"pipelines",onSelect:a,icon:Db,children:e("projectDetail.tab.pipelines")}),d.jsx(nl,{current:r,value:"skills",onSelect:a,icon:DN,children:e("projectDetail.tab.skills")}),d.jsx(nl,{current:r,value:"rules",onSelect:a,icon:aR,children:e("projectDetail.tab.rules")}),d.jsx(nl,{current:r,value:"danger",onSelect:a,icon:xs,children:e("projectDetail.tab.danger")})]}),r==="overview"&&d.jsx(sz,{name:t,data:o.data,loading:o.isLoading}),r==="config"&&d.jsx(oz,{name:t}),r==="pipelines"&&d.jsx(lz,{name:t}),r==="skills"&&d.jsx(rz,{name:t}),r==="rules"&&d.jsx(iz,{name:t}),r==="danger"&&d.jsx(cz,{name:t,repoDir:((l=o.data)==null?void 0:l.repoDir)??null})]})}function nl({current:e,value:t,onSelect:n,icon:r,children:a}){const o=e===t;return d.jsxs("button",{type:"button",onClick:()=>n(t),"aria-current":o?"page":void 0,className:["nb-btn",o?"nb-btn-primary":""].join(" "),style:{padding:"6px 14px",fontSize:13},children:[d.jsx(r,{size:13,strokeWidth:2.5}),a]})}function sz({name:e,data:t,loading:n}){const r=Le();return n?d.jsx("div",{className:"nb-card",children:d.jsx("p",{className:"text-[var(--color-text-muted)]",children:r("common.loading")})}):t?d.jsx("div",{className:"nb-card",children:d.jsxs("dl",{className:"grid grid-cols-[160px_1fr] gap-y-3 text-sm",children:[d.jsx("dt",{className:"font-bold",children:r("projectDetail.overview.repoDir")}),d.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.repoDir??"—"}),d.jsx("dt",{className:"font-bold",children:r("projectDetail.overview.pmBackend")}),d.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.pmBackend}),d.jsx("dt",{className:"font-bold",children:r("projectDetail.overview.agent")}),d.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.agentProvider}),d.jsx("dt",{className:"font-bold",children:r("projectDetail.overview.cards")}),d.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:r("projectDetail.overview.cards.value",{total:t.cards.total,inprogress:t.cards.inprogress,done:t.cards.done})}),d.jsx("dt",{className:"font-bold",children:r("projectDetail.overview.workers")}),d.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:r("projectDetail.overview.workers.value",{total:t.workers.total,active:t.workers.active})}),d.jsx("dt",{className:"font-bold",children:r("projectDetail.overview.pipeline")}),d.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.pipelineStatus}),d.jsx("dt",{className:"font-bold",children:r("projectDetail.overview.lastActivity")}),d.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.lastActivityAt?new Date(t.lastActivityAt).toLocaleString():"—"})]})}):d.jsx("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:d.jsx("p",{children:r("projectDetail.overview.notFound",{name:e})})})}function oz({name:e}){const t=Le(),n=an(),{alert:r}=jn(),{data:a,isLoading:o,isError:l,error:u,refetch:f}=Ge({queryKey:["project-conf",e],queryFn:()=>o3(e)}),[h,g]=A.useState(null),[m,y]=A.useState(null);A.useEffect(()=>{a&&h===null&&(g(a.content),y(a.etag))},[a,h]);const b=h!==null&&a!==void 0&&h!==a.content,k=Rt({mutationFn:()=>{if(h===null||m===null)throw new Error("no draft");return l3(e,h,m)},onSuccess:v=>{y(v.etag),n.invalidateQueries({queryKey:["project-conf",e]}),n.invalidateQueries({queryKey:["project",e]})},onError:v=>{const S=v.status;r({title:t(S===409?"projectDetail.config.error.conflict.title":"projectDetail.config.error.save.title"),body:S===409?t("projectDetail.config.error.conflict.body"):v instanceof Error?v.message:String(v)})}});return o?d.jsx("div",{className:"nb-card",children:d.jsx("p",{className:"text-[var(--color-text-muted)]",children:t("common.loading")})}):l?d.jsx("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:d.jsx("p",{children:t("projectDetail.config.error.load",{detail:u instanceof Error?u.message:String(u)})})}):d.jsxs("div",{className:"nb-card",children:[d.jsxs("div",{className:"flex items-center justify-between mb-3",children:[d.jsxs("div",{children:[d.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-lg font-bold",children:d.jsxs("code",{className:"font-[family-name:var(--font-mono)] text-sm bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] px-2 py-0.5 rounded",children:["~/.coral/projects/",e,"/conf"]})}),m&&d.jsxs("p",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] mt-1",children:["etag: ",m]})]}),d.jsxs("div",{className:"flex gap-2",children:[d.jsxs("button",{type:"button",className:"nb-btn",style:{padding:"6px 12px"},onClick:()=>{g(null),f()},disabled:k.isPending,"aria-label":t("projectDetail.config.reload"),children:[d.jsx(gs,{size:13,strokeWidth:2.5}),t("projectDetail.config.reload")]}),d.jsxs("button",{type:"button",className:"nb-btn nb-btn-primary",style:{padding:"6px 12px"},onClick:()=>k.mutate(),disabled:!b||k.isPending,"aria-label":t("projectDetail.config.saveAria"),children:[k.isPending?d.jsx(nt,{size:13,strokeWidth:3,className:"animate-spin"}):k.isSuccess&&!b?d.jsx(cR,{size:13,strokeWidth:3}):d.jsx(ma,{size:13,strokeWidth:3}),t("projectDetail.config.save")]})]})]}),d.jsx("textarea",{className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",style:{minHeight:480,resize:"vertical"},value:h??"",onChange:v=>g(v.target.value),spellCheck:!1,"aria-label":t("projectDetail.config.editorAria")}),b&&d.jsx("p",{className:"text-xs text-[var(--color-stuck)] mt-2 font-bold",children:t("projectDetail.config.confDirty")})]})}function lz({name:e}){const t=Le(),n=an(),{confirm:r,alert:a}=jn(),{data:o,isLoading:l}=Ge({queryKey:["project-pipelines",e],queryFn:()=>u3(e)}),[u,f]=A.useState(null),[h,g]=A.useState(!1),m=Rt({mutationFn:v=>d3(e,v),onSuccess:()=>n.invalidateQueries({queryKey:["project-pipelines",e]}),onError:v=>{a({title:t("projectDetail.pipelines.switch.error"),body:v instanceof Error?v.message:String(v)})}}),y=Rt({mutationFn:v=>m3(e,v),onSuccess:()=>n.invalidateQueries({queryKey:["project-pipelines",e]}),onError:v=>{a({title:t("projectDetail.pipelines.delete.error"),body:v instanceof Error?v.message:String(v)})}}),b=Rt({mutationFn:v=>p3(e,v.name,v.template),onSuccess:v=>{n.invalidateQueries({queryKey:["project-pipelines",e]}),g(!1),f(v.name)},onError:v=>{a({title:t("projectDetail.pipelines.create.error"),body:v instanceof Error?v.message:String(v)})}});if(l)return d.jsx("div",{className:"nb-card",children:d.jsx("p",{className:"text-[var(--color-text-muted)]",children:t("common.loading")})});const k=[];o!=null&&o.active&&k.push({name:o.active,isActive:!0});for(const v of(o==null?void 0:o.available)??[])k.push({name:v.name,isActive:!1});return d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"nb-card",children:[d.jsxs("div",{className:"flex items-center justify-between mb-3",children:[d.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-lg font-bold",children:t("projectDetail.pipelines.title")}),d.jsxs("button",{type:"button",className:"nb-btn nb-btn-mint",style:{padding:"6px 12px",fontSize:12},onClick:()=>g(!0),disabled:b.isPending,"aria-label":t("projectDetail.pipelines.add"),children:[d.jsx(jr,{size:12,strokeWidth:3}),t("projectDetail.pipelines.add")]})]}),k.length===0?d.jsx("p",{className:"text-sm text-[var(--color-text-muted)] italic p-4 border-2 border-dashed border-[var(--color-text)] rounded-lg text-center",children:t("projectDetail.pipelines.empty")}):d.jsx("ul",{className:"flex flex-col gap-2",children:k.map(v=>d.jsxs("li",{className:"flex items-center gap-3 p-3 bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg",children:[d.jsx(Db,{size:16,strokeWidth:2.5}),d.jsx("span",{className:"font-[family-name:var(--font-mono)] font-bold flex-1",children:v.name}),v.isActive&&d.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)"},children:t("projectDetail.pipelines.activeBadge")}),d.jsxs("div",{className:"flex gap-1",children:[d.jsxs("button",{type:"button",className:"nb-btn",style:{padding:"4px 10px",fontSize:11},onClick:()=>f(v.name),"aria-label":t("projectDetail.pipelines.editAria",{name:v.name}),children:[d.jsx(Ab,{size:11,strokeWidth:2.5}),t("projectDetail.pipelines.edit")]}),!v.isActive&&d.jsxs(d.Fragment,{children:[d.jsx("button",{type:"button",className:"nb-btn nb-btn-primary",style:{padding:"4px 10px",fontSize:11},onClick:async()=>{await r({title:t("projectDetail.pipelines.switch.confirm.title",{name:v.name}),body:t("projectDetail.pipelines.switch.confirm.body",{name:v.name}),confirm:t("projectDetail.pipelines.switch.confirm.button")})&&m.mutate(v.name)},disabled:m.isPending,"aria-label":t("projectDetail.pipelines.switchAria",{name:v.name}),children:t("projectDetail.pipelines.switch")}),d.jsx("button",{type:"button",className:"nb-btn nb-btn-danger",style:{padding:"4px 10px",fontSize:11},onClick:async()=>{await r({title:t("projectDetail.pipelines.delete.confirm.title",{name:v.name}),body:t("projectDetail.pipelines.delete.confirm.body"),confirm:t("common.delete"),danger:!0})&&y.mutate(v.name)},disabled:y.isPending,"aria-label":t("projectDetail.pipelines.deleteAria",{name:v.name}),children:d.jsx(xs,{size:11,strokeWidth:2.5})})]})]})]},v.name))})]}),u&&d.jsx(qI,{projectName:e,file:u,onClose:()=>f(null),onSaved:()=>{n.invalidateQueries({queryKey:["project-pipelines",e]})}}),h&&d.jsx(GI,{hasActive:!!(o!=null&&o.active),hasSample:!0,isPending:b.isPending,onCancel:()=>g(!1),onCreate:(v,S)=>b.mutate({name:v,template:S})})]})}function cz({name:e,repoDir:t}){const n=Le(),r=bs(),a=an(),{alert:o}=jn(),[l,u]=A.useState(""),[f,h]=A.useState(!0),g=Rt({mutationFn:()=>c3(e,{includeClaudeDir:f}),onSuccess:v=>{a.invalidateQueries({queryKey:["projects"]});const S=v.claudeRemoved.filter(E=>E.ok).map(E=>E.path);o({title:n("projectDetail.danger.deleted.title"),body:S.length>0?n("projectDetail.danger.deleted.bodyWithList",{paths:S.join(`
|
|
566
|
+
`)}):n("projectDetail.danger.deleted.body")}).then(()=>r("/projects"))},onError:v=>{o({title:n("projectDetail.danger.error"),body:v instanceof Error?v.message:String(v)})}}),y=n("projectDetail.danger.body",{path:"__PATH__"}).split("__PATH__"),k=n("projectDetail.danger.confirmPrompt",{name:"__NAME__"}).split("__NAME__");return d.jsxs("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:[d.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-lg font-bold mb-2 text-[var(--color-crashed)]",children:n("projectDetail.danger.title")}),d.jsxs("p",{className:"text-sm mb-4",children:[y[0],d.jsxs("code",{className:"font-[family-name:var(--font-mono)] bg-[var(--color-bg)] border-2 border-[var(--color-text)] px-1.5 py-0.5 rounded",children:["~/.coral/projects/",e,"/"]}),y[1]]}),t&&d.jsxs("label",{className:"flex items-start gap-2 mb-4 p-3 bg-[var(--color-bg)] border-2 border-[var(--color-text)] rounded-lg cursor-pointer",children:[d.jsx("input",{type:"checkbox",checked:f,onChange:v=>h(v.target.checked),className:"mt-0.5"}),d.jsxs("div",{className:"flex-1",children:[d.jsx("div",{className:"text-sm font-bold",children:n("projectDetail.danger.includeClaude.label")}),d.jsxs("div",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)]",children:[t,"/.claude/"]}),d.jsx("div",{className:"text-xs text-[var(--color-text-muted)] mt-1",children:n("projectDetail.danger.includeClaude.note")})]})]}),d.jsx("div",{className:"mb-4",children:d.jsxs("label",{className:"flex flex-col gap-1.5",children:[d.jsxs("span",{className:"text-sm font-bold",children:[k[0],d.jsx("code",{className:"font-[family-name:var(--font-mono)] text-xs",children:e}),k[1]]}),d.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",value:l,onChange:v=>u(v.target.value),placeholder:e})]})}),d.jsxs("button",{type:"button",className:"nb-btn nb-btn-danger",disabled:l!==e||g.isPending,onClick:()=>g.mutate(),"aria-label":n("projectDetail.danger.deleteAria"),children:[g.isPending?d.jsx(nt,{size:14,strokeWidth:3,className:"animate-spin"}):d.jsx(xs,{size:14,strokeWidth:3}),n("projectDetail.danger.deleteButton")]})]})}function uz({project:e,isPending:t,onCancel:n,onCreate:r}){var N;const a=Le(),[o,l]=A.useState(""),[u,f]=A.useState(""),[h,g]=A.useState(new Set),[m,y]=A.useState(!1),b=Ge({queryKey:["skills-all",e],queryFn:()=>Zb(e)});A.useEffect(()=>{const _=D=>{D.key==="Escape"&&n()};return window.addEventListener("keydown",_),()=>window.removeEventListener("keydown",_)},[n]);const v=o.trim().length>0&&o.trim().length<=200&&!t,S=_=>{const D=new Set(h);D.has(_)?D.delete(_):D.add(_),g(D)},E=()=>{v&&r({title:o.trim(),description:u.trim(),skills:[...h],labels:["AI-PIPELINE"],initialState:m?"Backlog":"Planning"})},C=((N=b.data)==null?void 0:N.data)??[];return d.jsx("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 z-40 flex items-start justify-center p-6 bg-black/30 overflow-auto",children:d.jsxs("div",{className:"nb-card mt-8 w-full max-w-xl flex flex-col",style:{maxHeight:"calc(100vh - 64px)"},children:[d.jsxs("header",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[d.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-2xl font-bold",children:a("newCard.title")}),d.jsx("button",{className:"nb-btn nb-btn-mint p-2",onClick:n,type:"button","aria-label":a("common.close"),children:d.jsx(dr,{size:14,strokeWidth:3})})]}),d.jsxs("form",{onSubmit:_=>{_.preventDefault(),E()},className:"flex flex-col gap-4 overflow-auto",children:[d.jsxs("label",{className:"flex flex-col gap-1.5",children:[d.jsx("span",{className:"text-sm font-bold",children:a("newCard.field.title")}),d.jsx("input",{type:"text",className:"nb-input w-full",placeholder:a("newCard.field.title.placeholder"),value:o,onChange:_=>l(_.target.value),maxLength:200,autoFocus:!0,required:!0}),d.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:a("newCard.field.title.help")})]}),d.jsxs("label",{className:"flex flex-col gap-1.5",children:[d.jsx("span",{className:"text-sm font-bold",children:a("newCard.field.description")}),d.jsx("textarea",{className:"nb-input w-full",style:{minHeight:120,resize:"vertical"},placeholder:a("newCard.field.description.placeholder"),value:u,onChange:_=>f(_.target.value)}),d.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:a("newCard.field.description.help")})]}),d.jsxs("div",{className:"flex flex-col gap-2",children:[d.jsx("span",{className:"text-sm font-bold",children:a("newCard.field.skills")}),d.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:a("newCard.field.skills.help")}),b.isLoading&&d.jsx("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:a("newCard.field.skills.loading")}),b.isError&&d.jsx("p",{className:"text-xs text-[var(--color-crashed)]",children:a("newCard.field.skills.error",{detail:b.error instanceof Error?b.error.message:String(b.error)})}),C.length>0&&d.jsx("div",{className:"flex flex-wrap gap-2",children:C.map(_=>{const D=h.has(_.name);return d.jsx("button",{type:"button",onClick:()=>S(_.name),className:["px-2.5 py-1 text-xs font-[family-name:var(--font-mono)] rounded-full border-2 transition-all",D?"bg-[var(--color-accent-mint)] border-[var(--color-text)] shadow-[2px_2px_0_var(--color-text)] font-bold":"bg-[var(--color-bg)] border-[var(--color-border-light)] hover:border-[var(--color-text)]"].join(" "),"aria-pressed":D,children:_.name},_.name)})}),h.size>0&&d.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:a("newCard.field.skills.selected",{count:h.size,names:[...h].join(", ")})})]}),d.jsxs("div",{className:"flex flex-col gap-2",children:[d.jsx("span",{className:"text-sm font-bold",children:a("newCard.field.dispatch")}),d.jsxs("label",{className:"flex items-center gap-3 cursor-pointer select-none p-3 border-[2px] border-[var(--color-text)] rounded-lg bg-[var(--color-bg-cream)]",children:[d.jsx("input",{type:"checkbox",className:"w-4 h-4 accent-[var(--color-cta)] cursor-pointer",checked:m,onChange:_=>y(_.target.checked)}),d.jsxs("div",{className:"flex-1",children:[d.jsx("div",{className:"text-sm font-bold",children:a("newCard.field.dispatch.label")}),d.jsx("div",{className:"text-xs text-[var(--color-text-muted)] mt-0.5",children:a("newCard.field.dispatch.help")})]})]})]})]}),d.jsxs("div",{className:"flex gap-2 justify-end mt-4 pt-3 border-t-2 border-dashed border-[var(--color-text)] flex-shrink-0",children:[d.jsx("button",{className:"nb-btn",style:{padding:"6px 14px"},onClick:n,disabled:t,type:"button",children:a("common.cancel")}),d.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"6px 14px"},onClick:E,disabled:!v,type:"button","aria-label":a("newCard.create.aria"),children:[t?d.jsx(nt,{size:13,strokeWidth:3,className:"animate-spin"}):d.jsx(jr,{size:13,strokeWidth:3}),a("common.create")]})]})]})})}function dz(e){return ht(`/api/projects/${encodeURIComponent(e)}/cards`)}function fz(e,t){return ht(`/api/projects/${encodeURIComponent(e)}/cards/${t}`)}async function tc(e,t){const n=await fetch(e,{method:"POST",headers:t?{"Content-Type":"application/json"}:void 0,body:t?JSON.stringify(t):void 0});if(!n.ok){const r=await n.text();throw new Error(`${n.status} ${n.statusText}: ${r}`)}return n.json().catch(()=>({}))}function hz(e,t){return tc(`/api/projects/${encodeURIComponent(e)}/cards/${t}/reset`)}async function pz(e,t){const n=await fetch(`/api/projects/${encodeURIComponent(e)}/cards/${t}`,{method:"DELETE"});if(!n.ok){const r=await n.text();throw new Error(`${n.status}: ${r}`)}}function mz(e,t){return tc(`/api/projects/${encodeURIComponent(e)}/cards/${t}/launch`)}function gz(e,t){const n=typeof t=="string"?{title:t}:t;return tc(`/api/projects/${encodeURIComponent(e)}/cards`,n)}async function yz(e,t,n){const r=await fetch(`/api/projects/${encodeURIComponent(e)}/cards/${t}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({state:n})});if(!r.ok){const a=await r.text();throw new Error(`${r.status}: ${a}`)}}async function bz(e,t,n){const r=await fetch(`/api/projects/${encodeURIComponent(e)}/cards/${t}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!r.ok){const a=await r.text();throw new Error(`${r.status}: ${a}`)}return r.json()}function H_(e){return tc(`/api/projects/${encodeURIComponent(e)}/pipeline/start`)}function K_(e){return tc(`/api/projects/${encodeURIComponent(e)}/pipeline/stop`)}function xz(e,t){return tc(`/api/projects/${encodeURIComponent(e)}/pipeline/reset`,t??{})}function vz(e){const t=an();A.useEffect(()=>{if(!e)return;const n=`/stream/projects/${encodeURIComponent(e)}`,r=new EventSource(n),a=u=>{try{const f=JSON.parse(u.data);t.invalidateQueries({queryKey:["cards",f.project]}),t.invalidateQueries({queryKey:["card",f.project,f.seq]}),t.invalidateQueries({queryKey:["projects"]})}catch{}},o=u=>{try{const f=JSON.parse(u.data);t.invalidateQueries({queryKey:["workers",f.project]}),t.invalidateQueries({queryKey:["projects"]})}catch{}},l=u=>{try{const f=JSON.parse(u.data);t.invalidateQueries({queryKey:["pipeline-status",f.project]}),t.invalidateQueries({queryKey:["projects"]})}catch{}};return r.addEventListener("card.created",a),r.addEventListener("card.updated",a),r.addEventListener("card.moved",a),r.addEventListener("card.deleted",a),r.addEventListener("worker.updated",o),r.addEventListener("worker.added",o),r.addEventListener("worker.deleted",o),r.addEventListener("pipeline.status",l),r.addEventListener("pipeline.started",l),r.addEventListener("pipeline.stopped",l),()=>r.close()},[e,t])}const wz=new Set(["python","typescript","golang","rust","kotlin","swift","java"]),kz=new Set(["frontend","backend","mobile","database","devops"]),Ez=new Set(["backend-architect","frontend-developer","code-reviewer","database-optimizer","devops-automator","security-engineer","qa-tester","security","qa","architect","db-opt"]),Sz=new Set(["coding-standards","tdd-workflow","git-workflow","architecture-decision-records","debugging-workflow"]);function Nz(e){return wz.has(e)?"lang":kz.has(e)?"end":Ez.has(e)?"persona":Sz.has(e)?"workflow":"other"}const _z={lang:"var(--color-accent-purple)",end:"var(--color-secondary)",persona:"var(--color-primary)",workflow:"var(--color-accent-mint)",other:"var(--color-bg)"};function Jb({name:e}){const t=_z[Nz(e)];return d.jsx("span",{className:"nb-badge",style:{background:t},children:e})}function G_({label:e,kind:t="default"}){const n=t==="warn"?"var(--color-accent-pink)":t==="accent"?"var(--color-accent-yellow)":"var(--color-bg-cream)";return d.jsx("span",{className:"nb-badge",style:{background:n},children:e})}function Cz({card:e,onClick:t,done:n,draggable:r}){const a=Le(),o=e.labels.some(l=>l.startsWith("STARTED-"))&&!n;return d.jsxs("article",{onClick:t,onKeyDown:l=>{(l.key==="Enter"||l.key===" ")&&(l.preventDefault(),t())},draggable:r,onDragStart:l=>{l.dataTransfer.setData("application/x-sps-card-seq",String(e.seq)),l.dataTransfer.effectAllowed="move"},tabIndex:0,role:"button","aria-label":`Card #${e.seq}: ${e.title}`,className:["bg-[var(--color-bg)] border-[3px] border-[var(--color-text)] rounded-xl p-3","shadow-[3px_3px_0_var(--color-text)] cursor-pointer","transition-[transform,box-shadow] duration-[180ms] ease-out","hover:-translate-x-0.5 hover:-translate-y-0.5 hover:shadow-[5px_5px_0_var(--color-text)]","focus:outline-none focus-visible:ring-[3px] focus-visible:ring-offset-2 focus-visible:ring-[var(--color-text)]",n?"opacity-60":"",r?"active:cursor-grabbing":""].join(" "),children:[d.jsxs("div",{className:"flex items-center justify-between gap-2 mb-2",children:[d.jsxs("span",{className:"font-[family-name:var(--font-mono)] font-bold text-[11px] px-2 py-0.5 bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-full",children:["#",e.seq]}),o&&d.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)"},children:"running"})]}),d.jsx("p",{className:`font-bold text-sm leading-5 mb-2 line-clamp-2 ${n?"line-through decoration-2":""}`,children:e.title}),(e.skills.length>0||e.labels.length>0)&&d.jsxs("div",{className:"flex flex-wrap gap-1 mb-2",children:[e.skills.slice(0,3).map(l=>d.jsx(Jb,{name:l},l)),e.labels.filter(l=>l==="NEEDS-FIX").map(l=>d.jsx(G_,{label:l,kind:"warn"},l))]}),e.checklist&&e.checklist.total>0&&d.jsx(jz,{stats:e.checklist}),d.jsxs("div",{className:"pt-2 border-t-[1.5px] border-dashed border-[var(--color-border-light)] flex items-center gap-2 text-[11px] font-[family-name:var(--font-mono)] text-[var(--color-text-subtle)]",children:[d.jsx("span",{children:Az(e.updatedAt??e.createdAt,a)}),e.branch&&d.jsxs("span",{className:"truncate",children:["· ",e.branch]})]})]})}function jz({stats:e}){const t=Le();return d.jsxs("div",{className:"mb-2",children:[d.jsxs("div",{className:"flex items-center justify-between text-[11px] font-[family-name:var(--font-mono)] mb-1",children:[d.jsx("span",{className:"font-bold",children:t("kanban.checklist.label",{done:e.done,total:e.total})}),d.jsxs("span",{className:"text-[var(--color-text-subtle)]",children:[e.percent,"%"]})]}),d.jsx("div",{className:"w-full h-1.5 bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-full overflow-hidden mb-1.5",children:d.jsx("div",{className:"h-full bg-[var(--color-cta)] transition-[width] duration-200",style:{width:`${e.percent}%`}})}),d.jsxs("ul",{className:"text-[11px] space-y-0.5",children:[e.items.slice(0,3).map((n,r)=>d.jsxs("li",{className:`flex items-start gap-1 ${n.done?"opacity-60 line-through":""}`,children:[d.jsx("span",{className:"flex-shrink-0 mt-0.5",children:n.done?"✓":"○"}),d.jsx("span",{className:"line-clamp-1",children:n.text})]},r)),e.items.length>3&&d.jsx("li",{className:"text-[var(--color-text-subtle)] italic pl-3",children:t("kanban.checklist.more",{count:e.items.length-3})})]})]})}function Az(e,t){if(!e)return"—";const n=new Date(e),r=Date.now()-n.getTime();return r<6e4?t("kanban.time.justNow"):r<36e5?t("kanban.time.minutes",{n:Math.floor(r/6e4)}):r<864e5?t("kanban.time.hours",{n:Math.floor(r/36e5)}):n.toLocaleDateString()}function Tz({label:e,bg:t,cards:n,onCardClick:r,onDropCard:a}){const o=Le(),[l,u]=A.useState(!1);return d.jsxs("div",{className:["flex flex-col p-3 rounded-2xl border-[3px] min-h-[280px] h-full min-h-0 overflow-hidden","transition-all",l?"border-[var(--color-cta)] shadow-[4px_4px_0_var(--color-cta)]":"border-[var(--color-text)]"].join(" "),style:{background:t},onDragOver:f=>{!a||!f.dataTransfer.types.includes("application/x-sps-card-seq")||(f.preventDefault(),f.dataTransfer.dropEffect="move",l||u(!0))},onDragLeave:()=>u(!1),onDrop:f=>{if(u(!1),!a)return;const h=f.dataTransfer.getData("application/x-sps-card-seq"),g=Number.parseInt(h,10);Number.isFinite(g)&&(f.preventDefault(),a(g))},children:[d.jsxs("div",{className:"flex items-center justify-between px-1 pb-2 mb-2 border-b-2 border-[var(--color-text)] shrink-0",children:[d.jsx("span",{className:"font-[family-name:var(--font-heading)] font-bold text-sm uppercase tracking-wider",children:e}),d.jsx("span",{className:"font-[family-name:var(--font-mono)] font-bold text-xs px-2 py-0.5 bg-[var(--color-bg)] border-2 border-[var(--color-text)] rounded-full",children:n.length})]}),d.jsxs("div",{className:"flex flex-col gap-2 flex-1 min-h-0 overflow-y-auto pr-1 -mr-1",style:{scrollbarWidth:"thin",scrollbarColor:"var(--color-text) transparent"},children:[n.length===0&&d.jsx("div",{className:"text-xs text-[var(--color-text-muted)] text-center py-6 italic",children:o("kanban.column.empty")}),n.map(f=>d.jsx(Cz,{card:f,onClick:()=>r(f),done:e==="Done",draggable:!!a},f.seq))]})]})}function Uy(e,t){if(!e)return"";const n=e.split(`
|
|
567
|
+
`),r=new RegExp(`^##\\s+${t}\\s*$`),a=n.findIndex(l=>r.test(l));if(a===-1)return"";let o=n.length;for(let l=a+1;l<n.length;l++)if(/^##\s+/.test(n[l]??"")){o=l;break}return n.slice(a+1,o).join(`
|
|
568
|
+
`).trim()}function Tg(e){return Uy(e,"描述")}function Mz({project:e,seq:t,onClose:n,onChanged:r}){var Y,W,G,O,L,V,R,se,ge,ye,xe;const a=Le(),o=an(),{confirm:l,alert:u}=jn(),{data:f,isLoading:h,isError:g,error:m,refetch:y}=Ge({queryKey:["card",e,t],queryFn:()=>fz(e,t)}),[b,k]=A.useState(!1),[v,S]=A.useState(""),[E,C]=A.useState(""),[N,_]=A.useState(new Set),[D,T]=A.useState([]),[M,I]=A.useState(""),F=Ge({queryKey:["skills-all",e],queryFn:()=>Zb(e),enabled:b}),U=((W=(Y=Ge({queryKey:["projects"],queryFn:ga,refetchInterval:1e4}).data)==null?void 0:Y.data.find(q=>q.name===e))==null?void 0:W.pipelineStatus)==="running";A.useEffect(()=>{b&&f&&(S(f.title),C(Tg(f.body)),_(new Set(f.skills)),T([...f.labels]))},[b,f]),A.useEffect(()=>{const q=ne=>{ne.key==="Escape"&&(b?k(!1):n())};return window.addEventListener("keydown",q),()=>window.removeEventListener("keydown",q)},[n,b]);const K=Rt({mutationFn:()=>{if(!f)throw new Error("no data");const q={},ne=v.trim();ne&&ne!==f.title&&(q.title=ne);const ue=Tg(f.body);E!==ue&&(q.description=E);const ce=[...N].sort(),de=[...f.skills].sort();return JSON.stringify(ce)!==JSON.stringify(de)&&(q.skills=ce),JSON.stringify(D)!==JSON.stringify(f.labels)&&(q.labels=D),Object.keys(q).length===0?Promise.resolve({ok:!0,noop:!0}):bz(e,t,q)},onSuccess:()=>{o.invalidateQueries({queryKey:["card",e,t]}),o.invalidateQueries({queryKey:["cards",e]}),k(!1),r()},onError:q=>{u({title:a("cardModal.error.save.title"),body:q instanceof Error?q.message:String(q)})}}),Q=A.useMemo(()=>{if(!b||!f)return!1;if(v.trim()!==f.title||E!==Tg(f.body))return!0;const q=[...N].sort(),ne=[...f.skills].sort();return JSON.stringify(q)!==JSON.stringify(ne)||JSON.stringify(D)!==JSON.stringify(f.labels)},[b,f,v,E,N,D]),B=q=>{const ne=new Set(N);ne.has(q)?ne.delete(q):ne.add(q),_(ne)},H=()=>{const q=M.trim();if(q){if(D.includes(q)){I("");return}T([...D,q]),I("")}},z=q=>{T(D.filter(ne=>ne!==q))};return d.jsx("div",{role:"dialog","aria-modal":"true","aria-labelledby":"card-modal-title",className:"fixed inset-0 z-40 flex items-start justify-center p-6 bg-black/30 overflow-auto",children:d.jsxs("div",{className:"nb-card mt-12 w-full max-w-3xl bg-[var(--color-bg)]",children:[d.jsxs("header",{className:"flex items-start justify-between gap-4 mb-4",children:[d.jsxs("div",{className:"flex-1 min-w-0",children:[d.jsxs("div",{className:"flex items-center gap-3 mb-1",children:[d.jsxs("span",{className:"font-[family-name:var(--font-mono)] font-bold text-xs px-2 py-0.5 bg-[var(--color-accent-purple)] border-2 border-[var(--color-text)] rounded-full",children:["#",t]}),(f==null?void 0:f.state)&&d.jsx("span",{className:"font-[family-name:var(--font-mono)] text-xs px-2 py-0.5 bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-full font-semibold",children:f.state}),b&&d.jsx("span",{className:"text-xs font-bold text-[var(--color-stuck)]",children:a("cardModal.editing")})]}),b?d.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-heading)] text-xl font-bold",value:v,onChange:q=>S(q.target.value),maxLength:200,"aria-label":a("cardModal.title.aria")}):d.jsx("h2",{id:"card-modal-title",className:"font-[family-name:var(--font-heading)] text-2xl font-bold break-words",children:(f==null?void 0:f.title)??a("common.loading")})]}),d.jsxs("div",{className:"flex gap-2 flex-shrink-0",children:[!b&&f&&d.jsxs("button",{onClick:()=>k(!0),className:"nb-btn",style:{padding:"6px 12px"},type:"button","aria-label":a("cardModal.editAria"),children:[d.jsx(Ab,{size:12,strokeWidth:2.5})," ",a("cardModal.edit")]}),d.jsx("button",{onClick:n,className:"nb-btn nb-btn-mint p-2","aria-label":a("cardModal.close.aria"),type:"button",children:d.jsx(dr,{size:14,strokeWidth:3})})]})]}),h&&d.jsx("p",{className:"text-[var(--color-text-muted)]",children:a("common.loading")}),g&&d.jsx("p",{className:"text-[var(--color-crashed)]",children:a("cardModal.error.load",{detail:m instanceof Error?m.message:String(m)})}),f&&d.jsxs("div",{className:"flex flex-col gap-4",children:[f.branch&&!b&&d.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[d.jsx(RR,{size:14}),d.jsx("span",{className:"font-[family-name:var(--font-mono)]",children:f.branch})]}),b?d.jsxs(d.Fragment,{children:[d.jsxs("div",{children:[d.jsx("div",{className:"text-sm font-bold mb-1.5",children:"Skills"}),F.isLoading&&d.jsx("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:a("cardModal.skills.loading")}),F.data&&F.data.data.length>0&&d.jsx("div",{className:"flex flex-wrap gap-1.5",children:F.data.data.map(q=>{const ne=N.has(q.name);return d.jsx("button",{type:"button",onClick:()=>B(q.name),"aria-pressed":ne,className:["px-2.5 py-1 text-xs font-[family-name:var(--font-mono)] rounded-full border-2 transition-all",ne?"bg-[var(--color-accent-mint)] border-[var(--color-text)] shadow-[2px_2px_0_var(--color-text)] font-bold":"bg-[var(--color-bg)] border-[var(--color-border-light)] hover:border-[var(--color-text)]"].join(" "),children:q.name},q.name)})})]}),d.jsxs("div",{children:[d.jsx("div",{className:"text-sm font-bold mb-1.5",children:"Labels"}),d.jsxs("div",{className:"flex flex-wrap gap-1.5 items-center",children:[D.map(q=>d.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 text-xs font-[family-name:var(--font-mono)] bg-[var(--color-accent-yellow)] border-2 border-[var(--color-text)] rounded-full",children:[q,d.jsx("button",{type:"button",onClick:()=>z(q),className:"hover:text-[var(--color-crashed)]","aria-label":a("cardModal.label.removeAria",{label:q}),children:d.jsx(dr,{size:10,strokeWidth:3})})]},q)),d.jsx("input",{type:"text",className:"nb-input",style:{padding:"4px 8px",fontSize:12,width:140},placeholder:a("cardModal.label.addPlaceholder"),value:M,onChange:q=>I(q.target.value),onKeyDown:q=>{q.key==="Enter"&&!q.nativeEvent.isComposing&&(q.preventDefault(),H())}}),M&&d.jsx("button",{type:"button",className:"nb-btn",style:{padding:"2px 6px",fontSize:11},onClick:H,"aria-label":a("cardModal.label.addAria"),children:d.jsx(jr,{size:10,strokeWidth:3})})]}),d.jsx("p",{className:"text-[10px] text-[var(--color-text-muted)] mt-1",children:a("cardModal.label.note")})]})]}):d.jsxs(d.Fragment,{children:[f.skills.length>0&&d.jsxs("div",{children:[d.jsx("div",{className:"text-sm font-bold mb-1.5",children:"Skills"}),d.jsx("div",{className:"flex items-center gap-2 flex-wrap",children:f.skills.map(q=>d.jsx(Jb,{name:q},q))})]}),f.labels.length>0&&d.jsxs("div",{children:[d.jsx("div",{className:"text-sm font-bold mb-1.5",children:"Labels"}),d.jsx("div",{className:"flex items-center gap-2 flex-wrap",children:f.labels.map(q=>d.jsx(G_,{label:q,kind:q==="NEEDS-FIX"?"warn":"default"},q))})]})]}),b?d.jsxs(d.Fragment,{children:[d.jsxs("div",{children:[d.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-2 uppercase tracking-wider",children:a("cardModal.section.description")}),d.jsx("textarea",{className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",style:{minHeight:180,resize:"vertical"},value:E,onChange:q=>C(q.target.value),"aria-label":a("cardModal.body.aria")}),d.jsx("p",{className:"text-[10px] text-[var(--color-text-muted)] mt-1",children:a("cardModal.body.replaceNote")})]}),(((se=f.checklist)==null?void 0:se.total)??0)>0&&d.jsxs("div",{className:"nb-card bg-[var(--color-bg-cream)] p-3",children:[d.jsx("div",{className:"flex items-center justify-between mb-2",children:d.jsxs("span",{className:"font-bold text-sm",children:[a("cardModal.section.checklist")," ",((ge=f.checklist)==null?void 0:ge.done)??0,"/",((ye=f.checklist)==null?void 0:ye.total)??0]})}),d.jsx("ul",{className:"text-sm space-y-1",children:(((xe=f.checklist)==null?void 0:xe.items)??[]).map((q,ne)=>d.jsxs("li",{className:`flex items-start gap-2 ${q.done?"opacity-60 line-through":""}`,children:[d.jsx("span",{children:q.done?"✓":"○"}),d.jsx("span",{children:q.text})]},ne))})]})]}):d.jsxs(d.Fragment,{children:[d.jsxs("div",{children:[d.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-2 uppercase tracking-wider",children:a("cardModal.section.description")}),d.jsx("pre",{className:"text-xs whitespace-pre-wrap font-[family-name:var(--font-mono)] bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg p-4 max-h-64 overflow-auto",children:Uy(f.body,"描述")||a("cardModal.section.empty")})]}),d.jsxs("div",{children:[d.jsxs("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-2 uppercase tracking-wider",children:[a("cardModal.section.checklist")," ",d.jsxs("span",{className:"text-[var(--color-text-muted)] normal-case tracking-normal",children:[((G=f.checklist)==null?void 0:G.done)??0,"/",((O=f.checklist)==null?void 0:O.total)??0]})]}),d.jsx("div",{className:"nb-card bg-[var(--color-bg-cream)] p-3",children:(((L=f.checklist)==null?void 0:L.total)??0)>0?d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"flex items-center justify-end mb-2",children:d.jsx("div",{className:"w-24 h-2 bg-[var(--color-bg)] border-2 border-[var(--color-text)] rounded-full overflow-hidden",children:d.jsx("div",{className:"h-full bg-[var(--color-cta)]",style:{width:`${((V=f.checklist)==null?void 0:V.percent)??0}%`}})})}),d.jsx("ul",{className:"text-sm space-y-1",children:(((R=f.checklist)==null?void 0:R.items)??[]).map((q,ne)=>d.jsxs("li",{className:`flex items-start gap-2 ${q.done?"opacity-60 line-through":""}`,children:[d.jsx("span",{children:q.done?"✓":"○"}),d.jsx("span",{children:q.text})]},ne))})]}):d.jsx("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:a("cardModal.checklist.empty")})})]}),d.jsxs("div",{children:[d.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-2 uppercase tracking-wider",children:a("cardModal.section.log")}),d.jsx("pre",{className:"text-xs whitespace-pre-wrap font-[family-name:var(--font-mono)] bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg p-4 max-h-64 overflow-auto",children:Uy(f.body,"日志")||a("cardModal.section.empty")})]})]}),d.jsx("div",{className:"flex gap-2 pt-2 border-t-2 border-[var(--color-border-light)] justify-end flex-wrap",children:b?d.jsxs(d.Fragment,{children:[d.jsx("button",{className:"nb-btn",type:"button",onClick:()=>{k(!1),y()},disabled:K.isPending,children:a("common.cancel")}),d.jsxs("button",{className:"nb-btn nb-btn-primary",type:"button",onClick:()=>K.mutate(),disabled:!Q||!v.trim()||K.isPending,"aria-label":a("cardDetail.save"),children:[K.isPending?d.jsx(nt,{size:14,strokeWidth:3,className:"animate-spin"}):d.jsx(ma,{size:14,strokeWidth:3}),a("common.save")]})]}):d.jsxs(d.Fragment,{children:[d.jsxs("button",{className:"nb-btn nb-btn-primary",type:"button",disabled:f.state==="Done"||U,title:f.state==="Done"?a("cardModal.action.launch.disabledDone"):U?a("cardModal.action.launch.disabledRunning"):void 0,onClick:async()=>{try{await mz(e,t),r()}catch(q){u({title:a("cardModal.action.launch.error"),body:q instanceof Error?q.message:String(q)})}},children:[d.jsx(Hu,{size:14,strokeWidth:3}),a("cardModal.action.launch")]}),d.jsxs("button",{className:"nb-btn nb-btn-yellow",type:"button",onClick:async()=>{if(await l({title:a("cardModal.action.reset.confirm.title",{seq:t}),body:a("cardModal.action.reset.confirm.body"),confirm:a("cardModal.action.reset.confirm.button"),danger:!0}))try{await hz(e,t),r(),n()}catch(ne){u({title:a("cardModal.action.reset.error"),body:ne instanceof Error?ne.message:String(ne)})}},children:[d.jsx(Tb,{size:14,strokeWidth:2.5}),a("cardModal.action.reset")]}),d.jsxs("button",{className:"nb-btn",style:{background:"var(--color-crashed)",color:"var(--color-bg)"},type:"button",onClick:async()=>{if(!(!await l({title:a("cardModal.action.delete.confirm1.title",{seq:t}),body:a("cardModal.action.delete.confirm1.body",{title:f.title}),confirm:a("cardModal.action.delete.confirm1.button"),danger:!0})||!await l({title:a("cardModal.action.delete.confirm2.title"),body:a("cardModal.action.delete.confirm2.body",{seq:t}),confirm:a("cardModal.action.delete"),danger:!0})))try{await pz(e,t),r(),n()}catch(ue){u({title:a("projectDetail.pipelines.delete.error"),body:ue instanceof Error?ue.message:String(ue)})}},"aria-label":a("cardModal.action.delete"),children:[d.jsx(xs,{size:14,strokeWidth:2.5}),a("cardModal.action.delete")]})]})})]})]})})}function Dz({current:e,onChange:t}){const[n,r]=A.useState(!1),a=A.useRef(null),{data:o}=Ge({queryKey:["projects"],queryFn:ga});return A.useEffect(()=>{const l=u=>{var f;(f=a.current)!=null&&f.contains(u.target)||r(!1)};return document.addEventListener("mousedown",l),()=>document.removeEventListener("mousedown",l)},[]),d.jsxs("div",{className:"relative",ref:a,children:[d.jsxs("button",{type:"button",className:"inline-flex items-center gap-2 px-3 py-2 bg-[var(--color-bg)] border-[3px] border-[var(--color-text)] rounded-xl shadow-[3px_3px_0_var(--color-text)] font-[family-name:var(--font-mono)] text-sm font-bold hover:-translate-x-px hover:-translate-y-px hover:shadow-[4px_4px_0_var(--color-text)] transition-[transform,box-shadow] duration-150",onClick:()=>r(l=>!l),children:[e,d.jsx(Vl,{size:14,strokeWidth:2.5})]}),n&&o&&d.jsx("div",{className:"absolute right-0 mt-2 z-20 min-w-[200px] max-h-[60vh] overflow-y-auto bg-[var(--color-bg)] border-[3px] border-[var(--color-text)] rounded-xl shadow-[5px_5px_0_var(--color-text)]",children:Lb(o.data,"activity").map(l=>{const u=l.pipelineStatus==="running";return d.jsxs("button",{type:"button",onClick:()=>{t(l.name),r(!1)},className:["w-full text-left px-4 py-2 text-sm font-semibold flex items-center gap-2",l.name===e?"bg-[var(--color-accent-mint)]":"hover:bg-[var(--color-bg-cream)]"].join(" "),children:[u&&d.jsx(Hu,{size:12,strokeWidth:3,className:"text-[var(--color-running)] shrink-0","aria-label":"运行中"}),d.jsx("span",{className:"font-[family-name:var(--font-mono)]",children:l.name}),d.jsxs("span",{className:"ml-auto text-xs text-[var(--color-text-muted)]",children:[l.cards.total," cards"]})]},l.name)})})]})}const Oz=[{state:"Planning",labelKey:"board.col.planning",bg:"var(--color-accent-purple)"},{state:"Backlog",labelKey:"board.col.backlog",bg:"var(--color-bg-cream)"},{state:"Todo",labelKey:"board.col.todo",bg:"var(--color-accent-yellow)"},{state:"Inprogress",labelKey:"board.col.inprogress",bg:"var(--color-secondary)"},{state:"QA",labelKey:"board.col.qa",bg:"var(--color-accent-pink)"},{state:"Done",labelKey:"board.col.done",bg:"var(--color-accent-mint)"}],V_="sps-console:last-board-project";function Rz(){if(typeof window>"u")return null;try{return localStorage.getItem(V_)}catch{return null}}function Lz(e){if(!(typeof window>"u"))try{localStorage.setItem(V_,e)}catch{}}function Iz(){var z,Y,W;const e=Le(),[t,n]=vN(),r=t.get("project"),[a,o]=A.useState(null),[l,u]=A.useState(""),[f,h]=A.useState(()=>new Set),[g,m]=A.useState(()=>new Set),{confirm:y,alert:b}=jn();vz(r);const k=Ge({queryKey:["projects"],queryFn:ga}),v=Ge({queryKey:["cards",r],queryFn:()=>dz(r??""),enabled:!!r}),S=an(),E=()=>{S.invalidateQueries({queryKey:["cards",r]}),S.invalidateQueries({queryKey:["projects"]}),S.invalidateQueries({queryKey:["pipeline-status",r]})},C=G=>{n({project:G})};A.useEffect(()=>{var O;if(r){Lz(r);return}const G=Rz();G&&((O=k.data)!=null&&O.data.some(L=>L.name===G))&&n({project:G},{replace:!0})},[r,k.data,n]);const N=Rt({mutationFn:()=>H_(r),onSuccess:()=>{E()},onError:G=>{b({title:e("board.action.startError"),body:G instanceof Error?G.message:String(G)})}}),_=Rt({mutationFn:()=>K_(r),onSuccess:()=>E(),onError:G=>{b({title:e("board.action.stopError"),body:G instanceof Error?G.message:String(G)})}}),D=Rt({mutationFn:()=>xz(r,{all:!0}),onSuccess:()=>E(),onError:G=>{b({title:e("board.action.resetError"),body:G instanceof Error?G.message:String(G)})}}),[T,M]=A.useState(!1),I=Rt({mutationFn:G=>gz(r,G),onSuccess:()=>{E(),M(!1)},onError:G=>{b({title:e("board.action.newCard.error"),body:G instanceof Error?G.message:String(G)})}}),F=Rt({mutationFn:({seq:G,state:O})=>yz(r,G,O),onMutate:async({seq:G,state:O})=>{await S.cancelQueries({queryKey:["cards",r]});const L=S.getQueryData(["cards",r]);return L&&S.setQueryData(["cards",r],{...L,data:L.data.map(V=>V.seq===G?{...V,state:O}:V)}),{prev:L}},onError:(G,O,L)=>{L!=null&&L.prev&&S.setQueryData(["cards",r],L.prev),b({title:e("board.action.moveCard.error"),body:G instanceof Error?G.message:String(G)})},onSettled:()=>{S.invalidateQueries({queryKey:["cards",r]})}}),$=((z=v.data)==null?void 0:z.data)??[],{allSkills:U,allLabels:K}=A.useMemo(()=>{const G=new Set,O=new Set;for(const L of $){for(const V of L.skills)G.add(V);for(const V of L.labels)O.add(V)}return{allSkills:[...G].sort(),allLabels:[...O].sort()}},[$]);if(!r)return d.jsxs("div",{className:"flex flex-col gap-6 w-full",children:[d.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold",children:e("board.title.bare")}),d.jsxs("div",{className:"nb-card bg-[var(--color-accent-yellow)] max-w-2xl",children:[d.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold mb-3",children:e("board.pickPrompt.title")}),d.jsx("p",{className:"text-sm mb-4 text-[var(--color-text-muted)]",children:e("board.pickPrompt.body")}),d.jsx("div",{className:"flex flex-wrap gap-2",children:(Y=k.data)==null?void 0:Y.data.map(G=>d.jsx("button",{className:"nb-btn nb-btn-blue",onClick:()=>C(G.name),type:"button",children:G.name},G.name))})]})]});const Q=$.filter(G=>{if(l){const O=l.toLowerCase();if(!(G.title.toLowerCase().includes(O)||G.skills.some(V=>V.toLowerCase().includes(O))||G.labels.some(V=>V.toLowerCase().includes(O))))return!1}return!(f.size>0&&!G.skills.some(L=>f.has(L))||g.size>0&&!G.labels.some(L=>g.has(L)))}),B=(W=k.data)==null?void 0:W.data.find(G=>G.name===r),H=(B==null?void 0:B.pipelineStatus)==="running";return d.jsxs("div",{className:"flex flex-col gap-4 max-w-full flex-1 min-h-0",children:[d.jsxs("header",{className:"flex items-center justify-between flex-wrap gap-3 shrink-0",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold tracking-tight",children:e("board.title")}),d.jsx("p",{className:"text-[var(--color-text-muted)] text-sm mt-1",children:B?e("board.subtitle",{name:B.name,cards:B.cards.total,workers:B.workers.active}):e("common.loading")})]}),d.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[d.jsx(Dz,{current:r,onChange:C}),d.jsxs("button",{className:H?"nb-btn nb-btn-danger":"nb-btn nb-btn-primary",onClick:()=>H?_.mutate():N.mutate(),disabled:N.isPending||_.isPending,type:"button","aria-label":e(H?"board.action.stopAria":"board.action.startAria"),title:e(H?"board.action.stopAria":"board.action.startAria"),children:[N.isPending||_.isPending?d.jsx(nt,{size:14,strokeWidth:3,className:"animate-spin"}):H?d.jsx(Mb,{size:14,strokeWidth:3}):d.jsx(Hu,{size:14,strokeWidth:3}),e(H?"board.action.stop":"board.action.start")]}),d.jsxs("button",{className:"nb-btn nb-btn-yellow",type:"button",onClick:async()=>{await y({title:e("board.action.reset.confirm.title"),body:e("board.action.reset.confirm.body"),confirm:e("board.action.reset.confirm.button"),danger:!0})&&D.mutate()},disabled:D.isPending,children:[D.isPending?d.jsx(nt,{size:14,strokeWidth:3,className:"animate-spin"}):d.jsx(Tb,{size:14,strokeWidth:2.5}),e("board.action.reset")]}),d.jsxs("button",{className:"nb-btn nb-btn-mint",type:"button",onClick:()=>M(!0),disabled:I.isPending,children:[I.isPending?d.jsx(nt,{size:14,strokeWidth:3,className:"animate-spin"}):d.jsx(jr,{size:14,strokeWidth:3}),e("board.action.newCard")]})]})]}),d.jsxs("div",{className:"flex items-center gap-3 flex-wrap shrink-0",children:[d.jsxs("div",{className:"relative flex-1 max-w-md",children:[d.jsx(Ol,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-[var(--color-text-subtle)]"}),d.jsx("input",{className:"nb-input pl-9 w-full",placeholder:e("board.search.placeholder"),value:l,onChange:G=>u(G.target.value),"aria-label":e("board.search.aria")})]}),d.jsx(dk,{label:"skill",options:U,selected:f,onChange:h}),d.jsx(dk,{label:"label",options:K,selected:g,onChange:m}),(l||f.size>0||g.size>0)&&d.jsxs("button",{className:"nb-btn",style:{padding:"4px 10px",fontSize:11},onClick:()=>{u(""),h(new Set),m(new Set)},type:"button","aria-label":e("board.filter.clearAria"),children:[d.jsx(dr,{size:11,strokeWidth:3}),e("board.filter.clear")]}),d.jsxs("span",{className:"text-xs text-[var(--color-text-muted)] flex items-center gap-1 font-[family-name:var(--font-mono)]",children:[d.jsx(DR,{size:12}),Q.length," / ",$.length]})]}),v.isError&&d.jsxs("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:[d.jsx("p",{className:"font-semibold",children:e("board.error.loadCards")}),d.jsx("p",{className:"text-sm mt-1 text-[var(--color-text-muted)]",children:v.error instanceof Error?v.error.message:String(v.error)})]}),!v.isError&&d.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-6 auto-rows-fr gap-3 flex-1 min-h-0",children:Oz.map(G=>d.jsx(Tz,{label:e(G.labelKey),bg:G.bg,cards:Q.filter(zz(G.state)),onCardClick:O=>o(O.seq),onDropCard:O=>F.mutate({seq:O,state:G.state})},G.state))}),a!==null&&d.jsx(Mz,{project:r,seq:a,onClose:()=>o(null),onChanged:E}),T&&d.jsx(uz,{project:r,isPending:I.isPending,onCancel:()=>M(!1),onCreate:G=>I.mutate(G)})]})}function zz(e){return t=>e==="QA"?t.state==="QA"||t.state==="Review":e==="Done"?t.state==="Done"||t.state==="Canceled":t.state===e}function dk({label:e,options:t,selected:n,onChange:r}){const a=Le(),[o,l]=A.useState(!1),u=A.useRef(null);A.useEffect(()=>{if(!o)return;const m=b=>{var k;(k=u.current)!=null&&k.contains(b.target)||l(!1)},y=b=>{b.key==="Escape"&&l(!1)};return window.addEventListener("click",m),window.addEventListener("keydown",y),()=>{window.removeEventListener("click",m),window.removeEventListener("keydown",y)}},[o]);const f=m=>{const y=new Set(n);y.has(m)?y.delete(m):y.add(m),r(y)},h=t.length===0,g=n.size;return d.jsxs("div",{ref:u,className:"relative",children:[d.jsxs("button",{type:"button",className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>!h&&l(m=>!m),disabled:h,"aria-haspopup":"listbox","aria-expanded":o,"aria-label":a("board.filter.aria",{label:e}),children:[e,g>0&&d.jsx("span",{className:"ml-1 px-1.5 py-0.5 text-[10px] font-bold rounded-full bg-[var(--color-primary)] text-[var(--color-text)] border border-[var(--color-text)]",children:g}),d.jsx(Vl,{size:11,strokeWidth:3,className:["transition-transform",o?"rotate-180":""].join(" ")})]}),o&&d.jsxs("div",{role:"listbox",className:"absolute left-0 top-full mt-2 z-20 min-w-[200px] max-h-64 overflow-auto nb-card p-2",style:{padding:8},children:[t.map(m=>{const y=n.has(m);return d.jsxs("label",{className:["flex items-center gap-2 px-2 py-1.5 rounded cursor-pointer text-sm font-[family-name:var(--font-mono)]",y?"bg-[var(--color-accent-mint)]":"hover:bg-[var(--color-bg-cream)]"].join(" "),children:[d.jsx("input",{type:"checkbox",checked:y,onChange:()=>f(m),className:"flex-shrink-0"}),d.jsx("span",{className:"truncate",children:m})]},m)}),g>0&&d.jsx("button",{type:"button",className:"w-full mt-2 pt-2 border-t-2 border-dashed border-[var(--color-text)] text-xs font-bold text-[var(--color-crashed)] text-center",onClick:()=>r(new Set),children:a("board.filter.clearSelection")})]})]})}function Pz(){return ht("/api/workers/all")}function Bz(e){return ht(`/api/projects/${encodeURIComponent(e)}/workers`)}function Uz(e,t){return ht(`/api/projects/${encodeURIComponent(e)}/workers/${t}`)}async function Y_(e,t){const n=await fetch(e,{method:"POST",headers:t?{"Content-Type":"application/json"}:void 0,body:t?JSON.stringify(t):void 0});if(!n.ok)throw new Error(`${n.status}: ${await n.text()}`);return n.json().catch(()=>({}))}function fk(e,t){return Y_(`/api/projects/${encodeURIComponent(e)}/workers/${t}/kill`)}function $z(e,t,n){return Y_(`/api/projects/${encodeURIComponent(e)}/workers/${t}/launch`,n?{seq:n}:void 0)}function ex({state:e}){const n={running:{bg:"var(--color-running-bg)",color:"var(--color-running)",label:"running"},starting:{bg:"var(--color-secondary)",color:"var(--color-text)",label:"starting",icon:d.jsx(nt,{size:9,strokeWidth:3,className:"animate-spin"})},stuck:{bg:"var(--color-stuck-bg)",color:"var(--color-stuck)",label:"stuck"},crashed:{bg:"var(--color-crashed-bg)",color:"var(--color-crashed)",label:"crashed",icon:d.jsx(kL,{size:9,strokeWidth:2.5})},idle:{bg:"var(--color-idle-bg)",color:"var(--color-idle)",label:"idle"}}[e];return d.jsxs("span",{className:"nb-status inline-flex items-center gap-1",style:{background:n.bg,color:n.color},children:[n.icon,n.label]})}function tx(e){if(e==null||e<=0)return"—";const t=Math.floor(e/1e3),n=Math.floor(t/3600),r=Math.floor(t%3600/60),a=t%60;return n>0?`${n}h ${r}m`:r>0?`${r}m ${a}s`:`${a}s`}function Fz(e){if(e==null||e<=0)return"text-[var(--color-text-muted)]";const t=e/6e4;return t<10?"text-[var(--color-running)]":t<60?"text-[var(--color-stuck)]":"text-[var(--color-crashed)]"}function nx(e){const t=Date.now()-new Date(e).getTime();return t<6e4?`${Math.floor(t/1e3)}s 前`:t<36e5?`${Math.floor(t/6e4)}m 前`:`${Math.floor(t/36e5)}h 前`}function qz({alerts:e,selected:t,onSelect:n}){const r=Le();return e.length===0?d.jsxs("div",{className:"nb-card bg-[var(--color-running-bg)] flex items-center gap-3",children:[d.jsx(bu,{size:18,strokeWidth:2.5,className:"text-[var(--color-running)]"}),d.jsx("span",{className:"text-sm font-bold text-[var(--color-running)]",children:r("workers.alerts.allHealthy")})]}):d.jsxs("section",{children:[d.jsxs("h2",{className:"font-[family-name:var(--font-heading)] text-sm font-bold uppercase tracking-wider mb-2 flex items-center gap-2 text-[var(--color-crashed)]",children:[d.jsx(OL,{size:14,strokeWidth:2.5}),"Alerts (",e.length,")"]}),d.jsx("div",{className:"flex flex-col gap-2",children:e.map(a=>{const o=(t==null?void 0:t.project)===a.project&&(t==null?void 0:t.slot)===a.slot;return d.jsxs("button",{type:"button",onClick:()=>n(a.project,a.slot),className:["nb-card p-3 text-left",a.state==="crashed"?"bg-[var(--color-crashed-bg)]":"bg-[var(--color-stuck-bg)]",o?"ring-4 ring-[var(--color-text)]":""].join(" "),children:[d.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[d.jsx(ex,{state:a.state}),d.jsxs("span",{className:"font-[family-name:var(--font-mono)] font-bold",children:[a.project,"/worker-",a.slot]}),a.card&&d.jsxs("span",{className:"truncate",children:["#",a.card.seq," ",a.card.title]}),d.jsxs("span",{className:"ml-auto text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] flex items-center gap-1",children:[d.jsx(SN,{size:10,strokeWidth:2.5}),tx(a.runtimeMs)]})]}),a.markerUpdatedAt&&d.jsx("div",{className:"text-xs text-[var(--color-text-muted)] mt-1 font-[family-name:var(--font-mono)]",children:a.state==="crashed"?r("workers.alerts.pidDead"):r("workers.alerts.markerStale",{ago:nx(a.markerUpdatedAt)})})]},`${a.project}-${a.slot}`)})})]})}function Hz({active:e,selected:t,onSelect:n}){const r=Le();return e.length===0?d.jsx("div",{className:"nb-card bg-[var(--color-bg-cream)]",children:d.jsx("p",{className:"text-sm text-[var(--color-text-muted)] italic",children:r("workers.active.empty")})}):d.jsxs("section",{children:[d.jsxs("h2",{className:"font-[family-name:var(--font-heading)] text-sm font-bold uppercase tracking-wider mb-2 flex items-center gap-2",children:[d.jsx(Oh,{size:14,strokeWidth:2.5}),"Active (",e.length,")"]}),d.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:e.map(a=>{const o=(t==null?void 0:t.project)===a.project&&(t==null?void 0:t.slot)===a.slot;return d.jsxs("button",{type:"button",onClick:()=>n(a.project,a.slot),className:["nb-card p-3 text-left",a.state==="starting"?"bg-[var(--color-secondary)]":"bg-[var(--color-running-bg)]",o?"ring-4 ring-[var(--color-text)]":""].join(" "),children:[d.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[d.jsx(ex,{state:a.state}),d.jsxs("span",{className:"font-[family-name:var(--font-mono)] font-bold text-sm flex-1 truncate",children:[a.project,"/worker-",a.slot]}),d.jsx("span",{className:`text-xs font-[family-name:var(--font-mono)] ${Fz(a.runtimeMs)}`,children:tx(a.runtimeMs)})]}),a.card&&d.jsxs("div",{className:"text-sm font-semibold mb-1 truncate",children:["#",a.card.seq," · ",a.card.title]}),d.jsxs("div",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] flex items-center gap-2 mb-1",children:[a.stage&&d.jsxs("span",{children:["stage: ",a.stage]}),a.markerUpdatedAt&&d.jsxs("span",{className:"ml-auto",children:["marker ",nx(a.markerUpdatedAt)]})]}),a.lastLogLine&&d.jsxs("div",{className:"text-[11px] font-[family-name:var(--font-mono)] text-[var(--color-text-muted)] bg-[var(--color-bg)] border-2 border-[var(--color-text)] rounded px-2 py-1 mt-2 truncate",children:[d.jsx(ON,{size:9,strokeWidth:2.5,className:"inline-block mr-1 align-text-bottom"}),a.lastLogLine.msg]})]},`${a.project}-${a.slot}`)})})]})}function Kz({capacity:e,selected:t,onSelect:n}){const r=Le();return e.length===0?null:d.jsxs("section",{className:"flex flex-col min-h-0 flex-1",children:[d.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-sm font-bold uppercase tracking-wider mb-2 shrink-0",children:"Capacity"}),d.jsx("div",{className:"nb-card p-0 overflow-y-auto min-h-0 flex-1",children:d.jsxs("table",{className:"w-full text-sm",children:[d.jsx("thead",{children:d.jsxs("tr",{className:"bg-[var(--color-bg-cream)] border-b-2 border-[var(--color-text)]",children:[d.jsx("th",{className:"px-3 py-2 text-left font-bold text-xs uppercase tracking-wider",children:r("workers.capacity.col.project")}),d.jsx("th",{className:"px-3 py-2 text-left font-bold text-xs uppercase tracking-wider",children:r("workers.capacity.col.usage")}),d.jsx("th",{className:"px-3 py-2 text-right font-bold text-xs uppercase tracking-wider",children:"running"}),d.jsx("th",{className:"px-3 py-2 text-right font-bold text-xs uppercase tracking-wider",children:r("workers.capacity.col.other")}),d.jsx("th",{className:"px-3 py-2"})]})}),d.jsx("tbody",{children:e.map(a=>{const o=a.running+a.starting+a.stuck+a.crashed,l=(t==null?void 0:t.project)===a.project;return d.jsxs("tr",{onClick:()=>n(a.project),className:["border-b border-dashed border-[var(--color-border-light)] last:border-0 cursor-pointer hover:bg-[var(--color-accent-yellow)]",l?"bg-[var(--color-accent-yellow)]":""].join(" "),children:[d.jsx("td",{className:"px-3 py-2 font-[family-name:var(--font-mono)] font-bold",children:a.project}),d.jsx("td",{className:"px-3 py-2",children:d.jsx(Gz,{total:a.total,cap:a})}),d.jsxs("td",{className:"px-3 py-2 text-right font-[family-name:var(--font-mono)]",children:[d.jsx("span",{className:"text-[var(--color-running)] font-bold",children:a.running}),d.jsxs("span",{className:"text-[var(--color-text-muted)]",children:["/",a.total]})]}),d.jsxs("td",{className:"px-3 py-2 text-right text-xs font-[family-name:var(--font-mono)] text-[var(--color-text-muted)]",children:[a.starting>0&&d.jsxs("span",{className:"mr-2",children:["starting ",a.starting]}),a.stuck>0&&d.jsxs("span",{className:"text-[var(--color-stuck)] font-bold mr-2",children:["stuck ",a.stuck]}),a.crashed>0&&d.jsxs("span",{className:"text-[var(--color-crashed)] font-bold mr-2",children:["crashed ",a.crashed]}),o===0&&d.jsx("span",{children:"idle"})]}),d.jsx("td",{className:"px-3 py-2 text-right",children:d.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:r("workers.capacity.detailHint")})})]},a.project)})})]})})]})}function Gz({total:e,cap:t}){const n=[];for(let r=0;r<t.crashed;r++)n.push("crashed");for(let r=0;r<t.stuck;r++)n.push("stuck");for(let r=0;r<t.starting;r++)n.push("starting");for(let r=0;r<t.running;r++)n.push("running");for(let r=0;r<t.idle;r++)n.push("idle");return d.jsxs("div",{className:"flex gap-1 items-center",children:[n.map((r,a)=>d.jsx("span",{className:"inline-block w-3 h-3 rounded-full border-2 border-[var(--color-text)]",style:{background:Vz(r)},title:r},a)),d.jsxs("span",{className:"text-xs text-[var(--color-text-muted)] ml-2 font-[family-name:var(--font-mono)]",children:[e," slot",e!==1?"s":""]})]})}function Vz(e){switch(e){case"running":return"var(--color-running-bg)";case"starting":return"var(--color-secondary)";case"stuck":return"var(--color-stuck-bg)";case"crashed":return"var(--color-crashed-bg)";default:return"var(--color-idle-bg)"}}function Yz({project:e,initialSlot:t,onChange:n}){var h;const r=Le(),a=Ge({queryKey:["workers",e],queryFn:()=>Bz(e),refetchInterval:3e3}),o=((h=a.data)==null?void 0:h.data)??[],[l,u]=A.useState(null);A.useEffect(()=>{if(o.length===0){u(null);return}const g=o[0].slot;u(m=>m!=null&&o.some(y=>y.slot===m)?m:t!=null&&o.some(y=>y.slot===t)?t:g)},[e,t,o.length]);const f=o.find(g=>g.slot===l)??null;return d.jsxs("div",{className:"flex flex-col h-full",children:[d.jsxs("div",{className:"px-4 py-3 border-b-2 border-[var(--color-text)] bg-[var(--color-bg-cream)]",children:[d.jsxs("div",{className:"flex items-center justify-between mb-2",children:[d.jsx("span",{className:"font-[family-name:var(--font-mono)] font-bold truncate",children:e}),d.jsx(ha,{to:`/board?project=${encodeURIComponent(e)}`,className:"text-xs underline text-[var(--color-text-muted)] hover:text-[var(--color-text)]",children:r("workers.panel.boardLink")})]}),a.isLoading&&o.length===0?d.jsx("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:r("workers.panel.loading")}):o.length===0?d.jsx("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:r("workers.panel.empty.slots")}):d.jsx("div",{className:"flex flex-wrap gap-2",children:o.map(g=>d.jsx(Qz,{worker:g,active:g.slot===l,onClick:()=>u(g.slot)},g.slot))})]}),f?d.jsx(Wz,{project:e,worker:f,onChange:n}):d.jsx("div",{className:"flex-1 flex items-center justify-center p-6 text-center",children:d.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:o.length===0?r("workers.panel.empty.noWorker"):r("workers.panel.empty.pickOne")})})]})}function Qz({worker:e,active:t,onClick:n}){const r=Le();return d.jsxs("button",{type:"button",onClick:n,className:["nb-card p-2 text-left min-w-[130px] transition-transform",t?"ring-4 ring-[var(--color-text)]":"opacity-80 hover:opacity-100"].join(" "),children:[d.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[d.jsx(ex,{state:e.state}),d.jsxs("span",{className:"font-[family-name:var(--font-mono)] font-bold text-xs",children:["worker-",e.slot]})]}),e.card?d.jsxs("div",{className:"text-[11px] truncate font-[family-name:var(--font-mono)]",children:["#",e.card.seq," ",e.card.title]}):d.jsx("div",{className:"text-[11px] text-[var(--color-text-muted)] italic",children:r("workers.panel.idle.short")})]})}function Wz({project:e,worker:t,onChange:n}){var y,b;const r=Le(),{confirm:a,alert:o}=jn(),l=t.state==="crashed"||t.state==="stuck",u=Ge({queryKey:["worker-detail",e,t.slot],queryFn:()=>Uz(e,t.slot),refetchInterval:3e3}),f=((y=u.data)==null?void 0:y.recentOutput)??[],h=((b=u.data)==null?void 0:b.recentLogs)??[],g=A.useRef(null),m=A.useRef(!0);return A.useEffect(()=>{const k=g.current;k&&m.current&&(k.scrollTop=k.scrollHeight)},[f]),d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"flex-1 overflow-auto p-4 flex flex-col gap-4",children:[t.card?d.jsxs("div",{children:[d.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-[var(--color-text-muted)] mb-1",children:r("workers.panel.section.currentCard")}),d.jsxs("div",{className:"text-sm font-semibold break-words",children:["#",t.card.seq," · ",t.card.title]})]}):d.jsx("div",{className:"text-sm text-[var(--color-text-muted)] italic",children:r("workers.panel.idle.full")}),d.jsxs("dl",{className:"grid grid-cols-[100px_1fr] gap-y-2 text-sm",children:[d.jsx("dt",{className:"font-bold",children:"Stage"}),d.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.stage??"—"}),d.jsx("dt",{className:"font-bold",children:"PID"}),d.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.pid??"—"}),d.jsx("dt",{className:"font-bold",children:"Runtime"}),d.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:tx(t.runtimeMs)}),d.jsx("dt",{className:"font-bold",children:"Started"}),d.jsx("dd",{className:"font-[family-name:var(--font-mono)] text-xs",children:t.startedAt?new Date(t.startedAt).toLocaleString():"—"}),d.jsx("dt",{className:"font-bold",children:"Marker"}),d.jsx("dd",{className:"font-[family-name:var(--font-mono)] text-xs",children:t.markerUpdatedAt?nx(t.markerUpdatedAt):"—"})]}),d.jsxs("div",{children:[d.jsxs("div",{className:"text-xs font-bold uppercase tracking-wider text-[var(--color-text-muted)] mb-1 flex items-center gap-1",children:[d.jsx(ON,{size:10,strokeWidth:2.5}),r("workers.panel.section.claudeOutput",{n:f.length})]}),u.isLoading&&f.length===0?d.jsx("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:r("workers.panel.output.loading")}):f.length===0?d.jsx("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:r("workers.panel.output.empty")}):d.jsx("pre",{ref:g,onScroll:k=>{const v=k.currentTarget;m.current=v.scrollHeight-v.scrollTop-v.clientHeight<24},className:"text-xs font-[family-name:var(--font-mono)] bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded p-2 max-h-80 overflow-auto whitespace-pre-wrap break-words",children:f.map(k=>`${k.ts?`${k.ts} [${k.kind}] `:`[${k.kind}] `}${k.text}`).join(`
|
|
569
|
+
`)})]}),h.length>0&&d.jsxs("div",{children:[d.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-[var(--color-text-muted)] mb-1 opacity-60",children:r("workers.panel.section.heartbeat",{n:h.length})}),d.jsx("pre",{className:"text-xs font-[family-name:var(--font-mono)] bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded p-2 max-h-40 overflow-auto whitespace-pre-wrap break-words opacity-80",children:h.map(k=>`${k.ts??""} [${k.level}] ${k.msg}`).join(`
|
|
570
|
+
`)}),d.jsx(ha,{to:`/logs?project=${encodeURIComponent(e)}&worker=${t.slot}`,className:"text-xs underline text-[var(--color-running)] mt-1 inline-block",children:r("workers.panel.heartbeat.fullLog")})]})]}),d.jsxs("div",{className:"px-4 py-3 border-t-2 border-[var(--color-text)] bg-[var(--color-bg-cream)] flex gap-2 justify-end flex-wrap",children:[l&&t.card&&d.jsxs("button",{type:"button",className:"nb-btn nb-btn-mint",style:{padding:"4px 10px",fontSize:11},onClick:async()=>{if(await a({title:r("workers.panel.action.restart.confirm.title",{slot:t.slot}),body:r("workers.panel.action.restart.confirm.body",{seq:t.card.seq}),confirm:r("workers.panel.action.restart.confirm.button")})){try{await fk(e,t.slot)}catch{}try{await $z(e,t.slot,t.card.seq),n()}catch(v){o({title:r("workers.panel.action.restart.error"),body:v instanceof Error?v.message:String(v)})}}},children:[d.jsx(jL,{size:11,strokeWidth:2.5})," ",r("workers.panel.action.restart")]}),t.state!=="idle"&&d.jsxs("button",{type:"button",className:"nb-btn nb-btn-danger",style:{padding:"4px 10px",fontSize:11},onClick:async()=>{if(await a({title:r("workers.panel.action.kill.confirm.title",{slot:t.slot}),body:r("workers.panel.action.kill.confirm.body"),confirm:r("workers.panel.action.kill.confirm.button"),danger:!0}))try{await fk(e,t.slot),n()}catch(v){o({title:r("workers.panel.action.kill.error"),body:v instanceof Error?v.message:String(v)})}},children:[d.jsx(UL,{size:11,strokeWidth:2.5})," ",r("workers.panel.action.kill")]})]})]})}function Xz(){var l;const e=Le(),t=an(),[n,r]=A.useState(null),a=Ge({queryKey:["workers-agg"],queryFn:Pz,refetchInterval:5e3});A.useEffect(()=>{if(!a.data)return;const u=a.data.capacity.map(h=>h.project),f=[];for(const h of u){const g=new EventSource(`/stream/projects/${encodeURIComponent(h)}`),m=()=>{t.invalidateQueries({queryKey:["workers-agg"]})};g.addEventListener("worker.updated",m),g.addEventListener("worker.added",m),g.addEventListener("worker.deleted",m),g.addEventListener("card.updated",m),f.push(g)}return()=>{for(const h of f)h.close()}},[(l=a.data)==null?void 0:l.capacity.map(u=>u.project).join(","),t]);const o=A.useMemo(()=>{if(!a.data)return{projects:0,running:0,starting:0,stuck:0,crashed:0,idle:0};const u={projects:a.data.capacity.length,running:0,starting:0,stuck:0,crashed:0,idle:0};for(const f of a.data.capacity)u.running+=f.running,u.starting+=f.starting,u.stuck+=f.stuck,u.crashed+=f.crashed,u.idle+=f.idle;return u},[a.data]);return d.jsxs("div",{className:"flex flex-col gap-4 h-[calc(100vh-140px)]",children:[d.jsxs("header",{className:"flex items-center justify-between flex-wrap gap-3",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold tracking-tight",children:e("workers.title")}),d.jsx("p",{className:"text-sm text-[var(--color-text-muted)] mt-1",children:e("workers.summary",{projects:o.projects,running:o.running,starting:o.starting,stuck:o.stuck,crashed:o.crashed,idle:o.idle})})]}),d.jsxs("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>a.refetch(),disabled:a.isFetching,type:"button","aria-label":e("workers.refresh.aria"),children:[a.isFetching?d.jsx(nt,{size:12,strokeWidth:3,className:"animate-spin"}):d.jsx(gs,{size:12,strokeWidth:2.5}),e("workers.refresh")]})]}),d.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-4 flex-1 min-h-0",children:[d.jsxs("div",{className:"flex flex-col gap-4 min-h-0 pr-2",children:[a.isLoading&&d.jsx("p",{className:"text-[var(--color-text-muted)] italic",children:e("common.loading")}),a.isError&&d.jsx("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:d.jsx("p",{children:e("workers.error.load",{detail:a.error instanceof Error?a.error.message:String(a.error)})})}),a.data&&d.jsxs(d.Fragment,{children:[d.jsx(qz,{alerts:a.data.alerts,selected:n,onSelect:(u,f)=>r({project:u,slot:f})}),d.jsx(Hz,{active:a.data.active,selected:n,onSelect:(u,f)=>r({project:u,slot:f})}),d.jsx(Kz,{capacity:a.data.capacity,selected:n,onSelect:u=>r({project:u})})]})]}),d.jsx("aside",{className:"nb-card p-0 overflow-hidden flex flex-col h-full",children:n?d.jsx(Yz,{project:n.project,initialSlot:n.slot,onChange:()=>t.invalidateQueries({queryKey:["workers-agg"]})}):d.jsx("div",{className:"flex-1 flex items-center justify-center p-6 text-center",children:d.jsxs("div",{children:[d.jsx(Oh,{size:32,className:"mx-auto mb-3 text-[var(--color-text-subtle)]",strokeWidth:2}),d.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:e("workers.empty.hint")})]})})})]})]})}function Zz(e){const t=new URLSearchParams;return e.project&&t.set("project",e.project),e.worker&&t.set("worker",e.worker),t.set("limit",String(e.limit)),e.since&&t.set("since",e.since),ht(`/api/logs?${t}`)}function Jz(e){const t=new URLSearchParams({project:e.project});return e.worker&&t.set("worker",e.worker),`/stream/logs?${t}`}const e4=["error","warn","info","debug"],t4=["error","warn","info"];function n4(){var F,$;const e=Le(),[t,n]=vN(),r=t.get("project"),a=t.get("worker")??"",[o,l]=A.useState([]),[u,f]=A.useState(!1),[h,g]=A.useState(!0),[m,y]=A.useState(()=>new Set(t4)),[b,k]=A.useState(""),[v,S]=A.useState("live"),[E,C]=A.useState(()=>{const U=new Date(Date.now()-36e5),K=Q=>String(Q).padStart(2,"0");return`${U.getFullYear()}-${K(U.getMonth()+1)}-${K(U.getDate())}T${K(U.getHours())}:${K(U.getMinutes())}`}),N=A.useRef(null),_=!r,D=Ge({queryKey:["projects"],queryFn:ga}),{data:T,refetch:M}=Ge({queryKey:["logs",r??"agg",a,v,v==="history"?E:"live"],queryFn:()=>Zz({project:r||void 0,worker:a||void 0,limit:v==="history"?2e3:500,since:v==="history"?new Date(E).toISOString():void 0}),refetchInterval:_&&v==="live"?5e3:!1});A.useEffect(()=>{T!=null&&T.data&&l(T.data)},[T]),A.useEffect(()=>{if(!r||v!=="live")return;const U=Jz({project:r,worker:a||void 0}),K=new EventSource(U);return K.addEventListener("log.line",Q=>{if(!u)try{const B=JSON.parse(Q.data);l(H=>{const z=[...H,B];return z.length>5e3&&z.splice(0,z.length-5e3),z})}catch{}}),()=>K.close()},[r,a,u,v]),A.useEffect(()=>{if(!h)return;const U=N.current;U&&(U.scrollTop=U.scrollHeight)},[o,h]);const I=A.useMemo(()=>{const U=b.toLowerCase();return o.filter(K=>!(!m.has(K.level)||U&&!K.msg.toLowerCase().includes(U)))},[o,m,b]);return d.jsxs("div",{className:"flex flex-col gap-4 max-w-full",children:[d.jsx("header",{className:"flex items-center justify-between gap-3 flex-wrap",children:d.jsxs("div",{children:[d.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold tracking-tight",children:e("logs.title")}),d.jsxs("p",{className:"text-sm text-[var(--color-text-muted)] mt-1",children:[_?e("logs.subtitle.allProjectsCount",{count:((F=D.data)==null?void 0:F.data.length)??0}):r,a&&` · worker-${a}`," · ",_&&v==="live"?e("logs.poll.5s"):"tail -f"," · ",o.length," lines",u&&d.jsx("span",{className:"text-[var(--color-stuck)] ml-2 font-bold",children:e("logs.paused")})]})]})}),d.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[d.jsxs("div",{className:"flex gap-1 p-1 bg-[var(--color-bg)] border-[2px] border-[var(--color-text)] rounded-full shadow-[2px_2px_0_var(--color-text)]",children:[d.jsxs("button",{type:"button",onClick:()=>S("live"),"aria-pressed":v==="live",className:["px-3 py-1 rounded-full text-xs font-bold flex items-center gap-1.5",v==="live"?"bg-[var(--color-primary)] text-[var(--color-text)] shadow-[1px_1px_0_var(--color-text)]":"text-[var(--color-text-muted)]"].join(" "),children:[d.jsx(AN,{size:11,strokeWidth:2.5}),e("logs.mode.live")]}),d.jsxs("button",{type:"button",onClick:()=>S("history"),"aria-pressed":v==="history",className:["px-3 py-1 rounded-full text-xs font-bold flex items-center gap-1.5",v==="history"?"bg-[var(--color-primary)] text-[var(--color-text)] shadow-[1px_1px_0_var(--color-text)]":"text-[var(--color-text-muted)]"].join(" "),children:[d.jsx(PR,{size:11,strokeWidth:2.5}),e("logs.mode.history")]})]}),v==="history"&&d.jsxs(d.Fragment,{children:[d.jsx("input",{type:"datetime-local",className:"nb-input",style:{padding:"4px 8px",fontSize:12},value:E,onChange:U=>C(U.target.value),"aria-label":e("logs.history.startAria")}),d.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"6px 12px",fontSize:12},onClick:()=>M(),type:"button","aria-label":e("logs.history.queryAria"),children:[d.jsx(Ol,{size:11,strokeWidth:3}),e("logs.history.query")]})]}),d.jsxs("div",{className:"relative",children:[d.jsx(xu,{size:14,strokeWidth:2.5,className:"absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none text-[var(--color-text)]"}),d.jsxs("select",{className:"nb-input appearance-none pl-9 pr-9 font-[family-name:var(--font-mono)] cursor-pointer",style:{padding:"10px 36px 10px 36px",fontSize:13,minWidth:180},value:r??"",onChange:U=>{const K=U.target.value;n(K?{project:K}:{})},"aria-label":e("logs.filter.project.aria"),children:[d.jsx("option",{value:"",children:e("logs.filter.project.all")}),Lb((($=D.data)==null?void 0:$.data)??[],"activity").map(U=>d.jsx("option",{value:U.name,children:U.name},U.name))]}),d.jsx(Vl,{size:14,strokeWidth:3,className:"absolute right-3 top-1/2 -translate-y-1/2 pointer-events-none text-[var(--color-text)]"})]}),d.jsxs("div",{className:"relative flex-1 max-w-md",children:[d.jsx(Ol,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-[var(--color-text-subtle)]"}),d.jsx("input",{className:"nb-input pl-9 w-full",placeholder:e("logs.filter.keyword.placeholder"),value:b,onChange:U=>k(U.target.value),"aria-label":e("logs.filter.keyword.aria")})]}),d.jsx("div",{className:"flex items-center gap-1 p-1 bg-[var(--color-bg)] border-[2px] border-[var(--color-text)] rounded-full shadow-[2px_2px_0_var(--color-text)]",children:e4.map(U=>d.jsx(r4,{level:U,enabled:m.has(U),onToggle:()=>{y(K=>{const Q=new Set(K);return Q.has(U)?Q.delete(U):Q.add(U),Q})}},U))}),d.jsxs("div",{className:"ml-auto flex gap-2",children:[v==="live"&&d.jsxs(d.Fragment,{children:[d.jsx("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>g(U=>!U),type:"button",children:h?"✓ Auto-scroll":"Auto-scroll"}),d.jsx("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>f(U=>!U),type:"button",children:u?d.jsxs(d.Fragment,{children:[d.jsx(Hu,{size:12,strokeWidth:3})," Resume"]}):d.jsxs(d.Fragment,{children:[d.jsx(tL,{size:12,strokeWidth:3})," Pause"]})})]}),d.jsxs("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>{const U=new Blob([I.map(B=>B.raw).join(`
|
|
571
|
+
`)],{type:"text/plain"}),K=URL.createObjectURL(U),Q=document.createElement("a");Q.href=K,Q.download=`${r}-log-${Date.now()}.log`,Q.click(),URL.revokeObjectURL(K)},type:"button",children:[d.jsx(jb,{size:12,strokeWidth:2.5})," Export"]})]})]}),d.jsxs("div",{className:"nb-card p-0 overflow-hidden",children:[d.jsxs("div",{className:"px-4 py-2 bg-[var(--color-bg-cream)] border-b-2 border-[var(--color-text)] flex items-center justify-between font-[family-name:var(--font-mono)] text-xs",children:[d.jsx("span",{className:"text-[var(--color-text-muted)]",children:(T==null?void 0:T.file)??"~/.coral/projects/.../logs/*.log"}),v==="live"?d.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)"},children:"live"}):d.jsx("span",{className:"nb-status",style:{background:"var(--color-accent-purple)",color:"var(--color-text)"},children:"history"})]}),d.jsxs("div",{ref:N,className:"overflow-auto font-[family-name:var(--font-mono)] text-[12px] leading-[22px] max-h-[70vh] bg-[var(--color-bg)] p-2",onScroll:U=>{const K=U.currentTarget;!(K.scrollHeight-K.scrollTop-K.clientHeight<40)&&h&&g(!1)},children:[I.map((U,K)=>d.jsx(i4,{line:U},K)),I.length===0&&d.jsx("div",{className:"text-center py-12 text-[var(--color-text-subtle)]",children:e("logs.empty.match")})]})]})]})}function r4({level:e,enabled:t,onToggle:n}){const r={error:"var(--color-crashed-bg)",warn:"var(--color-stuck-bg)",info:"var(--color-secondary)",debug:"var(--color-accent-purple)"},a={error:"var(--color-crashed)",warn:"var(--color-stuck)",info:"var(--color-text)",debug:"var(--color-text)"};return d.jsx("button",{type:"button",onClick:n,"aria-pressed":t,className:["px-3 py-0.5 rounded-full font-[family-name:var(--font-mono)] text-[10px] font-bold tracking-widest cursor-pointer",t?"border-[1.5px] border-[var(--color-text)]":"text-[var(--color-text-subtle)]"].join(" "),style:t?{background:r[e],color:a[e]}:{},children:e.toUpperCase()})}function i4({line:e}){var r;const t={error:"bg-[var(--color-crashed)] text-[var(--color-text)]",warn:"bg-[var(--color-stuck)] text-[var(--color-text)]",info:"bg-[var(--color-secondary)] text-[var(--color-text)]",debug:"",trace:""},n=!!e.project;return d.jsxs("div",{className:["grid gap-2 px-2 py-0.5 rounded hover:bg-[var(--color-bg-cream)]",n?"grid-cols-[100px_90px_60px_1fr]":"grid-cols-[100px_60px_1fr]"].join(" "),children:[d.jsx("span",{className:"text-[var(--color-text-subtle)] whitespace-nowrap",children:e.ts?((r=e.ts.split("T")[1])==null?void 0:r.replace("Z",""))??e.ts:"--"}),n&&d.jsx("span",{className:"truncate text-[var(--color-text-muted)] font-bold",title:e.project,children:e.project}),d.jsx("span",{className:`text-center font-bold ${t[e.level]??""}`,style:{borderRadius:4,padding:"0 6px"},children:e.level.toUpperCase()}),d.jsx("span",{className:"truncate text-[var(--color-text)]",children:e.msg})]})}function a4(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const s4=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,o4=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,l4={};function hk(e,t){return(l4.jsx?o4:s4).test(e)}const c4=/[ \t\n\f\r]/g;function u4(e){return typeof e=="object"?e.type==="text"?pk(e.value):!1:pk(e)}function pk(e){return e.replace(c4,"")===""}class Yu{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Yu.prototype.normal={};Yu.prototype.property={};Yu.prototype.space=void 0;function Q_(e,t){const n={},r={};for(const a of e)Object.assign(n,a.property),Object.assign(r,a.normal);return new Yu(n,r,t)}function $y(e){return e.toLowerCase()}class fr{constructor(t,n){this.attribute=n,this.property=t}}fr.prototype.attribute="";fr.prototype.booleanish=!1;fr.prototype.boolean=!1;fr.prototype.commaOrSpaceSeparated=!1;fr.prototype.commaSeparated=!1;fr.prototype.defined=!1;fr.prototype.mustUseProperty=!1;fr.prototype.number=!1;fr.prototype.overloadedBoolean=!1;fr.prototype.property="";fr.prototype.spaceSeparated=!1;fr.prototype.space=void 0;let d4=0;const et=yo(),gn=yo(),Fy=yo(),Ee=yo(),Pt=yo(),bl=yo(),wr=yo();function yo(){return 2**++d4}const qy=Object.freeze(Object.defineProperty({__proto__:null,boolean:et,booleanish:gn,commaOrSpaceSeparated:wr,commaSeparated:bl,number:Ee,overloadedBoolean:Fy,spaceSeparated:Pt},Symbol.toStringTag,{value:"Module"})),Mg=Object.keys(qy);class rx extends fr{constructor(t,n,r,a){let o=-1;if(super(t,n),mk(this,"space",a),typeof r=="number")for(;++o<Mg.length;){const l=Mg[o];mk(this,Mg[o],(r&qy[l])===qy[l])}}}rx.prototype.defined=!0;function mk(e,t,n){n&&(e[t]=n)}function nc(e){const t={},n={};for(const[r,a]of Object.entries(e.properties)){const o=new rx(r,e.transform(e.attributes||{},r),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[$y(r)]=r,n[$y(o.attribute)]=r}return new Yu(t,n,e.space)}const W_=nc({properties:{ariaActiveDescendant:null,ariaAtomic:gn,ariaAutoComplete:null,ariaBusy:gn,ariaChecked:gn,ariaColCount:Ee,ariaColIndex:Ee,ariaColSpan:Ee,ariaControls:Pt,ariaCurrent:null,ariaDescribedBy:Pt,ariaDetails:null,ariaDisabled:gn,ariaDropEffect:Pt,ariaErrorMessage:null,ariaExpanded:gn,ariaFlowTo:Pt,ariaGrabbed:gn,ariaHasPopup:null,ariaHidden:gn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Pt,ariaLevel:Ee,ariaLive:null,ariaModal:gn,ariaMultiLine:gn,ariaMultiSelectable:gn,ariaOrientation:null,ariaOwns:Pt,ariaPlaceholder:null,ariaPosInSet:Ee,ariaPressed:gn,ariaReadOnly:gn,ariaRelevant:null,ariaRequired:gn,ariaRoleDescription:Pt,ariaRowCount:Ee,ariaRowIndex:Ee,ariaRowSpan:Ee,ariaSelected:gn,ariaSetSize:Ee,ariaSort:null,ariaValueMax:Ee,ariaValueMin:Ee,ariaValueNow:Ee,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function X_(e,t){return t in e?e[t]:t}function Z_(e,t){return X_(e,t.toLowerCase())}const f4=nc({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:bl,acceptCharset:Pt,accessKey:Pt,action:null,allow:null,allowFullScreen:et,allowPaymentRequest:et,allowUserMedia:et,alt:null,as:null,async:et,autoCapitalize:null,autoComplete:Pt,autoFocus:et,autoPlay:et,blocking:Pt,capture:null,charSet:null,checked:et,cite:null,className:Pt,cols:Ee,colSpan:null,content:null,contentEditable:gn,controls:et,controlsList:Pt,coords:Ee|bl,crossOrigin:null,data:null,dateTime:null,decoding:null,default:et,defer:et,dir:null,dirName:null,disabled:et,download:Fy,draggable:gn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:et,formTarget:null,headers:Pt,height:Ee,hidden:Fy,high:Ee,href:null,hrefLang:null,htmlFor:Pt,httpEquiv:Pt,id:null,imageSizes:null,imageSrcSet:null,inert:et,inputMode:null,integrity:null,is:null,isMap:et,itemId:null,itemProp:Pt,itemRef:Pt,itemScope:et,itemType:Pt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:et,low:Ee,manifest:null,max:null,maxLength:Ee,media:null,method:null,min:null,minLength:Ee,multiple:et,muted:et,name:null,nonce:null,noModule:et,noValidate:et,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:et,optimum:Ee,pattern:null,ping:Pt,placeholder:null,playsInline:et,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:et,referrerPolicy:null,rel:Pt,required:et,reversed:et,rows:Ee,rowSpan:Ee,sandbox:Pt,scope:null,scoped:et,seamless:et,selected:et,shadowRootClonable:et,shadowRootDelegatesFocus:et,shadowRootMode:null,shape:null,size:Ee,sizes:null,slot:null,span:Ee,spellCheck:gn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Ee,step:null,style:null,tabIndex:Ee,target:null,title:null,translate:null,type:null,typeMustMatch:et,useMap:null,value:gn,width:Ee,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Pt,axis:null,background:null,bgColor:null,border:Ee,borderColor:null,bottomMargin:Ee,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:et,declare:et,event:null,face:null,frame:null,frameBorder:null,hSpace:Ee,leftMargin:Ee,link:null,longDesc:null,lowSrc:null,marginHeight:Ee,marginWidth:Ee,noResize:et,noHref:et,noShade:et,noWrap:et,object:null,profile:null,prompt:null,rev:null,rightMargin:Ee,rules:null,scheme:null,scrolling:gn,standby:null,summary:null,text:null,topMargin:Ee,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Ee,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:et,disableRemotePlayback:et,prefix:null,property:null,results:Ee,security:null,unselectable:null},space:"html",transform:Z_}),h4=nc({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:wr,accentHeight:Ee,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Ee,amplitude:Ee,arabicForm:null,ascent:Ee,attributeName:null,attributeType:null,azimuth:Ee,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Ee,by:null,calcMode:null,capHeight:Ee,className:Pt,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:Ee,diffuseConstant:Ee,direction:null,display:null,dur:null,divisor:Ee,dominantBaseline:null,download:et,dx:null,dy:null,edgeMode:null,editable:null,elevation:Ee,enableBackground:null,end:null,event:null,exponent:Ee,externalResourcesRequired:null,fill:null,fillOpacity:Ee,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:bl,g2:bl,glyphName:bl,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Ee,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Ee,horizOriginX:Ee,horizOriginY:Ee,id:null,ideographic:Ee,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Ee,k:Ee,k1:Ee,k2:Ee,k3:Ee,k4:Ee,kernelMatrix:wr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Ee,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Ee,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:Ee,overlineThickness:Ee,paintOrder:null,panose1:null,path:null,pathLength:Ee,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Pt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Ee,pointsAtY:Ee,pointsAtZ:Ee,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:wr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:wr,rev:wr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:wr,requiredFeatures:wr,requiredFonts:wr,requiredFormats:wr,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:Ee,specularExponent:Ee,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Ee,strikethroughThickness:Ee,string:null,stroke:null,strokeDashArray:wr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Ee,strokeOpacity:Ee,strokeWidth:null,style:null,surfaceScale:Ee,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:wr,tabIndex:Ee,tableValues:null,target:null,targetX:Ee,targetY:Ee,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:wr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Ee,underlineThickness:Ee,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Ee,values:null,vAlphabetic:Ee,vMathematical:Ee,vectorEffect:null,vHanging:Ee,vIdeographic:Ee,version:null,vertAdvY:Ee,vertOriginX:Ee,vertOriginY:Ee,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Ee,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:X_}),J_=nc({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),e2=nc({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Z_}),t2=nc({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),p4={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"},m4=/[A-Z]/g,gk=/-[a-z]/g,g4=/^data[-\w.:]+$/i;function y4(e,t){const n=$y(t);let r=t,a=fr;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&g4.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(gk,x4);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!gk.test(o)){let l=o.replace(m4,b4);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}a=rx}return new a(r,t)}function b4(e){return"-"+e.toLowerCase()}function x4(e){return e.charAt(1).toUpperCase()}const v4=Q_([W_,f4,J_,e2,t2],"html"),ix=Q_([W_,h4,J_,e2,t2],"svg");function w4(e){return e.join(" ").trim()}var rl={},Dg,yk;function k4(){if(yk)return Dg;yk=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,u=/^\s+|\s+$/g,f=`
|
|
572
|
+
`,h="/",g="*",m="",y="comment",b="declaration";function k(S,E){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];E=E||{};var C=1,N=1;function _(B){var H=B.match(t);H&&(C+=H.length);var z=B.lastIndexOf(f);N=~z?B.length-z:N+B.length}function D(){var B={line:C,column:N};return function(H){return H.position=new T(B),F(),H}}function T(B){this.start=B,this.end={line:C,column:N},this.source=E.source}T.prototype.content=S;function M(B){var H=new Error(E.source+":"+C+":"+N+": "+B);if(H.reason=B,H.filename=E.source,H.line=C,H.column=N,H.source=S,!E.silent)throw H}function I(B){var H=B.exec(S);if(H){var z=H[0];return _(z),S=S.slice(z.length),H}}function F(){I(n)}function $(B){var H;for(B=B||[];H=U();)H!==!1&&B.push(H);return B}function U(){var B=D();if(!(h!=S.charAt(0)||g!=S.charAt(1))){for(var H=2;m!=S.charAt(H)&&(g!=S.charAt(H)||h!=S.charAt(H+1));)++H;if(H+=2,m===S.charAt(H-1))return M("End of comment missing");var z=S.slice(2,H-2);return N+=2,_(z),S=S.slice(H),N+=2,B({type:y,comment:z})}}function K(){var B=D(),H=I(r);if(H){if(U(),!I(a))return M("property missing ':'");var z=I(o),Y=B({type:b,property:v(H[0].replace(e,m)),value:z?v(z[0].replace(e,m)):m});return I(l),Y}}function Q(){var B=[];$(B);for(var H;H=K();)H!==!1&&(B.push(H),$(B));return B}return F(),Q()}function v(S){return S?S.replace(u,m):m}return Dg=k,Dg}var bk;function E4(){if(bk)return rl;bk=1;var e=rl&&rl.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(rl,"__esModule",{value:!0}),rl.default=n;const t=e(k4());function n(r,a){let o=null;if(!r||typeof r!="string")return o;const l=(0,t.default)(r),u=typeof a=="function";return l.forEach(f=>{if(f.type!=="declaration")return;const{property:h,value:g}=f;u?a(h,g,f):g&&(o=o||{},o[h]=g)}),o}return rl}var Xc={},xk;function S4(){if(xk)return Xc;xk=1,Object.defineProperty(Xc,"__esModule",{value:!0}),Xc.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(h){return!h||n.test(h)||e.test(h)},l=function(h,g){return g.toUpperCase()},u=function(h,g){return"".concat(g,"-")},f=function(h,g){return g===void 0&&(g={}),o(h)?h:(h=h.toLowerCase(),g.reactCompat?h=h.replace(a,u):h=h.replace(r,u),h.replace(t,l))};return Xc.camelCase=f,Xc}var Zc,vk;function N4(){if(vk)return Zc;vk=1;var e=Zc&&Zc.__importDefault||function(a){return a&&a.__esModule?a:{default:a}},t=e(E4()),n=S4();function r(a,o){var l={};return!a||typeof a!="string"||(0,t.default)(a,function(u,f){u&&f&&(l[(0,n.camelCase)(u,o)]=f)}),l}return r.default=r,Zc=r,Zc}var _4=N4();const C4=Bu(_4),n2=r2("end"),ax=r2("start");function r2(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function j4(e){const t=ax(e),n=n2(e);if(t&&n)return{start:t,end:n}}function cu(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?wk(e.position):"start"in e||"end"in e?wk(e):"line"in e||"column"in e?Hy(e):""}function Hy(e){return kk(e&&e.line)+":"+kk(e&&e.column)}function wk(e){return Hy(e&&e.start)+"-"+Hy(e&&e.end)}function kk(e){return e&&typeof e=="number"?e:1}class Hn extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let a="",o={},l=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?a=t:!o.cause&&t&&(l=!0,a=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const f=r.indexOf(":");f===-1?o.ruleId=r:(o.source=r.slice(0,f),o.ruleId=r.slice(f+1))}if(!o.place&&o.ancestors&&o.ancestors){const f=o.ancestors[o.ancestors.length-1];f&&(o.place=f.position)}const u=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=u?u.column:void 0,this.fatal=void 0,this.file="",this.message=a,this.line=u?u.line:void 0,this.name=cu(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=l&&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}}Hn.prototype.file="";Hn.prototype.name="";Hn.prototype.reason="";Hn.prototype.message="";Hn.prototype.stack="";Hn.prototype.column=void 0;Hn.prototype.line=void 0;Hn.prototype.ancestors=void 0;Hn.prototype.cause=void 0;Hn.prototype.fatal=void 0;Hn.prototype.place=void 0;Hn.prototype.ruleId=void 0;Hn.prototype.source=void 0;const sx={}.hasOwnProperty,A4=new Map,T4=/[A-Z]/g,M4=new Set(["table","tbody","thead","tfoot","tr"]),D4=new Set(["td","th"]),i2="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function O4(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=$4(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=U4(n,t.jsx,t.jsxs)}const a={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?ix:v4,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=a2(a,e,void 0);return o&&typeof o!="string"?o:a.create(e,a.Fragment,{children:o||void 0},void 0)}function a2(e,t,n){if(t.type==="element")return R4(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return L4(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return z4(e,t,n);if(t.type==="mdxjsEsm")return I4(e,t);if(t.type==="root")return P4(e,t,n);if(t.type==="text")return B4(e,t)}function R4(e,t,n){const r=e.schema;let a=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(a=ix,e.schema=a),e.ancestors.push(t);const o=o2(e,t.tagName,!1),l=F4(e,t);let u=lx(e,t);return M4.has(t.tagName)&&(u=u.filter(function(f){return typeof f=="string"?!u4(f):!0})),s2(e,l,o,t),ox(l,u),e.ancestors.pop(),e.schema=r,e.create(t,o,l,n)}function L4(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Eu(e,t.position)}function I4(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Eu(e,t.position)}function z4(e,t,n){const r=e.schema;let a=r;t.name==="svg"&&r.space==="html"&&(a=ix,e.schema=a),e.ancestors.push(t);const o=t.name===null?e.Fragment:o2(e,t.name,!0),l=q4(e,t),u=lx(e,t);return s2(e,l,o,t),ox(l,u),e.ancestors.pop(),e.schema=r,e.create(t,o,l,n)}function P4(e,t,n){const r={};return ox(r,lx(e,t)),e.create(t,e.Fragment,r,n)}function B4(e,t){return t.value}function s2(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function ox(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function U4(e,t,n){return r;function r(a,o,l,u){const h=Array.isArray(l.children)?n:t;return u?h(o,l,u):h(o,l)}}function $4(e,t){return n;function n(r,a,o,l){const u=Array.isArray(o.children),f=ax(r);return t(a,o,l,u,{columnNumber:f?f.column-1:void 0,fileName:e,lineNumber:f?f.line:void 0},void 0)}}function F4(e,t){const n={};let r,a;for(a in t.properties)if(a!=="children"&&sx.call(t.properties,a)){const o=H4(e,a,t.properties[a]);if(o){const[l,u]=o;e.tableCellAlignToStyle&&l==="align"&&typeof u=="string"&&D4.has(t.tagName)?r=u:n[l]=u}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function q4(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const l=o.expression;l.type;const u=l.properties[0];u.type,Object.assign(n,e.evaluater.evaluateExpression(u.argument))}else Eu(e,t.position);else{const a=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const u=r.value.data.estree.body[0];u.type,o=e.evaluater.evaluateExpression(u.expression)}else Eu(e,t.position);else o=r.value===null?!0:r.value;n[a]=o}return n}function lx(e,t){const n=[];let r=-1;const a=e.passKeys?new Map:A4;for(;++r<t.children.length;){const o=t.children[r];let l;if(e.passKeys){const f=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(f){const h=a.get(f)||0;l=f+"-"+h,a.set(f,h+1)}}const u=a2(e,o,l);u!==void 0&&n.push(u)}return n}function H4(e,t,n){const r=y4(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?a4(n):w4(n)),r.property==="style"){let a=typeof n=="object"?n:K4(e,String(n));return e.stylePropertyNameCase==="css"&&(a=G4(a)),["style",a]}return[e.elementAttributeNameCase==="react"&&r.space?p4[r.property]||r.property:r.attribute,n]}}function K4(e,t){try{return C4(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,a=new Hn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw a.file=e.filePath||void 0,a.url=i2+"#cannot-parse-style-attribute",a}}function o2(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const a=t.split(".");let o=-1,l;for(;++o<a.length;){const u=hk(a[o])?{type:"Identifier",name:a[o]}:{type:"Literal",value:a[o]};l=l?{type:"MemberExpression",object:l,property:u,computed:!!(o&&u.type==="Literal"),optional:!1}:u}r=l}else r=hk(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const a=r.value;return sx.call(e.components,a)?e.components[a]:a}if(e.evaluater)return e.evaluater.evaluateExpression(r);Eu(e)}function Eu(e,t){const n=new Hn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=i2+"#cannot-handle-mdx-estrees-without-createevaluater",n}function G4(e){const t={};let n;for(n in e)sx.call(e,n)&&(t[V4(n)]=e[n]);return t}function V4(e){let t=e.replace(T4,Y4);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Y4(e){return"-"+e.toLowerCase()}const Og={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"]},Q4={};function cx(e,t){const n=Q4,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,a=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return l2(e,r,a)}function l2(e,t,n){if(W4(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Ek(e.children,t,n)}return Array.isArray(e)?Ek(e,t,n):""}function Ek(e,t,n){const r=[];let a=-1;for(;++a<e.length;)r[a]=l2(e[a],t,n);return r.join("")}function W4(e){return!!(e&&typeof e=="object")}const Sk=document.createElement("i");function ux(e){const t="&"+e+";";Sk.innerHTML=t;const n=Sk.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Nr(e,t,n,r){const a=e.length;let o=0,l;if(t<0?t=-t>a?0:a+t:t=t>a?a:t,n=n>0?n:0,r.length<1e4)l=Array.from(r),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);o<r.length;)l=r.slice(o,o+1e4),l.unshift(t,0),e.splice(...l),o+=1e4,t+=1e4}function qr(e,t){return e.length>0?(Nr(e,e.length,0,t),e):t}const Nk={}.hasOwnProperty;function c2(e){const t={};let n=-1;for(;++n<e.length;)X4(t,e[n]);return t}function X4(e,t){let n;for(n in t){const a=(Nk.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let l;if(o)for(l in o){Nk.call(a,l)||(a[l]=[]);const u=o[l];Z4(a[l],Array.isArray(u)?u:u?[u]:[])}}}function Z4(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Nr(e,0,0,r)}function u2(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function di(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Zn=ws(/[A-Za-z]/),Fn=ws(/[\dA-Za-z]/),J4=ws(/[#-'*+\--9=?A-Z^-~]/);function fh(e){return e!==null&&(e<32||e===127)}const Ky=ws(/\d/),eP=ws(/[\dA-Fa-f]/),tP=ws(/[!-/:-@[-`{-~]/);function $e(e){return e!==null&&e<-2}function Lt(e){return e!==null&&(e<0||e===32)}function at(e){return e===-2||e===-1||e===32}const Vh=ws(new RegExp("\\p{P}|\\p{S}","u")),lo=ws(/\s/);function ws(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function rc(e){const t=[];let n=-1,r=0,a=0;for(;++n<e.length;){const o=e.charCodeAt(n);let l="";if(o===37&&Fn(e.charCodeAt(n+1))&&Fn(e.charCodeAt(n+2)))a=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(l=String.fromCharCode(o));else if(o>55295&&o<57344){const u=e.charCodeAt(n+1);o<56320&&u>56319&&u<57344?(l=String.fromCharCode(o,u),a=1):l="�"}else l=String.fromCharCode(o);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+a+1,l=""),a&&(n+=a,a=0)}return t.join("")+e.slice(r)}function pt(e,t,n,r){const a=r?r-1:Number.POSITIVE_INFINITY;let o=0;return l;function l(f){return at(f)?(e.enter(n),u(f)):t(f)}function u(f){return at(f)&&o++<a?(e.consume(f),u):(e.exit(n),t(f))}}const nP={tokenize:rP};function rP(e){const t=e.attempt(this.parser.constructs.contentInitial,r,a);let n;return t;function r(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),pt(e,t,"linePrefix")}function a(u){return e.enter("paragraph"),o(u)}function o(u){const f=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=f),n=f,l(u)}function l(u){if(u===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(u);return}return $e(u)?(e.consume(u),e.exit("chunkText"),o):(e.consume(u),l)}}const iP={tokenize:aP},_k={tokenize:sP};function aP(e){const t=this,n=[];let r=0,a,o,l;return u;function u(N){if(r<n.length){const _=n[r];return t.containerState=_[1],e.attempt(_[0].continuation,f,h)(N)}return h(N)}function f(N){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,a&&C();const _=t.events.length;let D=_,T;for(;D--;)if(t.events[D][0]==="exit"&&t.events[D][1].type==="chunkFlow"){T=t.events[D][1].end;break}E(r);let M=_;for(;M<t.events.length;)t.events[M][1].end={...T},M++;return Nr(t.events,D+1,0,t.events.slice(_)),t.events.length=M,h(N)}return u(N)}function h(N){if(r===n.length){if(!a)return y(N);if(a.currentConstruct&&a.currentConstruct.concrete)return k(N);t.interrupt=!!(a.currentConstruct&&!a._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(_k,g,m)(N)}function g(N){return a&&C(),E(r),y(N)}function m(N){return t.parser.lazy[t.now().line]=r!==n.length,l=t.now().offset,k(N)}function y(N){return t.containerState={},e.attempt(_k,b,k)(N)}function b(N){return r++,n.push([t.currentConstruct,t.containerState]),y(N)}function k(N){if(N===null){a&&C(),E(0),e.consume(N);return}return a=a||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:a,contentType:"flow",previous:o}),v(N)}function v(N){if(N===null){S(e.exit("chunkFlow"),!0),E(0),e.consume(N);return}return $e(N)?(e.consume(N),S(e.exit("chunkFlow")),r=0,t.interrupt=void 0,u):(e.consume(N),v)}function S(N,_){const D=t.sliceStream(N);if(_&&D.push(null),N.previous=o,o&&(o.next=N),o=N,a.defineSkip(N.start),a.write(D),t.parser.lazy[N.start.line]){let T=a.events.length;for(;T--;)if(a.events[T][1].start.offset<l&&(!a.events[T][1].end||a.events[T][1].end.offset>l))return;const M=t.events.length;let I=M,F,$;for(;I--;)if(t.events[I][0]==="exit"&&t.events[I][1].type==="chunkFlow"){if(F){$=t.events[I][1].end;break}F=!0}for(E(r),T=M;T<t.events.length;)t.events[T][1].end={...$},T++;Nr(t.events,I+1,0,t.events.slice(M)),t.events.length=T}}function E(N){let _=n.length;for(;_-- >N;){const D=n[_];t.containerState=D[1],D[0].exit.call(t,e)}n.length=N}function C(){a.write([null]),o=void 0,a=void 0,t.containerState._closeFlow=void 0}}function sP(e,t,n){return pt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Il(e){if(e===null||Lt(e)||lo(e))return 1;if(Vh(e))return 2}function Yh(e,t,n){const r=[];let a=-1;for(;++a<e.length;){const o=e[a].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const Gy={name:"attention",resolveAll:oP,tokenize:lP};function oP(e,t){let n=-1,r,a,o,l,u,f,h,g;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;f=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const m={...e[r][1].end},y={...e[n][1].start};Ck(m,-f),Ck(y,f),l={type:f>1?"strongSequence":"emphasisSequence",start:m,end:{...e[r][1].end}},u={type:f>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:y},o={type:f>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},a={type:f>1?"strong":"emphasis",start:{...l.start},end:{...u.end}},e[r][1].end={...l.start},e[n][1].start={...u.end},h=[],e[r][1].end.offset-e[r][1].start.offset&&(h=qr(h,[["enter",e[r][1],t],["exit",e[r][1],t]])),h=qr(h,[["enter",a,t],["enter",l,t],["exit",l,t],["enter",o,t]]),h=qr(h,Yh(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),h=qr(h,[["exit",o,t],["enter",u,t],["exit",u,t],["exit",a,t]]),e[n][1].end.offset-e[n][1].start.offset?(g=2,h=qr(h,[["enter",e[n][1],t],["exit",e[n][1],t]])):g=0,Nr(e,r-1,n-r+3,h),n=r+h.length-g-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function lP(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,a=Il(r);let o;return l;function l(f){return o=f,e.enter("attentionSequence"),u(f)}function u(f){if(f===o)return e.consume(f),u;const h=e.exit("attentionSequence"),g=Il(f),m=!g||g===2&&a||n.includes(f),y=!a||a===2&&g||n.includes(r);return h._open=!!(o===42?m:m&&(a||!y)),h._close=!!(o===42?y:y&&(g||!m)),t(f)}}function Ck(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const cP={name:"autolink",tokenize:uP};function uP(e,t,n){let r=0;return a;function a(b){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(b){return Zn(b)?(e.consume(b),l):b===64?n(b):h(b)}function l(b){return b===43||b===45||b===46||Fn(b)?(r=1,u(b)):h(b)}function u(b){return b===58?(e.consume(b),r=0,f):(b===43||b===45||b===46||Fn(b))&&r++<32?(e.consume(b),u):(r=0,h(b))}function f(b){return b===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),t):b===null||b===32||b===60||fh(b)?n(b):(e.consume(b),f)}function h(b){return b===64?(e.consume(b),g):J4(b)?(e.consume(b),h):n(b)}function g(b){return Fn(b)?m(b):n(b)}function m(b){return b===46?(e.consume(b),r=0,g):b===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),t):y(b)}function y(b){if((b===45||Fn(b))&&r++<63){const k=b===45?y:m;return e.consume(b),k}return n(b)}}const Qu={partial:!0,tokenize:dP};function dP(e,t,n){return r;function r(o){return at(o)?pt(e,a,"linePrefix")(o):a(o)}function a(o){return o===null||$e(o)?t(o):n(o)}}const d2={continuation:{tokenize:hP},exit:pP,name:"blockQuote",tokenize:fP};function fP(e,t,n){const r=this;return a;function a(l){if(l===62){const u=r.containerState;return u.open||(e.enter("blockQuote",{_container:!0}),u.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),o}return n(l)}function o(l){return at(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function hP(e,t,n){const r=this;return a;function a(l){return at(l)?pt(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):o(l)}function o(l){return e.attempt(d2,t,n)(l)}}function pP(e){e.exit("blockQuote")}const f2={name:"characterEscape",tokenize:mP};function mP(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),a}function a(o){return tP(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const h2={name:"characterReference",tokenize:gP};function gP(e,t,n){const r=this;let a=0,o,l;return u;function u(m){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),f}function f(m){return m===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(m),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),o=31,l=Fn,g(m))}function h(m){return m===88||m===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(m),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,l=eP,g):(e.enter("characterReferenceValue"),o=7,l=Ky,g(m))}function g(m){if(m===59&&a){const y=e.exit("characterReferenceValue");return l===Fn&&!ux(r.sliceSerialize(y))?n(m):(e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(m)&&a++<o?(e.consume(m),g):n(m)}}const jk={partial:!0,tokenize:bP},Ak={concrete:!0,name:"codeFenced",tokenize:yP};function yP(e,t,n){const r=this,a={partial:!0,tokenize:D};let o=0,l=0,u;return f;function f(T){return h(T)}function h(T){const M=r.events[r.events.length-1];return o=M&&M[1].type==="linePrefix"?M[2].sliceSerialize(M[1],!0).length:0,u=T,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),g(T)}function g(T){return T===u?(l++,e.consume(T),g):l<3?n(T):(e.exit("codeFencedFenceSequence"),at(T)?pt(e,m,"whitespace")(T):m(T))}function m(T){return T===null||$e(T)?(e.exit("codeFencedFence"),r.interrupt?t(T):e.check(jk,v,_)(T)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),y(T))}function y(T){return T===null||$e(T)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(T)):at(T)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),pt(e,b,"whitespace")(T)):T===96&&T===u?n(T):(e.consume(T),y)}function b(T){return T===null||$e(T)?m(T):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),k(T))}function k(T){return T===null||$e(T)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(T)):T===96&&T===u?n(T):(e.consume(T),k)}function v(T){return e.attempt(a,_,S)(T)}function S(T){return e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),E}function E(T){return o>0&&at(T)?pt(e,C,"linePrefix",o+1)(T):C(T)}function C(T){return T===null||$e(T)?e.check(jk,v,_)(T):(e.enter("codeFlowValue"),N(T))}function N(T){return T===null||$e(T)?(e.exit("codeFlowValue"),C(T)):(e.consume(T),N)}function _(T){return e.exit("codeFenced"),t(T)}function D(T,M,I){let F=0;return $;function $(H){return T.enter("lineEnding"),T.consume(H),T.exit("lineEnding"),U}function U(H){return T.enter("codeFencedFence"),at(H)?pt(T,K,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(H):K(H)}function K(H){return H===u?(T.enter("codeFencedFenceSequence"),Q(H)):I(H)}function Q(H){return H===u?(F++,T.consume(H),Q):F>=l?(T.exit("codeFencedFenceSequence"),at(H)?pt(T,B,"whitespace")(H):B(H)):I(H)}function B(H){return H===null||$e(H)?(T.exit("codeFencedFence"),M(H)):I(H)}}}function bP(e,t,n){const r=this;return a;function a(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}const Rg={name:"codeIndented",tokenize:vP},xP={partial:!0,tokenize:wP};function vP(e,t,n){const r=this;return a;function a(h){return e.enter("codeIndented"),pt(e,o,"linePrefix",5)(h)}function o(h){const g=r.events[r.events.length-1];return g&&g[1].type==="linePrefix"&&g[2].sliceSerialize(g[1],!0).length>=4?l(h):n(h)}function l(h){return h===null?f(h):$e(h)?e.attempt(xP,l,f)(h):(e.enter("codeFlowValue"),u(h))}function u(h){return h===null||$e(h)?(e.exit("codeFlowValue"),l(h)):(e.consume(h),u)}function f(h){return e.exit("codeIndented"),t(h)}}function wP(e,t,n){const r=this;return a;function a(l){return r.parser.lazy[r.now().line]?n(l):$e(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),a):pt(e,o,"linePrefix",5)(l)}function o(l){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(l):$e(l)?a(l):n(l)}}const kP={name:"codeText",previous:SP,resolve:EP,tokenize:NP};function EP(e){let t=e.length-4,n=3,r,a;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)a===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(a=r):(r===t||e[r][1].type==="lineEnding")&&(e[a][1].type="codeTextData",r!==a+2&&(e[a][1].end=e[r-1][1].end,e.splice(a+2,r-a-2),t-=r-a-2,r=a+2),a=void 0);return e}function SP(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function NP(e,t,n){let r=0,a,o;return l;function l(m){return e.enter("codeText"),e.enter("codeTextSequence"),u(m)}function u(m){return m===96?(e.consume(m),r++,u):(e.exit("codeTextSequence"),f(m))}function f(m){return m===null?n(m):m===32?(e.enter("space"),e.consume(m),e.exit("space"),f):m===96?(o=e.enter("codeTextSequence"),a=0,g(m)):$e(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),f):(e.enter("codeTextData"),h(m))}function h(m){return m===null||m===32||m===96||$e(m)?(e.exit("codeTextData"),f(m)):(e.consume(m),h)}function g(m){return m===96?(e.consume(m),a++,g):a===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(m)):(o.type="codeTextData",h(m))}}class _P{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const a=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-a,Number.POSITIVE_INFINITY);return r&&Jc(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Jc(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Jc(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Jc(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Jc(this.left,n.reverse())}}}function Jc(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function p2(e){const t={};let n=-1,r,a,o,l,u,f,h;const g=new _P(e);for(;++n<g.length;){for(;n in t;)n=t[n];if(r=g.get(n),n&&r[1].type==="chunkFlow"&&g.get(n-1)[1].type==="listItemPrefix"&&(f=r[1]._tokenizer.events,o=0,o<f.length&&f[o][1].type==="lineEndingBlank"&&(o+=2),o<f.length&&f[o][1].type==="content"))for(;++o<f.length&&f[o][1].type!=="content";)f[o][1].type==="chunkText"&&(f[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,CP(g,n)),n=t[n],h=!0);else if(r[1]._container){for(o=n,a=void 0;o--;)if(l=g.get(o),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(a&&(g.get(a)[1].type="lineEndingBlank"),l[1].type="lineEnding",a=o);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;a&&(r[1].end={...g.get(a)[1].start},u=g.slice(a,n),u.unshift(r),g.splice(a,n-a+1,u))}}return Nr(e,0,Number.POSITIVE_INFINITY,g.slice(0)),!h}function CP(e,t){const n=e.get(t)[1],r=e.get(t)[2];let a=t-1;const o=[];let l=n._tokenizer;l||(l=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const u=l.events,f=[],h={};let g,m,y=-1,b=n,k=0,v=0;const S=[v];for(;b;){for(;e.get(++a)[1]!==b;);o.push(a),b._tokenizer||(g=r.sliceStream(b),b.next||g.push(null),m&&l.defineSkip(b.start),b._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(g),b._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),m=b,b=b.next}for(b=n;++y<u.length;)u[y][0]==="exit"&&u[y-1][0]==="enter"&&u[y][1].type===u[y-1][1].type&&u[y][1].start.line!==u[y][1].end.line&&(v=y+1,S.push(v),b._tokenizer=void 0,b.previous=void 0,b=b.next);for(l.events=[],b?(b._tokenizer=void 0,b.previous=void 0):S.pop(),y=S.length;y--;){const E=u.slice(S[y],S[y+1]),C=o.pop();f.push([C,C+E.length-1]),e.splice(C,2,E)}for(f.reverse(),y=-1;++y<f.length;)h[k+f[y][0]]=k+f[y][1],k+=f[y][1]-f[y][0]-1;return h}const jP={resolve:TP,tokenize:MP},AP={partial:!0,tokenize:DP};function TP(e){return p2(e),e}function MP(e,t){let n;return r;function r(u){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),a(u)}function a(u){return u===null?o(u):$e(u)?e.check(AP,l,o)(u):(e.consume(u),a)}function o(u){return e.exit("chunkContent"),e.exit("content"),t(u)}function l(u){return e.consume(u),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,a}}function DP(e,t,n){const r=this;return a;function a(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),pt(e,o,"linePrefix")}function o(l){if(l===null||$e(l))return n(l);const u=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(l):e.interrupt(r.parser.constructs.flow,n,t)(l)}}function m2(e,t,n,r,a,o,l,u,f){const h=f||Number.POSITIVE_INFINITY;let g=0;return m;function m(E){return E===60?(e.enter(r),e.enter(a),e.enter(o),e.consume(E),e.exit(o),y):E===null||E===32||E===41||fh(E)?n(E):(e.enter(r),e.enter(l),e.enter(u),e.enter("chunkString",{contentType:"string"}),v(E))}function y(E){return E===62?(e.enter(o),e.consume(E),e.exit(o),e.exit(a),e.exit(r),t):(e.enter(u),e.enter("chunkString",{contentType:"string"}),b(E))}function b(E){return E===62?(e.exit("chunkString"),e.exit(u),y(E)):E===null||E===60||$e(E)?n(E):(e.consume(E),E===92?k:b)}function k(E){return E===60||E===62||E===92?(e.consume(E),b):b(E)}function v(E){return!g&&(E===null||E===41||Lt(E))?(e.exit("chunkString"),e.exit(u),e.exit(l),e.exit(r),t(E)):g<h&&E===40?(e.consume(E),g++,v):E===41?(e.consume(E),g--,v):E===null||E===32||E===40||fh(E)?n(E):(e.consume(E),E===92?S:v)}function S(E){return E===40||E===41||E===92?(e.consume(E),v):v(E)}}function g2(e,t,n,r,a,o){const l=this;let u=0,f;return h;function h(b){return e.enter(r),e.enter(a),e.consume(b),e.exit(a),e.enter(o),g}function g(b){return u>999||b===null||b===91||b===93&&!f||b===94&&!u&&"_hiddenFootnoteSupport"in l.parser.constructs?n(b):b===93?(e.exit(o),e.enter(a),e.consume(b),e.exit(a),e.exit(r),t):$e(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),g):(e.enter("chunkString",{contentType:"string"}),m(b))}function m(b){return b===null||b===91||b===93||$e(b)||u++>999?(e.exit("chunkString"),g(b)):(e.consume(b),f||(f=!at(b)),b===92?y:m)}function y(b){return b===91||b===92||b===93?(e.consume(b),u++,m):m(b)}}function y2(e,t,n,r,a,o){let l;return u;function u(y){return y===34||y===39||y===40?(e.enter(r),e.enter(a),e.consume(y),e.exit(a),l=y===40?41:y,f):n(y)}function f(y){return y===l?(e.enter(a),e.consume(y),e.exit(a),e.exit(r),t):(e.enter(o),h(y))}function h(y){return y===l?(e.exit(o),f(l)):y===null?n(y):$e(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),pt(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),g(y))}function g(y){return y===l||y===null||$e(y)?(e.exit("chunkString"),h(y)):(e.consume(y),y===92?m:g)}function m(y){return y===l||y===92?(e.consume(y),g):g(y)}}function uu(e,t){let n;return r;function r(a){return $e(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),n=!0,r):at(a)?pt(e,r,n?"linePrefix":"lineSuffix")(a):t(a)}}const OP={name:"definition",tokenize:LP},RP={partial:!0,tokenize:IP};function LP(e,t,n){const r=this;let a;return o;function o(b){return e.enter("definition"),l(b)}function l(b){return g2.call(r,e,u,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(b)}function u(b){return a=di(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),f):n(b)}function f(b){return Lt(b)?uu(e,h)(b):h(b)}function h(b){return m2(e,g,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(b)}function g(b){return e.attempt(RP,m,m)(b)}function m(b){return at(b)?pt(e,y,"whitespace")(b):y(b)}function y(b){return b===null||$e(b)?(e.exit("definition"),r.parser.defined.push(a),t(b)):n(b)}}function IP(e,t,n){return r;function r(u){return Lt(u)?uu(e,a)(u):n(u)}function a(u){return y2(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(u)}function o(u){return at(u)?pt(e,l,"whitespace")(u):l(u)}function l(u){return u===null||$e(u)?t(u):n(u)}}const zP={name:"hardBreakEscape",tokenize:PP};function PP(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),a}function a(o){return $e(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const BP={name:"headingAtx",resolve:UP,tokenize:$P};function UP(e,t){let n=e.length-2,r=3,a,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(a={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Nr(e,r,n-r+1,[["enter",a,t],["enter",o,t],["exit",o,t],["exit",a,t]])),e}function $P(e,t,n){let r=0;return a;function a(g){return e.enter("atxHeading"),o(g)}function o(g){return e.enter("atxHeadingSequence"),l(g)}function l(g){return g===35&&r++<6?(e.consume(g),l):g===null||Lt(g)?(e.exit("atxHeadingSequence"),u(g)):n(g)}function u(g){return g===35?(e.enter("atxHeadingSequence"),f(g)):g===null||$e(g)?(e.exit("atxHeading"),t(g)):at(g)?pt(e,u,"whitespace")(g):(e.enter("atxHeadingText"),h(g))}function f(g){return g===35?(e.consume(g),f):(e.exit("atxHeadingSequence"),u(g))}function h(g){return g===null||g===35||Lt(g)?(e.exit("atxHeadingText"),u(g)):(e.consume(g),h)}}const FP=["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"],Tk=["pre","script","style","textarea"],qP={concrete:!0,name:"htmlFlow",resolveTo:GP,tokenize:VP},HP={partial:!0,tokenize:QP},KP={partial:!0,tokenize:YP};function GP(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function VP(e,t,n){const r=this;let a,o,l,u,f;return h;function h(R){return g(R)}function g(R){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(R),m}function m(R){return R===33?(e.consume(R),y):R===47?(e.consume(R),o=!0,v):R===63?(e.consume(R),a=3,r.interrupt?t:O):Zn(R)?(e.consume(R),l=String.fromCharCode(R),S):n(R)}function y(R){return R===45?(e.consume(R),a=2,b):R===91?(e.consume(R),a=5,u=0,k):Zn(R)?(e.consume(R),a=4,r.interrupt?t:O):n(R)}function b(R){return R===45?(e.consume(R),r.interrupt?t:O):n(R)}function k(R){const se="CDATA[";return R===se.charCodeAt(u++)?(e.consume(R),u===se.length?r.interrupt?t:K:k):n(R)}function v(R){return Zn(R)?(e.consume(R),l=String.fromCharCode(R),S):n(R)}function S(R){if(R===null||R===47||R===62||Lt(R)){const se=R===47,ge=l.toLowerCase();return!se&&!o&&Tk.includes(ge)?(a=1,r.interrupt?t(R):K(R)):FP.includes(l.toLowerCase())?(a=6,se?(e.consume(R),E):r.interrupt?t(R):K(R)):(a=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(R):o?C(R):N(R))}return R===45||Fn(R)?(e.consume(R),l+=String.fromCharCode(R),S):n(R)}function E(R){return R===62?(e.consume(R),r.interrupt?t:K):n(R)}function C(R){return at(R)?(e.consume(R),C):$(R)}function N(R){return R===47?(e.consume(R),$):R===58||R===95||Zn(R)?(e.consume(R),_):at(R)?(e.consume(R),N):$(R)}function _(R){return R===45||R===46||R===58||R===95||Fn(R)?(e.consume(R),_):D(R)}function D(R){return R===61?(e.consume(R),T):at(R)?(e.consume(R),D):N(R)}function T(R){return R===null||R===60||R===61||R===62||R===96?n(R):R===34||R===39?(e.consume(R),f=R,M):at(R)?(e.consume(R),T):I(R)}function M(R){return R===f?(e.consume(R),f=null,F):R===null||$e(R)?n(R):(e.consume(R),M)}function I(R){return R===null||R===34||R===39||R===47||R===60||R===61||R===62||R===96||Lt(R)?D(R):(e.consume(R),I)}function F(R){return R===47||R===62||at(R)?N(R):n(R)}function $(R){return R===62?(e.consume(R),U):n(R)}function U(R){return R===null||$e(R)?K(R):at(R)?(e.consume(R),U):n(R)}function K(R){return R===45&&a===2?(e.consume(R),z):R===60&&a===1?(e.consume(R),Y):R===62&&a===4?(e.consume(R),L):R===63&&a===3?(e.consume(R),O):R===93&&a===5?(e.consume(R),G):$e(R)&&(a===6||a===7)?(e.exit("htmlFlowData"),e.check(HP,V,Q)(R)):R===null||$e(R)?(e.exit("htmlFlowData"),Q(R)):(e.consume(R),K)}function Q(R){return e.check(KP,B,V)(R)}function B(R){return e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),H}function H(R){return R===null||$e(R)?Q(R):(e.enter("htmlFlowData"),K(R))}function z(R){return R===45?(e.consume(R),O):K(R)}function Y(R){return R===47?(e.consume(R),l="",W):K(R)}function W(R){if(R===62){const se=l.toLowerCase();return Tk.includes(se)?(e.consume(R),L):K(R)}return Zn(R)&&l.length<8?(e.consume(R),l+=String.fromCharCode(R),W):K(R)}function G(R){return R===93?(e.consume(R),O):K(R)}function O(R){return R===62?(e.consume(R),L):R===45&&a===2?(e.consume(R),O):K(R)}function L(R){return R===null||$e(R)?(e.exit("htmlFlowData"),V(R)):(e.consume(R),L)}function V(R){return e.exit("htmlFlow"),t(R)}}function YP(e,t,n){const r=this;return a;function a(l){return $e(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):n(l)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}function QP(e,t,n){return r;function r(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),e.attempt(Qu,t,n)}}const WP={name:"htmlText",tokenize:XP};function XP(e,t,n){const r=this;let a,o,l;return u;function u(O){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(O),f}function f(O){return O===33?(e.consume(O),h):O===47?(e.consume(O),D):O===63?(e.consume(O),N):Zn(O)?(e.consume(O),I):n(O)}function h(O){return O===45?(e.consume(O),g):O===91?(e.consume(O),o=0,k):Zn(O)?(e.consume(O),C):n(O)}function g(O){return O===45?(e.consume(O),b):n(O)}function m(O){return O===null?n(O):O===45?(e.consume(O),y):$e(O)?(l=m,Y(O)):(e.consume(O),m)}function y(O){return O===45?(e.consume(O),b):m(O)}function b(O){return O===62?z(O):O===45?y(O):m(O)}function k(O){const L="CDATA[";return O===L.charCodeAt(o++)?(e.consume(O),o===L.length?v:k):n(O)}function v(O){return O===null?n(O):O===93?(e.consume(O),S):$e(O)?(l=v,Y(O)):(e.consume(O),v)}function S(O){return O===93?(e.consume(O),E):v(O)}function E(O){return O===62?z(O):O===93?(e.consume(O),E):v(O)}function C(O){return O===null||O===62?z(O):$e(O)?(l=C,Y(O)):(e.consume(O),C)}function N(O){return O===null?n(O):O===63?(e.consume(O),_):$e(O)?(l=N,Y(O)):(e.consume(O),N)}function _(O){return O===62?z(O):N(O)}function D(O){return Zn(O)?(e.consume(O),T):n(O)}function T(O){return O===45||Fn(O)?(e.consume(O),T):M(O)}function M(O){return $e(O)?(l=M,Y(O)):at(O)?(e.consume(O),M):z(O)}function I(O){return O===45||Fn(O)?(e.consume(O),I):O===47||O===62||Lt(O)?F(O):n(O)}function F(O){return O===47?(e.consume(O),z):O===58||O===95||Zn(O)?(e.consume(O),$):$e(O)?(l=F,Y(O)):at(O)?(e.consume(O),F):z(O)}function $(O){return O===45||O===46||O===58||O===95||Fn(O)?(e.consume(O),$):U(O)}function U(O){return O===61?(e.consume(O),K):$e(O)?(l=U,Y(O)):at(O)?(e.consume(O),U):F(O)}function K(O){return O===null||O===60||O===61||O===62||O===96?n(O):O===34||O===39?(e.consume(O),a=O,Q):$e(O)?(l=K,Y(O)):at(O)?(e.consume(O),K):(e.consume(O),B)}function Q(O){return O===a?(e.consume(O),a=void 0,H):O===null?n(O):$e(O)?(l=Q,Y(O)):(e.consume(O),Q)}function B(O){return O===null||O===34||O===39||O===60||O===61||O===96?n(O):O===47||O===62||Lt(O)?F(O):(e.consume(O),B)}function H(O){return O===47||O===62||Lt(O)?F(O):n(O)}function z(O){return O===62?(e.consume(O),e.exit("htmlTextData"),e.exit("htmlText"),t):n(O)}function Y(O){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),W}function W(O){return at(O)?pt(e,G,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):G(O)}function G(O){return e.enter("htmlTextData"),l(O)}}const dx={name:"labelEnd",resolveAll:t5,resolveTo:n5,tokenize:r5},ZP={tokenize:i5},JP={tokenize:a5},e5={tokenize:s5};function t5(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const a=r.type==="labelImage"?4:2;r.type="data",t+=a}}return e.length!==n.length&&Nr(e,0,e.length,n),e}function n5(e,t){let n=e.length,r=0,a,o,l,u;for(;n--;)if(a=e[n][1],o){if(a.type==="link"||a.type==="labelLink"&&a._inactive)break;e[n][0]==="enter"&&a.type==="labelLink"&&(a._inactive=!0)}else if(l){if(e[n][0]==="enter"&&(a.type==="labelImage"||a.type==="labelLink")&&!a._balanced&&(o=n,a.type!=="labelLink")){r=2;break}}else a.type==="labelEnd"&&(l=n);const f={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},h={type:"label",start:{...e[o][1].start},end:{...e[l][1].end}},g={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[l-2][1].start}};return u=[["enter",f,t],["enter",h,t]],u=qr(u,e.slice(o+1,o+r+3)),u=qr(u,[["enter",g,t]]),u=qr(u,Yh(t.parser.constructs.insideSpan.null,e.slice(o+r+4,l-3),t)),u=qr(u,[["exit",g,t],e[l-2],e[l-1],["exit",h,t]]),u=qr(u,e.slice(l+1)),u=qr(u,[["exit",f,t]]),Nr(e,o,e.length,u),e}function r5(e,t,n){const r=this;let a=r.events.length,o,l;for(;a--;)if((r.events[a][1].type==="labelImage"||r.events[a][1].type==="labelLink")&&!r.events[a][1]._balanced){o=r.events[a][1];break}return u;function u(y){return o?o._inactive?m(y):(l=r.parser.defined.includes(di(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(y),e.exit("labelMarker"),e.exit("labelEnd"),f):n(y)}function f(y){return y===40?e.attempt(ZP,g,l?g:m)(y):y===91?e.attempt(JP,g,l?h:m)(y):l?g(y):m(y)}function h(y){return e.attempt(e5,g,m)(y)}function g(y){return t(y)}function m(y){return o._balanced=!0,n(y)}}function i5(e,t,n){return r;function r(m){return e.enter("resource"),e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),a}function a(m){return Lt(m)?uu(e,o)(m):o(m)}function o(m){return m===41?g(m):m2(e,l,u,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function l(m){return Lt(m)?uu(e,f)(m):g(m)}function u(m){return n(m)}function f(m){return m===34||m===39||m===40?y2(e,h,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):g(m)}function h(m){return Lt(m)?uu(e,g)(m):g(m)}function g(m){return m===41?(e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),e.exit("resource"),t):n(m)}}function a5(e,t,n){const r=this;return a;function a(u){return g2.call(r,e,o,l,"reference","referenceMarker","referenceString")(u)}function o(u){return r.parser.defined.includes(di(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(u):n(u)}function l(u){return n(u)}}function s5(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),a}function a(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const o5={name:"labelStartImage",resolveAll:dx.resolveAll,tokenize:l5};function l5(e,t,n){const r=this;return a;function a(u){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(u),e.exit("labelImageMarker"),o}function o(u){return u===91?(e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelImage"),l):n(u)}function l(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const c5={name:"labelStartLink",resolveAll:dx.resolveAll,tokenize:u5};function u5(e,t,n){const r=this;return a;function a(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),o}function o(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const Lg={name:"lineEnding",tokenize:d5};function d5(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),pt(e,t,"linePrefix")}}const Wf={name:"thematicBreak",tokenize:f5};function f5(e,t,n){let r=0,a;return o;function o(h){return e.enter("thematicBreak"),l(h)}function l(h){return a=h,u(h)}function u(h){return h===a?(e.enter("thematicBreakSequence"),f(h)):r>=3&&(h===null||$e(h))?(e.exit("thematicBreak"),t(h)):n(h)}function f(h){return h===a?(e.consume(h),r++,f):(e.exit("thematicBreakSequence"),at(h)?pt(e,u,"whitespace")(h):u(h))}}const sr={continuation:{tokenize:g5},exit:b5,name:"list",tokenize:m5},h5={partial:!0,tokenize:x5},p5={partial:!0,tokenize:y5};function m5(e,t,n){const r=this,a=r.events[r.events.length-1];let o=a&&a[1].type==="linePrefix"?a[2].sliceSerialize(a[1],!0).length:0,l=0;return u;function u(b){const k=r.containerState.type||(b===42||b===43||b===45?"listUnordered":"listOrdered");if(k==="listUnordered"?!r.containerState.marker||b===r.containerState.marker:Ky(b)){if(r.containerState.type||(r.containerState.type=k,e.enter(k,{_container:!0})),k==="listUnordered")return e.enter("listItemPrefix"),b===42||b===45?e.check(Wf,n,h)(b):h(b);if(!r.interrupt||b===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),f(b)}return n(b)}function f(b){return Ky(b)&&++l<10?(e.consume(b),f):(!r.interrupt||l<2)&&(r.containerState.marker?b===r.containerState.marker:b===41||b===46)?(e.exit("listItemValue"),h(b)):n(b)}function h(b){return e.enter("listItemMarker"),e.consume(b),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||b,e.check(Qu,r.interrupt?n:g,e.attempt(h5,y,m))}function g(b){return r.containerState.initialBlankLine=!0,o++,y(b)}function m(b){return at(b)?(e.enter("listItemPrefixWhitespace"),e.consume(b),e.exit("listItemPrefixWhitespace"),y):n(b)}function y(b){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(b)}}function g5(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Qu,a,o);function a(u){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,pt(e,t,"listItemIndent",r.containerState.size+1)(u)}function o(u){return r.containerState.furtherBlankLines||!at(u)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(u)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(p5,t,l)(u))}function l(u){return r.containerState._closeFlow=!0,r.interrupt=void 0,pt(e,e.attempt(sr,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u)}}function y5(e,t,n){const r=this;return pt(e,a,"listItemIndent",r.containerState.size+1);function a(o){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?t(o):n(o)}}function b5(e){e.exit(this.containerState.type)}function x5(e,t,n){const r=this;return pt(e,a,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function a(o){const l=r.events[r.events.length-1];return!at(o)&&l&&l[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const Mk={name:"setextUnderline",resolveTo:v5,tokenize:w5};function v5(e,t){let n=e.length,r,a,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(a=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const l={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type="setextHeadingText",o?(e.splice(a,0,["enter",l,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end={...e[o][1].end}):e[r][1]=l,e.push(["exit",l,t]),e}function w5(e,t,n){const r=this;let a;return o;function o(h){let g=r.events.length,m;for(;g--;)if(r.events[g][1].type!=="lineEnding"&&r.events[g][1].type!=="linePrefix"&&r.events[g][1].type!=="content"){m=r.events[g][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||m)?(e.enter("setextHeadingLine"),a=h,l(h)):n(h)}function l(h){return e.enter("setextHeadingLineSequence"),u(h)}function u(h){return h===a?(e.consume(h),u):(e.exit("setextHeadingLineSequence"),at(h)?pt(e,f,"lineSuffix")(h):f(h))}function f(h){return h===null||$e(h)?(e.exit("setextHeadingLine"),t(h)):n(h)}}const k5={tokenize:E5};function E5(e){const t=this,n=e.attempt(Qu,r,e.attempt(this.parser.constructs.flowInitial,a,pt(e,e.attempt(this.parser.constructs.flow,a,e.attempt(jP,a)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function a(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const S5={resolveAll:x2()},N5=b2("string"),_5=b2("text");function b2(e){return{resolveAll:x2(e==="text"?C5:void 0),tokenize:t};function t(n){const r=this,a=this.parser.constructs[e],o=n.attempt(a,l,u);return l;function l(g){return h(g)?o(g):u(g)}function u(g){if(g===null){n.consume(g);return}return n.enter("data"),n.consume(g),f}function f(g){return h(g)?(n.exit("data"),o(g)):(n.consume(g),f)}function h(g){if(g===null)return!0;const m=a[g];let y=-1;if(m)for(;++y<m.length;){const b=m[y];if(!b.previous||b.previous.call(r,r.previous))return!0}return!1}}}function x2(e){return t;function t(n,r){let a=-1,o;for(;++a<=n.length;)o===void 0?n[a]&&n[a][1].type==="data"&&(o=a,a++):(!n[a]||n[a][1].type!=="data")&&(a!==o+2&&(n[o][1].end=n[a-1][1].end,n.splice(o+2,a-o-2),a=o+2),o=void 0);return e?e(n,r):n}}function C5(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],a=t.sliceStream(r);let o=a.length,l=-1,u=0,f;for(;o--;){const h=a[o];if(typeof h=="string"){for(l=h.length;h.charCodeAt(l-1)===32;)u++,l--;if(l)break;l=-1}else if(h===-2)f=!0,u++;else if(h!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(u=0),u){const h={type:n===e.length||f||u<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?l:r.start._bufferIndex+l,_index:r.start._index+o,line:r.end.line,column:r.end.column-u,offset:r.end.offset-u},end:{...r.end}};r.end={...h.start},r.start.offset===r.end.offset?Object.assign(r,h):(e.splice(n,0,["enter",h,t],["exit",h,t]),n+=2)}n++}return e}const j5={42:sr,43:sr,45:sr,48:sr,49:sr,50:sr,51:sr,52:sr,53:sr,54:sr,55:sr,56:sr,57:sr,62:d2},A5={91:OP},T5={[-2]:Rg,[-1]:Rg,32:Rg},M5={35:BP,42:Wf,45:[Mk,Wf],60:qP,61:Mk,95:Wf,96:Ak,126:Ak},D5={38:h2,92:f2},O5={[-5]:Lg,[-4]:Lg,[-3]:Lg,33:o5,38:h2,42:Gy,60:[cP,WP],91:c5,92:[zP,f2],93:dx,95:Gy,96:kP},R5={null:[Gy,S5]},L5={null:[42,95]},I5={null:[]},z5=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:L5,contentInitial:A5,disable:I5,document:j5,flow:M5,flowInitial:T5,insideSpan:R5,string:D5,text:O5},Symbol.toStringTag,{value:"Module"}));function P5(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const a={},o=[];let l=[],u=[];const f={attempt:M(D),check:M(T),consume:C,enter:N,exit:_,interrupt:M(T,{interrupt:!0})},h={code:null,containerState:{},defineSkip:v,events:[],now:k,parser:e,previous:null,sliceSerialize:y,sliceStream:b,write:m};let g=t.tokenize.call(h,f);return t.resolveAll&&o.push(t),h;function m(U){return l=qr(l,U),S(),l[l.length-1]!==null?[]:(I(t,0),h.events=Yh(o,h.events,h),h.events)}function y(U,K){return U5(b(U),K)}function b(U){return B5(l,U)}function k(){const{_bufferIndex:U,_index:K,line:Q,column:B,offset:H}=r;return{_bufferIndex:U,_index:K,line:Q,column:B,offset:H}}function v(U){a[U.line]=U.column,$()}function S(){let U;for(;r._index<l.length;){const K=l[r._index];if(typeof K=="string")for(U=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===U&&r._bufferIndex<K.length;)E(K.charCodeAt(r._bufferIndex));else E(K)}}function E(U){g=g(U)}function C(U){$e(U)?(r.line++,r.column=1,r.offset+=U===-3?2:1,$()):U!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),h.previous=U}function N(U,K){const Q=K||{};return Q.type=U,Q.start=k(),h.events.push(["enter",Q,h]),u.push(Q),Q}function _(U){const K=u.pop();return K.end=k(),h.events.push(["exit",K,h]),K}function D(U,K){I(U,K.from)}function T(U,K){K.restore()}function M(U,K){return Q;function Q(B,H,z){let Y,W,G,O;return Array.isArray(B)?V(B):"tokenize"in B?V([B]):L(B);function L(ye){return xe;function xe(q){const ne=q!==null&&ye[q],ue=q!==null&&ye.null,ce=[...Array.isArray(ne)?ne:ne?[ne]:[],...Array.isArray(ue)?ue:ue?[ue]:[]];return V(ce)(q)}}function V(ye){return Y=ye,W=0,ye.length===0?z:R(ye[W])}function R(ye){return xe;function xe(q){return O=F(),G=ye,ye.partial||(h.currentConstruct=ye),ye.name&&h.parser.constructs.disable.null.includes(ye.name)?ge():ye.tokenize.call(K?Object.assign(Object.create(h),K):h,f,se,ge)(q)}}function se(ye){return U(G,O),H}function ge(ye){return O.restore(),++W<Y.length?R(Y[W]):z}}}function I(U,K){U.resolveAll&&!o.includes(U)&&o.push(U),U.resolve&&Nr(h.events,K,h.events.length-K,U.resolve(h.events.slice(K),h)),U.resolveTo&&(h.events=U.resolveTo(h.events,h))}function F(){const U=k(),K=h.previous,Q=h.currentConstruct,B=h.events.length,H=Array.from(u);return{from:B,restore:z};function z(){r=U,h.previous=K,h.currentConstruct=Q,h.events.length=B,u=H,$()}}function $(){r.line in a&&r.column<2&&(r.column=a[r.line],r.offset+=a[r.line]-1)}}function B5(e,t){const n=t.start._index,r=t.start._bufferIndex,a=t.end._index,o=t.end._bufferIndex;let l;if(n===a)l=[e[n].slice(r,o)];else{if(l=e.slice(n,a),r>-1){const u=l[0];typeof u=="string"?l[0]=u.slice(r):l.shift()}o>0&&l.push(e[a].slice(0,o))}return l}function U5(e,t){let n=-1;const r=[];let a;for(;++n<e.length;){const o=e[n];let l;if(typeof o=="string")l=o;else switch(o){case-5:{l="\r";break}case-4:{l=`
|
|
573
|
+
`;break}case-3:{l=`\r
|
|
574
|
+
`;break}case-2:{l=t?" ":" ";break}case-1:{if(!t&&a)continue;l=" ";break}default:l=String.fromCharCode(o)}a=o===-2,r.push(l)}return r.join("")}function $5(e){const r={constructs:c2([z5,...(e||{}).extensions||[]]),content:a(nP),defined:[],document:a(iP),flow:a(k5),lazy:{},string:a(N5),text:a(_5)};return r;function a(o){return l;function l(u){return P5(r,o,u)}}}function F5(e){for(;!p2(e););return e}const Dk=/[\0\t\n\r]/g;function q5(){let e=1,t="",n=!0,r;return a;function a(o,l,u){const f=[];let h,g,m,y,b;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(l||void 0).decode(o)),m=0,t="",n&&(o.charCodeAt(0)===65279&&m++,n=void 0);m<o.length;){if(Dk.lastIndex=m,h=Dk.exec(o),y=h&&h.index!==void 0?h.index:o.length,b=o.charCodeAt(y),!h){t=o.slice(m);break}if(b===10&&m===y&&r)f.push(-3),r=void 0;else switch(r&&(f.push(-5),r=void 0),m<y&&(f.push(o.slice(m,y)),e+=y-m),b){case 0:{f.push(65533),e++;break}case 9:{for(g=Math.ceil(e/4)*4,f.push(-2);e++<g;)f.push(-1);break}case 10:{f.push(-4),e=1;break}default:r=!0,e=1}m=y+1}return u&&(r&&f.push(-5),t&&f.push(t),f.push(null)),f}}const H5=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function K5(e){return e.replace(H5,G5)}function G5(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const a=n.charCodeAt(1),o=a===120||a===88;return u2(n.slice(o?2:1),o?16:10)}return ux(n)||e}const v2={}.hasOwnProperty;function V5(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),Y5(n)(F5($5(n).document().write(q5()(e,t,!0))))}function Y5(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(sn),autolinkProtocol:F,autolinkEmail:F,atxHeading:o(De),blockQuote:o(ue),characterEscape:F,characterReference:F,codeFenced:o(ce),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:o(ce,l),codeText:o(de,l),codeTextData:F,data:F,codeFlowValue:F,definition:o(be),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:o(je),hardBreakEscape:o(we),hardBreakTrailing:o(we),htmlFlow:o(ut,l),htmlFlowData:F,htmlText:o(ut,l),htmlTextData:F,image:o(Bt),label:l,link:o(sn),listItem:o(An),listItemValue:y,listOrdered:o(cn,m),listUnordered:o(cn),paragraph:o(Yr),reference:R,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:o(De),strong:o(Jn),thematicBreak:o(kn)},exit:{atxHeading:f(),atxHeadingSequence:D,autolink:f(),autolinkEmail:ne,autolinkProtocol:q,blockQuote:f(),characterEscapeValue:$,characterReferenceMarkerHexadecimal:ge,characterReferenceMarkerNumeric:ge,characterReferenceValue:ye,characterReference:xe,codeFenced:f(S),codeFencedFence:v,codeFencedFenceInfo:b,codeFencedFenceMeta:k,codeFlowValue:$,codeIndented:f(E),codeText:f(H),codeTextData:$,data:$,definition:f(),definitionDestinationString:_,definitionLabelString:C,definitionTitleString:N,emphasis:f(),hardBreakEscape:f(K),hardBreakTrailing:f(K),htmlFlow:f(Q),htmlFlowData:$,htmlText:f(B),htmlTextData:$,image:f(Y),label:G,labelText:W,lineEnding:U,link:f(z),listItem:f(),listOrdered:f(),listUnordered:f(),paragraph:f(),referenceString:se,resourceDestinationString:O,resourceTitleString:L,resource:V,setextHeading:f(I),setextHeadingLineSequence:M,setextHeadingText:T,strong:f(),thematicBreak:f()}};w2(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(le){let ve={type:"root",children:[]};const ze={stack:[ve],tokenStack:[],config:t,enter:u,exit:h,buffer:l,resume:g,data:n},Xe=[];let st=-1;for(;++st<le.length;)if(le[st][1].type==="listOrdered"||le[st][1].type==="listUnordered")if(le[st][0]==="enter")Xe.push(st);else{const Tn=Xe.pop();st=a(le,Tn,st)}for(st=-1;++st<le.length;){const Tn=t[le[st][0]];v2.call(Tn,le[st][1].type)&&Tn[le[st][1].type].call(Object.assign({sliceSerialize:le[st][2].sliceSerialize},ze),le[st][1])}if(ze.tokenStack.length>0){const Tn=ze.tokenStack[ze.tokenStack.length-1];(Tn[1]||Ok).call(ze,void 0,Tn[0])}for(ve.position={start:Ja(le.length>0?le[0][1].start:{line:1,column:1,offset:0}),end:Ja(le.length>0?le[le.length-2][1].end:{line:1,column:1,offset:0})},st=-1;++st<t.transforms.length;)ve=t.transforms[st](ve)||ve;return ve}function a(le,ve,ze){let Xe=ve-1,st=-1,Tn=!1,hr,bn,Ft,En;for(;++Xe<=ze;){const vt=le[Xe];switch(vt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{vt[0]==="enter"?st++:st--,En=void 0;break}case"lineEndingBlank":{vt[0]==="enter"&&(hr&&!En&&!st&&!Ft&&(Ft=Xe),En=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:En=void 0}if(!st&&vt[0]==="enter"&&vt[1].type==="listItemPrefix"||st===-1&&vt[0]==="exit"&&(vt[1].type==="listUnordered"||vt[1].type==="listOrdered")){if(hr){let Ar=Xe;for(bn=void 0;Ar--;){const Mn=le[Ar];if(Mn[1].type==="lineEnding"||Mn[1].type==="lineEndingBlank"){if(Mn[0]==="exit")continue;bn&&(le[bn][1].type="lineEndingBlank",Tn=!0),Mn[1].type="lineEnding",bn=Ar}else if(!(Mn[1].type==="linePrefix"||Mn[1].type==="blockQuotePrefix"||Mn[1].type==="blockQuotePrefixWhitespace"||Mn[1].type==="blockQuoteMarker"||Mn[1].type==="listItemIndent"))break}Ft&&(!bn||Ft<bn)&&(hr._spread=!0),hr.end=Object.assign({},bn?le[bn][1].start:vt[1].end),le.splice(bn||Xe,0,["exit",hr,vt[2]]),Xe++,ze++}if(vt[1].type==="listItemPrefix"){const Ar={type:"listItem",_spread:!1,start:Object.assign({},vt[1].start),end:void 0};hr=Ar,le.splice(Xe,0,["enter",Ar,vt[2]]),Xe++,ze++,Ft=void 0,En=!0}}}return le[ve][1]._spread=Tn,ze}function o(le,ve){return ze;function ze(Xe){u.call(this,le(Xe),Xe),ve&&ve.call(this,Xe)}}function l(){this.stack.push({type:"fragment",children:[]})}function u(le,ve,ze){this.stack[this.stack.length-1].children.push(le),this.stack.push(le),this.tokenStack.push([ve,ze||void 0]),le.position={start:Ja(ve.start),end:void 0}}function f(le){return ve;function ve(ze){le&&le.call(this,ze),h.call(this,ze)}}function h(le,ve){const ze=this.stack.pop(),Xe=this.tokenStack.pop();if(Xe)Xe[0].type!==le.type&&(ve?ve.call(this,le,Xe[0]):(Xe[1]||Ok).call(this,le,Xe[0]));else throw new Error("Cannot close `"+le.type+"` ("+cu({start:le.start,end:le.end})+"): it’s not open");ze.position.end=Ja(le.end)}function g(){return cx(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function y(le){if(this.data.expectingFirstListItemValue){const ve=this.stack[this.stack.length-2];ve.start=Number.parseInt(this.sliceSerialize(le),10),this.data.expectingFirstListItemValue=void 0}}function b(){const le=this.resume(),ve=this.stack[this.stack.length-1];ve.lang=le}function k(){const le=this.resume(),ve=this.stack[this.stack.length-1];ve.meta=le}function v(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function S(){const le=this.resume(),ve=this.stack[this.stack.length-1];ve.value=le.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function E(){const le=this.resume(),ve=this.stack[this.stack.length-1];ve.value=le.replace(/(\r?\n|\r)$/g,"")}function C(le){const ve=this.resume(),ze=this.stack[this.stack.length-1];ze.label=ve,ze.identifier=di(this.sliceSerialize(le)).toLowerCase()}function N(){const le=this.resume(),ve=this.stack[this.stack.length-1];ve.title=le}function _(){const le=this.resume(),ve=this.stack[this.stack.length-1];ve.url=le}function D(le){const ve=this.stack[this.stack.length-1];if(!ve.depth){const ze=this.sliceSerialize(le).length;ve.depth=ze}}function T(){this.data.setextHeadingSlurpLineEnding=!0}function M(le){const ve=this.stack[this.stack.length-1];ve.depth=this.sliceSerialize(le).codePointAt(0)===61?1:2}function I(){this.data.setextHeadingSlurpLineEnding=void 0}function F(le){const ze=this.stack[this.stack.length-1].children;let Xe=ze[ze.length-1];(!Xe||Xe.type!=="text")&&(Xe=xt(),Xe.position={start:Ja(le.start),end:void 0},ze.push(Xe)),this.stack.push(Xe)}function $(le){const ve=this.stack.pop();ve.value+=this.sliceSerialize(le),ve.position.end=Ja(le.end)}function U(le){const ve=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ze=ve.children[ve.children.length-1];ze.position.end=Ja(le.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ve.type)&&(F.call(this,le),$.call(this,le))}function K(){this.data.atHardBreak=!0}function Q(){const le=this.resume(),ve=this.stack[this.stack.length-1];ve.value=le}function B(){const le=this.resume(),ve=this.stack[this.stack.length-1];ve.value=le}function H(){const le=this.resume(),ve=this.stack[this.stack.length-1];ve.value=le}function z(){const le=this.stack[this.stack.length-1];if(this.data.inReference){const ve=this.data.referenceType||"shortcut";le.type+="Reference",le.referenceType=ve,delete le.url,delete le.title}else delete le.identifier,delete le.label;this.data.referenceType=void 0}function Y(){const le=this.stack[this.stack.length-1];if(this.data.inReference){const ve=this.data.referenceType||"shortcut";le.type+="Reference",le.referenceType=ve,delete le.url,delete le.title}else delete le.identifier,delete le.label;this.data.referenceType=void 0}function W(le){const ve=this.sliceSerialize(le),ze=this.stack[this.stack.length-2];ze.label=K5(ve),ze.identifier=di(ve).toLowerCase()}function G(){const le=this.stack[this.stack.length-1],ve=this.resume(),ze=this.stack[this.stack.length-1];if(this.data.inReference=!0,ze.type==="link"){const Xe=le.children;ze.children=Xe}else ze.alt=ve}function O(){const le=this.resume(),ve=this.stack[this.stack.length-1];ve.url=le}function L(){const le=this.resume(),ve=this.stack[this.stack.length-1];ve.title=le}function V(){this.data.inReference=void 0}function R(){this.data.referenceType="collapsed"}function se(le){const ve=this.resume(),ze=this.stack[this.stack.length-1];ze.label=ve,ze.identifier=di(this.sliceSerialize(le)).toLowerCase(),this.data.referenceType="full"}function ge(le){this.data.characterReferenceType=le.type}function ye(le){const ve=this.sliceSerialize(le),ze=this.data.characterReferenceType;let Xe;ze?(Xe=u2(ve,ze==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Xe=ux(ve);const st=this.stack[this.stack.length-1];st.value+=Xe}function xe(le){const ve=this.stack.pop();ve.position.end=Ja(le.end)}function q(le){$.call(this,le);const ve=this.stack[this.stack.length-1];ve.url=this.sliceSerialize(le)}function ne(le){$.call(this,le);const ve=this.stack[this.stack.length-1];ve.url="mailto:"+this.sliceSerialize(le)}function ue(){return{type:"blockquote",children:[]}}function ce(){return{type:"code",lang:null,meta:null,value:""}}function de(){return{type:"inlineCode",value:""}}function be(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function je(){return{type:"emphasis",children:[]}}function De(){return{type:"heading",depth:0,children:[]}}function we(){return{type:"break"}}function ut(){return{type:"html",value:""}}function Bt(){return{type:"image",title:null,url:"",alt:null}}function sn(){return{type:"link",title:null,url:"",children:[]}}function cn(le){return{type:"list",ordered:le.type==="listOrdered",start:null,spread:le._spread,children:[]}}function An(le){return{type:"listItem",spread:le._spread,checked:null,children:[]}}function Yr(){return{type:"paragraph",children:[]}}function Jn(){return{type:"strong",children:[]}}function xt(){return{type:"text",value:""}}function kn(){return{type:"thematicBreak"}}}function Ja(e){return{line:e.line,column:e.column,offset:e.offset}}function w2(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?w2(e,r):Q5(e,r)}}function Q5(e,t){let n;for(n in t)if(v2.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Ok(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+cu({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+cu({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+cu({start:t.start,end:t.end})+") is still open")}function W5(e){const t=this;t.parser=n;function n(r){return V5(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function X5(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Z5(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
575
|
+
`}]}function J5(e,t){const n=t.value?t.value+`
|
|
576
|
+
`:"",r={},a=t.lang?t.lang.split(/\s+/):[];a.length>0&&(r.className=["language-"+a[0]]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function eB(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function tB(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function nB(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),a=rc(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let l,u=e.footnoteCounts.get(r);u===void 0?(u=0,e.footnoteOrder.push(r),l=e.footnoteOrder.length):l=o+1,u+=1,e.footnoteCounts.set(r,u);const f={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+a,id:n+"fnref-"+a+(u>1?"-"+u:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(t,f);const h={type:"element",tagName:"sup",properties:{},children:[f]};return e.patch(t,h),e.applyData(t,h)}function rB(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function iB(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function k2(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const a=e.all(t),o=a[0];o&&o.type==="text"?o.value="["+o.value:a.unshift({type:"text",value:"["});const l=a[a.length-1];return l&&l.type==="text"?l.value+=r:a.push({type:"text",value:r}),a}function aB(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return k2(e,t);const a={src:rc(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(a.title=r.title);const o={type:"element",tagName:"img",properties:a,children:[]};return e.patch(t,o),e.applyData(t,o)}function sB(e,t){const n={src:rc(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function oB(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function lB(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return k2(e,t);const a={href:rc(r.url||"")};r.title!==null&&r.title!==void 0&&(a.title=r.title);const o={type:"element",tagName:"a",properties:a,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function cB(e,t){const n={href:rc(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function uB(e,t,n){const r=e.all(t),a=n?dB(n):E2(t),o={},l=[];if(typeof t.checked=="boolean"){const g=r[0];let m;g&&g.type==="element"&&g.tagName==="p"?m=g:(m={type:"element",tagName:"p",properties:{},children:[]},r.unshift(m)),m.children.length>0&&m.children.unshift({type:"text",value:" "}),m.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let u=-1;for(;++u<r.length;){const g=r[u];(a||u!==0||g.type!=="element"||g.tagName!=="p")&&l.push({type:"text",value:`
|
|
577
|
+
`}),g.type==="element"&&g.tagName==="p"&&!a?l.push(...g.children):l.push(g)}const f=r[r.length-1];f&&(a||f.type!=="element"||f.tagName!=="p")&&l.push({type:"text",value:`
|
|
578
|
+
`});const h={type:"element",tagName:"li",properties:o,children:l};return e.patch(t,h),e.applyData(t,h)}function dB(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=E2(n[r])}return t}function E2(e){const t=e.spread;return t??e.children.length>1}function fB(e,t){const n={},r=e.all(t);let a=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++a<r.length;){const l=r[a];if(l.type==="element"&&l.tagName==="li"&&l.properties&&Array.isArray(l.properties.className)&&l.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)}function hB(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function pB(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function mB(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function gB(e,t){const n=e.all(t),r=n.shift(),a=[];if(r){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],l),a.push(l)}if(n.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},u=ax(t.children[1]),f=n2(t.children[t.children.length-1]);u&&f&&(l.position={start:u,end:f}),a.push(l)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(a,!0)};return e.patch(t,o),e.applyData(t,o)}function yB(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",l=n&&n.type==="table"?n.align:void 0,u=l?l.length:t.children.length;let f=-1;const h=[];for(;++f<u;){const m=t.children[f],y={},b=l?l[f]:void 0;b&&(y.align=b);let k={type:"element",tagName:o,properties:y,children:[]};m&&(k.children=e.all(m),e.patch(m,k),k=e.applyData(m,k)),h.push(k)}const g={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!0)};return e.patch(t,g),e.applyData(t,g)}function bB(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Rk=9,Lk=32;function xB(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),a=0;const o=[];for(;r;)o.push(Ik(t.slice(a,r.index),a>0,!0),r[0]),a=r.index+r[0].length,r=n.exec(t);return o.push(Ik(t.slice(a),a>0,!1)),o.join("")}function Ik(e,t,n){let r=0,a=e.length;if(t){let o=e.codePointAt(r);for(;o===Rk||o===Lk;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(a-1);for(;o===Rk||o===Lk;)a--,o=e.codePointAt(a-1)}return a>r?e.slice(r,a):""}function vB(e,t){const n={type:"text",value:xB(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function wB(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const kB={blockquote:X5,break:Z5,code:J5,delete:eB,emphasis:tB,footnoteReference:nB,heading:rB,html:iB,imageReference:aB,image:sB,inlineCode:oB,linkReference:lB,link:cB,listItem:uB,list:fB,paragraph:hB,root:pB,strong:mB,table:gB,tableCell:bB,tableRow:yB,text:vB,thematicBreak:wB,toml:Sf,yaml:Sf,definition:Sf,footnoteDefinition:Sf};function Sf(){}const S2=-1,Qh=0,du=1,hh=2,fx=3,hx=4,px=5,mx=6,N2=7,_2=8,zk=typeof self=="object"?self:globalThis,EB=(e,t)=>{const n=(a,o)=>(e.set(o,a),a),r=a=>{if(e.has(a))return e.get(a);const[o,l]=t[a];switch(o){case Qh:case S2:return n(l,a);case du:{const u=n([],a);for(const f of l)u.push(r(f));return u}case hh:{const u=n({},a);for(const[f,h]of l)u[r(f)]=r(h);return u}case fx:return n(new Date(l),a);case hx:{const{source:u,flags:f}=l;return n(new RegExp(u,f),a)}case px:{const u=n(new Map,a);for(const[f,h]of l)u.set(r(f),r(h));return u}case mx:{const u=n(new Set,a);for(const f of l)u.add(r(f));return u}case N2:{const{name:u,message:f}=l;return n(new zk[u](f),a)}case _2:return n(BigInt(l),a);case"BigInt":return n(Object(BigInt(l)),a);case"ArrayBuffer":return n(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:u}=new Uint8Array(l);return n(new DataView(u),l)}}return n(new zk[o](l),a)};return r},Pk=e=>EB(new Map,e)(0),il="",{toString:SB}={},{keys:NB}=Object,eu=e=>{const t=typeof e;if(t!=="object"||!e)return[Qh,t];const n=SB.call(e).slice(8,-1);switch(n){case"Array":return[du,il];case"Object":return[hh,il];case"Date":return[fx,il];case"RegExp":return[hx,il];case"Map":return[px,il];case"Set":return[mx,il];case"DataView":return[du,n]}return n.includes("Array")?[du,n]:n.includes("Error")?[N2,n]:[hh,n]},Nf=([e,t])=>e===Qh&&(t==="function"||t==="symbol"),_B=(e,t,n,r)=>{const a=(l,u)=>{const f=r.push(l)-1;return n.set(u,f),f},o=l=>{if(n.has(l))return n.get(l);let[u,f]=eu(l);switch(u){case Qh:{let g=l;switch(f){case"bigint":u=_2,g=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+f);g=null;break;case"undefined":return a([S2],l)}return a([u,g],l)}case du:{if(f){let y=l;return f==="DataView"?y=new Uint8Array(l.buffer):f==="ArrayBuffer"&&(y=new Uint8Array(l)),a([f,[...y]],l)}const g=[],m=a([u,g],l);for(const y of l)g.push(o(y));return m}case hh:{if(f)switch(f){case"BigInt":return a([f,l.toString()],l);case"Boolean":case"Number":case"String":return a([f,l.valueOf()],l)}if(t&&"toJSON"in l)return o(l.toJSON());const g=[],m=a([u,g],l);for(const y of NB(l))(e||!Nf(eu(l[y])))&&g.push([o(y),o(l[y])]);return m}case fx:return a([u,l.toISOString()],l);case hx:{const{source:g,flags:m}=l;return a([u,{source:g,flags:m}],l)}case px:{const g=[],m=a([u,g],l);for(const[y,b]of l)(e||!(Nf(eu(y))||Nf(eu(b))))&&g.push([o(y),o(b)]);return m}case mx:{const g=[],m=a([u,g],l);for(const y of l)(e||!Nf(eu(y)))&&g.push(o(y));return m}}const{message:h}=l;return a([u,{name:f,message:h}],l)};return o},Bk=(e,{json:t,lossy:n}={})=>{const r=[];return _B(!(t||n),!!t,new Map,r)(e),r},ph=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Pk(Bk(e,t)):structuredClone(e):(e,t)=>Pk(Bk(e,t));function CB(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function jB(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function AB(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||CB,r=e.options.footnoteBackLabel||jB,a=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},u=[];let f=-1;for(;++f<e.footnoteOrder.length;){const h=e.footnoteById.get(e.footnoteOrder[f]);if(!h)continue;const g=e.all(h),m=String(h.identifier).toUpperCase(),y=rc(m.toLowerCase());let b=0;const k=[],v=e.footnoteCounts.get(m);for(;v!==void 0&&++b<=v;){k.length>0&&k.push({type:"text",value:" "});let C=typeof n=="string"?n:n(f,b);typeof C=="string"&&(C={type:"text",value:C}),k.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+y+(b>1?"-"+b:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(f,b),className:["data-footnote-backref"]},children:Array.isArray(C)?C:[C]})}const S=g[g.length-1];if(S&&S.type==="element"&&S.tagName==="p"){const C=S.children[S.children.length-1];C&&C.type==="text"?C.value+=" ":S.children.push({type:"text",value:" "}),S.children.push(...k)}else g.push(...k);const E={type:"element",tagName:"li",properties:{id:t+"fn-"+y},children:e.wrap(g,!0)};e.patch(h,E),u.push(E)}if(u.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...ph(l),id:"footnote-label"},children:[{type:"text",value:a}]},{type:"text",value:`
|
|
579
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(u,!0)},{type:"text",value:`
|
|
580
|
+
`}]}}const Wu=(function(e){if(e==null)return OB;if(typeof e=="function")return Wh(e);if(typeof e=="object")return Array.isArray(e)?TB(e):MB(e);if(typeof e=="string")return DB(e);throw new Error("Expected function, string, or object as test")});function TB(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Wu(e[n]);return Wh(r);function r(...a){let o=-1;for(;++o<t.length;)if(t[o].apply(this,a))return!0;return!1}}function MB(e){const t=e;return Wh(n);function n(r){const a=r;let o;for(o in e)if(a[o]!==t[o])return!1;return!0}}function DB(e){return Wh(t);function t(n){return n&&n.type===e}}function Wh(e){return t;function t(n,r,a){return!!(RB(n)&&e.call(this,n,typeof r=="number"?r:void 0,a||void 0))}}function OB(){return!0}function RB(e){return e!==null&&typeof e=="object"&&"type"in e}const C2=[],LB=!0,Vy=!1,IB="skip";function j2(e,t,n,r){let a;typeof t=="function"&&typeof n!="function"?(r=n,n=t):a=t;const o=Wu(a),l=r?-1:1;u(e,void 0,[])();function u(f,h,g){const m=f&&typeof f=="object"?f:{};if(typeof m.type=="string"){const b=typeof m.tagName=="string"?m.tagName:typeof m.name=="string"?m.name:void 0;Object.defineProperty(y,"name",{value:"node ("+(f.type+(b?"<"+b+">":""))+")"})}return y;function y(){let b=C2,k,v,S;if((!t||o(f,h,g[g.length-1]||void 0))&&(b=zB(n(f,g)),b[0]===Vy))return b;if("children"in f&&f.children){const E=f;if(E.children&&b[0]!==IB)for(v=(r?E.children.length:-1)+l,S=g.concat(E);v>-1&&v<E.children.length;){const C=E.children[v];if(k=u(C,v,S)(),k[0]===Vy)return k;v=typeof k[1]=="number"?k[1]:v+l}}return b}}}function zB(e){return Array.isArray(e)?e:typeof e=="number"?[LB,e]:e==null?C2:[e]}function Xh(e,t,n,r){let a,o,l;typeof t=="function"&&typeof n!="function"?(o=void 0,l=t,a=n):(o=t,l=n,a=r),j2(e,o,u,a);function u(f,h){const g=h[h.length-1],m=g?g.children.indexOf(f):void 0;return l(f,m,g)}}const Yy={}.hasOwnProperty,PB={};function BB(e,t){const n=t||PB,r=new Map,a=new Map,o=new Map,l={...kB,...n.handlers},u={all:h,applyData:$B,definitionById:r,footnoteById:a,footnoteCounts:o,footnoteOrder:[],handlers:l,one:f,options:n,patch:UB,wrap:qB};return Xh(e,function(g){if(g.type==="definition"||g.type==="footnoteDefinition"){const m=g.type==="definition"?r:a,y=String(g.identifier).toUpperCase();m.has(y)||m.set(y,g)}}),u;function f(g,m){const y=g.type,b=u.handlers[y];if(Yy.call(u.handlers,y)&&b)return b(u,g,m);if(u.options.passThrough&&u.options.passThrough.includes(y)){if("children"in g){const{children:v,...S}=g,E=ph(S);return E.children=u.all(g),E}return ph(g)}return(u.options.unknownHandler||FB)(u,g,m)}function h(g){const m=[];if("children"in g){const y=g.children;let b=-1;for(;++b<y.length;){const k=u.one(y[b],g);if(k){if(b&&y[b-1].type==="break"&&(!Array.isArray(k)&&k.type==="text"&&(k.value=Uk(k.value)),!Array.isArray(k)&&k.type==="element")){const v=k.children[0];v&&v.type==="text"&&(v.value=Uk(v.value))}Array.isArray(k)?m.push(...k):m.push(k)}}}return m}}function UB(e,t){e.position&&(t.position=j4(e))}function $B(e,t){let n=t;if(e&&e.data){const r=e.data.hName,a=e.data.hChildren,o=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const l="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:l}}n.type==="element"&&o&&Object.assign(n.properties,ph(o)),"children"in n&&n.children&&a!==null&&a!==void 0&&(n.children=a)}return n}function FB(e,t){const n=t.data||{},r="value"in t&&!(Yy.call(n,"hProperties")||Yy.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function qB(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
581
|
+
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
582
|
+
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
583
|
+
`}),n}function Uk(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function $k(e,t){const n=BB(e,t),r=n.one(e,void 0),a=AB(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return a&&o.children.push({type:"text",value:`
|
|
584
|
+
`},a),o}function HB(e,t){return e&&"run"in e?async function(n,r){const a=$k(n,{file:r,...t});await e.run(a,r)}:function(n,r){return $k(n,{file:r,...e||t})}}function Fk(e){if(e)throw e}var Ig,qk;function KB(){if(qk)return Ig;qk=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,a=function(h){return typeof Array.isArray=="function"?Array.isArray(h):t.call(h)==="[object Array]"},o=function(h){if(!h||t.call(h)!=="[object Object]")return!1;var g=e.call(h,"constructor"),m=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!g&&!m)return!1;var y;for(y in h);return typeof y>"u"||e.call(h,y)},l=function(h,g){n&&g.name==="__proto__"?n(h,g.name,{enumerable:!0,configurable:!0,value:g.newValue,writable:!0}):h[g.name]=g.newValue},u=function(h,g){if(g==="__proto__")if(e.call(h,g)){if(r)return r(h,g).value}else return;return h[g]};return Ig=function f(){var h,g,m,y,b,k,v=arguments[0],S=1,E=arguments.length,C=!1;for(typeof v=="boolean"&&(C=v,v=arguments[1]||{},S=2),(v==null||typeof v!="object"&&typeof v!="function")&&(v={});S<E;++S)if(h=arguments[S],h!=null)for(g in h)m=u(v,g),y=u(h,g),v!==y&&(C&&y&&(o(y)||(b=a(y)))?(b?(b=!1,k=m&&a(m)?m:[]):k=m&&o(m)?m:{},l(v,{name:g,newValue:f(C,k,y)})):typeof y<"u"&&l(v,{name:g,newValue:y}));return v},Ig}var GB=KB();const zg=Bu(GB);function Qy(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function VB(){const e=[],t={run:n,use:r};return t;function n(...a){let o=-1;const l=a.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);u(null,...a);function u(f,...h){const g=e[++o];let m=-1;if(f){l(f);return}for(;++m<a.length;)(h[m]===null||h[m]===void 0)&&(h[m]=a[m]);a=h,g?YB(g,u)(...h):l(null,...h)}}function r(a){if(typeof a!="function")throw new TypeError("Expected `middelware` to be a function, not "+a);return e.push(a),t}}function YB(e,t){let n;return r;function r(...l){const u=e.length>l.length;let f;u&&l.push(a);try{f=e.apply(this,l)}catch(h){const g=h;if(u&&n)throw g;return a(g)}u||(f&&f.then&&typeof f.then=="function"?f.then(o,a):f instanceof Error?a(f):o(f))}function a(l,...u){n||(n=!0,t(l,...u))}function o(l){a(null,l)}}const Ei={basename:QB,dirname:WB,extname:XB,join:ZB,sep:"/"};function QB(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Xu(e);let n=0,r=-1,a=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;a--;)if(e.codePointAt(a)===47){if(o){n=a+1;break}}else r<0&&(o=!0,r=a+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let l=-1,u=t.length-1;for(;a--;)if(e.codePointAt(a)===47){if(o){n=a+1;break}}else l<0&&(o=!0,l=a+1),u>-1&&(e.codePointAt(a)===t.codePointAt(u--)?u<0&&(r=a):(u=-1,r=l));return n===r?r=l:r<0&&(r=e.length),e.slice(n,r)}function WB(e){if(Xu(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function XB(e){Xu(e);let t=e.length,n=-1,r=0,a=-1,o=0,l;for(;t--;){const u=e.codePointAt(t);if(u===47){if(l){r=t+1;break}continue}n<0&&(l=!0,n=t+1),u===46?a<0?a=t:o!==1&&(o=1):a>-1&&(o=-1)}return a<0||n<0||o===0||o===1&&a===n-1&&a===r+1?"":e.slice(a,n)}function ZB(...e){let t=-1,n;for(;++t<e.length;)Xu(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":JB(n)}function JB(e){Xu(e);const t=e.codePointAt(0)===47;let n=eU(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function eU(e,t){let n="",r=0,a=-1,o=0,l=-1,u,f;for(;++l<=e.length;){if(l<e.length)u=e.codePointAt(l);else{if(u===47)break;u=47}if(u===47){if(!(a===l-1||o===1))if(a!==l-1&&o===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(f=n.lastIndexOf("/"),f!==n.length-1){f<0?(n="",r=0):(n=n.slice(0,f),r=n.length-1-n.lastIndexOf("/")),a=l,o=0;continue}}else if(n.length>0){n="",r=0,a=l,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(a+1,l):n=e.slice(a+1,l),r=l-a-1;a=l,o=0}else u===46&&o>-1?o++:o=-1}return n}function Xu(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const tU={cwd:nU};function nU(){return"/"}function Wy(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function rU(e){if(typeof e=="string")e=new URL(e);else if(!Wy(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return iU(e)}function iU(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const a=new TypeError("File URL path must not include encoded / characters");throw a.code="ERR_INVALID_FILE_URL_PATH",a}}return decodeURIComponent(t)}const Pg=["history","path","basename","stem","extname","dirname"];class A2{constructor(t){let n;t?Wy(t)?n={path:t}:typeof t=="string"||aU(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":tU.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Pg.length;){const o=Pg[r];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let a;for(a in n)Pg.includes(a)||(this[a]=n[a])}get basename(){return typeof this.path=="string"?Ei.basename(this.path):void 0}set basename(t){Ug(t,"basename"),Bg(t,"basename"),this.path=Ei.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Ei.dirname(this.path):void 0}set dirname(t){Hk(this.basename,"dirname"),this.path=Ei.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Ei.extname(this.path):void 0}set extname(t){if(Bg(t,"extname"),Hk(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Ei.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Wy(t)&&(t=rU(t)),Ug(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Ei.basename(this.path,this.extname):void 0}set stem(t){Ug(t,"stem"),Bg(t,"stem"),this.path=Ei.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const a=this.message(t,n,r);throw a.fatal=!0,a}info(t,n,r){const a=this.message(t,n,r);return a.fatal=void 0,a}message(t,n,r){const a=new Hn(t,n,r);return this.path&&(a.name=this.path+":"+a.name,a.file=this.path),a.fatal=!1,this.messages.push(a),a}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Bg(e,t){if(e&&e.includes(Ei.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Ei.sep+"`")}function Ug(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Hk(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function aU(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const sU=(function(e){const r=this.constructor.prototype,a=r[e],o=function(){return a.apply(o,arguments)};return Object.setPrototypeOf(o,r),o}),oU={}.hasOwnProperty;class gx extends sU{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=VB()}copy(){const t=new gx;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(zg(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(qg("data",this.frozen),this.namespace[t]=n,this):oU.call(this.namespace,t)&&this.namespace[t]||void 0:t?(qg("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const a=n.call(t,...r);typeof a=="function"&&this.transformers.use(a)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=_f(t),r=this.parser||this.Parser;return $g("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),$g("process",this.parser||this.Parser),Fg("process",this.compiler||this.Compiler),n?a(void 0,n):new Promise(a);function a(o,l){const u=_f(t),f=r.parse(u);r.run(f,u,function(g,m,y){if(g||!m||!y)return h(g);const b=m,k=r.stringify(b,y);uU(k)?y.value=k:y.result=k,h(g,y)});function h(g,m){g||!m?l(g):o?o(m):n(void 0,m)}}}processSync(t){let n=!1,r;return this.freeze(),$g("processSync",this.parser||this.Parser),Fg("processSync",this.compiler||this.Compiler),this.process(t,a),Gk("processSync","process",n),r;function a(o,l){n=!0,Fk(o),r=l}}run(t,n,r){Kk(t),this.freeze();const a=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?o(void 0,r):new Promise(o);function o(l,u){const f=_f(n);a.run(t,f,h);function h(g,m,y){const b=m||t;g?u(g):l?l(b):r(void 0,b,y)}}}runSync(t,n){let r=!1,a;return this.run(t,n,o),Gk("runSync","run",r),a;function o(l,u){Fk(l),a=u,r=!0}}stringify(t,n){this.freeze();const r=_f(n),a=this.compiler||this.Compiler;return Fg("stringify",a),Kk(t),a(t,r)}use(t,...n){const r=this.attachers,a=this.namespace;if(qg("use",this.frozen),t!=null)if(typeof t=="function")f(t,n);else if(typeof t=="object")Array.isArray(t)?u(t):l(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(h){if(typeof h=="function")f(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[g,...m]=h;f(g,m)}else l(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function l(h){if(!("plugins"in h)&&!("settings"in h))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");u(h.plugins),h.settings&&(a.settings=zg(!0,a.settings,h.settings))}function u(h){let g=-1;if(h!=null)if(Array.isArray(h))for(;++g<h.length;){const m=h[g];o(m)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function f(h,g){let m=-1,y=-1;for(;++m<r.length;)if(r[m][0]===h){y=m;break}if(y===-1)r.push([h,...g]);else if(g.length>0){let[b,...k]=g;const v=r[y][1];Qy(v)&&Qy(b)&&(b=zg(!0,v,b)),r[y]=[h,b,...k]}}}}const lU=new gx().freeze();function $g(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Fg(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function qg(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Kk(e){if(!Qy(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Gk(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function _f(e){return cU(e)?e:new A2(e)}function cU(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function uU(e){return typeof e=="string"||dU(e)}function dU(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const fU="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Vk=[],Yk={allowDangerousHtml:!0},hU=/^(https?|ircs?|mailto|xmpp)$/i,pU=[{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 yx(e){const t=mU(e),n=gU(e);return yU(t.runSync(t.parse(n),n),e)}function mU(e){const t=e.rehypePlugins||Vk,n=e.remarkPlugins||Vk,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Yk}:Yk;return lU().use(W5).use(n).use(HB,r).use(t)}function gU(e){const t=e.children||"",n=new A2;return typeof t=="string"&&(n.value=t),n}function yU(e,t){const n=t.allowedElements,r=t.allowElement,a=t.components,o=t.disallowedElements,l=t.skipHtml,u=t.unwrapDisallowed,f=t.urlTransform||bU;for(const g of pU)Object.hasOwn(t,g.from)&&(""+g.from+(g.to?"use `"+g.to+"` instead":"remove it")+fU+g.id,void 0);return Xh(e,h),O4(e,{Fragment:d.Fragment,components:a,ignoreInvalidStyle:!0,jsx:d.jsx,jsxs:d.jsxs,passKeys:!0,passNode:!0});function h(g,m,y){if(g.type==="raw"&&y&&typeof m=="number")return l?y.children.splice(m,1):y.children[m]={type:"text",value:g.value},m;if(g.type==="element"){let b;for(b in Og)if(Object.hasOwn(Og,b)&&Object.hasOwn(g.properties,b)){const k=g.properties[b],v=Og[b];(v===null||v.includes(g.tagName))&&(g.properties[b]=f(String(k||""),b,g))}}if(g.type==="element"){let b=n?!n.includes(g.tagName):o?o.includes(g.tagName):!1;if(!b&&r&&typeof m=="number"&&(b=!r(g,m,y)),b&&y&&typeof m=="number")return u&&g.children?y.children.splice(m,1,...g.children):y.children.splice(m,1),m}}}function bU(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),a=e.indexOf("/");return t===-1||a!==-1&&t>a||n!==-1&&t>n||r!==-1&&t>r||hU.test(e.slice(0,t))?e:""}function Qk(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,a=n.indexOf(t);for(;a!==-1;)r++,a=n.indexOf(t,a+t.length);return r}function xU(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function vU(e,t,n){const a=Wu((n||{}).ignore||[]),o=wU(t);let l=-1;for(;++l<o.length;)j2(e,"text",u);function u(h,g){let m=-1,y;for(;++m<g.length;){const b=g[m],k=y?y.children:void 0;if(a(b,k?k.indexOf(b):void 0,y))return;y=b}if(y)return f(h,g)}function f(h,g){const m=g[g.length-1],y=o[l][0],b=o[l][1];let k=0;const S=m.children.indexOf(h);let E=!1,C=[];y.lastIndex=0;let N=y.exec(h.value);for(;N;){const _=N.index,D={index:N.index,input:N.input,stack:[...g,h]};let T=b(...N,D);if(typeof T=="string"&&(T=T.length>0?{type:"text",value:T}:void 0),T===!1?y.lastIndex=_+1:(k!==_&&C.push({type:"text",value:h.value.slice(k,_)}),Array.isArray(T)?C.push(...T):T&&C.push(T),k=_+N[0].length,E=!0),!y.global)break;N=y.exec(h.value)}return E?(k<h.value.length&&C.push({type:"text",value:h.value.slice(k)}),m.children.splice(S,1,...C)):C=[h],S+C.length}}function wU(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const a=n[r];t.push([kU(a[0]),EU(a[1])])}return t}function kU(e){return typeof e=="string"?new RegExp(xU(e),"g"):e}function EU(e){return typeof e=="function"?e:function(){return e}}const Hg="phrasing",Kg=["autolink","link","image","label"];function SU(){return{transforms:[MU],enter:{literalAutolink:_U,literalAutolinkEmail:Gg,literalAutolinkHttp:Gg,literalAutolinkWww:Gg},exit:{literalAutolink:TU,literalAutolinkEmail:AU,literalAutolinkHttp:CU,literalAutolinkWww:jU}}}function NU(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Hg,notInConstruct:Kg},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Hg,notInConstruct:Kg},{character:":",before:"[ps]",after:"\\/",inConstruct:Hg,notInConstruct:Kg}]}}function _U(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Gg(e){this.config.enter.autolinkProtocol.call(this,e)}function CU(e){this.config.exit.autolinkProtocol.call(this,e)}function jU(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function AU(e){this.config.exit.autolinkEmail.call(this,e)}function TU(e){this.exit(e)}function MU(e){vU(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,DU],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),OU]],{ignore:["link","linkReference"]})}function DU(e,t,n,r,a){let o="";if(!T2(a)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!RU(n)))return!1;const l=LU(n+r);if(!l[0])return!1;const u={type:"link",title:null,url:o+t+l[0],children:[{type:"text",value:t+l[0]}]};return l[1]?[u,{type:"text",value:l[1]}]:u}function OU(e,t,n,r){return!T2(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function RU(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function LU(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const a=Qk(e,"(");let o=Qk(e,")");for(;r!==-1&&a>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}function T2(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||lo(n)||Vh(n))&&(!t||n!==47)}M2.peek=HU;function IU(){this.buffer()}function zU(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function PU(){this.buffer()}function BU(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function UU(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=di(this.sliceSerialize(e)).toLowerCase(),n.label=t}function $U(e){this.exit(e)}function FU(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=di(this.sliceSerialize(e)).toLowerCase(),n.label=t}function qU(e){this.exit(e)}function HU(){return"["}function M2(e,t,n,r){const a=n.createTracker(r);let o=a.move("[^");const l=n.enter("footnoteReference"),u=n.enter("reference");return o+=a.move(n.safe(n.associationId(e),{after:"]",before:o})),u(),l(),o+=a.move("]"),o}function KU(){return{enter:{gfmFootnoteCallString:IU,gfmFootnoteCall:zU,gfmFootnoteDefinitionLabelString:PU,gfmFootnoteDefinition:BU},exit:{gfmFootnoteCallString:UU,gfmFootnoteCall:$U,gfmFootnoteDefinitionLabelString:FU,gfmFootnoteDefinition:qU}}}function GU(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:M2},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,a,o,l){const u=o.createTracker(l);let f=u.move("[^");const h=o.enter("footnoteDefinition"),g=o.enter("label");return f+=u.move(o.safe(o.associationId(r),{before:f,after:"]"})),g(),f+=u.move("]:"),r.children&&r.children.length>0&&(u.shift(4),f+=u.move((t?`
|
|
585
|
+
`:" ")+o.indentLines(o.containerFlow(r,u.current()),t?D2:VU))),h(),f}}function VU(e,t,n){return t===0?e:D2(e,t,n)}function D2(e,t,n){return(n?"":" ")+e}const YU=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];O2.peek=JU;function QU(){return{canContainEols:["delete"],enter:{strikethrough:XU},exit:{strikethrough:ZU}}}function WU(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:YU}],handlers:{delete:O2}}}function XU(e){this.enter({type:"delete",children:[]},e)}function ZU(e){this.exit(e)}function O2(e,t,n,r){const a=n.createTracker(r),o=n.enter("strikethrough");let l=a.move("~~");return l+=n.containerPhrasing(e,{...a.current(),before:l,after:"~"}),l+=a.move("~~"),o(),l}function JU(){return"~"}function e6(e){return e.length}function t6(e,t){const n=t||{},r=(n.align||[]).concat(),a=n.stringLength||e6,o=[],l=[],u=[],f=[];let h=0,g=-1;for(;++g<e.length;){const v=[],S=[];let E=-1;for(e[g].length>h&&(h=e[g].length);++E<e[g].length;){const C=n6(e[g][E]);if(n.alignDelimiters!==!1){const N=a(C);S[E]=N,(f[E]===void 0||N>f[E])&&(f[E]=N)}v.push(C)}l[g]=v,u[g]=S}let m=-1;if(typeof r=="object"&&"length"in r)for(;++m<h;)o[m]=Wk(r[m]);else{const v=Wk(r);for(;++m<h;)o[m]=v}m=-1;const y=[],b=[];for(;++m<h;){const v=o[m];let S="",E="";v===99?(S=":",E=":"):v===108?S=":":v===114&&(E=":");let C=n.alignDelimiters===!1?1:Math.max(1,f[m]-S.length-E.length);const N=S+"-".repeat(C)+E;n.alignDelimiters!==!1&&(C=S.length+C+E.length,C>f[m]&&(f[m]=C),b[m]=C),y[m]=N}l.splice(1,0,y),u.splice(1,0,b),g=-1;const k=[];for(;++g<l.length;){const v=l[g],S=u[g];m=-1;const E=[];for(;++m<h;){const C=v[m]||"";let N="",_="";if(n.alignDelimiters!==!1){const D=f[m]-(S[m]||0),T=o[m];T===114?N=" ".repeat(D):T===99?D%2?(N=" ".repeat(D/2+.5),_=" ".repeat(D/2-.5)):(N=" ".repeat(D/2),_=N):_=" ".repeat(D)}n.delimiterStart!==!1&&!m&&E.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&C==="")&&(n.delimiterStart!==!1||m)&&E.push(" "),n.alignDelimiters!==!1&&E.push(N),E.push(C),n.alignDelimiters!==!1&&E.push(_),n.padding!==!1&&E.push(" "),(n.delimiterEnd!==!1||m!==h-1)&&E.push("|")}k.push(n.delimiterEnd===!1?E.join("").replace(/ +$/,""):E.join(""))}return k.join(`
|
|
586
|
+
`)}function n6(e){return e==null?"":String(e)}function Wk(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function r6(e,t,n,r){const a=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);const l=n.indentLines(n.containerFlow(e,o.current()),i6);return a(),l}function i6(e,t,n){return">"+(n?"":" ")+e}function a6(e,t){return Xk(e,t.inConstruct,!0)&&!Xk(e,t.notInConstruct,!1)}function Xk(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Zk(e,t,n,r){let a=-1;for(;++a<n.unsafe.length;)if(n.unsafe[a].character===`
|
|
587
|
+
`&&a6(n.stack,n.unsafe[a]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
588
|
+
`}function s6(e,t){const n=String(e);let r=n.indexOf(t),a=r,o=0,l=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===a?++o>l&&(l=o):o=1,a=r+t.length,r=n.indexOf(t,a);return l}function o6(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function l6(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function c6(e,t,n,r){const a=l6(n),o=e.value||"",l=a==="`"?"GraveAccent":"Tilde";if(o6(e,n)){const m=n.enter("codeIndented"),y=n.indentLines(o,u6);return m(),y}const u=n.createTracker(r),f=a.repeat(Math.max(s6(o,a)+1,3)),h=n.enter("codeFenced");let g=u.move(f);if(e.lang){const m=n.enter(`codeFencedLang${l}`);g+=u.move(n.safe(e.lang,{before:g,after:" ",encode:["`"],...u.current()})),m()}if(e.lang&&e.meta){const m=n.enter(`codeFencedMeta${l}`);g+=u.move(" "),g+=u.move(n.safe(e.meta,{before:g,after:`
|
|
589
|
+
`,encode:["`"],...u.current()})),m()}return g+=u.move(`
|
|
590
|
+
`),o&&(g+=u.move(o+`
|
|
591
|
+
`)),g+=u.move(f),h(),g}function u6(e,t,n){return(n?"":" ")+e}function bx(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function d6(e,t,n,r){const a=bx(n),o=a==='"'?"Quote":"Apostrophe",l=n.enter("definition");let u=n.enter("label");const f=n.createTracker(r);let h=f.move("[");return h+=f.move(n.safe(n.associationId(e),{before:h,after:"]",...f.current()})),h+=f.move("]: "),u(),!e.url||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),h+=f.move("<"),h+=f.move(n.safe(e.url,{before:h,after:">",...f.current()})),h+=f.move(">")):(u=n.enter("destinationRaw"),h+=f.move(n.safe(e.url,{before:h,after:e.title?" ":`
|
|
592
|
+
`,...f.current()}))),u(),e.title&&(u=n.enter(`title${o}`),h+=f.move(" "+a),h+=f.move(n.safe(e.title,{before:h,after:a,...f.current()})),h+=f.move(a),u()),l(),h}function f6(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Su(e){return"&#x"+e.toString(16).toUpperCase()+";"}function mh(e,t,n){const r=Il(e),a=Il(t);return r===void 0?a===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:a===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?a===void 0?{inside:!1,outside:!1}:a===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:a===void 0?{inside:!1,outside:!1}:a===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}R2.peek=h6;function R2(e,t,n,r){const a=f6(n),o=n.enter("emphasis"),l=n.createTracker(r),u=l.move(a);let f=l.move(n.containerPhrasing(e,{after:a,before:u,...l.current()}));const h=f.charCodeAt(0),g=mh(r.before.charCodeAt(r.before.length-1),h,a);g.inside&&(f=Su(h)+f.slice(1));const m=f.charCodeAt(f.length-1),y=mh(r.after.charCodeAt(0),m,a);y.inside&&(f=f.slice(0,-1)+Su(m));const b=l.move(a);return o(),n.attentionEncodeSurroundingInfo={after:y.outside,before:g.outside},u+f+b}function h6(e,t,n){return n.options.emphasis||"*"}function p6(e,t){let n=!1;return Xh(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Vy}),!!((!e.depth||e.depth<3)&&cx(e)&&(t.options.setext||n))}function m6(e,t,n,r){const a=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(p6(e,n)){const g=n.enter("headingSetext"),m=n.enter("phrasing"),y=n.containerPhrasing(e,{...o.current(),before:`
|
|
593
|
+
`,after:`
|
|
594
|
+
`});return m(),g(),y+`
|
|
595
|
+
`+(a===1?"=":"-").repeat(y.length-(Math.max(y.lastIndexOf("\r"),y.lastIndexOf(`
|
|
596
|
+
`))+1))}const l="#".repeat(a),u=n.enter("headingAtx"),f=n.enter("phrasing");o.move(l+" ");let h=n.containerPhrasing(e,{before:"# ",after:`
|
|
597
|
+
`,...o.current()});return/^[\t ]/.test(h)&&(h=Su(h.charCodeAt(0))+h.slice(1)),h=h?l+" "+h:l,n.options.closeAtx&&(h+=" "+l),f(),u(),h}L2.peek=g6;function L2(e){return e.value||""}function g6(){return"<"}I2.peek=y6;function I2(e,t,n,r){const a=bx(n),o=a==='"'?"Quote":"Apostrophe",l=n.enter("image");let u=n.enter("label");const f=n.createTracker(r);let h=f.move("![");return h+=f.move(n.safe(e.alt,{before:h,after:"]",...f.current()})),h+=f.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),h+=f.move("<"),h+=f.move(n.safe(e.url,{before:h,after:">",...f.current()})),h+=f.move(">")):(u=n.enter("destinationRaw"),h+=f.move(n.safe(e.url,{before:h,after:e.title?" ":")",...f.current()}))),u(),e.title&&(u=n.enter(`title${o}`),h+=f.move(" "+a),h+=f.move(n.safe(e.title,{before:h,after:a,...f.current()})),h+=f.move(a),u()),h+=f.move(")"),l(),h}function y6(){return"!"}z2.peek=b6;function z2(e,t,n,r){const a=e.referenceType,o=n.enter("imageReference");let l=n.enter("label");const u=n.createTracker(r);let f=u.move("![");const h=n.safe(e.alt,{before:f,after:"]",...u.current()});f+=u.move(h+"]["),l();const g=n.stack;n.stack=[],l=n.enter("reference");const m=n.safe(n.associationId(e),{before:f,after:"]",...u.current()});return l(),n.stack=g,o(),a==="full"||!h||h!==m?f+=u.move(m+"]"):a==="shortcut"?f=f.slice(0,-1):f+=u.move("]"),f}function b6(){return"!"}P2.peek=x6;function P2(e,t,n){let r=e.value||"",a="`",o=-1;for(;new RegExp("(^|[^`])"+a+"([^`]|$)").test(r);)a+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){const l=n.unsafe[o],u=n.compilePattern(l);let f;if(l.atBreak)for(;f=u.exec(r);){let h=f.index;r.charCodeAt(h)===10&&r.charCodeAt(h-1)===13&&h--,r=r.slice(0,h)+" "+r.slice(f.index+1)}}return a+r+a}function x6(){return"`"}function B2(e,t){const n=cx(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}U2.peek=v6;function U2(e,t,n,r){const a=bx(n),o=a==='"'?"Quote":"Apostrophe",l=n.createTracker(r);let u,f;if(B2(e,n)){const g=n.stack;n.stack=[],u=n.enter("autolink");let m=l.move("<");return m+=l.move(n.containerPhrasing(e,{before:m,after:">",...l.current()})),m+=l.move(">"),u(),n.stack=g,m}u=n.enter("link"),f=n.enter("label");let h=l.move("[");return h+=l.move(n.containerPhrasing(e,{before:h,after:"](",...l.current()})),h+=l.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=n.enter("destinationLiteral"),h+=l.move("<"),h+=l.move(n.safe(e.url,{before:h,after:">",...l.current()})),h+=l.move(">")):(f=n.enter("destinationRaw"),h+=l.move(n.safe(e.url,{before:h,after:e.title?" ":")",...l.current()}))),f(),e.title&&(f=n.enter(`title${o}`),h+=l.move(" "+a),h+=l.move(n.safe(e.title,{before:h,after:a,...l.current()})),h+=l.move(a),f()),h+=l.move(")"),u(),h}function v6(e,t,n){return B2(e,n)?"<":"["}$2.peek=w6;function $2(e,t,n,r){const a=e.referenceType,o=n.enter("linkReference");let l=n.enter("label");const u=n.createTracker(r);let f=u.move("[");const h=n.containerPhrasing(e,{before:f,after:"]",...u.current()});f+=u.move(h+"]["),l();const g=n.stack;n.stack=[],l=n.enter("reference");const m=n.safe(n.associationId(e),{before:f,after:"]",...u.current()});return l(),n.stack=g,o(),a==="full"||!h||h!==m?f+=u.move(m+"]"):a==="shortcut"?f=f.slice(0,-1):f+=u.move("]"),f}function w6(){return"["}function xx(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function k6(e){const t=xx(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function E6(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function F2(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function S6(e,t,n,r){const a=n.enter("list"),o=n.bulletCurrent;let l=e.ordered?E6(n):xx(n);const u=e.ordered?l==="."?")":".":k6(n);let f=t&&n.bulletLastUsed?l===n.bulletLastUsed:!1;if(!e.ordered){const g=e.children?e.children[0]:void 0;if((l==="*"||l==="-")&&g&&(!g.children||!g.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(f=!0),F2(n)===l&&g){let m=-1;for(;++m<e.children.length;){const y=e.children[m];if(y&&y.type==="listItem"&&y.children&&y.children[0]&&y.children[0].type==="thematicBreak"){f=!0;break}}}}f&&(l=u),n.bulletCurrent=l;const h=n.containerFlow(e,r);return n.bulletLastUsed=l,n.bulletCurrent=o,a(),h}function N6(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function _6(e,t,n,r){const a=N6(n);let o=n.bulletCurrent||xx(n);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let l=o.length+1;(a==="tab"||a==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(l=Math.ceil(l/4)*4);const u=n.createTracker(r);u.move(o+" ".repeat(l-o.length)),u.shift(l);const f=n.enter("listItem"),h=n.indentLines(n.containerFlow(e,u.current()),g);return f(),h;function g(m,y,b){return y?(b?"":" ".repeat(l))+m:(b?o:o+" ".repeat(l-o.length))+m}}function C6(e,t,n,r){const a=n.enter("paragraph"),o=n.enter("phrasing"),l=n.containerPhrasing(e,r);return o(),a(),l}const j6=Wu(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function A6(e,t,n,r){return(e.children.some(function(l){return j6(l)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function T6(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}q2.peek=M6;function q2(e,t,n,r){const a=T6(n),o=n.enter("strong"),l=n.createTracker(r),u=l.move(a+a);let f=l.move(n.containerPhrasing(e,{after:a,before:u,...l.current()}));const h=f.charCodeAt(0),g=mh(r.before.charCodeAt(r.before.length-1),h,a);g.inside&&(f=Su(h)+f.slice(1));const m=f.charCodeAt(f.length-1),y=mh(r.after.charCodeAt(0),m,a);y.inside&&(f=f.slice(0,-1)+Su(m));const b=l.move(a+a);return o(),n.attentionEncodeSurroundingInfo={after:y.outside,before:g.outside},u+f+b}function M6(e,t,n){return n.options.strong||"*"}function D6(e,t,n,r){return n.safe(e.value,r)}function O6(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function R6(e,t,n){const r=(F2(n)+(n.options.ruleSpaces?" ":"")).repeat(O6(n));return n.options.ruleSpaces?r.slice(0,-1):r}const H2={blockquote:r6,break:Zk,code:c6,definition:d6,emphasis:R2,hardBreak:Zk,heading:m6,html:L2,image:I2,imageReference:z2,inlineCode:P2,link:U2,linkReference:$2,list:S6,listItem:_6,paragraph:C6,root:A6,strong:q2,text:D6,thematicBreak:R6};function L6(){return{enter:{table:I6,tableData:Jk,tableHeader:Jk,tableRow:P6},exit:{codeText:B6,table:z6,tableData:Vg,tableHeader:Vg,tableRow:Vg}}}function I6(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function z6(e){this.exit(e),this.data.inTable=void 0}function P6(e){this.enter({type:"tableRow",children:[]},e)}function Vg(e){this.exit(e)}function Jk(e){this.enter({type:"tableCell",children:[]},e)}function B6(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,U6));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function U6(e,t){return t==="|"?t:e}function $6(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,a=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
598
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:y,table:l,tableCell:f,tableRow:u}};function l(b,k,v,S){return h(g(b,v,S),b.align)}function u(b,k,v,S){const E=m(b,v,S),C=h([E]);return C.slice(0,C.indexOf(`
|
|
599
|
+
`))}function f(b,k,v,S){const E=v.enter("tableCell"),C=v.enter("phrasing"),N=v.containerPhrasing(b,{...S,before:o,after:o});return C(),E(),N}function h(b,k){return t6(b,{align:k,alignDelimiters:r,padding:n,stringLength:a})}function g(b,k,v){const S=b.children;let E=-1;const C=[],N=k.enter("table");for(;++E<S.length;)C[E]=m(S[E],k,v);return N(),C}function m(b,k,v){const S=b.children;let E=-1;const C=[],N=k.enter("tableRow");for(;++E<S.length;)C[E]=f(S[E],b,k,v);return N(),C}function y(b,k,v){let S=H2.inlineCode(b,k,v);return v.stack.includes("tableCell")&&(S=S.replace(/\|/g,"\\$&")),S}}function F6(){return{exit:{taskListCheckValueChecked:eE,taskListCheckValueUnchecked:eE,paragraph:H6}}}function q6(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:K6}}}function eE(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function H6(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const a=t.children;let o=-1,l;for(;++o<a.length;){const u=a[o];if(u.type==="paragraph"){l=u;break}}l===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function K6(e,t,n,r){const a=e.children[0],o=typeof e.checked=="boolean"&&a&&a.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",u=n.createTracker(r);o&&u.move(l);let f=H2.listItem(e,t,n,{...r,...u.current()});return o&&(f=f.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),f;function h(g){return g+l}}function G6(){return[SU(),KU(),QU(),L6(),F6()]}function V6(e){return{extensions:[NU(),GU(e),WU(),$6(e),q6()]}}const Y6={tokenize:e$,partial:!0},K2={tokenize:t$,partial:!0},G2={tokenize:n$,partial:!0},V2={tokenize:r$,partial:!0},Q6={tokenize:i$,partial:!0},Y2={name:"wwwAutolink",tokenize:Z6,previous:W2},Q2={name:"protocolAutolink",tokenize:J6,previous:X2},ya={name:"emailAutolink",tokenize:X6,previous:Z2},Di={};function W6(){return{text:Di}}let Fs=48;for(;Fs<123;)Di[Fs]=ya,Fs++,Fs===58?Fs=65:Fs===91&&(Fs=97);Di[43]=ya;Di[45]=ya;Di[46]=ya;Di[95]=ya;Di[72]=[ya,Q2];Di[104]=[ya,Q2];Di[87]=[ya,Y2];Di[119]=[ya,Y2];function X6(e,t,n){const r=this;let a,o;return l;function l(m){return!Xy(m)||!Z2.call(r,r.previous)||vx(r.events)?n(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),u(m))}function u(m){return Xy(m)?(e.consume(m),u):m===64?(e.consume(m),f):n(m)}function f(m){return m===46?e.check(Q6,g,h)(m):m===45||m===95||Fn(m)?(o=!0,e.consume(m),f):g(m)}function h(m){return e.consume(m),a=!0,f}function g(m){return o&&a&&Zn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(m)):n(m)}}function Z6(e,t,n){const r=this;return a;function a(l){return l!==87&&l!==119||!W2.call(r,r.previous)||vx(r.events)?n(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Y6,e.attempt(K2,e.attempt(G2,o),n),n)(l))}function o(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(l)}}function J6(e,t,n){const r=this;let a="",o=!1;return l;function l(m){return(m===72||m===104)&&X2.call(r,r.previous)&&!vx(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),a+=String.fromCodePoint(m),e.consume(m),u):n(m)}function u(m){if(Zn(m)&&a.length<5)return a+=String.fromCodePoint(m),e.consume(m),u;if(m===58){const y=a.toLowerCase();if(y==="http"||y==="https")return e.consume(m),f}return n(m)}function f(m){return m===47?(e.consume(m),o?h:(o=!0,f)):n(m)}function h(m){return m===null||fh(m)||Lt(m)||lo(m)||Vh(m)?n(m):e.attempt(K2,e.attempt(G2,g),n)(m)}function g(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function e$(e,t,n){let r=0;return a;function a(l){return(l===87||l===119)&&r<3?(r++,e.consume(l),a):l===46&&r===3?(e.consume(l),o):n(l)}function o(l){return l===null?n(l):t(l)}}function t$(e,t,n){let r,a,o;return l;function l(h){return h===46||h===95?e.check(V2,f,u)(h):h===null||Lt(h)||lo(h)||h!==45&&Vh(h)?f(h):(o=!0,e.consume(h),l)}function u(h){return h===95?r=!0:(a=r,r=void 0),e.consume(h),l}function f(h){return a||r||!o?n(h):t(h)}}function n$(e,t){let n=0,r=0;return a;function a(l){return l===40?(n++,e.consume(l),a):l===41&&r<n?o(l):l===33||l===34||l===38||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===60||l===63||l===93||l===95||l===126?e.check(V2,t,o)(l):l===null||Lt(l)||lo(l)?t(l):(e.consume(l),a)}function o(l){return l===41&&r++,e.consume(l),a}}function r$(e,t,n){return r;function r(u){return u===33||u===34||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===63||u===95||u===126?(e.consume(u),r):u===38?(e.consume(u),o):u===93?(e.consume(u),a):u===60||u===null||Lt(u)||lo(u)?t(u):n(u)}function a(u){return u===null||u===40||u===91||Lt(u)||lo(u)?t(u):r(u)}function o(u){return Zn(u)?l(u):n(u)}function l(u){return u===59?(e.consume(u),r):Zn(u)?(e.consume(u),l):n(u)}}function i$(e,t,n){return r;function r(o){return e.consume(o),a}function a(o){return Fn(o)?n(o):t(o)}}function W2(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Lt(e)}function X2(e){return!Zn(e)}function Z2(e){return!(e===47||Xy(e))}function Xy(e){return e===43||e===45||e===46||e===95||Fn(e)}function vx(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const a$={tokenize:h$,partial:!0};function s$(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:u$,continuation:{tokenize:d$},exit:f$}},text:{91:{name:"gfmFootnoteCall",tokenize:c$},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:o$,resolveTo:l$}}}}function o$(e,t,n){const r=this;let a=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;a--;){const f=r.events[a][1];if(f.type==="labelImage"){l=f;break}if(f.type==="gfmFootnoteCall"||f.type==="labelLink"||f.type==="label"||f.type==="image"||f.type==="link")break}return u;function u(f){if(!l||!l._balanced)return n(f);const h=di(r.sliceSerialize({start:l.end,end:r.now()}));return h.codePointAt(0)!==94||!o.includes(h.slice(1))?n(f):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),t(f))}}function l$(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},a={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};a.end.column++,a.end.offset++,a.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},a.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},u=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",a,t],["exit",a,t],["enter",o,t],["enter",l,t],["exit",l,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...u),e}function c$(e,t,n){const r=this,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,l;return u;function u(m){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),f}function f(m){return m!==94?n(m):(e.enter("gfmFootnoteCallMarker"),e.consume(m),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",h)}function h(m){if(o>999||m===93&&!l||m===null||m===91||Lt(m))return n(m);if(m===93){e.exit("chunkString");const y=e.exit("gfmFootnoteCallString");return a.includes(di(r.sliceSerialize(y)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(m)}return Lt(m)||(l=!0),o++,e.consume(m),m===92?g:h}function g(m){return m===91||m===92||m===93?(e.consume(m),o++,h):h(m)}}function u$(e,t,n){const r=this,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,l=0,u;return f;function f(k){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(k){return k===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",g):n(k)}function g(k){if(l>999||k===93&&!u||k===null||k===91||Lt(k))return n(k);if(k===93){e.exit("chunkString");const v=e.exit("gfmFootnoteDefinitionLabelString");return o=di(r.sliceSerialize(v)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),y}return Lt(k)||(u=!0),l++,e.consume(k),k===92?m:g}function m(k){return k===91||k===92||k===93?(e.consume(k),l++,g):g(k)}function y(k){return k===58?(e.enter("definitionMarker"),e.consume(k),e.exit("definitionMarker"),a.includes(o)||a.push(o),pt(e,b,"gfmFootnoteDefinitionWhitespace")):n(k)}function b(k){return t(k)}}function d$(e,t,n){return e.check(Qu,t,e.attempt(a$,t,n))}function f$(e){e.exit("gfmFootnoteDefinition")}function h$(e,t,n){const r=this;return pt(e,a,"gfmFootnoteDefinitionIndent",5);function a(o){const l=r.events[r.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?t(o):n(o)}}function p$(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:a};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function a(l,u){let f=-1;for(;++f<l.length;)if(l[f][0]==="enter"&&l[f][1].type==="strikethroughSequenceTemporary"&&l[f][1]._close){let h=f;for(;h--;)if(l[h][0]==="exit"&&l[h][1].type==="strikethroughSequenceTemporary"&&l[h][1]._open&&l[f][1].end.offset-l[f][1].start.offset===l[h][1].end.offset-l[h][1].start.offset){l[f][1].type="strikethroughSequence",l[h][1].type="strikethroughSequence";const g={type:"strikethrough",start:Object.assign({},l[h][1].start),end:Object.assign({},l[f][1].end)},m={type:"strikethroughText",start:Object.assign({},l[h][1].end),end:Object.assign({},l[f][1].start)},y=[["enter",g,u],["enter",l[h][1],u],["exit",l[h][1],u],["enter",m,u]],b=u.parser.constructs.insideSpan.null;b&&Nr(y,y.length,0,Yh(b,l.slice(h+1,f),u)),Nr(y,y.length,0,[["exit",m,u],["enter",l[f][1],u],["exit",l[f][1],u],["exit",g,u]]),Nr(l,h-1,f-h+3,y),f=h+y.length-2;break}}for(f=-1;++f<l.length;)l[f][1].type==="strikethroughSequenceTemporary"&&(l[f][1].type="data");return l}function o(l,u,f){const h=this.previous,g=this.events;let m=0;return y;function y(k){return h===126&&g[g.length-1][1].type!=="characterEscape"?f(k):(l.enter("strikethroughSequenceTemporary"),b(k))}function b(k){const v=Il(h);if(k===126)return m>1?f(k):(l.consume(k),m++,b);if(m<2&&!n)return f(k);const S=l.exit("strikethroughSequenceTemporary"),E=Il(k);return S._open=!E||E===2&&!!v,S._close=!v||v===2&&!!E,u(k)}}}class m${constructor(){this.map=[]}add(t,n,r){g$(this,t,n,r)}consume(t){if(this.map.sort(function(o,l){return o[0]-l[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let a=r.pop();for(;a;){for(const o of a)t.push(o);a=r.pop()}this.map.length=0}}function g$(e,t,n,r){let a=0;if(!(n===0&&r.length===0)){for(;a<e.map.length;){if(e.map[a][0]===t){e.map[a][1]+=n,e.map[a][2].push(...r);return}a+=1}e.map.push([t,n,r])}}function y$(e,t){let n=!1;const r=[];for(;t<e.length;){const a=e[t];if(n){if(a[0]==="enter")a[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(a[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(a[1].type==="tableDelimiterRow")break}else a[0]==="enter"&&a[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function b$(){return{flow:{null:{name:"table",tokenize:x$,resolveAll:v$}}}}function x$(e,t,n){const r=this;let a=0,o=0,l;return u;function u($){let U=r.events.length-1;for(;U>-1;){const B=r.events[U][1].type;if(B==="lineEnding"||B==="linePrefix")U--;else break}const K=U>-1?r.events[U][1].type:null,Q=K==="tableHead"||K==="tableRow"?T:f;return Q===T&&r.parser.lazy[r.now().line]?n($):Q($)}function f($){return e.enter("tableHead"),e.enter("tableRow"),h($)}function h($){return $===124||(l=!0,o+=1),g($)}function g($){return $===null?n($):$e($)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume($),e.exit("lineEnding"),b):n($):at($)?pt(e,g,"whitespace")($):(o+=1,l&&(l=!1,a+=1),$===124?(e.enter("tableCellDivider"),e.consume($),e.exit("tableCellDivider"),l=!0,g):(e.enter("data"),m($)))}function m($){return $===null||$===124||Lt($)?(e.exit("data"),g($)):(e.consume($),$===92?y:m)}function y($){return $===92||$===124?(e.consume($),m):m($)}function b($){return r.interrupt=!1,r.parser.lazy[r.now().line]?n($):(e.enter("tableDelimiterRow"),l=!1,at($)?pt(e,k,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)($):k($))}function k($){return $===45||$===58?S($):$===124?(l=!0,e.enter("tableCellDivider"),e.consume($),e.exit("tableCellDivider"),v):D($)}function v($){return at($)?pt(e,S,"whitespace")($):S($)}function S($){return $===58?(o+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume($),e.exit("tableDelimiterMarker"),E):$===45?(o+=1,E($)):$===null||$e($)?_($):D($)}function E($){return $===45?(e.enter("tableDelimiterFiller"),C($)):D($)}function C($){return $===45?(e.consume($),C):$===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume($),e.exit("tableDelimiterMarker"),N):(e.exit("tableDelimiterFiller"),N($))}function N($){return at($)?pt(e,_,"whitespace")($):_($)}function _($){return $===124?k($):$===null||$e($)?!l||a!==o?D($):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t($)):D($)}function D($){return n($)}function T($){return e.enter("tableRow"),M($)}function M($){return $===124?(e.enter("tableCellDivider"),e.consume($),e.exit("tableCellDivider"),M):$===null||$e($)?(e.exit("tableRow"),t($)):at($)?pt(e,M,"whitespace")($):(e.enter("data"),I($))}function I($){return $===null||$===124||Lt($)?(e.exit("data"),M($)):(e.consume($),$===92?F:I)}function F($){return $===92||$===124?(e.consume($),I):I($)}}function v$(e,t){let n=-1,r=!0,a=0,o=[0,0,0,0],l=[0,0,0,0],u=!1,f=0,h,g,m;const y=new m$;for(;++n<e.length;){const b=e[n],k=b[1];b[0]==="enter"?k.type==="tableHead"?(u=!1,f!==0&&(tE(y,t,f,h,g),g=void 0,f=0),h={type:"table",start:Object.assign({},k.start),end:Object.assign({},k.end)},y.add(n,0,[["enter",h,t]])):k.type==="tableRow"||k.type==="tableDelimiterRow"?(r=!0,m=void 0,o=[0,0,0,0],l=[0,n+1,0,0],u&&(u=!1,g={type:"tableBody",start:Object.assign({},k.start),end:Object.assign({},k.end)},y.add(n,0,[["enter",g,t]])),a=k.type==="tableDelimiterRow"?2:g?3:1):a&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")?(r=!1,l[2]===0&&(o[1]!==0&&(l[0]=l[1],m=Cf(y,t,o,a,void 0,m),o=[0,0,0,0]),l[2]=n)):k.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(l[0]=l[1],m=Cf(y,t,o,a,void 0,m)),o=l,l=[o[1],n,0,0])):k.type==="tableHead"?(u=!0,f=n):k.type==="tableRow"||k.type==="tableDelimiterRow"?(f=n,o[1]!==0?(l[0]=l[1],m=Cf(y,t,o,a,n,m)):l[1]!==0&&(m=Cf(y,t,l,a,n,m)),a=0):a&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")&&(l[3]=n)}for(f!==0&&tE(y,t,f,h,g),y.consume(t.events),n=-1;++n<t.events.length;){const b=t.events[n];b[0]==="enter"&&b[1].type==="table"&&(b[1]._align=y$(t.events,n))}return e}function Cf(e,t,n,r,a,o){const l=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",u="tableContent";n[0]!==0&&(o.end=Object.assign({},ol(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const f=ol(t.events,n[1]);if(o={type:l,start:Object.assign({},f),end:Object.assign({},f)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const h=ol(t.events,n[2]),g=ol(t.events,n[3]),m={type:u,start:Object.assign({},h),end:Object.assign({},g)};if(e.add(n[2],0,[["enter",m,t]]),r!==2){const y=t.events[n[2]],b=t.events[n[3]];if(y[1].end=Object.assign({},b[1].end),y[1].type="chunkText",y[1].contentType="text",n[3]>n[2]+1){const k=n[2]+1,v=n[3]-n[2]-1;e.add(k,v,[])}}e.add(n[3]+1,0,[["exit",m,t]])}return a!==void 0&&(o.end=Object.assign({},ol(t.events,a)),e.add(a,0,[["exit",o,t]]),o=void 0),o}function tE(e,t,n,r,a){const o=[],l=ol(t.events,n);a&&(a.end=Object.assign({},l),o.push(["exit",a,t])),r.end=Object.assign({},l),o.push(["exit",r,t]),e.add(n+1,0,o)}function ol(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const w$={name:"tasklistCheck",tokenize:E$};function k$(){return{text:{91:w$}}}function E$(e,t,n){const r=this;return a;function a(f){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(f):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),o)}function o(f){return Lt(f)?(e.enter("taskListCheckValueUnchecked"),e.consume(f),e.exit("taskListCheckValueUnchecked"),l):f===88||f===120?(e.enter("taskListCheckValueChecked"),e.consume(f),e.exit("taskListCheckValueChecked"),l):n(f)}function l(f){return f===93?(e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),u):n(f)}function u(f){return $e(f)?t(f):at(f)?e.check({tokenize:S$},t,n)(f):n(f)}}function S$(e,t,n){return pt(e,r,"whitespace");function r(a){return a===null?n(a):t(a)}}function N$(e){return c2([W6(),s$(),p$(e),b$(),k$()])}const _$={};function wx(e){const t=this,n=e||_$,r=t.data(),a=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);a.push(N$(n)),o.push(G6()),l.push(V6(n))}const nE=(function(e,t,n){const r=Wu(n);if(!e||!e.type||!e.children)throw new Error("Expected parent node");if(typeof t=="number"){if(t<0||t===Number.POSITIVE_INFINITY)throw new Error("Expected positive finite number as index")}else if(t=e.children.indexOf(t),t<0)throw new Error("Expected child node or index");for(;++t<e.children.length;)if(r(e.children[t],t,e))return e.children[t]}),bo=(function(e){if(e==null)return A$;if(typeof e=="string")return j$(e);if(typeof e=="object")return C$(e);if(typeof e=="function")return kx(e);throw new Error("Expected function, string, or array as `test`")});function C$(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=bo(e[n]);return kx(r);function r(...a){let o=-1;for(;++o<t.length;)if(t[o].apply(this,a))return!0;return!1}}function j$(e){return kx(t);function t(n){return n.tagName===e}}function kx(e){return t;function t(n,r,a){return!!(T$(n)&&e.call(this,n,typeof r=="number"?r:void 0,a||void 0))}}function A$(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function T$(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const rE=/\n/g,iE=/[\t ]+/g,Zy=bo("br"),aE=bo(P$),M$=bo("p"),sE=bo("tr"),D$=bo(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",z$,B$]),J2=bo(["address","article","aside","blockquote","body","caption","center","dd","dialog","dir","dl","dt","div","figure","figcaption","footer","form,","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","legend","li","listing","main","menu","nav","ol","p","plaintext","pre","section","ul","xmp"]);function O$(e,t){const n=t||{},r="children"in e?e.children:[],a=J2(e),o=nC(e,{whitespace:n.whitespace||"normal"}),l=[];(e.type==="text"||e.type==="comment")&&l.push(...tC(e,{breakBefore:!0,breakAfter:!0}));let u=-1;for(;++u<r.length;)l.push(...eC(r[u],e,{whitespace:o,breakBefore:u?void 0:a,breakAfter:u<r.length-1?Zy(r[u+1]):a}));const f=[];let h;for(u=-1;++u<l.length;){const g=l[u];typeof g=="number"?h!==void 0&&g>h&&(h=g):g&&(h!==void 0&&h>-1&&f.push(`
|
|
600
|
+
`.repeat(h)||" "),h=-1,f.push(g))}return f.join("")}function eC(e,t,n){return e.type==="element"?R$(e,t,n):e.type==="text"?n.whitespace==="normal"?tC(e,n):L$(e):[]}function R$(e,t,n){const r=nC(e,n),a=e.children||[];let o=-1,l=[];if(D$(e))return l;let u,f;for(Zy(e)||sE(e)&&nE(t,e,sE)?f=`
|
|
601
|
+
`:M$(e)?(u=2,f=2):J2(e)&&(u=1,f=1);++o<a.length;)l=l.concat(eC(a[o],e,{whitespace:r,breakBefore:o?void 0:u,breakAfter:o<a.length-1?Zy(a[o+1]):f}));return aE(e)&&nE(t,e,aE)&&l.push(" "),u&&l.unshift(u),f&&l.push(f),l}function tC(e,t){const n=String(e.value),r=[],a=[];let o=0;for(;o<=n.length;){rE.lastIndex=o;const f=rE.exec(n),h=f&&"index"in f?f.index:n.length;r.push(I$(n.slice(o,h).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),o===0?t.breakBefore:!0,h===n.length?t.breakAfter:!0)),o=h+1}let l=-1,u;for(;++l<r.length;)r[l].charCodeAt(r[l].length-1)===8203||l<r.length-1&&r[l+1].charCodeAt(0)===8203?(a.push(r[l]),u=void 0):r[l]?(typeof u=="number"&&a.push(u),a.push(r[l]),u=0):(l===0||l===r.length-1)&&a.push(0);return a}function L$(e){return[String(e.value)]}function I$(e,t,n){const r=[];let a=0,o;for(;a<e.length;){iE.lastIndex=a;const l=iE.exec(e);o=l?l.index:e.length,!a&&!o&&l&&!t&&r.push(""),a!==o&&r.push(e.slice(a,o)),a=l?o+l[0].length:o}return a!==o&&!n&&r.push(""),r.join(" ")}function nC(e,t){if(e.type==="element"){const n=e.properties||{};switch(e.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return n.wrap?"pre-wrap":"pre";case"td":case"th":return n.noWrap?"nowrap":t.whitespace;case"textarea":return"pre-wrap"}}return t.whitespace}function z$(e){return!!(e.properties||{}).hidden}function P$(e){return e.tagName==="td"||e.tagName==="th"}function B$(e){return e.tagName==="dialog"&&!(e.properties||{}).open}function U$(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",a="[a-zA-Z_]\\w*::",l="(?!struct)("+r+"|"+t.optional(a)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",u={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},h={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},g={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},m={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(h,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},y={className:"title",begin:t.optional(a)+e.IDENT_RE,relevance:0},b=t.optional(a)+e.IDENT_RE+"\\s*\\(",k=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],v=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],S=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],E=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],_={type:v,keyword:k,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:S},D={className:"function.dispatch",relevance:0,keywords:{_hint:E},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},T=[D,m,u,n,e.C_BLOCK_COMMENT_MODE,g,h],M={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:_,contains:T.concat([{begin:/\(/,end:/\)/,keywords:_,contains:T.concat(["self"]),relevance:0}]),relevance:0},I={className:"function",begin:"("+l+"[\\*&\\s]+)+"+b,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:_,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:_,relevance:0},{begin:b,returnBegin:!0,contains:[y],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[h,g]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:_,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,h,g,u,{begin:/\(/,end:/\)/,keywords:_,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,h,g,u]}]},u,n,e.C_BLOCK_COMMENT_MODE,m]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:_,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(M,I,D,T,[m,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:_,contains:["self",u]},{begin:e.IDENT_RE+"::",keywords:_},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function $$(e){const t={type:["boolean","byte","word","String"],built_in:["KeyboardController","MouseController","SoftwareSerial","EthernetServer","EthernetClient","LiquidCrystal","RobotControl","GSMVoiceCall","EthernetUDP","EsploraTFT","HttpClient","RobotMotor","WiFiClient","GSMScanner","FileSystem","Scheduler","GSMServer","YunClient","YunServer","IPAddress","GSMClient","GSMModem","Keyboard","Ethernet","Console","GSMBand","Esplora","Stepper","Process","WiFiUDP","GSM_SMS","Mailbox","USBHost","Firmata","PImage","Client","Server","GSMPIN","FileIO","Bridge","Serial","EEPROM","Stream","Mouse","Audio","Servo","File","Task","GPRS","WiFi","Wire","TFT","GSM","SPI","SD"],_hints:["setup","loop","runShellCommandAsynchronously","analogWriteResolution","retrieveCallingNumber","printFirmwareVersion","analogReadResolution","sendDigitalPortPair","noListenOnLocalhost","readJoystickButton","setFirmwareVersion","readJoystickSwitch","scrollDisplayRight","getVoiceCallStatus","scrollDisplayLeft","writeMicroseconds","delayMicroseconds","beginTransmission","getSignalStrength","runAsynchronously","getAsynchronously","listenOnLocalhost","getCurrentCarrier","readAccelerometer","messageAvailable","sendDigitalPorts","lineFollowConfig","countryNameWrite","runShellCommand","readStringUntil","rewindDirectory","readTemperature","setClockDivider","readLightSensor","endTransmission","analogReference","detachInterrupt","countryNameRead","attachInterrupt","encryptionType","readBytesUntil","robotNameWrite","readMicrophone","robotNameRead","cityNameWrite","userNameWrite","readJoystickY","readJoystickX","mouseReleased","openNextFile","scanNetworks","noInterrupts","digitalWrite","beginSpeaker","mousePressed","isActionDone","mouseDragged","displayLogos","noAutoscroll","addParameter","remoteNumber","getModifiers","keyboardRead","userNameRead","waitContinue","processInput","parseCommand","printVersion","readNetworks","writeMessage","blinkVersion","cityNameRead","readMessage","setDataMode","parsePacket","isListening","setBitOrder","beginPacket","isDirectory","motorsWrite","drawCompass","digitalRead","clearScreen","serialEvent","rightToLeft","setTextSize","leftToRight","requestFrom","keyReleased","compassRead","analogWrite","interrupts","WiFiServer","disconnect","playMelody","parseFloat","autoscroll","getPINUsed","setPINUsed","setTimeout","sendAnalog","readSlider","analogRead","beginWrite","createChar","motorsStop","keyPressed","tempoWrite","readButton","subnetMask","debugPrint","macAddress","writeGreen","randomSeed","attachGPRS","readString","sendString","remotePort","releaseAll","mouseMoved","background","getXChange","getYChange","answerCall","getResult","voiceCall","endPacket","constrain","getSocket","writeJSON","getButton","available","connected","findUntil","readBytes","exitValue","readGreen","writeBlue","startLoop","IPAddress","isPressed","sendSysex","pauseMode","gatewayIP","setCursor","getOemKey","tuneWrite","noDisplay","loadImage","switchPIN","onRequest","onReceive","changePIN","playFile","noBuffer","parseInt","overflow","checkPIN","knobRead","beginTFT","bitClear","updateIR","bitWrite","position","writeRGB","highByte","writeRed","setSpeed","readBlue","noStroke","remoteIP","transfer","shutdown","hangCall","beginSMS","endWrite","attached","maintain","noCursor","checkReg","checkPUK","shiftOut","isValid","shiftIn","pulseIn","connect","println","localIP","pinMode","getIMEI","display","noBlink","process","getBand","running","beginSD","drawBMP","lowByte","setBand","release","bitRead","prepare","pointTo","readRed","setMode","noFill","remove","listen","stroke","detach","attach","noTone","exists","buffer","height","bitSet","circle","config","cursor","random","IRread","setDNS","endSMS","getKey","micros","millis","begin","print","write","ready","flush","width","isPIN","blink","clear","press","mkdir","rmdir","close","point","yield","image","BSSID","click","delay","read","text","move","peek","beep","rect","line","open","seek","fill","size","turn","stop","home","find","step","tone","sqrt","RSSI","SSID","end","bit","tan","cos","sin","pow","map","abs","max","min","get","run","put"],literal:["DIGITAL_MESSAGE","FIRMATA_STRING","ANALOG_MESSAGE","REPORT_DIGITAL","REPORT_ANALOG","INPUT_PULLUP","SET_PIN_MODE","INTERNAL2V56","SYSTEM_RESET","LED_BUILTIN","INTERNAL1V1","SYSEX_START","INTERNAL","EXTERNAL","DEFAULT","OUTPUT","INPUT","HIGH","LOW"]},n=U$(e),r=n.keywords;return r.type=[...r.type,...t.type],r.literal=[...r.literal,...t.literal],r.built_in=[...r.built_in,...t.built_in],r._hints=t._hints,n.name="Arduino",n.aliases=["ino"],n.supersetOf="cpp",n}function F$(e){const t=e.regex,n={},r={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},r]});const a={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},o=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),l={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},u={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,a]};a.contains.push(u);const f={match:/\\"/},h={className:"string",begin:/'/,end:/'/},g={match:/\\'/},m={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},y=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],b=e.SHEBANG({binary:`(${y.join("|")})`,relevance:10}),k={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},v=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],S=["true","false"],E={match:/(\/[a-z._-]+)+/},C=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],N=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],_=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],D=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:v,literal:S,built_in:[...C,...N,"set","shopt",..._,...D]},contains:[b,e.SHEBANG(),k,m,o,l,E,u,f,h,g,n]}}function q$(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",a="[a-zA-Z_]\\w*::",l="("+r+"|"+t.optional(a)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",u={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},h={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},g={className:"number",variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},m={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(h,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},y={className:"title",begin:t.optional(a)+e.IDENT_RE,relevance:0},b=t.optional(a)+e.IDENT_RE+"\\s*\\(",S={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","const","static","constexpr","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},E=[m,u,n,e.C_BLOCK_COMMENT_MODE,g,h],C={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:S,contains:E.concat([{begin:/\(/,end:/\)/,keywords:S,contains:E.concat(["self"]),relevance:0}]),relevance:0},N={begin:"("+l+"[\\*&\\s]+)+"+b,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:S,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:S,relevance:0},{begin:b,returnBegin:!0,contains:[e.inherit(y,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:S,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,h,g,u,{begin:/\(/,end:/\)/,keywords:S,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,h,g,u]}]},u,n,e.C_BLOCK_COMMENT_MODE,m]};return{name:"C",aliases:["h"],keywords:S,disableAutodetect:!0,illegal:"</",contains:[].concat(C,N,E,[m,{begin:e.IDENT_RE+"::",keywords:S},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:m,strings:h,keywords:S}}}function H$(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",a="[a-zA-Z_]\\w*::",l="(?!struct)("+r+"|"+t.optional(a)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",u={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},h={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},g={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},m={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(h,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},y={className:"title",begin:t.optional(a)+e.IDENT_RE,relevance:0},b=t.optional(a)+e.IDENT_RE+"\\s*\\(",k=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],v=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],S=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],E=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],_={type:v,keyword:k,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:S},D={className:"function.dispatch",relevance:0,keywords:{_hint:E},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},T=[D,m,u,n,e.C_BLOCK_COMMENT_MODE,g,h],M={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:_,contains:T.concat([{begin:/\(/,end:/\)/,keywords:_,contains:T.concat(["self"]),relevance:0}]),relevance:0},I={className:"function",begin:"("+l+"[\\*&\\s]+)+"+b,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:_,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:_,relevance:0},{begin:b,returnBegin:!0,contains:[y],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[h,g]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:_,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,h,g,u,{begin:/\(/,end:/\)/,keywords:_,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,h,g,u]}]},u,n,e.C_BLOCK_COMMENT_MODE,m]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:_,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(M,I,D,T,[m,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:_,contains:["self",u]},{begin:e.IDENT_RE+"::",keywords:_},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function K$(e){const t=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],n=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"],r=["default","false","null","true"],a=["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"],o=["add","alias","and","ascending","args","async","await","by","descending","dynamic","equals","file","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","record","remove","required","scoped","select","set","unmanaged","value|0","var","when","where","with","yield"],l={keyword:a.concat(o),built_in:t,literal:r},u=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),f={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},h={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},g={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},m=e.inherit(g,{illegal:/\n/}),y={className:"subst",begin:/\{/,end:/\}/,keywords:l},b=e.inherit(y,{illegal:/\n/}),k={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,b]},v={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},y]},S=e.inherit(v,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},b]});y.contains=[v,k,g,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,f,e.C_BLOCK_COMMENT_MODE],b.contains=[S,k,m,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,f,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const E={variants:[h,v,k,g,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},C={begin:"<",end:">",contains:[{beginKeywords:"in out"},u]},N=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",_={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:l,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"<!--|-->"},{begin:"</?",end:">"}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},E,f,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},u,C,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[u,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[u,C,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+N+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:l,contains:[{beginKeywords:n.join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,C],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,relevance:0,contains:[E,f,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},_]}}const G$=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),V$=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],Y$=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],Q$=[...V$,...Y$],W$=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),X$=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),Z$=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),J$=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function e9(e){const t=e.regex,n=G$(e),r={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},a="and or not only",o=/@-?\w[\w]*(-\w+)*/,l="[a-zA-Z-][a-zA-Z0-9_-]*",u=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[n.BLOCK_COMMENT,r,n.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+l,relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+X$.join("|")+")"},{begin:":(:)?("+Z$.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+J$.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,...u,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...u,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:o},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:a,attribute:W$.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...u,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+Q$.join("|")+")\\b"}]}}function t9(e){const t=e.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:t.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:t.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}function n9(e){const o={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:o,illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",variants:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{match:/-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,relevance:0},{match:/-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b0[oO](_?[0-7])*i?/,relevance:0},{match:/-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,relevance:0}]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:o,illegal:/["']/}]}]}}function r9(e){const t=e.regex,n=/[_A-Za-z][_0-9A-Za-z]*/;return{name:"GraphQL",aliases:["gql"],case_insensitive:!0,disableAutodetect:!1,keywords:{keyword:["query","mutation","subscription","type","input","schema","directive","interface","union","scalar","fragment","enum","on"],literal:["true","false","null"]},contains:[e.HASH_COMMENT_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,{scope:"punctuation",match:/[.]{3}/,relevance:0},{scope:"punctuation",begin:/[\!\(\)\:\=\[\]\{\|\}]{1}/,relevance:0},{scope:"variable",begin:/\$/,end:/\W/,excludeEnd:!0,relevance:0},{scope:"meta",match:/@\w+/,excludeEnd:!0},{scope:"symbol",begin:t.concat(n,t.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}}function i9(e){const t=e.regex,n={className:"number",relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:e.NUMBER_RE}]},r=e.COMMENT();r.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const a={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},o={className:"literal",begin:/\bon|off|true|false|yes|no\b/},l={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},u={begin:/\[/,end:/\]/,contains:[r,o,a,l,n,"self"],relevance:0},f=/[A-Za-z0-9_-]+/,h=/"(\\"|[^"])*"/,g=/'[^']*'/,m=t.either(f,h,g),y=t.concat(m,"(\\s*\\.\\s*",m,")*",t.lookahead(/\s*=\s*[^#\s]/));return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[r,{className:"section",begin:/\[+/,end:/\]+/},{begin:y,className:"attr",starts:{end:/$/,contains:[r,u,o,a,l,n]}}]}}var ll="[0-9](_*[0-9])*",jf=`\\.(${ll})`,Af="[0-9a-fA-F](_*[0-9a-fA-F])*",oE={className:"number",variants:[{begin:`(\\b(${ll})((${jf})|\\.)?|(${jf}))[eE][+-]?(${ll})[fFdD]?\\b`},{begin:`\\b(${ll})((${jf})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${jf})[fFdD]?\\b`},{begin:`\\b(${ll})[fFdD]\\b`},{begin:`\\b0[xX]((${Af})\\.?|(${Af})?\\.(${Af}))[pP][+-]?(${ll})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${Af})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function rC(e,t,n){return n===-1?"":e.replace(t,r=>rC(e,t,n-1))}function a9(e){const t=e.regex,n="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",r=n+rC("(?:<"+n+"~~~(?:\\s*,\\s*"+n+"~~~)*>)?",/~~~/g,2),f={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},h={className:"meta",begin:"@"+n,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},g={className:"params",begin:/\(/,end:/\)/,keywords:f,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:f,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,n],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[t.concat(/(?!else)/,n),/\s+/,n,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,n],className:{1:"keyword",3:"title.class"},contains:[g,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+r+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:f,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:f,relevance:0,contains:[h,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,oE,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},oE,h]}}const lE="[A-Za-z$_][0-9A-Za-z$_]*",s9=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],o9=["true","false","null","undefined","NaN","Infinity"],iC=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],aC=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],sC=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],l9=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],c9=[].concat(sC,iC,aC);function u9(e){const t=e.regex,n=(W,{after:G})=>{const O="</"+W[0].slice(1);return W.input.indexOf(O,G)!==-1},r=lE,a={begin:"<>",end:"</>"},o=/<[A-Za-z0-9\\._:-]+\s*\/>/,l={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(W,G)=>{const O=W[0].length+W.index,L=W.input[O];if(L==="<"||L===","){G.ignoreMatch();return}L===">"&&(n(W,{after:O})||G.ignoreMatch());let V;const R=W.input.substring(O);if(V=R.match(/^\s*=/)){G.ignoreMatch();return}if((V=R.match(/^\s+extends\s+/))&&V.index===0){G.ignoreMatch();return}}},u={$pattern:lE,keyword:s9,literal:o9,built_in:c9,"variable.language":l9},f="[0-9](_?[0-9])*",h=`\\.(${f})`,g="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",m={className:"number",variants:[{begin:`(\\b(${g})((${h})|\\.)?|(${h}))[eE][+-]?(${f})\\b`},{begin:`\\b(${g})\\b((${h})\\b|\\.)?|(${h})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},y={className:"subst",begin:"\\$\\{",end:"\\}",keywords:u,contains:[]},b={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,y],subLanguage:"xml"}},k={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,y],subLanguage:"css"}},v={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,y],subLanguage:"graphql"}},S={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,y]},C={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},N=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,b,k,v,S,{match:/\$\d+/},m];y.contains=N.concat({begin:/\{/,end:/\}/,keywords:u,contains:["self"].concat(N)});const _=[].concat(C,y.contains),D=_.concat([{begin:/(\s*)\(/,end:/\)/,keywords:u,contains:["self"].concat(_)}]),T={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:u,contains:D},M={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,"(",t.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},I={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...iC,...aC]}},F={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},$={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[T],illegal:/%/},U={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function K(W){return t.concat("(?!",W.join("|"),")")}const Q={match:t.concat(/\b/,K([...sC,"super","import"].map(W=>`${W}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},B={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},H={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},T]},z="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",Y={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(z)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[T]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:u,exports:{PARAMS_CONTAINS:D,CLASS_REFERENCE:I},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),F,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,b,k,v,S,C,{match:/\$\d+/},m,I,{scope:"attr",match:r+t.lookahead(":"),relevance:0},Y,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[C,e.REGEXP_MODE,{className:"function",begin:z,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:u,contains:D}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:a.begin,end:a.end},{match:o},{begin:l.begin,"on:begin":l.isTrulyOpeningTag,end:l.end}],subLanguage:"xml",contains:[{begin:l.begin,end:l.end,skip:!0,contains:["self"]}]}]},$,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[T,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},B,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[T]},Q,U,M,H,{match:/\$[(.]/}]}}function d9(e){const t={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:"punctuation",relevance:0},r=["true","false","null"],a={scope:"literal",beginKeywords:r.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:r},contains:[t,n,e.QUOTE_STRING_MODE,a,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}var cl="[0-9](_*[0-9])*",Tf=`\\.(${cl})`,Mf="[0-9a-fA-F](_*[0-9a-fA-F])*",f9={className:"number",variants:[{begin:`(\\b(${cl})((${Tf})|\\.)?|(${Tf}))[eE][+-]?(${cl})[fFdD]?\\b`},{begin:`\\b(${cl})((${Tf})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${Tf})[fFdD]?\\b`},{begin:`\\b(${cl})[fFdD]\\b`},{begin:`\\b0[xX]((${Mf})\\.?|(${Mf})?\\.(${Mf}))[pP][+-]?(${cl})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${Mf})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function h9(e){const t={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},n={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},r={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},a={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},o={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},l={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[o,a]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,o,a]}]};a.contains.push(l);const u={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},f={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(l,{className:"string"}),"self"]}]},h=f9,g=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),m={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},y=m;return y.variants[1].contains=[m],m.variants[1].contains=[y],{name:"Kotlin",aliases:["kt","kts"],keywords:t,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,g,n,r,u,f,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:t,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[m,e.C_LINE_COMMENT_MODE,g],relevance:0},e.C_LINE_COMMENT_MODE,g,u,f,l,e.C_NUMBER_MODE]},g]},{begin:[/class|interface|trait/,/\s+/,e.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},e.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},u,f]},l,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:`
|
|
602
|
+
`},h]}}const p9=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),m9=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],g9=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],y9=[...m9,...g9],b9=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),oC=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),lC=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),x9=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse(),v9=oC.concat(lC).sort().reverse();function w9(e){const t=p9(e),n=v9,r="and or not only",a="[\\w-]+",o="("+a+"|@\\{"+a+"\\})",l=[],u=[],f=function(N){return{className:"string",begin:"~?"+N+".*?"+N}},h=function(N,_,D){return{className:N,begin:_,relevance:D}},g={$pattern:/[a-z-]+/,keyword:r,attribute:b9.join(" ")},m={begin:"\\(",end:"\\)",contains:u,keywords:g,relevance:0};u.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,f("'"),f('"'),t.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},t.HEXCOLOR,m,h("variable","@@?"+a,10),h("variable","@\\{"+a+"\\}"),h("built_in","~?`[^`]*?`"),{className:"attribute",begin:a+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},t.IMPORTANT,{beginKeywords:"and not"},t.FUNCTION_DISPATCH);const y=u.concat({begin:/\{/,end:/\}/,contains:l}),b={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(u)},k={begin:o+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+x9.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:u}}]},v={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:g,returnEnd:!0,contains:u,relevance:0}},S={className:"variable",variants:[{begin:"@"+a+"\\s*:",relevance:15},{begin:"@"+a}],starts:{end:"[;}]",returnEnd:!0,contains:y}},E={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:o,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,b,h("keyword","all\\b"),h("variable","@\\{"+a+"\\}"),{begin:"\\b("+y9.join("|")+")\\b",className:"selector-tag"},t.CSS_NUMBER_MODE,h("selector-tag",o,0),h("selector-id","#"+o),h("selector-class","\\."+o,0),h("selector-tag","&",0),t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+oC.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+lC.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:y},{begin:"!important"},t.FUNCTION_DISPATCH]},C={begin:a+`:(:)?(${n.join("|")})`,returnBegin:!0,contains:[E]};return l.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,v,S,C,k,E,b,t.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:l}}function k9(e){const t="\\[=*\\[",n="\\]=*\\]",r={begin:t,end:n,contains:["self"]},a=[e.COMMENT("--(?!"+t+")","$"),e.COMMENT("--"+t,n,{contains:[r],relevance:10})];return{name:"Lua",aliases:["pluto"],keywords:{$pattern:e.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:a.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[e.inherit(e.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:a}].concat(a)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:t,end:n,contains:[r],relevance:5}])}}function E9(e){const t={className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},n={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,t]},r={className:"variable",begin:/\$\([\w-]+\s/,end:/\)/,keywords:{built_in:"subst patsubst strip findstring filter filter-out sort word wordlist firstword lastword dir notdir suffix basename addsuffix addprefix join wildcard realpath abspath error warning shell origin flavor foreach if or and call eval file value"},contains:[t,n]},a={begin:"^"+e.UNDERSCORE_IDENT_RE+"\\s*(?=[:+?]?=)"},o={className:"meta",begin:/^\.PHONY:/,end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:".PHONY"}},l={className:"section",begin:/^[^\s]+:/,end:/$/,contains:[t]};return{name:"Makefile",aliases:["mk","mak","make"],keywords:{$pattern:/[\w-]+/,keyword:"define endef undefine ifdef ifndef ifeq ifneq else endif include -include sinclude override export unexport private vpath"},contains:[e.HASH_COMMENT_MODE,t,n,r,a,o,l]}}function S9(e){const t=e.regex,n={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},r={begin:"^[-\\*]{3,}",end:"$"},a={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},o={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},l={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},u=/[A-Za-z][A-Za-z0-9+.-]*/,f={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,u,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},h={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},g={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},m=e.inherit(h,{contains:[]}),y=e.inherit(g,{contains:[]});h.contains.push(y),g.contains.push(m);let b=[n,f];return[h,g,m,y].forEach(E=>{E.contains=E.contains.concat(b)}),b=b.concat(h,g),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:b},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:b}]}]},n,o,h,g,{className:"quote",begin:"^>\\s+",contains:b,end:"$"},a,r,f,l,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function N9(e){const t={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},n=/[a-zA-Z@][a-zA-Z0-9_]*/,u={"variable.language":["this","super"],$pattern:n,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},f={$pattern:n,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:u,illegal:"</",contains:[t,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{className:"string",variants:[{begin:'@"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]}]},{className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),{className:"string",begin:/<.*?>/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+f.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:f,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}function _9(e){const t=e.regex,n=["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","class","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","field","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","method","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"],r=/[dualxmsipngr]{0,12}/,a={$pattern:/[\w.]+/,keyword:n.join(" ")},o={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:a},l={begin:/->\{/,end:/\}/},u={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},f={scope:"variable",variants:[{begin:/\$\d/},{begin:t.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[u]},h={className:"number",variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},g=[e.BACKSLASH_ESCAPE,o,f],m=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],y=(v,S,E="\\1")=>{const C=E==="\\1"?E:t.concat(E,S);return t.concat(t.concat("(?:",v,")"),S,/(?:\\.|[^\\\/])*?/,C,/(?:\\.|[^\\\/])*?/,E,r)},b=(v,S,E)=>t.concat(t.concat("(?:",v,")"),S,/(?:\\.|[^\\\/])*?/,E,r),k=[f,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),l,{className:"string",contains:g,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},h,{begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[e.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:y("s|tr|y",t.either(...m,{capture:!0}))},{begin:y("s|tr|y","\\(","\\)")},{begin:y("s|tr|y","\\[","\\]")},{begin:y("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:b("(?:m|qr)?",/\//,/\//)},{begin:b("m|qr",t.either(...m,{capture:!0}),/\1/)},{begin:b("m|qr",/\(/,/\)/)},{begin:b("m|qr",/\[/,/\]/)},{begin:b("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,u]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,u,h]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return o.contains=k,l.contains=k,{name:"Perl",aliases:["pl","pm"],keywords:a,contains:k}}function C9(e){const t=e.regex,n=/(?![A-Za-z0-9])(?![$])/,r=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,n),a=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,n),o=t.concat(/[A-Z]+/,n),l={scope:"variable",match:"\\$+"+r},u={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},f={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},h=e.inherit(e.APOS_STRING_MODE,{illegal:null}),g=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(f)}),m={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(f),"on:begin":(B,H)=>{H.data._beginMatch=B[1]||B[2]},"on:end":(B,H)=>{H.data._beginMatch!==B[1]&&H.ignoreMatch()}},y=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),b=`[
|
|
603
|
+
]`,k={scope:"string",variants:[g,h,m,y]},v={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},S=["false","null","true"],E=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],C=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],_={keyword:E,literal:(B=>{const H=[];return B.forEach(z=>{H.push(z),z.toLowerCase()===z?H.push(z.toUpperCase()):H.push(z.toLowerCase())}),H})(S),built_in:C},D=B=>B.map(H=>H.replace(/\|\d+$/,"")),T={variants:[{match:[/new/,t.concat(b,"+"),t.concat("(?!",D(C).join("\\b|"),"\\b)"),a],scope:{1:"keyword",4:"title.class"}}]},M=t.concat(r,"\\b(?!\\()"),I={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),M],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[a,t.concat(/::/,t.lookahead(/(?!class\b)/)),M],scope:{1:"title.class",3:"variable.constant"}},{match:[a,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[a,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},F={scope:"attr",match:t.concat(r,t.lookahead(":"),t.lookahead(/(?!::)/))},$={relevance:0,begin:/\(/,end:/\)/,keywords:_,contains:[F,l,I,e.C_BLOCK_COMMENT_MODE,k,v,T]},U={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",D(E).join("\\b|"),"|",D(C).join("\\b|"),"\\b)"),r,t.concat(b,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[$]};$.contains.push(U);const K=[F,I,e.C_BLOCK_COMMENT_MODE,k,v,T],Q={begin:t.concat(/#\[\s*\\?/,t.either(a,o)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:S,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:S,keyword:["new","array"]},contains:["self",...K]},...K,{scope:"meta",variants:[{match:a},{match:o}]}]};return{case_insensitive:!1,keywords:_,contains:[Q,e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},u,{scope:"variable.language",match:/\$this\b/},l,U,I,{match:[/const/,/\s/,r],scope:{1:"keyword",3:"variable.constant"}},T,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:_,contains:["self",Q,l,I,e.C_BLOCK_COMMENT_MODE,k,v]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},e.UNDERSCORE_TITLE_MODE]},k,v]}}function j9(e){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},e.inherit(e.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}function A9(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function T9(e){const t=e.regex,n=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),r=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],u={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:r,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},f={className:"meta",begin:/^(>>>|\.\.\.) /},h={className:"subst",begin:/\{/,end:/\}/,keywords:u,illegal:/#/},g={begin:/\{\{/,relevance:0},m={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,f],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,f],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,f,g,h]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,f,g,h]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,g,h]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,g,h]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},y="[0-9](_?[0-9])*",b=`(\\b(${y}))?\\.(${y})|\\b(${y})\\.`,k=`\\b|${r.join("|")}`,v={className:"number",relevance:0,variants:[{begin:`(\\b(${y})|(${b}))[eE][+-]?(${y})[jJ]?(?=${k})`},{begin:`(${b})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${k})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${k})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${k})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${k})`},{begin:`\\b(${y})[jJ](?=${k})`}]},S={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:u,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},E={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:u,contains:["self",f,v,m,e.HASH_COMMENT_MODE]}]};return h.contains=[m,v,f],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:u,illegal:/(<\/|\?)|=>/,contains:[f,v,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},m,S,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[E]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[v,E,m]}]}}function M9(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function D9(e){const t=e.regex,n=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,r=t.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),a=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,o=t.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:n,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[e.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:t.lookahead(t.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:n},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),e.HASH_COMMENT_MODE,{scope:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[a,r]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,r]},{scope:{1:"punctuation",2:"number"},match:[o,r]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,r]}]},{scope:{3:"operator"},match:[n,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:a},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:o},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}function O9(e){const t=e.regex,n="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",r=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),a=t.concat(r,/(::\w+)*/),l={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},u={className:"doctag",begin:"@[A-Za-z]+"},f={begin:"#<",end:">"},h=[e.COMMENT("#","$",{contains:[u]}),e.COMMENT("^=begin","^=end",{contains:[u],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],g={className:"subst",begin:/#\{/,end:/\}/,keywords:l},m={className:"string",contains:[e.BACKSLASH_ESCAPE,g],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:t.concat(/<<[-~]?'?/,t.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,g]})]}]},y="[1-9](_?[0-9])*|0",b="[0-9](_?[0-9])*",k={className:"number",relevance:0,variants:[{begin:`\\b(${y})(\\.(${b}))?([eE][+-]?(${b})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},v={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:l}]},T=[m,{variants:[{match:[/class\s+/,a,/\s+<\s+/,a]},{match:[/\b(class|module)\s+/,a]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:l},{match:[/(include|extend)\s+/,a],scope:{2:"title.class"},keywords:l},{relevance:0,match:[a,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:r,scope:"title.class"},{match:[/def/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[v]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[m,{begin:n}],relevance:0},k,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:l},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,g],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(f,h),relevance:0}].concat(f,h);g.contains=T,v.contains=T;const $=[{begin:/^\s*=>/,starts:{end:"$",contains:T}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:l,contains:T}}];return h.unshift(f),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:l,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat($).concat(h).concat(T)}}function R9(e){const t=e.regex,n=/(r#)?/,r=t.concat(n,e.UNDERSCORE_IDENT_RE),a=t.concat(n,e.IDENT_RE),o={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let|for|while|if|else|match\b)/,a,t.lookahead(/\s*\(/))},l="([ui](8|16|32|64|128|size)|f(32|64))?",u=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],f=["true","false","Some","None","Ok","Err"],h=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],g=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:g,keyword:u,literal:f,built_in:h},illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),e.inherit(e.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*(?!')/},{scope:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'/,end:/'/,contains:[{scope:"char.escape",match:/\\('|\w|x\w{2}|u\w{4}|U\w{8})/}]}]},{className:"number",variants:[{begin:"\\b0b([01_]+)"+l},{begin:"\\b0o([0-7_]+)"+l},{begin:"\\b0x([A-Fa-f0-9_]+)"+l},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+l}],relevance:0},{begin:[/fn/,/\s+/,r],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,r],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,r,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,r],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,r],className:{1:"keyword",3:"title.class"}},{begin:e.IDENT_RE+"::",keywords:{keyword:"Self",built_in:h,type:g}},{className:"punctuation",begin:"->"},o]}}const L9=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),I9=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],z9=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],P9=[...I9,...z9],B9=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),U9=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),$9=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),F9=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function q9(e){const t=L9(e),n=$9,r=U9,a="@[a-z-]+",o="and or not only",u={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+P9.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+r.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+n.join("|")+")"},u,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+F9.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[t.BLOCK_COMMENT,u,t.HEXCOLOR,t.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.IMPORTANT,t.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:a,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:o,attribute:B9.join(" ")},contains:[{begin:a,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},u,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.HEXCOLOR,t.CSS_NUMBER_MODE]},t.FUNCTION_DISPATCH]}}function H9(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function K9(e){const t=e.regex,n=e.COMMENT("--","$"),r={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},a={begin:/"/,end:/"/,contains:[{match:/""/}]},o=["true","false","unknown"],l=["double precision","large object","with timezone","without timezone"],u=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],f=["add","asc","collation","desc","final","first","last","view"],h=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],g=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],m=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],y=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],b=g,k=[...h,...f].filter(D=>!g.includes(D)),v={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},S={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},E={match:t.concat(/\b/,t.either(...b),/\s*\(/),relevance:0,keywords:{built_in:b}};function C(D){return t.concat(/\b/,t.either(...D.map(T=>T.replace(/\s+/,"\\s+"))),/\b/)}const N={scope:"keyword",match:C(y),relevance:0};function _(D,{exceptions:T,when:M}={}){const I=M;return T=T||[],D.map(F=>F.match(/\|\d+$/)||T.includes(F)?F:I(F)?`${F}|0`:F)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:_(k,{when:D=>D.length<3}),literal:o,type:u,built_in:m},contains:[{scope:"type",match:C(l)},N,E,v,r,a,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,S]}}function cC(e){return e?typeof e=="string"?e:e.source:null}function tu(e){return Mt("(?=",e,")")}function Mt(...e){return e.map(n=>cC(n)).join("")}function G9(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function Qn(...e){return"("+(G9(e).capture?"":"?:")+e.map(r=>cC(r)).join("|")+")"}const Ex=e=>Mt(/\b/,e,/\w$/.test(e)?/\b/:/\B/),V9=["Protocol","Type"].map(Ex),cE=["init","self"].map(Ex),Y9=["Any","Self"],Yg=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],uE=["false","nil","true"],Q9=["assignment","associativity","higherThan","left","lowerThan","none","right"],W9=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],dE=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],uC=Qn(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),dC=Qn(uC,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),Qg=Mt(uC,dC,"*"),fC=Qn(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),gh=Qn(fC,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),ki=Mt(fC,gh,"*"),Df=Mt(/[A-Z]/,gh,"*"),X9=["attached","autoclosure",Mt(/convention\(/,Qn("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",Mt(/objc\(/,ki,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],Z9=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function J9(e){const t={match:/\s+/,relevance:0},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),r=[e.C_LINE_COMMENT_MODE,n],a={match:[/\./,Qn(...V9,...cE)],className:{2:"keyword"}},o={match:Mt(/\./,Qn(...Yg)),relevance:0},l=Yg.filter(we=>typeof we=="string").concat(["_|0"]),u=Yg.filter(we=>typeof we!="string").concat(Y9).map(Ex),f={variants:[{className:"keyword",match:Qn(...u,...cE)}]},h={$pattern:Qn(/\b\w+/,/#\w+/),keyword:l.concat(W9),literal:uE},g=[a,o,f],m={match:Mt(/\./,Qn(...dE)),relevance:0},y={className:"built_in",match:Mt(/\b/,Qn(...dE),/(?=\()/)},b=[m,y],k={match:/->/,relevance:0},v={className:"operator",relevance:0,variants:[{match:Qg},{match:`\\.(\\.|${dC})+`}]},S=[k,v],E="([0-9]_*)+",C="([0-9a-fA-F]_*)+",N={className:"number",relevance:0,variants:[{match:`\\b(${E})(\\.(${E}))?([eE][+-]?(${E}))?\\b`},{match:`\\b0x(${C})(\\.(${C}))?([pP][+-]?(${E}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},_=(we="")=>({className:"subst",variants:[{match:Mt(/\\/,we,/[0\\tnr"']/)},{match:Mt(/\\/,we,/u\{[0-9a-fA-F]{1,8}\}/)}]}),D=(we="")=>({className:"subst",match:Mt(/\\/,we,/[\t ]*(?:[\r\n]|\r\n)/)}),T=(we="")=>({className:"subst",label:"interpol",begin:Mt(/\\/,we,/\(/),end:/\)/}),M=(we="")=>({begin:Mt(we,/"""/),end:Mt(/"""/,we),contains:[_(we),D(we),T(we)]}),I=(we="")=>({begin:Mt(we,/"/),end:Mt(/"/,we),contains:[_(we),T(we)]}),F={className:"string",variants:[M(),M("#"),M("##"),M("###"),I(),I("#"),I("##"),I("###")]},$=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],U={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:$},K=we=>{const ut=Mt(we,/\//),Bt=Mt(/\//,we);return{begin:ut,end:Bt,contains:[...$,{scope:"comment",begin:`#(?!.*${Bt})`,end:/$/}]}},Q={scope:"regexp",variants:[K("###"),K("##"),K("#"),U]},B={match:Mt(/`/,ki,/`/)},H={className:"variable",match:/\$\d+/},z={className:"variable",match:`\\$${gh}+`},Y=[B,H,z],W={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:Z9,contains:[...S,N,F]}]}},G={scope:"keyword",match:Mt(/@/,Qn(...X9),tu(Qn(/\(/,/\s+/)))},O={scope:"meta",match:Mt(/@/,ki)},L=[W,G,O],V={match:tu(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:Mt(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,gh,"+")},{className:"type",match:Df,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:Mt(/\s+&\s+/,tu(Df)),relevance:0}]},R={begin:/</,end:/>/,keywords:h,contains:[...r,...g,...L,k,V]};V.contains.push(R);const se={match:Mt(ki,/\s*:/),keywords:"_|0",relevance:0},ge={begin:/\(/,end:/\)/,relevance:0,keywords:h,contains:["self",se,...r,Q,...g,...b,...S,N,F,...Y,...L,V]},ye={begin:/</,end:/>/,keywords:"repeat each",contains:[...r,V]},xe={begin:Qn(tu(Mt(ki,/\s*:/)),tu(Mt(ki,/\s+/,ki,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:ki}]},q={begin:/\(/,end:/\)/,keywords:h,contains:[xe,...r,...g,...S,N,F,...L,V,ge],endsParent:!0,illegal:/["']/},ne={match:[/(func|macro)/,/\s+/,Qn(B.match,ki,Qg)],className:{1:"keyword",3:"title.function"},contains:[ye,q,t],illegal:[/\[/,/%/]},ue={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[ye,q,t],illegal:/\[|%/},ce={match:[/operator/,/\s+/,Qg],className:{1:"keyword",3:"title"}},de={begin:[/precedencegroup/,/\s+/,Df],className:{1:"keyword",3:"title"},contains:[V],keywords:[...Q9,...uE],end:/}/},be={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},je={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},De={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,ki,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:h,contains:[ye,...g,{begin:/:/,end:/\{/,keywords:h,contains:[{scope:"title.class.inherited",match:Df},...g],relevance:0}]};for(const we of F.variants){const ut=we.contains.find(sn=>sn.label==="interpol");ut.keywords=h;const Bt=[...g,...b,...S,N,F,...Y];ut.contains=[...Bt,{begin:/\(/,end:/\)/,contains:["self",...Bt]}]}return{name:"Swift",keywords:h,contains:[...r,ne,ue,be,je,De,ce,de,{beginKeywords:"import",end:/$/,contains:[...r],relevance:0},Q,...g,...b,...S,N,F,...Y,...L,V,ge]}}const yh="[A-Za-z$_][0-9A-Za-z$_]*",hC=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],pC=["true","false","null","undefined","NaN","Infinity"],mC=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],gC=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],yC=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],bC=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],xC=[].concat(yC,mC,gC);function eF(e){const t=e.regex,n=(W,{after:G})=>{const O="</"+W[0].slice(1);return W.input.indexOf(O,G)!==-1},r=yh,a={begin:"<>",end:"</>"},o=/<[A-Za-z0-9\\._:-]+\s*\/>/,l={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(W,G)=>{const O=W[0].length+W.index,L=W.input[O];if(L==="<"||L===","){G.ignoreMatch();return}L===">"&&(n(W,{after:O})||G.ignoreMatch());let V;const R=W.input.substring(O);if(V=R.match(/^\s*=/)){G.ignoreMatch();return}if((V=R.match(/^\s+extends\s+/))&&V.index===0){G.ignoreMatch();return}}},u={$pattern:yh,keyword:hC,literal:pC,built_in:xC,"variable.language":bC},f="[0-9](_?[0-9])*",h=`\\.(${f})`,g="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",m={className:"number",variants:[{begin:`(\\b(${g})((${h})|\\.)?|(${h}))[eE][+-]?(${f})\\b`},{begin:`\\b(${g})\\b((${h})\\b|\\.)?|(${h})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},y={className:"subst",begin:"\\$\\{",end:"\\}",keywords:u,contains:[]},b={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,y],subLanguage:"xml"}},k={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,y],subLanguage:"css"}},v={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,y],subLanguage:"graphql"}},S={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,y]},C={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},N=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,b,k,v,S,{match:/\$\d+/},m];y.contains=N.concat({begin:/\{/,end:/\}/,keywords:u,contains:["self"].concat(N)});const _=[].concat(C,y.contains),D=_.concat([{begin:/(\s*)\(/,end:/\)/,keywords:u,contains:["self"].concat(_)}]),T={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:u,contains:D},M={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,"(",t.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},I={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...mC,...gC]}},F={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},$={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[T],illegal:/%/},U={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function K(W){return t.concat("(?!",W.join("|"),")")}const Q={match:t.concat(/\b/,K([...yC,"super","import"].map(W=>`${W}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},B={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},H={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},T]},z="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",Y={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(z)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[T]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:u,exports:{PARAMS_CONTAINS:D,CLASS_REFERENCE:I},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),F,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,b,k,v,S,C,{match:/\$\d+/},m,I,{scope:"attr",match:r+t.lookahead(":"),relevance:0},Y,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[C,e.REGEXP_MODE,{className:"function",begin:z,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:u,contains:D}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:a.begin,end:a.end},{match:o},{begin:l.begin,"on:begin":l.isTrulyOpeningTag,end:l.end}],subLanguage:"xml",contains:[{begin:l.begin,end:l.end,skip:!0,contains:["self"]}]}]},$,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[T,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},B,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[T]},Q,U,M,H,{match:/\$[(.]/}]}}function tF(e){const t=e.regex,n=eF(e),r=yh,a=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],o={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},l={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:a},contains:[n.exports.CLASS_REFERENCE]},u={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},f=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],h={$pattern:yh,keyword:hC.concat(f),literal:pC,built_in:xC.concat(a),"variable.language":bC},g={className:"meta",begin:"@"+r},m=(v,S,E)=>{const C=v.contains.findIndex(N=>N.label===S);if(C===-1)throw new Error("can not find mode to replace");v.contains.splice(C,1,E)};Object.assign(n.keywords,h),n.exports.PARAMS_CONTAINS.push(g);const y=n.contains.find(v=>v.scope==="attr"),b=Object.assign({},y,{match:t.concat(r,t.lookahead(/\s*\?:/))});n.exports.PARAMS_CONTAINS.push([n.exports.CLASS_REFERENCE,y,b]),n.contains=n.contains.concat([g,o,l,b]),m(n,"shebang",e.SHEBANG()),m(n,"use_strict",u);const k=n.contains.find(v=>v.label==="func.def");return k.relevance=0,Object.assign(n,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),n}function nF(e){const t=e.regex,n={className:"string",begin:/"(""|[^/n])"C\b/},r={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},a=/\d{1,2}\/\d{1,2}\/\d{4}/,o=/\d{4}-\d{1,2}-\d{1,2}/,l=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,u=/\d{1,2}(:\d{1,2}){1,2}/,f={className:"literal",variants:[{begin:t.concat(/# */,t.either(o,a),/ *#/)},{begin:t.concat(/# */,u,/ *#/)},{begin:t.concat(/# */,l,/ *#/)},{begin:t.concat(/# */,t.either(o,a),/ +/,t.either(l,u),/ *#/)}]},h={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},g={className:"label",begin:/^\w+:/},m=e.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),y=e.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[n,r,f,h,g,m,y,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[y]}]}}function rF(e){e.regex;const t=e.COMMENT(/\(;/,/;\)/);t.contains.push("self");const n=e.COMMENT(/;;/,/$/),r=["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"],a={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},o={className:"variable",begin:/\$[\w_]+/},l={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},u={className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},f={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},h={className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:r},contains:[n,t,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},o,l,a,e.QUOTE_STRING_MODE,f,h,u]}}function iF(e){const t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),r=/[\p{L}0-9._:-]+/u,a={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},o={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},l=e.inherit(o,{begin:/\(/,end:/\)/}),u=e.inherit(e.APOS_STRING_MODE,{className:"string"}),f=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),h={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:r,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[a]},{begin:/'/,end:/'/,contains:[a]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[o,f,u,l,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[o,l,f,u]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},a,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[f]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[h],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[h],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(/</,t.lookahead(t.concat(n,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:h}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function aF(e){const t="true false yes no null",n="[\\w#;/?:@&=+$,.~*'()[\\]]+",r={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},a={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},o={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},l={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,a]},u=e.inherit(l,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),y={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},b={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},k={begin:/\{/,end:/\}/,contains:[b],illegal:"\\n",relevance:0},v={begin:"\\[",end:"\\]",contains:[b],illegal:"\\n",relevance:0},S=[r,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+n},{className:"type",begin:"!<"+n+">"},{className:"type",begin:"!"+n},{className:"type",begin:"!!"+n},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},y,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},k,v,o,l],E=[...S];return E.pop(),E.push(u),b.contains=E,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:S}}const sF={arduino:$$,bash:F$,c:q$,cpp:H$,csharp:K$,css:e9,diff:t9,go:n9,graphql:r9,ini:i9,java:a9,javascript:u9,json:d9,kotlin:h9,less:w9,lua:k9,makefile:E9,markdown:S9,objectivec:N9,perl:_9,php:C9,"php-template":j9,plaintext:A9,python:T9,"python-repl":M9,r:D9,ruby:O9,rust:R9,scss:q9,shell:H9,sql:K9,swift:J9,typescript:tF,vbnet:nF,wasm:rF,xml:iF,yaml:aF};var Wg,fE;function oF(){if(fE)return Wg;fE=1;function e(J){return J instanceof Map?J.clear=J.delete=J.set=function(){throw new Error("map is read-only")}:J instanceof Set&&(J.add=J.clear=J.delete=function(){throw new Error("set is read-only")}),Object.freeze(J),Object.getOwnPropertyNames(J).forEach(he=>{const Ne=J[he],Ke=typeof Ne;(Ke==="object"||Ke==="function")&&!Object.isFrozen(Ne)&&e(Ne)}),J}class t{constructor(he){he.data===void 0&&(he.data={}),this.data=he.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function n(J){return J.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function r(J,...he){const Ne=Object.create(null);for(const Ke in J)Ne[Ke]=J[Ke];return he.forEach(function(Ke){for(const Dt in Ke)Ne[Dt]=Ke[Dt]}),Ne}const a="</span>",o=J=>!!J.scope,l=(J,{prefix:he})=>{if(J.startsWith("language:"))return J.replace("language:","language-");if(J.includes(".")){const Ne=J.split(".");return[`${he}${Ne.shift()}`,...Ne.map((Ke,Dt)=>`${Ke}${"_".repeat(Dt+1)}`)].join(" ")}return`${he}${J}`};class u{constructor(he,Ne){this.buffer="",this.classPrefix=Ne.classPrefix,he.walk(this)}addText(he){this.buffer+=n(he)}openNode(he){if(!o(he))return;const Ne=l(he.scope,{prefix:this.classPrefix});this.span(Ne)}closeNode(he){o(he)&&(this.buffer+=a)}value(){return this.buffer}span(he){this.buffer+=`<span class="${he}">`}}const f=(J={})=>{const he={children:[]};return Object.assign(he,J),he};class h{constructor(){this.rootNode=f(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(he){this.top.children.push(he)}openNode(he){const Ne=f({scope:he});this.add(Ne),this.stack.push(Ne)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(he){return this.constructor._walk(he,this.rootNode)}static _walk(he,Ne){return typeof Ne=="string"?he.addText(Ne):Ne.children&&(he.openNode(Ne),Ne.children.forEach(Ke=>this._walk(he,Ke)),he.closeNode(Ne)),he}static _collapse(he){typeof he!="string"&&he.children&&(he.children.every(Ne=>typeof Ne=="string")?he.children=[he.children.join("")]:he.children.forEach(Ne=>{h._collapse(Ne)}))}}class g extends h{constructor(he){super(),this.options=he}addText(he){he!==""&&this.add(he)}startScope(he){this.openNode(he)}endScope(){this.closeNode()}__addSublanguage(he,Ne){const Ke=he.root;Ne&&(Ke.scope=`language:${Ne}`),this.add(Ke)}toHTML(){return new u(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function m(J){return J?typeof J=="string"?J:J.source:null}function y(J){return v("(?=",J,")")}function b(J){return v("(?:",J,")*")}function k(J){return v("(?:",J,")?")}function v(...J){return J.map(Ne=>m(Ne)).join("")}function S(J){const he=J[J.length-1];return typeof he=="object"&&he.constructor===Object?(J.splice(J.length-1,1),he):{}}function E(...J){return"("+(S(J).capture?"":"?:")+J.map(Ke=>m(Ke)).join("|")+")"}function C(J){return new RegExp(J.toString()+"|").exec("").length-1}function N(J,he){const Ne=J&&J.exec(he);return Ne&&Ne.index===0}const _=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function D(J,{joinWith:he}){let Ne=0;return J.map(Ke=>{Ne+=1;const Dt=Ne;let Et=m(Ke),Me="";for(;Et.length>0;){const Ce=_.exec(Et);if(!Ce){Me+=Et;break}Me+=Et.substring(0,Ce.index),Et=Et.substring(Ce.index+Ce[0].length),Ce[0][0]==="\\"&&Ce[1]?Me+="\\"+String(Number(Ce[1])+Dt):(Me+=Ce[0],Ce[0]==="("&&Ne++)}return Me}).map(Ke=>`(${Ke})`).join(he)}const T=/\b\B/,M="[a-zA-Z]\\w*",I="[a-zA-Z_]\\w*",F="\\b\\d+(\\.\\d+)?",$="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",U="\\b(0b[01]+)",K="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",Q=(J={})=>{const he=/^#![ ]*\//;return J.binary&&(J.begin=v(he,/.*\b/,J.binary,/\b.*/)),r({scope:"meta",begin:he,end:/$/,relevance:0,"on:begin":(Ne,Ke)=>{Ne.index!==0&&Ke.ignoreMatch()}},J)},B={begin:"\\\\[\\s\\S]",relevance:0},H={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[B]},z={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[B]},Y={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},W=function(J,he,Ne={}){const Ke=r({scope:"comment",begin:J,end:he,contains:[]},Ne);Ke.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const Dt=E("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return Ke.contains.push({begin:v(/[ ]+/,"(",Dt,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),Ke},G=W("//","$"),O=W("/\\*","\\*/"),L=W("#","$"),V={scope:"number",begin:F,relevance:0},R={scope:"number",begin:$,relevance:0},se={scope:"number",begin:U,relevance:0},ge={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[B,{begin:/\[/,end:/\]/,relevance:0,contains:[B]}]},ye={scope:"title",begin:M,relevance:0},xe={scope:"title",begin:I,relevance:0},q={begin:"\\.\\s*"+I,relevance:0};var ue=Object.freeze({__proto__:null,APOS_STRING_MODE:H,BACKSLASH_ESCAPE:B,BINARY_NUMBER_MODE:se,BINARY_NUMBER_RE:U,COMMENT:W,C_BLOCK_COMMENT_MODE:O,C_LINE_COMMENT_MODE:G,C_NUMBER_MODE:R,C_NUMBER_RE:$,END_SAME_AS_BEGIN:function(J){return Object.assign(J,{"on:begin":(he,Ne)=>{Ne.data._beginMatch=he[1]},"on:end":(he,Ne)=>{Ne.data._beginMatch!==he[1]&&Ne.ignoreMatch()}})},HASH_COMMENT_MODE:L,IDENT_RE:M,MATCH_NOTHING_RE:T,METHOD_GUARD:q,NUMBER_MODE:V,NUMBER_RE:F,PHRASAL_WORDS_MODE:Y,QUOTE_STRING_MODE:z,REGEXP_MODE:ge,RE_STARTERS_RE:K,SHEBANG:Q,TITLE_MODE:ye,UNDERSCORE_IDENT_RE:I,UNDERSCORE_TITLE_MODE:xe});function ce(J,he){J.input[J.index-1]==="."&&he.ignoreMatch()}function de(J,he){J.className!==void 0&&(J.scope=J.className,delete J.className)}function be(J,he){he&&J.beginKeywords&&(J.begin="\\b("+J.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",J.__beforeBegin=ce,J.keywords=J.keywords||J.beginKeywords,delete J.beginKeywords,J.relevance===void 0&&(J.relevance=0))}function je(J,he){Array.isArray(J.illegal)&&(J.illegal=E(...J.illegal))}function De(J,he){if(J.match){if(J.begin||J.end)throw new Error("begin & end are not supported with match");J.begin=J.match,delete J.match}}function we(J,he){J.relevance===void 0&&(J.relevance=1)}const ut=(J,he)=>{if(!J.beforeMatch)return;if(J.starts)throw new Error("beforeMatch cannot be used with starts");const Ne=Object.assign({},J);Object.keys(J).forEach(Ke=>{delete J[Ke]}),J.keywords=Ne.keywords,J.begin=v(Ne.beforeMatch,y(Ne.begin)),J.starts={relevance:0,contains:[Object.assign(Ne,{endsParent:!0})]},J.relevance=0,delete Ne.beforeMatch},Bt=["of","and","for","in","not","or","if","then","parent","list","value"],sn="keyword";function cn(J,he,Ne=sn){const Ke=Object.create(null);return typeof J=="string"?Dt(Ne,J.split(" ")):Array.isArray(J)?Dt(Ne,J):Object.keys(J).forEach(function(Et){Object.assign(Ke,cn(J[Et],he,Et))}),Ke;function Dt(Et,Me){he&&(Me=Me.map(Ce=>Ce.toLowerCase())),Me.forEach(function(Ce){const Fe=Ce.split("|");Ke[Fe[0]]=[Et,An(Fe[0],Fe[1])]})}}function An(J,he){return he?Number(he):Yr(J)?0:1}function Yr(J){return Bt.includes(J.toLowerCase())}const Jn={},xt=J=>{console.error(J)},kn=(J,...he)=>{console.log(`WARN: ${J}`,...he)},le=(J,he)=>{Jn[`${J}/${he}`]||(console.log(`Deprecated as of ${J}. ${he}`),Jn[`${J}/${he}`]=!0)},ve=new Error;function ze(J,he,{key:Ne}){let Ke=0;const Dt=J[Ne],Et={},Me={};for(let Ce=1;Ce<=he.length;Ce++)Me[Ce+Ke]=Dt[Ce],Et[Ce+Ke]=!0,Ke+=C(he[Ce-1]);J[Ne]=Me,J[Ne]._emit=Et,J[Ne]._multi=!0}function Xe(J){if(Array.isArray(J.begin)){if(J.skip||J.excludeBegin||J.returnBegin)throw xt("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),ve;if(typeof J.beginScope!="object"||J.beginScope===null)throw xt("beginScope must be object"),ve;ze(J,J.begin,{key:"beginScope"}),J.begin=D(J.begin,{joinWith:""})}}function st(J){if(Array.isArray(J.end)){if(J.skip||J.excludeEnd||J.returnEnd)throw xt("skip, excludeEnd, returnEnd not compatible with endScope: {}"),ve;if(typeof J.endScope!="object"||J.endScope===null)throw xt("endScope must be object"),ve;ze(J,J.end,{key:"endScope"}),J.end=D(J.end,{joinWith:""})}}function Tn(J){J.scope&&typeof J.scope=="object"&&J.scope!==null&&(J.beginScope=J.scope,delete J.scope)}function hr(J){Tn(J),typeof J.beginScope=="string"&&(J.beginScope={_wrap:J.beginScope}),typeof J.endScope=="string"&&(J.endScope={_wrap:J.endScope}),Xe(J),st(J)}function bn(J){function he(Me,Ce){return new RegExp(m(Me),"m"+(J.case_insensitive?"i":"")+(J.unicodeRegex?"u":"")+(Ce?"g":""))}class Ne{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(Ce,Fe){Fe.position=this.position++,this.matchIndexes[this.matchAt]=Fe,this.regexes.push([Fe,Ce]),this.matchAt+=C(Ce)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const Ce=this.regexes.map(Fe=>Fe[1]);this.matcherRe=he(D(Ce,{joinWith:"|"}),!0),this.lastIndex=0}exec(Ce){this.matcherRe.lastIndex=this.lastIndex;const Fe=this.matcherRe.exec(Ce);if(!Fe)return null;const Yt=Fe.findIndex((Qr,va)=>va>0&&Qr!==void 0),zt=this.matchIndexes[Yt];return Fe.splice(0,Yt),Object.assign(Fe,zt)}}class Ke{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(Ce){if(this.multiRegexes[Ce])return this.multiRegexes[Ce];const Fe=new Ne;return this.rules.slice(Ce).forEach(([Yt,zt])=>Fe.addRule(Yt,zt)),Fe.compile(),this.multiRegexes[Ce]=Fe,Fe}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(Ce,Fe){this.rules.push([Ce,Fe]),Fe.type==="begin"&&this.count++}exec(Ce){const Fe=this.getMatcher(this.regexIndex);Fe.lastIndex=this.lastIndex;let Yt=Fe.exec(Ce);if(this.resumingScanAtSamePosition()&&!(Yt&&Yt.index===this.lastIndex)){const zt=this.getMatcher(0);zt.lastIndex=this.lastIndex+1,Yt=zt.exec(Ce)}return Yt&&(this.regexIndex+=Yt.position+1,this.regexIndex===this.count&&this.considerAll()),Yt}}function Dt(Me){const Ce=new Ke;return Me.contains.forEach(Fe=>Ce.addRule(Fe.begin,{rule:Fe,type:"begin"})),Me.terminatorEnd&&Ce.addRule(Me.terminatorEnd,{type:"end"}),Me.illegal&&Ce.addRule(Me.illegal,{type:"illegal"}),Ce}function Et(Me,Ce){const Fe=Me;if(Me.isCompiled)return Fe;[de,De,hr,ut].forEach(zt=>zt(Me,Ce)),J.compilerExtensions.forEach(zt=>zt(Me,Ce)),Me.__beforeBegin=null,[be,je,we].forEach(zt=>zt(Me,Ce)),Me.isCompiled=!0;let Yt=null;return typeof Me.keywords=="object"&&Me.keywords.$pattern&&(Me.keywords=Object.assign({},Me.keywords),Yt=Me.keywords.$pattern,delete Me.keywords.$pattern),Yt=Yt||/\w+/,Me.keywords&&(Me.keywords=cn(Me.keywords,J.case_insensitive)),Fe.keywordPatternRe=he(Yt,!0),Ce&&(Me.begin||(Me.begin=/\B|\b/),Fe.beginRe=he(Fe.begin),!Me.end&&!Me.endsWithParent&&(Me.end=/\B|\b/),Me.end&&(Fe.endRe=he(Fe.end)),Fe.terminatorEnd=m(Fe.end)||"",Me.endsWithParent&&Ce.terminatorEnd&&(Fe.terminatorEnd+=(Me.end?"|":"")+Ce.terminatorEnd)),Me.illegal&&(Fe.illegalRe=he(Me.illegal)),Me.contains||(Me.contains=[]),Me.contains=[].concat(...Me.contains.map(function(zt){return En(zt==="self"?Me:zt)})),Me.contains.forEach(function(zt){Et(zt,Fe)}),Me.starts&&Et(Me.starts,Ce),Fe.matcher=Dt(Fe),Fe}if(J.compilerExtensions||(J.compilerExtensions=[]),J.contains&&J.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return J.classNameAliases=r(J.classNameAliases||{}),Et(J)}function Ft(J){return J?J.endsWithParent||Ft(J.starts):!1}function En(J){return J.variants&&!J.cachedVariants&&(J.cachedVariants=J.variants.map(function(he){return r(J,{variants:null},he)})),J.cachedVariants?J.cachedVariants:Ft(J)?r(J,{starts:J.starts?r(J.starts):null}):Object.isFrozen(J)?r(J):J}var vt="11.11.1";class Ar extends Error{constructor(he,Ne){super(he),this.name="HTMLInjectionError",this.html=Ne}}const Mn=n,xo=r,Ri=Symbol("nomatch"),xa=7,Li=function(J){const he=Object.create(null),Ne=Object.create(null),Ke=[];let Dt=!0;const Et="Could not find the language '{}', did you forget to load/include a language module?",Me={disableAutodetect:!0,name:"Plain text",contains:[]};let Ce={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:g};function Fe(ke){return Ce.noHighlightRe.test(ke)}function Yt(ke){let Pe=ke.className+" ";Pe+=ke.parentNode?ke.parentNode.className:"";const tt=Ce.languageDetectRe.exec(Pe);if(tt){const gt=Dn(tt[1]);return gt||(kn(Et.replace("{}",tt[1])),kn("Falling back to no-highlight mode for this block.",ke)),gt?tt[1]:"no-highlight"}return Pe.split(/\s+/).find(gt=>Fe(gt)||Dn(gt))}function zt(ke,Pe,tt){let gt="",Wt="";typeof Pe=="object"?(gt=ke,tt=Pe.ignoreIllegals,Wt=Pe.language):(le("10.7.0","highlight(lang, code, ...args) has been deprecated."),le("10.7.0",`Please use highlight(code, options) instead.
|
|
604
|
+
https://github.com/highlightjs/highlight.js/issues/2277`),Wt=ke,gt=Pe),tt===void 0&&(tt=!0);const Nn={code:gt,language:Wt};zi("before:highlight",Nn);const Kn=Nn.result?Nn.result:Qr(Nn.language,Nn.code,tt);return Kn.code=Nn.code,zi("after:highlight",Kn),Kn}function Qr(ke,Pe,tt,gt){const Wt=Object.create(null);function Nn(Se,Oe){return Se.keywords[Oe]}function Kn(){if(!He.keywords){un.addText(St);return}let Se=0;He.keywordPatternRe.lastIndex=0;let Oe=He.keywordPatternRe.exec(St),Qe="";for(;Oe;){Qe+=St.substring(Se,Oe.index);const ot=xn.case_insensitive?Oe[0].toLowerCase():Oe[0],Xt=Nn(He,ot);if(Xt){const[Mr,ac]=Xt;if(un.addText(Qe),Qe="",Wt[ot]=(Wt[ot]||0)+1,Wt[ot]<=xa&&(Ca+=ac),Mr.startsWith("_"))Qe+=Oe[0];else{const ad=xn.classNameAliases[Mr]||Mr;Gn(Oe[0],ad)}}else Qe+=Oe[0];Se=He.keywordPatternRe.lastIndex,Oe=He.keywordPatternRe.exec(St)}Qe+=St.substring(Se),un.addText(Qe)}function Pn(){if(St==="")return;let Se=null;if(typeof He.subLanguage=="string"){if(!he[He.subLanguage]){un.addText(St);return}Se=Qr(He.subLanguage,St,!0,id[He.subLanguage]),id[He.subLanguage]=Se._top}else Se=wa(St,He.subLanguage.length?He.subLanguage:null);He.relevance>0&&(Ca+=Se.relevance),un.__addSublanguage(Se._emitter,Se.language)}function Ct(){He.subLanguage!=null?Pn():Kn(),St=""}function Gn(Se,Oe){Se!==""&&(un.startScope(Oe),un.addText(Se),un.endScope())}function ko(Se,Oe){let Qe=1;const ot=Oe.length-1;for(;Qe<=ot;){if(!Se._emit[Qe]){Qe++;continue}const Xt=xn.classNameAliases[Se[Qe]]||Se[Qe],Mr=Oe[Qe];Xt?Gn(Mr,Xt):(St=Mr,Kn(),St=""),Qe++}}function Sa(Se,Oe){return Se.scope&&typeof Se.scope=="string"&&un.openNode(xn.classNameAliases[Se.scope]||Se.scope),Se.beginScope&&(Se.beginScope._wrap?(Gn(St,xn.classNameAliases[Se.beginScope._wrap]||Se.beginScope._wrap),St=""):Se.beginScope._multi&&(ko(Se.beginScope,Oe),St="")),He=Object.create(Se,{parent:{value:He}}),He}function yi(Se,Oe,Qe){let ot=N(Se.endRe,Qe);if(ot){if(Se["on:end"]){const Xt=new t(Se);Se["on:end"](Oe,Xt),Xt.isMatchIgnored&&(ot=!1)}if(ot){for(;Se.endsParent&&Se.parent;)Se=Se.parent;return Se}}if(Se.endsWithParent)return yi(Se.parent,Oe,Qe)}function Na(Se){return He.matcher.regexIndex===0?(St+=Se[0],1):(ja=!0,0)}function Eo(Se){const Oe=Se[0],Qe=Se.rule,ot=new t(Qe),Xt=[Qe.__beforeBegin,Qe["on:begin"]];for(const Mr of Xt)if(Mr&&(Mr(Se,ot),ot.isMatchIgnored))return Na(Oe);return Qe.skip?St+=Oe:(Qe.excludeBegin&&(St+=Oe),Ct(),!Qe.returnBegin&&!Qe.excludeBegin&&(St=Oe)),Sa(Qe,Se),Qe.returnBegin?0:Oe.length}function Bn(Se){const Oe=Se[0],Qe=Pe.substring(Se.index),ot=yi(He,Se,Qe);if(!ot)return Ri;const Xt=He;He.endScope&&He.endScope._wrap?(Ct(),Gn(Oe,He.endScope._wrap)):He.endScope&&He.endScope._multi?(Ct(),ko(He.endScope,Se)):Xt.skip?St+=Oe:(Xt.returnEnd||Xt.excludeEnd||(St+=Oe),Ct(),Xt.excludeEnd&&(St=Oe));do He.scope&&un.closeNode(),!He.skip&&!He.subLanguage&&(Ca+=He.relevance),He=He.parent;while(He!==ot.parent);return ot.starts&&Sa(ot.starts,Se),Xt.returnEnd?0:Oe.length}function Ss(){const Se=[];for(let Oe=He;Oe!==xn;Oe=Oe.parent)Oe.scope&&Se.unshift(Oe.scope);Se.forEach(Oe=>un.openNode(Oe))}let ei={};function _a(Se,Oe){const Qe=Oe&&Oe[0];if(St+=Se,Qe==null)return Ct(),0;if(ei.type==="begin"&&Oe.type==="end"&&ei.index===Oe.index&&Qe===""){if(St+=Pe.slice(Oe.index,Oe.index+1),!Dt){const ot=new Error(`0 width match regex (${ke})`);throw ot.languageName=ke,ot.badRule=ei.rule,ot}return 1}if(ei=Oe,Oe.type==="begin")return Eo(Oe);if(Oe.type==="illegal"&&!tt){const ot=new Error('Illegal lexeme "'+Qe+'" for mode "'+(He.scope||"<unnamed>")+'"');throw ot.mode=He,ot}else if(Oe.type==="end"){const ot=Bn(Oe);if(ot!==Ri)return ot}if(Oe.type==="illegal"&&Qe==="")return St+=`
|
|
605
|
+
`,1;if(ic>1e5&&ic>Oe.index*3)throw new Error("potential infinite loop, way more iterations than matches");return St+=Qe,Qe.length}const xn=Dn(ke);if(!xn)throw xt(Et.replace("{}",ke)),new Error('Unknown language: "'+ke+'"');const Ns=bn(xn);let So="",He=gt||Ns;const id={},un=new Ce.__emitter(Ce);Ss();let St="",Ca=0,Pi=0,ic=0,ja=!1;try{if(xn.__emitTokens)xn.__emitTokens(Pe,un);else{for(He.matcher.considerAll();;){ic++,ja?ja=!1:He.matcher.considerAll(),He.matcher.lastIndex=Pi;const Se=He.matcher.exec(Pe);if(!Se)break;const Oe=Pe.substring(Pi,Se.index),Qe=_a(Oe,Se);Pi=Se.index+Qe}_a(Pe.substring(Pi))}return un.finalize(),So=un.toHTML(),{language:ke,value:So,relevance:Ca,illegal:!1,_emitter:un,_top:He}}catch(Se){if(Se.message&&Se.message.includes("Illegal"))return{language:ke,value:Mn(Pe),illegal:!0,relevance:0,_illegalBy:{message:Se.message,index:Pi,context:Pe.slice(Pi-100,Pi+100),mode:Se.mode,resultSoFar:So},_emitter:un};if(Dt)return{language:ke,value:Mn(Pe),illegal:!1,relevance:0,errorRaised:Se,_emitter:un,_top:He};throw Se}}function va(ke){const Pe={value:Mn(ke),illegal:!1,relevance:0,_top:Me,_emitter:new Ce.__emitter(Ce)};return Pe._emitter.addText(ke),Pe}function wa(ke,Pe){Pe=Pe||Ce.languages||Object.keys(he);const tt=va(ke),gt=Pe.filter(Dn).filter(Zr).map(Ct=>Qr(Ct,ke,!1));gt.unshift(tt);const Wt=gt.sort((Ct,Gn)=>{if(Ct.relevance!==Gn.relevance)return Gn.relevance-Ct.relevance;if(Ct.language&&Gn.language){if(Dn(Ct.language).supersetOf===Gn.language)return 1;if(Dn(Gn.language).supersetOf===Ct.language)return-1}return 0}),[Nn,Kn]=Wt,Pn=Nn;return Pn.secondBest=Kn,Pn}function Tr(ke,Pe,tt){const gt=Pe&&Ne[Pe]||tt;ke.classList.add("hljs"),ke.classList.add(`language-${gt}`)}function Qt(ke){let Pe=null;const tt=Yt(ke);if(Fe(tt))return;if(zi("before:highlightElement",{el:ke,language:tt}),ke.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",ke);return}if(ke.children.length>0&&(Ce.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(ke)),Ce.throwUnescapedHTML))throw new Ar("One of your code blocks includes unescaped HTML.",ke.innerHTML);Pe=ke;const gt=Pe.textContent,Wt=tt?zt(gt,{language:tt,ignoreIllegals:!0}):wa(gt);ke.innerHTML=Wt.value,ke.dataset.highlighted="yes",Tr(ke,tt,Wt.language),ke.result={language:Wt.language,re:Wt.relevance,relevance:Wt.relevance},Wt.secondBest&&(ke.secondBest={language:Wt.secondBest.language,relevance:Wt.secondBest.relevance}),zi("after:highlightElement",{el:ke,result:Wt,text:gt})}function Sn(ke){Ce=xo(Ce,ke)}const Wr=()=>{Ea(),le("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function ka(){Ea(),le("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let ks=!1;function Ea(){function ke(){Ea()}if(document.readyState==="loading"){ks||window.addEventListener("DOMContentLoaded",ke,!1),ks=!0;return}document.querySelectorAll(Ce.cssSelector).forEach(Qt)}function vo(ke,Pe){let tt=null;try{tt=Pe(J)}catch(gt){if(xt("Language definition for '{}' could not be registered.".replace("{}",ke)),Dt)xt(gt);else throw gt;tt=Me}tt.name||(tt.name=ke),he[ke]=tt,tt.rawDefinition=Pe.bind(null,J),tt.aliases&&Xr(tt.aliases,{languageName:ke})}function Ii(ke){delete he[ke];for(const Pe of Object.keys(Ne))Ne[Pe]===ke&&delete Ne[Pe]}function Es(){return Object.keys(he)}function Dn(ke){return ke=(ke||"").toLowerCase(),he[ke]||he[Ne[ke]]}function Xr(ke,{languageName:Pe}){typeof ke=="string"&&(ke=[ke]),ke.forEach(tt=>{Ne[tt.toLowerCase()]=Pe})}function Zr(ke){const Pe=Dn(ke);return Pe&&!Pe.disableAutodetect}function gi(ke){ke["before:highlightBlock"]&&!ke["before:highlightElement"]&&(ke["before:highlightElement"]=Pe=>{ke["before:highlightBlock"](Object.assign({block:Pe.el},Pe))}),ke["after:highlightBlock"]&&!ke["after:highlightElement"]&&(ke["after:highlightElement"]=Pe=>{ke["after:highlightBlock"](Object.assign({block:Pe.el},Pe))})}function en(ke){gi(ke),Ke.push(ke)}function wo(ke){const Pe=Ke.indexOf(ke);Pe!==-1&&Ke.splice(Pe,1)}function zi(ke,Pe){const tt=ke;Ke.forEach(function(gt){gt[tt]&>[tt](Pe)})}function Jr(ke){return le("10.7.0","highlightBlock will be removed entirely in v12.0"),le("10.7.0","Please use highlightElement now."),Qt(ke)}Object.assign(J,{highlight:zt,highlightAuto:wa,highlightAll:Ea,highlightElement:Qt,highlightBlock:Jr,configure:Sn,initHighlighting:Wr,initHighlightingOnLoad:ka,registerLanguage:vo,unregisterLanguage:Ii,listLanguages:Es,getLanguage:Dn,registerAliases:Xr,autoDetection:Zr,inherit:xo,addPlugin:en,removePlugin:wo}),J.debugMode=function(){Dt=!1},J.safeMode=function(){Dt=!0},J.versionString=vt,J.regex={concat:v,lookahead:y,either:E,optional:k,anyNumberOfTimes:b};for(const ke in ue)typeof ue[ke]=="object"&&e(ue[ke]);return Object.assign(J,ue),J},zn=Li({});return zn.newInstance=()=>Li({}),Wg=zn,zn.HighlightJS=zn,zn.default=zn,Wg}var lF=oF();const cF=Bu(lF),hE={},uF="hljs-";function dF(e){const t=cF.newInstance();return e&&o(e),{highlight:n,highlightAuto:r,listLanguages:a,register:o,registerAlias:l,registered:u};function n(f,h,g){const m=g||hE,y=typeof m.prefix=="string"?m.prefix:uF;if(!t.getLanguage(f))throw new Error("Unknown language: `"+f+"` is not registered");t.configure({__emitter:fF,classPrefix:y});const b=t.highlight(h,{ignoreIllegals:!0,language:f});if(b.errorRaised)throw new Error("Could not highlight with `Highlight.js`",{cause:b.errorRaised});const k=b._emitter.root,v=k.data;return v.language=b.language,v.relevance=b.relevance,k}function r(f,h){const m=(h||hE).subset||a();let y=-1,b=0,k;for(;++y<m.length;){const v=m[y];if(!t.getLanguage(v))continue;const S=n(v,f,h);S.data&&S.data.relevance!==void 0&&S.data.relevance>b&&(b=S.data.relevance,k=S)}return k||{type:"root",children:[],data:{language:void 0,relevance:b}}}function a(){return t.listLanguages()}function o(f,h){if(typeof f=="string")t.registerLanguage(f,h);else{let g;for(g in f)Object.hasOwn(f,g)&&t.registerLanguage(g,f[g])}}function l(f,h){if(typeof f=="string")t.registerAliases(typeof h=="string"?h:[...h],{languageName:f});else{let g;for(g in f)if(Object.hasOwn(f,g)){const m=f[g];t.registerAliases(typeof m=="string"?m:[...m],{languageName:g})}}}function u(f){return!!t.getLanguage(f)}}class fF{constructor(t){this.options=t,this.root={type:"root",children:[],data:{language:void 0,relevance:0}},this.stack=[this.root]}addText(t){if(t==="")return;const n=this.stack[this.stack.length-1],r=n.children[n.children.length-1];r&&r.type==="text"?r.value+=t:n.children.push({type:"text",value:t})}startScope(t){this.openNode(String(t))}endScope(){this.closeNode()}__addSublanguage(t,n){const r=this.stack[this.stack.length-1],a=t.root.children;n?r.children.push({type:"element",tagName:"span",properties:{className:[n]},children:a}):r.children.push(...a)}openNode(t){const n=this,r=t.split(".").map(function(l,u){return u?l+"_".repeat(u):n.options.classPrefix+l}),a=this.stack[this.stack.length-1],o={type:"element",tagName:"span",properties:{className:r},children:[]};a.children.push(o),this.stack.push(o)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return""}}const hF={};function Sx(e){const t=e||hF,n=t.aliases,r=t.detect||!1,a=t.languages||sF,o=t.plainText,l=t.prefix,u=t.subset;let f="hljs";const h=dF(a);if(n&&h.registerAlias(n),l){const g=l.indexOf("-");f=g===-1?l:l.slice(0,g)}return function(g,m){Xh(g,"element",function(y,b,k){if(y.tagName!=="code"||!k||k.type!=="element"||k.tagName!=="pre")return;const v=pF(y);if(v===!1||!v&&!r||v&&o&&o.includes(v))return;Array.isArray(y.properties.className)||(y.properties.className=[]),y.properties.className.includes(f)||y.properties.className.unshift(f);const S=O$(y,{whitespace:"pre"});let E;try{E=v?h.highlight(v,S,{prefix:l}):h.highlightAuto(S,{prefix:l,subset:u})}catch(C){const N=C;if(v&&/Unknown language/.test(N.message)){m.message("Cannot highlight as `"+v+"`, it’s not registered",{ancestors:[k,y],cause:N,place:y.position,ruleId:"missing-language",source:"rehype-highlight"});return}throw N}!v&&E.data&&E.data.language&&y.properties.className.push("language-"+E.data.language),E.children.length>0&&(y.children=E.children)})}}function pF(e){const t=e.properties.className;let n=-1;if(!Array.isArray(t))return;let r;for(;++n<t.length;){const a=String(t[n]);if(a==="no-highlight"||a==="nohighlight")return!1;!r&&a.slice(0,5)==="lang-"&&(r=a.slice(5)),!r&&a.slice(0,9)==="language-"&&(r=a.slice(9))}return r}function mF({name:e,onClose:t}){const n=Le(),{data:r,isLoading:a,isError:o,error:l}=Ge({queryKey:["skill",e],queryFn:()=>YI(e)});return A.useEffect(()=>{const u=f=>{f.key==="Escape"&&t()};return window.addEventListener("keydown",u),()=>window.removeEventListener("keydown",u)},[t]),d.jsx("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 z-40 flex items-start justify-center p-6 bg-black/30 overflow-auto",children:d.jsxs("div",{className:"nb-card mt-8 w-full max-w-4xl",children:[d.jsxs("header",{className:"flex items-start justify-between gap-4 mb-4",children:[d.jsxs("div",{children:[d.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-3xl font-bold",children:e}),r&&d.jsxs("p",{className:"text-sm text-[var(--color-text-muted)] mt-1",children:[r.category," · ",r.origin||"local"]})]}),d.jsx("button",{onClick:t,className:"nb-btn nb-btn-mint p-2","aria-label":n("skillDetail.close.aria"),type:"button",children:d.jsx(dr,{size:16,strokeWidth:3})})]}),a&&d.jsx("p",{children:n("skillDetail.loading")}),o&&d.jsx("p",{className:"text-[var(--color-crashed)]",children:n("skillDetail.error.load",{detail:l instanceof Error?l.message:String(l)})}),r&&d.jsxs("div",{className:"flex flex-col gap-4",children:[d.jsxs("div",{children:[d.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-2 uppercase tracking-wider",children:n("skillDetail.section.preview")}),d.jsx("div",{className:"prose-chat bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg p-4 max-h-80 overflow-auto text-sm",children:r.body?d.jsx(yx,{remarkPlugins:[wx],rehypePlugins:[Sx],children:r.body}):d.jsx("p",{className:"text-[var(--color-text-muted)] italic",children:"(empty)"})})]}),r.references.length>0&&d.jsxs("div",{children:[d.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-2 uppercase tracking-wider",children:"References"}),d.jsx("ul",{className:"flex flex-col gap-2",children:r.references.map(u=>d.jsx(gF,{skillName:e,file:u.name,lines:u.lines},u.name))})]})]})]})})}function gF({skillName:e,file:t,lines:n}){const r=Le(),[a,o]=A.useState(!1),{data:l,isLoading:u,isError:f,error:h}=Ge({queryKey:["skill-ref",e,t],queryFn:()=>QI(e,t),enabled:a,staleTime:1/0});return d.jsxs("li",{className:"border-2 border-[var(--color-text)] rounded-lg overflow-hidden bg-[var(--color-bg-cream)]",children:[d.jsxs("button",{type:"button",onClick:()=>o(g=>!g),"aria-label":r("skillDetail.toggleSection.aria",{action:r(a?"skillDetail.collapse":"skillDetail.expand"),file:t}),"aria-expanded":a,className:"w-full flex items-center gap-2 px-3 py-2 text-sm font-[family-name:var(--font-mono)] hover:bg-[var(--color-accent-yellow)] transition-colors",children:[d.jsx(Yl,{size:12,strokeWidth:3,className:["transition-transform",a?"rotate-90":""].join(" ")}),d.jsx(qu,{size:12,strokeWidth:2.5}),d.jsx("span",{className:"flex-1 text-left font-bold",children:t}),d.jsxs("span",{className:"text-xs text-[var(--color-text-subtle)]",children:[n," lines"]})]}),a&&d.jsxs("div",{className:"px-4 py-3 border-t-2 border-[var(--color-text)] bg-[var(--color-bg)] max-h-96 overflow-auto",children:[u&&d.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:r("skillDetail.loading")}),f&&d.jsx("p",{className:"text-xs text-[var(--color-crashed)]",children:r("skillDetail.error.load",{detail:h instanceof Error?h.message:String(h)})}),l&&d.jsx("div",{className:"prose-chat text-sm",children:d.jsx(yx,{remarkPlugins:[wx],rehypePlugins:[Sx],children:l.content})})]})]})}function yF({onClose:e}){const t=Le(),n=an(),{alert:r}=jn(),[a,o]=A.useState(""),[l,u]=A.useState(""),f=/^[a-z0-9][a-z0-9-]*$/.test(a),h=Rt({mutationFn:()=>tz(a,{"SKILL.md":l}),onSuccess:()=>{n.invalidateQueries({queryKey:["skills"]}),n.invalidateQueries({queryKey:["skill-updates"]}),e()},onError:g=>void r({title:t("skills.import.error"),body:g instanceof Error?g.message:String(g)})});return d.jsx("div",{className:"fixed inset-0 z-50 flex items-start justify-center bg-black/30 p-4",onClick:e,children:d.jsxs("div",{className:"nb-card mt-16 w-full max-w-xl flex flex-col gap-3",onClick:g=>g.stopPropagation(),children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-lg font-bold",children:t("skills.import.title")}),d.jsx("button",{type:"button",className:"nb-btn p-2",onClick:e,"aria-label":"close",children:d.jsx(dr,{size:14,strokeWidth:3})})]}),d.jsxs("label",{className:"flex flex-col gap-1",children:[d.jsx("span",{className:"text-sm font-bold",children:t("skills.import.name")}),d.jsx("input",{className:"nb-input w-full",value:a,onChange:g=>o(g.target.value),placeholder:"code-review","aria-label":t("skills.import.name")})]}),d.jsxs("label",{className:"flex flex-col gap-1",children:[d.jsx("span",{className:"text-sm font-bold",children:t("skills.import.body")}),d.jsx("textarea",{className:"nb-input w-full font-[family-name:var(--font-mono)] text-sm",rows:12,value:l,onChange:g=>u(g.target.value),placeholder:`---
|
|
606
|
+
name: code-review
|
|
607
|
+
description: ...
|
|
608
|
+
---
|
|
609
|
+
|
|
610
|
+
# ...`,"aria-label":t("skills.import.body")})]}),d.jsxs("button",{type:"button",className:"nb-btn nb-btn-mint self-start",disabled:h.isPending||!f||!l.trim(),onClick:()=>h.mutate(),children:[h.isPending?d.jsx(nt,{size:14,className:"animate-spin"}):d.jsx(RN,{size:14,strokeWidth:3}),t("skills.import.submit")]})]})})}async function bF(e){const{files:t}=await nz(e),n=t["SKILL.md"]??"",r=new Blob([n],{type:"text/markdown"}),a=URL.createObjectURL(r),o=document.createElement("a");o.href=a,o.download=`${e}.SKILL.md`,o.click(),URL.revokeObjectURL(a)}const xF=[{value:"all",labelKey:"skills.category.all"},{value:"language",labelKey:"skills.category.language"},{value:"end",labelKey:"skills.category.end"},{value:"persona",labelKey:"skills.category.persona"},{value:"workflow",labelKey:"skills.category.workflow"},{value:"other",labelKey:"skills.category.other"}],vF={language:"var(--color-accent-purple)",end:"var(--color-secondary)",persona:"var(--color-primary)",workflow:"var(--color-accent-mint)",other:"var(--color-bg-cream)"};function wF(){var E;const e=Le(),[t,n]=A.useState("all"),[r,a]=A.useState(""),[o,l]=A.useState(null),[u,f]=A.useState(!1),h=an(),m=(((E=Ge({queryKey:["skill-updates"],queryFn:ez}).data)==null?void 0:E.data)??[]).filter(C=>C.status!=="same").length,{data:y,isLoading:b}=Ge({queryKey:["skills"],queryFn:()=>Zb()}),k=Ge({queryKey:["projects"],queryFn:ga}),v=A.useMemo(()=>((y==null?void 0:y.data)??[]).filter(N=>!(t!=="all"&&N.category!==t||r&&!N.name.toLowerCase().includes(r.toLowerCase()))),[y,t,r]),S=A.useMemo(()=>{const C=(y==null?void 0:y.data)??[],N={all:C.length};for(const _ of C)N[_.category]=(N[_.category]??0)+1;return N},[y]);return d.jsxs("div",{className:"flex flex-col gap-4 max-w-full",children:[d.jsxs("header",{className:"flex items-center justify-between flex-wrap gap-3",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold",children:"Skills 🎯"}),d.jsx("p",{className:"text-sm text-[var(--color-text-muted)] mt-1",children:b?e("common.loading"):e("skills.subtitleCount",{count:(y==null?void 0:y.data.length)??0})})]}),d.jsxs("div",{className:"flex gap-3 items-center",children:[m>0&&d.jsx("span",{className:"nb-badge text-[10px]",title:e("skills.updates.badge",{count:String(m)}),children:e("skills.updates.badge",{count:String(m)})}),d.jsxs("button",{className:"nb-btn",onClick:()=>f(!0),type:"button",children:[d.jsx(RN,{size:14,strokeWidth:2.5}),e("skills.import")]}),d.jsxs("button",{className:"nb-btn nb-btn-mint",onClick:async()=>{await XI(),h.invalidateQueries({queryKey:["skills"]}),h.invalidateQueries({queryKey:["skill-updates"]})},type:"button",children:[d.jsx(gs,{size:14,strokeWidth:2.5}),"Sync bundled"]})]})]}),d.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[d.jsxs("div",{className:"relative flex-1 max-w-md",children:[d.jsx(Ol,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-[var(--color-text-subtle)]"}),d.jsx("input",{className:"nb-input pl-9 w-full",placeholder:e("skills.search.placeholder"),value:r,onChange:C=>a(C.target.value),"aria-label":e("skills.search.aria")})]}),d.jsx("div",{className:"flex gap-1 p-1 bg-[var(--color-bg)] border-[2px] border-[var(--color-text)] rounded-full shadow-[2px_2px_0_var(--color-text)]",children:xF.map(C=>d.jsxs("button",{type:"button",onClick:()=>n(C.value),className:["px-3 py-1 rounded-full text-xs font-bold font-[family-name:var(--font-body)]",t===C.value?"bg-[var(--color-text)] text-[var(--color-bg)]":"text-[var(--color-text-muted)] hover:text-[var(--color-text)]"].join(" "),children:[e(C.labelKey)," ",S[C.value]]},C.value))})]}),d.jsx("div",{className:"grid gap-4 grid-cols-[repeat(auto-fill,minmax(280px,1fr))]",children:v.map(C=>{var N;return d.jsx(kF,{skill:C,projectCount:((N=k.data)==null?void 0:N.data.length)??0,onOpen:()=>l(C.name),onExport:()=>void bF(C.name)},C.name)})}),o&&d.jsx(mF,{name:o,onClose:()=>l(null)}),u&&d.jsx(yF,{onClose:()=>f(!1)})]})}function kF({skill:e,projectCount:t,onOpen:n,onExport:r}){const a=Le(),o=vF[e.category];return d.jsxs("article",{onClick:n,onKeyDown:l=>{(l.key==="Enter"||l.key===" ")&&(l.preventDefault(),n())},tabIndex:0,role:"button","aria-label":`Open ${e.name}`,className:"nb-card nb-card-interactive flex flex-col gap-3",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("h3",{className:"font-[family-name:var(--font-heading)] font-bold text-lg",children:e.name}),d.jsxs("div",{className:"flex items-center gap-1.5",children:[d.jsx("button",{type:"button",className:"nb-btn p-1",onClick:l=>{l.stopPropagation(),r()},"aria-label":a("skills.export"),title:a("skills.export"),children:d.jsx(jb,{size:12,strokeWidth:2.5})}),d.jsx("span",{className:"nb-badge text-[10px]",style:{background:o},children:e.category})]})]}),d.jsx("p",{className:"text-sm text-[var(--color-text-muted)] leading-5 line-clamp-3",children:e.description||"(no description)"}),d.jsxs("div",{className:"flex items-center justify-between text-xs font-[family-name:var(--font-mono)] pt-2 border-t-[1.5px] border-dashed border-[var(--color-border-light)]",children:[d.jsx("span",{className:"font-bold",children:e.linkedProjects.length>0?`● linked in ${e.linkedProjects.length}`:"○ not linked"}),d.jsxs("span",{className:"text-[var(--color-text-subtle)]",children:[t," projects"]})]})]})}function vC(e){const t=e?`?q=${encodeURIComponent(e)}`:"";return ht(`/api/prompts${t}`)}function wC(e){return ht(`/api/prompts/${encodeURIComponent(e)}`)}function EF(e){return Rb("/api/prompts",e)}function SF(e,t){return UN(`/api/prompts/${encodeURIComponent(e)}`,t)}function NF(e){return QL(`/api/prompts/${encodeURIComponent(e)}`)}function _F(e){const t=new Set,n=[];for(const r of e.matchAll(/\{\{\s*([a-zA-Z_][a-zA-Z0-9_]*)\s*\}\}/g)){const a=r[1];a&&!t.has(a)&&(t.add(a),n.push(a))}return n}function CF(){var u;const e=Le(),[t,n]=A.useState(""),[r,a]=A.useState(null),o=Ge({queryKey:["prompts",t],queryFn:()=>vC(t||void 0)}),l=((u=o.data)==null?void 0:u.data)??[];return d.jsxs("div",{className:"flex flex-col gap-4 max-w-5xl",children:[d.jsxs("header",{className:"flex items-center gap-3",children:[d.jsxs("div",{className:"flex-1",children:[d.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-3xl font-bold",children:e("prompts.title")}),d.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:e("prompts.desc")})]}),d.jsxs("button",{type:"button",className:"nb-btn nb-btn-mint",onClick:()=>a("new"),children:[d.jsx(jr,{size:14,strokeWidth:3}),e("prompts.new")]})]}),d.jsxs("div",{className:"flex gap-4 items-start",children:[d.jsxs("div",{className:"w-72 shrink-0 flex flex-col gap-2",children:[d.jsxs("label",{className:"flex items-center gap-2 nb-card",style:{padding:"6px 10px"},children:[d.jsx(Ol,{size:14}),d.jsx("input",{type:"text",value:t,onChange:f=>n(f.target.value),placeholder:e("prompts.search"),className:"bg-transparent outline-none flex-1 text-sm","aria-label":e("prompts.search")})]}),o.isLoading?d.jsx("div",{className:"nb-card",children:d.jsx(nt,{size:14,className:"animate-spin"})}):l.length===0?d.jsx("div",{className:"nb-card",children:d.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:e("prompts.empty")})}):d.jsx("ul",{className:"flex flex-col gap-1.5",children:l.map(f=>d.jsx("li",{children:d.jsxs("button",{type:"button",onClick:()=>a(f.name),className:`nb-card w-full text-left ${r===f.name?"bg-[var(--color-bg-cream)]":""}`,style:{padding:"8px 10px"},children:[d.jsxs("span",{className:"flex items-center gap-1.5",children:[f.favorite&&d.jsx(NL,{size:12,fill:"currentColor"}),d.jsx("code",{className:"font-[family-name:var(--font-mono)] text-sm font-bold",children:f.name})]}),f.description&&d.jsx("span",{className:"block text-xs text-[var(--color-text-muted)] truncate",children:f.description})]})},f.name))})]}),d.jsx("div",{className:"flex-1 min-w-0",children:r?d.jsx(jF,{name:r==="new"?null:r,onDone:()=>a(null)},r):d.jsx("div",{className:"nb-card",children:d.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:e("prompts.desc")})})})]})]})}function jF({name:e,onDone:t}){const n=Le(),r=an(),{alert:a,confirm:o}=jn(),l=e===null,u=Ge({queryKey:["prompt",e],queryFn:()=>wC(e),enabled:!l}),[f,h]=A.useState(l?{name:"",description:"",tags:"",body:"",favorite:!1}:null);A.useEffect(()=>{if(!l&&u.data&&f===null){const k=u.data;h({name:k.name,description:k.description,tags:k.tags.join(", "),body:k.body,favorite:k.favorite})}},[l,u.data,f]);const g=Rt({mutationFn:()=>{if(!f)throw new Error("no form");const k=f.tags.split(",").map(S=>S.trim()).filter(Boolean),v={description:f.description||void 0,tags:k,favorite:f.favorite,body:f.body};return l?EF({name:f.name,...v}):SF(e,v)},onSuccess:k=>{r.invalidateQueries({queryKey:["prompts"]}),r.invalidateQueries({queryKey:["prompt",k.name]}),t()},onError:k=>void a({title:n("prompts.saveError"),body:k instanceof Error?k.message:String(k)})}),m=Rt({mutationFn:()=>NF(e),onSuccess:()=>{r.invalidateQueries({queryKey:["prompts"]}),t()}}),y=A.useMemo(()=>f?/^[a-z0-9][a-z0-9-]*$/.test(f.name):!1,[f]),b=A.useMemo(()=>f?_F(f.body):[],[f]);return!l&&u.isLoading?d.jsx("div",{className:"nb-card",children:d.jsx(nt,{size:14,className:"animate-spin"})}):f?d.jsxs("div",{className:"nb-card flex flex-col gap-3",children:[d.jsxs(Of,{label:n("prompts.name"),children:[d.jsx("input",{type:"text",value:f.name,disabled:!l,onChange:k=>h({...f,name:k.target.value}),placeholder:n("prompts.namePlaceholder"),className:"nb-input w-full","aria-label":n("prompts.name")}),l&&f.name&&!y&&d.jsx("span",{className:"text-xs text-[var(--color-crashed-text,#b00)]",children:n("prompts.nameError")})]}),d.jsx(Of,{label:n("prompts.description"),children:d.jsx("input",{type:"text",value:f.description,onChange:k=>h({...f,description:k.target.value}),className:"nb-input w-full","aria-label":n("prompts.description")})}),d.jsx(Of,{label:n("prompts.tags"),children:d.jsx("input",{type:"text",value:f.tags,onChange:k=>h({...f,tags:k.target.value}),placeholder:n("prompts.tagsPlaceholder"),className:"nb-input w-full","aria-label":n("prompts.tags")})}),d.jsxs(Of,{label:n("prompts.body"),children:[d.jsx("textarea",{value:f.body,onChange:k=>h({...f,body:k.target.value}),placeholder:n("prompts.bodyPlaceholder"),rows:10,className:"nb-input w-full font-[family-name:var(--font-mono)] text-sm","aria-label":n("prompts.body")}),d.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:b.length?n("prompts.vars",{names:b.join(", ")}):n("prompts.noVars")})]}),d.jsxs("label",{className:"flex items-center gap-2 text-sm cursor-pointer",children:[d.jsx("input",{type:"checkbox",checked:f.favorite,onChange:k=>h({...f,favorite:k.target.checked})}),n("prompts.favorite")]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsxs("button",{type:"button",className:"nb-btn nb-btn-mint",disabled:g.isPending||l&&!y||!f.body.trim(),onClick:()=>g.mutate(),children:[g.isPending?d.jsx(nt,{size:14,className:"animate-spin"}):d.jsx(ma,{size:14,strokeWidth:3}),n("prompts.save")]}),!l&&d.jsxs("button",{type:"button",className:"nb-btn",disabled:m.isPending,onClick:async()=>{await o({title:n("prompts.delete"),body:n("prompts.deleteConfirm",{name:e})})&&m.mutate()},children:[d.jsx(xs,{size:14,strokeWidth:3}),n("prompts.delete")]})]})]}):null}function Of({label:e,children:t}){return d.jsxs("label",{className:"flex flex-col gap-1",children:[d.jsx("span",{className:"text-sm font-bold",children:e}),t]})}function AF(){var o;const e=Le(),t=Ge({queryKey:["system-info"],queryFn:FN}),n=Ge({queryKey:["system-env"],queryFn:WL}),[r,a]=A.useState(!1);return d.jsxs("div",{className:"flex flex-col gap-6 w-full",children:[d.jsx("header",{children:d.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold",children:e("system.h1")})}),d.jsx(TF,{current:(o=t.data)==null?void 0:o.version}),d.jsxs("section",{className:"nb-card",children:[d.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold mb-3",children:e("system.runtime")}),t.data?d.jsxs("dl",{className:"grid grid-cols-1 sm:grid-cols-[160px_1fr] gap-y-2 text-sm",children:[d.jsx("dt",{className:"font-bold",children:"Node"}),d.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.data.nodeVersion}),d.jsx("dt",{className:"font-bold",children:"Platform"}),d.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.data.platform}),d.jsx("dt",{className:"font-bold",children:"PID"}),d.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.data.pid??"—"}),d.jsx("dt",{className:"font-bold",children:"Uptime"}),d.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:RF(t.data.uptimeMs)})]}):d.jsx("p",{className:"text-[var(--color-text-muted)]",children:e("common.loading")})]}),d.jsxs("section",{className:"nb-card",children:[d.jsxs("div",{className:"flex items-center justify-between mb-3",children:[d.jsxs("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold",children:[e("system.env.title.prefix"),d.jsx("code",{className:"text-sm font-[family-name:var(--font-mono)] font-normal bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] px-2 py-0.5 rounded",children:"~/.coral/env"})]}),r?d.jsx("span",{className:"text-xs text-[var(--color-stuck)] font-bold",children:e("system.env.editing.label")}):d.jsxs("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>a(!0),type:"button","aria-label":e("system.env.edit.aria"),children:[d.jsx(Ab,{size:12,strokeWidth:2.5})," ",e("system.env.edit.button")]})]}),r?d.jsx(MF,{onClose:()=>{a(!1),n.refetch()}}):n.data&&n.data.exists?d.jsx("dl",{className:"grid grid-cols-1 sm:grid-cols-[220px_1fr] gap-y-1 text-sm font-[family-name:var(--font-mono)]",children:n.data.entries.map(l=>d.jsxs("div",{className:"contents",children:[d.jsxs("dt",{className:"font-bold flex items-center gap-2",children:[l.masked&&d.jsx("span",{className:"text-[var(--color-stuck)]",children:"🔒"}),l.key]}),d.jsx("dd",{className:"text-[var(--color-text-muted)] truncate",children:l.value})]},l.key))}):d.jsxs("p",{className:"text-[var(--color-text-muted)] text-sm",children:[e("system.env.empty.before"),d.jsx("code",{className:"bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] px-2 py-0.5 rounded font-[family-name:var(--font-mono)]",children:"sps setup"}),e("system.env.empty.after")]})]}),d.jsx(DF,{})]})}function TF({current:e}){var v;const t=Le(),{confirm:n,alert:r}=jn(),[a,o]=A.useState(!1),[l,u]=A.useState(null),f=Ge({queryKey:["latest-version"],queryFn:n3,enabled:!1}),[h,g]=A.useState(null),[m,y]=A.useState("npm i -g @coralai/sps-cli@latest"),b=async()=>{var E;if(await n({title:t("system.upgrade.confirm.title"),body:t("system.upgrade.confirm.body",{current:e??"?",latest:((E=f.data)==null?void 0:E.latest)??"?"}),confirm:t("system.upgrade.confirm.button")})){o(!0),u(null),g(null);try{const C=await r3();if(u(C.output),g(C.installedVersion),y(C.command),C.ok)r({title:t("system.upgrade.success.title"),body:t("system.upgrade.success.body",{version:C.installedVersion??"?"})});else{const N=C.installedVersion&&C.installedVersion===e?t("system.upgrade.notEffective.same",{version:C.installedVersion}):t("system.upgrade.notEffective.notInstalled");r({title:t("system.upgrade.notEffective.title"),body:N})}}catch(C){u(C.message),r({title:t("system.upgrade.error.title"),body:C.message})}finally{o(!1)}}},k=async()=>{const S=f.data&&!f.data.upToDate?`npm i -g @coralai/sps-cli@${f.data.latest}`:m;try{await navigator.clipboard.writeText(S),r({title:t("system.upgrade.copy.success.title"),body:t("system.upgrade.copy.success.body",{cmd:S})})}catch{r({title:t("system.upgrade.copy.fail.title"),body:t("system.upgrade.copy.fail.body",{cmd:S})})}};return d.jsxs("section",{className:"nb-card",children:[d.jsxs("div",{className:"flex items-center justify-between mb-3",children:[d.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold",children:t("system.upgrade.title")}),d.jsxs("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>f.refetch(),disabled:f.isFetching||!e,type:"button","aria-label":t("system.upgrade.checkLatest.aria"),children:[f.isFetching?d.jsx(nt,{size:12,strokeWidth:3,className:"animate-spin"}):d.jsx(gs,{size:12,strokeWidth:2.5}),t("system.upgrade.checkUpdate")]})]}),d.jsxs("dl",{className:"grid grid-cols-1 sm:grid-cols-[160px_1fr] gap-y-2 text-sm",children:[d.jsx("dt",{className:"font-bold",children:t("system.upgrade.label.current")}),d.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:e??"—"}),f.data&&d.jsxs(d.Fragment,{children:[d.jsx("dt",{className:"font-bold",children:t("system.upgrade.label.latest")}),d.jsxs("dd",{className:"font-[family-name:var(--font-mono)] flex items-center gap-2 flex-wrap",children:[f.data.latest,f.data.upToDate?d.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)"},children:t("system.upgrade.latestPill")}):d.jsxs(d.Fragment,{children:[d.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"3px 10px",fontSize:11},onClick:b,disabled:a,type:"button","aria-label":t("system.upgrade.button.upgradeAria"),children:[a?d.jsx(nt,{size:11,strokeWidth:3,className:"animate-spin"}):d.jsx(jb,{size:11,strokeWidth:2.5}),t("system.upgrade.button.upgrade")]}),d.jsxs("button",{className:"nb-btn",style:{padding:"3px 10px",fontSize:11},onClick:k,type:"button","aria-label":t("system.upgrade.button.copyAria"),title:t("system.upgrade.button.copyTitle"),children:[d.jsx(vR,{size:11,strokeWidth:2.5})," ",t("system.upgrade.button.copy")]})]})]})]}),h&&d.jsxs(d.Fragment,{children:[d.jsx("dt",{className:"font-bold",children:t("system.upgrade.label.installed")}),d.jsxs("dd",{className:"font-[family-name:var(--font-mono)] flex items-center gap-2",children:[h,h===((v=f.data)==null?void 0:v.latest)?d.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)"},children:t("system.upgrade.installed.ok")}):h===e?d.jsx("span",{className:"nb-status",style:{background:"var(--color-stuck-bg)",color:"var(--color-stuck)"},children:t("system.upgrade.installed.fail")}):null]})]}),f.isError&&d.jsxs(d.Fragment,{children:[d.jsx("dt",{className:"font-bold",children:t("system.upgrade.label.check")}),d.jsx("dd",{className:"text-[var(--color-crashed)] text-xs",children:f.error instanceof Error?f.error.message:String(f.error)})]})]}),l&&d.jsx("pre",{className:"mt-3 text-xs font-[family-name:var(--font-mono)] bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg p-3 max-h-40 overflow-auto whitespace-pre-wrap",children:l})]})}function MF({onClose:e}){const t=Le(),n=an(),{alert:r}=jn(),a=Ge({queryKey:["system-env-raw"],queryFn:XL}),[o,l]=A.useState(null),[u,f]=A.useState(null);A.useEffect(()=>{a.data&&o===null&&(l(a.data.content),f(a.data.etag))},[a.data,o]);const h=o!==null&&a.data&&o!==a.data.content,g=Rt({mutationFn:()=>{if(o===null)throw new Error("no draft");return ZL(o,u??"")},onSuccess:()=>{n.invalidateQueries({queryKey:["system-env"]}),n.invalidateQueries({queryKey:["system-env-raw"]}),e()},onError:m=>{const y=m.status;r({title:t(y===409?"system.env.error.conflict.title":"system.env.error.save.title"),body:y===409?t("system.env.error.conflict.body"):m instanceof Error?m.message:String(m)})}});return a.isLoading?d.jsx("p",{className:"text-[var(--color-text-muted)]",children:t("common.loading")}):d.jsxs("div",{children:[d.jsx("p",{className:"text-xs text-[var(--color-stuck)] font-bold mb-2",children:t("system.env.warning")}),d.jsx("textarea",{className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",style:{minHeight:320,resize:"vertical"},value:o??"",onChange:m=>l(m.target.value),spellCheck:!1,"aria-label":t("system.env.aria")}),d.jsxs("div",{className:"flex items-center justify-between mt-3",children:[d.jsxs("span",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)]",children:[u?`etag: ${u}`:"",h?t("system.env.dirtyMark"):""]}),d.jsxs("div",{className:"flex gap-2",children:[d.jsxs("button",{className:"nb-btn",style:{padding:"6px 12px"},onClick:e,disabled:g.isPending,type:"button",children:[d.jsx(dr,{size:12,strokeWidth:3})," ",t("system.env.cancel")]}),d.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"6px 12px"},onClick:()=>g.mutate(),disabled:!h||g.isPending,type:"button","aria-label":t("system.env.save.aria"),children:[g.isPending?d.jsx(nt,{size:12,strokeWidth:3,className:"animate-spin"}):d.jsx(ma,{size:12,strokeWidth:3}),t("system.env.save")]})]})]})]})}function DF(){var y;const e=Le(),{alert:t}=jn(),n=Ge({queryKey:["projects"],queryFn:ga}),[r,a]=A.useState({}),[o,l]=A.useState({}),[u,f]=A.useState({}),h=(((y=n.data)==null?void 0:y.data)??[]).map(b=>({project:b.name})),g=async(b,k)=>{l(v=>({...v,[b]:k?"fix":"check"}));try{const v=await i3(b,k);a(S=>({...S,[b]:v})),f(S=>({...S,[b]:!0}))}catch(v){t({title:e(k?"system.diagnostics.error.fix":"system.diagnostics.error.check"),body:v instanceof Error?v.message:String(v)})}finally{l(v=>({...v,[b]:null}))}},m=async()=>{for(const b of h)await g(b.project,!1)};return d.jsxs("section",{className:"nb-card",children:[d.jsxs("div",{className:"flex items-center justify-between mb-3",children:[d.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold",children:e("system.diagnostics.title")}),d.jsxs("button",{className:"nb-btn nb-btn-mint",style:{padding:"6px 12px",fontSize:12},onClick:()=>{m()},disabled:h.length===0||Object.values(o).some(Boolean),type:"button",children:[d.jsx(gs,{size:12,strokeWidth:2.5}),e("system.diagnostics.checkAll")]})]}),h.length===0?d.jsx("p",{className:"text-[var(--color-text-muted)] text-sm",children:e("system.diagnostics.empty")}):d.jsx("ul",{className:"flex flex-col gap-2",children:h.map(b=>{const k=r[b.project],v=o[b.project],S=k?k.checks.filter(_=>_.status==="fail").length:0,E=k?k.checks.filter(_=>_.status==="warn").length:0,C=u[b.project]??!1,N=k!=null;return d.jsxs("li",{className:"bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg",children:[d.jsxs("div",{className:"flex items-center gap-3 px-3 py-2",children:[d.jsxs("button",{type:"button",onClick:()=>f(_=>({..._,[b.project]:!C})),disabled:!N,className:"flex items-center gap-2 flex-1 text-left min-w-0","aria-label":e(C?"system.diagnostics.collapseAria":"system.diagnostics.expandAria"),children:[N&&k.ok?d.jsx(sh,{size:16,className:"text-[var(--color-running)] shrink-0",strokeWidth:2.5}):N?d.jsx(yu,{size:16,className:"text-[var(--color-stuck)] shrink-0",strokeWidth:2.5}):d.jsx(sh,{size:16,className:"text-[var(--color-text-subtle)] shrink-0",strokeWidth:2.5}),N&&(C?d.jsx(Vl,{size:12}):d.jsx(Yl,{size:12})),d.jsx("span",{className:"font-bold font-[family-name:var(--font-mono)]",children:b.project}),N?k.ok?d.jsx("span",{className:"text-xs text-[var(--color-running)] font-semibold",children:"OK"}):d.jsxs("span",{className:"text-xs text-[var(--color-stuck)] font-semibold",children:[S," fail · ",E," warn"]}):d.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:e("system.diagnostics.never")})]}),d.jsxs("button",{className:"nb-btn",style:{padding:"4px 10px",fontSize:11},onClick:()=>{g(b.project,!1)},disabled:!!v,type:"button","aria-label":e("system.diagnostics.checkAria"),children:[v==="check"?d.jsx(nt,{size:11,strokeWidth:3,className:"animate-spin"}):d.jsx(gs,{size:11,strokeWidth:2.5}),e("system.diagnostics.check")]}),d.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"4px 10px",fontSize:11},onClick:()=>{g(b.project,!0)},disabled:!!v||N&&k.ok,type:"button","aria-label":e("system.diagnostics.fixAria"),title:N&&k.ok?e("system.diagnostics.noFixesNeeded"):e("system.diagnostics.fix.tip"),children:[v==="fix"?d.jsx(nt,{size:11,strokeWidth:3,className:"animate-spin"}):d.jsx(IN,{size:11,strokeWidth:2.5}),e("system.diagnostics.fix")]})]}),C&&N&&d.jsxs("div",{className:"border-t-2 border-dashed border-[var(--color-text)] px-3 py-2",children:[d.jsx("ul",{className:"flex flex-col gap-1 text-xs font-[family-name:var(--font-mono)]",children:k.checks.map((_,D)=>d.jsx(OF,{check:_},`${_.name}-${D}`))}),k.fixes.length>0&&d.jsxs("div",{className:"mt-3 bg-[var(--color-running-bg)] border-2 border-[var(--color-running)] rounded p-2",children:[d.jsx("div",{className:"text-xs font-bold text-[var(--color-running)] mb-1",children:e("system.diagnostics.fixed")}),d.jsx("ul",{className:"text-xs list-disc pl-4",children:k.fixes.map((_,D)=>d.jsx("li",{children:_},D))})]})]})]},b.project)})})]})}function OF({check:e}){const t=e.status==="pass"?d.jsx(sh,{size:12,className:"text-[var(--color-running)]",strokeWidth:2.5}):e.status==="fail"?d.jsx(yu,{size:12,className:"text-[var(--color-crashed)]",strokeWidth:2.5}):e.status==="warn"?d.jsx(yu,{size:12,className:"text-[var(--color-stuck)]",strokeWidth:2.5}):d.jsx("span",{className:"w-3 h-3 rounded-full bg-[var(--color-text-subtle)] inline-block"});return d.jsxs("li",{className:"flex items-start gap-2",children:[d.jsx("span",{className:"pt-0.5 shrink-0",children:t}),d.jsx("span",{className:"font-bold w-32 shrink-0",children:e.name}),d.jsx("span",{className:"text-[var(--color-text-muted)] break-words",children:e.message})]})}function RF(e){const t=Math.floor(e/1e3),n=Math.floor(t/3600),r=Math.floor(t%3600/60),a=t%60;return n>0?`${n}h ${r}m ${a}s`:r>0?`${r}m ${a}s`:`${a}s`}function LF(){return ht("/api/chat/sessions")}function IF(e){return ht(`/api/chat/sessions/${e}`)}async function Xg(e={}){const t=await fetch("/api/chat/sessions",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw new Error(`${t.status}: ${await t.text()}`);return await t.json()}async function zF(e){const t=await fetch(`/api/chat/sessions/${e}`,{method:"DELETE"});if(!t.ok)throw new Error(`${t.status}`)}async function PF(e,t,n){const r=await fetch(`/api/chat/sessions/${e}/messages`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:t,attachments:n})});if(!r.ok)throw new Error(`${r.status}: ${await r.text()}`);return await r.json()}async function BF(e){const t=await fetch(`/api/chat/sessions/${e}/interrupt`,{method:"POST"});if(!t.ok&&t.status!==204)throw new Error(`${t.status}: ${await t.text()}`)}function UF(e,t){const n=t?`?since=${encodeURIComponent(t)}`:"";return ht(`/api/chat/sessions/${e}/messages${n}`)}function $F({onInsert:e,disabled:t}){var g;const n=Le(),[r,a]=A.useState(!1),[o,l]=A.useState(""),f=((g=Ge({queryKey:["prompts",o],queryFn:()=>vC(o||void 0),enabled:r}).data)==null?void 0:g.data)??[],h=async m=>{try{const y=await wC(m);e(y.body)}finally{a(!1),l("")}};return d.jsxs("div",{className:"relative flex-shrink-0",children:[d.jsx("button",{type:"button",className:"nb-btn",onClick:()=>a(m=>!m),disabled:t,"aria-label":n("prompts.insert"),title:n("prompts.insert"),children:d.jsx(jN,{size:14,strokeWidth:2.5})}),r&&d.jsxs("div",{className:"absolute bottom-full mb-2 left-0 z-20 w-72 nb-card max-h-80 overflow-auto flex flex-col gap-1",children:[d.jsxs("label",{className:"flex items-center gap-2 border-2 border-[var(--color-text)] rounded px-2 py-1",children:[d.jsx(Ol,{size:12}),d.jsx("input",{autoFocus:!0,value:o,onChange:m=>l(m.target.value),placeholder:n("prompts.search"),className:"bg-transparent outline-none flex-1 text-sm","aria-label":n("prompts.search")})]}),f.length===0?d.jsx("p",{className:"text-xs text-[var(--color-text-muted)] px-1 py-2",children:n("prompts.empty")}):f.map(m=>d.jsxs("button",{type:"button",onClick:()=>void h(m.name),className:"text-left px-2 py-1 rounded hover:bg-[var(--color-bg-cream)]",children:[d.jsx("code",{className:"font-[family-name:var(--font-mono)] text-sm font-bold",children:m.name}),m.description&&d.jsx("span",{className:"block text-xs text-[var(--color-text-muted)] truncate",children:m.description})]},m.name))]})]})}function pE(){var G,O,L,V,R,se,ge,ye,xe;const e=Le(),{sessionId:t}=fN(),n=bs(),r=an(),{confirm:a,alert:o}=jn(),l=Ge({queryKey:["chat-sessions"],queryFn:LF,refetchInterval:5e3}),u=Ge({queryKey:["chat-session",t],queryFn:()=>IF(t??""),enabled:!!t,refetchInterval:4e3}),[f,h]=A.useState(null),[g,m]=A.useState(""),[y,b]=A.useState(!1),k=A.useRef(null),[v,S]=A.useState(!1),[E,C]=A.useState([]),[N,_]=A.useState(!1),[D,T]=A.useState(!1),[M,I]=A.useState(!1),[F,$]=A.useState(null),[U,K]=A.useState(!1);A.useEffect(()=>{if(!t)return;const q=new EventSource(`/stream/chat/${encodeURIComponent(t)}`);let ne=!0;return q.addEventListener("open",()=>{if(ne){ne=!1;return}const ue=r.getQueryData(["chat-session",t]),ce=ue!=null&&ue.messages.length?ue.messages[ue.messages.length-1].ts:void 0;UF(t,ce).then(de=>{de.data.length!==0&&r.setQueryData(["chat-session",t],be=>{if(!be)return be;const je=new Set(be.messages.map(we=>we.id)),De=de.data.filter(we=>!je.has(we.id));return De.length===0?be:{...be,messages:[...be.messages,...De],lastMessageAt:De[De.length-1].ts,messageCount:be.messageCount+De.length}})}).catch(()=>{})}),q.addEventListener("chat.message",ue=>{try{const ce=JSON.parse(ue.data);r.setQueryData(["chat-session",t],de=>{if(!de||de.messages.some(De=>De.id===ce.message.id))return de;const je=de.messages.findIndex(De=>De.role==="user"&&De.id.startsWith("optim-")&&De.content===ce.message.content);if(je>=0){const De=[...de.messages];return De[je]=ce.message,{...de,messages:De}}return{...de,messages:[...de.messages,ce.message]}})}catch{}}),q.addEventListener("chat.message.pending",ue=>{try{const ce=JSON.parse(ue.data);h({id:ce.assistantId,blocks:[],done:!1,finalMessage:null})}catch{}}),q.addEventListener("chat.message.chunk.text",ue=>{try{const ce=JSON.parse(ue.data);h(de=>{if(!de||de.id!==ce.assistantId)return de;const be=[...de.blocks],je=be[be.length-1];return je&&je.type==="text"?be[be.length-1]={...je,target:je.target+ce.text}:be.push({type:"text",target:ce.text,displayed:""}),{...de,blocks:be}})}catch{}}),q.addEventListener("chat.message.chunk.tool_use",ue=>{try{const ce=JSON.parse(ue.data);h(de=>!de||de.id!==ce.assistantId?de:{...de,blocks:[...de.blocks,{type:"tool_use",id:ce.id,title:ce.title,kind:ce.kind,status:ce.status,input:ce.input,locations:ce.locations}]})}catch{}}),q.addEventListener("chat.message.chunk.tool_update",ue=>{try{const ce=JSON.parse(ue.data);h(de=>!de||de.id!==ce.assistantId?de:{...de,blocks:de.blocks.map(be=>be.type==="tool_use"&&be.id===ce.id?{...be,status:ce.status,input:be.input??ce.input,locations:be.locations??ce.locations}:be)})}catch{}}),q.addEventListener("chat.message.complete",ue=>{try{const ce=JSON.parse(ue.data);h(de=>de&&de.id===ce.assistantId?{...de,done:!0,finalMessage:ce.message}:de)}catch{}}),()=>q.close()},[t,r]),A.useEffect(()=>{if(!f)return;const q=f.blocks.reduce((ue,ce)=>ce.type==="text"?ue+(ce.target.length-ce.displayed.length):ue,0);if(q<=0){if(f.done&&f.finalMessage){const ue=f.finalMessage;r.setQueryData(["chat-session",t],ce=>!ce||ce.messages.some(de=>de.id===ue.id)?ce:{...ce,messages:[...ce.messages,ue],lastMessageAt:ue.ts,messageCount:ce.messageCount+1}),r.invalidateQueries({queryKey:["chat-sessions"]}),r.invalidateQueries({queryKey:["chat-session",t]}),h(null),b(!1)}return}const ne=setTimeout(()=>{h(ue=>{if(!ue)return ue;let ce=Math.max(1,Math.ceil(q/40));const de=ue.blocks.map(be=>{if(be.type!=="text"||ce<=0)return be;const je=be.target.length-be.displayed.length;if(je<=0)return be;const De=Math.min(je,ce);return ce-=De,{...be,displayed:be.target.slice(0,be.displayed.length+De)}});return{...ue,blocks:de}})},25);return()=>clearTimeout(ne)},[f,r,t]),A.useEffect(()=>{const q=k.current;q&&(q.scrollTop=q.scrollHeight)},[u.data,f]);const Q=A.useCallback(async(q={})=>{var ne,ue;try{const ce=await Xg({cwd:((ne=q.cwd)==null?void 0:ne.trim())||void 0,title:((ue=q.title)==null?void 0:ue.trim())||void 0,agentKind:q.agentKind});r.invalidateQueries({queryKey:["chat-sessions"]}),n(`/chat/${ce.id}`),S(!1)}catch(ce){o({title:e("chat.error.create.title"),body:ce instanceof Error?ce.message:String(ce)})}},[r,n,o,e]),B=A.useCallback(async()=>{const q=g.trim();if(!q&&E.length===0||y)return;let ne=t;if(!ne){const de=await Xg();r.invalidateQueries({queryKey:["chat-sessions"]}),ne=de.id,n(`/chat/${ne}`,{replace:!0})}const ue=E.map(de=>de.path),ce={id:`optim-${Date.now()}`,role:"user",content:q||e("chat.placeholder.attachment"),ts:new Date().toISOString(),status:"complete",attachments:ue.length>0?ue:void 0};r.setQueryData(["chat-session",ne],de=>de?{...de,messages:[...de.messages,ce],lastMessageAt:ce.ts,messageCount:de.messageCount+1}:{id:ne,createdAt:ce.ts,lastMessageAt:ce.ts,title:q.slice(0,60)||e("chat.placeholder.attachmentTitle"),project:null,messageCount:1,messages:[ce]}),m(""),C([]),b(!0);try{await PF(ne,q||e("chat.placeholder.viewAttachment"),ue.length>0?ue:void 0)}catch(de){b(!1),console.error("sendMessage failed",de),o({title:e("chat.error.send.title"),body:de instanceof Error?de.message:String(de)})}},[g,E,y,t,r,n,o,e]),H=A.useCallback(async q=>{if(q.size>HN){o({title:e("chat.error.fileTooBig.title"),body:e("chat.error.fileTooBig.body",{size:(q.size/1024/1024).toFixed(2),name:q.name})});return}let ne=t;if(!ne){const ue=await Xg();r.invalidateQueries({queryKey:["chat-sessions"]}),ne=ue.id,n(`/chat/${ne}`,{replace:!0})}_(!0);try{const ue=await A3(ne,q);C(ce=>[...ce,{path:ue.path,name:ue.name}])}catch(ue){o({title:e("chat.error.uploadAttachment.title"),body:ue instanceof Error?ue.message:String(ue)})}finally{_(!1)}},[t,r,n,o,e]),z=A.useCallback(q=>{C(ne=>ne.filter(ue=>ue.path!==q))},[]),Y=A.useCallback(async(q,ne)=>{await a({title:e("chat.delete.confirm.title"),body:e(ne==="cli"?"chat.delete.confirm.body.cli":"chat.delete.confirm.body.console"),confirm:e("chat.delete.confirm.button"),danger:!0})&&(await zF(q),r.invalidateQueries({queryKey:["chat-sessions"]}),t===q&&n("/chat"))},[r,t,n,a,e]),W=A.useCallback(async()=>{if(t)try{await BF(t)}catch(q){o({title:e("chat.error.interrupt.title"),body:q instanceof Error?q.message:String(q)})}},[t,o,e]);return d.jsxs("div",{className:"grid grid-cols-[260px_1fr] gap-4 h-[calc(100vh-140px)]",children:[d.jsxs("aside",{className:"nb-card p-3 overflow-auto flex flex-col gap-2",children:[d.jsxs("button",{className:"nb-btn nb-btn-primary w-full justify-center",onClick:()=>S(!0),type:"button",children:[d.jsx(jr,{size:14,strokeWidth:3}),e("chat.list.new")]}),d.jsx("div",{className:"mt-2 text-xs font-[family-name:var(--font-heading)] uppercase tracking-wider text-[var(--color-text-muted)] px-2",children:e("chat.list.heading",{count:((G=l.data)==null?void 0:G.data.length)??0})}),d.jsx("div",{className:"flex flex-col gap-1.5 mt-1",children:(()=>{var De;const q=((De=l.data)==null?void 0:De.data)??[],ne=Date.now(),ue=10080*60*1e3,ce=we=>new Date(we.lastMessageAt??we.createdAt).getTime(),de=q.filter(we=>ne-ce(we)<=ue),be=q.filter(we=>ne-ce(we)>ue),je=we=>d.jsxs("div",{className:["group flex items-start gap-2 p-2 rounded-lg border-2 border-transparent",t===we.id?"bg-[var(--color-accent-mint)] border-[var(--color-text)] shadow-[2px_2px_0_var(--color-text)]":"hover:bg-[var(--color-bg-cream)] hover:border-[var(--color-text)]"].join(" "),children:[d.jsxs("button",{type:"button","aria-label":e("chat.list.openAria",{title:we.title,cwd:we.cwd?e("chat.list.cwdSuffix",{cwd:we.cwd}):""}),onClick:()=>n(`/chat/${we.id}`),className:"flex items-start gap-2 flex-1 min-w-0 text-left",children:[d.jsx(Z1,{size:14,strokeWidth:2.5,className:"mt-0.5 flex-shrink-0"}),d.jsxs("div",{className:"flex-1 min-w-0",children:[d.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[d.jsx("p",{className:"text-sm font-semibold truncate flex-1",children:we.title}),we.source==="cli"&&d.jsx("span",{className:"flex-shrink-0 px-1.5 py-0 rounded-md bg-[var(--color-accent-purple)] border-2 border-[var(--color-text)] text-[9px] font-[family-name:var(--font-mono)] uppercase tracking-wider leading-tight",title:e("chat.cliBadge.tooltip"),children:e("chat.cliBadge")})]}),d.jsx("p",{className:"text-[10px] text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] truncate",children:e("chat.list.msgs",{count:we.messageCount,time:SC(we.lastMessageAt??we.createdAt,e)})}),we.cwd&&d.jsxs("p",{className:"text-[10px] text-[var(--color-text-subtle)] font-[family-name:var(--font-mono)] truncate flex items-center gap-1",title:we.cwd,children:[d.jsx(xu,{size:9,strokeWidth:2.5,className:"flex-shrink-0"}),d.jsx("span",{className:"truncate",dir:"rtl",children:we.cwd})]})]})]}),d.jsx("button",{type:"button","aria-label":we.source==="cli"?e("chat.list.deleteCli.aria"):e("chat.list.delete.aria"),className:"opacity-0 group-hover:opacity-100 p-1 hover:text-[var(--color-crashed)]",onClick:ut=>{ut.stopPropagation(),Y(we.id,we.source)},children:d.jsx(xs,{size:12})})]},we.id);return d.jsxs(d.Fragment,{children:[de.map(je),be.length>0&&d.jsxs(d.Fragment,{children:[d.jsxs("button",{type:"button",onClick:()=>K(we=>!we),"aria-expanded":U,className:"flex items-center gap-1 px-2 py-1 mt-1 rounded-lg text-xs font-semibold text-[var(--color-text-muted)] hover:text-[var(--color-text)] hover:bg-[var(--color-bg-cream)] focus-visible:outline focus-visible:outline-2",children:[U?d.jsx(Vl,{size:12,strokeWidth:2.5}):d.jsx(Yl,{size:12,strokeWidth:2.5}),e("chat.list.olderToggle",{count:be.length})]}),U&&be.map(je)]}),q.length===0&&d.jsx("p",{className:"text-xs text-[var(--color-text-subtle)] italic text-center py-4",children:e("chat.list.empty")})]})})()})]}),d.jsx("div",{className:"nb-card p-0 flex flex-col overflow-hidden",children:t?d.jsxs(d.Fragment,{children:[d.jsxs("header",{className:"px-4 py-3 border-b-2 border-[var(--color-text)] bg-[var(--color-bg-cream)]",children:[d.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[d.jsx("h2",{className:"font-[family-name:var(--font-heading)] font-bold text-lg",children:((O=u.data)==null?void 0:O.title)??e("common.loading")}),((L=u.data)==null?void 0:L.model)&&d.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-md bg-[var(--color-accent-yellow)] border-2 border-[var(--color-text)] text-[10px] font-[family-name:var(--font-mono)] font-bold uppercase tracking-wider",title:e("chat.detail.model.tooltip"),children:[d.jsx(oh,{size:11,strokeWidth:2.5})," ",u.data.model]})]}),d.jsx("p",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)]",children:t}),((V=u.data)==null?void 0:V.claudeSessionId)&&d.jsxs("p",{className:"text-xs text-[var(--color-text-subtle)] font-[family-name:var(--font-mono)] truncate",title:e("chat.detail.claudeSession.tooltip"),children:["claude: ",u.data.claudeSessionId]}),((R=u.data)==null?void 0:R.cwd)&&d.jsxs("p",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] flex items-center gap-1 mt-1",title:u.data.cwd,children:[d.jsx(xu,{size:11,strokeWidth:2.5,className:"flex-shrink-0"}),d.jsx("span",{className:"truncate",children:u.data.cwd})]})]}),d.jsxs("div",{ref:k,className:"flex-1 overflow-auto p-4 flex flex-col gap-4",children:[(((se=u.data)==null?void 0:se.messages)??[]).filter(q=>!(f&&q.status==="streaming")).map(q=>d.jsx(HF,{msg:q,sessionId:t??null,onPreviewAttachment:ne=>$(ne)},q.id)),f&&d.jsx(GF,{pending:f}),!u.isLoading&&(((ge=u.data)==null?void 0:ge.messages)??[]).length===0&&!f&&!y&&d.jsx("p",{className:"text-center text-[var(--color-text-subtle)] italic mt-12",children:e("chat.session.empty")})]}),((ye=u.data)==null?void 0:ye.source)==="cli"?d.jsxs("div",{className:"border-t-2 border-[var(--color-text)] p-4 bg-[var(--color-accent-purple)]",children:[d.jsxs("p",{className:"text-sm font-[family-name:var(--font-mono)] text-[var(--color-text-muted)] text-center",children:[d.jsx("strong",{children:e("chat.cli.banner.bold")})," — ",e("chat.cli.banner")]}),d.jsxs("pre",{className:"mt-2 px-3 py-2 bg-[var(--color-bg)] border-2 border-[var(--color-text)] rounded-md text-xs font-[family-name:var(--font-mono)] overflow-x-auto",children:["sps agent --chat --name ",(t??"").replace(/^session-/,"")]})]}):d.jsxs("div",{className:["border-t-2 border-[var(--color-text)] p-3 bg-[var(--color-bg-cream)] transition-colors",M?"bg-[var(--color-accent-mint)]":""].join(" "),onDragOver:q=>{q.dataTransfer.types.includes("Files")&&(q.preventDefault(),q.dataTransfer.dropEffect="copy",M||I(!0))},onDragLeave:()=>I(!1),onDrop:q=>{if(!q.dataTransfer.types.includes("Files"))return;q.preventDefault(),I(!1);const ne=Array.from(q.dataTransfer.files??[]);for(const ue of ne)H(ue)},children:[(E.length>0||N)&&d.jsxs("div",{className:"flex flex-wrap gap-2 mb-2",children:[E.map(q=>d.jsxs("button",{type:"button",className:"flex items-center gap-1.5 px-2 py-1 rounded-md bg-[var(--color-bg)] border-2 border-[var(--color-text)] text-xs font-[family-name:var(--font-mono)] hover:bg-[var(--color-accent-mint)] group",onClick:()=>$(q.path),title:e("chat.attachment.previewTooltip",{name:q.name,path:q.path}),children:[bh(q.path)?d.jsx(FR,{size:11,strokeWidth:2.5,className:"flex-shrink-0"}):d.jsx(qu,{size:11,strokeWidth:2.5,className:"flex-shrink-0"}),d.jsx("span",{className:"truncate max-w-[180px]",children:q.name}),d.jsx("span",{role:"button","aria-label":e("chat.input.removeAttachment",{name:q.name}),className:"ml-1 hover:text-[var(--color-crashed)] cursor-pointer",onClick:ne=>{ne.stopPropagation(),z(q.path)},children:d.jsx(dr,{size:11,strokeWidth:3})})]},q.path)),N&&d.jsxs("span",{className:"flex items-center gap-1.5 px-2 py-1 text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)]",children:[d.jsx(nt,{size:11,strokeWidth:2.5,className:"animate-spin"}),e("chat.input.uploading")]})]}),d.jsxs("div",{className:"flex gap-2 items-end",children:[d.jsx("button",{type:"button",className:"nb-btn flex-shrink-0",onClick:()=>T(!0),disabled:y,"aria-label":e("chat.input.attach.aria"),title:e("chat.input.attach.title"),children:d.jsx(JR,{size:14,strokeWidth:2.5})}),d.jsx($F,{disabled:y,onInsert:q=>m(ne=>ne.trim()?`${ne}
|
|
611
|
+
${q}`:q)}),d.jsx("textarea",{className:"nb-input flex-1 resize-none",placeholder:e(M?"chat.input.dragOver":"chat.input.placeholder"),rows:2,value:g,onChange:q=>m(q.target.value),onKeyDown:q=>{q.key==="Enter"&&!q.shiftKey&&!q.nativeEvent.isComposing&&(q.preventDefault(),B())},onPaste:q=>{const ue=Array.from(q.clipboardData.items??[]).filter(ce=>ce.kind==="file"&&ce.type.startsWith("image/"));if(ue.length!==0){q.preventDefault();for(const ce of ue){const de=ce.getAsFile();de&&H(de)}}},"aria-label":e("chat.input.aria")}),f?d.jsxs("button",{className:"nb-btn nb-btn-danger",onClick:W,type:"button","aria-label":e("chat.input.interrupt.aria"),children:[d.jsx(Mb,{size:14,strokeWidth:3}),e("chat.input.interrupt")]}):d.jsxs("button",{className:"nb-btn nb-btn-primary",onClick:B,disabled:!g.trim()&&E.length===0||y,type:"button","aria-label":e("chat.input.send.aria"),children:[y?d.jsx(nt,{size:14,strokeWidth:3,className:"animate-spin"}):d.jsx(bL,{size:14,strokeWidth:3}),e("chat.input.send")]})]})]})]}):d.jsx("div",{className:"flex-1 flex items-center justify-center p-8",children:d.jsxs("div",{className:"text-center max-w-md",children:[d.jsx("div",{className:"w-20 h-20 rounded-2xl bg-[var(--color-accent-mint)] border-[3px] border-[var(--color-text)] shadow-[3px_3px_0_var(--color-text)] flex items-center justify-center mx-auto mb-4",children:d.jsx(Z1,{size:32,strokeWidth:2.5})}),d.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-2xl font-bold mb-2",children:e("chat.empty.title")}),d.jsx("p",{className:"text-sm text-[var(--color-text-muted)] mb-4",children:e("chat.empty.hint")}),d.jsx("p",{className:"text-xs text-[var(--color-text-subtle)] italic",children:e("chat.empty.shortcuts")})]})})}),v&&d.jsx(qF,{onCancel:()=>S(!1),onCreate:q=>Q(q)}),D&&d.jsx(Ib,{mode:"file",title:e("chat.filePicker.title"),initialPath:((xe=u.data)==null?void 0:xe.cwd)??void 0,onCancel:()=>T(!1),onSelect:q=>{C(ne=>{if(ne.some(ce=>ce.path===q))return ne;const ue=q.split(/[\\/]/).pop()||q;return[...ne,{path:q,name:ue}]}),T(!1)}}),F&&t&&d.jsx(FF,{sessionId:t,path:F,onClose:()=>$(null)})]})}function bh(e){return/\.(png|jpe?g|gif|webp|svg|avif)$/i.test(e)}function mE(e){return/\.pdf$/i.test(e)}function Zg(e){return/\.(txt|md|log|json|yaml|yml|csv|html|xml|tsx?|jsx?|css|sh|ya?ml|conf|toml|ini|env|gitignore|sql|py|rb|go|rs|java|kt|swift|c|cc|cpp|h|hpp)$/i.test(e)}function FF({sessionId:e,path:t,onClose:n}){const r=Le(),[a,o]=A.useState(null),[l,u]=A.useState(null);A.useEffect(()=>{const g=m=>{m.key==="Escape"&&(m.preventDefault(),n())};return window.addEventListener("keydown",g),()=>window.removeEventListener("keydown",g)},[n]),A.useEffect(()=>{if(!Zg(t))return;let g=!1;return fetch(Oy(e,t)).then(async m=>{if(!m.ok)throw new Error(`${m.status}`);return m.text()}).then(m=>{g||o(m.length>2e5?m.slice(0,2e5)+`
|
|
612
|
+
|
|
613
|
+
…(truncated)`:m)}).catch(m=>{g||u(m instanceof Error?m.message:String(m))}),()=>{g=!0}},[e,t]);const f=Oy(e,t),h=t.split(/[\\/]/).pop()??t;return d.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-[rgba(45,55,72,0.6)] p-4",role:"presentation",children:d.jsxs("div",{className:"nb-card bg-[var(--color-bg)] max-w-3xl w-full p-5 flex flex-col",style:{maxHeight:"85vh"},role:"dialog","aria-modal":"true","aria-label":r("chat.attachment.preview.aria",{name:h}),children:[d.jsxs("header",{className:"flex items-center justify-between mb-3 shrink-0",children:[d.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[d.jsx(SR,{size:16,strokeWidth:2.5,className:"flex-shrink-0"}),d.jsx("h3",{className:"font-[family-name:var(--font-heading)] font-bold text-base truncate",children:h})]}),d.jsx("button",{type:"button",className:"p-1 hover:bg-[var(--color-bg-cream)] rounded flex-shrink-0",onClick:n,"aria-label":r("chat.attachment.close.aria"),children:d.jsx(dr,{size:16,strokeWidth:3})})]}),d.jsx("p",{className:"text-[10px] text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] truncate mb-2 shrink-0",title:t,dir:"rtl",children:t}),d.jsxs("div",{className:"flex-1 overflow-auto border-2 border-[var(--color-text)] rounded-lg bg-[var(--color-bg-cream)] min-h-0",children:[bh(t)&&d.jsx("div",{className:"flex items-center justify-center p-4",children:d.jsx("img",{src:f,alt:`Preview: ${h}`,className:"max-w-full max-h-[60vh] object-contain"})}),mE(t)&&d.jsx("iframe",{src:f,title:`PDF: ${h}`,className:"w-full",style:{height:"60vh",border:0}}),Zg(t)&&d.jsx("pre",{className:"p-3 text-xs font-[family-name:var(--font-mono)] whitespace-pre-wrap break-words",children:l?d.jsx("span",{className:"text-[var(--color-crashed)]",children:r("chat.attachment.readErr",{detail:l})}):a===null?d.jsx("span",{className:"text-[var(--color-text-muted)]",children:r("chat.attachment.loading")}):a}),!bh(t)&&!mE(t)&&!Zg(t)&&d.jsxs("div",{className:"p-6 text-center text-sm text-[var(--color-text-muted)]",children:[d.jsx("p",{className:"mb-3",children:r("chat.attachment.unsupported")}),d.jsx("a",{href:f,download:h,className:"nb-btn nb-btn-primary inline-flex",children:r("chat.attachment.download")})]})]})]})})}function qF({onCancel:e,onCreate:t}){const n=Le(),[r,a]=A.useState(""),[o,l]=A.useState(""),[u,f]=A.useState("claude"),[h,g]=A.useState(!1),[m,y]=A.useState(!1);A.useEffect(()=>{if(m)return;const k=v=>{v.key==="Escape"&&(v.preventDefault(),e())};return window.addEventListener("keydown",k),()=>window.removeEventListener("keydown",k)},[e,m]);const b=async()=>{if(!h){g(!0);try{t({title:r.trim()||void 0,cwd:o.trim()||void 0,agentKind:u})}finally{g(!1)}}};return d.jsxs("div",{className:"fixed inset-0 z-40 flex items-center justify-center bg-[rgba(45,55,72,0.4)] p-4",role:"presentation",children:[d.jsxs("div",{className:"nb-card bg-[var(--color-bg)] max-w-md w-full p-5",role:"dialog","aria-modal":"true","aria-label":n("chat.newSession.title.aria"),children:[d.jsxs("header",{className:"flex items-center justify-between mb-4",children:[d.jsx("h2",{className:"font-[family-name:var(--font-heading)] font-bold text-lg",children:n("chat.newSession.title")}),d.jsx("button",{type:"button",className:"p-1 hover:bg-[var(--color-bg-cream)] rounded",onClick:e,"aria-label":n("chat.newSession.close.aria"),children:d.jsx(dr,{size:16,strokeWidth:3})})]}),d.jsxs("div",{className:"flex flex-col gap-4",children:[d.jsxs("div",{children:[d.jsx("span",{className:"block text-xs font-bold mb-1.5 uppercase tracking-wider",children:n("chat.newSession.field.agent")}),d.jsx("div",{className:"grid grid-cols-2 gap-2",children:["claude","openai"].map(k=>{const v=u===k;return d.jsx("button",{type:"button",onClick:()=>f(k),"aria-pressed":v,className:["rounded-xl border-2 px-3 py-2 text-sm font-bold transition-all",v?"bg-[var(--color-accent-mint)] border-[var(--color-text)] shadow-[3px_3px_0_var(--color-text)]":"bg-[var(--color-bg)] border-[var(--color-border-light)] hover:border-[var(--color-text)]"].join(" "),children:k==="claude"?"Claude":"OpenAI"},k)})})]}),d.jsxs("div",{children:[d.jsx("label",{htmlFor:"new-session-title",className:"block text-xs font-bold mb-1.5 uppercase tracking-wider",children:n("chat.newSession.field.title")}),d.jsx("input",{id:"new-session-title",type:"text",className:"nb-input w-full",placeholder:n("chat.newSession.field.title.placeholder"),value:r,onChange:k=>a(k.target.value),autoFocus:!0})]}),d.jsxs("div",{children:[d.jsx("label",{htmlFor:"new-session-cwd",className:"block text-xs font-bold mb-1.5 uppercase tracking-wider",children:n("chat.newSession.field.cwd")}),d.jsxs("div",{className:"flex gap-2",children:[d.jsx("input",{id:"new-session-cwd",type:"text",className:"nb-input flex-1 font-[family-name:var(--font-mono)] text-sm",placeholder:"/home/coral/projects/my-app",value:o,onChange:k=>l(k.target.value)}),d.jsxs("button",{type:"button",className:"nb-btn flex-shrink-0",onClick:()=>y(!0),"aria-label":n("chat.newSession.field.cwd.browseAria"),title:n("chat.newSession.field.cwd.browseAria"),children:[d.jsx(NN,{size:14,strokeWidth:2.5}),n("chat.newSession.field.cwd.browse")]})]}),d.jsxs("p",{className:"text-[11px] text-[var(--color-text-muted)] mt-1.5 leading-relaxed",children:[d.jsx(xu,{size:10,strokeWidth:2.5,className:"inline mr-1 -mt-0.5"}),n("chat.newSession.field.cwd.help1")," ",n("chat.newSession.field.cwd.help2")]})]}),d.jsxs("div",{className:"flex gap-2 justify-end pt-2",children:[d.jsx("button",{type:"button",className:"nb-btn",onClick:e,children:n("chat.newSession.cancel")}),d.jsxs("button",{type:"button",className:"nb-btn nb-btn-primary",onClick:b,disabled:h,children:[h?d.jsx(nt,{size:14,strokeWidth:3,className:"animate-spin"}):d.jsx(jr,{size:14,strokeWidth:3}),n("chat.newSession.create")]})]})]})]}),m&&d.jsx(Ib,{initialPath:o.trim()||void 0,onCancel:()=>y(!1),onSelect:k=>{l(k),y(!1)}})]})}function HF({msg:e,sessionId:t,onPreviewAttachment:n}){const r=Le(),a=e.role==="user",o=e.role==="error",l=e.blocks&&e.blocks.length>0?e.blocks:[{type:"text",text:e.content}],u=e.attachments??[];return d.jsx("div",{className:a?"self-end max-w-3xl":"self-start max-w-3xl",children:d.jsxs("div",{className:["nb-card",a?"bg-[var(--color-secondary)]":o?"bg-[var(--color-crashed-bg)]":"bg-[var(--color-bg)]"].join(" "),children:[d.jsxs("p",{className:"text-xs font-bold uppercase tracking-wider text-[var(--color-text-muted)] mb-2 flex items-center gap-2",children:[r(a?"chat.message.role.you":o?"chat.message.role.error":"chat.message.role.assistant"),d.jsx("span",{className:"font-normal",children:"·"}),d.jsx("span",{className:"font-normal cursor-help",title:QF(e.ts),children:SC(e.ts,r)})]}),d.jsx("div",{className:"flex flex-col gap-2",children:l.map((f,h)=>d.jsx(VF,{block:f},h))}),u.length>0&&t&&d.jsx("div",{className:"mt-3 pt-3 border-t-2 border-dashed border-[var(--color-text)]/30 flex flex-wrap gap-2",children:u.map(f=>d.jsx(KF,{sessionId:t,path:f,onPreview:()=>n(f)},f))}),e.truncated&&d.jsx("p",{className:"mt-3 px-3 py-2 bg-[var(--color-stuck-bg)] border-2 border-[var(--color-stuck)] rounded-lg text-xs text-[var(--color-stuck)] font-bold",children:r("chat.message.truncated")})]})})}function KF({sessionId:e,path:t,onPreview:n}){const r=Le(),a=t.split(/[\\/]/).pop()??t;return bh(t)?d.jsx("button",{type:"button",onClick:n,className:"block rounded-md overflow-hidden border-2 border-[var(--color-text)] hover:shadow-[2px_2px_0_var(--color-text)] transition-shadow",title:r("chat.attachment.previewSimpleTooltip",{name:a}),children:d.jsx("img",{src:Oy(e,t),alt:a,className:"block max-h-40 max-w-[12rem] object-cover",loading:"lazy"})}):d.jsxs("button",{type:"button",onClick:n,className:"flex items-center gap-1.5 px-2 py-1 rounded-md bg-[var(--color-bg)] border-2 border-[var(--color-text)] text-xs font-[family-name:var(--font-mono)] hover:bg-[var(--color-accent-mint)]",title:r("chat.attachment.previewTooltip",{name:a,path:t}),children:[d.jsx(qu,{size:11,strokeWidth:2.5,className:"flex-shrink-0"}),d.jsx("span",{className:"truncate max-w-[200px]",children:a})]})}function GF({pending:e}){const t=(()=>{for(let n=e.blocks.length-1;n>=0;n--)if(e.blocks[n].type==="text")return n;return-1})();return d.jsx("div",{className:"self-start max-w-3xl",children:d.jsxs("div",{className:"nb-card bg-[var(--color-bg)]",children:[d.jsxs("p",{className:"text-xs font-bold uppercase tracking-wider text-[var(--color-text-muted)] mb-2 flex items-center gap-2",children:["assistant",d.jsx("span",{className:"font-normal",children:"·"}),d.jsxs("span",{className:"flex items-center gap-1 font-normal text-[var(--color-running)]",children:[d.jsx(nt,{size:10,strokeWidth:3,className:"animate-spin"}),"streaming"]})]}),d.jsxs("div",{className:"flex flex-col gap-2",children:[e.blocks.length===0&&d.jsx("p",{className:"text-sm text-[var(--color-text-muted)] italic",children:"…"}),e.blocks.map((n,r)=>{if(n.type==="text"){const a=r===t;return d.jsxs("div",{className:"relative",children:[d.jsx(kC,{text:n.displayed}),a&&d.jsx("span",{className:"inline-block w-2 h-4 ml-1 bg-[var(--color-text)] animate-pulse align-middle"})]},r)}return d.jsx(EC,{tool:n},r)})]})]})})}function VF({block:e}){return e.type==="text"?d.jsx(kC,{text:e.text}):d.jsx(EC,{tool:e})}function kC({text:e}){return e?d.jsx("div",{className:"text-sm font-[family-name:var(--font-body)] break-words prose-chat",children:d.jsx(yx,{remarkPlugins:[wx],rehypePlugins:[Sx],children:e})}):null}function YF(e){if(e==null||typeof e!="object")return typeof e=="string"?e:"";const t=e,n=a=>typeof t[a]=="string"?t[a]:void 0;return n("file_path")??n("path")??n("notebook_path")??n("command")??n("pattern")??n("query")??n("url")??n("name")??n("description")??n("prompt")??Object.values(t).find(a=>typeof a=="string"&&a.trim())??""}function EC({tool:e}){const[t,n]=A.useState(!1),r=e.status==="completed"||e.status==="complete",a=e.status==="failed",o=!r&&!a,l=YF(e.input),u=e.input!=null&&(typeof e.input!="object"||Object.keys(e.input).length>0);return d.jsxs("div",{className:"border-2 border-[var(--color-text)] rounded-lg overflow-hidden bg-[var(--color-bg-cream)]",children:[d.jsxs("button",{type:"button",onClick:()=>n(f=>!f),className:"w-full flex items-center gap-2 px-3 py-2 text-xs font-[family-name:var(--font-mono)] hover:bg-[var(--color-accent-yellow)] transition-colors",children:[d.jsx(Yl,{size:12,strokeWidth:3,className:["transition-transform flex-shrink-0",t?"rotate-90":""].join(" ")}),d.jsx(IN,{size:12,strokeWidth:2.5,className:"flex-shrink-0"}),d.jsx("span",{className:"font-bold flex-shrink-0",children:e.title||e.kind}),d.jsx("span",{className:"flex-1 text-left text-[var(--color-text-muted)] truncate",title:l,children:l}),o&&d.jsx(nt,{size:12,strokeWidth:3,className:"animate-spin text-[var(--color-running)] flex-shrink-0"}),r&&d.jsx(bu,{size:12,strokeWidth:2.5,className:"text-[var(--color-running)] flex-shrink-0"}),a&&d.jsx(EN,{size:12,strokeWidth:2.5,className:"text-[var(--color-crashed)] flex-shrink-0"})]}),t&&d.jsxs("div",{className:"px-3 py-2 text-xs font-[family-name:var(--font-mono)] text-[var(--color-text-muted)] border-t-2 border-[var(--color-text)] space-y-1",children:[u?d.jsx("pre",{className:"whitespace-pre-wrap break-all text-[var(--color-text)] max-h-72 overflow-auto",children:typeof e.input=="string"?e.input:JSON.stringify(e.input,null,2)}):d.jsx("div",{children:"无参数"}),d.jsxs("div",{className:"opacity-60",children:["id: ",e.id," · ",e.status]})]})]})}function SC(e,t){if(!e)return"";const n=new Date(e),r=Date.now()-n.getTime();return r<6e4?t("kanban.time.justNow"):r<36e5?t("kanban.time.minutes",{n:Math.floor(r/6e4)}):r<864e5?t("kanban.time.hours",{n:Math.floor(r/36e5)}):n.toLocaleDateString()}function QF(e){if(!e)return;const t=new Date(e),n=r=>String(r).padStart(2,"0");return`${t.getFullYear()}-${n(t.getMonth()+1)}-${n(t.getDate())} ${n(t.getHours())}:${n(t.getMinutes())}:${n(t.getSeconds())}`}function WF(){return ht("/api/processes").then(e=>e.data)}function XF(e){return Rb(`/api/processes/${e}/kill`)}function ZF(){return ht("/api/processes/reclaim")}async function JF(e){const t=await fetch("/api/processes/reclaim",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({idleMinutes:e})});if(!t.ok)throw new Error(`${t.status}: ${await t.text()}`);return t.json()}const gE="border-[3px] border-[var(--color-text)] rounded-2xl bg-white shadow-[4px_4px_0_var(--color-text)]";function e8(e){if(!e)return"—";const t=Date.now()-new Date(e).getTime();if(!Number.isFinite(t)||t<0)return"—";const n=Math.floor(t/6e4);if(n<1)return"<1m";if(n<60)return`${n}m`;const r=Math.floor(n/60);return r<24?`${r}h${n%60?` ${n%60}m`:""}`:`${Math.floor(r/24)}d${r%24?` ${r%24}h`:""}`}function Jg(e){return e.project?e.project:e.cwd?e.cwd.split("/").filter(Boolean).pop()??e.slot:e.slot}function yE(e){const t=/^session-chat-(.+)$/.exec(e.slot);return(t==null?void 0:t[1])??null}function t8({p:e}){const t=e.alive?e.sessionState??"alive":"offline",n=e.alive?"bg-[var(--color-accent-mint)]":"bg-[var(--color-bg-cream)] text-[var(--color-text)]/60";return d.jsxs("span",{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded-lg border-2 border-[var(--color-text)] text-xs font-bold font-[family-name:var(--font-mono)] ${n}`,children:[d.jsx("span",{className:`w-2 h-2 rounded-full ${e.alive?"bg-green-600":"bg-gray-400"}`}),t]})}function n8(){var k;const e=Le(),t=an(),[n,r]=A.useState(null),[a,o]=A.useState("all"),l=Ge({queryKey:["processes"],queryFn:WF,refetchInterval:5e3}),u=Rt({mutationFn:XF,onSuccess:v=>{r(v.message),t.invalidateQueries({queryKey:["processes"]})},onError:v=>r(v instanceof Error?v.message:String(v))}),f=Ge({queryKey:["reclaim"],queryFn:ZF}),[h,g]=A.useState("");A.useEffect(()=>{f.data&&h===""&&g(String(f.data.idleMinutes))},[f.data,h]);const m=Rt({mutationFn:v=>JF(v),onSuccess:v=>{r(`自动回收已设为 ${v.idleMinutes} 分钟空闲`),t.invalidateQueries({queryKey:["reclaim"]})},onError:v=>r(v instanceof Error?v.message:String(v))}),y=l.data??[],b=y.filter(v=>a==="all"?!0:v.kind===a);return d.jsxs("div",{className:"max-w-full",children:[d.jsxs("div",{className:"flex items-center gap-3 mb-1",children:[d.jsx(oh,{size:22,strokeWidth:2.5}),d.jsx("h1",{className:"font-[family-name:var(--font-heading)] font-bold text-2xl",children:e("processes.title")}),d.jsxs("button",{type:"button","aria-label":e("processes.refresh"),onClick:()=>t.invalidateQueries({queryKey:["processes"]}),className:"ml-auto inline-flex items-center gap-1.5 px-3 py-1.5 rounded-xl border-2 border-[var(--color-text)] bg-white text-sm font-semibold shadow-[2px_2px_0_var(--color-text)] hover:-translate-x-px hover:-translate-y-px focus-visible:outline focus-visible:outline-2",children:[l.isFetching?d.jsx(nt,{size:15,className:"animate-spin"}):d.jsx(gs,{size:15}),e("processes.refresh")]})]}),d.jsxs("p",{className:"text-sm text-[var(--color-text)]/70 mb-3",children:[e("processes.subtitle")," · ",e("processes.aliveCount").replace("{n}",String(y.length))]}),d.jsxs("div",{className:`${gE} px-4 py-3 mb-4 flex flex-wrap items-center gap-2`,style:{boxShadow:"2px 2px 0 var(--color-text)"},children:[d.jsx(TL,{size:16,strokeWidth:2.5}),d.jsx("span",{className:"text-sm font-bold",children:"自动回收"}),d.jsx("span",{className:"text-sm text-[var(--color-text)]/70",children:"会话空闲"}),d.jsx("input",{type:"number",min:1,max:1440,value:h,onChange:v=>g(v.target.value),className:"w-20 px-2 py-1 rounded-lg border-2 border-[var(--color-text)] font-[family-name:var(--font-mono)] text-sm","aria-label":"自动回收空闲分钟数"}),d.jsx("span",{className:"text-sm text-[var(--color-text)]/70",children:"分钟后自动停(下次访问自动续上,不丢上下文)"}),d.jsxs("button",{type:"button",disabled:m.isPending||h===""||Number(h)===((k=f.data)==null?void 0:k.idleMinutes),onClick:()=>m.mutate(Math.round(Number(h))),className:"ml-auto inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg border-2 border-[var(--color-text)] bg-[var(--color-accent-mint)] text-sm font-bold shadow-[2px_2px_0_var(--color-text)] hover:-translate-x-px hover:-translate-y-px disabled:opacity-50 focus-visible:outline focus-visible:outline-2","aria-label":"保存自动回收设置",children:[m.isPending?d.jsx(nt,{size:14,className:"animate-spin"}):d.jsx(ma,{size:14,strokeWidth:3}),"保存"]})]}),n&&d.jsx("div",{className:"mb-3 px-3 py-2 rounded-xl border-2 border-[var(--color-text)] bg-[var(--color-bg-cream)] text-sm font-mono",children:n}),d.jsx("div",{className:"flex flex-wrap gap-2 mb-3 items-center",children:["all","worker","chat"].map(v=>d.jsx("button",{type:"button","aria-label":e(`processes.kind.${v}`),onClick:()=>o(v),className:`px-3 py-1 rounded-lg border-2 border-[var(--color-text)] text-sm font-bold shadow-[2px_2px_0_var(--color-text)] focus-visible:outline focus-visible:outline-2 ${a===v?"bg-[var(--color-accent-yellow)]":"bg-white hover:-translate-x-px hover:-translate-y-px"}`,children:e(`processes.kind.${v}`)},v))}),d.jsx("div",{className:`${gE} overflow-hidden`,children:d.jsxs("table",{className:"w-full text-sm",children:[d.jsx("thead",{className:"bg-[var(--color-bg-cream)] font-[family-name:var(--font-heading)]",children:d.jsxs("tr",{className:"text-left",children:[d.jsx("th",{className:"px-3 py-2",children:e("processes.col.kind")}),d.jsx("th",{className:"px-3 py-2",children:e("processes.col.slot")}),d.jsx("th",{className:"px-3 py-2",children:e("processes.col.project")}),d.jsx("th",{className:"px-3 py-2",children:"PID"}),d.jsx("th",{className:"px-3 py-2",children:e("processes.col.state")}),d.jsx("th",{className:"px-3 py-2",children:e("processes.col.memory")}),d.jsx("th",{className:"px-3 py-2",children:"运行时间"}),d.jsx("th",{className:"px-3 py-2",children:e("processes.col.action")})]})}),d.jsxs("tbody",{className:"font-[family-name:var(--font-mono)]",children:[b.length===0&&d.jsx("tr",{children:d.jsx("td",{colSpan:8,className:"px-3 py-6 text-center text-[var(--color-text)]/50",children:e("processes.empty")})}),b.map(v=>d.jsxs("tr",{className:"border-t-2 border-[var(--color-text)]/10",title:v.cwd??"",children:[d.jsx("td",{className:"px-3 py-2",children:d.jsx("span",{className:`inline-block px-2 py-0.5 rounded-lg border-2 border-[var(--color-text)] text-xs font-bold ${v.kind==="worker"?"bg-[var(--color-accent-yellow)]":"bg-[var(--color-accent-purple)]"}`,children:e(`processes.kind.${v.kind}`)})}),d.jsx("td",{className:"px-3 py-2 max-w-[220px] truncate",children:v.slot}),d.jsx("td",{className:"px-3 py-2 max-w-[220px] truncate",children:v.kind==="chat"&&yE(v)?d.jsxs(ha,{to:`/chat/${yE(v)}`,className:"inline-flex items-center gap-1 font-semibold text-[var(--color-text)] underline decoration-2 underline-offset-2 hover:opacity-70",title:"打开对话窗口",children:[d.jsx(CN,{size:12,strokeWidth:2.5})," ",Jg(v)]}):v.kind==="worker"&&v.project?d.jsxs(ha,{to:`/board?project=${encodeURIComponent(v.project)}`,className:"inline-flex items-center gap-1 font-semibold text-[var(--color-text)] underline decoration-2 underline-offset-2 hover:opacity-70",title:"打开该项目看板",children:[d.jsx(oh,{size:12,strokeWidth:2.5})," ",Jg(v)]}):d.jsx("span",{children:Jg(v)})}),d.jsx("td",{className:"px-3 py-2",children:v.pid??"—"}),d.jsx("td",{className:"px-3 py-2",children:d.jsx(t8,{p:v})}),d.jsx("td",{className:"px-3 py-2",children:v.memoryMB!=null?`${v.memoryMB} MB`:"—"}),d.jsx("td",{className:"px-3 py-2",children:e8(v.startedAt)}),d.jsx("td",{className:"px-3 py-2",children:v.alive&&v.pid!=null?d.jsxs("button",{type:"button","aria-label":`${e("processes.kill")} ${v.slot}`,onClick:()=>{confirm(e("processes.killConfirm").replace("{slot}",v.slot))&&u.mutate(v.pid)},className:"inline-flex items-center gap-1 px-2.5 py-1 rounded-lg border-2 border-[var(--color-text)] bg-[var(--color-accent-pink)] text-xs font-bold shadow-[2px_2px_0_var(--color-text)] hover:-translate-x-px hover:-translate-y-px active:translate-x-0.5 active:translate-y-0.5 focus-visible:outline focus-visible:outline-2",children:[d.jsx(EN,{size:13})," ",e("processes.kill")]}):d.jsx("span",{className:"text-[var(--color-text)]/40 text-xs",children:"—"})})]},v.slot))]})]})})]})}function r8(e={}){const t=new URLSearchParams;e.project&&t.set("project",e.project),e.action&&t.set("action",e.action);const n=t.toString();return ht(`/api/audit${n?`?${n}`:""}`).then(r=>r.data)}const i8="border-[3px] border-[var(--color-text)] rounded-2xl bg-white shadow-[4px_4px_0_var(--color-text)]",a8={create:"bg-[var(--color-accent-mint)]",modify:"bg-[var(--color-accent-yellow)]",delete:"bg-[var(--color-accent-pink)]",daemon:"bg-[var(--color-accent-purple)]"};function s8(){const e=Le(),t=an(),[n,r]=A.useState(""),a=Ge({queryKey:["audit",n],queryFn:()=>r8(n?{action:n}:{}),refetchInterval:8e3}),o=a.data??[],l=u=>e(`audit.action.${u}`);return d.jsxs("div",{className:"max-w-full",children:[d.jsxs("div",{className:"flex items-center gap-3 mb-1",children:[d.jsx(TN,{size:22,strokeWidth:2.5}),d.jsx("h1",{className:"font-[family-name:var(--font-heading)] font-bold text-2xl",children:e("audit.title")}),d.jsxs("button",{type:"button","aria-label":e("audit.refresh"),onClick:()=>t.invalidateQueries({queryKey:["audit"]}),className:"ml-auto inline-flex items-center gap-1.5 px-3 py-1.5 rounded-xl border-2 border-[var(--color-text)] bg-white text-sm font-semibold shadow-[2px_2px_0_var(--color-text)] hover:-translate-x-px hover:-translate-y-px focus-visible:outline focus-visible:outline-2",children:[a.isFetching?d.jsx(nt,{size:15,className:"animate-spin"}):d.jsx(gs,{size:15}),e("audit.refresh")]})]}),d.jsx("p",{className:"text-sm text-[var(--color-text)]/70 mb-4",children:e("audit.subtitle")}),d.jsx("div",{className:"flex gap-2 mb-3",children:["","create","modify","delete","daemon"].map(u=>d.jsx("button",{type:"button","aria-label":u?l(u):e("audit.filter.all"),onClick:()=>r(u),className:`px-3 py-1 rounded-lg border-2 border-[var(--color-text)] text-sm font-bold shadow-[2px_2px_0_var(--color-text)] focus-visible:outline focus-visible:outline-2 ${n===u?"bg-[var(--color-accent-purple)]":"bg-white hover:-translate-x-px hover:-translate-y-px"}`,children:u?l(u):e("audit.filter.all")},u||"all"))}),d.jsx("div",{className:`${i8} overflow-hidden`,children:d.jsxs("table",{className:"w-full text-sm",children:[d.jsx("thead",{className:"bg-[var(--color-bg-cream)] font-[family-name:var(--font-heading)]",children:d.jsxs("tr",{className:"text-left",children:[d.jsx("th",{className:"px-3 py-2",children:e("audit.col.time")}),d.jsx("th",{className:"px-3 py-2",children:e("audit.col.action")}),d.jsx("th",{className:"px-3 py-2",children:e("audit.col.project")}),d.jsx("th",{className:"px-3 py-2",children:e("audit.col.detail")})]})}),d.jsxs("tbody",{className:"font-[family-name:var(--font-mono)]",children:[o.length===0&&d.jsx("tr",{children:d.jsx("td",{colSpan:4,className:"px-3 py-6 text-center text-[var(--color-text)]/50",children:e("audit.empty")})}),o.map((u,f)=>d.jsxs("tr",{className:"border-t-2 border-[var(--color-text)]/10",children:[d.jsx("td",{className:"px-3 py-2 whitespace-nowrap",children:new Date(u.ts).toLocaleString()}),d.jsx("td",{className:"px-3 py-2",children:d.jsx("span",{className:`inline-block px-2 py-0.5 rounded-lg border-2 border-[var(--color-text)] text-xs font-bold ${a8[u.action]}`,children:l(u.action)})}),d.jsx("td",{className:"px-3 py-2",children:u.project}),d.jsx("td",{className:"px-3 py-2 text-[var(--color-text)]/70",children:u.detail??(u.source?`(${u.source})`:"—")})]},`${u.ts}-${f}`))]})]})})]})}const ey="rounded-xl border-[3px] border-[var(--color-text)] shadow-[3px_3px_0_var(--color-text)] bg-white p-3";function o8(){const e=Le(),[t,n]=A.useState(""),[r,a]=A.useState([]),[o,l]=A.useState([]),[u,f]=A.useState(!1),[h,g]=A.useState(null),[m,y]=A.useState(null);A.useEffect(()=>{fetch("/api/memory-cfg").then(v=>v.json()).then(v=>y(v.viewerUrl??"")).catch(()=>y(""))},[]);async function b(){try{const v=await fetch("/api/memory/sessions");if(!v.ok)throw new Error(`HTTP ${v.status}`);const S=await v.json();l((S.sessions??S??[]).slice(0,30))}catch(v){g(v instanceof Error?v.message:String(v))}}A.useEffect(()=>{b()},[]);async function k(){if(t.trim()){f(!0),g(null);try{const v=await fetch("/api/memory/smart-search",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({query:t,limit:15})});if(!v.ok)throw new Error(`HTTP ${v.status}`);const S=await v.json();a(S.results??S.hits??[])}catch(v){g(v instanceof Error?v.message:String(v))}finally{f(!1)}}}return m===null?null:m?d.jsxs("div",{className:"flex flex-col gap-4 h-full min-h-0",children:[d.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[d.jsxs("h1",{className:"font-[family-name:var(--font-heading)] font-bold text-2xl text-[var(--color-text)]",children:["🧠 ",e("nav.memory")]}),d.jsxs("a",{href:m,target:"_blank",rel:"noreferrer",className:"text-sm font-semibold underline decoration-2 underline-offset-2 text-[var(--color-text)] hover:opacity-70",children:["↗ ",m]})]}),d.jsx("div",{className:"flex-1 min-h-0 rounded-2xl border-[3px] border-[var(--color-text)] shadow-[4px_4px_0_var(--color-text)] overflow-hidden bg-white",children:d.jsx("iframe",{src:m,title:"agentmemory dashboard",className:"w-full h-full border-0",style:{minHeight:"calc(100vh - 160px)"}})})]}):d.jsxs("div",{className:"flex flex-col gap-4",children:[d.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[d.jsxs("h1",{className:"font-[family-name:var(--font-heading)] font-bold text-2xl text-[var(--color-text)]",children:["🧠 ",e("nav.memory")]}),d.jsx("span",{className:"text-xs text-[var(--color-text)] opacity-60",children:e("memory.sub")})]}),d.jsxs("div",{className:"flex gap-2",children:[d.jsx("input",{value:t,onChange:v=>n(v.target.value),onKeyDown:v=>v.key==="Enter"&&k(),placeholder:e("memory.searchPlaceholder"),"aria-label":e("memory.searchPlaceholder"),className:"flex-1 rounded-xl border-[3px] border-[var(--color-text)] px-3 py-2 font-[family-name:var(--font-mono)] text-sm focus-visible:shadow-[3px_3px_0_var(--color-text)] outline-none"}),d.jsx("button",{type:"button",onClick:k,disabled:u,"aria-label":e("memory.search"),className:"rounded-xl border-[3px] border-[var(--color-text)] bg-[var(--color-accent-mint)] px-4 py-2 font-bold text-sm shadow-[3px_3px_0_var(--color-text)] hover:-translate-x-px hover:-translate-y-px hover:shadow-[4px_4px_0_var(--color-text)] active:translate-x-0.5 active:translate-y-0.5 active:shadow-[1px_1px_0_var(--color-text)] disabled:opacity-50",children:u?"…":e("memory.search")})]}),h&&d.jsxs("div",{className:"text-sm text-[var(--color-accent-pink,#d6336c)] font-semibold",children:["⚠ ",h]}),r.length>0&&d.jsxs("div",{className:"flex flex-col gap-2",children:[d.jsxs("h2",{className:"font-[family-name:var(--font-heading)] font-bold text-sm text-[var(--color-text)]",children:[e("memory.results"),"(",r.length,")"]}),r.map(v=>{var S;return d.jsxs("div",{className:ey,children:[d.jsxs("div",{className:"flex items-center gap-2 text-xs opacity-60 font-[family-name:var(--font-mono)]",children:[d.jsx("span",{children:v.type||v.title}),d.jsx("span",{children:"·"}),d.jsx("span",{children:new Date(v.timestamp).toLocaleString()}),d.jsx("span",{children:"·"}),d.jsxs("span",{children:["score ",(S=v.score)==null?void 0:S.toFixed(3)]})]}),d.jsx("div",{className:"text-sm mt-1 text-[var(--color-text)]",children:v.text||v.content||v.summary||d.jsx("span",{className:"opacity-50 italic",children:e("memory.rawHint")})})]},v.obsId)})]}),d.jsxs("div",{className:"flex flex-col gap-2",children:[d.jsxs("h2",{className:"font-[family-name:var(--font-heading)] font-bold text-sm text-[var(--color-text)]",children:[e("memory.sessions"),"(",o.length,")"]}),o.length===0&&d.jsx("div",{className:`${ey} text-sm opacity-60`,children:e("memory.empty")}),o.map((v,S)=>{var E;return d.jsxs("div",{className:ey,children:[d.jsx("div",{className:"font-[family-name:var(--font-mono)] text-xs text-[var(--color-text)]",children:(v.cwd??"").split("/").pop()||((E=v.sessionId)==null?void 0:E.slice(0,8))||"?"}),v.firstPrompt&&d.jsx("div",{className:"text-xs opacity-60 mt-1 line-clamp-2",children:v.firstPrompt.slice(0,160)})]},v.sessionId??S)})]})]})}function l8(){return ht("/api/providers")}async function c8(e,t){const n=await fetch("/api/providers",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({kind:e,entry:t})});if(!n.ok)throw new Error(`${n.status}: ${await n.text()}`);return n.json()}async function u8(e,t){const n=await fetch(`/api/providers/${e}/${encodeURIComponent(t)}`,{method:"DELETE"});if(!n.ok)throw new Error(`${n.status}: ${await n.text()}`);return n.json()}const bE=[{key:"memory",labelKey:"plugins.tab.memory"},{key:"channel",labelKey:"plugins.tab.channel"},{key:"model",labelKey:"plugins.tab.model"},{key:"tool",labelKey:"plugins.tab.tool"}];function d8(){const e=Le(),[t,n]=A.useState("memory");return d.jsxs("div",{className:"flex flex-col gap-6 w-full",children:[d.jsxs("header",{children:[d.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold",children:e("plugins.h1")}),d.jsx("p",{className:"text-sm text-[var(--color-text-muted)] mt-1",children:e("plugins.desc")})]}),d.jsx("div",{role:"tablist","aria-label":e("plugins.h1"),className:"flex gap-2 flex-wrap",children:bE.map(r=>{const a=t===r.key;return d.jsx("button",{role:"tab","aria-selected":a,type:"button",onClick:()=>n(r.key),className:["px-4 py-2 rounded-xl font-bold text-sm border-2 transition-transform duration-150",a?"bg-[var(--color-accent-mint)] border-[var(--color-text)] shadow-[3px_3px_0_var(--color-text)]":"border-[var(--color-text)] bg-white hover:-translate-x-px hover:-translate-y-px hover:shadow-[3px_3px_0_var(--color-text)]"].join(" "),children:e(r.labelKey)},r.key)})}),d.jsx("div",{role:"tabpanel",children:t==="memory"?d.jsx(h8,{}):t==="model"?d.jsx(p8,{}):d.jsx(f8,{label:e(bE.find(r=>r.key===t).labelKey)})})]})}function f8({label:e}){const t=Le();return d.jsx("section",{className:"nb-card",children:d.jsxs("p",{className:"text-[var(--color-text-muted)] text-sm",children:[e," — ",t("plugins.comingSoon")]})})}function h8(){var k,v,S;const e=Le(),t=an(),{alert:n}=jn(),r=Ge({queryKey:["system-memory"],queryFn:JL}),[a,o]=A.useState(null),[l,u]=A.useState(null);A.useEffect(()=>{r.data&&a===null&&(o(r.data.provider),u(r.data.url))},[r.data,a]);const f=a??((k=r.data)==null?void 0:k.provider)??"agentmemory",h=l??((v=r.data)==null?void 0:v.url)??"",g=r.data!=null&&(f!==r.data.provider||f==="custom"&&h!==r.data.url),m=E=>{const C=`system.memory.opt.${E}`;return e(C)},y=Rt({mutationFn:()=>e3(f,f==="custom"?h:""),onSuccess:()=>{t.invalidateQueries({queryKey:["system-memory"]}),t.invalidateQueries({queryKey:["system-env"]})},onError:E=>{n({title:e("system.memory.error"),body:E instanceof Error?E.message:String(E)})}}),b=((S=r.data)==null?void 0:S.options)??["none","builtin","agentmemory","custom"];return d.jsxs("section",{className:"nb-card",children:[d.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold mb-1",children:e("system.memory.title")}),d.jsx("p",{className:"text-xs text-[var(--color-text-muted)] mb-3",children:e("system.memory.desc")}),d.jsxs("div",{className:"flex flex-col gap-3 max-w-md",children:[d.jsxs("label",{className:"flex flex-col gap-1 text-sm",children:[d.jsx("span",{className:"font-bold",children:e("system.memory.provider")}),d.jsx("select",{className:"nb-input",value:f,onChange:E=>o(E.target.value),"aria-label":e("system.memory.provider"),children:b.map(E=>d.jsx("option",{value:E,children:m(E)},E))})]}),f==="custom"&&d.jsxs("label",{className:"flex flex-col gap-1 text-sm",children:[d.jsx("span",{className:"font-bold",children:e("system.memory.url")}),d.jsx("input",{className:"nb-input font-[family-name:var(--font-mono)] text-xs",type:"text",value:h,onChange:E=>u(E.target.value),placeholder:e("system.memory.url.placeholder"),spellCheck:!1,"aria-label":e("system.memory.url")})]}),d.jsx("div",{className:"flex justify-end",children:d.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"6px 12px",fontSize:12},onClick:()=>y.mutate(),disabled:!g||y.isPending,type:"button","aria-label":e("system.memory.save.aria"),children:[y.isPending?d.jsx(nt,{size:12,strokeWidth:3,className:"animate-spin"}):d.jsx(ma,{size:12,strokeWidth:3}),y.isSuccess&&!g?e("system.memory.saved"):e("system.memory.save")]})})]})]})}function p8(){var S,E,C;const e=an(),{alert:t,confirm:n}=jn(),r=Ge({queryKey:["providers"],queryFn:l8}),o=(S=Ge({queryKey:["system-agents"],queryFn:qN}).data)==null?void 0:S.agents,[l,u]=A.useState(null),f=Rt({mutationFn:()=>c8(l.kind,l.entry),onSuccess:()=>{u(null),e.invalidateQueries({queryKey:["providers"]})},onError:N=>void t({title:"保存失败",body:N instanceof Error?N.message:String(N)})}),h=Rt({mutationFn:N=>u8(N.kind,N.id),onSuccess:()=>void e.invalidateQueries({queryKey:["providers"]}),onError:N=>void t({title:"删除失败",body:N instanceof Error?N.message:String(N)})}),g=Rt({mutationFn:N=>t3(N),onSuccess:()=>void e.invalidateQueries({queryKey:["system-agents"]}),onError:N=>void t({title:"设默认失败",body:N instanceof Error?N.message:String(N)})}),m=(N,_,D)=>{if(!o)return!1;const T=N==="anthropic"?o.worker:o.reviewer;return(T.providerId||"official")===_&&T.model===D},y=(N,_,D)=>{if(!o)return;let T;if(N==="anthropic"){const M={...o.worker,model:D};_==="official"?delete M.providerId:M.providerId=_,T={...o,worker:M}}else T={...o,reviewer:{...o.reviewer,providerId:_,model:D}};g.mutate(T)},b=[{kind:"anthropic",title:"Anthropic 兼容(worker / claude)",items:((E=r.data)==null?void 0:E.anthropic)??[]},{kind:"openai",title:"OpenAI 兼容(reviewer / openai agent)",items:((C=r.data)==null?void 0:C.openai)??[]}],k=N=>u({kind:N,isNew:!0,entry:{id:"",name:"",baseUrl:"",apiKey:"",models:[]}}),v=(N,_)=>u({kind:N,isNew:!1,entry:{id:_.id,name:_.name,baseUrl:_.baseUrl,apiKey:"",models:_.models}});return d.jsxs("section",{className:"nb-card",children:[d.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold mb-1",children:"模型 API 端点"}),d.jsx("p",{className:"text-xs text-[var(--color-text-muted)] mb-4",children:"本地官方订阅(已登录验证)自动置顶,不可编辑;下方可增删第三方兼容端点。**点模型标签设为默认**(anthropic→worker / openai→监工);✓ = 当前默认。"}),d.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-5",children:b.map(N=>d.jsxs("div",{className:"flex flex-col gap-2",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("span",{className:"font-bold text-sm",children:N.title}),d.jsxs("button",{className:"nb-btn",style:{padding:"4px 10px",fontSize:12},type:"button",onClick:()=>k(N.kind),"aria-label":`添加 ${N.title} 端点`,children:[d.jsx(jr,{size:12,strokeWidth:3})," 添加"]})]}),N.items.length===0&&d.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:"(无端点)"}),N.items.map(_=>d.jsxs("div",{className:["rounded-lg px-3 py-2 border-2",_.builtin?"border-[var(--color-text)] bg-[var(--color-bg-cream)]":"border-[var(--color-text)]"].join(" "),children:[d.jsxs("div",{className:"flex items-center justify-between gap-2",children:[d.jsxs("div",{className:"min-w-0",children:[d.jsx("span",{className:"font-[family-name:var(--font-mono)] font-bold text-sm",children:_.id}),d.jsxs("span",{className:"text-[var(--color-text-muted)] text-sm",children:[" · ",_.name]}),_.builtin?d.jsxs("div",{className:"text-xs text-[var(--color-text-muted)] truncate",children:["本地订阅",_.detail?` · ${_.detail}`:""," · 已验证可用"]}):d.jsxs("div",{className:"text-xs text-[var(--color-text-muted)] truncate",children:[_.baseUrl," · key ",_.hasKey?_.apiKey:"未设置"]})]}),_.builtin?d.jsx("span",{className:"shrink-0 text-[10px] font-bold px-2 py-0.5 rounded-md border-2 border-[var(--color-text)] bg-[var(--color-accent-yellow)]",children:"内置"}):d.jsxs("div",{className:"flex gap-1 shrink-0",children:[d.jsx("button",{className:"nb-btn",style:{padding:"4px 8px"},type:"button",onClick:()=>v(N.kind,_),"aria-label":`编辑 ${_.id}`,children:d.jsx(iL,{size:12,strokeWidth:3})}),d.jsx("button",{className:"nb-btn nb-btn-danger",style:{padding:"4px 8px"},type:"button",onClick:async()=>{await n({title:"删除端点",body:`删除 ${_.id}?`,danger:!0})&&h.mutate({kind:N.kind,id:_.id})},"aria-label":`删除 ${_.id}`,children:d.jsx(xs,{size:12,strokeWidth:3})})]})]}),_.models.length>0&&d.jsx("div",{className:"flex flex-wrap gap-1.5 mt-2",children:_.models.map(D=>{const T=m(N.kind,_.id,D);return d.jsxs("button",{type:"button",onClick:()=>y(N.kind,_.id,D),disabled:g.isPending,"aria-pressed":T,className:["px-2 py-0.5 rounded-md text-xs font-[family-name:var(--font-mono)] border-2 border-[var(--color-text)]",T?"bg-[var(--color-accent-mint)] font-bold":"bg-[var(--color-bg)] hover:bg-[var(--color-bg-cream)]"].join(" "),title:T?"当前默认":"设为默认",children:[D,T?" ✓":""]},D)})})]},_.id))]},N.kind))}),l&&d.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40 p-4",onClick:()=>u(null),children:d.jsx("div",{onClick:N=>N.stopPropagation(),children:d.jsx(m8,{state:l,onChange:N=>u({...l,entry:N}),onCancel:()=>u(null),onSave:()=>f.mutate(),saving:f.isPending})})})]})}function m8({state:e,onChange:t,onCancel:n,onSave:r,saving:a}){const o=e.entry,l=f=>t({...o,...f}),u=/^[a-zA-Z0-9_-]+$/.test(o.id)&&o.name.trim()&&o.baseUrl.trim();return d.jsxs("div",{className:"border-[3px] border-[var(--color-text)] rounded-2xl p-6 bg-[var(--color-bg-cream)] shadow-[6px_6px_0_var(--color-text)] flex flex-col gap-4 w-[min(92vw,640px)] max-h-[88vh] overflow-y-auto",children:[d.jsxs("span",{className:"font-[family-name:var(--font-heading)] font-bold text-lg",children:[e.isNew?"新增端点":`编辑 ${o.id}`,d.jsxs("span",{className:"text-[var(--color-text-muted)] text-sm font-normal",children:["(",e.kind,")"]})]}),d.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[d.jsxs("label",{className:"flex flex-col gap-1 text-sm font-bold",children:["id(英数 _ -)",d.jsx("input",{className:"nb-input font-[family-name:var(--font-mono)]",value:o.id,disabled:!e.isNew,onChange:f=>l({id:f.target.value}),placeholder:"如 my-openai",spellCheck:!1})]}),d.jsxs("label",{className:"flex flex-col gap-1 text-sm font-bold",children:["名称",d.jsx("input",{className:"nb-input",value:o.name,onChange:f=>l({name:f.target.value}),placeholder:"显示名"})]})]}),d.jsxs("label",{className:"flex flex-col gap-1 text-sm font-bold",children:["Base URL",d.jsx("input",{className:"nb-input font-[family-name:var(--font-mono)] text-sm",value:o.baseUrl,onChange:f=>l({baseUrl:f.target.value}),placeholder:"https://api.example.com/v1",spellCheck:!1})]}),d.jsxs("label",{className:"flex flex-col gap-1 text-sm font-bold",children:["API Key",!e.isNew&&"(留空=保留)",d.jsx("input",{className:"nb-input font-[family-name:var(--font-mono)] text-sm",type:"password",value:o.apiKey??"",onChange:f=>l({apiKey:f.target.value}),placeholder:e.isNew?"sk-...":"••••(留空不改)",spellCheck:!1})]}),d.jsxs("label",{className:"flex flex-col gap-1 text-sm font-bold",children:["Models(逗号或换行分隔)",d.jsx("textarea",{className:"nb-input font-[family-name:var(--font-mono)] text-sm",rows:5,value:o.models.join(", "),onChange:f=>l({models:f.target.value.split(/[,\n]/).map(h=>h.trim()).filter(Boolean)}),placeholder:"gpt-5.4, gpt-4o",spellCheck:!1})]}),d.jsxs("div",{className:"flex justify-end gap-2 pt-1",children:[d.jsx("button",{className:"nb-btn",style:{padding:"8px 16px"},type:"button",onClick:n,children:"取消"}),d.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"8px 16px"},type:"button",disabled:!u||a,onClick:r,children:[a?d.jsx(nt,{size:14,strokeWidth:3,className:"animate-spin"}):d.jsx(ma,{size:14,strokeWidth:3})," 保存"]})]})]})}function yn(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let n=0,r;n<e.length;n++)(r=yn(e[n]))!==""&&(t+=(t&&" ")+r);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var g8={value:()=>{}};function Zh(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new Xf(n)}function Xf(e){this._=e}function y8(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",a=n.indexOf(".");if(a>=0&&(r=n.slice(a+1),n=n.slice(0,a)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Xf.prototype=Zh.prototype={constructor:Xf,on:function(e,t){var n=this._,r=y8(e+"",n),a,o=-1,l=r.length;if(arguments.length<2){for(;++o<l;)if((a=(e=r[o]).type)&&(a=b8(n[a],e.name)))return a;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++o<l;)if(a=(e=r[o]).type)n[a]=xE(n[a],e.name,t);else if(t==null)for(a in n)n[a]=xE(n[a],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Xf(e)},call:function(e,t){if((a=arguments.length-2)>0)for(var n=new Array(a),r=0,a,o;r<a;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=this._[e],r=0,a=o.length;r<a;++r)o[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],a=0,o=r.length;a<o;++a)r[a].value.apply(t,n)}};function b8(e,t){for(var n=0,r=e.length,a;n<r;++n)if((a=e[n]).name===t)return a.value}function xE(e,t,n){for(var r=0,a=e.length;r<a;++r)if(e[r].name===t){e[r]=g8,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var Jy="http://www.w3.org/1999/xhtml";const vE={svg:"http://www.w3.org/2000/svg",xhtml:Jy,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Jh(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),vE.hasOwnProperty(t)?{space:vE[t],local:e}:e}function x8(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Jy&&t.documentElement.namespaceURI===Jy?t.createElement(e):t.createElementNS(n,e)}}function v8(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function NC(e){var t=Jh(e);return(t.local?v8:x8)(t)}function w8(){}function Nx(e){return e==null?w8:function(){return this.querySelector(e)}}function k8(e){typeof e!="function"&&(e=Nx(e));for(var t=this._groups,n=t.length,r=new Array(n),a=0;a<n;++a)for(var o=t[a],l=o.length,u=r[a]=new Array(l),f,h,g=0;g<l;++g)(f=o[g])&&(h=e.call(f,f.__data__,g,o))&&("__data__"in f&&(h.__data__=f.__data__),u[g]=h);return new _r(r,this._parents)}function E8(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function S8(){return[]}function _C(e){return e==null?S8:function(){return this.querySelectorAll(e)}}function N8(e){return function(){return E8(e.apply(this,arguments))}}function _8(e){typeof e=="function"?e=N8(e):e=_C(e);for(var t=this._groups,n=t.length,r=[],a=[],o=0;o<n;++o)for(var l=t[o],u=l.length,f,h=0;h<u;++h)(f=l[h])&&(r.push(e.call(f,f.__data__,h,l)),a.push(f));return new _r(r,a)}function CC(e){return function(){return this.matches(e)}}function jC(e){return function(t){return t.matches(e)}}var C8=Array.prototype.find;function j8(e){return function(){return C8.call(this.children,e)}}function A8(){return this.firstElementChild}function T8(e){return this.select(e==null?A8:j8(typeof e=="function"?e:jC(e)))}var M8=Array.prototype.filter;function D8(){return Array.from(this.children)}function O8(e){return function(){return M8.call(this.children,e)}}function R8(e){return this.selectAll(e==null?D8:O8(typeof e=="function"?e:jC(e)))}function L8(e){typeof e!="function"&&(e=CC(e));for(var t=this._groups,n=t.length,r=new Array(n),a=0;a<n;++a)for(var o=t[a],l=o.length,u=r[a]=[],f,h=0;h<l;++h)(f=o[h])&&e.call(f,f.__data__,h,o)&&u.push(f);return new _r(r,this._parents)}function AC(e){return new Array(e.length)}function I8(){return new _r(this._enter||this._groups.map(AC),this._parents)}function xh(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}xh.prototype={constructor:xh,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function z8(e){return function(){return e}}function P8(e,t,n,r,a,o){for(var l=0,u,f=t.length,h=o.length;l<h;++l)(u=t[l])?(u.__data__=o[l],r[l]=u):n[l]=new xh(e,o[l]);for(;l<f;++l)(u=t[l])&&(a[l]=u)}function B8(e,t,n,r,a,o,l){var u,f,h=new Map,g=t.length,m=o.length,y=new Array(g),b;for(u=0;u<g;++u)(f=t[u])&&(y[u]=b=l.call(f,f.__data__,u,t)+"",h.has(b)?a[u]=f:h.set(b,f));for(u=0;u<m;++u)b=l.call(e,o[u],u,o)+"",(f=h.get(b))?(r[u]=f,f.__data__=o[u],h.delete(b)):n[u]=new xh(e,o[u]);for(u=0;u<g;++u)(f=t[u])&&h.get(y[u])===f&&(a[u]=f)}function U8(e){return e.__data__}function $8(e,t){if(!arguments.length)return Array.from(this,U8);var n=t?B8:P8,r=this._parents,a=this._groups;typeof e!="function"&&(e=z8(e));for(var o=a.length,l=new Array(o),u=new Array(o),f=new Array(o),h=0;h<o;++h){var g=r[h],m=a[h],y=m.length,b=F8(e.call(g,g&&g.__data__,h,r)),k=b.length,v=u[h]=new Array(k),S=l[h]=new Array(k),E=f[h]=new Array(y);n(g,m,v,S,E,b,t);for(var C=0,N=0,_,D;C<k;++C)if(_=v[C]){for(C>=N&&(N=C+1);!(D=S[N])&&++N<k;);_._next=D||null}}return l=new _r(l,r),l._enter=u,l._exit=f,l}function F8(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function q8(){return new _r(this._exit||this._groups.map(AC),this._parents)}function H8(e,t,n){var r=this.enter(),a=this,o=this.exit();return typeof e=="function"?(r=e(r),r&&(r=r.selection())):r=r.append(e+""),t!=null&&(a=t(a),a&&(a=a.selection())),n==null?o.remove():n(o),r&&a?r.merge(a).order():a}function K8(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,a=n.length,o=r.length,l=Math.min(a,o),u=new Array(a),f=0;f<l;++f)for(var h=n[f],g=r[f],m=h.length,y=u[f]=new Array(m),b,k=0;k<m;++k)(b=h[k]||g[k])&&(y[k]=b);for(;f<a;++f)u[f]=n[f];return new _r(u,this._parents)}function G8(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],a=r.length-1,o=r[a],l;--a>=0;)(l=r[a])&&(o&&l.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(l,o),o=l);return this}function V8(e){e||(e=Y8);function t(m,y){return m&&y?e(m.__data__,y.__data__):!m-!y}for(var n=this._groups,r=n.length,a=new Array(r),o=0;o<r;++o){for(var l=n[o],u=l.length,f=a[o]=new Array(u),h,g=0;g<u;++g)(h=l[g])&&(f[g]=h);f.sort(t)}return new _r(a,this._parents).order()}function Y8(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Q8(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function W8(){return Array.from(this)}function X8(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],a=0,o=r.length;a<o;++a){var l=r[a];if(l)return l}return null}function Z8(){let e=0;for(const t of this)++e;return e}function J8(){return!this.node()}function eq(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var a=t[n],o=0,l=a.length,u;o<l;++o)(u=a[o])&&e.call(u,u.__data__,o,a);return this}function tq(e){return function(){this.removeAttribute(e)}}function nq(e){return function(){this.removeAttributeNS(e.space,e.local)}}function rq(e,t){return function(){this.setAttribute(e,t)}}function iq(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function aq(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function sq(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function oq(e,t){var n=Jh(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?nq:tq:typeof t=="function"?n.local?sq:aq:n.local?iq:rq)(n,t))}function TC(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function lq(e){return function(){this.style.removeProperty(e)}}function cq(e,t,n){return function(){this.style.setProperty(e,t,n)}}function uq(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function dq(e,t,n){return arguments.length>1?this.each((t==null?lq:typeof t=="function"?uq:cq)(e,t,n??"")):zl(this.node(),e)}function zl(e,t){return e.style.getPropertyValue(t)||TC(e).getComputedStyle(e,null).getPropertyValue(t)}function fq(e){return function(){delete this[e]}}function hq(e,t){return function(){this[e]=t}}function pq(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function mq(e,t){return arguments.length>1?this.each((t==null?fq:typeof t=="function"?pq:hq)(e,t)):this.node()[e]}function MC(e){return e.trim().split(/^|\s+/)}function _x(e){return e.classList||new DC(e)}function DC(e){this._node=e,this._names=MC(e.getAttribute("class")||"")}DC.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function OC(e,t){for(var n=_x(e),r=-1,a=t.length;++r<a;)n.add(t[r])}function RC(e,t){for(var n=_x(e),r=-1,a=t.length;++r<a;)n.remove(t[r])}function gq(e){return function(){OC(this,e)}}function yq(e){return function(){RC(this,e)}}function bq(e,t){return function(){(t.apply(this,arguments)?OC:RC)(this,e)}}function xq(e,t){var n=MC(e+"");if(arguments.length<2){for(var r=_x(this.node()),a=-1,o=n.length;++a<o;)if(!r.contains(n[a]))return!1;return!0}return this.each((typeof t=="function"?bq:t?gq:yq)(n,t))}function vq(){this.textContent=""}function wq(e){return function(){this.textContent=e}}function kq(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function Eq(e){return arguments.length?this.each(e==null?vq:(typeof e=="function"?kq:wq)(e)):this.node().textContent}function Sq(){this.innerHTML=""}function Nq(e){return function(){this.innerHTML=e}}function _q(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function Cq(e){return arguments.length?this.each(e==null?Sq:(typeof e=="function"?_q:Nq)(e)):this.node().innerHTML}function jq(){this.nextSibling&&this.parentNode.appendChild(this)}function Aq(){return this.each(jq)}function Tq(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Mq(){return this.each(Tq)}function Dq(e){var t=typeof e=="function"?e:NC(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Oq(){return null}function Rq(e,t){var n=typeof e=="function"?e:NC(e),r=t==null?Oq:typeof t=="function"?t:Nx(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function Lq(){var e=this.parentNode;e&&e.removeChild(this)}function Iq(){return this.each(Lq)}function zq(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Pq(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Bq(e){return this.select(e?Pq:zq)}function Uq(e){return arguments.length?this.property("__data__",e):this.node().__data__}function $q(e){return function(t){e.call(this,t,this.__data__)}}function Fq(e){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");return r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function qq(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,a=t.length,o;n<a;++n)o=t[n],(!e.type||o.type===e.type)&&o.name===e.name?this.removeEventListener(o.type,o.listener,o.options):t[++r]=o;++r?t.length=r:delete this.__on}}}function Hq(e,t,n){return function(){var r=this.__on,a,o=$q(t);if(r){for(var l=0,u=r.length;l<u;++l)if((a=r[l]).type===e.type&&a.name===e.name){this.removeEventListener(a.type,a.listener,a.options),this.addEventListener(a.type,a.listener=o,a.options=n),a.value=t;return}}this.addEventListener(e.type,o,n),a={type:e.type,name:e.name,value:t,listener:o,options:n},r?r.push(a):this.__on=[a]}}function Kq(e,t,n){var r=Fq(e+""),a,o=r.length,l;if(arguments.length<2){var u=this.node().__on;if(u){for(var f=0,h=u.length,g;f<h;++f)for(a=0,g=u[f];a<o;++a)if((l=r[a]).type===g.type&&l.name===g.name)return g.value}return}for(u=t?Hq:qq,a=0;a<o;++a)this.each(u(r[a],t,n));return this}function LC(e,t,n){var r=TC(e),a=r.CustomEvent;typeof a=="function"?a=new a(t,n):(a=r.document.createEvent("Event"),n?(a.initEvent(t,n.bubbles,n.cancelable),a.detail=n.detail):a.initEvent(t,!1,!1)),e.dispatchEvent(a)}function Gq(e,t){return function(){return LC(this,e,t)}}function Vq(e,t){return function(){return LC(this,e,t.apply(this,arguments))}}function Yq(e,t){return this.each((typeof t=="function"?Vq:Gq)(e,t))}function*Qq(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],a=0,o=r.length,l;a<o;++a)(l=r[a])&&(yield l)}var IC=[null];function _r(e,t){this._groups=e,this._parents=t}function Zu(){return new _r([[document.documentElement]],IC)}function Wq(){return this}_r.prototype=Zu.prototype={constructor:_r,select:k8,selectAll:_8,selectChild:T8,selectChildren:R8,filter:L8,data:$8,enter:I8,exit:q8,join:H8,merge:K8,selection:Wq,order:G8,sort:V8,call:Q8,nodes:W8,node:X8,size:Z8,empty:J8,each:eq,attr:oq,style:dq,property:mq,classed:xq,text:Eq,html:Cq,raise:Aq,lower:Mq,append:Dq,insert:Rq,remove:Iq,clone:Bq,datum:Uq,on:Kq,dispatch:Yq,[Symbol.iterator]:Qq};function Sr(e){return typeof e=="string"?new _r([[document.querySelector(e)]],[document.documentElement]):new _r([[e]],IC)}function Xq(e){let t;for(;t=e.sourceEvent;)e=t;return e}function si(e,t){if(e=Xq(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var a=t.getBoundingClientRect();return[e.clientX-a.left-t.clientLeft,e.clientY-a.top-t.clientTop]}}return[e.pageX,e.pageY]}const Zq={passive:!1},Nu={capture:!0,passive:!1};function ty(e){e.stopImmediatePropagation()}function xl(e){e.preventDefault(),e.stopImmediatePropagation()}function zC(e){var t=e.document.documentElement,n=Sr(e).on("dragstart.drag",xl,Nu);"onselectstart"in t?n.on("selectstart.drag",xl,Nu):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function PC(e,t){var n=e.document.documentElement,r=Sr(e).on("dragstart.drag",null);t&&(r.on("click.drag",xl,Nu),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const Rf=e=>()=>e;function eb(e,{sourceEvent:t,subject:n,target:r,identifier:a,active:o,x:l,y:u,dx:f,dy:h,dispatch:g}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:a,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:l,enumerable:!0,configurable:!0},y:{value:u,enumerable:!0,configurable:!0},dx:{value:f,enumerable:!0,configurable:!0},dy:{value:h,enumerable:!0,configurable:!0},_:{value:g}})}eb.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function Jq(e){return!e.ctrlKey&&!e.button}function eH(){return this.parentNode}function tH(e,t){return t??{x:e.x,y:e.y}}function nH(){return navigator.maxTouchPoints||"ontouchstart"in this}function BC(){var e=Jq,t=eH,n=tH,r=nH,a={},o=Zh("start","drag","end"),l=0,u,f,h,g,m=0;function y(_){_.on("mousedown.drag",b).filter(r).on("touchstart.drag",S).on("touchmove.drag",E,Zq).on("touchend.drag touchcancel.drag",C).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function b(_,D){if(!(g||!e.call(this,_,D))){var T=N(this,t.call(this,_,D),_,D,"mouse");T&&(Sr(_.view).on("mousemove.drag",k,Nu).on("mouseup.drag",v,Nu),zC(_.view),ty(_),h=!1,u=_.clientX,f=_.clientY,T("start",_))}}function k(_){if(xl(_),!h){var D=_.clientX-u,T=_.clientY-f;h=D*D+T*T>m}a.mouse("drag",_)}function v(_){Sr(_.view).on("mousemove.drag mouseup.drag",null),PC(_.view,h),xl(_),a.mouse("end",_)}function S(_,D){if(e.call(this,_,D)){var T=_.changedTouches,M=t.call(this,_,D),I=T.length,F,$;for(F=0;F<I;++F)($=N(this,M,_,D,T[F].identifier,T[F]))&&(ty(_),$("start",_,T[F]))}}function E(_){var D=_.changedTouches,T=D.length,M,I;for(M=0;M<T;++M)(I=a[D[M].identifier])&&(xl(_),I("drag",_,D[M]))}function C(_){var D=_.changedTouches,T=D.length,M,I;for(g&&clearTimeout(g),g=setTimeout(function(){g=null},500),M=0;M<T;++M)(I=a[D[M].identifier])&&(ty(_),I("end",_,D[M]))}function N(_,D,T,M,I,F){var $=o.copy(),U=si(F||T,D),K,Q,B;if((B=n.call(_,new eb("beforestart",{sourceEvent:T,target:y,identifier:I,active:l,x:U[0],y:U[1],dx:0,dy:0,dispatch:$}),M))!=null)return K=B.x-U[0]||0,Q=B.y-U[1]||0,function H(z,Y,W){var G=U,O;switch(z){case"start":a[I]=H,O=l++;break;case"end":delete a[I],--l;case"drag":U=si(W||Y,D),O=l;break}$.call(z,_,new eb(z,{sourceEvent:Y,subject:B,target:y,identifier:I,active:O,x:U[0]+K,y:U[1]+Q,dx:U[0]-G[0],dy:U[1]-G[1],dispatch:$}),M)}}return y.filter=function(_){return arguments.length?(e=typeof _=="function"?_:Rf(!!_),y):e},y.container=function(_){return arguments.length?(t=typeof _=="function"?_:Rf(_),y):t},y.subject=function(_){return arguments.length?(n=typeof _=="function"?_:Rf(_),y):n},y.touchable=function(_){return arguments.length?(r=typeof _=="function"?_:Rf(!!_),y):r},y.on=function(){var _=o.on.apply(o,arguments);return _===o?y:_},y.clickDistance=function(_){return arguments.length?(m=(_=+_)*_,y):Math.sqrt(m)},y}function Cx(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function UC(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Ju(){}var _u=.7,vh=1/_u,vl="\\s*([+-]?\\d+)\\s*",Cu="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ti="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",rH=/^#([0-9a-f]{3,8})$/,iH=new RegExp(`^rgb\\(${vl},${vl},${vl}\\)$`),aH=new RegExp(`^rgb\\(${Ti},${Ti},${Ti}\\)$`),sH=new RegExp(`^rgba\\(${vl},${vl},${vl},${Cu}\\)$`),oH=new RegExp(`^rgba\\(${Ti},${Ti},${Ti},${Cu}\\)$`),lH=new RegExp(`^hsl\\(${Cu},${Ti},${Ti}\\)$`),cH=new RegExp(`^hsla\\(${Cu},${Ti},${Ti},${Cu}\\)$`),wE={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Cx(Ju,co,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:kE,formatHex:kE,formatHex8:uH,formatHsl:dH,formatRgb:EE,toString:EE});function kE(){return this.rgb().formatHex()}function uH(){return this.rgb().formatHex8()}function dH(){return $C(this).formatHsl()}function EE(){return this.rgb().formatRgb()}function co(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=rH.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?SE(t):n===3?new ur(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Lf(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Lf(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=iH.exec(e))?new ur(t[1],t[2],t[3],1):(t=aH.exec(e))?new ur(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=sH.exec(e))?Lf(t[1],t[2],t[3],t[4]):(t=oH.exec(e))?Lf(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=lH.exec(e))?CE(t[1],t[2]/100,t[3]/100,1):(t=cH.exec(e))?CE(t[1],t[2]/100,t[3]/100,t[4]):wE.hasOwnProperty(e)?SE(wE[e]):e==="transparent"?new ur(NaN,NaN,NaN,0):null}function SE(e){return new ur(e>>16&255,e>>8&255,e&255,1)}function Lf(e,t,n,r){return r<=0&&(e=t=n=NaN),new ur(e,t,n,r)}function fH(e){return e instanceof Ju||(e=co(e)),e?(e=e.rgb(),new ur(e.r,e.g,e.b,e.opacity)):new ur}function tb(e,t,n,r){return arguments.length===1?fH(e):new ur(e,t,n,r??1)}function ur(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Cx(ur,tb,UC(Ju,{brighter(e){return e=e==null?vh:Math.pow(vh,e),new ur(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?_u:Math.pow(_u,e),new ur(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ur(io(this.r),io(this.g),io(this.b),wh(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:NE,formatHex:NE,formatHex8:hH,formatRgb:_E,toString:_E}));function NE(){return`#${Ys(this.r)}${Ys(this.g)}${Ys(this.b)}`}function hH(){return`#${Ys(this.r)}${Ys(this.g)}${Ys(this.b)}${Ys((isNaN(this.opacity)?1:this.opacity)*255)}`}function _E(){const e=wh(this.opacity);return`${e===1?"rgb(":"rgba("}${io(this.r)}, ${io(this.g)}, ${io(this.b)}${e===1?")":`, ${e})`}`}function wh(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function io(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ys(e){return e=io(e),(e<16?"0":"")+e.toString(16)}function CE(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new oi(e,t,n,r)}function $C(e){if(e instanceof oi)return new oi(e.h,e.s,e.l,e.opacity);if(e instanceof Ju||(e=co(e)),!e)return new oi;if(e instanceof oi)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,a=Math.min(t,n,r),o=Math.max(t,n,r),l=NaN,u=o-a,f=(o+a)/2;return u?(t===o?l=(n-r)/u+(n<r)*6:n===o?l=(r-t)/u+2:l=(t-n)/u+4,u/=f<.5?o+a:2-o-a,l*=60):u=f>0&&f<1?0:l,new oi(l,u,f,e.opacity)}function pH(e,t,n,r){return arguments.length===1?$C(e):new oi(e,t,n,r??1)}function oi(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Cx(oi,pH,UC(Ju,{brighter(e){return e=e==null?vh:Math.pow(vh,e),new oi(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?_u:Math.pow(_u,e),new oi(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,a=2*n-r;return new ur(ny(e>=240?e-240:e+120,a,r),ny(e,a,r),ny(e<120?e+240:e-120,a,r),this.opacity)},clamp(){return new oi(jE(this.h),If(this.s),If(this.l),wh(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=wh(this.opacity);return`${e===1?"hsl(":"hsla("}${jE(this.h)}, ${If(this.s)*100}%, ${If(this.l)*100}%${e===1?")":`, ${e})`}`}}));function jE(e){return e=(e||0)%360,e<0?e+360:e}function If(e){return Math.max(0,Math.min(1,e||0))}function ny(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const jx=e=>()=>e;function mH(e,t){return function(n){return e+n*t}}function gH(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function yH(e){return(e=+e)==1?FC:function(t,n){return n-t?gH(t,n,e):jx(isNaN(t)?n:t)}}function FC(e,t){var n=t-e;return n?mH(e,n):jx(isNaN(e)?t:e)}const kh=(function e(t){var n=yH(t);function r(a,o){var l=n((a=tb(a)).r,(o=tb(o)).r),u=n(a.g,o.g),f=n(a.b,o.b),h=FC(a.opacity,o.opacity);return function(g){return a.r=l(g),a.g=u(g),a.b=f(g),a.opacity=h(g),a+""}}return r.gamma=e,r})(1);function bH(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),a;return function(o){for(a=0;a<n;++a)r[a]=e[a]*(1-o)+t[a]*o;return r}}function xH(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function vH(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,a=new Array(r),o=new Array(n),l;for(l=0;l<r;++l)a[l]=fu(e[l],t[l]);for(;l<n;++l)o[l]=t[l];return function(u){for(l=0;l<r;++l)o[l]=a[l](u);return o}}function wH(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Ci(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function kH(e,t){var n={},r={},a;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(a in t)a in e?n[a]=fu(e[a],t[a]):r[a]=t[a];return function(o){for(a in n)r[a]=n[a](o);return r}}var nb=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ry=new RegExp(nb.source,"g");function EH(e){return function(){return e}}function SH(e){return function(t){return e(t)+""}}function qC(e,t){var n=nb.lastIndex=ry.lastIndex=0,r,a,o,l=-1,u=[],f=[];for(e=e+"",t=t+"";(r=nb.exec(e))&&(a=ry.exec(t));)(o=a.index)>n&&(o=t.slice(n,o),u[l]?u[l]+=o:u[++l]=o),(r=r[0])===(a=a[0])?u[l]?u[l]+=a:u[++l]=a:(u[++l]=null,f.push({i:l,x:Ci(r,a)})),n=ry.lastIndex;return n<t.length&&(o=t.slice(n),u[l]?u[l]+=o:u[++l]=o),u.length<2?f[0]?SH(f[0].x):EH(t):(t=f.length,function(h){for(var g=0,m;g<t;++g)u[(m=f[g]).i]=m.x(h);return u.join("")})}function fu(e,t){var n=typeof t,r;return t==null||n==="boolean"?jx(t):(n==="number"?Ci:n==="string"?(r=co(t))?(t=r,kh):qC:t instanceof co?kh:t instanceof Date?wH:xH(t)?bH:Array.isArray(t)?vH:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?kH:Ci)(e,t)}var AE=180/Math.PI,rb={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function HC(e,t,n,r,a,o){var l,u,f;return(l=Math.sqrt(e*e+t*t))&&(e/=l,t/=l),(f=e*n+t*r)&&(n-=e*f,r-=t*f),(u=Math.sqrt(n*n+r*r))&&(n/=u,r/=u,f/=u),e*r<t*n&&(e=-e,t=-t,f=-f,l=-l),{translateX:a,translateY:o,rotate:Math.atan2(t,e)*AE,skewX:Math.atan(f)*AE,scaleX:l,scaleY:u}}var zf;function NH(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?rb:HC(t.a,t.b,t.c,t.d,t.e,t.f)}function _H(e){return e==null||(zf||(zf=document.createElementNS("http://www.w3.org/2000/svg","g")),zf.setAttribute("transform",e),!(e=zf.transform.baseVal.consolidate()))?rb:(e=e.matrix,HC(e.a,e.b,e.c,e.d,e.e,e.f))}function KC(e,t,n,r){function a(h){return h.length?h.pop()+" ":""}function o(h,g,m,y,b,k){if(h!==m||g!==y){var v=b.push("translate(",null,t,null,n);k.push({i:v-4,x:Ci(h,m)},{i:v-2,x:Ci(g,y)})}else(m||y)&&b.push("translate("+m+t+y+n)}function l(h,g,m,y){h!==g?(h-g>180?g+=360:g-h>180&&(h+=360),y.push({i:m.push(a(m)+"rotate(",null,r)-2,x:Ci(h,g)})):g&&m.push(a(m)+"rotate("+g+r)}function u(h,g,m,y){h!==g?y.push({i:m.push(a(m)+"skewX(",null,r)-2,x:Ci(h,g)}):g&&m.push(a(m)+"skewX("+g+r)}function f(h,g,m,y,b,k){if(h!==m||g!==y){var v=b.push(a(b)+"scale(",null,",",null,")");k.push({i:v-4,x:Ci(h,m)},{i:v-2,x:Ci(g,y)})}else(m!==1||y!==1)&&b.push(a(b)+"scale("+m+","+y+")")}return function(h,g){var m=[],y=[];return h=e(h),g=e(g),o(h.translateX,h.translateY,g.translateX,g.translateY,m,y),l(h.rotate,g.rotate,m,y),u(h.skewX,g.skewX,m,y),f(h.scaleX,h.scaleY,g.scaleX,g.scaleY,m,y),h=g=null,function(b){for(var k=-1,v=y.length,S;++k<v;)m[(S=y[k]).i]=S.x(b);return m.join("")}}}var CH=KC(NH,"px, ","px)","deg)"),jH=KC(_H,", ",")",")"),AH=1e-12;function TE(e){return((e=Math.exp(e))+1/e)/2}function TH(e){return((e=Math.exp(e))-1/e)/2}function MH(e){return((e=Math.exp(2*e))-1)/(e+1)}const Zf=(function e(t,n,r){function a(o,l){var u=o[0],f=o[1],h=o[2],g=l[0],m=l[1],y=l[2],b=g-u,k=m-f,v=b*b+k*k,S,E;if(v<AH)E=Math.log(y/h)/t,S=function(M){return[u+M*b,f+M*k,h*Math.exp(t*M*E)]};else{var C=Math.sqrt(v),N=(y*y-h*h+r*v)/(2*h*n*C),_=(y*y-h*h-r*v)/(2*y*n*C),D=Math.log(Math.sqrt(N*N+1)-N),T=Math.log(Math.sqrt(_*_+1)-_);E=(T-D)/t,S=function(M){var I=M*E,F=TE(D),$=h/(n*C)*(F*MH(t*I+D)-TH(D));return[u+$*b,f+$*k,h*F/TE(t*I+D)]}}return S.duration=E*1e3*t/Math.SQRT2,S}return a.rho=function(o){var l=Math.max(.001,+o),u=l*l,f=u*u;return e(l,u,f)},a})(Math.SQRT2,2,4);var Pl=0,su=0,nu=0,GC=1e3,Eh,ou,Sh=0,uo=0,ep=0,ju=typeof performance=="object"&&performance.now?performance:Date,VC=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Ax(){return uo||(VC(DH),uo=ju.now()+ep)}function DH(){uo=0}function Nh(){this._call=this._time=this._next=null}Nh.prototype=YC.prototype={constructor:Nh,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?Ax():+n)+(t==null?0:+t),!this._next&&ou!==this&&(ou?ou._next=this:Eh=this,ou=this),this._call=e,this._time=n,ib()},stop:function(){this._call&&(this._call=null,this._time=1/0,ib())}};function YC(e,t,n){var r=new Nh;return r.restart(e,t,n),r}function OH(){Ax(),++Pl;for(var e=Eh,t;e;)(t=uo-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Pl}function ME(){uo=(Sh=ju.now())+ep,Pl=su=0;try{OH()}finally{Pl=0,LH(),uo=0}}function RH(){var e=ju.now(),t=e-Sh;t>GC&&(ep-=t,Sh=e)}function LH(){for(var e,t=Eh,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:Eh=n);ou=e,ib(r)}function ib(e){if(!Pl){su&&(su=clearTimeout(su));var t=e-uo;t>24?(e<1/0&&(su=setTimeout(ME,e-ju.now()-ep)),nu&&(nu=clearInterval(nu))):(nu||(Sh=ju.now(),nu=setInterval(RH,GC)),Pl=1,VC(ME))}}function DE(e,t,n){var r=new Nh;return t=t==null?0:+t,r.restart(a=>{r.stop(),e(a+t)},t,n),r}var IH=Zh("start","end","cancel","interrupt"),zH=[],QC=0,OE=1,ab=2,Jf=3,RE=4,sb=5,eh=6;function tp(e,t,n,r,a,o){var l=e.__transition;if(!l)e.__transition={};else if(n in l)return;PH(e,n,{name:t,index:r,group:a,on:IH,tween:zH,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:QC})}function Tx(e,t){var n=mi(e,t);if(n.state>QC)throw new Error("too late; already scheduled");return n}function Oi(e,t){var n=mi(e,t);if(n.state>Jf)throw new Error("too late; already running");return n}function mi(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function PH(e,t,n){var r=e.__transition,a;r[t]=n,n.timer=YC(o,0,n.time);function o(h){n.state=OE,n.timer.restart(l,n.delay,n.time),n.delay<=h&&l(h-n.delay)}function l(h){var g,m,y,b;if(n.state!==OE)return f();for(g in r)if(b=r[g],b.name===n.name){if(b.state===Jf)return DE(l);b.state===RE?(b.state=eh,b.timer.stop(),b.on.call("interrupt",e,e.__data__,b.index,b.group),delete r[g]):+g<t&&(b.state=eh,b.timer.stop(),b.on.call("cancel",e,e.__data__,b.index,b.group),delete r[g])}if(DE(function(){n.state===Jf&&(n.state=RE,n.timer.restart(u,n.delay,n.time),u(h))}),n.state=ab,n.on.call("start",e,e.__data__,n.index,n.group),n.state===ab){for(n.state=Jf,a=new Array(y=n.tween.length),g=0,m=-1;g<y;++g)(b=n.tween[g].value.call(e,e.__data__,n.index,n.group))&&(a[++m]=b);a.length=m+1}}function u(h){for(var g=h<n.duration?n.ease.call(null,h/n.duration):(n.timer.restart(f),n.state=sb,1),m=-1,y=a.length;++m<y;)a[m].call(e,g);n.state===sb&&(n.on.call("end",e,e.__data__,n.index,n.group),f())}function f(){n.state=eh,n.timer.stop(),delete r[t];for(var h in r)return;delete e.__transition}}function th(e,t){var n=e.__transition,r,a,o=!0,l;if(n){t=t==null?null:t+"";for(l in n){if((r=n[l]).name!==t){o=!1;continue}a=r.state>ab&&r.state<sb,r.state=eh,r.timer.stop(),r.on.call(a?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[l]}o&&delete e.__transition}}function BH(e){return this.each(function(){th(this,e)})}function UH(e,t){var n,r;return function(){var a=Oi(this,e),o=a.tween;if(o!==n){r=n=o;for(var l=0,u=r.length;l<u;++l)if(r[l].name===t){r=r.slice(),r.splice(l,1);break}}a.tween=r}}function $H(e,t,n){var r,a;if(typeof n!="function")throw new Error;return function(){var o=Oi(this,e),l=o.tween;if(l!==r){a=(r=l).slice();for(var u={name:t,value:n},f=0,h=a.length;f<h;++f)if(a[f].name===t){a[f]=u;break}f===h&&a.push(u)}o.tween=a}}function FH(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=mi(this.node(),n).tween,a=0,o=r.length,l;a<o;++a)if((l=r[a]).name===e)return l.value;return null}return this.each((t==null?UH:$H)(n,e,t))}function Mx(e,t,n){var r=e._id;return e.each(function(){var a=Oi(this,r);(a.value||(a.value={}))[t]=n.apply(this,arguments)}),function(a){return mi(a,r).value[t]}}function WC(e,t){var n;return(typeof t=="number"?Ci:t instanceof co?kh:(n=co(t))?(t=n,kh):qC)(e,t)}function qH(e){return function(){this.removeAttribute(e)}}function HH(e){return function(){this.removeAttributeNS(e.space,e.local)}}function KH(e,t,n){var r,a=n+"",o;return function(){var l=this.getAttribute(e);return l===a?null:l===r?o:o=t(r=l,n)}}function GH(e,t,n){var r,a=n+"",o;return function(){var l=this.getAttributeNS(e.space,e.local);return l===a?null:l===r?o:o=t(r=l,n)}}function VH(e,t,n){var r,a,o;return function(){var l,u=n(this),f;return u==null?void this.removeAttribute(e):(l=this.getAttribute(e),f=u+"",l===f?null:l===r&&f===a?o:(a=f,o=t(r=l,u)))}}function YH(e,t,n){var r,a,o;return function(){var l,u=n(this),f;return u==null?void this.removeAttributeNS(e.space,e.local):(l=this.getAttributeNS(e.space,e.local),f=u+"",l===f?null:l===r&&f===a?o:(a=f,o=t(r=l,u)))}}function QH(e,t){var n=Jh(e),r=n==="transform"?jH:WC;return this.attrTween(e,typeof t=="function"?(n.local?YH:VH)(n,r,Mx(this,"attr."+e,t)):t==null?(n.local?HH:qH)(n):(n.local?GH:KH)(n,r,t))}function WH(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function XH(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function ZH(e,t){var n,r;function a(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&XH(e,o)),n}return a._value=t,a}function JH(e,t){var n,r;function a(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&WH(e,o)),n}return a._value=t,a}function e7(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var r=Jh(e);return this.tween(n,(r.local?ZH:JH)(r,t))}function t7(e,t){return function(){Tx(this,e).delay=+t.apply(this,arguments)}}function n7(e,t){return t=+t,function(){Tx(this,e).delay=t}}function r7(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?t7:n7)(t,e)):mi(this.node(),t).delay}function i7(e,t){return function(){Oi(this,e).duration=+t.apply(this,arguments)}}function a7(e,t){return t=+t,function(){Oi(this,e).duration=t}}function s7(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?i7:a7)(t,e)):mi(this.node(),t).duration}function o7(e,t){if(typeof t!="function")throw new Error;return function(){Oi(this,e).ease=t}}function l7(e){var t=this._id;return arguments.length?this.each(o7(t,e)):mi(this.node(),t).ease}function c7(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Oi(this,e).ease=n}}function u7(e){if(typeof e!="function")throw new Error;return this.each(c7(this._id,e))}function d7(e){typeof e!="function"&&(e=CC(e));for(var t=this._groups,n=t.length,r=new Array(n),a=0;a<n;++a)for(var o=t[a],l=o.length,u=r[a]=[],f,h=0;h<l;++h)(f=o[h])&&e.call(f,f.__data__,h,o)&&u.push(f);return new pa(r,this._parents,this._name,this._id)}function f7(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,a=n.length,o=Math.min(r,a),l=new Array(r),u=0;u<o;++u)for(var f=t[u],h=n[u],g=f.length,m=l[u]=new Array(g),y,b=0;b<g;++b)(y=f[b]||h[b])&&(m[b]=y);for(;u<r;++u)l[u]=t[u];return new pa(l,this._parents,this._name,this._id)}function h7(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function p7(e,t,n){var r,a,o=h7(t)?Tx:Oi;return function(){var l=o(this,e),u=l.on;u!==r&&(a=(r=u).copy()).on(t,n),l.on=a}}function m7(e,t){var n=this._id;return arguments.length<2?mi(this.node(),n).on.on(e):this.each(p7(n,e,t))}function g7(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function y7(){return this.on("end.remove",g7(this._id))}function b7(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Nx(e));for(var r=this._groups,a=r.length,o=new Array(a),l=0;l<a;++l)for(var u=r[l],f=u.length,h=o[l]=new Array(f),g,m,y=0;y<f;++y)(g=u[y])&&(m=e.call(g,g.__data__,y,u))&&("__data__"in g&&(m.__data__=g.__data__),h[y]=m,tp(h[y],t,n,y,h,mi(g,n)));return new pa(o,this._parents,t,n)}function x7(e){var t=this._name,n=this._id;typeof e!="function"&&(e=_C(e));for(var r=this._groups,a=r.length,o=[],l=[],u=0;u<a;++u)for(var f=r[u],h=f.length,g,m=0;m<h;++m)if(g=f[m]){for(var y=e.call(g,g.__data__,m,f),b,k=mi(g,n),v=0,S=y.length;v<S;++v)(b=y[v])&&tp(b,t,n,v,y,k);o.push(y),l.push(g)}return new pa(o,l,t,n)}var v7=Zu.prototype.constructor;function w7(){return new v7(this._groups,this._parents)}function k7(e,t){var n,r,a;return function(){var o=zl(this,e),l=(this.style.removeProperty(e),zl(this,e));return o===l?null:o===n&&l===r?a:a=t(n=o,r=l)}}function XC(e){return function(){this.style.removeProperty(e)}}function E7(e,t,n){var r,a=n+"",o;return function(){var l=zl(this,e);return l===a?null:l===r?o:o=t(r=l,n)}}function S7(e,t,n){var r,a,o;return function(){var l=zl(this,e),u=n(this),f=u+"";return u==null&&(f=u=(this.style.removeProperty(e),zl(this,e))),l===f?null:l===r&&f===a?o:(a=f,o=t(r=l,u))}}function N7(e,t){var n,r,a,o="style."+t,l="end."+o,u;return function(){var f=Oi(this,e),h=f.on,g=f.value[o]==null?u||(u=XC(t)):void 0;(h!==n||a!==g)&&(r=(n=h).copy()).on(l,a=g),f.on=r}}function _7(e,t,n){var r=(e+="")=="transform"?CH:WC;return t==null?this.styleTween(e,k7(e,r)).on("end.style."+e,XC(e)):typeof t=="function"?this.styleTween(e,S7(e,r,Mx(this,"style."+e,t))).each(N7(this._id,e)):this.styleTween(e,E7(e,r,t),n).on("end.style."+e,null)}function C7(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function j7(e,t,n){var r,a;function o(){var l=t.apply(this,arguments);return l!==a&&(r=(a=l)&&C7(e,l,n)),r}return o._value=t,o}function A7(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;return this.tween(r,j7(e,t,n??""))}function T7(e){return function(){this.textContent=e}}function M7(e){return function(){var t=e(this);this.textContent=t??""}}function D7(e){return this.tween("text",typeof e=="function"?M7(Mx(this,"text",e)):T7(e==null?"":e+""))}function O7(e){return function(t){this.textContent=e.call(this,t)}}function R7(e){var t,n;function r(){var a=e.apply(this,arguments);return a!==n&&(t=(n=a)&&O7(a)),t}return r._value=e,r}function L7(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,R7(e))}function I7(){for(var e=this._name,t=this._id,n=ZC(),r=this._groups,a=r.length,o=0;o<a;++o)for(var l=r[o],u=l.length,f,h=0;h<u;++h)if(f=l[h]){var g=mi(f,t);tp(f,e,n,h,l,{time:g.time+g.delay+g.duration,delay:0,duration:g.duration,ease:g.ease})}return new pa(r,this._parents,e,n)}function z7(){var e,t,n=this,r=n._id,a=n.size();return new Promise(function(o,l){var u={value:l},f={value:function(){--a===0&&o()}};n.each(function(){var h=Oi(this,r),g=h.on;g!==e&&(t=(e=g).copy(),t._.cancel.push(u),t._.interrupt.push(u),t._.end.push(f)),h.on=t}),a===0&&o()})}var P7=0;function pa(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function ZC(){return++P7}var ta=Zu.prototype;pa.prototype={constructor:pa,select:b7,selectAll:x7,selectChild:ta.selectChild,selectChildren:ta.selectChildren,filter:d7,merge:f7,selection:w7,transition:I7,call:ta.call,nodes:ta.nodes,node:ta.node,size:ta.size,empty:ta.empty,each:ta.each,on:m7,attr:QH,attrTween:e7,style:_7,styleTween:A7,text:D7,textTween:L7,remove:y7,tween:FH,delay:r7,duration:s7,ease:l7,easeVarying:u7,end:z7,[Symbol.iterator]:ta[Symbol.iterator]};function B7(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var U7={time:null,delay:0,duration:250,ease:B7};function $7(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function F7(e){var t,n;e instanceof pa?(t=e._id,e=e._name):(t=ZC(),(n=U7).time=Ax(),e=e==null?null:e+"");for(var r=this._groups,a=r.length,o=0;o<a;++o)for(var l=r[o],u=l.length,f,h=0;h<u;++h)(f=l[h])&&tp(f,e,t,h,l,n||$7(f,t));return new pa(r,this._parents,e,t)}Zu.prototype.interrupt=BH;Zu.prototype.transition=F7;const Pf=e=>()=>e;function q7(e,{sourceEvent:t,target:n,transform:r,dispatch:a}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:a}})}function la(e,t,n){this.k=e,this.x=t,this.y=n}la.prototype={constructor:la,scale:function(e){return e===1?this:new la(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new la(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var np=new la(1,0,0);JC.prototype=la.prototype;function JC(e){for(;!e.__zoom;)if(!(e=e.parentNode))return np;return e.__zoom}function iy(e){e.stopImmediatePropagation()}function ru(e){e.preventDefault(),e.stopImmediatePropagation()}function H7(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function K7(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function LE(){return this.__zoom||np}function G7(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function V7(){return navigator.maxTouchPoints||"ontouchstart"in this}function Y7(e,t,n){var r=e.invertX(t[0][0])-n[0][0],a=e.invertX(t[1][0])-n[1][0],o=e.invertY(t[0][1])-n[0][1],l=e.invertY(t[1][1])-n[1][1];return e.translate(a>r?(r+a)/2:Math.min(0,r)||Math.max(0,a),l>o?(o+l)/2:Math.min(0,o)||Math.max(0,l))}function ej(){var e=H7,t=K7,n=Y7,r=G7,a=V7,o=[0,1/0],l=[[-1/0,-1/0],[1/0,1/0]],u=250,f=Zf,h=Zh("start","zoom","end"),g,m,y,b=500,k=150,v=0,S=10;function E(B){B.property("__zoom",LE).on("wheel.zoom",I,{passive:!1}).on("mousedown.zoom",F).on("dblclick.zoom",$).filter(a).on("touchstart.zoom",U).on("touchmove.zoom",K).on("touchend.zoom touchcancel.zoom",Q).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}E.transform=function(B,H,z,Y){var W=B.selection?B.selection():B;W.property("__zoom",LE),B!==W?D(B,H,z,Y):W.interrupt().each(function(){T(this,arguments).event(Y).start().zoom(null,typeof H=="function"?H.apply(this,arguments):H).end()})},E.scaleBy=function(B,H,z,Y){E.scaleTo(B,function(){var W=this.__zoom.k,G=typeof H=="function"?H.apply(this,arguments):H;return W*G},z,Y)},E.scaleTo=function(B,H,z,Y){E.transform(B,function(){var W=t.apply(this,arguments),G=this.__zoom,O=z==null?_(W):typeof z=="function"?z.apply(this,arguments):z,L=G.invert(O),V=typeof H=="function"?H.apply(this,arguments):H;return n(N(C(G,V),O,L),W,l)},z,Y)},E.translateBy=function(B,H,z,Y){E.transform(B,function(){return n(this.__zoom.translate(typeof H=="function"?H.apply(this,arguments):H,typeof z=="function"?z.apply(this,arguments):z),t.apply(this,arguments),l)},null,Y)},E.translateTo=function(B,H,z,Y,W){E.transform(B,function(){var G=t.apply(this,arguments),O=this.__zoom,L=Y==null?_(G):typeof Y=="function"?Y.apply(this,arguments):Y;return n(np.translate(L[0],L[1]).scale(O.k).translate(typeof H=="function"?-H.apply(this,arguments):-H,typeof z=="function"?-z.apply(this,arguments):-z),G,l)},Y,W)};function C(B,H){return H=Math.max(o[0],Math.min(o[1],H)),H===B.k?B:new la(H,B.x,B.y)}function N(B,H,z){var Y=H[0]-z[0]*B.k,W=H[1]-z[1]*B.k;return Y===B.x&&W===B.y?B:new la(B.k,Y,W)}function _(B){return[(+B[0][0]+ +B[1][0])/2,(+B[0][1]+ +B[1][1])/2]}function D(B,H,z,Y){B.on("start.zoom",function(){T(this,arguments).event(Y).start()}).on("interrupt.zoom end.zoom",function(){T(this,arguments).event(Y).end()}).tween("zoom",function(){var W=this,G=arguments,O=T(W,G).event(Y),L=t.apply(W,G),V=z==null?_(L):typeof z=="function"?z.apply(W,G):z,R=Math.max(L[1][0]-L[0][0],L[1][1]-L[0][1]),se=W.__zoom,ge=typeof H=="function"?H.apply(W,G):H,ye=f(se.invert(V).concat(R/se.k),ge.invert(V).concat(R/ge.k));return function(xe){if(xe===1)xe=ge;else{var q=ye(xe),ne=R/q[2];xe=new la(ne,V[0]-q[0]*ne,V[1]-q[1]*ne)}O.zoom(null,xe)}})}function T(B,H,z){return!z&&B.__zooming||new M(B,H)}function M(B,H){this.that=B,this.args=H,this.active=0,this.sourceEvent=null,this.extent=t.apply(B,H),this.taps=0}M.prototype={event:function(B){return B&&(this.sourceEvent=B),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(B,H){return this.mouse&&B!=="mouse"&&(this.mouse[1]=H.invert(this.mouse[0])),this.touch0&&B!=="touch"&&(this.touch0[1]=H.invert(this.touch0[0])),this.touch1&&B!=="touch"&&(this.touch1[1]=H.invert(this.touch1[0])),this.that.__zoom=H,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(B){var H=Sr(this.that).datum();h.call(B,this.that,new q7(B,{sourceEvent:this.sourceEvent,target:E,transform:this.that.__zoom,dispatch:h}),H)}};function I(B,...H){if(!e.apply(this,arguments))return;var z=T(this,H).event(B),Y=this.__zoom,W=Math.max(o[0],Math.min(o[1],Y.k*Math.pow(2,r.apply(this,arguments)))),G=si(B);if(z.wheel)(z.mouse[0][0]!==G[0]||z.mouse[0][1]!==G[1])&&(z.mouse[1]=Y.invert(z.mouse[0]=G)),clearTimeout(z.wheel);else{if(Y.k===W)return;z.mouse=[G,Y.invert(G)],th(this),z.start()}ru(B),z.wheel=setTimeout(O,k),z.zoom("mouse",n(N(C(Y,W),z.mouse[0],z.mouse[1]),z.extent,l));function O(){z.wheel=null,z.end()}}function F(B,...H){if(y||!e.apply(this,arguments))return;var z=B.currentTarget,Y=T(this,H,!0).event(B),W=Sr(B.view).on("mousemove.zoom",V,!0).on("mouseup.zoom",R,!0),G=si(B,z),O=B.clientX,L=B.clientY;zC(B.view),iy(B),Y.mouse=[G,this.__zoom.invert(G)],th(this),Y.start();function V(se){if(ru(se),!Y.moved){var ge=se.clientX-O,ye=se.clientY-L;Y.moved=ge*ge+ye*ye>v}Y.event(se).zoom("mouse",n(N(Y.that.__zoom,Y.mouse[0]=si(se,z),Y.mouse[1]),Y.extent,l))}function R(se){W.on("mousemove.zoom mouseup.zoom",null),PC(se.view,Y.moved),ru(se),Y.event(se).end()}}function $(B,...H){if(e.apply(this,arguments)){var z=this.__zoom,Y=si(B.changedTouches?B.changedTouches[0]:B,this),W=z.invert(Y),G=z.k*(B.shiftKey?.5:2),O=n(N(C(z,G),Y,W),t.apply(this,H),l);ru(B),u>0?Sr(this).transition().duration(u).call(D,O,Y,B):Sr(this).call(E.transform,O,Y,B)}}function U(B,...H){if(e.apply(this,arguments)){var z=B.touches,Y=z.length,W=T(this,H,B.changedTouches.length===Y).event(B),G,O,L,V;for(iy(B),O=0;O<Y;++O)L=z[O],V=si(L,this),V=[V,this.__zoom.invert(V),L.identifier],W.touch0?!W.touch1&&W.touch0[2]!==V[2]&&(W.touch1=V,W.taps=0):(W.touch0=V,G=!0,W.taps=1+!!g);g&&(g=clearTimeout(g)),G&&(W.taps<2&&(m=V[0],g=setTimeout(function(){g=null},b)),th(this),W.start())}}function K(B,...H){if(this.__zooming){var z=T(this,H).event(B),Y=B.changedTouches,W=Y.length,G,O,L,V;for(ru(B),G=0;G<W;++G)O=Y[G],L=si(O,this),z.touch0&&z.touch0[2]===O.identifier?z.touch0[0]=L:z.touch1&&z.touch1[2]===O.identifier&&(z.touch1[0]=L);if(O=z.that.__zoom,z.touch1){var R=z.touch0[0],se=z.touch0[1],ge=z.touch1[0],ye=z.touch1[1],xe=(xe=ge[0]-R[0])*xe+(xe=ge[1]-R[1])*xe,q=(q=ye[0]-se[0])*q+(q=ye[1]-se[1])*q;O=C(O,Math.sqrt(xe/q)),L=[(R[0]+ge[0])/2,(R[1]+ge[1])/2],V=[(se[0]+ye[0])/2,(se[1]+ye[1])/2]}else if(z.touch0)L=z.touch0[0],V=z.touch0[1];else return;z.zoom("touch",n(N(O,L,V),z.extent,l))}}function Q(B,...H){if(this.__zooming){var z=T(this,H).event(B),Y=B.changedTouches,W=Y.length,G,O;for(iy(B),y&&clearTimeout(y),y=setTimeout(function(){y=null},b),G=0;G<W;++G)O=Y[G],z.touch0&&z.touch0[2]===O.identifier?delete z.touch0:z.touch1&&z.touch1[2]===O.identifier&&delete z.touch1;if(z.touch1&&!z.touch0&&(z.touch0=z.touch1,delete z.touch1),z.touch0)z.touch0[1]=this.__zoom.invert(z.touch0[0]);else if(z.end(),z.taps===2&&(O=si(O,this),Math.hypot(m[0]-O[0],m[1]-O[1])<S)){var L=Sr(this).on("dblclick.zoom");L&&L.apply(this,arguments)}}}return E.wheelDelta=function(B){return arguments.length?(r=typeof B=="function"?B:Pf(+B),E):r},E.filter=function(B){return arguments.length?(e=typeof B=="function"?B:Pf(!!B),E):e},E.touchable=function(B){return arguments.length?(a=typeof B=="function"?B:Pf(!!B),E):a},E.extent=function(B){return arguments.length?(t=typeof B=="function"?B:Pf([[+B[0][0],+B[0][1]],[+B[1][0],+B[1][1]]]),E):t},E.scaleExtent=function(B){return arguments.length?(o[0]=+B[0],o[1]=+B[1],E):[o[0],o[1]]},E.translateExtent=function(B){return arguments.length?(l[0][0]=+B[0][0],l[1][0]=+B[1][0],l[0][1]=+B[0][1],l[1][1]=+B[1][1],E):[[l[0][0],l[0][1]],[l[1][0],l[1][1]]]},E.constrain=function(B){return arguments.length?(n=B,E):n},E.duration=function(B){return arguments.length?(u=+B,E):u},E.interpolate=function(B){return arguments.length?(f=B,E):f},E.on=function(){var B=h.on.apply(h,arguments);return B===h?E:B},E.clickDistance=function(B){return arguments.length?(v=(B=+B)*B,E):Math.sqrt(v)},E.tapDistance=function(B){return arguments.length?(S=+B,E):S},E}const fi={error001:(e="react")=>`Seems like you have not used ${e==="svelte"?"SvelteFlowProvider":"ReactFlowProvider"} as an ancestor. Help: https://${e}flow.dev/error#001`,error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:t,sourceHandle:n,targetHandle:r})=>`Couldn't create edge for ${e} handle id: "${e==="source"?n:r}", edge id: ${t}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs.",error016:e=>`Edge with id "${e}" does not exist, it may have been removed. This can happen when an edge is deleted before the "onEdgeClick" handler is called.`},Au=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],tj=["Enter"," ","Escape"],nj={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:e,x:t,y:n})=>`Moved selected node ${e}. New position, x: ${t}, y: ${n}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};var Bl;(function(e){e.Strict="strict",e.Loose="loose"})(Bl||(Bl={}));var ao;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(ao||(ao={}));var Tu;(function(e){e.Partial="partial",e.Full="full"})(Tu||(Tu={}));const rj={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var is;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(is||(is={}));var _h;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(_h||(_h={}));var Ie;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(Ie||(Ie={}));const IE={[Ie.Left]:Ie.Right,[Ie.Right]:Ie.Left,[Ie.Top]:Ie.Bottom,[Ie.Bottom]:Ie.Top};function ij(e){return e===null?null:e?"valid":"invalid"}const aj=e=>"id"in e&&"source"in e&&"target"in e,Q7=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),Dx=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),ed=(e,t=[0,0])=>{const{width:n,height:r}=ba(e),a=e.origin??t,o=n*a[0],l=r*a[1];return{x:e.position.x-o,y:e.position.y-l}},W7=(e,t={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const n=e.reduce((r,a)=>{const o=typeof a=="string";let l=!t.nodeLookup&&!o?a:void 0;t.nodeLookup&&(l=o?t.nodeLookup.get(a):Dx(a)?a:t.nodeLookup.get(a.id));const u=l?Ch(l,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return rp(r,u)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return ip(n)},td=(e,t={})=>{let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},r=!1;return e.forEach(a=>{(t.filter===void 0||t.filter(a))&&(n=rp(n,Ch(a)),r=!0)}),r?ip(n):{x:0,y:0,width:0,height:0}},Ox=(e,t,[n,r,a]=[0,0,1],o=!1,l=!1)=>{const u=(t.x-n)/a,f=(t.y-r)/a,h=t.width/a,g=t.height/a,m=[];for(const y of e.values()){const{measured:b,selectable:k=!0,hidden:v=!1}=y;if(l&&!k||v)continue;const S=b.width??y.width??y.initialWidth??0,E=b.height??y.height??y.initialHeight??0,{x:C,y:N}=y.internals.positionAbsolute,_=cj(u,f,h,g,C,N,S,E),D=S*E,T=o&&_>0;(!y.internals.handleBounds||T||_>=D||y.dragging)&&m.push(y)}return m},X7=(e,t)=>{const n=new Set;return e.forEach(r=>{n.add(r.id)}),t.filter(r=>n.has(r.source)||n.has(r.target))};function Z7(e,t){const n=new Map,r=t!=null&&t.nodes?new Set(t.nodes.map(a=>a.id)):null;return e.forEach(a=>{a.measured.width&&a.measured.height&&((t==null?void 0:t.includeHiddenNodes)||!a.hidden)&&(!r||r.has(a.id))&&n.set(a.id,a)}),n}async function J7({nodes:e,width:t,height:n,panZoom:r,minZoom:a,maxZoom:o},l){if(e.size===0)return!0;const u=Z7(e,l),f=td(u),h=Lx(f,t,n,(l==null?void 0:l.minZoom)??a,(l==null?void 0:l.maxZoom)??o,(l==null?void 0:l.padding)??.1);return await r.setViewport(h,{duration:l==null?void 0:l.duration,ease:l==null?void 0:l.ease,interpolate:l==null?void 0:l.interpolate}),!0}function sj({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:r=[0,0],nodeExtent:a,onError:o}){const l=n.get(e),u=l.parentId?n.get(l.parentId):void 0,{x:f,y:h}=u?u.internals.positionAbsolute:{x:0,y:0},g=l.origin??r;let m=l.extent||a;if(l.extent==="parent"&&!l.expandParent)if(!u)o==null||o("005",fi.error005());else{const b=u.measured.width,k=u.measured.height;b&&k&&(m=[[f,h],[f+b,h+k]])}else u&&ho(l.extent)&&(m=[[l.extent[0][0]+f,l.extent[0][1]+h],[l.extent[1][0]+f,l.extent[1][1]+h]]);const y=ho(m)?fo(t,m,l.measured):t;return(l.measured.width===void 0||l.measured.height===void 0)&&(o==null||o("015",fi.error015())),{position:{x:y.x-f+(l.measured.width??0)*g[0],y:y.y-h+(l.measured.height??0)*g[1]},positionAbsolute:y}}async function eK({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:r,onBeforeDelete:a}){const o=new Set(e.map(y=>y.id)),l=[];for(const y of n){if(y.deletable===!1)continue;const b=o.has(y.id),k=!b&&y.parentId&&l.find(v=>v.id===y.parentId);(b||k)&&l.push(y)}const u=new Set(t.map(y=>y.id)),f=r.filter(y=>y.deletable!==!1),g=X7(l,f);for(const y of f)u.has(y.id)&&!g.find(k=>k.id===y.id)&&g.push(y);if(!a)return{edges:g,nodes:l};const m=await a({nodes:l,edges:g});return typeof m=="boolean"?m?{edges:g,nodes:l}:{edges:[],nodes:[]}:m}const Ul=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),fo=(e={x:0,y:0},t,n)=>({x:Ul(e.x,t[0][0],t[1][0]-((n==null?void 0:n.width)??0)),y:Ul(e.y,t[0][1],t[1][1]-((n==null?void 0:n.height)??0))});function oj(e,t,n){const{width:r,height:a}=ba(n),{x:o,y:l}=n.internals.positionAbsolute;return fo(e,[[o,l],[o+r,l+a]],t)}const zE=(e,t,n)=>e<t?Ul(Math.abs(e-t),1,t)/t:e>n?-Ul(Math.abs(e-n),1,t)/t:0,Rx=(e,t,n=15,r=40)=>{const a=zE(e.x,r,t.width-r)*n,o=zE(e.y,r,t.height-r)*n;return[a,o]},rp=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),ob=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),ip=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),Mu=(e,t=[0,0])=>{var a,o;const{x:n,y:r}=Dx(e)?e.internals.positionAbsolute:ed(e,t);return{x:n,y:r,width:((a=e.measured)==null?void 0:a.width)??e.width??e.initialWidth??0,height:((o=e.measured)==null?void 0:o.height)??e.height??e.initialHeight??0}},Ch=(e,t=[0,0])=>{var a,o;const{x:n,y:r}=Dx(e)?e.internals.positionAbsolute:ed(e,t);return{x:n,y:r,x2:n+(((a=e.measured)==null?void 0:a.width)??e.width??e.initialWidth??0),y2:r+(((o=e.measured)==null?void 0:o.height)??e.height??e.initialHeight??0)}},lj=(e,t)=>ip(rp(ob(e),ob(t))),cj=(e,t,n,r,a,o,l,u)=>{const f=Math.max(0,Math.min(e+n,a+l)-Math.max(e,a)),h=Math.max(0,Math.min(t+r,o+u)-Math.max(t,o));return Math.ceil(f*h)},jh=(e,t)=>cj(e.x,e.y,e.width,e.height,t.x,t.y,t.width,t.height),PE=e=>li(e.width)&&li(e.height)&&li(e.x)&&li(e.y),li=e=>!isNaN(e)&&isFinite(e),uj=(e,t)=>(n,r)=>{},nd=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),rd=({x:e,y:t},[n,r,a],o=!1,l=[1,1])=>{const u={x:(e-n)/a,y:(t-r)/a};return o?nd(u,l):u},$l=({x:e,y:t},[n,r,a])=>({x:e*a+n,y:t*a+r});function al(e,t){if(typeof e=="number")return Math.floor((t-t/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(n)}if(typeof e=="string"&&e.endsWith("%")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return console.error(`The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function tK(e,t,n){if(typeof e=="string"||typeof e=="number"){const r=al(e,n),a=al(e,t);return{top:r,right:a,bottom:r,left:a,x:a*2,y:r*2}}if(typeof e=="object"){const r=al(e.top??e.y??0,n),a=al(e.bottom??e.y??0,n),o=al(e.left??e.x??0,t),l=al(e.right??e.x??0,t);return{top:r,right:l,bottom:a,left:o,x:o+l,y:r+a}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function nK(e,t,n,r,a,o){const{x:l,y:u}=$l(e,[t,n,r]),{x:f,y:h}=$l({x:e.x+e.width,y:e.y+e.height},[t,n,r]),g=a-f,m=o-h;return{left:Math.floor(l),top:Math.floor(u),right:Math.floor(g),bottom:Math.floor(m)}}const Lx=(e,t,n,r,a,o)=>{const l=tK(o,t,n),u=(t-l.x)/e.width,f=(n-l.y)/e.height,h=Math.min(u,f),g=Ul(h,r,a),m=e.x+e.width/2,y=e.y+e.height/2,b=t/2-m*g,k=n/2-y*g,v=nK(e,b,k,g,t,n),S={left:Math.min(v.left-l.left,0),top:Math.min(v.top-l.top,0),right:Math.min(v.right-l.right,0),bottom:Math.min(v.bottom-l.bottom,0)};return{x:b-S.left+S.right,y:k-S.top+S.bottom,zoom:g}},Du=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function ho(e){return e!=null&&e!=="parent"}function ba(e){var t,n;return{width:((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth??0,height:((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight??0}}function dj(e){var t,n;return(((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth)!==void 0&&(((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight)!==void 0}function fj(e,t={width:0,height:0},n,r,a){const o={...e},l=r.get(n);if(l){const u=l.origin||a;o.x+=l.internals.positionAbsolute.x-(t.width??0)*u[0],o.y+=l.internals.positionAbsolute.y-(t.height??0)*u[1]}return o}function BE(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function rK(){let e,t;return{promise:new Promise((r,a)=>{e=r,t=a}),resolve:e,reject:t}}function iK(e){return{...nj,...e||{}}}function hu(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:r,containerBounds:a}){const{x:o,y:l}=ci(e),u=rd({x:o-((a==null?void 0:a.left)??0),y:l-((a==null?void 0:a.top)??0)},r),{x:f,y:h}=n?nd(u,t):u;return{xSnapped:f,ySnapped:h,...u}}const Ix=e=>({width:e.offsetWidth,height:e.offsetHeight}),hj=e=>{var t;return((t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e))||(window==null?void 0:window.document)},aK=["INPUT","SELECT","TEXTAREA"];function pj(e){var r,a;const t=((a=(r=e.composedPath)==null?void 0:r.call(e))==null?void 0:a[0])||e.target;return(t==null?void 0:t.nodeType)!==1?!1:aK.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}const mj=e=>"clientX"in e,ci=(e,t)=>{var o,l;const n=mj(e),r=n?e.clientX:(o=e.touches)==null?void 0:o[0].clientX,a=n?e.clientY:(l=e.touches)==null?void 0:l[0].clientY;return{x:r-((t==null?void 0:t.left)??0),y:a-((t==null?void 0:t.top)??0)}},UE=(e,t,n,r,a)=>{const o=t.querySelectorAll(`.${e}`);return!o||!o.length?null:Array.from(o).map(l=>{const u=l.getBoundingClientRect();return{id:l.getAttribute("data-handleid"),type:e,nodeId:a,position:l.getAttribute("data-handlepos"),x:(u.left-n.left)/r,y:(u.top-n.top)/r,...Ix(l)}})};function gj({sourceX:e,sourceY:t,targetX:n,targetY:r,sourceControlX:a,sourceControlY:o,targetControlX:l,targetControlY:u}){const f=e*.125+a*.375+l*.375+n*.125,h=t*.125+o*.375+u*.375+r*.125,g=Math.abs(f-e),m=Math.abs(h-t);return[f,h,g,m]}function Bf(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function $E({pos:e,x1:t,y1:n,x2:r,y2:a,c:o}){switch(e){case Ie.Left:return[t-Bf(t-r,o),n];case Ie.Right:return[t+Bf(r-t,o),n];case Ie.Top:return[t,n-Bf(n-a,o)];case Ie.Bottom:return[t,n+Bf(a-n,o)]}}function yj({sourceX:e,sourceY:t,sourcePosition:n=Ie.Bottom,targetX:r,targetY:a,targetPosition:o=Ie.Top,curvature:l=.25}){const[u,f]=$E({pos:n,x1:e,y1:t,x2:r,y2:a,c:l}),[h,g]=$E({pos:o,x1:r,y1:a,x2:e,y2:t,c:l}),[m,y,b,k]=gj({sourceX:e,sourceY:t,targetX:r,targetY:a,sourceControlX:u,sourceControlY:f,targetControlX:h,targetControlY:g});return[`M${e},${t} C${u},${f} ${h},${g} ${r},${a}`,m,y,b,k]}function bj({sourceX:e,sourceY:t,targetX:n,targetY:r}){const a=Math.abs(n-e)/2,o=n<e?n+a:n-a,l=Math.abs(r-t)/2,u=r<t?r+l:r-l;return[o,u,a,l]}function sK({sourceNode:e,targetNode:t,selected:n=!1,zIndex:r=0,elevateOnSelect:a=!1,zIndexMode:o="basic"}){if(o==="manual")return r;const l=a&&n?r+1e3:r,u=Math.max(e.parentId||a&&e.selected?e.internals.z:0,t.parentId||a&&t.selected?t.internals.z:0);return l+u}function oK({sourceNode:e,targetNode:t,width:n,height:r,transform:a}){const o=rp(Ch(e),Ch(t));o.x===o.x2&&(o.x2+=1),o.y===o.y2&&(o.y2+=1);const l={x:-a[0]/a[2],y:-a[1]/a[2],width:n/a[2],height:r/a[2]};return jh(l,ip(o))>0}const lK=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`xy-edge__${e}${t||""}-${n}${r||""}`,cK=(e,t)=>t.some(n=>n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle)),uK=(e,t,n={})=>{var o;if(!e.source||!e.target)return(o=n.onError)==null||o.call(n,"006",fi.error006()),t;const r=n.getEdgeId||lK;let a;return aj(e)?a={...e}:a={...e,id:r(e)},cK(a,t)?t:(a.sourceHandle===null&&delete a.sourceHandle,a.targetHandle===null&&delete a.targetHandle,t.concat(a))};function xj({sourceX:e,sourceY:t,targetX:n,targetY:r}){const[a,o,l,u]=bj({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,a,o,l,u]}const FE={[Ie.Left]:{x:-1,y:0},[Ie.Right]:{x:1,y:0},[Ie.Top]:{x:0,y:-1},[Ie.Bottom]:{x:0,y:1}},dK=({source:e,sourcePosition:t=Ie.Bottom,target:n})=>t===Ie.Left||t===Ie.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1},qE=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function fK({source:e,sourcePosition:t=Ie.Bottom,target:n,targetPosition:r=Ie.Top,center:a,offset:o,stepPosition:l}){const u=FE[t],f=FE[r],h={x:e.x+u.x*o,y:e.y+u.y*o},g={x:n.x+f.x*o,y:n.y+f.y*o},m=dK({source:h,sourcePosition:t,target:g}),y=m.x!==0?"x":"y",b=m[y];let k=[],v,S;const E={x:0,y:0},C={x:0,y:0},[,,N,_]=bj({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(u[y]*f[y]===-1){y==="x"?(v=a.x??h.x+(g.x-h.x)*l,S=a.y??(h.y+g.y)/2):(v=a.x??(h.x+g.x)/2,S=a.y??h.y+(g.y-h.y)*l);const I=[{x:v,y:h.y},{x:v,y:g.y}],F=[{x:h.x,y:S},{x:g.x,y:S}];u[y]===b?k=y==="x"?I:F:k=y==="x"?F:I}else{const I=[{x:h.x,y:g.y}],F=[{x:g.x,y:h.y}];if(y==="x"?k=u.x===b?F:I:k=u.y===b?I:F,t===r){const B=Math.abs(e[y]-n[y]);if(B<=o){const H=Math.min(o-1,o-B);u[y]===b?E[y]=(h[y]>e[y]?-1:1)*H:C[y]=(g[y]>n[y]?-1:1)*H}}if(t!==r){const B=y==="x"?"y":"x",H=u[y]===f[B],z=h[B]>g[B],Y=h[B]<g[B];(u[y]===1&&(!H&&z||H&&Y)||u[y]!==1&&(!H&&Y||H&&z))&&(k=y==="x"?I:F)}const $={x:h.x+E.x,y:h.y+E.y},U={x:g.x+C.x,y:g.y+C.y},K=Math.max(Math.abs($.x-k[0].x),Math.abs(U.x-k[0].x)),Q=Math.max(Math.abs($.y-k[0].y),Math.abs(U.y-k[0].y));K>=Q?(v=($.x+U.x)/2,S=k[0].y):(v=k[0].x,S=($.y+U.y)/2)}const D={x:h.x+E.x,y:h.y+E.y},T={x:g.x+C.x,y:g.y+C.y};return[[e,...D.x!==k[0].x||D.y!==k[0].y?[D]:[],...k,...T.x!==k[k.length-1].x||T.y!==k[k.length-1].y?[T]:[],n],v,S,N,_]}function hK(e,t,n,r){const a=Math.min(qE(e,t)/2,qE(t,n)/2,r),{x:o,y:l}=t;if(e.x===o&&o===n.x||e.y===l&&l===n.y)return`L${o} ${l}`;if(e.y===l){const h=e.x<n.x?-1:1,g=e.y<n.y?1:-1;return`L ${o+a*h},${l}Q ${o},${l} ${o},${l+a*g}`}const u=e.x<n.x?1:-1,f=e.y<n.y?-1:1;return`L ${o},${l+a*f}Q ${o},${l} ${o+a*u},${l}`}function lb({sourceX:e,sourceY:t,sourcePosition:n=Ie.Bottom,targetX:r,targetY:a,targetPosition:o=Ie.Top,borderRadius:l=5,centerX:u,centerY:f,offset:h=20,stepPosition:g=.5}){const[m,y,b,k,v]=fK({source:{x:e,y:t},sourcePosition:n,target:{x:r,y:a},targetPosition:o,center:{x:u,y:f},offset:h,stepPosition:g});let S=`M${m[0].x} ${m[0].y}`;for(let E=1;E<m.length-1;E++)S+=hK(m[E-1],m[E],m[E+1],l);return S+=`L${m[m.length-1].x} ${m[m.length-1].y}`,[S,y,b,k,v]}function HE(e){var t;return e&&!!(e.internals.handleBounds||(t=e.handles)!=null&&t.length)&&!!(e.measured.width||e.width||e.initialWidth)}function pK(e){var m;const{sourceNode:t,targetNode:n}=e;if(!HE(t)||!HE(n))return null;const r=t.internals.handleBounds||KE(t.handles),a=n.internals.handleBounds||KE(n.handles),o=GE((r==null?void 0:r.source)??[],e.sourceHandle),l=GE(e.connectionMode===Bl.Strict?(a==null?void 0:a.target)??[]:((a==null?void 0:a.target)??[]).concat((a==null?void 0:a.source)??[]),e.targetHandle);if(!o||!l)return(m=e.onError)==null||m.call(e,"008",fi.error008(o?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const u=(o==null?void 0:o.position)||Ie.Bottom,f=(l==null?void 0:l.position)||Ie.Top,h=po(t,o,u),g=po(n,l,f);return{sourceX:h.x,sourceY:h.y,targetX:g.x,targetY:g.y,sourcePosition:u,targetPosition:f}}function KE(e){if(!e)return null;const t=[],n=[];for(const r of e)r.width=r.width??1,r.height=r.height??1,r.type==="source"?t.push(r):r.type==="target"&&n.push(r);return{source:t,target:n}}function po(e,t,n=Ie.Left,r=!1){const a=((t==null?void 0:t.x)??0)+e.internals.positionAbsolute.x,o=((t==null?void 0:t.y)??0)+e.internals.positionAbsolute.y,{width:l,height:u}=t??ba(e);if(r)return{x:a+l/2,y:o+u/2};switch((t==null?void 0:t.position)??n){case Ie.Top:return{x:a+l/2,y:o};case Ie.Right:return{x:a+l,y:o+u/2};case Ie.Bottom:return{x:a+l/2,y:o+u};case Ie.Left:return{x:a,y:o+u/2}}}function GE(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function cb(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`:""}function mK(e,{id:t,defaultColor:n,defaultMarkerStart:r,defaultMarkerEnd:a}){const o=new Set;return e.reduce((l,u)=>([u.markerStart||r,u.markerEnd||a].forEach(f=>{if(f&&typeof f=="object"){const h=cb(f,t);o.has(h)||(l.push({id:h,color:f.color||n,...f}),o.add(h))}}),l),[]).sort((l,u)=>l.id.localeCompare(u.id))}const vj=1e3,gK=10,zx={nodeOrigin:[0,0],nodeExtent:Au,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},yK={...zx,checkEquality:!0};function Px(e,t){const n={...e};for(const r in t)t[r]!==void 0&&(n[r]=t[r]);return n}function bK(e,t,n){const r=Px(zx,n);for(const a of e.values())if(a.parentId)Ux(a,e,t,r);else{const o=ed(a,r.nodeOrigin),l=ho(a.extent)?a.extent:r.nodeExtent,u=fo(o,l,ba(a));a.internals.positionAbsolute=u}}function xK(e,t){if(!e.handles)return e.measured?t==null?void 0:t.internals.handleBounds:void 0;const n=[],r=[];for(const a of e.handles){const o={id:a.id,width:a.width??1,height:a.height??1,nodeId:e.id,x:a.x,y:a.y,position:a.position,type:a.type};a.type==="source"?n.push(o):a.type==="target"&&r.push(o)}return{source:n,target:r}}function Bx(e){return e==="manual"}function ub(e,t,n,r={}){var g,m;const a=Px(yK,r),o={i:0},l=new Map(t),u=a!=null&&a.elevateNodesOnSelect&&!Bx(a.zIndexMode)?vj:0;let f=e.length>0,h=!1;t.clear(),n.clear();for(const y of e){let b=l.get(y.id);if(a.checkEquality&&y===(b==null?void 0:b.internals.userNode))t.set(y.id,b);else{const k=ed(y,a.nodeOrigin),v=ho(y.extent)?y.extent:a.nodeExtent,S=fo(k,v,ba(y));b={...a.defaults,...y,measured:{width:(g=y.measured)==null?void 0:g.width,height:(m=y.measured)==null?void 0:m.height},internals:{positionAbsolute:S,handleBounds:xK(y,b),z:wj(y,u,a.zIndexMode),userNode:y}},t.set(y.id,b)}(b.measured===void 0||b.measured.width===void 0||b.measured.height===void 0)&&!b.hidden&&(f=!1),y.parentId&&Ux(b,t,n,r,o),h||(h=y.selected??!1)}return{nodesInitialized:f,hasSelectedNodes:h}}function vK(e,t){if(!e.parentId)return;const n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function Ux(e,t,n,r,a){const{elevateNodesOnSelect:o,nodeOrigin:l,nodeExtent:u,zIndexMode:f}=Px(zx,r),h=e.parentId,g=t.get(h);if(!g){console.warn(`Parent node ${h} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}vK(e,n),a&&!g.parentId&&g.internals.rootParentIndex===void 0&&f==="auto"&&(g.internals.rootParentIndex=++a.i,g.internals.z=g.internals.z+a.i*gK),a&&g.internals.rootParentIndex!==void 0&&(a.i=g.internals.rootParentIndex);const m=o&&!Bx(f)?vj:0,{x:y,y:b,z:k}=wK(e,g,l,u,m,f),{positionAbsolute:v}=e.internals,S=y!==v.x||b!==v.y;(S||k!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:S?{x:y,y:b}:v,z:k}})}function wj(e,t,n){const r=li(e.zIndex)?e.zIndex:0;return Bx(n)?r:r+(e.selected?t:0)}function wK(e,t,n,r,a,o){const{x:l,y:u}=t.internals.positionAbsolute,f=ba(e),h=ed(e,n),g=ho(e.extent)?fo(h,e.extent,f):h;let m=fo({x:l+g.x,y:u+g.y},r,f);e.extent==="parent"&&(m=oj(m,f,t));const y=wj(e,a,o),b=t.internals.z??0;return{x:m.x,y:m.y,z:b>=y?b+1:y}}function $x(e,t,n,r=[0,0]){var l;const a=[],o=new Map;for(const u of e){const f=t.get(u.parentId);if(!f)continue;const h=((l=o.get(u.parentId))==null?void 0:l.expandedRect)??Mu(f),g=lj(h,u.rect);o.set(u.parentId,{expandedRect:g,parent:f})}return o.size>0&&o.forEach(({expandedRect:u,parent:f},h)=>{var N;const g=f.internals.positionAbsolute,m=ba(f),y=f.origin??r,b=u.x<g.x?Math.round(Math.abs(g.x-u.x)):0,k=u.y<g.y?Math.round(Math.abs(g.y-u.y)):0,v=Math.max(m.width,Math.round(u.width)),S=Math.max(m.height,Math.round(u.height)),E=(v-m.width)*y[0],C=(S-m.height)*y[1];(b>0||k>0||E||C)&&(a.push({id:h,type:"position",position:{x:f.position.x-b+E,y:f.position.y-k+C}}),(N=n.get(h))==null||N.forEach(_=>{e.some(D=>D.id===_.id)||a.push({id:_.id,type:"position",position:{x:_.position.x+b,y:_.position.y+k}})})),(m.width<u.width||m.height<u.height||b||k)&&a.push({id:h,type:"dimensions",setAttributes:!0,dimensions:{width:v+(b?y[0]*b-E:0),height:S+(k?y[1]*k-C:0)}})}),a}function kK(e,t,n,r,a,o,l){const u=r==null?void 0:r.querySelector(".xyflow__viewport");let f=!1;if(!u)return{changes:[],updatedInternals:f};const h=[],g=window.getComputedStyle(u),{m22:m}=new window.DOMMatrixReadOnly(g.transform),y=[];for(const b of e.values()){const k=t.get(b.id);if(!k)continue;if(k.hidden){t.set(k.id,{...k,internals:{...k.internals,handleBounds:void 0}}),f=!0;continue}const v=Ix(b.nodeElement),S=k.measured.width!==v.width||k.measured.height!==v.height;if(!!(v.width&&v.height&&(S||!k.internals.handleBounds||b.force))){const C=b.nodeElement.getBoundingClientRect(),N=ho(k.extent)?k.extent:o;let{positionAbsolute:_}=k.internals;k.parentId&&k.extent==="parent"?_=oj(_,v,t.get(k.parentId)):N&&(_=fo(_,N,v));const D={...k,measured:v,internals:{...k.internals,positionAbsolute:_,handleBounds:{source:UE("source",b.nodeElement,C,m,k.id),target:UE("target",b.nodeElement,C,m,k.id)}}};t.set(k.id,D),k.parentId&&Ux(D,t,n,{nodeOrigin:a,zIndexMode:l}),f=!0,S&&(h.push({id:k.id,type:"dimensions",dimensions:v}),k.expandParent&&k.parentId&&y.push({id:k.id,parentId:k.parentId,rect:Mu(D,a)}))}}if(y.length>0){const b=$x(y,t,n,a);h.push(...b)}return{changes:h,updatedInternals:f}}async function EK({delta:e,panZoom:t,transform:n,translateExtent:r,width:a,height:o}){if(!t||!e.x&&!e.y)return!1;const l=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[a,o]],r);return!!l&&(l.x!==n[0]||l.y!==n[1]||l.k!==n[2])}function VE(e,t,n,r,a,o){let l=a;const u=r.get(l)||new Map;r.set(l,u.set(n,t)),l=`${a}-${e}`;const f=r.get(l)||new Map;if(r.set(l,f.set(n,t)),o){l=`${a}-${e}-${o}`;const h=r.get(l)||new Map;r.set(l,h.set(n,t))}}function kj(e,t,n){e.clear(),t.clear();for(const r of n){const{source:a,target:o,sourceHandle:l=null,targetHandle:u=null}=r,f={edgeId:r.id,source:a,target:o,sourceHandle:l,targetHandle:u},h=`${a}-${l}--${o}-${u}`,g=`${o}-${u}--${a}-${l}`;VE("source",f,g,e,a,l),VE("target",f,h,e,o,u),t.set(r.id,r)}}function Ej(e,t){if(!e.parentId)return!1;const n=t.get(e.parentId);return n?n.selected?!0:Ej(n,t):!1}function YE(e,t,n){var a;let r=e;do{if((a=r==null?void 0:r.matches)!=null&&a.call(r,t))return!0;if(r===n)return!1;r=r==null?void 0:r.parentElement}while(r);return!1}function SK(e,t,n,r){const a=new Map;for(const[o,l]of e)if((l.selected||l.id===r)&&(!l.parentId||!Ej(l,e))&&(l.draggable||t&&typeof l.draggable>"u")){const u=e.get(o);u&&a.set(o,{id:o,position:u.position||{x:0,y:0},distance:{x:n.x-u.internals.positionAbsolute.x,y:n.y-u.internals.positionAbsolute.y},extent:u.extent,parentId:u.parentId,origin:u.origin,expandParent:u.expandParent,internals:{positionAbsolute:u.internals.positionAbsolute||{x:0,y:0}},measured:{width:u.measured.width??0,height:u.measured.height??0}})}return a}function ay({nodeId:e,dragItems:t,nodeLookup:n,dragging:r=!0}){var l,u,f;const a=[];for(const[h,g]of t){const m=(l=n.get(h))==null?void 0:l.internals.userNode;m&&a.push({...m,position:g.position,dragging:r})}if(!e)return[a[0],a];const o=(u=n.get(e))==null?void 0:u.internals.userNode;return[o?{...o,position:((f=t.get(e))==null?void 0:f.position)||o.position,dragging:r}:a[0],a]}function NK({dragItems:e,snapGrid:t,x:n,y:r}){const a=e.values().next().value;if(!a)return null;const o={x:n-a.distance.x,y:r-a.distance.y},l=nd(o,t);return{x:l.x-o.x,y:l.y-o.y}}function _K({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:r,onDragStop:a}){let o={x:null,y:null},l=0,u=new Map,f=!1,h={x:0,y:0},g=null,m=!1,y=null,b=!1,k=!1,v=null;function S({noDragClassName:C,handleSelector:N,domNode:_,isSelectable:D,nodeId:T,nodeClickDistance:M=0}){y=Sr(_);function I({x:K,y:Q}){const{nodeLookup:B,nodeExtent:H,snapGrid:z,snapToGrid:Y,nodeOrigin:W,onNodeDrag:G,onSelectionDrag:O,onError:L,updateNodePositions:V}=t();o={x:K,y:Q};let R=!1;const se=u.size>1,ge=se&&H?ob(td(u)):null,ye=se&&Y?NK({dragItems:u,snapGrid:z,x:K,y:Q}):null;for(const[xe,q]of u){if(!B.has(xe))continue;let ne={x:K-q.distance.x,y:Q-q.distance.y};Y&&(ne=ye?{x:Math.round(ne.x+ye.x),y:Math.round(ne.y+ye.y)}:nd(ne,z));let ue=null;if(se&&H&&!q.extent&&ge){const{positionAbsolute:be}=q.internals,je=be.x-ge.x+H[0][0],De=be.x+q.measured.width-ge.x2+H[1][0],we=be.y-ge.y+H[0][1],ut=be.y+q.measured.height-ge.y2+H[1][1];ue=[[je,we],[De,ut]]}const{position:ce,positionAbsolute:de}=sj({nodeId:xe,nextPosition:ne,nodeLookup:B,nodeExtent:ue||H,nodeOrigin:W,onError:L});R=R||q.position.x!==ce.x||q.position.y!==ce.y,q.position=ce,q.internals.positionAbsolute=de}if(k=k||R,!!R&&(V(u,!0),v&&(r||G||!T&&O))){const[xe,q]=ay({nodeId:T,dragItems:u,nodeLookup:B});r==null||r(v,u,xe,q),G==null||G(v,xe,q),T||O==null||O(v,q)}}async function F(){if(!g)return;const{transform:K,panBy:Q,autoPanSpeed:B,autoPanOnNodeDrag:H}=t();if(!H){f=!1,cancelAnimationFrame(l);return}const[z,Y]=Rx(h,g,B);(z!==0||Y!==0)&&(o.x=(o.x??0)-z/K[2],o.y=(o.y??0)-Y/K[2],await Q({x:z,y:Y})&&I(o)),l=requestAnimationFrame(F)}function $(K){var se;const{nodeLookup:Q,multiSelectionActive:B,nodesDraggable:H,transform:z,snapGrid:Y,snapToGrid:W,selectNodesOnDrag:G,onNodeDragStart:O,onSelectionDragStart:L,unselectNodesAndEdges:V}=t();m=!0,(!G||!D)&&!B&&T&&((se=Q.get(T))!=null&&se.selected||V()),D&&G&&T&&(e==null||e(T));const R=hu(K.sourceEvent,{transform:z,snapGrid:Y,snapToGrid:W,containerBounds:g});if(o=R,u=SK(Q,H,R,T),u.size>0&&(n||O||!T&&L)){const[ge,ye]=ay({nodeId:T,dragItems:u,nodeLookup:Q});n==null||n(K.sourceEvent,u,ge,ye),O==null||O(K.sourceEvent,ge,ye),T||L==null||L(K.sourceEvent,ye)}}const U=BC().clickDistance(M).on("start",K=>{const{domNode:Q,nodeDragThreshold:B,transform:H,snapGrid:z,snapToGrid:Y}=t();g=(Q==null?void 0:Q.getBoundingClientRect())||null,b=!1,k=!1,v=K.sourceEvent,B===0&&$(K),o=hu(K.sourceEvent,{transform:H,snapGrid:z,snapToGrid:Y,containerBounds:g}),h=ci(K.sourceEvent,g)}).on("drag",K=>{const{autoPanOnNodeDrag:Q,transform:B,snapGrid:H,snapToGrid:z,nodeDragThreshold:Y,nodeLookup:W}=t(),G=hu(K.sourceEvent,{transform:B,snapGrid:H,snapToGrid:z,containerBounds:g});if(v=K.sourceEvent,(K.sourceEvent.type==="touchmove"&&K.sourceEvent.touches.length>1||T&&!W.has(T))&&(b=!0),!b){if(!f&&Q&&m&&(f=!0,F()),!m){const O=ci(K.sourceEvent,g),L=O.x-h.x,V=O.y-h.y;Math.sqrt(L*L+V*V)>Y&&$(K)}(o.x!==G.xSnapped||o.y!==G.ySnapped)&&u&&m&&(h=ci(K.sourceEvent,g),I(G))}}).on("end",K=>{if(!m||b){b&&u.size>0&&t().updateNodePositions(u,!1);return}if(f=!1,m=!1,cancelAnimationFrame(l),u.size>0){const{nodeLookup:Q,updateNodePositions:B,onNodeDragStop:H,onSelectionDragStop:z}=t();if(k&&(B(u,!1),k=!1),a||H||!T&&z){const[Y,W]=ay({nodeId:T,dragItems:u,nodeLookup:Q,dragging:!1});a==null||a(K.sourceEvent,u,Y,W),H==null||H(K.sourceEvent,Y,W),T||z==null||z(K.sourceEvent,W)}}}).filter(K=>{const Q=K.target;return!K.button&&(!C||!YE(Q,`.${C}`,_))&&(!N||YE(Q,N,_))});y.call(U)}function E(){y==null||y.on(".drag",null)}return{update:S,destroy:E}}function CK(e,t,n){const r=[],a={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(const o of t.values())jh(a,Mu(o))>0&&r.push(o);return r}const jK=250;function AK(e,t,n,r){var u,f;let a=[],o=1/0;const l=CK(e,n,t+jK);for(const h of l){const g=[...((u=h.internals.handleBounds)==null?void 0:u.source)??[],...((f=h.internals.handleBounds)==null?void 0:f.target)??[]];for(const m of g){if(r.nodeId===m.nodeId&&r.type===m.type&&r.id===m.id)continue;const{x:y,y:b}=po(h,m,m.position,!0),k=Math.sqrt(Math.pow(y-e.x,2)+Math.pow(b-e.y,2));k>t||(k<o?(a=[{...m,x:y,y:b}],o=k):k===o&&a.push({...m,x:y,y:b}))}}if(!a.length)return null;if(a.length>1){const h=r.type==="source"?"target":"source";return a.find(g=>g.type===h)??a[0]}return a[0]}function Sj(e,t,n,r,a,o=!1){var h,g,m;const l=r.get(e);if(!l)return null;const u=a==="strict"?(h=l.internals.handleBounds)==null?void 0:h[t]:[...((g=l.internals.handleBounds)==null?void 0:g.source)??[],...((m=l.internals.handleBounds)==null?void 0:m.target)??[]],f=(n?u==null?void 0:u.find(y=>y.id===n):u==null?void 0:u[0])??null;return f&&o?{...f,...po(l,f,f.position,!0)}:f}function Nj(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function TK(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}const _j=()=>!0;function MK(e,{connectionMode:t,connectionRadius:n,handleId:r,nodeId:a,edgeUpdaterType:o,isTarget:l,domNode:u,nodeLookup:f,lib:h,autoPanOnConnect:g,flowId:m,panBy:y,cancelConnection:b,onConnectStart:k,onConnect:v,onConnectEnd:S,isValidConnection:E=_j,onReconnectEnd:C,updateConnection:N,getTransform:_,getFromHandle:D,autoPanSpeed:T,dragThreshold:M=1,handleDomNode:I}){const F=hj(e.target);let $=0,U;const{x:K,y:Q}=ci(e),B=Nj(o,I),H=u==null?void 0:u.getBoundingClientRect();let z=!1;if(!H||!B)return;const Y=Sj(a,B,r,f,t);if(!Y)return;let W=ci(e,H),G=!1,O=null,L=!1,V=null;function R(){if(!g||!H)return;const[ce,de]=Rx(W,H,T);y({x:ce,y:de}),$=requestAnimationFrame(R)}const se={...Y,nodeId:a,type:B,position:Y.position},ge=f.get(a);let xe={inProgress:!0,isValid:null,from:po(ge,se,Ie.Left,!0),fromHandle:se,fromPosition:se.position,fromNode:ge,to:W,toHandle:null,toPosition:IE[se.position],toNode:null,pointer:W};function q(){z=!0,N(xe),k==null||k(e,{nodeId:a,handleId:r,handleType:B})}M===0&&q();function ne(ce){if(!z){const{x:ut,y:Bt}=ci(ce),sn=ut-K,cn=Bt-Q;if(!(sn*sn+cn*cn>M*M))return;q()}if(!D()||!se){ue(ce);return}const de=_();W=ci(ce,H),U=AK(rd(W,de,!1,[1,1]),n,f,se),G||(R(),G=!0);const be=Cj(ce,{handle:U,connectionMode:t,fromNodeId:a,fromHandleId:r,fromType:l?"target":"source",isValidConnection:E,doc:F,lib:h,flowId:m,nodeLookup:f});V=be.handleDomNode,O=be.connection,L=TK(!!U,be.isValid);const je=f.get(a),De=je?po(je,se,Ie.Left,!0):xe.from,we={...xe,from:De,isValid:L,to:be.toHandle&&L?$l({x:be.toHandle.x,y:be.toHandle.y},de):W,toHandle:be.toHandle,toPosition:L&&be.toHandle?be.toHandle.position:IE[se.position],toNode:be.toHandle?f.get(be.toHandle.nodeId):null,pointer:W};N(we),xe=we}function ue(ce){if(!("touches"in ce&&ce.touches.length>0)){if(z){(U||V)&&O&&L&&(v==null||v(O));const{inProgress:de,...be}=xe,je={...be,toPosition:xe.toHandle?xe.toPosition:null};S==null||S(ce,je),o&&(C==null||C(ce,je))}b(),cancelAnimationFrame($),G=!1,L=!1,O=null,V=null,F.removeEventListener("mousemove",ne),F.removeEventListener("mouseup",ue),F.removeEventListener("touchmove",ne),F.removeEventListener("touchend",ue)}}F.addEventListener("mousemove",ne),F.addEventListener("mouseup",ue),F.addEventListener("touchmove",ne),F.addEventListener("touchend",ue)}function Cj(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:a,fromType:o,doc:l,lib:u,flowId:f,isValidConnection:h=_j,nodeLookup:g}){const m=o==="target",y=t?l.querySelector(`.${u}-flow__handle[data-id="${f}-${t==null?void 0:t.nodeId}-${t==null?void 0:t.id}-${t==null?void 0:t.type}"]`):null,{x:b,y:k}=ci(e),v=l.elementFromPoint(b,k),S=v!=null&&v.classList.contains(`${u}-flow__handle`)?v:y,E={handleDomNode:S,isValid:!1,connection:null,toHandle:null};if(S){const C=Nj(void 0,S),N=S.getAttribute("data-nodeid"),_=S.getAttribute("data-handleid"),D=S.classList.contains("connectable"),T=S.classList.contains("connectableend");if(!N||!C)return E;const M={source:m?N:r,sourceHandle:m?_:a,target:m?r:N,targetHandle:m?a:_};E.connection=M;const F=D&&T&&(n===Bl.Strict?m&&C==="source"||!m&&C==="target":N!==r||_!==a);E.isValid=F&&h(M),E.toHandle=Sj(N,C,_,g,n,!0)}return E}const db={onPointerDown:MK,isValid:Cj};function DK({domNode:e,panZoom:t,getTransform:n,getViewScale:r}){const a=Sr(e);function o({translateExtent:u,width:f,height:h,zoomStep:g=1,pannable:m=!0,zoomable:y=!0,inversePan:b=!1}){const k=N=>{if(N.sourceEvent.type!=="wheel"||!t)return;const _=n(),D=N.sourceEvent.ctrlKey&&Du()?10:1,T=-N.sourceEvent.deltaY*(N.sourceEvent.deltaMode===1?.05:N.sourceEvent.deltaMode?1:.002)*g,M=_[2]*Math.pow(2,T*D);t.scaleTo(M)};let v=[0,0];const S=N=>{(N.sourceEvent.type==="mousedown"||N.sourceEvent.type==="touchstart")&&(v=[N.sourceEvent.clientX??N.sourceEvent.touches[0].clientX,N.sourceEvent.clientY??N.sourceEvent.touches[0].clientY])},E=N=>{const _=n();if(N.sourceEvent.type!=="mousemove"&&N.sourceEvent.type!=="touchmove"||!t)return;const D=[N.sourceEvent.clientX??N.sourceEvent.touches[0].clientX,N.sourceEvent.clientY??N.sourceEvent.touches[0].clientY],T=[D[0]-v[0],D[1]-v[1]];v=D;const M=r()*Math.max(_[2],Math.log(_[2]))*(b?-1:1),I={x:_[0]-T[0]*M,y:_[1]-T[1]*M},F=[[0,0],[f,h]];t.setViewportConstrained({x:I.x,y:I.y,zoom:_[2]},F,u)},C=ej().on("start",S).on("zoom",m?E:null).on("zoom.wheel",y?k:null);a.call(C,{})}function l(){a.on("zoom",null)}return{update:o,destroy:l,pointer:si}}const ap=e=>({x:e.x,y:e.y,zoom:e.k}),sy=({x:e,y:t,zoom:n})=>np.translate(e,t).scale(n),pl=(e,t)=>e.target.closest(`.${t}`),jj=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),OK=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,oy=(e,t=0,n=OK,r=()=>{})=>{const a=typeof t=="number"&&t>0;return a||r(),a?e.transition().duration(t).ease(n).on("end",r):e},Aj=e=>{const t=e.ctrlKey&&Du()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function RK({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:r,panOnScrollMode:a,panOnScrollSpeed:o,zoomOnPinch:l,onPanZoomStart:u,onPanZoom:f,onPanZoomEnd:h}){return g=>{if(pl(g,t))return g.ctrlKey&&g.preventDefault(),!1;g.preventDefault(),g.stopImmediatePropagation();const m=n.property("__zoom").k||1;if(g.ctrlKey&&l){const S=si(g),E=Aj(g),C=m*Math.pow(2,E);r.scaleTo(n,C,S,g);return}const y=g.deltaMode===1?20:1;let b=a===ao.Vertical?0:g.deltaX*y,k=a===ao.Horizontal?0:g.deltaY*y;!Du()&&g.shiftKey&&a!==ao.Vertical&&(b=g.deltaY*y,k=0),r.translateBy(n,-(b/m)*o,-(k/m)*o,{internal:!0});const v=ap(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(f==null||f(g,v),e.panScrollTimeout=setTimeout(()=>{h==null||h(g,v),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,u==null||u(g,v))}}function LK({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(r,a){const o=r.type==="wheel",l=!t&&o&&!r.ctrlKey,u=pl(r,e);if(r.ctrlKey&&o&&u&&r.preventDefault(),l||u)return null;r.preventDefault(),n.call(this,r,a)}}function IK({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return r=>{var o,l,u;if((o=r.sourceEvent)!=null&&o.internal)return;const a=ap(r.transform);e.mouseButton=((l=r.sourceEvent)==null?void 0:l.button)||0,e.isZoomingOrPanning=!0,e.prevViewport=a,((u=r.sourceEvent)==null?void 0:u.type)==="mousedown"&&t(!0),n&&(n==null||n(r.sourceEvent,a))}}function zK({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:r,onPanZoom:a}){return o=>{var l,u;e.usedRightMouseButton=!!(n&&jj(t,e.mouseButton??0)),(l=o.sourceEvent)!=null&&l.sync||r([o.transform.x,o.transform.y,o.transform.k]),a&&!((u=o.sourceEvent)!=null&&u.internal)&&(a==null||a(o.sourceEvent,ap(o.transform)))}}function PK({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:r,onPanZoomEnd:a,onPaneContextMenu:o}){return l=>{var u;if(!((u=l.sourceEvent)!=null&&u.internal)&&(e.isZoomingOrPanning=!1,o&&jj(t,e.mouseButton??0)&&!e.usedRightMouseButton&&l.sourceEvent&&o(l.sourceEvent),e.usedRightMouseButton=!1,r(!1),a)){const f=ap(l.transform);e.prevViewport=f,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{a==null||a(l.sourceEvent,f)},n?150:0)}}}function BK({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:r,panOnScroll:a,zoomOnDoubleClick:o,userSelectionActive:l,noWheelClassName:u,noPanClassName:f,lib:h,connectionInProgress:g}){return m=>{var S;const y=e||t,b=n&&m.ctrlKey,k=m.type==="wheel";if(m.button===1&&m.type==="mousedown"&&(pl(m,`${h}-flow__node`)||pl(m,`${h}-flow__edge`)))return!0;if(!r&&!y&&!a&&!o&&!n||l||g&&!k||pl(m,u)&&k||pl(m,f)&&(!k||a&&k&&!e)||!n&&m.ctrlKey&&k)return!1;if(!n&&m.type==="touchstart"&&((S=m.touches)==null?void 0:S.length)>1)return m.preventDefault(),!1;if(!y&&!a&&!b&&k||!r&&(m.type==="mousedown"||m.type==="touchstart")||Array.isArray(r)&&!r.includes(m.button)&&m.type==="mousedown")return!1;const v=Array.isArray(r)&&r.includes(m.button)||!m.button||m.button<=1;return(!m.ctrlKey||k)&&v}}function UK({domNode:e,minZoom:t,maxZoom:n,translateExtent:r,viewport:a,onPanZoom:o,onPanZoomStart:l,onPanZoomEnd:u,onDraggingChange:f}){const h={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},g=e.getBoundingClientRect(),m=ej().scaleExtent([t,n]).translateExtent(r),y=Sr(e).call(m);C({x:a.x,y:a.y,zoom:Ul(a.zoom,t,n)},[[0,0],[g.width,g.height]],r);const b=y.on("wheel.zoom"),k=y.on("dblclick.zoom");m.wheelDelta(Aj);async function v(U,K){return y?new Promise(Q=>{m==null||m.interpolate((K==null?void 0:K.interpolate)==="linear"?fu:Zf).transform(oy(y,K==null?void 0:K.duration,K==null?void 0:K.ease,()=>Q(!0)),U)}):!1}function S({noWheelClassName:U,noPanClassName:K,onPaneContextMenu:Q,userSelectionActive:B,panOnScroll:H,panOnDrag:z,panOnScrollMode:Y,panOnScrollSpeed:W,preventScrolling:G,zoomOnPinch:O,zoomOnScroll:L,zoomOnDoubleClick:V,zoomActivationKeyPressed:R,lib:se,onTransformChange:ge,connectionInProgress:ye,paneClickDistance:xe,selectionOnDrag:q}){B&&!h.isZoomingOrPanning&&E();const ne=H&&!R&&!B;m.clickDistance(q?1/0:!li(xe)||xe<0?0:xe);const ue=ne?RK({zoomPanValues:h,noWheelClassName:U,d3Selection:y,d3Zoom:m,panOnScrollMode:Y,panOnScrollSpeed:W,zoomOnPinch:O,onPanZoomStart:l,onPanZoom:o,onPanZoomEnd:u}):LK({noWheelClassName:U,preventScrolling:G,d3ZoomHandler:b});y.on("wheel.zoom",ue,{passive:!1});const ce=IK({zoomPanValues:h,onDraggingChange:f,onPanZoomStart:l});m.on("start",ce);const de=zK({zoomPanValues:h,panOnDrag:z,onPaneContextMenu:!!Q,onPanZoom:o,onTransformChange:ge});m.on("zoom",de);const be=PK({zoomPanValues:h,panOnDrag:z,panOnScroll:H,onPaneContextMenu:Q,onPanZoomEnd:u,onDraggingChange:f});m.on("end",be);const je=BK({zoomActivationKeyPressed:R,panOnDrag:z,zoomOnScroll:L,panOnScroll:H,zoomOnDoubleClick:V,zoomOnPinch:O,userSelectionActive:B,noPanClassName:K,noWheelClassName:U,lib:se,connectionInProgress:ye});m.filter(je),V?y.on("dblclick.zoom",k):y.on("dblclick.zoom",null)}function E(){m.on("zoom",null)}async function C(U,K,Q){const B=sy(U),H=m==null?void 0:m.constrain()(B,K,Q);return H&&await v(H),H}async function N(U,K){const Q=sy(U);return await v(Q,K),Q}function _(U){if(y){const K=sy(U),Q=y.property("__zoom");(Q.k!==U.zoom||Q.x!==U.x||Q.y!==U.y)&&(m==null||m.transform(y,K,null,{sync:!0}))}}function D(){const U=y?JC(y.node()):{x:0,y:0,k:1};return{x:U.x,y:U.y,zoom:U.k}}async function T(U,K){return y?new Promise(Q=>{m==null||m.interpolate((K==null?void 0:K.interpolate)==="linear"?fu:Zf).scaleTo(oy(y,K==null?void 0:K.duration,K==null?void 0:K.ease,()=>Q(!0)),U)}):!1}async function M(U,K){return y?new Promise(Q=>{m==null||m.interpolate((K==null?void 0:K.interpolate)==="linear"?fu:Zf).scaleBy(oy(y,K==null?void 0:K.duration,K==null?void 0:K.ease,()=>Q(!0)),U)}):!1}function I(U){m==null||m.scaleExtent(U)}function F(U){m==null||m.translateExtent(U)}function $(U){const K=!li(U)||U<0?0:U;m==null||m.clickDistance(K)}return{update:S,destroy:E,setViewport:N,setViewportConstrained:C,getViewport:D,scaleTo:T,scaleBy:M,setScaleExtent:I,setTranslateExtent:F,syncViewport:_,setClickDistance:$}}var Fl;(function(e){e.Line="line",e.Handle="handle"})(Fl||(Fl={}));function $K({width:e,prevWidth:t,height:n,prevHeight:r,affectsX:a,affectsY:o}){const l=e-t,u=n-r,f=[l>0?1:l<0?-1:0,u>0?1:u<0?-1:0];return l&&a&&(f[0]=f[0]*-1),u&&o&&(f[1]=f[1]*-1),f}function QE(e){const t=e.includes("right")||e.includes("left"),n=e.includes("bottom")||e.includes("top"),r=e.includes("left"),a=e.includes("top");return{isHorizontal:t,isVertical:n,affectsX:r,affectsY:a}}function es(e,t){return Math.max(0,t-e)}function ts(e,t){return Math.max(0,e-t)}function Uf(e,t,n){return Math.max(0,t-e,e-n)}function WE(e,t){return e?!t:t}function FK(e,t,n,r,a,o,l,u){let{affectsX:f,affectsY:h}=t;const{isHorizontal:g,isVertical:m}=t,y=g&&m,{xSnapped:b,ySnapped:k}=n,{minWidth:v,maxWidth:S,minHeight:E,maxHeight:C}=r,{x:N,y:_,width:D,height:T,aspectRatio:M}=e;let I=Math.floor(g?b-e.pointerX:0),F=Math.floor(m?k-e.pointerY:0);const $=D+(f?-I:I),U=T+(h?-F:F),K=-o[0]*D,Q=-o[1]*T;let B=Uf($,v,S),H=Uf(U,E,C);if(l){let W=0,G=0;f&&I<0?W=es(N+I+K,l[0][0]):!f&&I>0&&(W=ts(N+$+K,l[1][0])),h&&F<0?G=es(_+F+Q,l[0][1]):!h&&F>0&&(G=ts(_+U+Q,l[1][1])),B=Math.max(B,W),H=Math.max(H,G)}if(u){let W=0,G=0;f&&I>0?W=ts(N+I,u[0][0]):!f&&I<0&&(W=es(N+$,u[1][0])),h&&F>0?G=ts(_+F,u[0][1]):!h&&F<0&&(G=es(_+U,u[1][1])),B=Math.max(B,W),H=Math.max(H,G)}if(a){if(g){const W=Uf($/M,E,C)*M;if(B=Math.max(B,W),l){let G=0;!f&&!h||f&&!h&&y?G=ts(_+Q+$/M,l[1][1])*M:G=es(_+Q+(f?I:-I)/M,l[0][1])*M,B=Math.max(B,G)}if(u){let G=0;!f&&!h||f&&!h&&y?G=es(_+$/M,u[1][1])*M:G=ts(_+(f?I:-I)/M,u[0][1])*M,B=Math.max(B,G)}}if(m){const W=Uf(U*M,v,S)/M;if(H=Math.max(H,W),l){let G=0;!f&&!h||h&&!f&&y?G=ts(N+U*M+K,l[1][0])/M:G=es(N+(h?F:-F)*M+K,l[0][0])/M,H=Math.max(H,G)}if(u){let G=0;!f&&!h||h&&!f&&y?G=es(N+U*M,u[1][0])/M:G=ts(N+(h?F:-F)*M,u[0][0])/M,H=Math.max(H,G)}}}F=F+(F<0?H:-H),I=I+(I<0?B:-B),a&&(y?$>U*M?F=(WE(f,h)?-I:I)/M:I=(WE(f,h)?-F:F)*M:g?(F=I/M,h=f):(I=F*M,f=h));const z=f?N+I:N,Y=h?_+F:_;return{width:D+(f?-I:I),height:T+(h?-F:F),x:o[0]*I*(f?-1:1)+z,y:o[1]*F*(h?-1:1)+Y}}const Tj={width:0,height:0,x:0,y:0},qK={...Tj,pointerX:0,pointerY:0,aspectRatio:1};function HK(e,t,n){const r=t.position.x+e.position.x,a=t.position.y+e.position.y,o=e.measured.width??0,l=e.measured.height??0,u=n[0]*o,f=n[1]*l;return[[r-u,a-f],[r+o-u,a+l-f]]}function KK({domNode:e,nodeId:t,getStoreItems:n,onChange:r,onEnd:a}){const o=Sr(e);let l={controlDirection:QE("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function u({controlPosition:h,boundaries:g,keepAspectRatio:m,resizeDirection:y,onResizeStart:b,onResize:k,onResizeEnd:v,shouldResize:S}){let E={...Tj},C={...qK};l={boundaries:g,resizeDirection:y,keepAspectRatio:m,controlDirection:QE(h)};let N,_=null,D=[],T,M,I,F=!1;const $=BC().on("start",U=>{const{nodeLookup:K,transform:Q,snapGrid:B,snapToGrid:H,nodeOrigin:z,paneDomNode:Y}=n();if(N=K.get(t),!N)return;_=(Y==null?void 0:Y.getBoundingClientRect())??null;const{xSnapped:W,ySnapped:G}=hu(U.sourceEvent,{transform:Q,snapGrid:B,snapToGrid:H,containerBounds:_});E={width:N.measured.width??0,height:N.measured.height??0,x:N.position.x??0,y:N.position.y??0},C={...E,pointerX:W,pointerY:G,aspectRatio:E.width/E.height},T=void 0,M=ho(N.extent)?N.extent:void 0,N.parentId&&(N.extent==="parent"||N.expandParent)&&(T=K.get(N.parentId)),T&&N.extent==="parent"&&(M=[[0,0],[T.measured.width,T.measured.height]]),D=[],I=void 0;for(const[O,L]of K)if(L.parentId===t&&(D.push({id:O,position:{...L.position},extent:L.extent}),L.extent==="parent"||L.expandParent)){const V=HK(L,N,L.origin??z);I?I=[[Math.min(V[0][0],I[0][0]),Math.min(V[0][1],I[0][1])],[Math.max(V[1][0],I[1][0]),Math.max(V[1][1],I[1][1])]]:I=V}b==null||b(U,{...E})}).on("drag",U=>{const{transform:K,snapGrid:Q,snapToGrid:B,nodeOrigin:H}=n(),z=hu(U.sourceEvent,{transform:K,snapGrid:Q,snapToGrid:B,containerBounds:_}),Y=[];if(!N)return;const{x:W,y:G,width:O,height:L}=E,V={},R=N.origin??H,{width:se,height:ge,x:ye,y:xe}=FK(C,l.controlDirection,z,l.boundaries,l.keepAspectRatio,R,M,I),q=se!==O,ne=ge!==L,ue=ye!==W&&q,ce=xe!==G&≠if(!ue&&!ce&&!q&&!ne)return;if((ue||ce||R[0]===1||R[1]===1)&&(V.x=ue?ye:E.x,V.y=ce?xe:E.y,E.x=V.x,E.y=V.y,D.length>0)){const De=ye-W,we=xe-G;for(const ut of D)ut.position={x:ut.position.x-De+R[0]*(se-O),y:ut.position.y-we+R[1]*(ge-L)},Y.push(ut)}if((q||ne)&&(V.width=q&&(!l.resizeDirection||l.resizeDirection==="horizontal")?se:E.width,V.height=ne&&(!l.resizeDirection||l.resizeDirection==="vertical")?ge:E.height,E.width=V.width,E.height=V.height),T&&N.expandParent){const De=R[0]*(V.width??0);V.x&&V.x<De&&(E.x=De,C.x=C.x-(V.x-De));const we=R[1]*(V.height??0);V.y&&V.y<we&&(E.y=we,C.y=C.y-(V.y-we))}const de=$K({width:E.width,prevWidth:O,height:E.height,prevHeight:L,affectsX:l.controlDirection.affectsX,affectsY:l.controlDirection.affectsY}),be={...E,direction:de};(S==null?void 0:S(U,be))!==!1&&(F=!0,k==null||k(U,be),r(V,Y))}).on("end",U=>{F&&(v==null||v(U,{...E}),a==null||a({...E}),F=!1)});o.call($)}function f(){o.on(".drag",null)}return{update:u,destroy:f}}var ly={exports:{}},cy={},uy={exports:{}},dy={};/**
|
|
614
|
+
* @license React
|
|
615
|
+
* use-sync-external-store-shim.production.js
|
|
616
|
+
*
|
|
617
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
618
|
+
*
|
|
619
|
+
* This source code is licensed under the MIT license found in the
|
|
620
|
+
* LICENSE file in the root directory of this source tree.
|
|
621
|
+
*/var XE;function GK(){if(XE)return dy;XE=1;var e=Uu();function t(m,y){return m===y&&(m!==0||1/m===1/y)||m!==m&&y!==y}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,a=e.useEffect,o=e.useLayoutEffect,l=e.useDebugValue;function u(m,y){var b=y(),k=r({inst:{value:b,getSnapshot:y}}),v=k[0].inst,S=k[1];return o(function(){v.value=b,v.getSnapshot=y,f(v)&&S({inst:v})},[m,b,y]),a(function(){return f(v)&&S({inst:v}),m(function(){f(v)&&S({inst:v})})},[m]),l(b),b}function f(m){var y=m.getSnapshot;m=m.value;try{var b=y();return!n(m,b)}catch{return!0}}function h(m,y){return y()}var g=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:u;return dy.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:g,dy}var ZE;function VK(){return ZE||(ZE=1,uy.exports=GK()),uy.exports}/**
|
|
622
|
+
* @license React
|
|
623
|
+
* use-sync-external-store-shim/with-selector.production.js
|
|
624
|
+
*
|
|
625
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
626
|
+
*
|
|
627
|
+
* This source code is licensed under the MIT license found in the
|
|
628
|
+
* LICENSE file in the root directory of this source tree.
|
|
629
|
+
*/var JE;function YK(){if(JE)return cy;JE=1;var e=Uu(),t=VK();function n(h,g){return h===g&&(h!==0||1/h===1/g)||h!==h&&g!==g}var r=typeof Object.is=="function"?Object.is:n,a=t.useSyncExternalStore,o=e.useRef,l=e.useEffect,u=e.useMemo,f=e.useDebugValue;return cy.useSyncExternalStoreWithSelector=function(h,g,m,y,b){var k=o(null);if(k.current===null){var v={hasValue:!1,value:null};k.current=v}else v=k.current;k=u(function(){function E(T){if(!C){if(C=!0,N=T,T=y(T),b!==void 0&&v.hasValue){var M=v.value;if(b(M,T))return _=M}return _=T}if(M=_,r(N,T))return M;var I=y(T);return b!==void 0&&b(M,I)?(N=T,M):(N=T,_=I)}var C=!1,N,_,D=m===void 0?null:m;return[function(){return E(g())},D===null?void 0:function(){return E(D())}]},[g,m,y,b]);var S=a(h,k[0],k[1]);return l(function(){v.hasValue=!0,v.value=S},[S]),f(S),S},cy}var eS;function QK(){return eS||(eS=1,ly.exports=YK()),ly.exports}var WK=QK();const XK=Bu(WK),ZK={},tS=e=>{let t;const n=new Set,r=(g,m)=>{const y=typeof g=="function"?g(t):g;if(!Object.is(y,t)){const b=t;t=m??(typeof y!="object"||y===null)?y:Object.assign({},t,y),n.forEach(k=>k(t,b))}},a=()=>t,f={setState:r,getState:a,getInitialState:()=>h,subscribe:g=>(n.add(g),()=>n.delete(g)),destroy:()=>{(ZK?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},h=t=e(r,a,f);return f},JK=e=>e?tS(e):tS,{useDebugValue:eG}=NM,{useSyncExternalStoreWithSelector:tG}=XK,nG=e=>e;function Mj(e,t=nG,n){const r=tG(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return eG(r),r}const nS=(e,t)=>{const n=JK(e),r=(a,o=t)=>Mj(n,a,o);return Object.assign(r,n),r},rG=(e,t)=>e?nS(e,t):nS;function Gt(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[r,a]of e)if(!Object.is(a,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(const r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||!Object.is(e[r],t[r]))return!1;return!0}const sp=A.createContext(null),iG=sp.Provider,Dj=fi.error001("react");function mt(e,t){const n=A.useContext(sp);if(n===null)throw new Error(Dj);return Mj(n,e,t)}function Vt(){const e=A.useContext(sp);if(e===null)throw new Error(Dj);return A.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const rS={display:"none"},aG={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},Oj="react-flow__node-desc",Rj="react-flow__edge-desc",sG="react-flow__aria-live",oG=e=>e.ariaLiveMessage,lG=e=>e.ariaLabelConfig;function cG({rfId:e}){const t=mt(oG);return d.jsx("div",{id:`${sG}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:aG,children:t})}function uG({rfId:e,disableKeyboardA11y:t}){const n=mt(lG);return d.jsxs(d.Fragment,{children:[d.jsx("div",{id:`${Oj}-${e}`,style:rS,children:t?n["node.a11yDescription.default"]:n["node.a11yDescription.keyboardDisabled"]}),d.jsx("div",{id:`${Rj}-${e}`,style:rS,children:n["edge.a11yDescription.default"]}),!t&&d.jsx(cG,{rfId:e})]})}const op=A.forwardRef(({position:e="top-left",children:t,className:n,style:r,...a},o)=>{const l=`${e}`.split("-");return d.jsx("div",{className:yn(["react-flow__panel",n,...l]),style:r,ref:o,...a,children:t})});op.displayName="Panel";const iS="https://reactflow.dev?utm_source=attribution";function dG({proOptions:e,position:t="bottom-right"}){return e!=null&&e.hideAttribution?null:d.jsx(op,{position:t,className:"react-flow__attribution","data-message":`Please only hide this attribution when you are subscribed to React Flow Pro: ${iS}`,children:d.jsx("a",{href:iS,target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const fG=e=>{const t=[],n=[];for(const[,r]of e.nodeLookup)r.selected&&t.push(r.internals.userNode);for(const[,r]of e.edgeLookup)r.selected&&n.push(r);return{selectedNodes:t,selectedEdges:n}},$f=e=>e.id;function hG(e,t){return Gt(e.selectedNodes.map($f),t.selectedNodes.map($f))&&Gt(e.selectedEdges.map($f),t.selectedEdges.map($f))}function pG({onSelectionChange:e}){const t=Vt(),{selectedNodes:n,selectedEdges:r}=mt(fG,hG);return A.useEffect(()=>{const a={nodes:n,edges:r};e==null||e(a),t.getState().onSelectionChangeHandlers.forEach(o=>o(a))},[n,r,e]),null}const mG=e=>!!e.onSelectionChangeHandlers;function gG({onSelectionChange:e}){const t=mt(mG);return e||t?d.jsx(pG,{onSelectionChange:e}):null}const Lj=[0,0],yG={x:0,y:0,zoom:1},bG=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","autoPanOnNodeFocus","nodesConnectable","nodesFocusable","edgesFocusable","edgesReconnectable","elevateNodesOnSelect","elevateEdgesOnSelect","minZoom","maxZoom","nodeExtent","onNodesChange","onEdgesChange","elementsSelectable","connectionMode","snapGrid","snapToGrid","translateExtent","connectOnClick","defaultEdgeOptions","fitView","fitViewOptions","onNodesDelete","onEdgesDelete","onDelete","onNodeDrag","onNodeDragStart","onNodeDragStop","onSelectionDrag","onSelectionDragStart","onSelectionDragStop","onMoveStart","onMove","onMoveEnd","noPanClassName","nodeOrigin","autoPanOnConnect","autoPanOnNodeDrag","onError","connectionRadius","isValidConnection","selectNodesOnDrag","nodeDragThreshold","connectionDragThreshold","onBeforeDelete","debug","autoPanSpeed","ariaLabelConfig","zIndexMode"],aS=[...bG,"rfId"],xG=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges}),sS={translateExtent:Au,nodeOrigin:Lj,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function vG(e){const{setNodes:t,setEdges:n,setMinZoom:r,setMaxZoom:a,setTranslateExtent:o,setNodeExtent:l,reset:u,setDefaultNodesAndEdges:f}=mt(xG,Gt),h=Vt();A.useEffect(()=>(f(e.defaultNodes,e.defaultEdges),()=>{g.current=sS,u()}),[]);const g=A.useRef(sS);return A.useEffect(()=>{for(const m of aS){const y=e[m],b=g.current[m];y!==b&&(typeof e[m]>"u"||(m==="nodes"?t(y):m==="edges"?n(y):m==="minZoom"?r(y):m==="maxZoom"?a(y):m==="translateExtent"?o(y):m==="nodeExtent"?l(y):m==="ariaLabelConfig"?h.setState({ariaLabelConfig:iK(y)}):m==="fitView"?h.setState({fitViewQueued:y}):m==="fitViewOptions"?h.setState({fitViewOptions:y}):h.setState({[m]:y})))}g.current=e},aS.map(m=>e[m])),null}function oS(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function wG(e){var r;const[t,n]=A.useState(e==="system"?null:e);return A.useEffect(()=>{if(e!=="system"){n(e);return}const a=oS(),o=()=>n(a!=null&&a.matches?"dark":"light");return o(),a==null||a.addEventListener("change",o),()=>{a==null||a.removeEventListener("change",o)}},[e]),t!==null?t:(r=oS())!=null&&r.matches?"dark":"light"}const lS=typeof document<"u"?document:null;function Ou(e=null,t={target:lS,actInsideInputWithModifier:!0}){const[n,r]=A.useState(!1),a=A.useRef(!1),o=A.useRef(new Set([])),[l,u]=A.useMemo(()=>{if(e!==null){const h=(Array.isArray(e)?e:[e]).filter(m=>typeof m=="string").map(m=>m.replace("+",`
|
|
630
|
+
`).replace(`
|
|
631
|
+
|
|
632
|
+
`,`
|
|
633
|
+
+`).split(`
|
|
634
|
+
`)),g=h.reduce((m,y)=>m.concat(...y),[]);return[h,g]}return[[],[]]},[e]);return A.useEffect(()=>{const f=(t==null?void 0:t.target)??lS,h=(t==null?void 0:t.actInsideInputWithModifier)??!0;if(e!==null){const g=b=>{var S,E;if(a.current=b.ctrlKey||b.metaKey||b.shiftKey||b.altKey,(!a.current||a.current&&!h)&&pj(b))return!1;const v=uS(b.code,u);if(o.current.add(b[v]),cS(l,o.current,!1)){const C=((E=(S=b.composedPath)==null?void 0:S.call(b))==null?void 0:E[0])||b.target,N=(C==null?void 0:C.nodeName)==="BUTTON"||(C==null?void 0:C.nodeName)==="A";t.preventDefault!==!1&&(a.current||!N)&&b.preventDefault(),r(!0)}},m=b=>{const k=uS(b.code,u);cS(l,o.current,!0)?(r(!1),o.current.clear()):o.current.delete(b[k]),b.key==="Meta"&&o.current.clear(),a.current=!1},y=()=>{o.current.clear(),r(!1)};return f==null||f.addEventListener("keydown",g),f==null||f.addEventListener("keyup",m),window.addEventListener("blur",y),window.addEventListener("contextmenu",y),()=>{f==null||f.removeEventListener("keydown",g),f==null||f.removeEventListener("keyup",m),window.removeEventListener("blur",y),window.removeEventListener("contextmenu",y)}}},[e,r]),n}function cS(e,t,n){return e.filter(r=>n||r.length===t.size).some(r=>r.every(a=>t.has(a)))}function uS(e,t){return t.includes(e)?"code":"key"}const kG=()=>{const e=Vt();return A.useMemo(()=>({zoomIn:async t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1.2,t):!1},zoomOut:async t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,t):!1},zoomTo:async(t,n)=>{const{panZoom:r}=e.getState();return r?r.scaleTo(t,n):!1},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{const{transform:[r,a,o],panZoom:l}=e.getState();return l?(await l.setViewport({x:t.x??r,y:t.y??a,zoom:t.zoom??o},n),!0):!1},getViewport:()=>{const[t,n,r]=e.getState().transform;return{x:t,y:n,zoom:r}},setCenter:async(t,n,r)=>e.getState().setCenter(t,n,r),fitBounds:async(t,n)=>{const{width:r,height:a,minZoom:o,maxZoom:l,panZoom:u}=e.getState(),f=Lx(t,r,a,o,l,(n==null?void 0:n.padding)??.1);return u?(await u.setViewport(f,{duration:n==null?void 0:n.duration,ease:n==null?void 0:n.ease,interpolate:n==null?void 0:n.interpolate}),!0):!1},screenToFlowPosition:(t,n={})=>{const{transform:r,snapGrid:a,snapToGrid:o,domNode:l}=e.getState();if(!l)return t;const{x:u,y:f}=l.getBoundingClientRect(),h={x:t.x-u,y:t.y-f},g=n.snapGrid??a,m=n.snapToGrid??o;return rd(h,r,m,g)},flowToScreenPosition:t=>{const{transform:n,domNode:r}=e.getState();if(!r)return t;const{x:a,y:o}=r.getBoundingClientRect(),l=$l(t,n);return{x:l.x+a,y:l.y+o}}}),[])};function Ij(e,t){const n=[],r=new Map,a=[];for(const o of e)if(o.type==="add"){a.push(o);continue}else if(o.type==="remove"||o.type==="replace")r.set(o.id,[o]);else{const l=r.get(o.id);l?l.push(o):r.set(o.id,[o])}for(const o of t){const l=r.get(o.id);if(!l){n.push(o);continue}if(l[0].type==="remove")continue;if(l[0].type==="replace"){n.push({...l[0].item});continue}const u={...o};for(const f of l)EG(f,u);n.push(u)}return a.length&&a.forEach(o=>{o.index!==void 0?n.splice(o.index,0,{...o.item}):n.push({...o.item})}),n}function EG(e,t){switch(e.type){case"select":{t.selected=e.selected;break}case"position":{typeof e.position<"u"&&(t.position=e.position),typeof e.dragging<"u"&&(t.dragging=e.dragging);break}case"dimensions":{typeof e.dimensions<"u"&&(t.measured={...e.dimensions},e.setAttributes&&((e.setAttributes===!0||e.setAttributes==="width")&&(t.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes==="height")&&(t.height=e.dimensions.height))),typeof e.resizing=="boolean"&&(t.resizing=e.resizing);break}}}function zj(e,t){return Ij(e,t)}function Pj(e,t){return Ij(e,t)}function qs(e,t){return{id:e,type:"select",selected:t}}function ml(e,t=new Set,n=!1){const r=[];for(const[a,o]of e){const l=t.has(a);!(o.selected===void 0&&!l)&&o.selected!==l&&(n&&(o.selected=l),r.push(qs(o.id,l)))}return r}function dS({items:e=[],lookup:t}){var a;const n=[],r=new Map(e.map(o=>[o.id,o]));for(const[o,l]of e.entries()){const u=t.get(l.id),f=((a=u==null?void 0:u.internals)==null?void 0:a.userNode)??u;f!==void 0&&f!==l&&n.push({id:l.id,item:l,type:"replace"}),f===void 0&&n.push({item:l,type:"add",index:o})}for(const[o]of t)r.get(o)===void 0&&n.push({id:o,type:"remove"});return n}function fS(e){return{id:e.id,type:"remove"}}const SG=uj();function NG(e,t,n={}){return uK(e,t,{...n,onError:n.onError??SG})}const hS=e=>Q7(e),_G=e=>aj(e);function Bj(e){return A.forwardRef(e)}const CG=typeof window<"u"?A.useLayoutEffect:A.useEffect;function pS(e){const[t,n]=A.useState(BigInt(0)),[r]=A.useState(()=>jG(()=>n(a=>a+BigInt(1))));return CG(()=>{const a=r.get();a.length&&(e(a),r.reset())},[t]),r}function jG(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}const Uj=A.createContext(null);function AG({children:e}){const t=Vt(),n=A.useCallback(u=>{const{nodes:f=[],setNodes:h,hasDefaultNodes:g,onNodesChange:m,nodeLookup:y,fitViewQueued:b,onNodesChangeMiddlewareMap:k}=t.getState();let v=f;for(const E of u)v=typeof E=="function"?E(v):E;let S=dS({items:v,lookup:y});for(const E of k.values())S=E(S);g&&h(v),S.length>0?m==null||m(S):b&&window.requestAnimationFrame(()=>{const{fitViewQueued:E,nodes:C,setNodes:N}=t.getState();E&&N(C)})},[]),r=pS(n),a=A.useCallback(u=>{const{edges:f=[],setEdges:h,hasDefaultEdges:g,onEdgesChange:m,edgeLookup:y}=t.getState();let b=f;for(const k of u)b=typeof k=="function"?k(b):k;g?h(b):m&&m(dS({items:b,lookup:y}))},[]),o=pS(a),l=A.useMemo(()=>({nodeQueue:r,edgeQueue:o}),[]);return d.jsx(Uj.Provider,{value:l,children:e})}function TG(){const e=A.useContext(Uj);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const MG=e=>!!e.panZoom;function lp(){const e=kG(),t=Vt(),n=TG(),r=mt(MG),a=A.useMemo(()=>{const o=m=>t.getState().nodeLookup.get(m),l=m=>{n.nodeQueue.push(m)},u=m=>{n.edgeQueue.push(m)},f=m=>{var E,C;const{nodeLookup:y,nodeOrigin:b}=t.getState(),k=hS(m)?m:y.get(m.id),v=k.parentId?fj(k.position,k.measured,k.parentId,y,b):k.position,S={...k,position:v,width:((E=k.measured)==null?void 0:E.width)??k.width,height:((C=k.measured)==null?void 0:C.height)??k.height};return Mu(S)},h=(m,y,b={replace:!1})=>{l(k=>k.map(v=>{if(v.id===m){const S=typeof y=="function"?y(v):y;return b.replace&&hS(S)?S:{...v,...S}}return v}))},g=(m,y,b={replace:!1})=>{u(k=>k.map(v=>{if(v.id===m){const S=typeof y=="function"?y(v):y;return b.replace&&_G(S)?S:{...v,...S}}return v}))};return{getNodes:()=>t.getState().nodes.map(m=>({...m})),getNode:m=>{var y;return(y=o(m))==null?void 0:y.internals.userNode},getInternalNode:o,getEdges:()=>{const{edges:m=[]}=t.getState();return m.map(y=>({...y}))},getEdge:m=>t.getState().edgeLookup.get(m),setNodes:l,setEdges:u,addNodes:m=>{const y=Array.isArray(m)?m:[m];n.nodeQueue.push(b=>[...b,...y])},addEdges:m=>{const y=Array.isArray(m)?m:[m];n.edgeQueue.push(b=>[...b,...y])},toObject:()=>{const{nodes:m=[],edges:y=[],transform:b}=t.getState(),[k,v,S]=b;return{nodes:m.map(E=>({...E})),edges:y.map(E=>({...E})),viewport:{x:k,y:v,zoom:S}}},deleteElements:async({nodes:m=[],edges:y=[]})=>{const{nodes:b,edges:k,onNodesDelete:v,onEdgesDelete:S,triggerNodeChanges:E,triggerEdgeChanges:C,onDelete:N,onBeforeDelete:_}=t.getState(),{nodes:D,edges:T}=await eK({nodesToRemove:m,edgesToRemove:y,nodes:b,edges:k,onBeforeDelete:_}),M=T.length>0,I=D.length>0;if(M){const F=T.map(fS);S==null||S(T),C(F)}if(I){const F=D.map(fS);v==null||v(D),E(F)}return(I||M)&&(N==null||N({nodes:D,edges:T})),{deletedNodes:D,deletedEdges:T}},getIntersectingNodes:(m,y=!0,b)=>{const k=PE(m),v=k?m:f(m),S=b!==void 0;return v?(b||t.getState().nodes).filter(E=>{const C=t.getState().nodeLookup.get(E.id);if(C&&!k&&(E.id===m.id||!C.internals.positionAbsolute))return!1;const N=Mu(S?E:C),_=jh(N,v);return y&&_>0||_>=N.width*N.height||_>=v.width*v.height}):[]},isNodeIntersecting:(m,y,b=!0)=>{const v=PE(m)?m:f(m);if(!v)return!1;const S=jh(v,y);return b&&S>0||S>=y.width*y.height||S>=v.width*v.height},updateNode:h,updateNodeData:(m,y,b={replace:!1})=>{h(m,k=>{const v=typeof y=="function"?y(k):y;return b.replace?{...k,data:v}:{...k,data:{...k.data,...v}}},b)},updateEdge:g,updateEdgeData:(m,y,b={replace:!1})=>{g(m,k=>{const v=typeof y=="function"?y(k):y;return b.replace?{...k,data:v}:{...k,data:{...k.data,...v}}},b)},getNodesBounds:m=>{const{nodeLookup:y,nodeOrigin:b}=t.getState();return W7(m,{nodeLookup:y,nodeOrigin:b})},getHandleConnections:({type:m,id:y,nodeId:b})=>{var k;return Array.from(((k=t.getState().connectionLookup.get(`${b}-${m}${y?`-${y}`:""}`))==null?void 0:k.values())??[])},getNodeConnections:({type:m,handleId:y,nodeId:b})=>{var k;return Array.from(((k=t.getState().connectionLookup.get(`${b}${m?y?`-${m}-${y}`:`-${m}`:""}`))==null?void 0:k.values())??[])},fitView:async m=>{const y=t.getState().fitViewResolver??rK();return t.setState({fitViewQueued:!0,fitViewOptions:m,fitViewResolver:y}),n.nodeQueue.push(b=>[...b]),y.promise}}},[]);return A.useMemo(()=>({...a,...e,viewportInitialized:r}),[r])}const mS=e=>e.selected,DG=typeof window<"u"?window:void 0;function OG({deleteKeyCode:e,multiSelectionKeyCode:t}){const n=Vt(),{deleteElements:r}=lp(),a=Ou(e,{actInsideInputWithModifier:!1}),o=Ou(t,{target:DG});A.useEffect(()=>{if(a){const{edges:l,nodes:u}=n.getState();r({nodes:u.filter(mS),edges:l.filter(mS)}),n.setState({nodesSelectionActive:!1})}},[a]),A.useEffect(()=>{n.setState({multiSelectionActive:o})},[o])}function RG(e){const t=Vt();A.useEffect(()=>{const n=()=>{var a,o,l,u;if(!e.current||!(((o=(a=e.current).checkVisibility)==null?void 0:o.call(a))??!0))return!1;const r=Ix(e.current);(r.height===0||r.width===0)&&((u=(l=t.getState()).onError)==null||u.call(l,"004",fi.error004())),t.setState({width:r.width||500,height:r.height||500})};if(e.current){n(),window.addEventListener("resize",n);const r=new ResizeObserver(()=>n());return r.observe(e.current),()=>{window.removeEventListener("resize",n),r&&e.current&&r.unobserve(e.current)}}},[])}const cp={position:"absolute",width:"100%",height:"100%",top:0,left:0},LG=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function IG({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:r=!1,panOnScrollSpeed:a=.5,panOnScrollMode:o=ao.Free,zoomOnDoubleClick:l=!0,panOnDrag:u=!0,defaultViewport:f,translateExtent:h,minZoom:g,maxZoom:m,zoomActivationKeyCode:y,preventScrolling:b=!0,children:k,noWheelClassName:v,noPanClassName:S,onViewportChange:E,isControlledViewport:C,paneClickDistance:N,selectionOnDrag:_}){const D=Vt(),T=A.useRef(null),{userSelectionActive:M,lib:I,connectionInProgress:F}=mt(LG,Gt),$=Ou(y),U=A.useRef();RG(T);const K=A.useCallback(Q=>{E==null||E({x:Q[0],y:Q[1],zoom:Q[2]}),C||D.setState({transform:Q})},[E,C]);return A.useEffect(()=>{if(T.current){U.current=UK({domNode:T.current,minZoom:g,maxZoom:m,translateExtent:h,viewport:f,onDraggingChange:z=>D.setState(Y=>Y.paneDragging===z?Y:{paneDragging:z}),onPanZoomStart:(z,Y)=>{const{onViewportChangeStart:W,onMoveStart:G}=D.getState();G==null||G(z,Y),W==null||W(Y)},onPanZoom:(z,Y)=>{const{onViewportChange:W,onMove:G}=D.getState();G==null||G(z,Y),W==null||W(Y)},onPanZoomEnd:(z,Y)=>{const{onViewportChangeEnd:W,onMoveEnd:G}=D.getState();G==null||G(z,Y),W==null||W(Y)}});const{x:Q,y:B,zoom:H}=U.current.getViewport();return D.setState({panZoom:U.current,transform:[Q,B,H],domNode:T.current.closest(".react-flow")}),()=>{var z;(z=U.current)==null||z.destroy()}}},[]),A.useEffect(()=>{var Q;(Q=U.current)==null||Q.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:r,panOnScrollSpeed:a,panOnScrollMode:o,zoomOnDoubleClick:l,panOnDrag:u,zoomActivationKeyPressed:$,preventScrolling:b,noPanClassName:S,userSelectionActive:M,noWheelClassName:v,lib:I,onTransformChange:K,connectionInProgress:F,selectionOnDrag:_,paneClickDistance:N})},[e,t,n,r,a,o,l,u,$,b,S,M,v,I,K,F,_,N]),d.jsx("div",{className:"react-flow__renderer",ref:T,style:cp,children:k})}const zG=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function PG(){const{userSelectionActive:e,userSelectionRect:t}=mt(zG,Gt);return e&&t?d.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}const fy=(e,t)=>n=>{n.target===t.current&&(e==null||e(n))},BG=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,dragging:e.paneDragging,panBy:e.panBy,autoPanSpeed:e.autoPanSpeed});function UG({isSelecting:e,selectionKeyPressed:t,selectionMode:n=Tu.Full,panOnDrag:r,autoPanOnSelection:a,paneClickDistance:o,selectionOnDrag:l,onSelectionStart:u,onSelectionEnd:f,onPaneClick:h,onPaneContextMenu:g,onPaneScroll:m,onPaneMouseEnter:y,onPaneMouseMove:b,onPaneMouseLeave:k,children:v}){const S=A.useRef(0),E=Vt(),{userSelectionActive:C,elementsSelectable:N,dragging:_,panBy:D,autoPanSpeed:T}=mt(BG,Gt),M=N&&(e||C),I=A.useRef(null),F=A.useRef(),$=A.useRef(new Set),U=A.useRef(new Set),K=A.useRef(!1),Q=A.useRef(!1),B=A.useRef({x:0,y:0}),H=A.useRef(!1),z=q=>{if(Q.current||K.current||E.getState().connection.inProgress){Q.current=!1,K.current=!1;return}h==null||h(q),E.getState().resetSelectedElements(),E.setState({nodesSelectionActive:!1})},Y=q=>{if(Array.isArray(r)&&(r!=null&&r.includes(2))){q.preventDefault();return}g==null||g(q)},W=m?q=>m(q):void 0,G=q=>{Q.current&&(q.stopPropagation(),Q.current=!1)},O=q=>{var ut,Bt;const{domNode:ne,transform:ue}=E.getState();if(F.current=ne==null?void 0:ne.getBoundingClientRect(),!F.current)return;const ce=q.target===I.current;if(!ce&&!!q.target.closest(".nokey")||!e||!(l&&ce||t)||q.button!==0||!q.isPrimary)return;(Bt=(ut=q.target)==null?void 0:ut.setPointerCapture)==null||Bt.call(ut,q.pointerId),Q.current=!1;const{x:je,y:De}=ci(q.nativeEvent,F.current),we=rd({x:je,y:De},ue);E.setState({userSelectionRect:{width:0,height:0,startX:we.x,startY:we.y,x:je,y:De}}),ce||(q.stopPropagation(),q.preventDefault())};function L(q,ne){const{userSelectionRect:ue}=E.getState();if(!ue)return;const{transform:ce,nodeLookup:de,edgeLookup:be,connectionLookup:je,triggerNodeChanges:De,triggerEdgeChanges:we,defaultEdgeOptions:ut}=E.getState(),Bt={x:ue.startX,y:ue.startY},{x:sn,y:cn}=$l(Bt,ce),An={startX:Bt.x,startY:Bt.y,x:q<sn?q:sn,y:ne<cn?ne:cn,width:Math.abs(q-sn),height:Math.abs(ne-cn)},Yr=$.current,Jn=U.current;$.current=new Set(Ox(de,An,ce,n===Tu.Partial,!0).map(kn=>kn.id)),U.current=new Set;const xt=(ut==null?void 0:ut.selectable)??!0;for(const kn of $.current){const le=je.get(kn);if(le)for(const{edgeId:ve}of le.values()){const ze=be.get(ve);ze&&(ze.selectable??xt)&&U.current.add(ve)}}if(!BE(Yr,$.current)){const kn=ml(de,$.current,!0);De(kn)}if(!BE(Jn,U.current)){const kn=ml(be,U.current);we(kn)}E.setState({userSelectionRect:An,userSelectionActive:!0,nodesSelectionActive:!1})}function V(){if(!a||!F.current)return;const[q,ne]=Rx(B.current,F.current,T);D({x:q,y:ne}).then(ue=>{if(!Q.current||!ue){S.current=requestAnimationFrame(V);return}const{x:ce,y:de}=B.current;L(ce,de),S.current=requestAnimationFrame(V)})}const R=()=>{cancelAnimationFrame(S.current),S.current=0,H.current=!1};A.useEffect(()=>()=>R(),[]);const se=q=>{const{userSelectionRect:ne,transform:ue,resetSelectedElements:ce}=E.getState();if(!F.current||!ne)return;const{x:de,y:be}=ci(q.nativeEvent,F.current);B.current={x:de,y:be};const je=$l({x:ne.startX,y:ne.startY},ue);if(!Q.current){const De=t?0:o;if(Math.hypot(de-je.x,be-je.y)<=De)return;ce(),u==null||u(q)}Q.current=!0,H.current||(V(),H.current=!0),L(de,be)},ge=q=>{var ne,ue;if(!M){q.target===I.current&&E.getState().connection.inProgress&&(K.current=!0);return}q.button===0&&((ue=(ne=q.target)==null?void 0:ne.releasePointerCapture)==null||ue.call(ne,q.pointerId),!C&&q.target===I.current&&E.getState().userSelectionRect&&(z==null||z(q)),E.setState({userSelectionActive:!1,userSelectionRect:null}),Q.current&&(f==null||f(q),E.setState({nodesSelectionActive:$.current.size>0})),R())},ye=q=>{var ne,ue;(ue=(ne=q.target)==null?void 0:ne.releasePointerCapture)==null||ue.call(ne,q.pointerId),R()},xe=r===!0||Array.isArray(r)&&r.includes(0);return d.jsxs("div",{className:yn(["react-flow__pane",{draggable:xe,dragging:_,selection:e}]),onClick:M?void 0:fy(z,I),onContextMenu:fy(Y,I),onWheel:fy(W,I),onPointerEnter:M?void 0:y,onPointerMove:M?se:b,onPointerUp:ge,onPointerCancel:M?ye:void 0,onPointerDownCapture:M?O:void 0,onClickCapture:M?G:void 0,onPointerLeave:k,ref:I,style:cp,children:[v,d.jsx(PG,{})]})}function fb({id:e,store:t,unselect:n=!1,nodeRef:r}){const{addSelectedNodes:a,unselectNodesAndEdges:o,multiSelectionActive:l,nodeLookup:u,onError:f}=t.getState(),h=u.get(e);if(!h){f==null||f("012",fi.error012(e));return}t.setState({nodesSelectionActive:!1}),h.selected?(n||h.selected&&l)&&(o({nodes:[h],edges:[]}),requestAnimationFrame(()=>{var g;return(g=r==null?void 0:r.current)==null?void 0:g.blur()})):a([e])}function $j({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:r,nodeId:a,isSelectable:o,nodeClickDistance:l}){const u=Vt(),[f,h]=A.useState(!1),g=A.useRef();return A.useEffect(()=>{g.current=_K({getStoreItems:()=>u.getState(),onNodeMouseDown:m=>{fb({id:m,store:u,nodeRef:e})},onDragStart:()=>{h(!0)},onDragStop:()=>{h(!1)}})},[]),A.useEffect(()=>{if(!(t||!e.current||!g.current))return g.current.update({noDragClassName:n,handleSelector:r,domNode:e.current,isSelectable:o,nodeId:a,nodeClickDistance:l}),()=>{var m;(m=g.current)==null||m.destroy()}},[n,r,t,o,e,a,l]),f}const $G=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function Fj(){const e=Vt();return A.useCallback(n=>{const{nodeExtent:r,snapToGrid:a,snapGrid:o,nodesDraggable:l,onError:u,updateNodePositions:f,nodeLookup:h,nodeOrigin:g}=e.getState(),m=new Map,y=$G(l),b=a?o[0]:5,k=a?o[1]:5,v=n.direction.x*b*n.factor,S=n.direction.y*k*n.factor;for(const[,E]of h){if(!y(E))continue;let C={x:E.internals.positionAbsolute.x+v,y:E.internals.positionAbsolute.y+S};a&&(C=nd(C,o));const{position:N,positionAbsolute:_}=sj({nodeId:E.id,nextPosition:C,nodeLookup:h,nodeExtent:r,nodeOrigin:g,onError:u});E.position=N,E.internals.positionAbsolute=_,m.set(E.id,E)}f(m)},[])}const Fx=A.createContext(null),FG=Fx.Provider;Fx.Consumer;const qj=()=>A.useContext(Fx),qG=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),Hj=A.createContext(null);function HG({children:e}){const t=mt(qG,Gt);return d.jsx(Hj.Provider,{value:t,children:e})}function KG(){const e=A.useContext(Hj);if(!e)throw new Error("useHandleConfig must be used within a HandleConfigProvider");return e}const GG={connectingFrom:!1,connectingTo:!1,clickConnecting:!1,isPossibleEndHandle:!0,connectionInProcess:!1,clickConnectionInProcess:!1,valid:!1},VG=(e,t,n)=>r=>{const{connectionClickStartHandle:a,connectionMode:o,connection:l}=r,{fromHandle:u,toHandle:f,isValid:h}=l;if(!u&&!a)return GG;const g=(f==null?void 0:f.nodeId)===e&&(f==null?void 0:f.id)===t&&(f==null?void 0:f.type)===n;return{connectingFrom:(u==null?void 0:u.nodeId)===e&&(u==null?void 0:u.id)===t&&(u==null?void 0:u.type)===n,connectingTo:g,clickConnecting:(a==null?void 0:a.nodeId)===e&&(a==null?void 0:a.id)===t&&(a==null?void 0:a.type)===n,isPossibleEndHandle:o===Bl.Strict?(u==null?void 0:u.type)!==n:e!==(u==null?void 0:u.nodeId)||t!==(u==null?void 0:u.id),connectionInProcess:!!u,clickConnectionInProcess:!!a,valid:g&&h}};function YG({type:e="source",position:t=Ie.Top,isValidConnection:n,isConnectable:r=!0,isConnectableStart:a=!0,isConnectableEnd:o=!0,id:l,onConnect:u,children:f,className:h,onMouseDown:g,onTouchStart:m,...y},b){var H,z;const k=l||null,v=e==="target",S=Vt(),E=qj(),{connectOnClick:C,noPanClassName:N,rfId:_}=KG(),{connectingFrom:D,connectingTo:T,clickConnecting:M,isPossibleEndHandle:I,connectionInProcess:F,clickConnectionInProcess:$,valid:U}=mt(VG(E,k,e),Gt);E||(z=(H=S.getState()).onError)==null||z.call(H,"010",fi.error010());const K=Y=>{const{defaultEdgeOptions:W,onConnect:G,hasDefaultEdges:O}=S.getState(),L={...W,...Y};if(O){const{edges:V,setEdges:R,onError:se}=S.getState();R(NG(L,V,{onError:se}))}G==null||G(L),u==null||u(L)},Q=Y=>{if(!E)return;const W=mj(Y.nativeEvent);if(a&&(W&&Y.button===0||!W)){const G=S.getState();db.onPointerDown(Y.nativeEvent,{handleDomNode:Y.currentTarget,autoPanOnConnect:G.autoPanOnConnect,connectionMode:G.connectionMode,connectionRadius:G.connectionRadius,domNode:G.domNode,nodeLookup:G.nodeLookup,lib:G.lib,isTarget:v,handleId:k,nodeId:E,flowId:G.rfId,panBy:G.panBy,cancelConnection:G.cancelConnection,onConnectStart:G.onConnectStart,onConnectEnd:(...O)=>{var L,V;return(V=(L=S.getState()).onConnectEnd)==null?void 0:V.call(L,...O)},updateConnection:G.updateConnection,onConnect:K,isValidConnection:n||((...O)=>{var L,V;return((V=(L=S.getState()).isValidConnection)==null?void 0:V.call(L,...O))??!0}),getTransform:()=>S.getState().transform,getFromHandle:()=>S.getState().connection.fromHandle,autoPanSpeed:G.autoPanSpeed,dragThreshold:G.connectionDragThreshold})}W?g==null||g(Y):m==null||m(Y)},B=Y=>{const{onClickConnectStart:W,onClickConnectEnd:G,connectionClickStartHandle:O,connectionMode:L,isValidConnection:V,lib:R,rfId:se,nodeLookup:ge,connection:ye}=S.getState();if(!E||!O&&!a)return;if(!O){W==null||W(Y.nativeEvent,{nodeId:E,handleId:k,handleType:e}),S.setState({connectionClickStartHandle:{nodeId:E,type:e,id:k}});return}const xe=hj(Y.target),q=n||V,{connection:ne,isValid:ue}=db.isValid(Y.nativeEvent,{handle:{nodeId:E,id:k,type:e},connectionMode:L,fromNodeId:O.nodeId,fromHandleId:O.id||null,fromType:O.type,isValidConnection:q,flowId:se,doc:xe,lib:R,nodeLookup:ge});ue&&ne&&K(ne);const ce=structuredClone(ye);delete ce.inProgress,ce.toPosition=ce.toHandle?ce.toHandle.position:null,G==null||G(Y,ce),S.setState({connectionClickStartHandle:null})};return d.jsx("div",{"data-handleid":k,"data-nodeid":E,"data-handlepos":t,"data-id":`${_}-${E}-${k}-${e}`,className:yn(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",N,h,{source:!v,target:v,connectable:r,connectablestart:a,connectableend:o,clickconnecting:M,connectingfrom:D,connectingto:T,valid:U,connectionindicator:r&&(!F||I)&&(F||$?o:a)}]),onMouseDown:Q,onTouchStart:Q,onClick:C?B:void 0,ref:b,...y,children:f})}const ji=A.memo(Bj(YG));function QG({data:e,isConnectable:t,sourcePosition:n=Ie.Bottom}){return d.jsxs(d.Fragment,{children:[e==null?void 0:e.label,d.jsx(ji,{type:"source",position:n,isConnectable:t})]})}function WG({data:e,isConnectable:t,targetPosition:n=Ie.Top,sourcePosition:r=Ie.Bottom}){return d.jsxs(d.Fragment,{children:[d.jsx(ji,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label,d.jsx(ji,{type:"source",position:r,isConnectable:t})]})}function XG(){return null}function ZG({data:e,isConnectable:t,targetPosition:n=Ie.Top}){return d.jsxs(d.Fragment,{children:[d.jsx(ji,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label]})}const Ah={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},gS={input:QG,default:WG,output:ZG,group:XG};function JG(e){var t,n,r,a;return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??((t=e.style)==null?void 0:t.width),height:e.height??e.initialHeight??((n=e.style)==null?void 0:n.height)}:{width:e.width??((r=e.style)==null?void 0:r.width),height:e.height??((a=e.style)==null?void 0:a.height)}}const eV=e=>{const{width:t,height:n,x:r,y:a}=td(e.nodeLookup,{filter:o=>!!o.selected});return{width:li(t)?t:null,height:li(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${r}px,${a}px)`}};function tV({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const r=Vt(),{width:a,height:o,transformString:l,userSelectionActive:u}=mt(eV,Gt),f=Fj(),h=A.useRef(null);A.useEffect(()=>{var b;n||(b=h.current)==null||b.focus({preventScroll:!0})},[n]);const g=!u&&a!==null&&o!==null;if($j({nodeRef:h,disabled:!g}),!g)return null;const m=e?b=>{const k=r.getState().nodes.filter(v=>v.selected);e(b,k)}:void 0,y=b=>{Object.prototype.hasOwnProperty.call(Ah,b.key)&&(b.preventDefault(),f({direction:Ah[b.key],factor:b.shiftKey?4:1}))};return d.jsx("div",{className:yn(["react-flow__nodesselection","react-flow__container",t]),style:{transform:l},children:d.jsx("div",{ref:h,className:"react-flow__nodesselection-rect",onContextMenu:m,tabIndex:n?void 0:-1,onKeyDown:n?void 0:y,style:{width:a,height:o}})})}const yS=typeof window<"u"?window:void 0,nV=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function Kj({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:a,onPaneContextMenu:o,onPaneScroll:l,paneClickDistance:u,deleteKeyCode:f,selectionKeyCode:h,selectionOnDrag:g,selectionMode:m,onSelectionStart:y,onSelectionEnd:b,multiSelectionKeyCode:k,panActivationKeyCode:v,zoomActivationKeyCode:S,elementsSelectable:E,zoomOnScroll:C,zoomOnPinch:N,panOnScroll:_,panOnScrollSpeed:D,panOnScrollMode:T,zoomOnDoubleClick:M,panOnDrag:I,autoPanOnSelection:F,defaultViewport:$,translateExtent:U,minZoom:K,maxZoom:Q,preventScrolling:B,onSelectionContextMenu:H,noWheelClassName:z,noPanClassName:Y,disableKeyboardA11y:W,onViewportChange:G,isControlledViewport:O}){const{nodesSelectionActive:L,userSelectionActive:V}=mt(nV,Gt),R=Ou(h,{target:yS}),se=Ou(v,{target:yS}),ge=se||I,ye=se||_,xe=g&&ge!==!0,q=R||V||xe;return OG({deleteKeyCode:f,multiSelectionKeyCode:k}),d.jsx(IG,{onPaneContextMenu:o,elementsSelectable:E,zoomOnScroll:C,zoomOnPinch:N,panOnScroll:ye,panOnScrollSpeed:D,panOnScrollMode:T,zoomOnDoubleClick:M,panOnDrag:!R&&ge,defaultViewport:$,translateExtent:U,minZoom:K,maxZoom:Q,zoomActivationKeyCode:S,preventScrolling:B,noWheelClassName:z,noPanClassName:Y,onViewportChange:G,isControlledViewport:O,paneClickDistance:u,selectionOnDrag:xe,children:d.jsxs(UG,{onSelectionStart:y,onSelectionEnd:b,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:a,onPaneContextMenu:o,onPaneScroll:l,panOnDrag:ge,autoPanOnSelection:F,isSelecting:!!q,selectionMode:m,selectionKeyPressed:R,paneClickDistance:u,selectionOnDrag:xe,children:[e,L&&d.jsx(tV,{onSelectionContextMenu:H,noPanClassName:Y,disableKeyboardA11y:W})]})})}Kj.displayName="FlowRenderer";const rV=A.memo(Kj),iV=e=>t=>e?Ox(t.nodeLookup,{x:0,y:0,width:t.width,height:t.height},t.transform,!0).map(n=>n.id):Array.from(t.nodeLookup.keys());function aV(e){return mt(A.useCallback(iV(e),[e]),Gt)}const sV=e=>e.updateNodeInternals;function oV(){const e=mt(sV),[t]=A.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(n=>{const r=new Map;n.forEach(a=>{const o=a.target.getAttribute("data-id");r.set(o,{id:o,nodeElement:a.target,force:!0})}),e(r)}));return A.useEffect(()=>()=>{t==null||t.disconnect()},[t]),t}function lV({node:e,nodeType:t,hasDimensions:n,resizeObserver:r}){const a=Vt(),o=A.useRef(null),l=A.useRef(null),u=A.useRef(e.sourcePosition),f=A.useRef(e.targetPosition),h=A.useRef(t),g=n&&!!e.internals.handleBounds;return A.useEffect(()=>{o.current&&!e.hidden&&(!g||l.current!==o.current)&&(l.current&&(r==null||r.unobserve(l.current)),r==null||r.observe(o.current),l.current=o.current)},[g,e.hidden]),A.useEffect(()=>()=>{l.current&&(r==null||r.unobserve(l.current),l.current=null)},[]),A.useEffect(()=>{if(o.current){const m=h.current!==t,y=u.current!==e.sourcePosition,b=f.current!==e.targetPosition;(m||y||b)&&(h.current=t,u.current=e.sourcePosition,f.current=e.targetPosition,a.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:o.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),o}function cV({id:e,onClick:t,onMouseEnter:n,onMouseMove:r,onMouseLeave:a,onContextMenu:o,onDoubleClick:l,nodesDraggable:u,elementsSelectable:f,nodesConnectable:h,nodesFocusable:g,resizeObserver:m,noDragClassName:y,noPanClassName:b,disableKeyboardA11y:k,rfId:v,nodeTypes:S,nodeClickDistance:E,onError:C}){const{node:N,internals:_,isParent:D}=mt(q=>{const ne=q.nodeLookup.get(e),ue=q.parentLookup.has(e);return{node:ne,internals:ne.internals,isParent:ue}},Gt);let T=N.type||"default",M=(S==null?void 0:S[T])||gS[T];M===void 0&&(C==null||C("003",fi.error003(T)),T="default",M=(S==null?void 0:S.default)||gS.default);const I=!!(N.draggable||u&&typeof N.draggable>"u"),F=!!(N.selectable||f&&typeof N.selectable>"u"),$=!!(N.connectable||h&&typeof N.connectable>"u"),U=!!(N.focusable||g&&typeof N.focusable>"u"),K=Vt(),Q=dj(N),B=lV({node:N,nodeType:T,hasDimensions:Q,resizeObserver:m}),H=$j({nodeRef:B,disabled:N.hidden||!I,noDragClassName:y,handleSelector:N.dragHandle,nodeId:e,isSelectable:F,nodeClickDistance:E}),z=Fj();if(N.hidden)return null;const Y=ba(N),W=JG(N),G=F||I||t||n||r||a,O=n?q=>n(q,{..._.userNode}):void 0,L=r?q=>r(q,{..._.userNode}):void 0,V=a?q=>a(q,{..._.userNode}):void 0,R=o?q=>o(q,{..._.userNode}):void 0,se=l?q=>l(q,{..._.userNode}):void 0,ge=q=>{const{selectNodesOnDrag:ne,nodeDragThreshold:ue}=K.getState();F&&(!ne||!I||ue>0)&&fb({id:e,store:K,nodeRef:B}),t&&t(q,{..._.userNode})},ye=q=>{if(!(pj(q.nativeEvent)||k)){if(tj.includes(q.key)&&F){const ne=q.key==="Escape";fb({id:e,store:K,unselect:ne,nodeRef:B})}else if(I&&N.selected&&Object.prototype.hasOwnProperty.call(Ah,q.key)){q.preventDefault();const{ariaLabelConfig:ne}=K.getState();K.setState({ariaLiveMessage:ne["node.a11yDescription.ariaLiveMessage"]({direction:q.key.replace("Arrow","").toLowerCase(),x:~~_.positionAbsolute.x,y:~~_.positionAbsolute.y})}),z({direction:Ah[q.key],factor:q.shiftKey?4:1})}}},xe=()=>{var je;if(k||!((je=B.current)!=null&&je.matches(":focus-visible")))return;const{transform:q,width:ne,height:ue,autoPanOnNodeFocus:ce,setCenter:de}=K.getState();if(!ce)return;Ox(new Map([[e,N]]),{x:0,y:0,width:ne,height:ue},q,!0).length>0||de(N.position.x+Y.width/2,N.position.y+Y.height/2,{zoom:q[2]})};return d.jsx("div",{className:yn(["react-flow__node",`react-flow__node-${T}`,{[b]:I},N.className,{selected:N.selected,selectable:F,parent:D,draggable:I,dragging:H}]),ref:B,style:{zIndex:_.z,transform:`translate(${_.positionAbsolute.x}px,${_.positionAbsolute.y}px)`,pointerEvents:G?"all":"none",visibility:Q?"visible":"hidden",...N.style,...W},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:O,onMouseMove:L,onMouseLeave:V,onContextMenu:R,onClick:ge,onDoubleClick:se,onKeyDown:U?ye:void 0,tabIndex:U?0:void 0,onFocus:U?xe:void 0,role:N.ariaRole??(U?"group":void 0),"aria-roledescription":"node","aria-describedby":k?void 0:`${Oj}-${v}`,"aria-label":N.ariaLabel,...N.domAttributes,children:d.jsx(FG,{value:e,children:d.jsx(M,{id:e,data:N.data,type:T,positionAbsoluteX:_.positionAbsolute.x,positionAbsoluteY:_.positionAbsolute.y,selected:N.selected??!1,selectable:F,draggable:I,deletable:N.deletable??!0,isConnectable:$,sourcePosition:N.sourcePosition,targetPosition:N.targetPosition,dragging:H,dragHandle:N.dragHandle,zIndex:_.z,parentId:N.parentId,...Y})})})}var uV=A.memo(cV);const dV=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function Gj(e){const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:a,onError:o}=mt(dV,Gt),l=aV(e.onlyRenderVisibleElements),u=oV();return d.jsx("div",{className:"react-flow__nodes",style:cp,children:l.map(f=>d.jsx(uV,{id:f,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:u,nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:a,nodeClickDistance:e.nodeClickDistance,onError:o},f))})}Gj.displayName="NodeRenderer";const fV=A.memo(Gj);function hV(e){return mt(A.useCallback(n=>{if(!e)return n.edges.map(a=>a.id);const r=[];if(n.width&&n.height)for(const a of n.edges){const o=n.nodeLookup.get(a.source),l=n.nodeLookup.get(a.target);o&&l&&oK({sourceNode:o,targetNode:l,width:n.width,height:n.height,transform:n.transform})&&r.push(a.id)}return r},[e]),Gt)}const pV=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e}};return d.jsx("polyline",{className:"arrow",style:n,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},mV=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e,fill:e}};return d.jsx("polyline",{className:"arrowclosed",style:n,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},bS={[_h.Arrow]:pV,[_h.ArrowClosed]:mV};function gV(e){const t=Vt();return A.useMemo(()=>{var a,o;return Object.prototype.hasOwnProperty.call(bS,e)?bS[e]:((o=(a=t.getState()).onError)==null||o.call(a,"009",fi.error009(e)),null)},[e])}const yV=({id:e,type:t,color:n,width:r=12.5,height:a=12.5,markerUnits:o="strokeWidth",strokeWidth:l,orient:u="auto-start-reverse"})=>{const f=gV(t);return f?d.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${r}`,markerHeight:`${a}`,viewBox:"-10 -10 20 20",markerUnits:o,orient:u,refX:"0",refY:"0",children:d.jsx(f,{color:n,strokeWidth:l})}):null},Vj=({defaultColor:e,rfId:t})=>{const n=mt(o=>o.edges),r=mt(o=>o.defaultEdgeOptions),a=A.useMemo(()=>mK(n,{id:t,defaultColor:e,defaultMarkerStart:r==null?void 0:r.markerStart,defaultMarkerEnd:r==null?void 0:r.markerEnd}),[n,r,t,e]);return a.length?d.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:d.jsx("defs",{children:a.map(o=>d.jsx(yV,{id:o.id,type:o.type,color:o.color,width:o.width,height:o.height,markerUnits:o.markerUnits,strokeWidth:o.strokeWidth,orient:o.orient},o.id))})}):null};Vj.displayName="MarkerDefinitions";var bV=A.memo(Vj);function Yj({x:e,y:t,label:n,labelStyle:r,labelShowBg:a=!0,labelBgStyle:o,labelBgPadding:l=[2,4],labelBgBorderRadius:u=2,children:f,className:h,...g}){const[m,y]=A.useState({x:1,y:0,width:0,height:0}),b=yn(["react-flow__edge-textwrapper",h]),k=A.useRef(null);return A.useEffect(()=>{if(k.current){const v=k.current.getBBox();y({x:v.x,y:v.y,width:v.width,height:v.height})}},[n]),n?d.jsxs("g",{transform:`translate(${e-m.width/2} ${t-m.height/2})`,className:b,visibility:m.width?"visible":"hidden",...g,children:[a&&d.jsx("rect",{width:m.width+2*l[0],x:-l[0],y:-l[1],height:m.height+2*l[1],className:"react-flow__edge-textbg",style:o,rx:u,ry:u}),d.jsx("text",{className:"react-flow__edge-text",y:m.height/2,dy:"0.3em",ref:k,style:r,children:n}),f]}):null}Yj.displayName="EdgeText";const xV=A.memo(Yj);function up({path:e,labelX:t,labelY:n,label:r,labelStyle:a,labelShowBg:o,labelBgStyle:l,labelBgPadding:u,labelBgBorderRadius:f,interactionWidth:h=20,...g}){return d.jsxs(d.Fragment,{children:[d.jsx("path",{...g,d:e,fill:"none",className:yn(["react-flow__edge-path",g.className])}),h?d.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:h,className:"react-flow__edge-interaction"}):null,r&&li(t)&&li(n)?d.jsx(xV,{x:t,y:n,label:r,labelStyle:a,labelShowBg:o,labelBgStyle:l,labelBgPadding:u,labelBgBorderRadius:f}):null]})}function xS({pos:e,x1:t,y1:n,x2:r,y2:a}){return e===Ie.Left||e===Ie.Right?[.5*(t+r),n]:[t,.5*(n+a)]}function Qj({sourceX:e,sourceY:t,sourcePosition:n=Ie.Bottom,targetX:r,targetY:a,targetPosition:o=Ie.Top}){const[l,u]=xS({pos:n,x1:e,y1:t,x2:r,y2:a}),[f,h]=xS({pos:o,x1:r,y1:a,x2:e,y2:t}),[g,m,y,b]=gj({sourceX:e,sourceY:t,targetX:r,targetY:a,sourceControlX:l,sourceControlY:u,targetControlX:f,targetControlY:h});return[`M${e},${t} C${l},${u} ${f},${h} ${r},${a}`,g,m,y,b]}function Wj(e){return A.memo(({id:t,sourceX:n,sourceY:r,targetX:a,targetY:o,sourcePosition:l,targetPosition:u,label:f,labelStyle:h,labelShowBg:g,labelBgStyle:m,labelBgPadding:y,labelBgBorderRadius:b,style:k,markerEnd:v,markerStart:S,interactionWidth:E})=>{const[C,N,_]=Qj({sourceX:n,sourceY:r,sourcePosition:l,targetX:a,targetY:o,targetPosition:u}),D=e.isInternal?void 0:t;return d.jsx(up,{id:D,path:C,labelX:N,labelY:_,label:f,labelStyle:h,labelShowBg:g,labelBgStyle:m,labelBgPadding:y,labelBgBorderRadius:b,style:k,markerEnd:v,markerStart:S,interactionWidth:E})})}const vV=Wj({isInternal:!1}),Xj=Wj({isInternal:!0});vV.displayName="SimpleBezierEdge";Xj.displayName="SimpleBezierEdgeInternal";function Zj(e){return A.memo(({id:t,sourceX:n,sourceY:r,targetX:a,targetY:o,label:l,labelStyle:u,labelShowBg:f,labelBgStyle:h,labelBgPadding:g,labelBgBorderRadius:m,style:y,sourcePosition:b=Ie.Bottom,targetPosition:k=Ie.Top,markerEnd:v,markerStart:S,pathOptions:E,interactionWidth:C})=>{const[N,_,D]=lb({sourceX:n,sourceY:r,sourcePosition:b,targetX:a,targetY:o,targetPosition:k,borderRadius:E==null?void 0:E.borderRadius,offset:E==null?void 0:E.offset,stepPosition:E==null?void 0:E.stepPosition}),T=e.isInternal?void 0:t;return d.jsx(up,{id:T,path:N,labelX:_,labelY:D,label:l,labelStyle:u,labelShowBg:f,labelBgStyle:h,labelBgPadding:g,labelBgBorderRadius:m,style:y,markerEnd:v,markerStart:S,interactionWidth:C})})}const Jj=Zj({isInternal:!1}),eA=Zj({isInternal:!0});Jj.displayName="SmoothStepEdge";eA.displayName="SmoothStepEdgeInternal";function tA(e){return A.memo(({id:t,...n})=>{var a;const r=e.isInternal?void 0:t;return d.jsx(Jj,{...n,id:r,pathOptions:A.useMemo(()=>{var o;return{borderRadius:0,offset:(o=n.pathOptions)==null?void 0:o.offset}},[(a=n.pathOptions)==null?void 0:a.offset])})})}const wV=tA({isInternal:!1}),nA=tA({isInternal:!0});wV.displayName="StepEdge";nA.displayName="StepEdgeInternal";function rA(e){return A.memo(({id:t,sourceX:n,sourceY:r,targetX:a,targetY:o,label:l,labelStyle:u,labelShowBg:f,labelBgStyle:h,labelBgPadding:g,labelBgBorderRadius:m,style:y,markerEnd:b,markerStart:k,interactionWidth:v})=>{const[S,E,C]=xj({sourceX:n,sourceY:r,targetX:a,targetY:o}),N=e.isInternal?void 0:t;return d.jsx(up,{id:N,path:S,labelX:E,labelY:C,label:l,labelStyle:u,labelShowBg:f,labelBgStyle:h,labelBgPadding:g,labelBgBorderRadius:m,style:y,markerEnd:b,markerStart:k,interactionWidth:v})})}const kV=rA({isInternal:!1}),iA=rA({isInternal:!0});kV.displayName="StraightEdge";iA.displayName="StraightEdgeInternal";function aA(e){return A.memo(({id:t,sourceX:n,sourceY:r,targetX:a,targetY:o,sourcePosition:l=Ie.Bottom,targetPosition:u=Ie.Top,label:f,labelStyle:h,labelShowBg:g,labelBgStyle:m,labelBgPadding:y,labelBgBorderRadius:b,style:k,markerEnd:v,markerStart:S,pathOptions:E,interactionWidth:C})=>{const[N,_,D]=yj({sourceX:n,sourceY:r,sourcePosition:l,targetX:a,targetY:o,targetPosition:u,curvature:E==null?void 0:E.curvature}),T=e.isInternal?void 0:t;return d.jsx(up,{id:T,path:N,labelX:_,labelY:D,label:f,labelStyle:h,labelShowBg:g,labelBgStyle:m,labelBgPadding:y,labelBgBorderRadius:b,style:k,markerEnd:v,markerStart:S,interactionWidth:C})})}const EV=aA({isInternal:!1}),sA=aA({isInternal:!0});EV.displayName="BezierEdge";sA.displayName="BezierEdgeInternal";const vS={default:sA,straight:iA,step:nA,smoothstep:eA,simplebezier:Xj},wS={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null,zIndex:void 0},SV=(e,t,n)=>n===Ie.Left?e-t:n===Ie.Right?e+t:e,NV=(e,t,n)=>n===Ie.Top?e-t:n===Ie.Bottom?e+t:e,kS="react-flow__edgeupdater";function ES({position:e,centerX:t,centerY:n,radius:r=10,onMouseDown:a,onMouseEnter:o,onMouseOut:l,type:u}){return d.jsx("circle",{onMouseDown:a,onMouseEnter:o,onMouseOut:l,className:yn([kS,`${kS}-${u}`]),cx:SV(t,r,e),cy:NV(n,r,e),r,stroke:"transparent",fill:"transparent"})}function _V({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:r,sourceY:a,targetX:o,targetY:l,sourcePosition:u,targetPosition:f,onReconnect:h,onReconnectStart:g,onReconnectEnd:m,setReconnecting:y,setUpdateHover:b}){const k=Vt(),v=(_,D)=>{if(_.button!==0)return;const{autoPanOnConnect:T,domNode:M,connectionMode:I,connectionRadius:F,lib:$,onConnectStart:U,cancelConnection:K,nodeLookup:Q,rfId:B,panBy:H,updateConnection:z}=k.getState(),Y=D.type==="target",W=(L,V)=>{y(!1),m==null||m(L,n,D.type,V)},G=L=>h==null?void 0:h(n,L),O=(L,V)=>{y(!0),g==null||g(_,n,D.type),U==null||U(L,V)};db.onPointerDown(_.nativeEvent,{autoPanOnConnect:T,connectionMode:I,connectionRadius:F,domNode:M,handleId:D.id,nodeId:D.nodeId,nodeLookup:Q,isTarget:Y,edgeUpdaterType:D.type,lib:$,flowId:B,cancelConnection:K,panBy:H,isValidConnection:(...L)=>{var V,R;return((R=(V=k.getState()).isValidConnection)==null?void 0:R.call(V,...L))??!0},onConnect:G,onConnectStart:O,onConnectEnd:(...L)=>{var V,R;return(R=(V=k.getState()).onConnectEnd)==null?void 0:R.call(V,...L)},onReconnectEnd:W,updateConnection:z,getTransform:()=>k.getState().transform,getFromHandle:()=>k.getState().connection.fromHandle,dragThreshold:k.getState().connectionDragThreshold,handleDomNode:_.currentTarget})},S=_=>v(_,{nodeId:n.target,id:n.targetHandle??null,type:"target"}),E=_=>v(_,{nodeId:n.source,id:n.sourceHandle??null,type:"source"}),C=()=>b(!0),N=()=>b(!1);return d.jsxs(d.Fragment,{children:[(e===!0||e==="source")&&d.jsx(ES,{position:u,centerX:r,centerY:a,radius:t,onMouseDown:S,onMouseEnter:C,onMouseOut:N,type:"source"}),(e===!0||e==="target")&&d.jsx(ES,{position:f,centerX:o,centerY:l,radius:t,onMouseDown:E,onMouseEnter:C,onMouseOut:N,type:"target"})]})}function CV({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:r,onClick:a,onDoubleClick:o,onContextMenu:l,onMouseEnter:u,onMouseMove:f,onMouseLeave:h,reconnectRadius:g,onReconnect:m,onReconnectStart:y,onReconnectEnd:b,rfId:k,edgeTypes:v,noPanClassName:S,onError:E,disableKeyboardA11y:C}){let N=mt(de=>de.edgeLookup.get(e));const _=mt(de=>de.defaultEdgeOptions);N=_?{..._,...N}:N;let D=N.type||"default",T=(v==null?void 0:v[D])||vS[D];T===void 0&&(E==null||E("011",fi.error011(D)),D="default",T=(v==null?void 0:v.default)||vS.default);const M=!!(N.focusable||t&&typeof N.focusable>"u"),I=typeof m<"u"&&(N.reconnectable||n&&typeof N.reconnectable>"u"),F=!!(N.selectable||r&&typeof N.selectable>"u"),$=A.useRef(null),[U,K]=A.useState(!1),[Q,B]=A.useState(!1),H=Vt(),{zIndex:z=N.zIndex,sourceX:Y,sourceY:W,targetX:G,targetY:O,sourcePosition:L,targetPosition:V}=mt(A.useCallback(de=>{const be=de.nodeLookup.get(N.source),je=de.nodeLookup.get(N.target);if(!be||!je)return wS;const De=pK({id:e,sourceNode:be,targetNode:je,sourceHandle:N.sourceHandle||null,targetHandle:N.targetHandle||null,connectionMode:de.connectionMode,onError:E}),we=sK({selected:N.selected,zIndex:N.zIndex,sourceNode:be,targetNode:je,elevateOnSelect:de.elevateEdgesOnSelect,zIndexMode:de.zIndexMode});return{...De||wS,zIndex:we}},[N.source,N.target,N.sourceHandle,N.targetHandle,N.selected,N.zIndex]),Gt),R=A.useMemo(()=>N.markerStart?`url('#${cb(N.markerStart,k)}')`:void 0,[N.markerStart,k]),se=A.useMemo(()=>N.markerEnd?`url('#${cb(N.markerEnd,k)}')`:void 0,[N.markerEnd,k]);if(N.hidden||Y===null||W===null||G===null||O===null)return null;const ge=de=>{var we;const{addSelectedEdges:be,unselectNodesAndEdges:je,multiSelectionActive:De}=H.getState();F&&(H.setState({nodesSelectionActive:!1}),N.selected&&De?(je({nodes:[],edges:[N]}),(we=$.current)==null||we.blur()):be([e])),a&&a(de,N)},ye=o?de=>{o(de,{...N})}:void 0,xe=l?de=>{l(de,{...N})}:void 0,q=u?de=>{u(de,{...N})}:void 0,ne=f?de=>{f(de,{...N})}:void 0,ue=h?de=>{h(de,{...N})}:void 0,ce=de=>{var be;if(!C&&tj.includes(de.key)&&F){const{unselectNodesAndEdges:je,addSelectedEdges:De}=H.getState();de.key==="Escape"?((be=$.current)==null||be.blur(),je({edges:[N]})):De([e])}};return d.jsx("svg",{style:{zIndex:z},children:d.jsxs("g",{className:yn(["react-flow__edge",`react-flow__edge-${D}`,N.className,S,{selected:N.selected,animated:N.animated,inactive:!F&&!a,updating:U,selectable:F}]),onClick:ge,onDoubleClick:ye,onContextMenu:xe,onMouseEnter:q,onMouseMove:ne,onMouseLeave:ue,onKeyDown:M?ce:void 0,tabIndex:M?0:void 0,role:N.ariaRole??(M?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":N.ariaLabel===null?void 0:N.ariaLabel||`Edge from ${N.source} to ${N.target}`,"aria-describedby":M?`${Rj}-${k}`:void 0,ref:$,...N.domAttributes,children:[!Q&&d.jsx(T,{id:e,source:N.source,target:N.target,type:N.type,selected:N.selected,animated:N.animated,selectable:F,deletable:N.deletable??!0,label:N.label,labelStyle:N.labelStyle,labelShowBg:N.labelShowBg,labelBgStyle:N.labelBgStyle,labelBgPadding:N.labelBgPadding,labelBgBorderRadius:N.labelBgBorderRadius,sourceX:Y,sourceY:W,targetX:G,targetY:O,sourcePosition:L,targetPosition:V,data:N.data,style:N.style,sourceHandleId:N.sourceHandle,targetHandleId:N.targetHandle,markerStart:R,markerEnd:se,pathOptions:"pathOptions"in N?N.pathOptions:void 0,interactionWidth:N.interactionWidth}),I&&d.jsx(_V,{edge:N,isReconnectable:I,reconnectRadius:g,onReconnect:m,onReconnectStart:y,onReconnectEnd:b,sourceX:Y,sourceY:W,targetX:G,targetY:O,sourcePosition:L,targetPosition:V,setUpdateHover:K,setReconnecting:B})]})})}var jV=A.memo(CV);const AV=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function oA({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:r,noPanClassName:a,onReconnect:o,onEdgeContextMenu:l,onEdgeMouseEnter:u,onEdgeMouseMove:f,onEdgeMouseLeave:h,onEdgeClick:g,reconnectRadius:m,onEdgeDoubleClick:y,onReconnectStart:b,onReconnectEnd:k,disableKeyboardA11y:v}){const{edgesFocusable:S,edgesReconnectable:E,elementsSelectable:C,onError:N}=mt(AV,Gt),_=hV(t);return d.jsxs("div",{className:"react-flow__edges",children:[d.jsx(bV,{defaultColor:e,rfId:n}),_.map(D=>d.jsx(jV,{id:D,edgesFocusable:S,edgesReconnectable:E,elementsSelectable:C,noPanClassName:a,onReconnect:o,onContextMenu:l,onMouseEnter:u,onMouseMove:f,onMouseLeave:h,onClick:g,reconnectRadius:m,onDoubleClick:y,onReconnectStart:b,onReconnectEnd:k,rfId:n,onError:N,edgeTypes:r,disableKeyboardA11y:v},D))]})}oA.displayName="EdgeRenderer";const TV=A.memo(oA),MV=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function DV({children:e}){const t=mt(MV);return d.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:t},children:e})}function OV(e){const t=lp(),n=A.useRef(!1);A.useEffect(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}const RV=e=>{var t;return(t=e.panZoom)==null?void 0:t.syncViewport};function LV(e){const t=mt(RV),n=Vt();return A.useEffect(()=>{e&&(t==null||t(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function IV(e){return e.connection.inProgress?{...e.connection,to:rd(e.connection.to,e.transform)}:{...e.connection}}function zV(e){return IV}function PV(e){const t=zV();return mt(t,Gt)}const BV=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function UV({containerStyle:e,style:t,type:n,component:r}){const{nodesConnectable:a,width:o,height:l,isValid:u,inProgress:f}=mt(BV,Gt);return!(o&&a&&f)?null:d.jsx("svg",{style:e,width:o,height:l,className:"react-flow__connectionline react-flow__container",children:d.jsx("g",{className:yn(["react-flow__connection",ij(u)]),children:d.jsx(lA,{style:t,type:n,CustomComponent:r,isValid:u})})})}const lA=({style:e,type:t=is.Bezier,CustomComponent:n,isValid:r})=>{const{inProgress:a,from:o,fromNode:l,fromHandle:u,fromPosition:f,to:h,toNode:g,toHandle:m,toPosition:y,pointer:b}=PV();if(!a)return;if(n)return d.jsx(n,{connectionLineType:t,connectionLineStyle:e,fromNode:l,fromHandle:u,fromX:o.x,fromY:o.y,toX:h.x,toY:h.y,fromPosition:f,toPosition:y,connectionStatus:ij(r),toNode:g,toHandle:m,pointer:b});let k="";const v={sourceX:o.x,sourceY:o.y,sourcePosition:f,targetX:h.x,targetY:h.y,targetPosition:y};switch(t){case is.Bezier:[k]=yj(v);break;case is.SimpleBezier:[k]=Qj(v);break;case is.Step:[k]=lb({...v,borderRadius:0});break;case is.SmoothStep:[k]=lb(v);break;default:[k]=xj(v)}return d.jsx("path",{d:k,fill:"none",className:"react-flow__connection-path",style:e})};lA.displayName="ConnectionLine";const $V={};function SS(e=$V){A.useRef(e),Vt(),A.useEffect(()=>{},[e])}function FV(){Vt(),A.useRef(!1),A.useEffect(()=>{},[])}function cA({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:r,onEdgeClick:a,onNodeDoubleClick:o,onEdgeDoubleClick:l,onNodeMouseEnter:u,onNodeMouseMove:f,onNodeMouseLeave:h,onNodeContextMenu:g,onSelectionContextMenu:m,onSelectionStart:y,onSelectionEnd:b,connectionLineType:k,connectionLineStyle:v,connectionLineComponent:S,connectionLineContainerStyle:E,selectionKeyCode:C,selectionOnDrag:N,selectionMode:_,multiSelectionKeyCode:D,panActivationKeyCode:T,zoomActivationKeyCode:M,deleteKeyCode:I,onlyRenderVisibleElements:F,elementsSelectable:$,defaultViewport:U,translateExtent:K,minZoom:Q,maxZoom:B,preventScrolling:H,defaultMarkerColor:z,zoomOnScroll:Y,zoomOnPinch:W,panOnScroll:G,panOnScrollSpeed:O,panOnScrollMode:L,zoomOnDoubleClick:V,panOnDrag:R,autoPanOnSelection:se,onPaneClick:ge,onPaneMouseEnter:ye,onPaneMouseMove:xe,onPaneMouseLeave:q,onPaneScroll:ne,onPaneContextMenu:ue,paneClickDistance:ce,nodeClickDistance:de,onEdgeContextMenu:be,onEdgeMouseEnter:je,onEdgeMouseMove:De,onEdgeMouseLeave:we,reconnectRadius:ut,onReconnect:Bt,onReconnectStart:sn,onReconnectEnd:cn,noDragClassName:An,noWheelClassName:Yr,noPanClassName:Jn,disableKeyboardA11y:xt,nodeExtent:kn,rfId:le,viewport:ve,onViewportChange:ze}){return SS(e),SS(t),FV(),OV(n),LV(ve),d.jsx(rV,{onPaneClick:ge,onPaneMouseEnter:ye,onPaneMouseMove:xe,onPaneMouseLeave:q,onPaneContextMenu:ue,onPaneScroll:ne,paneClickDistance:ce,deleteKeyCode:I,selectionKeyCode:C,selectionOnDrag:N,selectionMode:_,onSelectionStart:y,onSelectionEnd:b,multiSelectionKeyCode:D,panActivationKeyCode:T,zoomActivationKeyCode:M,elementsSelectable:$,zoomOnScroll:Y,zoomOnPinch:W,zoomOnDoubleClick:V,panOnScroll:G,panOnScrollSpeed:O,panOnScrollMode:L,panOnDrag:R,autoPanOnSelection:se,defaultViewport:U,translateExtent:K,minZoom:Q,maxZoom:B,onSelectionContextMenu:m,preventScrolling:H,noDragClassName:An,noWheelClassName:Yr,noPanClassName:Jn,disableKeyboardA11y:xt,onViewportChange:ze,isControlledViewport:!!ve,children:d.jsxs(DV,{children:[d.jsx(TV,{edgeTypes:t,onEdgeClick:a,onEdgeDoubleClick:l,onReconnect:Bt,onReconnectStart:sn,onReconnectEnd:cn,onlyRenderVisibleElements:F,onEdgeContextMenu:be,onEdgeMouseEnter:je,onEdgeMouseMove:De,onEdgeMouseLeave:we,reconnectRadius:ut,defaultMarkerColor:z,noPanClassName:Jn,disableKeyboardA11y:xt,rfId:le}),d.jsx(UV,{style:v,type:k,component:S,containerStyle:E}),d.jsx("div",{className:"react-flow__edgelabel-renderer"}),d.jsx(fV,{nodeTypes:e,onNodeClick:r,onNodeDoubleClick:o,onNodeMouseEnter:u,onNodeMouseMove:f,onNodeMouseLeave:h,onNodeContextMenu:g,nodeClickDistance:de,onlyRenderVisibleElements:F,noPanClassName:Jn,noDragClassName:An,disableKeyboardA11y:xt,nodeExtent:kn,rfId:le}),d.jsx("div",{className:"react-flow__viewport-portal"})]})})}cA.displayName="GraphView";const qV=A.memo(cA),HV=uj(),NS=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:a,height:o,fitView:l,fitViewOptions:u,minZoom:f=.5,maxZoom:h=2,nodeOrigin:g,nodeExtent:m,zIndexMode:y="basic"}={})=>{const b=new Map,k=new Map,v=new Map,S=new Map,E=r??t??[],C=n??e??[],N=g??[0,0],_=m??Au;kj(v,S,E);const{nodesInitialized:D}=ub(C,b,k,{nodeOrigin:N,nodeExtent:_,zIndexMode:y});let T=[0,0,1];if(l&&a&&o){const M=td(b,{filter:U=>!!((U.width||U.initialWidth)&&(U.height||U.initialHeight))}),{x:I,y:F,zoom:$}=Lx(M,a,o,f,h,(u==null?void 0:u.padding)??.1);T=[I,F,$]}return{rfId:"1",width:a??0,height:o??0,transform:T,nodes:C,nodesInitialized:D,nodeLookup:b,parentLookup:k,edges:E,edgeLookup:S,connectionLookup:v,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:r!==void 0,panZoom:null,minZoom:f,maxZoom:h,translateExtent:Au,nodeExtent:_,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:Bl.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:N,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:l??!1,fitViewOptions:u,fitViewResolver:null,connection:{...rj},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:HV,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:nj,zIndexMode:y,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},KV=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:a,height:o,fitView:l,fitViewOptions:u,minZoom:f,maxZoom:h,nodeOrigin:g,nodeExtent:m,zIndexMode:y})=>rG((b,k)=>{async function v(){const{nodeLookup:S,panZoom:E,fitViewOptions:C,fitViewResolver:N,width:_,height:D,minZoom:T,maxZoom:M}=k();E&&(await J7({nodes:S,width:_,height:D,panZoom:E,minZoom:T,maxZoom:M},C),N==null||N.resolve(!0),b({fitViewResolver:null}))}return{...NS({nodes:e,edges:t,width:a,height:o,fitView:l,fitViewOptions:u,minZoom:f,maxZoom:h,nodeOrigin:g,nodeExtent:m,defaultNodes:n,defaultEdges:r,zIndexMode:y}),setNodes:S=>{const{nodeLookup:E,parentLookup:C,nodeOrigin:N,elevateNodesOnSelect:_,fitViewQueued:D,zIndexMode:T,nodesSelectionActive:M}=k(),{nodesInitialized:I,hasSelectedNodes:F}=ub(S,E,C,{nodeOrigin:N,nodeExtent:m,elevateNodesOnSelect:_,checkEquality:!0,zIndexMode:T}),$=M&&F;D&&I?(v(),b({nodes:S,nodesInitialized:I,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:$})):b({nodes:S,nodesInitialized:I,nodesSelectionActive:$})},setEdges:S=>{const{connectionLookup:E,edgeLookup:C}=k();kj(E,C,S),b({edges:S})},setDefaultNodesAndEdges:(S,E)=>{if(S){const{setNodes:C}=k();C(S),b({hasDefaultNodes:!0})}if(E){const{setEdges:C}=k();C(E),b({hasDefaultEdges:!0})}},updateNodeInternals:S=>{const{triggerNodeChanges:E,nodeLookup:C,parentLookup:N,domNode:_,nodeOrigin:D,nodeExtent:T,debug:M,fitViewQueued:I,zIndexMode:F}=k(),{changes:$,updatedInternals:U}=kK(S,C,N,_,D,T,F);U&&(bK(C,N,{nodeOrigin:D,nodeExtent:T,zIndexMode:F}),I?(v(),b({fitViewQueued:!1,fitViewOptions:void 0})):b({}),($==null?void 0:$.length)>0&&(M&&console.log("React Flow: trigger node changes",$),E==null||E($)))},updateNodePositions:(S,E=!1)=>{const C=[];let N=[];const{nodeLookup:_,triggerNodeChanges:D,connection:T,updateConnection:M,onNodesChangeMiddlewareMap:I}=k();for(const[F,$]of S){const U=_.get(F),K=!!(U!=null&&U.expandParent&&(U!=null&&U.parentId)&&($!=null&&$.position)),Q={id:F,type:"position",position:K?{x:Math.max(0,$.position.x),y:Math.max(0,$.position.y)}:$.position,dragging:E};if(U&&T.inProgress&&T.fromNode.id===U.id){const B=po(U,T.fromHandle,Ie.Left,!0);M({...T,from:B})}K&&U.parentId&&C.push({id:F,parentId:U.parentId,rect:{...$.internals.positionAbsolute,width:$.measured.width??0,height:$.measured.height??0}}),N.push(Q)}if(C.length>0){const{parentLookup:F,nodeOrigin:$}=k(),U=$x(C,_,F,$);N.push(...U)}for(const F of I.values())N=F(N);D(N)},triggerNodeChanges:S=>{const{onNodesChange:E,setNodes:C,nodes:N,hasDefaultNodes:_,debug:D}=k();if(S!=null&&S.length){if(_){const T=zj(S,N);C(T)}D&&console.log("React Flow: trigger node changes",S),E==null||E(S)}},triggerEdgeChanges:S=>{const{onEdgesChange:E,setEdges:C,edges:N,hasDefaultEdges:_,debug:D}=k();if(S!=null&&S.length){if(_){const T=Pj(S,N);C(T)}D&&console.log("React Flow: trigger edge changes",S),E==null||E(S)}},addSelectedNodes:S=>{const{multiSelectionActive:E,edgeLookup:C,nodeLookup:N,triggerNodeChanges:_,triggerEdgeChanges:D}=k();if(E){const T=S.map(M=>qs(M,!0));_(T);return}_(ml(N,new Set([...S]),!0)),D(ml(C))},addSelectedEdges:S=>{const{multiSelectionActive:E,edgeLookup:C,nodeLookup:N,triggerNodeChanges:_,triggerEdgeChanges:D}=k();if(E){const T=S.map(M=>qs(M,!0));D(T);return}D(ml(C,new Set([...S]))),_(ml(N,new Set,!0))},unselectNodesAndEdges:({nodes:S,edges:E}={})=>{const{edges:C,nodes:N,nodeLookup:_,triggerNodeChanges:D,triggerEdgeChanges:T}=k(),M=S||N,I=E||C,F=[];for(const U of M){if(!U.selected)continue;const K=_.get(U.id);K&&(K.selected=!1),F.push(qs(U.id,!1))}const $=[];for(const U of I)U.selected&&$.push(qs(U.id,!1));D(F),T($)},setMinZoom:S=>{const{panZoom:E,maxZoom:C}=k();E==null||E.setScaleExtent([S,C]),b({minZoom:S})},setMaxZoom:S=>{const{panZoom:E,minZoom:C}=k();E==null||E.setScaleExtent([C,S]),b({maxZoom:S})},setTranslateExtent:S=>{var E;(E=k().panZoom)==null||E.setTranslateExtent(S),b({translateExtent:S})},resetSelectedElements:()=>{const{edges:S,nodes:E,triggerNodeChanges:C,triggerEdgeChanges:N,elementsSelectable:_}=k();if(!_)return;const D=E.reduce((M,I)=>I.selected?[...M,qs(I.id,!1)]:M,[]),T=S.reduce((M,I)=>I.selected?[...M,qs(I.id,!1)]:M,[]);C(D),N(T)},setNodeExtent:S=>{const{nodes:E,nodeLookup:C,parentLookup:N,nodeOrigin:_,elevateNodesOnSelect:D,nodeExtent:T,zIndexMode:M}=k();S[0][0]===T[0][0]&&S[0][1]===T[0][1]&&S[1][0]===T[1][0]&&S[1][1]===T[1][1]||(ub(E,C,N,{nodeOrigin:_,nodeExtent:S,elevateNodesOnSelect:D,checkEquality:!1,zIndexMode:M}),b({nodeExtent:S}))},panBy:S=>{const{transform:E,width:C,height:N,panZoom:_,translateExtent:D}=k();return EK({delta:S,panZoom:_,transform:E,translateExtent:D,width:C,height:N})},setCenter:async(S,E,C)=>{const{width:N,height:_,maxZoom:D,panZoom:T}=k();if(!T)return!1;const M=typeof(C==null?void 0:C.zoom)<"u"?C.zoom:D;return await T.setViewport({x:N/2-S*M,y:_/2-E*M,zoom:M},{duration:C==null?void 0:C.duration,ease:C==null?void 0:C.ease,interpolate:C==null?void 0:C.interpolate}),!0},cancelConnection:()=>{b({connection:{...rj}})},updateConnection:S=>{b({connection:S})},reset:()=>b({...NS()})}},Object.is);function uA({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:r,initialWidth:a,initialHeight:o,initialMinZoom:l,initialMaxZoom:u,initialFitViewOptions:f,fitView:h,nodeOrigin:g,nodeExtent:m,zIndexMode:y,children:b}){const[k]=A.useState(()=>KV({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:a,height:o,fitView:h,minZoom:l,maxZoom:u,fitViewOptions:f,nodeOrigin:g,nodeExtent:m,zIndexMode:y}));return d.jsx(iG,{value:k,children:d.jsx(AG,{children:d.jsx(HG,{children:b})})})}function GV({children:e,nodes:t,edges:n,defaultNodes:r,defaultEdges:a,width:o,height:l,fitView:u,fitViewOptions:f,minZoom:h,maxZoom:g,nodeOrigin:m,nodeExtent:y,zIndexMode:b}){return A.useContext(sp)?d.jsx(d.Fragment,{children:e}):d.jsx(uA,{initialNodes:t,initialEdges:n,defaultNodes:r,defaultEdges:a,initialWidth:o,initialHeight:l,fitView:u,initialFitViewOptions:f,initialMinZoom:h,initialMaxZoom:g,nodeOrigin:m,nodeExtent:y,zIndexMode:b,children:e})}const VV={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function YV({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,className:a,nodeTypes:o,edgeTypes:l,onNodeClick:u,onEdgeClick:f,onInit:h,onMove:g,onMoveStart:m,onMoveEnd:y,onConnect:b,onConnectStart:k,onConnectEnd:v,onClickConnectStart:S,onClickConnectEnd:E,onNodeMouseEnter:C,onNodeMouseMove:N,onNodeMouseLeave:_,onNodeContextMenu:D,onNodeDoubleClick:T,onNodeDragStart:M,onNodeDrag:I,onNodeDragStop:F,onNodesDelete:$,onEdgesDelete:U,onDelete:K,onSelectionChange:Q,onSelectionDragStart:B,onSelectionDrag:H,onSelectionDragStop:z,onSelectionContextMenu:Y,onSelectionStart:W,onSelectionEnd:G,onBeforeDelete:O,connectionMode:L,connectionLineType:V=is.Bezier,connectionLineStyle:R,connectionLineComponent:se,connectionLineContainerStyle:ge,deleteKeyCode:ye="Backspace",selectionKeyCode:xe="Shift",selectionOnDrag:q=!1,selectionMode:ne=Tu.Full,panActivationKeyCode:ue="Space",multiSelectionKeyCode:ce=Du()?"Meta":"Control",zoomActivationKeyCode:de=Du()?"Meta":"Control",snapToGrid:be,snapGrid:je,onlyRenderVisibleElements:De=!1,selectNodesOnDrag:we,nodesDraggable:ut,autoPanOnNodeFocus:Bt,nodesConnectable:sn,nodesFocusable:cn,nodeOrigin:An=Lj,edgesFocusable:Yr,edgesReconnectable:Jn,elementsSelectable:xt=!0,defaultViewport:kn=yG,minZoom:le=.5,maxZoom:ve=2,translateExtent:ze=Au,preventScrolling:Xe=!0,nodeExtent:st,defaultMarkerColor:Tn="#b1b1b7",zoomOnScroll:hr=!0,zoomOnPinch:bn=!0,panOnScroll:Ft=!1,panOnScrollSpeed:En=.5,panOnScrollMode:vt=ao.Free,zoomOnDoubleClick:Ar=!0,panOnDrag:Mn=!0,onPaneClick:xo,onPaneMouseEnter:Ri,onPaneMouseMove:xa,onPaneMouseLeave:Li,onPaneScroll:zn,onPaneContextMenu:J,paneClickDistance:he=1,nodeClickDistance:Ne=0,children:Ke,onReconnect:Dt,onReconnectStart:Et,onReconnectEnd:Me,onEdgeContextMenu:Ce,onEdgeDoubleClick:Fe,onEdgeMouseEnter:Yt,onEdgeMouseMove:zt,onEdgeMouseLeave:Qr,reconnectRadius:va=10,onNodesChange:wa,onEdgesChange:Tr,noDragClassName:Qt="nodrag",noWheelClassName:Sn="nowheel",noPanClassName:Wr="nopan",fitView:ka,fitViewOptions:ks,connectOnClick:Ea,attributionPosition:vo,proOptions:Ii,defaultEdgeOptions:Es,elevateNodesOnSelect:Dn=!0,elevateEdgesOnSelect:Xr=!1,disableKeyboardA11y:Zr=!1,autoPanOnConnect:gi,autoPanOnNodeDrag:en,autoPanOnSelection:wo=!0,autoPanSpeed:zi,connectionRadius:Jr,isValidConnection:ke,onError:Pe,style:tt,id:gt,nodeDragThreshold:Wt,connectionDragThreshold:Nn,viewport:Kn,onViewportChange:Pn,width:Ct,height:Gn,colorMode:ko="light",debug:Sa,onScroll:yi,ariaLabelConfig:Na,zIndexMode:Eo="basic",...Bn},Ss){const ei=gt||"1",_a=wG(ko),xn=A.useCallback(Ns=>{Ns.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),yi==null||yi(Ns)},[yi]);return d.jsx("div",{"data-testid":"rf__wrapper",...Bn,onScroll:xn,style:{...tt,...VV},ref:Ss,className:yn(["react-flow",a,_a]),id:gt,role:"application",children:d.jsxs(GV,{nodes:e,edges:t,width:Ct,height:Gn,fitView:ka,fitViewOptions:ks,minZoom:le,maxZoom:ve,nodeOrigin:An,nodeExtent:st,zIndexMode:Eo,children:[d.jsx(vG,{nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:b,onConnectStart:k,onConnectEnd:v,onClickConnectStart:S,onClickConnectEnd:E,nodesDraggable:ut,autoPanOnNodeFocus:Bt,nodesConnectable:sn,nodesFocusable:cn,edgesFocusable:Yr,edgesReconnectable:Jn,elementsSelectable:xt,elevateNodesOnSelect:Dn,elevateEdgesOnSelect:Xr,minZoom:le,maxZoom:ve,nodeExtent:st,onNodesChange:wa,onEdgesChange:Tr,snapToGrid:be,snapGrid:je,connectionMode:L,translateExtent:ze,connectOnClick:Ea,defaultEdgeOptions:Es,fitView:ka,fitViewOptions:ks,onNodesDelete:$,onEdgesDelete:U,onDelete:K,onNodeDragStart:M,onNodeDrag:I,onNodeDragStop:F,onSelectionDrag:H,onSelectionDragStart:B,onSelectionDragStop:z,onMove:g,onMoveStart:m,onMoveEnd:y,noPanClassName:Wr,nodeOrigin:An,rfId:ei,autoPanOnConnect:gi,autoPanOnNodeDrag:en,autoPanSpeed:zi,onError:Pe,connectionRadius:Jr,isValidConnection:ke,selectNodesOnDrag:we,nodeDragThreshold:Wt,connectionDragThreshold:Nn,onBeforeDelete:O,debug:Sa,ariaLabelConfig:Na,zIndexMode:Eo}),d.jsx(qV,{onInit:h,onNodeClick:u,onEdgeClick:f,onNodeMouseEnter:C,onNodeMouseMove:N,onNodeMouseLeave:_,onNodeContextMenu:D,onNodeDoubleClick:T,nodeTypes:o,edgeTypes:l,connectionLineType:V,connectionLineStyle:R,connectionLineComponent:se,connectionLineContainerStyle:ge,selectionKeyCode:xe,selectionOnDrag:q,selectionMode:ne,deleteKeyCode:ye,multiSelectionKeyCode:ce,panActivationKeyCode:ue,zoomActivationKeyCode:de,onlyRenderVisibleElements:De,defaultViewport:kn,translateExtent:ze,minZoom:le,maxZoom:ve,preventScrolling:Xe,zoomOnScroll:hr,zoomOnPinch:bn,zoomOnDoubleClick:Ar,panOnScroll:Ft,panOnScrollSpeed:En,panOnScrollMode:vt,panOnDrag:Mn,autoPanOnSelection:wo,onPaneClick:xo,onPaneMouseEnter:Ri,onPaneMouseMove:xa,onPaneMouseLeave:Li,onPaneScroll:zn,onPaneContextMenu:J,paneClickDistance:he,nodeClickDistance:Ne,onSelectionContextMenu:Y,onSelectionStart:W,onSelectionEnd:G,onReconnect:Dt,onReconnectStart:Et,onReconnectEnd:Me,onEdgeContextMenu:Ce,onEdgeDoubleClick:Fe,onEdgeMouseEnter:Yt,onEdgeMouseMove:zt,onEdgeMouseLeave:Qr,reconnectRadius:va,defaultMarkerColor:Tn,noDragClassName:Qt,noWheelClassName:Sn,noPanClassName:Wr,rfId:ei,disableKeyboardA11y:Zr,nodeExtent:st,viewport:Kn,onViewportChange:Pn}),d.jsx(gG,{onSelectionChange:Q}),Ke,d.jsx(dG,{proOptions:Ii,position:vo}),d.jsx(uG,{rfId:ei,disableKeyboardA11y:Zr})]})})}var QV=Bj(YV);function WV(e){const[t,n]=A.useState(e),r=A.useCallback(a=>n(o=>zj(a,o)),[]);return[t,n,r]}function XV(e){const[t,n]=A.useState(e),r=A.useCallback(a=>n(o=>Pj(a,o)),[]);return[t,n,r]}function ZV({dimensions:e,lineWidth:t,variant:n,className:r}){return d.jsx("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:yn(["react-flow__background-pattern",n,r])})}function JV({radius:e,className:t}){return d.jsx("circle",{cx:e,cy:e,r:e,className:yn(["react-flow__background-pattern","dots",t])})}var ua;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(ua||(ua={}));const eY={[ua.Dots]:1,[ua.Lines]:1,[ua.Cross]:6},tY=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function dA({id:e,variant:t=ua.Dots,gap:n=20,size:r,lineWidth:a=1,offset:o=0,color:l,bgColor:u,style:f,className:h,patternClassName:g}){const m=A.useRef(null),{transform:y,patternId:b}=mt(tY,Gt),k=r||eY[t],v=t===ua.Dots,S=t===ua.Cross,E=Array.isArray(n)?n:[n,n],C=[E[0]*y[2]||1,E[1]*y[2]||1],N=k*y[2],_=Array.isArray(o)?o:[o,o],D=S?[N,N]:C,T=[_[0]*y[2]||1+D[0]/2,_[1]*y[2]||1+D[1]/2],M=`${b}${e||""}`;return d.jsxs("svg",{className:yn(["react-flow__background",h]),style:{...f,...cp,"--xy-background-color-props":u,"--xy-background-pattern-color-props":l},ref:m,"data-testid":"rf__background",children:[d.jsx("pattern",{id:M,x:y[0]%C[0],y:y[1]%C[1],width:C[0],height:C[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${T[0]},-${T[1]})`,children:v?d.jsx(JV,{radius:N/2,className:g}):d.jsx(ZV,{dimensions:D,lineWidth:a,variant:t,className:g})}),d.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${M})`})]})}dA.displayName="Background";const nY=A.memo(dA);function rY(){return d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:d.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function iY(){return d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:d.jsx("path",{d:"M0 0h32v4.2H0z"})})}function aY(){return d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:d.jsx("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function sY(){return d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:d.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function oY(){return d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:d.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}function Ff({children:e,className:t,...n}){return d.jsx("button",{type:"button",className:yn(["react-flow__controls-button",t]),...n,children:e})}const lY=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function fA({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:r=!0,fitViewOptions:a,onZoomIn:o,onZoomOut:l,onFitView:u,onInteractiveChange:f,className:h,children:g,position:m="bottom-left",orientation:y="vertical","aria-label":b}){const k=Vt(),{isInteractive:v,minZoomReached:S,maxZoomReached:E,ariaLabelConfig:C}=mt(lY,Gt),{zoomIn:N,zoomOut:_,fitView:D}=lp(),T=()=>{N(),o==null||o()},M=()=>{_(),l==null||l()},I=()=>{D(a),u==null||u()},F=()=>{k.setState({nodesDraggable:!v,nodesConnectable:!v,elementsSelectable:!v}),f==null||f(!v)},$=y==="horizontal"?"horizontal":"vertical";return d.jsxs(op,{className:yn(["react-flow__controls",$,h]),position:m,style:e,"data-testid":"rf__controls","aria-label":b??C["controls.ariaLabel"],children:[t&&d.jsxs(d.Fragment,{children:[d.jsx(Ff,{onClick:T,className:"react-flow__controls-zoomin",title:C["controls.zoomIn.ariaLabel"],"aria-label":C["controls.zoomIn.ariaLabel"],disabled:E,children:d.jsx(rY,{})}),d.jsx(Ff,{onClick:M,className:"react-flow__controls-zoomout",title:C["controls.zoomOut.ariaLabel"],"aria-label":C["controls.zoomOut.ariaLabel"],disabled:S,children:d.jsx(iY,{})})]}),n&&d.jsx(Ff,{className:"react-flow__controls-fitview",onClick:I,title:C["controls.fitView.ariaLabel"],"aria-label":C["controls.fitView.ariaLabel"],children:d.jsx(aY,{})}),r&&d.jsx(Ff,{className:"react-flow__controls-interactive",onClick:F,title:C["controls.interactive.ariaLabel"],"aria-label":C["controls.interactive.ariaLabel"],children:v?d.jsx(oY,{}):d.jsx(sY,{})}),g]})}fA.displayName="Controls";const cY=A.memo(fA);function uY({id:e,x:t,y:n,width:r,height:a,style:o,color:l,strokeColor:u,strokeWidth:f,className:h,borderRadius:g,shapeRendering:m,selected:y,onClick:b}){const{background:k,backgroundColor:v}=o||{},S=l||k||v;return d.jsx("rect",{className:yn(["react-flow__minimap-node",{selected:y},h]),x:t,y:n,rx:g,ry:g,width:r,height:a,style:{fill:S,stroke:u,strokeWidth:f},shapeRendering:m,onClick:b?E=>b(E,e):void 0})}const dY=A.memo(uY),fY=e=>e.nodes.map(t=>t.id),hy=e=>e instanceof Function?e:()=>e;function hY({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:r=5,nodeStrokeWidth:a,nodeComponent:o=dY,onClick:l}){const u=mt(fY,Gt),f=hy(t),h=hy(e),g=hy(n),m=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return d.jsx(d.Fragment,{children:u.map(y=>d.jsx(mY,{id:y,nodeColorFunc:f,nodeStrokeColorFunc:h,nodeClassNameFunc:g,nodeBorderRadius:r,nodeStrokeWidth:a,NodeComponent:o,onClick:l,shapeRendering:m},y))})}function pY({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:r,nodeBorderRadius:a,nodeStrokeWidth:o,shapeRendering:l,NodeComponent:u,onClick:f}){const{node:h,x:g,y:m,width:y,height:b}=mt(k=>{const v=k.nodeLookup.get(e);if(!v)return{node:void 0,x:0,y:0,width:0,height:0};const S=v.internals.userNode,{x:E,y:C}=v.internals.positionAbsolute,{width:N,height:_}=ba(S);return{node:S,x:E,y:C,width:N,height:_}},Gt);return!h||h.hidden||!dj(h)?null:d.jsx(u,{x:g,y:m,width:y,height:b,style:h.style,selected:!!h.selected,className:r(h),color:t(h),borderRadius:a,strokeColor:n(h),strokeWidth:o,shapeRendering:l,onClick:f,id:h.id})}const mY=A.memo(pY);var gY=A.memo(hY);const yY=200,bY=150,xY=e=>!e.hidden,vY=e=>{const t={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:t,boundingRect:e.nodeLookup.size>0?lj(td(e.nodeLookup,{filter:xY}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},wY="react-flow__minimap-desc";function hA({style:e,className:t,nodeStrokeColor:n,nodeColor:r,nodeClassName:a="",nodeBorderRadius:o=5,nodeStrokeWidth:l,nodeComponent:u,bgColor:f,maskColor:h,maskStrokeColor:g,maskStrokeWidth:m,position:y="bottom-right",onClick:b,onNodeClick:k,pannable:v=!1,zoomable:S=!1,ariaLabel:E,inversePan:C,zoomStep:N=1,offsetScale:_=5}){const D=Vt(),T=A.useRef(null),{boundingRect:M,viewBB:I,rfId:F,panZoom:$,translateExtent:U,flowWidth:K,flowHeight:Q,ariaLabelConfig:B}=mt(vY,Gt),H=(e==null?void 0:e.width)??yY,z=(e==null?void 0:e.height)??bY,Y=M.width/H,W=M.height/z,G=Math.max(Y,W),O=G*H,L=G*z,V=_*G,R=M.x-(O-M.width)/2-V,se=M.y-(L-M.height)/2-V,ge=O+V*2,ye=L+V*2,xe=`${wY}-${F}`,q=A.useRef(0),ne=A.useRef();q.current=G,A.useEffect(()=>{if(T.current&&$)return ne.current=DK({domNode:T.current,panZoom:$,getTransform:()=>D.getState().transform,getViewScale:()=>q.current}),()=>{var be;(be=ne.current)==null||be.destroy()}},[$]),A.useEffect(()=>{var be;(be=ne.current)==null||be.update({translateExtent:U,width:K,height:Q,inversePan:C,pannable:v,zoomStep:N,zoomable:S})},[v,S,C,N,U,K,Q]);const ue=b?be=>{var we;const[je,De]=((we=ne.current)==null?void 0:we.pointer(be))||[0,0];b(be,{x:je,y:De})}:void 0,ce=k?A.useCallback((be,je)=>{const De=D.getState().nodeLookup.get(je).internals.userNode;k(be,De)},[]):void 0,de=E??B["minimap.ariaLabel"];return d.jsx(op,{position:y,style:{...e,"--xy-minimap-background-color-props":typeof f=="string"?f:void 0,"--xy-minimap-mask-background-color-props":typeof h=="string"?h:void 0,"--xy-minimap-mask-stroke-color-props":typeof g=="string"?g:void 0,"--xy-minimap-mask-stroke-width-props":typeof m=="number"?m*G:void 0,"--xy-minimap-node-background-color-props":typeof r=="string"?r:void 0,"--xy-minimap-node-stroke-color-props":typeof n=="string"?n:void 0,"--xy-minimap-node-stroke-width-props":typeof l=="number"?l:void 0},className:yn(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:d.jsxs("svg",{width:H,height:z,viewBox:`${R} ${se} ${ge} ${ye}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":xe,ref:T,onClick:ue,children:[de&&d.jsx("title",{id:xe,children:de}),d.jsx(gY,{onClick:ce,nodeColor:r,nodeStrokeColor:n,nodeBorderRadius:o,nodeClassName:a,nodeStrokeWidth:l,nodeComponent:u}),d.jsx("path",{className:"react-flow__minimap-mask",d:`M${R-V},${se-V}h${ge+V*2}v${ye+V*2}h${-ge-V*2}z
|
|
635
|
+
M${I.x},${I.y}h${I.width}v${I.height}h${-I.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}hA.displayName="MiniMap";A.memo(hA);const kY=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,EY={[Fl.Line]:"right",[Fl.Handle]:"bottom-right"};function SY({nodeId:e,position:t,variant:n=Fl.Handle,className:r,style:a=void 0,children:o,color:l,minWidth:u=10,minHeight:f=10,maxWidth:h=Number.MAX_VALUE,maxHeight:g=Number.MAX_VALUE,keepAspectRatio:m=!1,resizeDirection:y,autoScale:b=!0,shouldResize:k,onResizeStart:v,onResize:S,onResizeEnd:E}){const C=qj(),N=typeof e=="string"?e:C,_=Vt(),D=A.useRef(null),T=n===Fl.Handle,M=mt(A.useCallback(kY(T&&b),[T,b]),Gt),I=A.useRef(null),F=t??EY[n];A.useEffect(()=>{if(!(!D.current||!N))return I.current||(I.current=KK({domNode:D.current,nodeId:N,getStoreItems:()=>{const{nodeLookup:U,transform:K,snapGrid:Q,snapToGrid:B,nodeOrigin:H,domNode:z}=_.getState();return{nodeLookup:U,transform:K,snapGrid:Q,snapToGrid:B,nodeOrigin:H,paneDomNode:z}},onChange:(U,K)=>{const{triggerNodeChanges:Q,nodeLookup:B,parentLookup:H,nodeOrigin:z}=_.getState(),Y=[],W={x:U.x,y:U.y},G=B.get(N);if(G&&G.expandParent&&G.parentId){const O=G.origin??z,L=U.width??G.measured.width??0,V=U.height??G.measured.height??0,R={id:G.id,parentId:G.parentId,rect:{width:L,height:V,...fj({x:U.x??G.position.x,y:U.y??G.position.y},{width:L,height:V},G.parentId,B,O)}},se=$x([R],B,H,z);Y.push(...se),W.x=U.x?Math.max(O[0]*L,U.x):void 0,W.y=U.y?Math.max(O[1]*V,U.y):void 0}if(W.x!==void 0&&W.y!==void 0){const O={id:N,type:"position",position:{...W}};Y.push(O)}if(U.width!==void 0&&U.height!==void 0){const L={id:N,type:"dimensions",resizing:!0,setAttributes:y?y==="horizontal"?"width":"height":!0,dimensions:{width:U.width,height:U.height}};Y.push(L)}for(const O of K){const L={...O,type:"position"};Y.push(L)}Q(Y)},onEnd:({width:U,height:K})=>{const Q={id:N,type:"dimensions",resizing:!1,dimensions:{width:U,height:K}};_.getState().triggerNodeChanges([Q])}})),I.current.update({controlPosition:F,boundaries:{minWidth:u,minHeight:f,maxWidth:h,maxHeight:g},keepAspectRatio:m,resizeDirection:y,onResizeStart:v,onResize:S,onResizeEnd:E,shouldResize:k}),()=>{var U;(U=I.current)==null||U.destroy()}},[F,u,f,h,g,m,v,S,E,k]);const $=F.split("-");return d.jsx("div",{className:yn(["react-flow__resize-control","nodrag",...$,n,r]),ref:D,style:{...a,scale:M,...l&&{[T?"backgroundColor":"borderColor"]:l}},children:o})}A.memo(SY);function NY(e){return ht(`/api/smartarrange/${encodeURIComponent(e)}`)}async function _Y(e){const t=await fetch(`/api/smartarrange/${encodeURIComponent(e)}/approve`,{method:"POST"});if(!t.ok)throw new Error(`${t.status}: ${await t.text()}`);return t.json()}const py=["var(--color-accent-mint)","var(--color-accent-pink)","var(--color-accent-purple)","var(--color-accent-yellow)","var(--color-running-bg)","var(--color-idle-bg)","var(--color-stuck-bg)"];function _S(e,t){return py[t%py.length]??py[0]}const pA={done:"var(--color-cta)",doing:"var(--color-secondary-dark)",todo:"var(--color-text-subtle)",stuck:"var(--color-crashed)"},sl={width:9,height:9,background:"var(--color-bg)",border:"2px solid var(--color-text)"},CY=A.memo(function({data:t,selected:n}){var a;const r=t;return d.jsxs("div",{className:"rounded-xl border-[3px] border-[var(--color-text)] bg-[var(--color-bg)] overflow-hidden cursor-pointer flex flex-col",style:{width:260,height:158,boxShadow:n?"5px 5px 0 var(--color-text)":"3px 3px 0 var(--color-text)",transform:n?"translate(-1px,-1px)":void 0},children:[d.jsx(ji,{id:"l-t",type:"target",position:Ie.Left,style:sl}),d.jsx(ji,{id:"r-t",type:"target",position:Ie.Right,style:sl}),d.jsx(ji,{id:"t-t",type:"target",position:Ie.Top,style:sl}),d.jsxs("div",{className:"flex items-center gap-2 px-2.5 py-1.5 border-b-[3px] border-[var(--color-text)]",style:{background:r.color},children:[d.jsxs("span",{className:"font-[family-name:var(--font-mono)] text-xs font-bold text-[var(--color-text)]",children:["#",r.seq]}),d.jsx("span",{className:"text-[11px] text-[var(--color-text)] truncate",children:r.taskLabel}),d.jsx("span",{className:"w-2.5 h-2.5 rounded-full inline-block shrink-0 ml-auto border border-[var(--color-text)]",style:{background:pA[r.status]??"gray"},title:r.status})]}),d.jsxs("div",{className:"px-2.5 py-2 flex-1 min-h-0 overflow-hidden",children:[d.jsx("p",{className:"text-[13px] font-semibold text-[var(--color-text)] leading-snug line-clamp-3",children:r.title}),((a=r.skills)==null?void 0:a.length)>0&&d.jsx("div",{className:"flex flex-wrap gap-1 mt-2 max-h-[46px] overflow-hidden",children:r.skills.slice(0,6).map(o=>d.jsx("span",{className:"text-[10px] font-[family-name:var(--font-mono)] px-1.5 py-0.5 rounded border border-[var(--color-text)] bg-[var(--color-bg-cream)] text-[var(--color-text)]",children:o},o))})]}),d.jsx(ji,{id:"r-s",type:"source",position:Ie.Right,style:sl}),d.jsx(ji,{id:"l-s",type:"source",position:Ie.Left,style:sl}),d.jsx(ji,{id:"b-s",type:"source",position:Ie.Bottom,style:sl})]})});function jY({card:e,status:t,onClose:n}){var a;const r=Le();return A.useEffect(()=>{const o=l=>{l.key==="Escape"&&n()};return window.addEventListener("keydown",o),()=>window.removeEventListener("keydown",o)},[n]),d.jsx("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 z-40 flex items-start justify-center p-6 bg-black/30 overflow-auto",onClick:n,children:d.jsxs("div",{className:"nb-card mt-12 w-full max-w-2xl bg-[var(--color-bg)]",onClick:o=>o.stopPropagation(),children:[d.jsxs("header",{className:"flex items-start justify-between gap-4 mb-4",children:[d.jsxs("div",{className:"flex-1 min-w-0",children:[d.jsxs("div",{className:"flex items-center gap-2 mb-2 flex-wrap",children:[d.jsxs("span",{className:"font-[family-name:var(--font-mono)] font-bold text-xs px-2 py-0.5 bg-[var(--color-accent-purple)] border-2 border-[var(--color-text)] rounded-full",children:["#",e.seq]}),d.jsxs("span",{className:"font-[family-name:var(--font-mono)] text-xs px-2 py-0.5 bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-full font-semibold",children:[r("arrange.cardTask")," T",e.taskId]}),d.jsxs("span",{className:"inline-flex items-center gap-1.5 text-xs px-2 py-0.5 border-2 border-[var(--color-text)] rounded-full font-semibold",children:[d.jsx("span",{className:"w-2.5 h-2.5 rounded-full inline-block border border-[var(--color-text)]",style:{background:pA[t]??"gray"}}),t]})]}),d.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-2xl font-bold break-words",children:e.title})]}),d.jsx("button",{onClick:n,className:"nb-btn nb-btn-mint p-2 flex-shrink-0","aria-label":r("arrange.close"),type:"button",children:d.jsx(dr,{size:14,strokeWidth:3})})]}),d.jsxs("div",{className:"flex flex-col gap-4",children:[e.at&&d.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[d.jsx(SN,{size:14,strokeWidth:2.5}),d.jsx("span",{className:"font-[family-name:var(--font-mono)]",children:e.at})]}),((a=e.skills)==null?void 0:a.length)>0&&d.jsxs("div",{children:[d.jsx("div",{className:"text-sm font-bold mb-1.5",children:r("arrange.cardSkills")}),d.jsx("div",{className:"flex items-center gap-2 flex-wrap",children:e.skills.map(o=>d.jsx(Jb,{name:o},o))})]}),e.prompt&&d.jsxs("div",{children:[d.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-2 uppercase tracking-wider",children:r("arrange.cardPrompt")}),d.jsx("pre",{className:"text-xs whitespace-pre-wrap font-[family-name:var(--font-mono)] bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg p-4 max-h-72 overflow-auto",children:e.prompt})]}),d.jsxs("div",{children:[d.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-2 uppercase tracking-wider",children:r("arrange.cardLog")}),d.jsxs("pre",{className:"text-xs whitespace-pre-wrap font-[family-name:var(--font-mono)] bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg p-4",children:[e.at?`${e.at} [派发] #${e.seq} → ${r("arrange.cardTask")} T${e.taskId}`:"—",`
|
|
636
|
+
${e.at??""} [状态] ${t}`]})]})]})]})})}const AY=A.memo(function({data:t}){const n=t;return d.jsxs("div",{className:"relative w-full h-full rounded-2xl border-2 border-dashed border-[var(--color-text)]",children:[d.jsx("div",{className:"absolute inset-0 rounded-2xl",style:{background:n.color,opacity:.16}}),d.jsx("span",{className:"absolute top-1.5 left-2.5 px-2 py-0.5 text-[11px] font-bold rounded-md border-2 border-[var(--color-text)] bg-[var(--color-bg)] text-[var(--color-text)] whitespace-nowrap max-w-[90%] truncate",children:n.label})]})}),TY={card:CY,laneBox:AY},qx=260,mA=qx+36,MY=200,DY={todo:"var(--color-text-subtle)",doing:"var(--color-secondary-dark)",done:"var(--color-cta)",rework:"var(--color-secondary-dark)"};function hb(e,t,n){return e==="doing"&&t<n?"stuck":e}function OY(e,t){const n=Math.floor(e/t),r=e%t;return{x:(n%2===0?r:t-1-r)*mA,y:n*MY}}function RY(e,t,n){const r=Math.floor(e/n),a=Math.floor(t/n);return r===a?r%2===0?{sourceHandle:"r-s",targetHandle:"l-t"}:{sourceHandle:"l-s",targetHandle:"r-t"}:{sourceHandle:"b-s",targetHandle:"t-t"}}function LY(e){return e==="done"?{animated:!1,style:{stroke:"var(--color-cta)",strokeWidth:2.5}}:e==="doing"?{animated:!0,style:{stroke:"var(--color-secondary-dark)",strokeWidth:3}}:e==="stuck"?{animated:!1,style:{stroke:"var(--color-crashed)",strokeWidth:2.5,strokeDasharray:"6 4"}}:{animated:!1,style:{stroke:"var(--color-accent-yellow)",strokeWidth:2.5,strokeDasharray:"6 4"}}}const gA=158,CS=qx+60,jS=gA+28,AS=40;function IY({cards:e,taskMeta:t,view:n,onSelect:r}){const a=A.useRef(null),[o,l]=A.useState(4),u=lp(),[f,h,g]=WV([]),[m,y]=XV([]),b=A.useRef("");return A.useEffect(()=>{const k=a.current;if(!k)return;const v=new ResizeObserver(S=>{var C;const E=((C=S[0])==null?void 0:C.contentRect.width)??800;l(Math.max(1,Math.min(8,Math.floor((E-40)/mA))))});return v.observe(k),()=>v.disconnect()},[]),A.useEffect(()=>{const k=[...e].sort((T,M)=>T.seq-M.seq),v=`${n}:${o}:${k.length}`,S=b.current!==v;b.current=v;const E=new Map,C=(T,M)=>{var I;if(n==="lane"){const F=((I=t.get(T.taskId))==null?void 0:I.order)??0,$=E.get(T.taskId)??0;return E.set(T.taskId,$+1),{x:F*CS,y:$*jS}}return OY(M,o)},N=[];if(n==="lane"){const T=new Map;for(const M of k)T.set(M.taskId,(T.get(M.taskId)??0)+1);for(const[M,I]of T){const F=t.get(M),$=(F==null?void 0:F.order)??0;N.push({id:`lane-${M}`,type:"laneBox",position:{x:$*CS-16,y:-AS},data:{label:F!=null&&F.title?`T${M} · ${F.title}`:`T${M}`,color:(F==null?void 0:F.color)??"var(--color-bg-cream)"},style:{width:qx+32,height:AS+(I-1)*jS+gA+14},draggable:!1,selectable:!1,zIndex:0})}}const _=k.length?k[k.length-1].seq:0;h(T=>{const M=new Map(T.map(F=>[F.id,F])),I=k.map((F,$)=>{const U=t.get(F.taskId),K={seq:F.seq,title:F.title,skills:F.skills??[],taskLabel:`T${F.taskId}`,status:hb(F.status,F.seq,_),color:(U==null?void 0:U.color)??"var(--color-bg-cream)"},Q=String(F.seq),B=M.get(Q),H=C(F,$);return{...B&&!S?{...B,data:K}:{id:Q,type:"card",position:H,data:K},zIndex:1}});return[...N,...I]});const D=[];for(let T=1;T<k.length;T++){const M=k[T-1],I=k[T];if(!M||!I)continue;const F=n==="lane"?M.taskId===I.taskId?{sourceHandle:"b-s",targetHandle:"t-t"}:{sourceHandle:"r-s",targetHandle:"l-t"}:RY(T-1,T,o);D.push({id:`e${M.seq}-${I.seq}`,source:String(M.seq),target:String(I.seq),...F,...LY(hb(I.status,I.seq,_))})}y(D),S&&requestAnimationFrame(()=>u.fitView({padding:.2,maxZoom:1.1,duration:300}))},[e,o,t,n,h,y,u]),d.jsx("div",{ref:a,className:"w-full h-full",children:d.jsxs(QV,{nodes:f,edges:m,onNodesChange:g,nodeTypes:TY,onNodeClick:(k,v)=>r(Number(v.id)),fitView:!0,fitViewOptions:{padding:.2,maxZoom:1.1},proOptions:{hideAttribution:!0},minZoom:.15,children:[d.jsx(nY,{variant:ua.Dots,gap:20,size:1.5,color:"var(--color-border-light)"}),d.jsx(cY,{showInteractive:!1})]})})}function zY(){var $,U,K;const e=Le(),t=an(),{alert:n}=jn(),a=((($=Ge({queryKey:["projects"],queryFn:ga,refetchInterval:3e3}).data)==null?void 0:$.data)??[]).filter(Q=>Q.pipelineMode==="smartArrange"),o=a.map(Q=>Q.name),[l,u]=A.useState(()=>localStorage.getItem("arrange.project")??""),f=l&&o.includes(l)?l:o[0]??"";A.useEffect(()=>{l&&localStorage.setItem("arrange.project",l)},[l]);const h=a.find(Q=>Q.name===f),g=(h==null?void 0:h.pipelineStatus)==="running",m=Ge({queryKey:["smartarrange",f],queryFn:()=>NY(f),enabled:!!f,refetchInterval:3e3}),y=Rt({mutationFn:()=>_Y(f),onSuccess:()=>t.invalidateQueries({queryKey:["smartarrange",f]}),onError:Q=>void n({title:e("arrange.approveErr"),body:Q instanceof Error?Q.message:String(Q)})}),b=Rt({mutationFn:()=>H_(f),onSuccess:()=>t.invalidateQueries({queryKey:["projects"]}),onError:Q=>void n({title:e("arrange.startErr"),body:Q instanceof Error?Q.message:String(Q)})}),k=Rt({mutationFn:()=>K_(f),onSuccess:()=>t.invalidateQueries({queryKey:["projects"]}),onError:Q=>void n({title:e("arrange.startErr"),body:Q instanceof Error?Q.message:String(Q)})}),v=(U=m.data)==null?void 0:U.plan,S=A.useMemo(()=>{var Q;return((Q=m.data)==null?void 0:Q.cards)??[]},[(K=m.data)==null?void 0:K.cards]),[E,C]=A.useState(()=>localStorage.getItem("arrange.view")==="lane"?"lane":"free");A.useEffect(()=>{localStorage.setItem("arrange.view",E)},[E]);const N=A.useMemo(()=>{const Q=new Map;return((v==null?void 0:v.tasks)??[]).forEach((B,H)=>Q.set(B.id,{order:H,status:B.status,color:_S(B.id,H),title:B.title})),Q},[v==null?void 0:v.tasks]),[_,D]=A.useState(()=>localStorage.getItem("arrange.panel")!=="0");A.useEffect(()=>{localStorage.setItem("arrange.panel",_?"1":"0")},[_]);const[T,M]=A.useState(null),I=A.useMemo(()=>S.find(Q=>Q.seq===T),[S,T]),F=S.length?Math.max(...S.map(Q=>Q.seq)):0;return d.jsxs("div",{className:"flex flex-col gap-4 h-full min-h-0",children:[d.jsxs("header",{className:"flex items-center justify-between gap-3 flex-wrap shrink-0",children:[d.jsxs("div",{className:"flex items-center gap-4 flex-wrap",children:[d.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-3xl font-bold",children:e("arrange.h1")}),f&&d.jsxs("div",{className:"flex items-center gap-2",children:[g?d.jsxs("button",{className:"nb-btn nb-btn-yellow",style:{padding:"6px 12px",fontSize:12},onClick:()=>k.mutate(),disabled:k.isPending,type:"button","aria-label":e("arrange.stop"),children:[k.isPending?d.jsx(nt,{size:12,strokeWidth:3,className:"animate-spin"}):d.jsx(Mb,{size:12,strokeWidth:3}),e("arrange.stop")]}):d.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"6px 12px",fontSize:12},onClick:()=>b.mutate(),disabled:b.isPending,type:"button","aria-label":e("arrange.start"),children:[b.isPending?d.jsx(nt,{size:12,strokeWidth:3,className:"animate-spin"}):d.jsx(Hu,{size:12,strokeWidth:3}),e("arrange.start")]}),v&&d.jsxs(d.Fragment,{children:[d.jsx("span",{className:"nb-status",style:{background:"var(--color-bg-cream)",color:"var(--color-text)"},children:v.status}),d.jsxs("span",{className:"text-sm text-[var(--color-text-muted)]",children:["round ",v.round,"/",v.maxRounds]}),v.status==="awaiting-approval"&&d.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"6px 12px",fontSize:12},onClick:()=>y.mutate(),disabled:y.isPending,type:"button","aria-label":e("arrange.approve"),children:[y.isPending?d.jsx(nt,{size:12,strokeWidth:3,className:"animate-spin"}):d.jsx(sh,{size:12,strokeWidth:2.5}),e("arrange.approve")]})]})]})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[v&&d.jsxs("button",{className:"nb-btn",style:{padding:"6px 10px",fontSize:12},onClick:()=>C(E==="free"?"lane":"free"),type:"button","aria-label":e("arrange.view"),children:[E==="lane"?d.jsx(hL,{size:14,strokeWidth:2.5}):d.jsx(_N,{size:14,strokeWidth:2.5}),e(E==="lane"?"arrange.viewLane":"arrange.viewFree")]}),d.jsxs("select",{className:"nb-input",style:{maxWidth:240},value:f,onChange:Q=>u(Q.target.value),"aria-label":e("arrange.project"),children:[o.length===0&&d.jsx("option",{value:"",children:"—"}),o.map(Q=>d.jsx("option",{value:Q,children:Q},Q))]})]})]}),v?d.jsxs("div",{className:"flex gap-4 flex-1 min-h-0",children:[d.jsxs("div",{className:"relative flex-1 min-h-0 rounded-2xl border-[3px] border-[var(--color-text)] overflow-hidden bg-[var(--color-bg-soft)]",style:{boxShadow:"4px 4px 0 var(--color-text)"},children:[S.length===0?d.jsx("div",{className:"absolute inset-0 grid place-items-center p-6",children:v.status==="running"?d.jsxs("div",{className:"flex flex-col items-center gap-3 text-[var(--color-text-muted)]",children:[d.jsx(nt,{size:28,strokeWidth:3,className:"animate-spin"}),d.jsx("p",{className:"text-sm",children:e("arrange.orchestrating")})]}):d.jsx("p",{className:"text-[var(--color-text-muted)] text-sm text-center max-w-sm",children:e("arrange.noCards")})}):d.jsx(uA,{children:d.jsx(IY,{cards:S,taskMeta:N,view:E,onSelect:M})}),!_&&d.jsxs("button",{className:"nb-btn absolute right-3 top-3 z-10",style:{padding:"6px 10px",fontSize:12},onClick:()=>D(!0),type:"button","aria-label":e("arrange.expand"),children:[d.jsx(Yl,{size:14,strokeWidth:3,className:"rotate-180"}),e("arrange.tasks")]})]}),_&&d.jsxs("aside",{className:"w-72 shrink-0 nb-card overflow-auto flex flex-col gap-2",style:{padding:12},children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-lg font-bold",children:e("arrange.tasks")}),d.jsx("button",{className:"nb-btn",style:{padding:"2px 6px"},onClick:()=>D(!1),type:"button","aria-label":e("arrange.collapse"),children:d.jsx(XR,{size:14,strokeWidth:2.5})})]}),v.tasks.length===0?d.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 py-10 text-[var(--color-text-muted)]",children:[d.jsx(nt,{size:22,strokeWidth:3,className:"animate-spin"}),d.jsx("p",{className:"text-xs text-center",children:e("arrange.planning")})]}):d.jsx("ul",{className:"flex flex-col gap-2",children:v.tasks.map((Q,B)=>d.jsxs("li",{className:"rounded-lg border-2 border-[var(--color-text)] p-2",style:{background:_S(Q.id,B)},children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"w-2.5 h-2.5 rounded-full inline-block shrink-0 border border-[var(--color-text)]",style:{background:DY[Q.status]??"gray"}}),d.jsxs("span",{className:"font-bold text-xs text-[var(--color-text)]",children:["T",Q.id]}),d.jsxs("span",{className:"text-[11px] ml-auto font-[family-name:var(--font-mono)] text-[var(--color-text)]",children:[Q.cardSeqs.length," ",e("arrange.cardsCount")]})]}),d.jsx("p",{className:"text-xs text-[var(--color-text)] mt-1 leading-snug",children:Q.title})]},Q.id))})]})]}):d.jsx("section",{className:"nb-card",children:g?d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx(nt,{size:18,strokeWidth:3,className:"animate-spin"}),d.jsx("p",{className:"text-sm font-bold",children:e("arrange.starting")})]}):d.jsx("p",{className:"text-[var(--color-text-muted)] text-sm",children:e("arrange.none")})}),I&&d.jsx(jY,{card:I,status:hb(I.status,I.seq,F),onClose:()=>M(null)})]})}function PY(){const e=Le();return d.jsxs("div",{className:"nb-card max-w-2xl mt-12",children:[d.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold mb-2",children:e("notFound.title")}),d.jsx("p",{className:"text-[var(--color-text-muted)] mb-6",children:e("notFound.body")}),d.jsx(ha,{to:"/",className:"nb-btn nb-btn-mint inline-flex",children:e("notFound.home")})]})}function BY(){return d.jsx(w3,{children:d.jsx(mO,{children:d.jsxs(mn,{element:d.jsx(x3,{}),children:[d.jsx(mn,{index:!0,element:d.jsx(fO,{to:"/projects",replace:!0})}),d.jsx(mn,{path:"/projects",element:d.jsx(E3,{})}),d.jsx(mn,{path:"/projects/new",element:d.jsx(R3,{})}),d.jsx(mn,{path:"/projects/:name",element:d.jsx(az,{})}),d.jsx(mn,{path:"/board",element:d.jsx(Iz,{})}),d.jsx(mn,{path:"/workers",element:d.jsx(Xz,{})}),d.jsx(mn,{path:"/logs",element:d.jsx(n4,{})}),d.jsx(mn,{path:"/skills",element:d.jsx(wF,{})}),d.jsx(mn,{path:"/prompts",element:d.jsx(CF,{})}),d.jsx(mn,{path:"/system",element:d.jsx(AF,{})}),d.jsx(mn,{path:"/processes",element:d.jsx(n8,{})}),d.jsx(mn,{path:"/audit",element:d.jsx(s8,{})}),d.jsx(mn,{path:"/chat",element:d.jsx(pE,{})}),d.jsx(mn,{path:"/chat/:sessionId",element:d.jsx(pE,{})}),d.jsx(mn,{path:"/memory",element:d.jsx(o8,{})}),d.jsx(mn,{path:"/plugins",element:d.jsx(d8,{})}),d.jsx(mn,{path:"/arrange",element:d.jsx(zY,{})}),d.jsx(mn,{path:"*",element:d.jsx(PY,{})})]})})})}v3();const UY=new nD({defaultOptions:{queries:{staleTime:3e4,refetchOnWindowFocus:!1}}}),yA=document.getElementById("root");if(!yA)throw new Error("#root not found");MM.createRoot(yA).render(d.jsx(A.StrictMode,{children:d.jsx(KL,{children:d.jsx(rD,{client:UY,children:d.jsx(UO,{children:d.jsx(M3,{children:d.jsx(BY,{})})})})})}));
|