syntaur 0.5.2 → 0.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dashboard/dist/assets/{_basePickBy-ij-Ukp6s.js → _basePickBy-DqA1yD9s.js} +1 -1
- package/dashboard/dist/assets/{_baseUniq-CZKk9gZR.js → _baseUniq-CgN0Iv38.js} +1 -1
- package/dashboard/dist/assets/{arc-C30UbJZB.js → arc-DgB3MKjO.js} +1 -1
- package/dashboard/dist/assets/{architectureDiagram-2XIMDMQ5-BDVieGIr.js → architectureDiagram-2XIMDMQ5-MTDIkEyu.js} +1 -1
- package/dashboard/dist/assets/{blockDiagram-WCTKOSBZ-DZYY4t9w.js → blockDiagram-WCTKOSBZ-I46jD1td.js} +1 -1
- package/dashboard/dist/assets/{c4Diagram-IC4MRINW-B019MXol.js → c4Diagram-IC4MRINW-JqqM3A9W.js} +1 -1
- package/dashboard/dist/assets/channel-B4s4rTYI.js +1 -0
- package/dashboard/dist/assets/{chunk-4BX2VUAB-DrkTwY15.js → chunk-4BX2VUAB-CCzfQiva.js} +1 -1
- package/dashboard/dist/assets/{chunk-55IACEB6-mFTAE8DD.js → chunk-55IACEB6-BRicQJbU.js} +1 -1
- package/dashboard/dist/assets/{chunk-FMBD7UC4-VgDZaNoS.js → chunk-FMBD7UC4-DDGrEm9o.js} +1 -1
- package/dashboard/dist/assets/{chunk-JSJVCQXG-C_KXaq-c.js → chunk-JSJVCQXG-DQDIUaJ5.js} +1 -1
- package/dashboard/dist/assets/{chunk-KX2RTZJC-DI-P_pPL.js → chunk-KX2RTZJC-s54oa7En.js} +1 -1
- package/dashboard/dist/assets/{chunk-NQ4KR5QH-TgYAsxTk.js → chunk-NQ4KR5QH-BAd0ryDR.js} +1 -1
- package/dashboard/dist/assets/{chunk-QZHKN3VN-Drfv_VpM.js → chunk-QZHKN3VN-CaG2de4F.js} +1 -1
- package/dashboard/dist/assets/{chunk-WL4C6EOR-CpLwvo_U.js → chunk-WL4C6EOR-sYE1pmwc.js} +1 -1
- package/dashboard/dist/assets/classDiagram-VBA2DB6C-CZUrPM07.js +1 -0
- package/dashboard/dist/assets/classDiagram-v2-RAHNMMFH-CZUrPM07.js +1 -0
- package/dashboard/dist/assets/clone-Dv7yV4O2.js +1 -0
- package/dashboard/dist/assets/{cose-bilkent-S5V4N54A-CkKtF37m.js → cose-bilkent-S5V4N54A-Cg_S9Qjs.js} +1 -1
- package/dashboard/dist/assets/{dagre-KLK3FWXG-BBlY_FL3.js → dagre-KLK3FWXG-Dwvkdoks.js} +1 -1
- package/dashboard/dist/assets/{diagram-E7M64L7V-DLsFDLHm.js → diagram-E7M64L7V-CbXW2F--.js} +1 -1
- package/dashboard/dist/assets/{diagram-IFDJBPK2--sb7diMG.js → diagram-IFDJBPK2-zZVy4Luk.js} +1 -1
- package/dashboard/dist/assets/{diagram-P4PSJMXO-D2LuEWVt.js → diagram-P4PSJMXO-DZAlQraU.js} +1 -1
- package/dashboard/dist/assets/{erDiagram-INFDFZHY-C1BEeili.js → erDiagram-INFDFZHY-6cHkl5xD.js} +1 -1
- package/dashboard/dist/assets/{flowDiagram-PKNHOUZH-BpbapQbU.js → flowDiagram-PKNHOUZH-CKZRsUC0.js} +1 -1
- package/dashboard/dist/assets/{ganttDiagram-A5KZAMGK-Io60qUuG.js → ganttDiagram-A5KZAMGK-DIlglJ9Q.js} +1 -1
- package/dashboard/dist/assets/{gitGraphDiagram-K3NZZRJ6-oemlGgRh.js → gitGraphDiagram-K3NZZRJ6-DFtox46y.js} +1 -1
- package/dashboard/dist/assets/{graph-BZb-lGfH.js → graph-gOeYAZHK.js} +1 -1
- package/dashboard/dist/assets/index-DIczdcwd.css +1 -0
- package/dashboard/dist/assets/index-DabqR6PW.js +481 -0
- package/dashboard/dist/assets/{infoDiagram-LFFYTUFH-Ca4mwnZF.js → infoDiagram-LFFYTUFH-BSZBkrxW.js} +1 -1
- package/dashboard/dist/assets/{ishikawaDiagram-PHBUUO56-9zuQ8y8W.js → ishikawaDiagram-PHBUUO56-CUyd2rdL.js} +1 -1
- package/dashboard/dist/assets/{journeyDiagram-4ABVD52K-OdeeOdMx.js → journeyDiagram-4ABVD52K-DMOgR3V0.js} +1 -1
- package/dashboard/dist/assets/{kanban-definition-K7BYSVSG-Cie4JtFn.js → kanban-definition-K7BYSVSG-Dtbxd8Eb.js} +1 -1
- package/dashboard/dist/assets/{layout-Bmx2mvFv.js → layout-QCf7g5sC.js} +1 -1
- package/dashboard/dist/assets/{linear-CW6K_-MX.js → linear-5jD8xK0U.js} +1 -1
- package/dashboard/dist/assets/{mermaid.core-DmfO6BgK.js → mermaid.core-kxfDb1ct.js} +4 -4
- package/dashboard/dist/assets/{mindmap-definition-YRQLILUH-L6b3vG79.js → mindmap-definition-YRQLILUH-doBW0swI.js} +1 -1
- package/dashboard/dist/assets/{pieDiagram-SKSYHLDU-CkHTCIWg.js → pieDiagram-SKSYHLDU-CqIvYb35.js} +1 -1
- package/dashboard/dist/assets/{quadrantDiagram-337W2JSQ-B9MqhhIC.js → quadrantDiagram-337W2JSQ-BZAbCvmw.js} +1 -1
- package/dashboard/dist/assets/{requirementDiagram-Z7DCOOCP-CyHAfXCK.js → requirementDiagram-Z7DCOOCP-y_PYzin9.js} +1 -1
- package/dashboard/dist/assets/{sankeyDiagram-WA2Y5GQK-DHNzGGyE.js → sankeyDiagram-WA2Y5GQK-DBtnNQIQ.js} +1 -1
- package/dashboard/dist/assets/{sequenceDiagram-2WXFIKYE-BVvcJkrx.js → sequenceDiagram-2WXFIKYE-BJNMqOeF.js} +1 -1
- package/dashboard/dist/assets/{stateDiagram-RAJIS63D-CZ2cknh7.js → stateDiagram-RAJIS63D-DesYeUWd.js} +1 -1
- package/dashboard/dist/assets/stateDiagram-v2-FVOUBMTO-CbJcvA8M.js +1 -0
- package/dashboard/dist/assets/{timeline-definition-YZTLITO2-BXUtlVyd.js → timeline-definition-YZTLITO2-B-iNZkiE.js} +1 -1
- package/dashboard/dist/assets/{treemap-KZPCXAKY-Dgi-hMKM.js → treemap-KZPCXAKY-BHdixPrl.js} +1 -1
- package/dashboard/dist/assets/{vennDiagram-LZ73GAT5-C9zGrrUQ.js → vennDiagram-LZ73GAT5-DE52hvrZ.js} +1 -1
- package/dashboard/dist/assets/{xychartDiagram-JWTSCODW-Dq71BUtc.js → xychartDiagram-JWTSCODW-CpCVkMuD.js} +1 -1
- package/dashboard/dist/index.html +2 -2
- package/package.json +1 -1
- package/dashboard/dist/assets/channel-DH4gshIt.js +0 -1
- package/dashboard/dist/assets/classDiagram-VBA2DB6C-emsfh8H4.js +0 -1
- package/dashboard/dist/assets/classDiagram-v2-RAHNMMFH-emsfh8H4.js +0 -1
- package/dashboard/dist/assets/clone-gdeRwgBN.js +0 -1
- package/dashboard/dist/assets/index-BSVCsfvM.css +0 -1
- package/dashboard/dist/assets/index-CXWVuGs-.js +0 -481
- package/dashboard/dist/assets/stateDiagram-v2-FVOUBMTO-C4CPervD.js +0 -1
|
@@ -0,0 +1,481 @@
|
|
|
1
|
+
function Rj(e,t){for(var n=0;n<t.length;n++){const o=t[n];if(typeof o!="string"&&!Array.isArray(o)){for(const i in o)if(i!=="default"&&!(i in e)){const l=Object.getOwnPropertyDescriptor(o,i);l&&Object.defineProperty(e,i,l.get?l:{enumerable:!0,get:()=>o[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))o(i);new MutationObserver(i=>{for(const l of i)if(l.type==="childList")for(const c of l.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&o(c)}).observe(document,{childList:!0,subtree:!0});function n(i){const l={};return i.integrity&&(l.integrity=i.integrity),i.referrerPolicy&&(l.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?l.credentials="include":i.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function o(i){if(i.ep)return;i.ep=!0;const l=n(i);fetch(i.href,l)}})();function yc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function g_(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function o(){return this instanceof o?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(o){var i=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(n,o,i.get?i:{enumerable:!0,get:function(){return e[o]}})}),n}var Ld={exports:{}},Li={},Od={exports:{}},Ue={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react.production.min.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its 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 Yg;function Aj(){if(Yg)return Ue;Yg=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),x=Symbol.iterator;function v(B){return B===null||typeof B!="object"?null:(B=x&&B[x]||B["@@iterator"],typeof B=="function"?B:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,k={};function j(B,X,O){this.props=B,this.context=X,this.refs=k,this.updater=O||b}j.prototype.isReactComponent={},j.prototype.setState=function(B,X){if(typeof B!="object"&&typeof B!="function"&&B!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,B,X,"setState")},j.prototype.forceUpdate=function(B){this.updater.enqueueForceUpdate(this,B,"forceUpdate")};function S(){}S.prototype=j.prototype;function T(B,X,O){this.props=B,this.context=X,this.refs=k,this.updater=O||b}var R=T.prototype=new S;R.constructor=T,N(R,j.prototype),R.isPureReactComponent=!0;var D=Array.isArray,M=Object.prototype.hasOwnProperty,P={current:null},L={key:!0,ref:!0,__self:!0,__source:!0};function _(B,X,O){var se,me={},fe=null,Pe=null;if(X!=null)for(se in X.ref!==void 0&&(Pe=X.ref),X.key!==void 0&&(fe=""+X.key),X)M.call(X,se)&&!L.hasOwnProperty(se)&&(me[se]=X[se]);var Ce=arguments.length-2;if(Ce===1)me.children=O;else if(1<Ce){for(var pe=Array(Ce),xe=0;xe<Ce;xe++)pe[xe]=arguments[xe+2];me.children=pe}if(B&&B.defaultProps)for(se in Ce=B.defaultProps,Ce)me[se]===void 0&&(me[se]=Ce[se]);return{$$typeof:e,type:B,key:fe,ref:Pe,props:me,_owner:P.current}}function J(B,X){return{$$typeof:e,type:B.type,key:X,ref:B.ref,props:B.props,_owner:B._owner}}function ne(B){return typeof B=="object"&&B!==null&&B.$$typeof===e}function U(B){var X={"=":"=0",":":"=2"};return"$"+B.replace(/[=:]/g,function(O){return X[O]})}var G=/\/+/g;function q(B,X){return typeof B=="object"&&B!==null&&B.key!=null?U(""+B.key):X.toString(36)}function ee(B,X,O,se,me){var fe=typeof B;(fe==="undefined"||fe==="boolean")&&(B=null);var Pe=!1;if(B===null)Pe=!0;else switch(fe){case"string":case"number":Pe=!0;break;case"object":switch(B.$$typeof){case e:case t:Pe=!0}}if(Pe)return Pe=B,me=me(Pe),B=se===""?"."+q(Pe,0):se,D(me)?(O="",B!=null&&(O=B.replace(G,"$&/")+"/"),ee(me,X,O,"",function(xe){return xe})):me!=null&&(ne(me)&&(me=J(me,O+(!me.key||Pe&&Pe.key===me.key?"":(""+me.key).replace(G,"$&/")+"/")+B)),X.push(me)),1;if(Pe=0,se=se===""?".":se+":",D(B))for(var Ce=0;Ce<B.length;Ce++){fe=B[Ce];var pe=se+q(fe,Ce);Pe+=ee(fe,X,O,pe,me)}else if(pe=v(B),typeof pe=="function")for(B=pe.call(B),Ce=0;!(fe=B.next()).done;)fe=fe.value,pe=se+q(fe,Ce++),Pe+=ee(fe,X,O,pe,me);else if(fe==="object")throw X=String(B),Error("Objects are not valid as a React child (found: "+(X==="[object Object]"?"object with keys {"+Object.keys(B).join(", ")+"}":X)+"). If you meant to render a collection of children, use an array instead.");return Pe}function $(B,X,O){if(B==null)return B;var se=[],me=0;return ee(B,se,"","",function(fe){return X.call(O,fe,me++)}),se}function I(B){if(B._status===-1){var X=B._result;X=X(),X.then(function(O){(B._status===0||B._status===-1)&&(B._status=1,B._result=O)},function(O){(B._status===0||B._status===-1)&&(B._status=2,B._result=O)}),B._status===-1&&(B._status=0,B._result=X)}if(B._status===1)return B._result.default;throw B._result}var A={current:null},F={transition:null},K={ReactCurrentDispatcher:A,ReactCurrentBatchConfig:F,ReactCurrentOwner:P};function E(){throw Error("act(...) is not supported in production builds of React.")}return Ue.Children={map:$,forEach:function(B,X,O){$(B,function(){X.apply(this,arguments)},O)},count:function(B){var X=0;return $(B,function(){X++}),X},toArray:function(B){return $(B,function(X){return X})||[]},only:function(B){if(!ne(B))throw Error("React.Children.only expected to receive a single React element child.");return B}},Ue.Component=j,Ue.Fragment=n,Ue.Profiler=i,Ue.PureComponent=T,Ue.StrictMode=o,Ue.Suspense=p,Ue.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=K,Ue.act=E,Ue.cloneElement=function(B,X,O){if(B==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+B+".");var se=N({},B.props),me=B.key,fe=B.ref,Pe=B._owner;if(X!=null){if(X.ref!==void 0&&(fe=X.ref,Pe=P.current),X.key!==void 0&&(me=""+X.key),B.type&&B.type.defaultProps)var Ce=B.type.defaultProps;for(pe in X)M.call(X,pe)&&!L.hasOwnProperty(pe)&&(se[pe]=X[pe]===void 0&&Ce!==void 0?Ce[pe]:X[pe])}var pe=arguments.length-2;if(pe===1)se.children=O;else if(1<pe){Ce=Array(pe);for(var xe=0;xe<pe;xe++)Ce[xe]=arguments[xe+2];se.children=Ce}return{$$typeof:e,type:B.type,key:me,ref:fe,props:se,_owner:Pe}},Ue.createContext=function(B){return B={$$typeof:c,_currentValue:B,_currentValue2:B,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},B.Provider={$$typeof:l,_context:B},B.Consumer=B},Ue.createElement=_,Ue.createFactory=function(B){var X=_.bind(null,B);return X.type=B,X},Ue.createRef=function(){return{current:null}},Ue.forwardRef=function(B){return{$$typeof:d,render:B}},Ue.isValidElement=ne,Ue.lazy=function(B){return{$$typeof:h,_payload:{_status:-1,_result:B},_init:I}},Ue.memo=function(B,X){return{$$typeof:m,type:B,compare:X===void 0?null:X}},Ue.startTransition=function(B){var X=F.transition;F.transition={};try{B()}finally{F.transition=X}},Ue.unstable_act=E,Ue.useCallback=function(B,X){return A.current.useCallback(B,X)},Ue.useContext=function(B){return A.current.useContext(B)},Ue.useDebugValue=function(){},Ue.useDeferredValue=function(B){return A.current.useDeferredValue(B)},Ue.useEffect=function(B,X){return A.current.useEffect(B,X)},Ue.useId=function(){return A.current.useId()},Ue.useImperativeHandle=function(B,X,O){return A.current.useImperativeHandle(B,X,O)},Ue.useInsertionEffect=function(B,X){return A.current.useInsertionEffect(B,X)},Ue.useLayoutEffect=function(B,X){return A.current.useLayoutEffect(B,X)},Ue.useMemo=function(B,X){return A.current.useMemo(B,X)},Ue.useReducer=function(B,X,O){return A.current.useReducer(B,X,O)},Ue.useRef=function(B){return A.current.useRef(B)},Ue.useState=function(B){return A.current.useState(B)},Ue.useSyncExternalStore=function(B,X,O){return A.current.useSyncExternalStore(B,X,O)},Ue.useTransition=function(){return A.current.useTransition()},Ue.version="18.3.1",Ue}var Xg;function ap(){return Xg||(Xg=1,Od.exports=Aj()),Od.exports}/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-jsx-runtime.production.min.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Facebook, Inc. and its 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 Qg;function Dj(){if(Qg)return Li;Qg=1;var e=ap(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(d,p,m){var h,x={},v=null,b=null;m!==void 0&&(v=""+m),p.key!==void 0&&(v=""+p.key),p.ref!==void 0&&(b=p.ref);for(h in p)o.call(p,h)&&!l.hasOwnProperty(h)&&(x[h]=p[h]);if(d&&d.defaultProps)for(h in p=d.defaultProps,p)x[h]===void 0&&(x[h]=p[h]);return{$$typeof:t,type:d,key:v,ref:b,props:x,_owner:i.current}}return Li.Fragment=n,Li.jsx=c,Li.jsxs=c,Li}var Jg;function Ij(){return Jg||(Jg=1,Ld.exports=Dj()),Ld.exports}var a=Ij(),g=ap();const jt=yc(g),cv=Rj({__proto__:null,default:jt},[g]);var Tl={},_d={exports:{}},kn={},Md={exports:{}},$d={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.min.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Facebook, Inc. and its 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 Zg;function Lj(){return Zg||(Zg=1,(function(e){function t(F,K){var E=F.length;F.push(K);e:for(;0<E;){var B=E-1>>>1,X=F[B];if(0<i(X,K))F[B]=K,F[E]=X,E=B;else break e}}function n(F){return F.length===0?null:F[0]}function o(F){if(F.length===0)return null;var K=F[0],E=F.pop();if(E!==K){F[0]=E;e:for(var B=0,X=F.length,O=X>>>1;B<O;){var se=2*(B+1)-1,me=F[se],fe=se+1,Pe=F[fe];if(0>i(me,E))fe<X&&0>i(Pe,me)?(F[B]=Pe,F[fe]=E,B=fe):(F[B]=me,F[se]=E,B=se);else if(fe<X&&0>i(Pe,E))F[B]=Pe,F[fe]=E,B=fe;else break e}}return K}function i(F,K){var E=F.sortIndex-K.sortIndex;return E!==0?E:F.id-K.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var c=Date,d=c.now();e.unstable_now=function(){return c.now()-d}}var p=[],m=[],h=1,x=null,v=3,b=!1,N=!1,k=!1,j=typeof setTimeout=="function"?setTimeout:null,S=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function R(F){for(var K=n(m);K!==null;){if(K.callback===null)o(m);else if(K.startTime<=F)o(m),K.sortIndex=K.expirationTime,t(p,K);else break;K=n(m)}}function D(F){if(k=!1,R(F),!N)if(n(p)!==null)N=!0,I(M);else{var K=n(m);K!==null&&A(D,K.startTime-F)}}function M(F,K){N=!1,k&&(k=!1,S(_),_=-1),b=!0;var E=v;try{for(R(K),x=n(p);x!==null&&(!(x.expirationTime>K)||F&&!U());){var B=x.callback;if(typeof B=="function"){x.callback=null,v=x.priorityLevel;var X=B(x.expirationTime<=K);K=e.unstable_now(),typeof X=="function"?x.callback=X:x===n(p)&&o(p),R(K)}else o(p);x=n(p)}if(x!==null)var O=!0;else{var se=n(m);se!==null&&A(D,se.startTime-K),O=!1}return O}finally{x=null,v=E,b=!1}}var P=!1,L=null,_=-1,J=5,ne=-1;function U(){return!(e.unstable_now()-ne<J)}function G(){if(L!==null){var F=e.unstable_now();ne=F;var K=!0;try{K=L(!0,F)}finally{K?q():(P=!1,L=null)}}else P=!1}var q;if(typeof T=="function")q=function(){T(G)};else if(typeof MessageChannel<"u"){var ee=new MessageChannel,$=ee.port2;ee.port1.onmessage=G,q=function(){$.postMessage(null)}}else q=function(){j(G,0)};function I(F){L=F,P||(P=!0,q())}function A(F,K){_=j(function(){F(e.unstable_now())},K)}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(F){F.callback=null},e.unstable_continueExecution=function(){N||b||(N=!0,I(M))},e.unstable_forceFrameRate=function(F){0>F||125<F?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):J=0<F?Math.floor(1e3/F):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_getFirstCallbackNode=function(){return n(p)},e.unstable_next=function(F){switch(v){case 1:case 2:case 3:var K=3;break;default:K=v}var E=v;v=K;try{return F()}finally{v=E}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(F,K){switch(F){case 1:case 2:case 3:case 4:case 5:break;default:F=3}var E=v;v=F;try{return K()}finally{v=E}},e.unstable_scheduleCallback=function(F,K,E){var B=e.unstable_now();switch(typeof E=="object"&&E!==null?(E=E.delay,E=typeof E=="number"&&0<E?B+E:B):E=B,F){case 1:var X=-1;break;case 2:X=250;break;case 5:X=1073741823;break;case 4:X=1e4;break;default:X=5e3}return X=E+X,F={id:h++,callback:K,priorityLevel:F,startTime:E,expirationTime:X,sortIndex:-1},E>B?(F.sortIndex=E,t(m,F),n(p)===null&&F===n(m)&&(k?(S(_),_=-1):k=!0,A(D,E-B))):(F.sortIndex=X,t(p,F),N||b||(N=!0,I(M))),F},e.unstable_shouldYield=U,e.unstable_wrapCallback=function(F){var K=v;return function(){var E=v;v=K;try{return F.apply(this,arguments)}finally{v=E}}}})($d)),$d}var ex;function Oj(){return ex||(ex=1,Md.exports=Lj()),Md.exports}/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.min.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Facebook, Inc. and its 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 tx;function _j(){if(tx)return kn;tx=1;var e=ap(),t=Oj();function n(r){for(var s="https://reactjs.org/docs/error-decoder.html?invariant="+r,u=1;u<arguments.length;u++)s+="&args[]="+encodeURIComponent(arguments[u]);return"Minified React error #"+r+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var o=new Set,i={};function l(r,s){c(r,s),c(r+"Capture",s)}function c(r,s){for(i[r]=s,r=0;r<s.length;r++)o.add(s[r])}var d=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),p=Object.prototype.hasOwnProperty,m=/^[: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]*$/,h={},x={};function v(r){return p.call(x,r)?!0:p.call(h,r)?!1:m.test(r)?x[r]=!0:(h[r]=!0,!1)}function b(r,s,u,f){if(u!==null&&u.type===0)return!1;switch(typeof s){case"function":case"symbol":return!0;case"boolean":return f?!1:u!==null?!u.acceptsBooleans:(r=r.toLowerCase().slice(0,5),r!=="data-"&&r!=="aria-");default:return!1}}function N(r,s,u,f){if(s===null||typeof s>"u"||b(r,s,u,f))return!0;if(f)return!1;if(u!==null)switch(u.type){case 3:return!s;case 4:return s===!1;case 5:return isNaN(s);case 6:return isNaN(s)||1>s}return!1}function k(r,s,u,f,y,w,C){this.acceptsBooleans=s===2||s===3||s===4,this.attributeName=f,this.attributeNamespace=y,this.mustUseProperty=u,this.propertyName=r,this.type=s,this.sanitizeURL=w,this.removeEmptyString=C}var j={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(r){j[r]=new k(r,0,!1,r,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(r){var s=r[0];j[s]=new k(s,1,!1,r[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(r){j[r]=new k(r,2,!1,r.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(r){j[r]=new k(r,2,!1,r,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(r){j[r]=new k(r,3,!1,r.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(r){j[r]=new k(r,3,!0,r,null,!1,!1)}),["capture","download"].forEach(function(r){j[r]=new k(r,4,!1,r,null,!1,!1)}),["cols","rows","size","span"].forEach(function(r){j[r]=new k(r,6,!1,r,null,!1,!1)}),["rowSpan","start"].forEach(function(r){j[r]=new k(r,5,!1,r.toLowerCase(),null,!1,!1)});var S=/[\-:]([a-z])/g;function T(r){return r[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(r){var s=r.replace(S,T);j[s]=new k(s,1,!1,r,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(r){var s=r.replace(S,T);j[s]=new k(s,1,!1,r,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(r){var s=r.replace(S,T);j[s]=new k(s,1,!1,r,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(r){j[r]=new k(r,1,!1,r.toLowerCase(),null,!1,!1)}),j.xlinkHref=new k("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(r){j[r]=new k(r,1,!1,r.toLowerCase(),null,!0,!0)});function R(r,s,u,f){var y=j.hasOwnProperty(s)?j[s]:null;(y!==null?y.type!==0:f||!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(N(s,u,y,f)&&(u=null),f||y===null?v(s)&&(u===null?r.removeAttribute(s):r.setAttribute(s,""+u)):y.mustUseProperty?r[y.propertyName]=u===null?y.type===3?!1:"":u:(s=y.attributeName,f=y.attributeNamespace,u===null?r.removeAttribute(s):(y=y.type,u=y===3||y===4&&u===!0?"":""+u,f?r.setAttributeNS(f,s,u):r.setAttribute(s,u))))}var D=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,M=Symbol.for("react.element"),P=Symbol.for("react.portal"),L=Symbol.for("react.fragment"),_=Symbol.for("react.strict_mode"),J=Symbol.for("react.profiler"),ne=Symbol.for("react.provider"),U=Symbol.for("react.context"),G=Symbol.for("react.forward_ref"),q=Symbol.for("react.suspense"),ee=Symbol.for("react.suspense_list"),$=Symbol.for("react.memo"),I=Symbol.for("react.lazy"),A=Symbol.for("react.offscreen"),F=Symbol.iterator;function K(r){return r===null||typeof r!="object"?null:(r=F&&r[F]||r["@@iterator"],typeof r=="function"?r:null)}var E=Object.assign,B;function X(r){if(B===void 0)try{throw Error()}catch(u){var s=u.stack.trim().match(/\n( *(at )?)/);B=s&&s[1]||""}return`
|
|
34
|
+
`+B+r}var O=!1;function se(r,s){if(!r||O)return"";O=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(s)if(s=function(){throw Error()},Object.defineProperty(s.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(s,[])}catch(Z){var f=Z}Reflect.construct(r,[],s)}else{try{s.call()}catch(Z){f=Z}r.call(s.prototype)}else{try{throw Error()}catch(Z){f=Z}r()}}catch(Z){if(Z&&f&&typeof Z.stack=="string"){for(var y=Z.stack.split(`
|
|
35
|
+
`),w=f.stack.split(`
|
|
36
|
+
`),C=y.length-1,z=w.length-1;1<=C&&0<=z&&y[C]!==w[z];)z--;for(;1<=C&&0<=z;C--,z--)if(y[C]!==w[z]){if(C!==1||z!==1)do if(C--,z--,0>z||y[C]!==w[z]){var H=`
|
|
37
|
+
`+y[C].replace(" at new "," at ");return r.displayName&&H.includes("<anonymous>")&&(H=H.replace("<anonymous>",r.displayName)),H}while(1<=C&&0<=z);break}}}finally{O=!1,Error.prepareStackTrace=u}return(r=r?r.displayName||r.name:"")?X(r):""}function me(r){switch(r.tag){case 5:return X(r.type);case 16:return X("Lazy");case 13:return X("Suspense");case 19:return X("SuspenseList");case 0:case 2:case 15:return r=se(r.type,!1),r;case 11:return r=se(r.type.render,!1),r;case 1:return r=se(r.type,!0),r;default:return""}}function fe(r){if(r==null)return null;if(typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case L:return"Fragment";case P:return"Portal";case J:return"Profiler";case _:return"StrictMode";case q:return"Suspense";case ee:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case U:return(r.displayName||"Context")+".Consumer";case ne:return(r._context.displayName||"Context")+".Provider";case G:var s=r.render;return r=r.displayName,r||(r=s.displayName||s.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case $:return s=r.displayName||null,s!==null?s:fe(r.type)||"Memo";case I:s=r._payload,r=r._init;try{return fe(r(s))}catch{}}return null}function Pe(r){var s=r.type;switch(r.tag){case 24:return"Cache";case 9:return(s.displayName||"Context")+".Consumer";case 10:return(s._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return r=s.render,r=r.displayName||r.name||"",s.displayName||(r!==""?"ForwardRef("+r+")":"ForwardRef");case 7:return"Fragment";case 5:return s;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return fe(s);case 8:return s===_?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s}return null}function Ce(r){switch(typeof r){case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function pe(r){var s=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function xe(r){var s=pe(r)?"checked":"value",u=Object.getOwnPropertyDescriptor(r.constructor.prototype,s),f=""+r[s];if(!r.hasOwnProperty(s)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var y=u.get,w=u.set;return Object.defineProperty(r,s,{configurable:!0,get:function(){return y.call(this)},set:function(C){f=""+C,w.call(this,C)}}),Object.defineProperty(r,s,{enumerable:u.enumerable}),{getValue:function(){return f},setValue:function(C){f=""+C},stopTracking:function(){r._valueTracker=null,delete r[s]}}}}function Je(r){r._valueTracker||(r._valueTracker=xe(r))}function Ke(r){if(!r)return!1;var s=r._valueTracker;if(!s)return!0;var u=s.getValue(),f="";return r&&(f=pe(r)?r.checked?"true":"false":r.value),r=f,r!==u?(s.setValue(r),!0):!1}function Me(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}function _e(r,s){var u=s.checked;return E({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:u??r._wrapperState.initialChecked})}function ct(r,s){var u=s.defaultValue==null?"":s.defaultValue,f=s.checked!=null?s.checked:s.defaultChecked;u=Ce(s.value!=null?s.value:u),r._wrapperState={initialChecked:f,initialValue:u,controlled:s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null}}function et(r,s){s=s.checked,s!=null&&R(r,"checked",s,!1)}function mt(r,s){et(r,s);var u=Ce(s.value),f=s.type;if(u!=null)f==="number"?(u===0&&r.value===""||r.value!=u)&&(r.value=""+u):r.value!==""+u&&(r.value=""+u);else if(f==="submit"||f==="reset"){r.removeAttribute("value");return}s.hasOwnProperty("value")?Ge(r,s.type,u):s.hasOwnProperty("defaultValue")&&Ge(r,s.type,Ce(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(r.defaultChecked=!!s.defaultChecked)}function Pt(r,s,u){if(s.hasOwnProperty("value")||s.hasOwnProperty("defaultValue")){var f=s.type;if(!(f!=="submit"&&f!=="reset"||s.value!==void 0&&s.value!==null))return;s=""+r._wrapperState.initialValue,u||s===r.value||(r.value=s),r.defaultValue=s}u=r.name,u!==""&&(r.name=""),r.defaultChecked=!!r._wrapperState.initialChecked,u!==""&&(r.name=u)}function Ge(r,s,u){(s!=="number"||Me(r.ownerDocument)!==r)&&(u==null?r.defaultValue=""+r._wrapperState.initialValue:r.defaultValue!==""+u&&(r.defaultValue=""+u))}var st=Array.isArray;function Kt(r,s,u,f){if(r=r.options,s){s={};for(var y=0;y<u.length;y++)s["$"+u[y]]=!0;for(u=0;u<r.length;u++)y=s.hasOwnProperty("$"+r[u].value),r[u].selected!==y&&(r[u].selected=y),y&&f&&(r[u].defaultSelected=!0)}else{for(u=""+Ce(u),s=null,y=0;y<r.length;y++){if(r[y].value===u){r[y].selected=!0,f&&(r[y].defaultSelected=!0);return}s!==null||r[y].disabled||(s=r[y])}s!==null&&(s.selected=!0)}}function Zt(r,s){if(s.dangerouslySetInnerHTML!=null)throw Error(n(91));return E({},s,{value:void 0,defaultValue:void 0,children:""+r._wrapperState.initialValue})}function mn(r,s){var u=s.value;if(u==null){if(u=s.children,s=s.defaultValue,u!=null){if(s!=null)throw Error(n(92));if(st(u)){if(1<u.length)throw Error(n(93));u=u[0]}s=u}s==null&&(s=""),u=s}r._wrapperState={initialValue:Ce(u)}}function Tn(r,s){var u=Ce(s.value),f=Ce(s.defaultValue);u!=null&&(u=""+u,u!==r.value&&(r.value=u),s.defaultValue==null&&r.defaultValue!==u&&(r.defaultValue=u)),f!=null&&(r.defaultValue=""+f)}function Rn(r){var s=r.textContent;s===r._wrapperState.initialValue&&s!==""&&s!==null&&(r.value=s)}function re(r){switch(r){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function le(r,s){return r==null||r==="http://www.w3.org/1999/xhtml"?re(s):r==="http://www.w3.org/2000/svg"&&s==="foreignObject"?"http://www.w3.org/1999/xhtml":r}var he,te=(function(r){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(s,u,f,y){MSApp.execUnsafeLocalFunction(function(){return r(s,u,f,y)})}:r})(function(r,s){if(r.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in r)r.innerHTML=s;else{for(he=he||document.createElement("div"),he.innerHTML="<svg>"+s.valueOf().toString()+"</svg>",s=he.firstChild;r.firstChild;)r.removeChild(r.firstChild);for(;s.firstChild;)r.appendChild(s.firstChild)}});function ye(r,s){if(s){var u=r.firstChild;if(u&&u===r.lastChild&&u.nodeType===3){u.nodeValue=s;return}}r.textContent=s}var Se={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},$t=["Webkit","ms","Moz","O"];Object.keys(Se).forEach(function(r){$t.forEach(function(s){s=s+r.charAt(0).toUpperCase()+r.substring(1),Se[s]=Se[r]})});function en(r,s,u){return s==null||typeof s=="boolean"||s===""?"":u||typeof s!="number"||s===0||Se.hasOwnProperty(r)&&Se[r]?(""+s).trim():s+"px"}function Gt(r,s){r=r.style;for(var u in s)if(s.hasOwnProperty(u)){var f=u.indexOf("--")===0,y=en(u,s[u],f);u==="float"&&(u="cssFloat"),f?r.setProperty(u,y):r[u]=y}}var V=E({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ce(r,s){if(s){if(V[r]&&(s.children!=null||s.dangerouslySetInnerHTML!=null))throw Error(n(137,r));if(s.dangerouslySetInnerHTML!=null){if(s.children!=null)throw Error(n(60));if(typeof s.dangerouslySetInnerHTML!="object"||!("__html"in s.dangerouslySetInnerHTML))throw Error(n(61))}if(s.style!=null&&typeof s.style!="object")throw Error(n(62))}}function ve(r,s){if(r.indexOf("-")===-1)return typeof s.is=="string";switch(r){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 Oe=null;function Un(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var tn=null,gt=null,Be=null;function Ze(r){if(r=vi(r)){if(typeof tn!="function")throw Error(n(280));var s=r.stateNode;s&&(s=Wa(s),tn(r.stateNode,r.type,s))}}function St(r){gt?Be?Be.push(r):Be=[r]:gt=r}function Ft(){if(gt){var r=gt,s=Be;if(Be=gt=null,Ze(r),s)for(r=0;r<s.length;r++)Ze(s[r])}}function Yt(r,s){return r(s)}function nn(){}var gn=!1;function Ar(r,s,u){if(gn)return r(s,u);gn=!0;try{return Yt(r,s,u)}finally{gn=!1,(gt!==null||Be!==null)&&(nn(),Ft())}}function xt(r,s){var u=r.stateNode;if(u===null)return null;var f=Wa(u);if(f===null)return null;u=f[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":(f=!f.disabled)||(r=r.type,f=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!f;break e;default:r=!1}if(r)return null;if(u&&typeof u!="function")throw Error(n(231,s,typeof u));return u}var Hn=!1;if(d)try{var rn={};Object.defineProperty(rn,"passive",{get:function(){Hn=!0}}),window.addEventListener("test",rn,rn),window.removeEventListener("test",rn,rn)}catch{Hn=!1}function Zn(r,s,u,f,y,w,C,z,H){var Z=Array.prototype.slice.call(arguments,3);try{s.apply(u,Z)}catch(ie){this.onError(ie)}}var er=!1,hr=null,An=!1,Dr=null,ei={onError:function(r){er=!0,hr=r}};function $1(r,s,u,f,y,w,C,z,H){er=!1,hr=null,Zn.apply(ei,arguments)}function F1(r,s,u,f,y,w,C,z,H){if($1.apply(this,arguments),er){if(er){var Z=hr;er=!1,hr=null}else throw Error(n(198));An||(An=!0,Dr=Z)}}function Ro(r){var s=r,u=r;if(r.alternate)for(;s.return;)s=s.return;else{r=s;do s=r,(s.flags&4098)!==0&&(u=s.return),r=s.return;while(r)}return s.tag===3?u:null}function yh(r){if(r.tag===13){var s=r.memoizedState;if(s===null&&(r=r.alternate,r!==null&&(s=r.memoizedState)),s!==null)return s.dehydrated}return null}function vh(r){if(Ro(r)!==r)throw Error(n(188))}function z1(r){var s=r.alternate;if(!s){if(s=Ro(r),s===null)throw Error(n(188));return s!==r?null:r}for(var u=r,f=s;;){var y=u.return;if(y===null)break;var w=y.alternate;if(w===null){if(f=y.return,f!==null){u=f;continue}break}if(y.child===w.child){for(w=y.child;w;){if(w===u)return vh(y),r;if(w===f)return vh(y),s;w=w.sibling}throw Error(n(188))}if(u.return!==f.return)u=y,f=w;else{for(var C=!1,z=y.child;z;){if(z===u){C=!0,u=y,f=w;break}if(z===f){C=!0,f=y,u=w;break}z=z.sibling}if(!C){for(z=w.child;z;){if(z===u){C=!0,u=w,f=y;break}if(z===f){C=!0,f=w,u=y;break}z=z.sibling}if(!C)throw Error(n(189))}}if(u.alternate!==f)throw Error(n(190))}if(u.tag!==3)throw Error(n(188));return u.stateNode.current===u?r:s}function bh(r){return r=z1(r),r!==null?wh(r):null}function wh(r){if(r.tag===5||r.tag===6)return r;for(r=r.child;r!==null;){var s=wh(r);if(s!==null)return s;r=r.sibling}return null}var kh=t.unstable_scheduleCallback,jh=t.unstable_cancelCallback,B1=t.unstable_shouldYield,U1=t.unstable_requestPaint,Ct=t.unstable_now,H1=t.unstable_getCurrentPriorityLevel,eu=t.unstable_ImmediatePriority,Sh=t.unstable_UserBlockingPriority,Sa=t.unstable_NormalPriority,W1=t.unstable_LowPriority,Ch=t.unstable_IdlePriority,Ca=null,mr=null;function V1(r){if(mr&&typeof mr.onCommitFiberRoot=="function")try{mr.onCommitFiberRoot(Ca,r,void 0,(r.current.flags&128)===128)}catch{}}var tr=Math.clz32?Math.clz32:G1,q1=Math.log,K1=Math.LN2;function G1(r){return r>>>=0,r===0?32:31-(q1(r)/K1|0)|0}var Na=64,Ea=4194304;function ti(r){switch(r&-r){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: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 r&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return r&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return r}}function Pa(r,s){var u=r.pendingLanes;if(u===0)return 0;var f=0,y=r.suspendedLanes,w=r.pingedLanes,C=u&268435455;if(C!==0){var z=C&~y;z!==0?f=ti(z):(w&=C,w!==0&&(f=ti(w)))}else C=u&~y,C!==0?f=ti(C):w!==0&&(f=ti(w));if(f===0)return 0;if(s!==0&&s!==f&&(s&y)===0&&(y=f&-f,w=s&-s,y>=w||y===16&&(w&4194240)!==0))return s;if((f&4)!==0&&(f|=u&16),s=r.entangledLanes,s!==0)for(r=r.entanglements,s&=f;0<s;)u=31-tr(s),y=1<<u,f|=r[u],s&=~y;return f}function Y1(r,s){switch(r){case 1:case 2:case 4:return s+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function X1(r,s){for(var u=r.suspendedLanes,f=r.pingedLanes,y=r.expirationTimes,w=r.pendingLanes;0<w;){var C=31-tr(w),z=1<<C,H=y[C];H===-1?((z&u)===0||(z&f)!==0)&&(y[C]=Y1(z,s)):H<=s&&(r.expiredLanes|=z),w&=~z}}function tu(r){return r=r.pendingLanes&-1073741825,r!==0?r:r&1073741824?1073741824:0}function Nh(){var r=Na;return Na<<=1,(Na&4194240)===0&&(Na=64),r}function nu(r){for(var s=[],u=0;31>u;u++)s.push(r);return s}function ni(r,s,u){r.pendingLanes|=s,s!==536870912&&(r.suspendedLanes=0,r.pingedLanes=0),r=r.eventTimes,s=31-tr(s),r[s]=u}function Q1(r,s){var u=r.pendingLanes&~s;r.pendingLanes=s,r.suspendedLanes=0,r.pingedLanes=0,r.expiredLanes&=s,r.mutableReadLanes&=s,r.entangledLanes&=s,s=r.entanglements;var f=r.eventTimes;for(r=r.expirationTimes;0<u;){var y=31-tr(u),w=1<<y;s[y]=0,f[y]=-1,r[y]=-1,u&=~w}}function ru(r,s){var u=r.entangledLanes|=s;for(r=r.entanglements;u;){var f=31-tr(u),y=1<<f;y&s|r[f]&s&&(r[f]|=s),u&=~y}}var Ye=0;function Eh(r){return r&=-r,1<r?4<r?(r&268435455)!==0?16:536870912:4:1}var Ph,ou,Th,Rh,Ah,su=!1,Ta=[],Yr=null,Xr=null,Qr=null,ri=new Map,oi=new Map,Jr=[],J1="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 submit".split(" ");function Dh(r,s){switch(r){case"focusin":case"focusout":Yr=null;break;case"dragenter":case"dragleave":Xr=null;break;case"mouseover":case"mouseout":Qr=null;break;case"pointerover":case"pointerout":ri.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":oi.delete(s.pointerId)}}function si(r,s,u,f,y,w){return r===null||r.nativeEvent!==w?(r={blockedOn:s,domEventName:u,eventSystemFlags:f,nativeEvent:w,targetContainers:[y]},s!==null&&(s=vi(s),s!==null&&ou(s)),r):(r.eventSystemFlags|=f,s=r.targetContainers,y!==null&&s.indexOf(y)===-1&&s.push(y),r)}function Z1(r,s,u,f,y){switch(s){case"focusin":return Yr=si(Yr,r,s,u,f,y),!0;case"dragenter":return Xr=si(Xr,r,s,u,f,y),!0;case"mouseover":return Qr=si(Qr,r,s,u,f,y),!0;case"pointerover":var w=y.pointerId;return ri.set(w,si(ri.get(w)||null,r,s,u,f,y)),!0;case"gotpointercapture":return w=y.pointerId,oi.set(w,si(oi.get(w)||null,r,s,u,f,y)),!0}return!1}function Ih(r){var s=Ao(r.target);if(s!==null){var u=Ro(s);if(u!==null){if(s=u.tag,s===13){if(s=yh(u),s!==null){r.blockedOn=s,Ah(r.priority,function(){Th(u)});return}}else if(s===3&&u.stateNode.current.memoizedState.isDehydrated){r.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}r.blockedOn=null}function Ra(r){if(r.blockedOn!==null)return!1;for(var s=r.targetContainers;0<s.length;){var u=au(r.domEventName,r.eventSystemFlags,s[0],r.nativeEvent);if(u===null){u=r.nativeEvent;var f=new u.constructor(u.type,u);Oe=f,u.target.dispatchEvent(f),Oe=null}else return s=vi(u),s!==null&&ou(s),r.blockedOn=u,!1;s.shift()}return!0}function Lh(r,s,u){Ra(r)&&u.delete(s)}function ek(){su=!1,Yr!==null&&Ra(Yr)&&(Yr=null),Xr!==null&&Ra(Xr)&&(Xr=null),Qr!==null&&Ra(Qr)&&(Qr=null),ri.forEach(Lh),oi.forEach(Lh)}function ii(r,s){r.blockedOn===s&&(r.blockedOn=null,su||(su=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,ek)))}function ai(r){function s(y){return ii(y,r)}if(0<Ta.length){ii(Ta[0],r);for(var u=1;u<Ta.length;u++){var f=Ta[u];f.blockedOn===r&&(f.blockedOn=null)}}for(Yr!==null&&ii(Yr,r),Xr!==null&&ii(Xr,r),Qr!==null&&ii(Qr,r),ri.forEach(s),oi.forEach(s),u=0;u<Jr.length;u++)f=Jr[u],f.blockedOn===r&&(f.blockedOn=null);for(;0<Jr.length&&(u=Jr[0],u.blockedOn===null);)Ih(u),u.blockedOn===null&&Jr.shift()}var Zo=D.ReactCurrentBatchConfig,Aa=!0;function tk(r,s,u,f){var y=Ye,w=Zo.transition;Zo.transition=null;try{Ye=1,iu(r,s,u,f)}finally{Ye=y,Zo.transition=w}}function nk(r,s,u,f){var y=Ye,w=Zo.transition;Zo.transition=null;try{Ye=4,iu(r,s,u,f)}finally{Ye=y,Zo.transition=w}}function iu(r,s,u,f){if(Aa){var y=au(r,s,u,f);if(y===null)Su(r,s,f,Da,u),Dh(r,f);else if(Z1(y,r,s,u,f))f.stopPropagation();else if(Dh(r,f),s&4&&-1<J1.indexOf(r)){for(;y!==null;){var w=vi(y);if(w!==null&&Ph(w),w=au(r,s,u,f),w===null&&Su(r,s,f,Da,u),w===y)break;y=w}y!==null&&f.stopPropagation()}else Su(r,s,f,null,u)}}var Da=null;function au(r,s,u,f){if(Da=null,r=Un(f),r=Ao(r),r!==null)if(s=Ro(r),s===null)r=null;else if(u=s.tag,u===13){if(r=yh(s),r!==null)return r;r=null}else if(u===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;r=null}else s!==r&&(r=null);return Da=r,null}function Oh(r){switch(r){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"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 1;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(H1()){case eu:return 1;case Sh:return 4;case Sa:case W1:return 16;case Ch:return 536870912;default:return 16}default:return 16}}var Zr=null,lu=null,Ia=null;function _h(){if(Ia)return Ia;var r,s=lu,u=s.length,f,y="value"in Zr?Zr.value:Zr.textContent,w=y.length;for(r=0;r<u&&s[r]===y[r];r++);var C=u-r;for(f=1;f<=C&&s[u-f]===y[w-f];f++);return Ia=y.slice(r,1<f?1-f:void 0)}function La(r){var s=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&s===13&&(r=13)):r=s,r===10&&(r=13),32<=r||r===13?r:0}function Oa(){return!0}function Mh(){return!1}function Dn(r){function s(u,f,y,w,C){this._reactName=u,this._targetInst=y,this.type=f,this.nativeEvent=w,this.target=C,this.currentTarget=null;for(var z in r)r.hasOwnProperty(z)&&(u=r[z],this[z]=u?u(w):w[z]);return this.isDefaultPrevented=(w.defaultPrevented!=null?w.defaultPrevented:w.returnValue===!1)?Oa:Mh,this.isPropagationStopped=Mh,this}return E(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():typeof u.returnValue!="unknown"&&(u.returnValue=!1),this.isDefaultPrevented=Oa)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=Oa)},persist:function(){},isPersistent:Oa}),s}var es={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},cu=Dn(es),li=E({},es,{view:0,detail:0}),rk=Dn(li),uu,du,ci,_a=E({},li,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:pu,button:0,buttons:0,relatedTarget:function(r){return r.relatedTarget===void 0?r.fromElement===r.srcElement?r.toElement:r.fromElement:r.relatedTarget},movementX:function(r){return"movementX"in r?r.movementX:(r!==ci&&(ci&&r.type==="mousemove"?(uu=r.screenX-ci.screenX,du=r.screenY-ci.screenY):du=uu=0,ci=r),uu)},movementY:function(r){return"movementY"in r?r.movementY:du}}),$h=Dn(_a),ok=E({},_a,{dataTransfer:0}),sk=Dn(ok),ik=E({},li,{relatedTarget:0}),fu=Dn(ik),ak=E({},es,{animationName:0,elapsedTime:0,pseudoElement:0}),lk=Dn(ak),ck=E({},es,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),uk=Dn(ck),dk=E({},es,{data:0}),Fh=Dn(dk),fk={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},pk={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"},hk={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function mk(r){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(r):(r=hk[r])?!!s[r]:!1}function pu(){return mk}var gk=E({},li,{key:function(r){if(r.key){var s=fk[r.key]||r.key;if(s!=="Unidentified")return s}return r.type==="keypress"?(r=La(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?pk[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:pu,charCode:function(r){return r.type==="keypress"?La(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?La(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),xk=Dn(gk),yk=E({},_a,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),zh=Dn(yk),vk=E({},li,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:pu}),bk=Dn(vk),wk=E({},es,{propertyName:0,elapsedTime:0,pseudoElement:0}),kk=Dn(wk),jk=E({},_a,{deltaX:function(r){return"deltaX"in r?r.deltaX:"wheelDeltaX"in r?-r.wheelDeltaX:0},deltaY:function(r){return"deltaY"in r?r.deltaY:"wheelDeltaY"in r?-r.wheelDeltaY:"wheelDelta"in r?-r.wheelDelta:0},deltaZ:0,deltaMode:0}),Sk=Dn(jk),Ck=[9,13,27,32],hu=d&&"CompositionEvent"in window,ui=null;d&&"documentMode"in document&&(ui=document.documentMode);var Nk=d&&"TextEvent"in window&&!ui,Bh=d&&(!hu||ui&&8<ui&&11>=ui),Uh=" ",Hh=!1;function Wh(r,s){switch(r){case"keyup":return Ck.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Vh(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var ts=!1;function Ek(r,s){switch(r){case"compositionend":return Vh(s);case"keypress":return s.which!==32?null:(Hh=!0,Uh);case"textInput":return r=s.data,r===Uh&&Hh?null:r;default:return null}}function Pk(r,s){if(ts)return r==="compositionend"||!hu&&Wh(r,s)?(r=_h(),Ia=lu=Zr=null,ts=!1,r):null;switch(r){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 Bh&&s.locale!=="ko"?null:s.data;default:return null}}var Tk={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 qh(r){var s=r&&r.nodeName&&r.nodeName.toLowerCase();return s==="input"?!!Tk[r.type]:s==="textarea"}function Kh(r,s,u,f){St(f),s=Ba(s,"onChange"),0<s.length&&(u=new cu("onChange","change",null,u,f),r.push({event:u,listeners:s}))}var di=null,fi=null;function Rk(r){dm(r,0)}function Ma(r){var s=is(r);if(Ke(s))return r}function Ak(r,s){if(r==="change")return s}var Gh=!1;if(d){var mu;if(d){var gu="oninput"in document;if(!gu){var Yh=document.createElement("div");Yh.setAttribute("oninput","return;"),gu=typeof Yh.oninput=="function"}mu=gu}else mu=!1;Gh=mu&&(!document.documentMode||9<document.documentMode)}function Xh(){di&&(di.detachEvent("onpropertychange",Qh),fi=di=null)}function Qh(r){if(r.propertyName==="value"&&Ma(fi)){var s=[];Kh(s,fi,r,Un(r)),Ar(Rk,s)}}function Dk(r,s,u){r==="focusin"?(Xh(),di=s,fi=u,di.attachEvent("onpropertychange",Qh)):r==="focusout"&&Xh()}function Ik(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return Ma(fi)}function Lk(r,s){if(r==="click")return Ma(s)}function Ok(r,s){if(r==="input"||r==="change")return Ma(s)}function _k(r,s){return r===s&&(r!==0||1/r===1/s)||r!==r&&s!==s}var nr=typeof Object.is=="function"?Object.is:_k;function pi(r,s){if(nr(r,s))return!0;if(typeof r!="object"||r===null||typeof s!="object"||s===null)return!1;var u=Object.keys(r),f=Object.keys(s);if(u.length!==f.length)return!1;for(f=0;f<u.length;f++){var y=u[f];if(!p.call(s,y)||!nr(r[y],s[y]))return!1}return!0}function Jh(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function Zh(r,s){var u=Jh(r);r=0;for(var f;u;){if(u.nodeType===3){if(f=r+u.textContent.length,r<=s&&f>=s)return{node:u,offset:s-r};r=f}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=Jh(u)}}function em(r,s){return r&&s?r===s?!0:r&&r.nodeType===3?!1:s&&s.nodeType===3?em(r,s.parentNode):"contains"in r?r.contains(s):r.compareDocumentPosition?!!(r.compareDocumentPosition(s)&16):!1:!1}function tm(){for(var r=window,s=Me();s instanceof r.HTMLIFrameElement;){try{var u=typeof s.contentWindow.location.href=="string"}catch{u=!1}if(u)r=s.contentWindow;else break;s=Me(r.document)}return s}function xu(r){var s=r&&r.nodeName&&r.nodeName.toLowerCase();return s&&(s==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||s==="textarea"||r.contentEditable==="true")}function Mk(r){var s=tm(),u=r.focusedElem,f=r.selectionRange;if(s!==u&&u&&u.ownerDocument&&em(u.ownerDocument.documentElement,u)){if(f!==null&&xu(u)){if(s=f.start,r=f.end,r===void 0&&(r=s),"selectionStart"in u)u.selectionStart=s,u.selectionEnd=Math.min(r,u.value.length);else if(r=(s=u.ownerDocument||document)&&s.defaultView||window,r.getSelection){r=r.getSelection();var y=u.textContent.length,w=Math.min(f.start,y);f=f.end===void 0?w:Math.min(f.end,y),!r.extend&&w>f&&(y=f,f=w,w=y),y=Zh(u,w);var C=Zh(u,f);y&&C&&(r.rangeCount!==1||r.anchorNode!==y.node||r.anchorOffset!==y.offset||r.focusNode!==C.node||r.focusOffset!==C.offset)&&(s=s.createRange(),s.setStart(y.node,y.offset),r.removeAllRanges(),w>f?(r.addRange(s),r.extend(C.node,C.offset)):(s.setEnd(C.node,C.offset),r.addRange(s)))}}for(s=[],r=u;r=r.parentNode;)r.nodeType===1&&s.push({element:r,left:r.scrollLeft,top:r.scrollTop});for(typeof u.focus=="function"&&u.focus(),u=0;u<s.length;u++)r=s[u],r.element.scrollLeft=r.left,r.element.scrollTop=r.top}}var $k=d&&"documentMode"in document&&11>=document.documentMode,ns=null,yu=null,hi=null,vu=!1;function nm(r,s,u){var f=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;vu||ns==null||ns!==Me(f)||(f=ns,"selectionStart"in f&&xu(f)?f={start:f.selectionStart,end:f.selectionEnd}:(f=(f.ownerDocument&&f.ownerDocument.defaultView||window).getSelection(),f={anchorNode:f.anchorNode,anchorOffset:f.anchorOffset,focusNode:f.focusNode,focusOffset:f.focusOffset}),hi&&pi(hi,f)||(hi=f,f=Ba(yu,"onSelect"),0<f.length&&(s=new cu("onSelect","select",null,s,u),r.push({event:s,listeners:f}),s.target=ns)))}function $a(r,s){var u={};return u[r.toLowerCase()]=s.toLowerCase(),u["Webkit"+r]="webkit"+s,u["Moz"+r]="moz"+s,u}var rs={animationend:$a("Animation","AnimationEnd"),animationiteration:$a("Animation","AnimationIteration"),animationstart:$a("Animation","AnimationStart"),transitionend:$a("Transition","TransitionEnd")},bu={},rm={};d&&(rm=document.createElement("div").style,"AnimationEvent"in window||(delete rs.animationend.animation,delete rs.animationiteration.animation,delete rs.animationstart.animation),"TransitionEvent"in window||delete rs.transitionend.transition);function Fa(r){if(bu[r])return bu[r];if(!rs[r])return r;var s=rs[r],u;for(u in s)if(s.hasOwnProperty(u)&&u in rm)return bu[r]=s[u];return r}var om=Fa("animationend"),sm=Fa("animationiteration"),im=Fa("animationstart"),am=Fa("transitionend"),lm=new Map,cm="abort auxClick 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(" ");function eo(r,s){lm.set(r,s),l(s,[r])}for(var wu=0;wu<cm.length;wu++){var ku=cm[wu],Fk=ku.toLowerCase(),zk=ku[0].toUpperCase()+ku.slice(1);eo(Fk,"on"+zk)}eo(om,"onAnimationEnd"),eo(sm,"onAnimationIteration"),eo(im,"onAnimationStart"),eo("dblclick","onDoubleClick"),eo("focusin","onFocus"),eo("focusout","onBlur"),eo(am,"onTransitionEnd"),c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var mi="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(" "),Bk=new Set("cancel close invalid load scroll toggle".split(" ").concat(mi));function um(r,s,u){var f=r.type||"unknown-event";r.currentTarget=u,F1(f,s,void 0,r),r.currentTarget=null}function dm(r,s){s=(s&4)!==0;for(var u=0;u<r.length;u++){var f=r[u],y=f.event;f=f.listeners;e:{var w=void 0;if(s)for(var C=f.length-1;0<=C;C--){var z=f[C],H=z.instance,Z=z.currentTarget;if(z=z.listener,H!==w&&y.isPropagationStopped())break e;um(y,z,Z),w=H}else for(C=0;C<f.length;C++){if(z=f[C],H=z.instance,Z=z.currentTarget,z=z.listener,H!==w&&y.isPropagationStopped())break e;um(y,z,Z),w=H}}}if(An)throw r=Dr,An=!1,Dr=null,r}function it(r,s){var u=s[Ru];u===void 0&&(u=s[Ru]=new Set);var f=r+"__bubble";u.has(f)||(fm(s,r,2,!1),u.add(f))}function ju(r,s,u){var f=0;s&&(f|=4),fm(u,r,f,s)}var za="_reactListening"+Math.random().toString(36).slice(2);function gi(r){if(!r[za]){r[za]=!0,o.forEach(function(u){u!=="selectionchange"&&(Bk.has(u)||ju(u,!1,r),ju(u,!0,r))});var s=r.nodeType===9?r:r.ownerDocument;s===null||s[za]||(s[za]=!0,ju("selectionchange",!1,s))}}function fm(r,s,u,f){switch(Oh(s)){case 1:var y=tk;break;case 4:y=nk;break;default:y=iu}u=y.bind(null,s,u,r),y=void 0,!Hn||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(y=!0),f?y!==void 0?r.addEventListener(s,u,{capture:!0,passive:y}):r.addEventListener(s,u,!0):y!==void 0?r.addEventListener(s,u,{passive:y}):r.addEventListener(s,u,!1)}function Su(r,s,u,f,y){var w=f;if((s&1)===0&&(s&2)===0&&f!==null)e:for(;;){if(f===null)return;var C=f.tag;if(C===3||C===4){var z=f.stateNode.containerInfo;if(z===y||z.nodeType===8&&z.parentNode===y)break;if(C===4)for(C=f.return;C!==null;){var H=C.tag;if((H===3||H===4)&&(H=C.stateNode.containerInfo,H===y||H.nodeType===8&&H.parentNode===y))return;C=C.return}for(;z!==null;){if(C=Ao(z),C===null)return;if(H=C.tag,H===5||H===6){f=w=C;continue e}z=z.parentNode}}f=f.return}Ar(function(){var Z=w,ie=Un(u),ae=[];e:{var oe=lm.get(r);if(oe!==void 0){var ge=cu,ke=r;switch(r){case"keypress":if(La(u)===0)break e;case"keydown":case"keyup":ge=xk;break;case"focusin":ke="focus",ge=fu;break;case"focusout":ke="blur",ge=fu;break;case"beforeblur":case"afterblur":ge=fu;break;case"click":if(u.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ge=$h;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ge=sk;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ge=bk;break;case om:case sm:case im:ge=lk;break;case am:ge=kk;break;case"scroll":ge=rk;break;case"wheel":ge=Sk;break;case"copy":case"cut":case"paste":ge=uk;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ge=zh}var je=(s&4)!==0,Nt=!je&&r==="scroll",Y=je?oe!==null?oe+"Capture":null:oe;je=[];for(var W=Z,Q;W!==null;){Q=W;var de=Q.stateNode;if(Q.tag===5&&de!==null&&(Q=de,Y!==null&&(de=xt(W,Y),de!=null&&je.push(xi(W,de,Q)))),Nt)break;W=W.return}0<je.length&&(oe=new ge(oe,ke,null,u,ie),ae.push({event:oe,listeners:je}))}}if((s&7)===0){e:{if(oe=r==="mouseover"||r==="pointerover",ge=r==="mouseout"||r==="pointerout",oe&&u!==Oe&&(ke=u.relatedTarget||u.fromElement)&&(Ao(ke)||ke[Ir]))break e;if((ge||oe)&&(oe=ie.window===ie?ie:(oe=ie.ownerDocument)?oe.defaultView||oe.parentWindow:window,ge?(ke=u.relatedTarget||u.toElement,ge=Z,ke=ke?Ao(ke):null,ke!==null&&(Nt=Ro(ke),ke!==Nt||ke.tag!==5&&ke.tag!==6)&&(ke=null)):(ge=null,ke=Z),ge!==ke)){if(je=$h,de="onMouseLeave",Y="onMouseEnter",W="mouse",(r==="pointerout"||r==="pointerover")&&(je=zh,de="onPointerLeave",Y="onPointerEnter",W="pointer"),Nt=ge==null?oe:is(ge),Q=ke==null?oe:is(ke),oe=new je(de,W+"leave",ge,u,ie),oe.target=Nt,oe.relatedTarget=Q,de=null,Ao(ie)===Z&&(je=new je(Y,W+"enter",ke,u,ie),je.target=Q,je.relatedTarget=Nt,de=je),Nt=de,ge&&ke)t:{for(je=ge,Y=ke,W=0,Q=je;Q;Q=os(Q))W++;for(Q=0,de=Y;de;de=os(de))Q++;for(;0<W-Q;)je=os(je),W--;for(;0<Q-W;)Y=os(Y),Q--;for(;W--;){if(je===Y||Y!==null&&je===Y.alternate)break t;je=os(je),Y=os(Y)}je=null}else je=null;ge!==null&&pm(ae,oe,ge,je,!1),ke!==null&&Nt!==null&&pm(ae,Nt,ke,je,!0)}}e:{if(oe=Z?is(Z):window,ge=oe.nodeName&&oe.nodeName.toLowerCase(),ge==="select"||ge==="input"&&oe.type==="file")var Ne=Ak;else if(qh(oe))if(Gh)Ne=Ok;else{Ne=Ik;var Re=Dk}else(ge=oe.nodeName)&&ge.toLowerCase()==="input"&&(oe.type==="checkbox"||oe.type==="radio")&&(Ne=Lk);if(Ne&&(Ne=Ne(r,Z))){Kh(ae,Ne,u,ie);break e}Re&&Re(r,oe,Z),r==="focusout"&&(Re=oe._wrapperState)&&Re.controlled&&oe.type==="number"&&Ge(oe,"number",oe.value)}switch(Re=Z?is(Z):window,r){case"focusin":(qh(Re)||Re.contentEditable==="true")&&(ns=Re,yu=Z,hi=null);break;case"focusout":hi=yu=ns=null;break;case"mousedown":vu=!0;break;case"contextmenu":case"mouseup":case"dragend":vu=!1,nm(ae,u,ie);break;case"selectionchange":if($k)break;case"keydown":case"keyup":nm(ae,u,ie)}var Ae;if(hu)e:{switch(r){case"compositionstart":var Ie="onCompositionStart";break e;case"compositionend":Ie="onCompositionEnd";break e;case"compositionupdate":Ie="onCompositionUpdate";break e}Ie=void 0}else ts?Wh(r,u)&&(Ie="onCompositionEnd"):r==="keydown"&&u.keyCode===229&&(Ie="onCompositionStart");Ie&&(Bh&&u.locale!=="ko"&&(ts||Ie!=="onCompositionStart"?Ie==="onCompositionEnd"&&ts&&(Ae=_h()):(Zr=ie,lu="value"in Zr?Zr.value:Zr.textContent,ts=!0)),Re=Ba(Z,Ie),0<Re.length&&(Ie=new Fh(Ie,r,null,u,ie),ae.push({event:Ie,listeners:Re}),Ae?Ie.data=Ae:(Ae=Vh(u),Ae!==null&&(Ie.data=Ae)))),(Ae=Nk?Ek(r,u):Pk(r,u))&&(Z=Ba(Z,"onBeforeInput"),0<Z.length&&(ie=new Fh("onBeforeInput","beforeinput",null,u,ie),ae.push({event:ie,listeners:Z}),ie.data=Ae))}dm(ae,s)})}function xi(r,s,u){return{instance:r,listener:s,currentTarget:u}}function Ba(r,s){for(var u=s+"Capture",f=[];r!==null;){var y=r,w=y.stateNode;y.tag===5&&w!==null&&(y=w,w=xt(r,u),w!=null&&f.unshift(xi(r,w,y)),w=xt(r,s),w!=null&&f.push(xi(r,w,y))),r=r.return}return f}function os(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5);return r||null}function pm(r,s,u,f,y){for(var w=s._reactName,C=[];u!==null&&u!==f;){var z=u,H=z.alternate,Z=z.stateNode;if(H!==null&&H===f)break;z.tag===5&&Z!==null&&(z=Z,y?(H=xt(u,w),H!=null&&C.unshift(xi(u,H,z))):y||(H=xt(u,w),H!=null&&C.push(xi(u,H,z)))),u=u.return}C.length!==0&&r.push({event:s,listeners:C})}var Uk=/\r\n?/g,Hk=/\u0000|\uFFFD/g;function hm(r){return(typeof r=="string"?r:""+r).replace(Uk,`
|
|
38
|
+
`).replace(Hk,"")}function Ua(r,s,u){if(s=hm(s),hm(r)!==s&&u)throw Error(n(425))}function Ha(){}var Cu=null,Nu=null;function Eu(r,s){return r==="textarea"||r==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var Pu=typeof setTimeout=="function"?setTimeout:void 0,Wk=typeof clearTimeout=="function"?clearTimeout:void 0,mm=typeof Promise=="function"?Promise:void 0,Vk=typeof queueMicrotask=="function"?queueMicrotask:typeof mm<"u"?function(r){return mm.resolve(null).then(r).catch(qk)}:Pu;function qk(r){setTimeout(function(){throw r})}function Tu(r,s){var u=s,f=0;do{var y=u.nextSibling;if(r.removeChild(u),y&&y.nodeType===8)if(u=y.data,u==="/$"){if(f===0){r.removeChild(y),ai(s);return}f--}else u!=="$"&&u!=="$?"&&u!=="$!"||f++;u=y}while(u);ai(s)}function to(r){for(;r!=null;r=r.nextSibling){var s=r.nodeType;if(s===1||s===3)break;if(s===8){if(s=r.data,s==="$"||s==="$!"||s==="$?")break;if(s==="/$")return null}}return r}function gm(r){r=r.previousSibling;for(var s=0;r;){if(r.nodeType===8){var u=r.data;if(u==="$"||u==="$!"||u==="$?"){if(s===0)return r;s--}else u==="/$"&&s++}r=r.previousSibling}return null}var ss=Math.random().toString(36).slice(2),gr="__reactFiber$"+ss,yi="__reactProps$"+ss,Ir="__reactContainer$"+ss,Ru="__reactEvents$"+ss,Kk="__reactListeners$"+ss,Gk="__reactHandles$"+ss;function Ao(r){var s=r[gr];if(s)return s;for(var u=r.parentNode;u;){if(s=u[Ir]||u[gr]){if(u=s.alternate,s.child!==null||u!==null&&u.child!==null)for(r=gm(r);r!==null;){if(u=r[gr])return u;r=gm(r)}return s}r=u,u=r.parentNode}return null}function vi(r){return r=r[gr]||r[Ir],!r||r.tag!==5&&r.tag!==6&&r.tag!==13&&r.tag!==3?null:r}function is(r){if(r.tag===5||r.tag===6)return r.stateNode;throw Error(n(33))}function Wa(r){return r[yi]||null}var Au=[],as=-1;function no(r){return{current:r}}function at(r){0>as||(r.current=Au[as],Au[as]=null,as--)}function tt(r,s){as++,Au[as]=r.current,r.current=s}var ro={},on=no(ro),xn=no(!1),Do=ro;function ls(r,s){var u=r.type.contextTypes;if(!u)return ro;var f=r.stateNode;if(f&&f.__reactInternalMemoizedUnmaskedChildContext===s)return f.__reactInternalMemoizedMaskedChildContext;var y={},w;for(w in u)y[w]=s[w];return f&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=s,r.__reactInternalMemoizedMaskedChildContext=y),y}function yn(r){return r=r.childContextTypes,r!=null}function Va(){at(xn),at(on)}function xm(r,s,u){if(on.current!==ro)throw Error(n(168));tt(on,s),tt(xn,u)}function ym(r,s,u){var f=r.stateNode;if(s=s.childContextTypes,typeof f.getChildContext!="function")return u;f=f.getChildContext();for(var y in f)if(!(y in s))throw Error(n(108,Pe(r)||"Unknown",y));return E({},u,f)}function qa(r){return r=(r=r.stateNode)&&r.__reactInternalMemoizedMergedChildContext||ro,Do=on.current,tt(on,r),tt(xn,xn.current),!0}function vm(r,s,u){var f=r.stateNode;if(!f)throw Error(n(169));u?(r=ym(r,s,Do),f.__reactInternalMemoizedMergedChildContext=r,at(xn),at(on),tt(on,r)):at(xn),tt(xn,u)}var Lr=null,Ka=!1,Du=!1;function bm(r){Lr===null?Lr=[r]:Lr.push(r)}function Yk(r){Ka=!0,bm(r)}function oo(){if(!Du&&Lr!==null){Du=!0;var r=0,s=Ye;try{var u=Lr;for(Ye=1;r<u.length;r++){var f=u[r];do f=f(!0);while(f!==null)}Lr=null,Ka=!1}catch(y){throw Lr!==null&&(Lr=Lr.slice(r+1)),kh(eu,oo),y}finally{Ye=s,Du=!1}}return null}var cs=[],us=0,Ga=null,Ya=0,Wn=[],Vn=0,Io=null,Or=1,_r="";function Lo(r,s){cs[us++]=Ya,cs[us++]=Ga,Ga=r,Ya=s}function wm(r,s,u){Wn[Vn++]=Or,Wn[Vn++]=_r,Wn[Vn++]=Io,Io=r;var f=Or;r=_r;var y=32-tr(f)-1;f&=~(1<<y),u+=1;var w=32-tr(s)+y;if(30<w){var C=y-y%5;w=(f&(1<<C)-1).toString(32),f>>=C,y-=C,Or=1<<32-tr(s)+y|u<<y|f,_r=w+r}else Or=1<<w|u<<y|f,_r=r}function Iu(r){r.return!==null&&(Lo(r,1),wm(r,1,0))}function Lu(r){for(;r===Ga;)Ga=cs[--us],cs[us]=null,Ya=cs[--us],cs[us]=null;for(;r===Io;)Io=Wn[--Vn],Wn[Vn]=null,_r=Wn[--Vn],Wn[Vn]=null,Or=Wn[--Vn],Wn[Vn]=null}var In=null,Ln=null,ut=!1,rr=null;function km(r,s){var u=Yn(5,null,null,0);u.elementType="DELETED",u.stateNode=s,u.return=r,s=r.deletions,s===null?(r.deletions=[u],r.flags|=16):s.push(u)}function jm(r,s){switch(r.tag){case 5:var u=r.type;return s=s.nodeType!==1||u.toLowerCase()!==s.nodeName.toLowerCase()?null:s,s!==null?(r.stateNode=s,In=r,Ln=to(s.firstChild),!0):!1;case 6:return s=r.pendingProps===""||s.nodeType!==3?null:s,s!==null?(r.stateNode=s,In=r,Ln=null,!0):!1;case 13:return s=s.nodeType!==8?null:s,s!==null?(u=Io!==null?{id:Or,overflow:_r}:null,r.memoizedState={dehydrated:s,treeContext:u,retryLane:1073741824},u=Yn(18,null,null,0),u.stateNode=s,u.return=r,r.child=u,In=r,Ln=null,!0):!1;default:return!1}}function Ou(r){return(r.mode&1)!==0&&(r.flags&128)===0}function _u(r){if(ut){var s=Ln;if(s){var u=s;if(!jm(r,s)){if(Ou(r))throw Error(n(418));s=to(u.nextSibling);var f=In;s&&jm(r,s)?km(f,u):(r.flags=r.flags&-4097|2,ut=!1,In=r)}}else{if(Ou(r))throw Error(n(418));r.flags=r.flags&-4097|2,ut=!1,In=r}}}function Sm(r){for(r=r.return;r!==null&&r.tag!==5&&r.tag!==3&&r.tag!==13;)r=r.return;In=r}function Xa(r){if(r!==In)return!1;if(!ut)return Sm(r),ut=!0,!1;var s;if((s=r.tag!==3)&&!(s=r.tag!==5)&&(s=r.type,s=s!=="head"&&s!=="body"&&!Eu(r.type,r.memoizedProps)),s&&(s=Ln)){if(Ou(r))throw Cm(),Error(n(418));for(;s;)km(r,s),s=to(s.nextSibling)}if(Sm(r),r.tag===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(n(317));e:{for(r=r.nextSibling,s=0;r;){if(r.nodeType===8){var u=r.data;if(u==="/$"){if(s===0){Ln=to(r.nextSibling);break e}s--}else u!=="$"&&u!=="$!"&&u!=="$?"||s++}r=r.nextSibling}Ln=null}}else Ln=In?to(r.stateNode.nextSibling):null;return!0}function Cm(){for(var r=Ln;r;)r=to(r.nextSibling)}function ds(){Ln=In=null,ut=!1}function Mu(r){rr===null?rr=[r]:rr.push(r)}var Xk=D.ReactCurrentBatchConfig;function bi(r,s,u){if(r=u.ref,r!==null&&typeof r!="function"&&typeof r!="object"){if(u._owner){if(u=u._owner,u){if(u.tag!==1)throw Error(n(309));var f=u.stateNode}if(!f)throw Error(n(147,r));var y=f,w=""+r;return s!==null&&s.ref!==null&&typeof s.ref=="function"&&s.ref._stringRef===w?s.ref:(s=function(C){var z=y.refs;C===null?delete z[w]:z[w]=C},s._stringRef=w,s)}if(typeof r!="string")throw Error(n(284));if(!u._owner)throw Error(n(290,r))}return r}function Qa(r,s){throw r=Object.prototype.toString.call(s),Error(n(31,r==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":r))}function Nm(r){var s=r._init;return s(r._payload)}function Em(r){function s(Y,W){if(r){var Q=Y.deletions;Q===null?(Y.deletions=[W],Y.flags|=16):Q.push(W)}}function u(Y,W){if(!r)return null;for(;W!==null;)s(Y,W),W=W.sibling;return null}function f(Y,W){for(Y=new Map;W!==null;)W.key!==null?Y.set(W.key,W):Y.set(W.index,W),W=W.sibling;return Y}function y(Y,W){return Y=po(Y,W),Y.index=0,Y.sibling=null,Y}function w(Y,W,Q){return Y.index=Q,r?(Q=Y.alternate,Q!==null?(Q=Q.index,Q<W?(Y.flags|=2,W):Q):(Y.flags|=2,W)):(Y.flags|=1048576,W)}function C(Y){return r&&Y.alternate===null&&(Y.flags|=2),Y}function z(Y,W,Q,de){return W===null||W.tag!==6?(W=Pd(Q,Y.mode,de),W.return=Y,W):(W=y(W,Q),W.return=Y,W)}function H(Y,W,Q,de){var Ne=Q.type;return Ne===L?ie(Y,W,Q.props.children,de,Q.key):W!==null&&(W.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===I&&Nm(Ne)===W.type)?(de=y(W,Q.props),de.ref=bi(Y,W,Q),de.return=Y,de):(de=wl(Q.type,Q.key,Q.props,null,Y.mode,de),de.ref=bi(Y,W,Q),de.return=Y,de)}function Z(Y,W,Q,de){return W===null||W.tag!==4||W.stateNode.containerInfo!==Q.containerInfo||W.stateNode.implementation!==Q.implementation?(W=Td(Q,Y.mode,de),W.return=Y,W):(W=y(W,Q.children||[]),W.return=Y,W)}function ie(Y,W,Q,de,Ne){return W===null||W.tag!==7?(W=Uo(Q,Y.mode,de,Ne),W.return=Y,W):(W=y(W,Q),W.return=Y,W)}function ae(Y,W,Q){if(typeof W=="string"&&W!==""||typeof W=="number")return W=Pd(""+W,Y.mode,Q),W.return=Y,W;if(typeof W=="object"&&W!==null){switch(W.$$typeof){case M:return Q=wl(W.type,W.key,W.props,null,Y.mode,Q),Q.ref=bi(Y,null,W),Q.return=Y,Q;case P:return W=Td(W,Y.mode,Q),W.return=Y,W;case I:var de=W._init;return ae(Y,de(W._payload),Q)}if(st(W)||K(W))return W=Uo(W,Y.mode,Q,null),W.return=Y,W;Qa(Y,W)}return null}function oe(Y,W,Q,de){var Ne=W!==null?W.key:null;if(typeof Q=="string"&&Q!==""||typeof Q=="number")return Ne!==null?null:z(Y,W,""+Q,de);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case M:return Q.key===Ne?H(Y,W,Q,de):null;case P:return Q.key===Ne?Z(Y,W,Q,de):null;case I:return Ne=Q._init,oe(Y,W,Ne(Q._payload),de)}if(st(Q)||K(Q))return Ne!==null?null:ie(Y,W,Q,de,null);Qa(Y,Q)}return null}function ge(Y,W,Q,de,Ne){if(typeof de=="string"&&de!==""||typeof de=="number")return Y=Y.get(Q)||null,z(W,Y,""+de,Ne);if(typeof de=="object"&&de!==null){switch(de.$$typeof){case M:return Y=Y.get(de.key===null?Q:de.key)||null,H(W,Y,de,Ne);case P:return Y=Y.get(de.key===null?Q:de.key)||null,Z(W,Y,de,Ne);case I:var Re=de._init;return ge(Y,W,Q,Re(de._payload),Ne)}if(st(de)||K(de))return Y=Y.get(Q)||null,ie(W,Y,de,Ne,null);Qa(W,de)}return null}function ke(Y,W,Q,de){for(var Ne=null,Re=null,Ae=W,Ie=W=0,Ut=null;Ae!==null&&Ie<Q.length;Ie++){Ae.index>Ie?(Ut=Ae,Ae=null):Ut=Ae.sibling;var We=oe(Y,Ae,Q[Ie],de);if(We===null){Ae===null&&(Ae=Ut);break}r&&Ae&&We.alternate===null&&s(Y,Ae),W=w(We,W,Ie),Re===null?Ne=We:Re.sibling=We,Re=We,Ae=Ut}if(Ie===Q.length)return u(Y,Ae),ut&&Lo(Y,Ie),Ne;if(Ae===null){for(;Ie<Q.length;Ie++)Ae=ae(Y,Q[Ie],de),Ae!==null&&(W=w(Ae,W,Ie),Re===null?Ne=Ae:Re.sibling=Ae,Re=Ae);return ut&&Lo(Y,Ie),Ne}for(Ae=f(Y,Ae);Ie<Q.length;Ie++)Ut=ge(Ae,Y,Ie,Q[Ie],de),Ut!==null&&(r&&Ut.alternate!==null&&Ae.delete(Ut.key===null?Ie:Ut.key),W=w(Ut,W,Ie),Re===null?Ne=Ut:Re.sibling=Ut,Re=Ut);return r&&Ae.forEach(function(ho){return s(Y,ho)}),ut&&Lo(Y,Ie),Ne}function je(Y,W,Q,de){var Ne=K(Q);if(typeof Ne!="function")throw Error(n(150));if(Q=Ne.call(Q),Q==null)throw Error(n(151));for(var Re=Ne=null,Ae=W,Ie=W=0,Ut=null,We=Q.next();Ae!==null&&!We.done;Ie++,We=Q.next()){Ae.index>Ie?(Ut=Ae,Ae=null):Ut=Ae.sibling;var ho=oe(Y,Ae,We.value,de);if(ho===null){Ae===null&&(Ae=Ut);break}r&&Ae&&ho.alternate===null&&s(Y,Ae),W=w(ho,W,Ie),Re===null?Ne=ho:Re.sibling=ho,Re=ho,Ae=Ut}if(We.done)return u(Y,Ae),ut&&Lo(Y,Ie),Ne;if(Ae===null){for(;!We.done;Ie++,We=Q.next())We=ae(Y,We.value,de),We!==null&&(W=w(We,W,Ie),Re===null?Ne=We:Re.sibling=We,Re=We);return ut&&Lo(Y,Ie),Ne}for(Ae=f(Y,Ae);!We.done;Ie++,We=Q.next())We=ge(Ae,Y,Ie,We.value,de),We!==null&&(r&&We.alternate!==null&&Ae.delete(We.key===null?Ie:We.key),W=w(We,W,Ie),Re===null?Ne=We:Re.sibling=We,Re=We);return r&&Ae.forEach(function(Tj){return s(Y,Tj)}),ut&&Lo(Y,Ie),Ne}function Nt(Y,W,Q,de){if(typeof Q=="object"&&Q!==null&&Q.type===L&&Q.key===null&&(Q=Q.props.children),typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case M:e:{for(var Ne=Q.key,Re=W;Re!==null;){if(Re.key===Ne){if(Ne=Q.type,Ne===L){if(Re.tag===7){u(Y,Re.sibling),W=y(Re,Q.props.children),W.return=Y,Y=W;break e}}else if(Re.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===I&&Nm(Ne)===Re.type){u(Y,Re.sibling),W=y(Re,Q.props),W.ref=bi(Y,Re,Q),W.return=Y,Y=W;break e}u(Y,Re);break}else s(Y,Re);Re=Re.sibling}Q.type===L?(W=Uo(Q.props.children,Y.mode,de,Q.key),W.return=Y,Y=W):(de=wl(Q.type,Q.key,Q.props,null,Y.mode,de),de.ref=bi(Y,W,Q),de.return=Y,Y=de)}return C(Y);case P:e:{for(Re=Q.key;W!==null;){if(W.key===Re)if(W.tag===4&&W.stateNode.containerInfo===Q.containerInfo&&W.stateNode.implementation===Q.implementation){u(Y,W.sibling),W=y(W,Q.children||[]),W.return=Y,Y=W;break e}else{u(Y,W);break}else s(Y,W);W=W.sibling}W=Td(Q,Y.mode,de),W.return=Y,Y=W}return C(Y);case I:return Re=Q._init,Nt(Y,W,Re(Q._payload),de)}if(st(Q))return ke(Y,W,Q,de);if(K(Q))return je(Y,W,Q,de);Qa(Y,Q)}return typeof Q=="string"&&Q!==""||typeof Q=="number"?(Q=""+Q,W!==null&&W.tag===6?(u(Y,W.sibling),W=y(W,Q),W.return=Y,Y=W):(u(Y,W),W=Pd(Q,Y.mode,de),W.return=Y,Y=W),C(Y)):u(Y,W)}return Nt}var fs=Em(!0),Pm=Em(!1),Ja=no(null),Za=null,ps=null,$u=null;function Fu(){$u=ps=Za=null}function zu(r){var s=Ja.current;at(Ja),r._currentValue=s}function Bu(r,s,u){for(;r!==null;){var f=r.alternate;if((r.childLanes&s)!==s?(r.childLanes|=s,f!==null&&(f.childLanes|=s)):f!==null&&(f.childLanes&s)!==s&&(f.childLanes|=s),r===u)break;r=r.return}}function hs(r,s){Za=r,$u=ps=null,r=r.dependencies,r!==null&&r.firstContext!==null&&((r.lanes&s)!==0&&(vn=!0),r.firstContext=null)}function qn(r){var s=r._currentValue;if($u!==r)if(r={context:r,memoizedValue:s,next:null},ps===null){if(Za===null)throw Error(n(308));ps=r,Za.dependencies={lanes:0,firstContext:r}}else ps=ps.next=r;return s}var Oo=null;function Uu(r){Oo===null?Oo=[r]:Oo.push(r)}function Tm(r,s,u,f){var y=s.interleaved;return y===null?(u.next=u,Uu(s)):(u.next=y.next,y.next=u),s.interleaved=u,Mr(r,f)}function Mr(r,s){r.lanes|=s;var u=r.alternate;for(u!==null&&(u.lanes|=s),u=r,r=r.return;r!==null;)r.childLanes|=s,u=r.alternate,u!==null&&(u.childLanes|=s),u=r,r=r.return;return u.tag===3?u.stateNode:null}var so=!1;function Hu(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Rm(r,s){r=r.updateQueue,s.updateQueue===r&&(s.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,effects:r.effects})}function $r(r,s){return{eventTime:r,lane:s,tag:0,payload:null,callback:null,next:null}}function io(r,s,u){var f=r.updateQueue;if(f===null)return null;if(f=f.shared,(He&2)!==0){var y=f.pending;return y===null?s.next=s:(s.next=y.next,y.next=s),f.pending=s,Mr(r,u)}return y=f.interleaved,y===null?(s.next=s,Uu(f)):(s.next=y.next,y.next=s),f.interleaved=s,Mr(r,u)}function el(r,s,u){if(s=s.updateQueue,s!==null&&(s=s.shared,(u&4194240)!==0)){var f=s.lanes;f&=r.pendingLanes,u|=f,s.lanes=u,ru(r,u)}}function Am(r,s){var u=r.updateQueue,f=r.alternate;if(f!==null&&(f=f.updateQueue,u===f)){var y=null,w=null;if(u=u.firstBaseUpdate,u!==null){do{var C={eventTime:u.eventTime,lane:u.lane,tag:u.tag,payload:u.payload,callback:u.callback,next:null};w===null?y=w=C:w=w.next=C,u=u.next}while(u!==null);w===null?y=w=s:w=w.next=s}else y=w=s;u={baseState:f.baseState,firstBaseUpdate:y,lastBaseUpdate:w,shared:f.shared,effects:f.effects},r.updateQueue=u;return}r=u.lastBaseUpdate,r===null?u.firstBaseUpdate=s:r.next=s,u.lastBaseUpdate=s}function tl(r,s,u,f){var y=r.updateQueue;so=!1;var w=y.firstBaseUpdate,C=y.lastBaseUpdate,z=y.shared.pending;if(z!==null){y.shared.pending=null;var H=z,Z=H.next;H.next=null,C===null?w=Z:C.next=Z,C=H;var ie=r.alternate;ie!==null&&(ie=ie.updateQueue,z=ie.lastBaseUpdate,z!==C&&(z===null?ie.firstBaseUpdate=Z:z.next=Z,ie.lastBaseUpdate=H))}if(w!==null){var ae=y.baseState;C=0,ie=Z=H=null,z=w;do{var oe=z.lane,ge=z.eventTime;if((f&oe)===oe){ie!==null&&(ie=ie.next={eventTime:ge,lane:0,tag:z.tag,payload:z.payload,callback:z.callback,next:null});e:{var ke=r,je=z;switch(oe=s,ge=u,je.tag){case 1:if(ke=je.payload,typeof ke=="function"){ae=ke.call(ge,ae,oe);break e}ae=ke;break e;case 3:ke.flags=ke.flags&-65537|128;case 0:if(ke=je.payload,oe=typeof ke=="function"?ke.call(ge,ae,oe):ke,oe==null)break e;ae=E({},ae,oe);break e;case 2:so=!0}}z.callback!==null&&z.lane!==0&&(r.flags|=64,oe=y.effects,oe===null?y.effects=[z]:oe.push(z))}else ge={eventTime:ge,lane:oe,tag:z.tag,payload:z.payload,callback:z.callback,next:null},ie===null?(Z=ie=ge,H=ae):ie=ie.next=ge,C|=oe;if(z=z.next,z===null){if(z=y.shared.pending,z===null)break;oe=z,z=oe.next,oe.next=null,y.lastBaseUpdate=oe,y.shared.pending=null}}while(!0);if(ie===null&&(H=ae),y.baseState=H,y.firstBaseUpdate=Z,y.lastBaseUpdate=ie,s=y.shared.interleaved,s!==null){y=s;do C|=y.lane,y=y.next;while(y!==s)}else w===null&&(y.shared.lanes=0);$o|=C,r.lanes=C,r.memoizedState=ae}}function Dm(r,s,u){if(r=s.effects,s.effects=null,r!==null)for(s=0;s<r.length;s++){var f=r[s],y=f.callback;if(y!==null){if(f.callback=null,f=u,typeof y!="function")throw Error(n(191,y));y.call(f)}}}var wi={},xr=no(wi),ki=no(wi),ji=no(wi);function _o(r){if(r===wi)throw Error(n(174));return r}function Wu(r,s){switch(tt(ji,s),tt(ki,r),tt(xr,wi),r=s.nodeType,r){case 9:case 11:s=(s=s.documentElement)?s.namespaceURI:le(null,"");break;default:r=r===8?s.parentNode:s,s=r.namespaceURI||null,r=r.tagName,s=le(s,r)}at(xr),tt(xr,s)}function ms(){at(xr),at(ki),at(ji)}function Im(r){_o(ji.current);var s=_o(xr.current),u=le(s,r.type);s!==u&&(tt(ki,r),tt(xr,u))}function Vu(r){ki.current===r&&(at(xr),at(ki))}var yt=no(0);function nl(r){for(var s=r;s!==null;){if(s.tag===13){var u=s.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||u.data==="$?"||u.data==="$!"))return s}else if(s.tag===19&&s.memoizedProps.revealOrder!==void 0){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===r)break;for(;s.sibling===null;){if(s.return===null||s.return===r)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var qu=[];function Ku(){for(var r=0;r<qu.length;r++)qu[r]._workInProgressVersionPrimary=null;qu.length=0}var rl=D.ReactCurrentDispatcher,Gu=D.ReactCurrentBatchConfig,Mo=0,vt=null,It=null,zt=null,ol=!1,Si=!1,Ci=0,Qk=0;function sn(){throw Error(n(321))}function Yu(r,s){if(s===null)return!1;for(var u=0;u<s.length&&u<r.length;u++)if(!nr(r[u],s[u]))return!1;return!0}function Xu(r,s,u,f,y,w){if(Mo=w,vt=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,rl.current=r===null||r.memoizedState===null?tj:nj,r=u(f,y),Si){w=0;do{if(Si=!1,Ci=0,25<=w)throw Error(n(301));w+=1,zt=It=null,s.updateQueue=null,rl.current=rj,r=u(f,y)}while(Si)}if(rl.current=al,s=It!==null&&It.next!==null,Mo=0,zt=It=vt=null,ol=!1,s)throw Error(n(300));return r}function Qu(){var r=Ci!==0;return Ci=0,r}function yr(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return zt===null?vt.memoizedState=zt=r:zt=zt.next=r,zt}function Kn(){if(It===null){var r=vt.alternate;r=r!==null?r.memoizedState:null}else r=It.next;var s=zt===null?vt.memoizedState:zt.next;if(s!==null)zt=s,It=r;else{if(r===null)throw Error(n(310));It=r,r={memoizedState:It.memoizedState,baseState:It.baseState,baseQueue:It.baseQueue,queue:It.queue,next:null},zt===null?vt.memoizedState=zt=r:zt=zt.next=r}return zt}function Ni(r,s){return typeof s=="function"?s(r):s}function Ju(r){var s=Kn(),u=s.queue;if(u===null)throw Error(n(311));u.lastRenderedReducer=r;var f=It,y=f.baseQueue,w=u.pending;if(w!==null){if(y!==null){var C=y.next;y.next=w.next,w.next=C}f.baseQueue=y=w,u.pending=null}if(y!==null){w=y.next,f=f.baseState;var z=C=null,H=null,Z=w;do{var ie=Z.lane;if((Mo&ie)===ie)H!==null&&(H=H.next={lane:0,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null}),f=Z.hasEagerState?Z.eagerState:r(f,Z.action);else{var ae={lane:ie,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null};H===null?(z=H=ae,C=f):H=H.next=ae,vt.lanes|=ie,$o|=ie}Z=Z.next}while(Z!==null&&Z!==w);H===null?C=f:H.next=z,nr(f,s.memoizedState)||(vn=!0),s.memoizedState=f,s.baseState=C,s.baseQueue=H,u.lastRenderedState=f}if(r=u.interleaved,r!==null){y=r;do w=y.lane,vt.lanes|=w,$o|=w,y=y.next;while(y!==r)}else y===null&&(u.lanes=0);return[s.memoizedState,u.dispatch]}function Zu(r){var s=Kn(),u=s.queue;if(u===null)throw Error(n(311));u.lastRenderedReducer=r;var f=u.dispatch,y=u.pending,w=s.memoizedState;if(y!==null){u.pending=null;var C=y=y.next;do w=r(w,C.action),C=C.next;while(C!==y);nr(w,s.memoizedState)||(vn=!0),s.memoizedState=w,s.baseQueue===null&&(s.baseState=w),u.lastRenderedState=w}return[w,f]}function Lm(){}function Om(r,s){var u=vt,f=Kn(),y=s(),w=!nr(f.memoizedState,y);if(w&&(f.memoizedState=y,vn=!0),f=f.queue,ed($m.bind(null,u,f,r),[r]),f.getSnapshot!==s||w||zt!==null&&zt.memoizedState.tag&1){if(u.flags|=2048,Ei(9,Mm.bind(null,u,f,y,s),void 0,null),Bt===null)throw Error(n(349));(Mo&30)!==0||_m(u,s,y)}return y}function _m(r,s,u){r.flags|=16384,r={getSnapshot:s,value:u},s=vt.updateQueue,s===null?(s={lastEffect:null,stores:null},vt.updateQueue=s,s.stores=[r]):(u=s.stores,u===null?s.stores=[r]:u.push(r))}function Mm(r,s,u,f){s.value=u,s.getSnapshot=f,Fm(s)&&zm(r)}function $m(r,s,u){return u(function(){Fm(s)&&zm(r)})}function Fm(r){var s=r.getSnapshot;r=r.value;try{var u=s();return!nr(r,u)}catch{return!0}}function zm(r){var s=Mr(r,1);s!==null&&ar(s,r,1,-1)}function Bm(r){var s=yr();return typeof r=="function"&&(r=r()),s.memoizedState=s.baseState=r,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ni,lastRenderedState:r},s.queue=r,r=r.dispatch=ej.bind(null,vt,r),[s.memoizedState,r]}function Ei(r,s,u,f){return r={tag:r,create:s,destroy:u,deps:f,next:null},s=vt.updateQueue,s===null?(s={lastEffect:null,stores:null},vt.updateQueue=s,s.lastEffect=r.next=r):(u=s.lastEffect,u===null?s.lastEffect=r.next=r:(f=u.next,u.next=r,r.next=f,s.lastEffect=r)),r}function Um(){return Kn().memoizedState}function sl(r,s,u,f){var y=yr();vt.flags|=r,y.memoizedState=Ei(1|s,u,void 0,f===void 0?null:f)}function il(r,s,u,f){var y=Kn();f=f===void 0?null:f;var w=void 0;if(It!==null){var C=It.memoizedState;if(w=C.destroy,f!==null&&Yu(f,C.deps)){y.memoizedState=Ei(s,u,w,f);return}}vt.flags|=r,y.memoizedState=Ei(1|s,u,w,f)}function Hm(r,s){return sl(8390656,8,r,s)}function ed(r,s){return il(2048,8,r,s)}function Wm(r,s){return il(4,2,r,s)}function Vm(r,s){return il(4,4,r,s)}function qm(r,s){if(typeof s=="function")return r=r(),s(r),function(){s(null)};if(s!=null)return r=r(),s.current=r,function(){s.current=null}}function Km(r,s,u){return u=u!=null?u.concat([r]):null,il(4,4,qm.bind(null,s,r),u)}function td(){}function Gm(r,s){var u=Kn();s=s===void 0?null:s;var f=u.memoizedState;return f!==null&&s!==null&&Yu(s,f[1])?f[0]:(u.memoizedState=[r,s],r)}function Ym(r,s){var u=Kn();s=s===void 0?null:s;var f=u.memoizedState;return f!==null&&s!==null&&Yu(s,f[1])?f[0]:(r=r(),u.memoizedState=[r,s],r)}function Xm(r,s,u){return(Mo&21)===0?(r.baseState&&(r.baseState=!1,vn=!0),r.memoizedState=u):(nr(u,s)||(u=Nh(),vt.lanes|=u,$o|=u,r.baseState=!0),s)}function Jk(r,s){var u=Ye;Ye=u!==0&&4>u?u:4,r(!0);var f=Gu.transition;Gu.transition={};try{r(!1),s()}finally{Ye=u,Gu.transition=f}}function Qm(){return Kn().memoizedState}function Zk(r,s,u){var f=uo(r);if(u={lane:f,action:u,hasEagerState:!1,eagerState:null,next:null},Jm(r))Zm(s,u);else if(u=Tm(r,s,u,f),u!==null){var y=fn();ar(u,r,f,y),eg(u,s,f)}}function ej(r,s,u){var f=uo(r),y={lane:f,action:u,hasEagerState:!1,eagerState:null,next:null};if(Jm(r))Zm(s,y);else{var w=r.alternate;if(r.lanes===0&&(w===null||w.lanes===0)&&(w=s.lastRenderedReducer,w!==null))try{var C=s.lastRenderedState,z=w(C,u);if(y.hasEagerState=!0,y.eagerState=z,nr(z,C)){var H=s.interleaved;H===null?(y.next=y,Uu(s)):(y.next=H.next,H.next=y),s.interleaved=y;return}}catch{}finally{}u=Tm(r,s,y,f),u!==null&&(y=fn(),ar(u,r,f,y),eg(u,s,f))}}function Jm(r){var s=r.alternate;return r===vt||s!==null&&s===vt}function Zm(r,s){Si=ol=!0;var u=r.pending;u===null?s.next=s:(s.next=u.next,u.next=s),r.pending=s}function eg(r,s,u){if((u&4194240)!==0){var f=s.lanes;f&=r.pendingLanes,u|=f,s.lanes=u,ru(r,u)}}var al={readContext:qn,useCallback:sn,useContext:sn,useEffect:sn,useImperativeHandle:sn,useInsertionEffect:sn,useLayoutEffect:sn,useMemo:sn,useReducer:sn,useRef:sn,useState:sn,useDebugValue:sn,useDeferredValue:sn,useTransition:sn,useMutableSource:sn,useSyncExternalStore:sn,useId:sn,unstable_isNewReconciler:!1},tj={readContext:qn,useCallback:function(r,s){return yr().memoizedState=[r,s===void 0?null:s],r},useContext:qn,useEffect:Hm,useImperativeHandle:function(r,s,u){return u=u!=null?u.concat([r]):null,sl(4194308,4,qm.bind(null,s,r),u)},useLayoutEffect:function(r,s){return sl(4194308,4,r,s)},useInsertionEffect:function(r,s){return sl(4,2,r,s)},useMemo:function(r,s){var u=yr();return s=s===void 0?null:s,r=r(),u.memoizedState=[r,s],r},useReducer:function(r,s,u){var f=yr();return s=u!==void 0?u(s):s,f.memoizedState=f.baseState=s,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:s},f.queue=r,r=r.dispatch=Zk.bind(null,vt,r),[f.memoizedState,r]},useRef:function(r){var s=yr();return r={current:r},s.memoizedState=r},useState:Bm,useDebugValue:td,useDeferredValue:function(r){return yr().memoizedState=r},useTransition:function(){var r=Bm(!1),s=r[0];return r=Jk.bind(null,r[1]),yr().memoizedState=r,[s,r]},useMutableSource:function(){},useSyncExternalStore:function(r,s,u){var f=vt,y=yr();if(ut){if(u===void 0)throw Error(n(407));u=u()}else{if(u=s(),Bt===null)throw Error(n(349));(Mo&30)!==0||_m(f,s,u)}y.memoizedState=u;var w={value:u,getSnapshot:s};return y.queue=w,Hm($m.bind(null,f,w,r),[r]),f.flags|=2048,Ei(9,Mm.bind(null,f,w,u,s),void 0,null),u},useId:function(){var r=yr(),s=Bt.identifierPrefix;if(ut){var u=_r,f=Or;u=(f&~(1<<32-tr(f)-1)).toString(32)+u,s=":"+s+"R"+u,u=Ci++,0<u&&(s+="H"+u.toString(32)),s+=":"}else u=Qk++,s=":"+s+"r"+u.toString(32)+":";return r.memoizedState=s},unstable_isNewReconciler:!1},nj={readContext:qn,useCallback:Gm,useContext:qn,useEffect:ed,useImperativeHandle:Km,useInsertionEffect:Wm,useLayoutEffect:Vm,useMemo:Ym,useReducer:Ju,useRef:Um,useState:function(){return Ju(Ni)},useDebugValue:td,useDeferredValue:function(r){var s=Kn();return Xm(s,It.memoizedState,r)},useTransition:function(){var r=Ju(Ni)[0],s=Kn().memoizedState;return[r,s]},useMutableSource:Lm,useSyncExternalStore:Om,useId:Qm,unstable_isNewReconciler:!1},rj={readContext:qn,useCallback:Gm,useContext:qn,useEffect:ed,useImperativeHandle:Km,useInsertionEffect:Wm,useLayoutEffect:Vm,useMemo:Ym,useReducer:Zu,useRef:Um,useState:function(){return Zu(Ni)},useDebugValue:td,useDeferredValue:function(r){var s=Kn();return It===null?s.memoizedState=r:Xm(s,It.memoizedState,r)},useTransition:function(){var r=Zu(Ni)[0],s=Kn().memoizedState;return[r,s]},useMutableSource:Lm,useSyncExternalStore:Om,useId:Qm,unstable_isNewReconciler:!1};function or(r,s){if(r&&r.defaultProps){s=E({},s),r=r.defaultProps;for(var u in r)s[u]===void 0&&(s[u]=r[u]);return s}return s}function nd(r,s,u,f){s=r.memoizedState,u=u(f,s),u=u==null?s:E({},s,u),r.memoizedState=u,r.lanes===0&&(r.updateQueue.baseState=u)}var ll={isMounted:function(r){return(r=r._reactInternals)?Ro(r)===r:!1},enqueueSetState:function(r,s,u){r=r._reactInternals;var f=fn(),y=uo(r),w=$r(f,y);w.payload=s,u!=null&&(w.callback=u),s=io(r,w,y),s!==null&&(ar(s,r,y,f),el(s,r,y))},enqueueReplaceState:function(r,s,u){r=r._reactInternals;var f=fn(),y=uo(r),w=$r(f,y);w.tag=1,w.payload=s,u!=null&&(w.callback=u),s=io(r,w,y),s!==null&&(ar(s,r,y,f),el(s,r,y))},enqueueForceUpdate:function(r,s){r=r._reactInternals;var u=fn(),f=uo(r),y=$r(u,f);y.tag=2,s!=null&&(y.callback=s),s=io(r,y,f),s!==null&&(ar(s,r,f,u),el(s,r,f))}};function tg(r,s,u,f,y,w,C){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(f,w,C):s.prototype&&s.prototype.isPureReactComponent?!pi(u,f)||!pi(y,w):!0}function ng(r,s,u){var f=!1,y=ro,w=s.contextType;return typeof w=="object"&&w!==null?w=qn(w):(y=yn(s)?Do:on.current,f=s.contextTypes,w=(f=f!=null)?ls(r,y):ro),s=new s(u,w),r.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=ll,r.stateNode=s,s._reactInternals=r,f&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=y,r.__reactInternalMemoizedMaskedChildContext=w),s}function rg(r,s,u,f){r=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(u,f),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(u,f),s.state!==r&&ll.enqueueReplaceState(s,s.state,null)}function rd(r,s,u,f){var y=r.stateNode;y.props=u,y.state=r.memoizedState,y.refs={},Hu(r);var w=s.contextType;typeof w=="object"&&w!==null?y.context=qn(w):(w=yn(s)?Do:on.current,y.context=ls(r,w)),y.state=r.memoizedState,w=s.getDerivedStateFromProps,typeof w=="function"&&(nd(r,s,w,u),y.state=r.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof y.getSnapshotBeforeUpdate=="function"||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(s=y.state,typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount(),s!==y.state&&ll.enqueueReplaceState(y,y.state,null),tl(r,u,y,f),y.state=r.memoizedState),typeof y.componentDidMount=="function"&&(r.flags|=4194308)}function gs(r,s){try{var u="",f=s;do u+=me(f),f=f.return;while(f);var y=u}catch(w){y=`
|
|
39
|
+
Error generating stack: `+w.message+`
|
|
40
|
+
`+w.stack}return{value:r,source:s,stack:y,digest:null}}function od(r,s,u){return{value:r,source:null,stack:u??null,digest:s??null}}function sd(r,s){try{console.error(s.value)}catch(u){setTimeout(function(){throw u})}}var oj=typeof WeakMap=="function"?WeakMap:Map;function og(r,s,u){u=$r(-1,u),u.tag=3,u.payload={element:null};var f=s.value;return u.callback=function(){ml||(ml=!0,bd=f),sd(r,s)},u}function sg(r,s,u){u=$r(-1,u),u.tag=3;var f=r.type.getDerivedStateFromError;if(typeof f=="function"){var y=s.value;u.payload=function(){return f(y)},u.callback=function(){sd(r,s)}}var w=r.stateNode;return w!==null&&typeof w.componentDidCatch=="function"&&(u.callback=function(){sd(r,s),typeof f!="function"&&(lo===null?lo=new Set([this]):lo.add(this));var C=s.stack;this.componentDidCatch(s.value,{componentStack:C!==null?C:""})}),u}function ig(r,s,u){var f=r.pingCache;if(f===null){f=r.pingCache=new oj;var y=new Set;f.set(s,y)}else y=f.get(s),y===void 0&&(y=new Set,f.set(s,y));y.has(u)||(y.add(u),r=yj.bind(null,r,s,u),s.then(r,r))}function ag(r){do{var s;if((s=r.tag===13)&&(s=r.memoizedState,s=s!==null?s.dehydrated!==null:!0),s)return r;r=r.return}while(r!==null);return null}function lg(r,s,u,f,y){return(r.mode&1)===0?(r===s?r.flags|=65536:(r.flags|=128,u.flags|=131072,u.flags&=-52805,u.tag===1&&(u.alternate===null?u.tag=17:(s=$r(-1,1),s.tag=2,io(u,s,1))),u.lanes|=1),r):(r.flags|=65536,r.lanes=y,r)}var sj=D.ReactCurrentOwner,vn=!1;function dn(r,s,u,f){s.child=r===null?Pm(s,null,u,f):fs(s,r.child,u,f)}function cg(r,s,u,f,y){u=u.render;var w=s.ref;return hs(s,y),f=Xu(r,s,u,f,w,y),u=Qu(),r!==null&&!vn?(s.updateQueue=r.updateQueue,s.flags&=-2053,r.lanes&=~y,Fr(r,s,y)):(ut&&u&&Iu(s),s.flags|=1,dn(r,s,f,y),s.child)}function ug(r,s,u,f,y){if(r===null){var w=u.type;return typeof w=="function"&&!Ed(w)&&w.defaultProps===void 0&&u.compare===null&&u.defaultProps===void 0?(s.tag=15,s.type=w,dg(r,s,w,f,y)):(r=wl(u.type,null,f,s,s.mode,y),r.ref=s.ref,r.return=s,s.child=r)}if(w=r.child,(r.lanes&y)===0){var C=w.memoizedProps;if(u=u.compare,u=u!==null?u:pi,u(C,f)&&r.ref===s.ref)return Fr(r,s,y)}return s.flags|=1,r=po(w,f),r.ref=s.ref,r.return=s,s.child=r}function dg(r,s,u,f,y){if(r!==null){var w=r.memoizedProps;if(pi(w,f)&&r.ref===s.ref)if(vn=!1,s.pendingProps=f=w,(r.lanes&y)!==0)(r.flags&131072)!==0&&(vn=!0);else return s.lanes=r.lanes,Fr(r,s,y)}return id(r,s,u,f,y)}function fg(r,s,u){var f=s.pendingProps,y=f.children,w=r!==null?r.memoizedState:null;if(f.mode==="hidden")if((s.mode&1)===0)s.memoizedState={baseLanes:0,cachePool:null,transitions:null},tt(ys,On),On|=u;else{if((u&1073741824)===0)return r=w!==null?w.baseLanes|u:u,s.lanes=s.childLanes=1073741824,s.memoizedState={baseLanes:r,cachePool:null,transitions:null},s.updateQueue=null,tt(ys,On),On|=r,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},f=w!==null?w.baseLanes:u,tt(ys,On),On|=f}else w!==null?(f=w.baseLanes|u,s.memoizedState=null):f=u,tt(ys,On),On|=f;return dn(r,s,y,u),s.child}function pg(r,s){var u=s.ref;(r===null&&u!==null||r!==null&&r.ref!==u)&&(s.flags|=512,s.flags|=2097152)}function id(r,s,u,f,y){var w=yn(u)?Do:on.current;return w=ls(s,w),hs(s,y),u=Xu(r,s,u,f,w,y),f=Qu(),r!==null&&!vn?(s.updateQueue=r.updateQueue,s.flags&=-2053,r.lanes&=~y,Fr(r,s,y)):(ut&&f&&Iu(s),s.flags|=1,dn(r,s,u,y),s.child)}function hg(r,s,u,f,y){if(yn(u)){var w=!0;qa(s)}else w=!1;if(hs(s,y),s.stateNode===null)ul(r,s),ng(s,u,f),rd(s,u,f,y),f=!0;else if(r===null){var C=s.stateNode,z=s.memoizedProps;C.props=z;var H=C.context,Z=u.contextType;typeof Z=="object"&&Z!==null?Z=qn(Z):(Z=yn(u)?Do:on.current,Z=ls(s,Z));var ie=u.getDerivedStateFromProps,ae=typeof ie=="function"||typeof C.getSnapshotBeforeUpdate=="function";ae||typeof C.UNSAFE_componentWillReceiveProps!="function"&&typeof C.componentWillReceiveProps!="function"||(z!==f||H!==Z)&&rg(s,C,f,Z),so=!1;var oe=s.memoizedState;C.state=oe,tl(s,f,C,y),H=s.memoizedState,z!==f||oe!==H||xn.current||so?(typeof ie=="function"&&(nd(s,u,ie,f),H=s.memoizedState),(z=so||tg(s,u,z,f,oe,H,Z))?(ae||typeof C.UNSAFE_componentWillMount!="function"&&typeof C.componentWillMount!="function"||(typeof C.componentWillMount=="function"&&C.componentWillMount(),typeof C.UNSAFE_componentWillMount=="function"&&C.UNSAFE_componentWillMount()),typeof C.componentDidMount=="function"&&(s.flags|=4194308)):(typeof C.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=f,s.memoizedState=H),C.props=f,C.state=H,C.context=Z,f=z):(typeof C.componentDidMount=="function"&&(s.flags|=4194308),f=!1)}else{C=s.stateNode,Rm(r,s),z=s.memoizedProps,Z=s.type===s.elementType?z:or(s.type,z),C.props=Z,ae=s.pendingProps,oe=C.context,H=u.contextType,typeof H=="object"&&H!==null?H=qn(H):(H=yn(u)?Do:on.current,H=ls(s,H));var ge=u.getDerivedStateFromProps;(ie=typeof ge=="function"||typeof C.getSnapshotBeforeUpdate=="function")||typeof C.UNSAFE_componentWillReceiveProps!="function"&&typeof C.componentWillReceiveProps!="function"||(z!==ae||oe!==H)&&rg(s,C,f,H),so=!1,oe=s.memoizedState,C.state=oe,tl(s,f,C,y);var ke=s.memoizedState;z!==ae||oe!==ke||xn.current||so?(typeof ge=="function"&&(nd(s,u,ge,f),ke=s.memoizedState),(Z=so||tg(s,u,Z,f,oe,ke,H)||!1)?(ie||typeof C.UNSAFE_componentWillUpdate!="function"&&typeof C.componentWillUpdate!="function"||(typeof C.componentWillUpdate=="function"&&C.componentWillUpdate(f,ke,H),typeof C.UNSAFE_componentWillUpdate=="function"&&C.UNSAFE_componentWillUpdate(f,ke,H)),typeof C.componentDidUpdate=="function"&&(s.flags|=4),typeof C.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof C.componentDidUpdate!="function"||z===r.memoizedProps&&oe===r.memoizedState||(s.flags|=4),typeof C.getSnapshotBeforeUpdate!="function"||z===r.memoizedProps&&oe===r.memoizedState||(s.flags|=1024),s.memoizedProps=f,s.memoizedState=ke),C.props=f,C.state=ke,C.context=H,f=Z):(typeof C.componentDidUpdate!="function"||z===r.memoizedProps&&oe===r.memoizedState||(s.flags|=4),typeof C.getSnapshotBeforeUpdate!="function"||z===r.memoizedProps&&oe===r.memoizedState||(s.flags|=1024),f=!1)}return ad(r,s,u,f,w,y)}function ad(r,s,u,f,y,w){pg(r,s);var C=(s.flags&128)!==0;if(!f&&!C)return y&&vm(s,u,!1),Fr(r,s,w);f=s.stateNode,sj.current=s;var z=C&&typeof u.getDerivedStateFromError!="function"?null:f.render();return s.flags|=1,r!==null&&C?(s.child=fs(s,r.child,null,w),s.child=fs(s,null,z,w)):dn(r,s,z,w),s.memoizedState=f.state,y&&vm(s,u,!0),s.child}function mg(r){var s=r.stateNode;s.pendingContext?xm(r,s.pendingContext,s.pendingContext!==s.context):s.context&&xm(r,s.context,!1),Wu(r,s.containerInfo)}function gg(r,s,u,f,y){return ds(),Mu(y),s.flags|=256,dn(r,s,u,f),s.child}var ld={dehydrated:null,treeContext:null,retryLane:0};function cd(r){return{baseLanes:r,cachePool:null,transitions:null}}function xg(r,s,u){var f=s.pendingProps,y=yt.current,w=!1,C=(s.flags&128)!==0,z;if((z=C)||(z=r!==null&&r.memoizedState===null?!1:(y&2)!==0),z?(w=!0,s.flags&=-129):(r===null||r.memoizedState!==null)&&(y|=1),tt(yt,y&1),r===null)return _u(s),r=s.memoizedState,r!==null&&(r=r.dehydrated,r!==null)?((s.mode&1)===0?s.lanes=1:r.data==="$!"?s.lanes=8:s.lanes=1073741824,null):(C=f.children,r=f.fallback,w?(f=s.mode,w=s.child,C={mode:"hidden",children:C},(f&1)===0&&w!==null?(w.childLanes=0,w.pendingProps=C):w=kl(C,f,0,null),r=Uo(r,f,u,null),w.return=s,r.return=s,w.sibling=r,s.child=w,s.child.memoizedState=cd(u),s.memoizedState=ld,r):ud(s,C));if(y=r.memoizedState,y!==null&&(z=y.dehydrated,z!==null))return ij(r,s,C,f,z,y,u);if(w){w=f.fallback,C=s.mode,y=r.child,z=y.sibling;var H={mode:"hidden",children:f.children};return(C&1)===0&&s.child!==y?(f=s.child,f.childLanes=0,f.pendingProps=H,s.deletions=null):(f=po(y,H),f.subtreeFlags=y.subtreeFlags&14680064),z!==null?w=po(z,w):(w=Uo(w,C,u,null),w.flags|=2),w.return=s,f.return=s,f.sibling=w,s.child=f,f=w,w=s.child,C=r.child.memoizedState,C=C===null?cd(u):{baseLanes:C.baseLanes|u,cachePool:null,transitions:C.transitions},w.memoizedState=C,w.childLanes=r.childLanes&~u,s.memoizedState=ld,f}return w=r.child,r=w.sibling,f=po(w,{mode:"visible",children:f.children}),(s.mode&1)===0&&(f.lanes=u),f.return=s,f.sibling=null,r!==null&&(u=s.deletions,u===null?(s.deletions=[r],s.flags|=16):u.push(r)),s.child=f,s.memoizedState=null,f}function ud(r,s){return s=kl({mode:"visible",children:s},r.mode,0,null),s.return=r,r.child=s}function cl(r,s,u,f){return f!==null&&Mu(f),fs(s,r.child,null,u),r=ud(s,s.pendingProps.children),r.flags|=2,s.memoizedState=null,r}function ij(r,s,u,f,y,w,C){if(u)return s.flags&256?(s.flags&=-257,f=od(Error(n(422))),cl(r,s,C,f)):s.memoizedState!==null?(s.child=r.child,s.flags|=128,null):(w=f.fallback,y=s.mode,f=kl({mode:"visible",children:f.children},y,0,null),w=Uo(w,y,C,null),w.flags|=2,f.return=s,w.return=s,f.sibling=w,s.child=f,(s.mode&1)!==0&&fs(s,r.child,null,C),s.child.memoizedState=cd(C),s.memoizedState=ld,w);if((s.mode&1)===0)return cl(r,s,C,null);if(y.data==="$!"){if(f=y.nextSibling&&y.nextSibling.dataset,f)var z=f.dgst;return f=z,w=Error(n(419)),f=od(w,f,void 0),cl(r,s,C,f)}if(z=(C&r.childLanes)!==0,vn||z){if(f=Bt,f!==null){switch(C&-C){case 4:y=2;break;case 16:y=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:y=32;break;case 536870912:y=268435456;break;default:y=0}y=(y&(f.suspendedLanes|C))!==0?0:y,y!==0&&y!==w.retryLane&&(w.retryLane=y,Mr(r,y),ar(f,r,y,-1))}return Nd(),f=od(Error(n(421))),cl(r,s,C,f)}return y.data==="$?"?(s.flags|=128,s.child=r.child,s=vj.bind(null,r),y._reactRetry=s,null):(r=w.treeContext,Ln=to(y.nextSibling),In=s,ut=!0,rr=null,r!==null&&(Wn[Vn++]=Or,Wn[Vn++]=_r,Wn[Vn++]=Io,Or=r.id,_r=r.overflow,Io=s),s=ud(s,f.children),s.flags|=4096,s)}function yg(r,s,u){r.lanes|=s;var f=r.alternate;f!==null&&(f.lanes|=s),Bu(r.return,s,u)}function dd(r,s,u,f,y){var w=r.memoizedState;w===null?r.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:f,tail:u,tailMode:y}:(w.isBackwards=s,w.rendering=null,w.renderingStartTime=0,w.last=f,w.tail=u,w.tailMode=y)}function vg(r,s,u){var f=s.pendingProps,y=f.revealOrder,w=f.tail;if(dn(r,s,f.children,u),f=yt.current,(f&2)!==0)f=f&1|2,s.flags|=128;else{if(r!==null&&(r.flags&128)!==0)e:for(r=s.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&yg(r,u,s);else if(r.tag===19)yg(r,u,s);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===s)break e;for(;r.sibling===null;){if(r.return===null||r.return===s)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}f&=1}if(tt(yt,f),(s.mode&1)===0)s.memoizedState=null;else switch(y){case"forwards":for(u=s.child,y=null;u!==null;)r=u.alternate,r!==null&&nl(r)===null&&(y=u),u=u.sibling;u=y,u===null?(y=s.child,s.child=null):(y=u.sibling,u.sibling=null),dd(s,!1,y,u,w);break;case"backwards":for(u=null,y=s.child,s.child=null;y!==null;){if(r=y.alternate,r!==null&&nl(r)===null){s.child=y;break}r=y.sibling,y.sibling=u,u=y,y=r}dd(s,!0,u,null,w);break;case"together":dd(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function ul(r,s){(s.mode&1)===0&&r!==null&&(r.alternate=null,s.alternate=null,s.flags|=2)}function Fr(r,s,u){if(r!==null&&(s.dependencies=r.dependencies),$o|=s.lanes,(u&s.childLanes)===0)return null;if(r!==null&&s.child!==r.child)throw Error(n(153));if(s.child!==null){for(r=s.child,u=po(r,r.pendingProps),s.child=u,u.return=s;r.sibling!==null;)r=r.sibling,u=u.sibling=po(r,r.pendingProps),u.return=s;u.sibling=null}return s.child}function aj(r,s,u){switch(s.tag){case 3:mg(s),ds();break;case 5:Im(s);break;case 1:yn(s.type)&&qa(s);break;case 4:Wu(s,s.stateNode.containerInfo);break;case 10:var f=s.type._context,y=s.memoizedProps.value;tt(Ja,f._currentValue),f._currentValue=y;break;case 13:if(f=s.memoizedState,f!==null)return f.dehydrated!==null?(tt(yt,yt.current&1),s.flags|=128,null):(u&s.child.childLanes)!==0?xg(r,s,u):(tt(yt,yt.current&1),r=Fr(r,s,u),r!==null?r.sibling:null);tt(yt,yt.current&1);break;case 19:if(f=(u&s.childLanes)!==0,(r.flags&128)!==0){if(f)return vg(r,s,u);s.flags|=128}if(y=s.memoizedState,y!==null&&(y.rendering=null,y.tail=null,y.lastEffect=null),tt(yt,yt.current),f)break;return null;case 22:case 23:return s.lanes=0,fg(r,s,u)}return Fr(r,s,u)}var bg,fd,wg,kg;bg=function(r,s){for(var u=s.child;u!==null;){if(u.tag===5||u.tag===6)r.appendChild(u.stateNode);else if(u.tag!==4&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===s)break;for(;u.sibling===null;){if(u.return===null||u.return===s)return;u=u.return}u.sibling.return=u.return,u=u.sibling}},fd=function(){},wg=function(r,s,u,f){var y=r.memoizedProps;if(y!==f){r=s.stateNode,_o(xr.current);var w=null;switch(u){case"input":y=_e(r,y),f=_e(r,f),w=[];break;case"select":y=E({},y,{value:void 0}),f=E({},f,{value:void 0}),w=[];break;case"textarea":y=Zt(r,y),f=Zt(r,f),w=[];break;default:typeof y.onClick!="function"&&typeof f.onClick=="function"&&(r.onclick=Ha)}ce(u,f);var C;u=null;for(Z in y)if(!f.hasOwnProperty(Z)&&y.hasOwnProperty(Z)&&y[Z]!=null)if(Z==="style"){var z=y[Z];for(C in z)z.hasOwnProperty(C)&&(u||(u={}),u[C]="")}else Z!=="dangerouslySetInnerHTML"&&Z!=="children"&&Z!=="suppressContentEditableWarning"&&Z!=="suppressHydrationWarning"&&Z!=="autoFocus"&&(i.hasOwnProperty(Z)?w||(w=[]):(w=w||[]).push(Z,null));for(Z in f){var H=f[Z];if(z=y!=null?y[Z]:void 0,f.hasOwnProperty(Z)&&H!==z&&(H!=null||z!=null))if(Z==="style")if(z){for(C in z)!z.hasOwnProperty(C)||H&&H.hasOwnProperty(C)||(u||(u={}),u[C]="");for(C in H)H.hasOwnProperty(C)&&z[C]!==H[C]&&(u||(u={}),u[C]=H[C])}else u||(w||(w=[]),w.push(Z,u)),u=H;else Z==="dangerouslySetInnerHTML"?(H=H?H.__html:void 0,z=z?z.__html:void 0,H!=null&&z!==H&&(w=w||[]).push(Z,H)):Z==="children"?typeof H!="string"&&typeof H!="number"||(w=w||[]).push(Z,""+H):Z!=="suppressContentEditableWarning"&&Z!=="suppressHydrationWarning"&&(i.hasOwnProperty(Z)?(H!=null&&Z==="onScroll"&&it("scroll",r),w||z===H||(w=[])):(w=w||[]).push(Z,H))}u&&(w=w||[]).push("style",u);var Z=w;(s.updateQueue=Z)&&(s.flags|=4)}},kg=function(r,s,u,f){u!==f&&(s.flags|=4)};function Pi(r,s){if(!ut)switch(r.tailMode){case"hidden":s=r.tail;for(var u=null;s!==null;)s.alternate!==null&&(u=s),s=s.sibling;u===null?r.tail=null:u.sibling=null;break;case"collapsed":u=r.tail;for(var f=null;u!==null;)u.alternate!==null&&(f=u),u=u.sibling;f===null?s||r.tail===null?r.tail=null:r.tail.sibling=null:f.sibling=null}}function an(r){var s=r.alternate!==null&&r.alternate.child===r.child,u=0,f=0;if(s)for(var y=r.child;y!==null;)u|=y.lanes|y.childLanes,f|=y.subtreeFlags&14680064,f|=y.flags&14680064,y.return=r,y=y.sibling;else for(y=r.child;y!==null;)u|=y.lanes|y.childLanes,f|=y.subtreeFlags,f|=y.flags,y.return=r,y=y.sibling;return r.subtreeFlags|=f,r.childLanes=u,s}function lj(r,s,u){var f=s.pendingProps;switch(Lu(s),s.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return an(s),null;case 1:return yn(s.type)&&Va(),an(s),null;case 3:return f=s.stateNode,ms(),at(xn),at(on),Ku(),f.pendingContext&&(f.context=f.pendingContext,f.pendingContext=null),(r===null||r.child===null)&&(Xa(s)?s.flags|=4:r===null||r.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,rr!==null&&(jd(rr),rr=null))),fd(r,s),an(s),null;case 5:Vu(s);var y=_o(ji.current);if(u=s.type,r!==null&&s.stateNode!=null)wg(r,s,u,f,y),r.ref!==s.ref&&(s.flags|=512,s.flags|=2097152);else{if(!f){if(s.stateNode===null)throw Error(n(166));return an(s),null}if(r=_o(xr.current),Xa(s)){f=s.stateNode,u=s.type;var w=s.memoizedProps;switch(f[gr]=s,f[yi]=w,r=(s.mode&1)!==0,u){case"dialog":it("cancel",f),it("close",f);break;case"iframe":case"object":case"embed":it("load",f);break;case"video":case"audio":for(y=0;y<mi.length;y++)it(mi[y],f);break;case"source":it("error",f);break;case"img":case"image":case"link":it("error",f),it("load",f);break;case"details":it("toggle",f);break;case"input":ct(f,w),it("invalid",f);break;case"select":f._wrapperState={wasMultiple:!!w.multiple},it("invalid",f);break;case"textarea":mn(f,w),it("invalid",f)}ce(u,w),y=null;for(var C in w)if(w.hasOwnProperty(C)){var z=w[C];C==="children"?typeof z=="string"?f.textContent!==z&&(w.suppressHydrationWarning!==!0&&Ua(f.textContent,z,r),y=["children",z]):typeof z=="number"&&f.textContent!==""+z&&(w.suppressHydrationWarning!==!0&&Ua(f.textContent,z,r),y=["children",""+z]):i.hasOwnProperty(C)&&z!=null&&C==="onScroll"&&it("scroll",f)}switch(u){case"input":Je(f),Pt(f,w,!0);break;case"textarea":Je(f),Rn(f);break;case"select":case"option":break;default:typeof w.onClick=="function"&&(f.onclick=Ha)}f=y,s.updateQueue=f,f!==null&&(s.flags|=4)}else{C=y.nodeType===9?y:y.ownerDocument,r==="http://www.w3.org/1999/xhtml"&&(r=re(u)),r==="http://www.w3.org/1999/xhtml"?u==="script"?(r=C.createElement("div"),r.innerHTML="<script><\/script>",r=r.removeChild(r.firstChild)):typeof f.is=="string"?r=C.createElement(u,{is:f.is}):(r=C.createElement(u),u==="select"&&(C=r,f.multiple?C.multiple=!0:f.size&&(C.size=f.size))):r=C.createElementNS(r,u),r[gr]=s,r[yi]=f,bg(r,s,!1,!1),s.stateNode=r;e:{switch(C=ve(u,f),u){case"dialog":it("cancel",r),it("close",r),y=f;break;case"iframe":case"object":case"embed":it("load",r),y=f;break;case"video":case"audio":for(y=0;y<mi.length;y++)it(mi[y],r);y=f;break;case"source":it("error",r),y=f;break;case"img":case"image":case"link":it("error",r),it("load",r),y=f;break;case"details":it("toggle",r),y=f;break;case"input":ct(r,f),y=_e(r,f),it("invalid",r);break;case"option":y=f;break;case"select":r._wrapperState={wasMultiple:!!f.multiple},y=E({},f,{value:void 0}),it("invalid",r);break;case"textarea":mn(r,f),y=Zt(r,f),it("invalid",r);break;default:y=f}ce(u,y),z=y;for(w in z)if(z.hasOwnProperty(w)){var H=z[w];w==="style"?Gt(r,H):w==="dangerouslySetInnerHTML"?(H=H?H.__html:void 0,H!=null&&te(r,H)):w==="children"?typeof H=="string"?(u!=="textarea"||H!=="")&&ye(r,H):typeof H=="number"&&ye(r,""+H):w!=="suppressContentEditableWarning"&&w!=="suppressHydrationWarning"&&w!=="autoFocus"&&(i.hasOwnProperty(w)?H!=null&&w==="onScroll"&&it("scroll",r):H!=null&&R(r,w,H,C))}switch(u){case"input":Je(r),Pt(r,f,!1);break;case"textarea":Je(r),Rn(r);break;case"option":f.value!=null&&r.setAttribute("value",""+Ce(f.value));break;case"select":r.multiple=!!f.multiple,w=f.value,w!=null?Kt(r,!!f.multiple,w,!1):f.defaultValue!=null&&Kt(r,!!f.multiple,f.defaultValue,!0);break;default:typeof y.onClick=="function"&&(r.onclick=Ha)}switch(u){case"button":case"input":case"select":case"textarea":f=!!f.autoFocus;break e;case"img":f=!0;break e;default:f=!1}}f&&(s.flags|=4)}s.ref!==null&&(s.flags|=512,s.flags|=2097152)}return an(s),null;case 6:if(r&&s.stateNode!=null)kg(r,s,r.memoizedProps,f);else{if(typeof f!="string"&&s.stateNode===null)throw Error(n(166));if(u=_o(ji.current),_o(xr.current),Xa(s)){if(f=s.stateNode,u=s.memoizedProps,f[gr]=s,(w=f.nodeValue!==u)&&(r=In,r!==null))switch(r.tag){case 3:Ua(f.nodeValue,u,(r.mode&1)!==0);break;case 5:r.memoizedProps.suppressHydrationWarning!==!0&&Ua(f.nodeValue,u,(r.mode&1)!==0)}w&&(s.flags|=4)}else f=(u.nodeType===9?u:u.ownerDocument).createTextNode(f),f[gr]=s,s.stateNode=f}return an(s),null;case 13:if(at(yt),f=s.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(ut&&Ln!==null&&(s.mode&1)!==0&&(s.flags&128)===0)Cm(),ds(),s.flags|=98560,w=!1;else if(w=Xa(s),f!==null&&f.dehydrated!==null){if(r===null){if(!w)throw Error(n(318));if(w=s.memoizedState,w=w!==null?w.dehydrated:null,!w)throw Error(n(317));w[gr]=s}else ds(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;an(s),w=!1}else rr!==null&&(jd(rr),rr=null),w=!0;if(!w)return s.flags&65536?s:null}return(s.flags&128)!==0?(s.lanes=u,s):(f=f!==null,f!==(r!==null&&r.memoizedState!==null)&&f&&(s.child.flags|=8192,(s.mode&1)!==0&&(r===null||(yt.current&1)!==0?Lt===0&&(Lt=3):Nd())),s.updateQueue!==null&&(s.flags|=4),an(s),null);case 4:return ms(),fd(r,s),r===null&&gi(s.stateNode.containerInfo),an(s),null;case 10:return zu(s.type._context),an(s),null;case 17:return yn(s.type)&&Va(),an(s),null;case 19:if(at(yt),w=s.memoizedState,w===null)return an(s),null;if(f=(s.flags&128)!==0,C=w.rendering,C===null)if(f)Pi(w,!1);else{if(Lt!==0||r!==null&&(r.flags&128)!==0)for(r=s.child;r!==null;){if(C=nl(r),C!==null){for(s.flags|=128,Pi(w,!1),f=C.updateQueue,f!==null&&(s.updateQueue=f,s.flags|=4),s.subtreeFlags=0,f=u,u=s.child;u!==null;)w=u,r=f,w.flags&=14680066,C=w.alternate,C===null?(w.childLanes=0,w.lanes=r,w.child=null,w.subtreeFlags=0,w.memoizedProps=null,w.memoizedState=null,w.updateQueue=null,w.dependencies=null,w.stateNode=null):(w.childLanes=C.childLanes,w.lanes=C.lanes,w.child=C.child,w.subtreeFlags=0,w.deletions=null,w.memoizedProps=C.memoizedProps,w.memoizedState=C.memoizedState,w.updateQueue=C.updateQueue,w.type=C.type,r=C.dependencies,w.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),u=u.sibling;return tt(yt,yt.current&1|2),s.child}r=r.sibling}w.tail!==null&&Ct()>vs&&(s.flags|=128,f=!0,Pi(w,!1),s.lanes=4194304)}else{if(!f)if(r=nl(C),r!==null){if(s.flags|=128,f=!0,u=r.updateQueue,u!==null&&(s.updateQueue=u,s.flags|=4),Pi(w,!0),w.tail===null&&w.tailMode==="hidden"&&!C.alternate&&!ut)return an(s),null}else 2*Ct()-w.renderingStartTime>vs&&u!==1073741824&&(s.flags|=128,f=!0,Pi(w,!1),s.lanes=4194304);w.isBackwards?(C.sibling=s.child,s.child=C):(u=w.last,u!==null?u.sibling=C:s.child=C,w.last=C)}return w.tail!==null?(s=w.tail,w.rendering=s,w.tail=s.sibling,w.renderingStartTime=Ct(),s.sibling=null,u=yt.current,tt(yt,f?u&1|2:u&1),s):(an(s),null);case 22:case 23:return Cd(),f=s.memoizedState!==null,r!==null&&r.memoizedState!==null!==f&&(s.flags|=8192),f&&(s.mode&1)!==0?(On&1073741824)!==0&&(an(s),s.subtreeFlags&6&&(s.flags|=8192)):an(s),null;case 24:return null;case 25:return null}throw Error(n(156,s.tag))}function cj(r,s){switch(Lu(s),s.tag){case 1:return yn(s.type)&&Va(),r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 3:return ms(),at(xn),at(on),Ku(),r=s.flags,(r&65536)!==0&&(r&128)===0?(s.flags=r&-65537|128,s):null;case 5:return Vu(s),null;case 13:if(at(yt),r=s.memoizedState,r!==null&&r.dehydrated!==null){if(s.alternate===null)throw Error(n(340));ds()}return r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 19:return at(yt),null;case 4:return ms(),null;case 10:return zu(s.type._context),null;case 22:case 23:return Cd(),null;case 24:return null;default:return null}}var dl=!1,ln=!1,uj=typeof WeakSet=="function"?WeakSet:Set,be=null;function xs(r,s){var u=r.ref;if(u!==null)if(typeof u=="function")try{u(null)}catch(f){kt(r,s,f)}else u.current=null}function pd(r,s,u){try{u()}catch(f){kt(r,s,f)}}var jg=!1;function dj(r,s){if(Cu=Aa,r=tm(),xu(r)){if("selectionStart"in r)var u={start:r.selectionStart,end:r.selectionEnd};else e:{u=(u=r.ownerDocument)&&u.defaultView||window;var f=u.getSelection&&u.getSelection();if(f&&f.rangeCount!==0){u=f.anchorNode;var y=f.anchorOffset,w=f.focusNode;f=f.focusOffset;try{u.nodeType,w.nodeType}catch{u=null;break e}var C=0,z=-1,H=-1,Z=0,ie=0,ae=r,oe=null;t:for(;;){for(var ge;ae!==u||y!==0&&ae.nodeType!==3||(z=C+y),ae!==w||f!==0&&ae.nodeType!==3||(H=C+f),ae.nodeType===3&&(C+=ae.nodeValue.length),(ge=ae.firstChild)!==null;)oe=ae,ae=ge;for(;;){if(ae===r)break t;if(oe===u&&++Z===y&&(z=C),oe===w&&++ie===f&&(H=C),(ge=ae.nextSibling)!==null)break;ae=oe,oe=ae.parentNode}ae=ge}u=z===-1||H===-1?null:{start:z,end:H}}else u=null}u=u||{start:0,end:0}}else u=null;for(Nu={focusedElem:r,selectionRange:u},Aa=!1,be=s;be!==null;)if(s=be,r=s.child,(s.subtreeFlags&1028)!==0&&r!==null)r.return=s,be=r;else for(;be!==null;){s=be;try{var ke=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(ke!==null){var je=ke.memoizedProps,Nt=ke.memoizedState,Y=s.stateNode,W=Y.getSnapshotBeforeUpdate(s.elementType===s.type?je:or(s.type,je),Nt);Y.__reactInternalSnapshotBeforeUpdate=W}break;case 3:var Q=s.stateNode.containerInfo;Q.nodeType===1?Q.textContent="":Q.nodeType===9&&Q.documentElement&&Q.removeChild(Q.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(de){kt(s,s.return,de)}if(r=s.sibling,r!==null){r.return=s.return,be=r;break}be=s.return}return ke=jg,jg=!1,ke}function Ti(r,s,u){var f=s.updateQueue;if(f=f!==null?f.lastEffect:null,f!==null){var y=f=f.next;do{if((y.tag&r)===r){var w=y.destroy;y.destroy=void 0,w!==void 0&&pd(s,u,w)}y=y.next}while(y!==f)}}function fl(r,s){if(s=s.updateQueue,s=s!==null?s.lastEffect:null,s!==null){var u=s=s.next;do{if((u.tag&r)===r){var f=u.create;u.destroy=f()}u=u.next}while(u!==s)}}function hd(r){var s=r.ref;if(s!==null){var u=r.stateNode;switch(r.tag){case 5:r=u;break;default:r=u}typeof s=="function"?s(r):s.current=r}}function Sg(r){var s=r.alternate;s!==null&&(r.alternate=null,Sg(s)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(s=r.stateNode,s!==null&&(delete s[gr],delete s[yi],delete s[Ru],delete s[Kk],delete s[Gk])),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}function Cg(r){return r.tag===5||r.tag===3||r.tag===4}function Ng(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||Cg(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function md(r,s,u){var f=r.tag;if(f===5||f===6)r=r.stateNode,s?u.nodeType===8?u.parentNode.insertBefore(r,s):u.insertBefore(r,s):(u.nodeType===8?(s=u.parentNode,s.insertBefore(r,u)):(s=u,s.appendChild(r)),u=u._reactRootContainer,u!=null||s.onclick!==null||(s.onclick=Ha));else if(f!==4&&(r=r.child,r!==null))for(md(r,s,u),r=r.sibling;r!==null;)md(r,s,u),r=r.sibling}function gd(r,s,u){var f=r.tag;if(f===5||f===6)r=r.stateNode,s?u.insertBefore(r,s):u.appendChild(r);else if(f!==4&&(r=r.child,r!==null))for(gd(r,s,u),r=r.sibling;r!==null;)gd(r,s,u),r=r.sibling}var Xt=null,sr=!1;function ao(r,s,u){for(u=u.child;u!==null;)Eg(r,s,u),u=u.sibling}function Eg(r,s,u){if(mr&&typeof mr.onCommitFiberUnmount=="function")try{mr.onCommitFiberUnmount(Ca,u)}catch{}switch(u.tag){case 5:ln||xs(u,s);case 6:var f=Xt,y=sr;Xt=null,ao(r,s,u),Xt=f,sr=y,Xt!==null&&(sr?(r=Xt,u=u.stateNode,r.nodeType===8?r.parentNode.removeChild(u):r.removeChild(u)):Xt.removeChild(u.stateNode));break;case 18:Xt!==null&&(sr?(r=Xt,u=u.stateNode,r.nodeType===8?Tu(r.parentNode,u):r.nodeType===1&&Tu(r,u),ai(r)):Tu(Xt,u.stateNode));break;case 4:f=Xt,y=sr,Xt=u.stateNode.containerInfo,sr=!0,ao(r,s,u),Xt=f,sr=y;break;case 0:case 11:case 14:case 15:if(!ln&&(f=u.updateQueue,f!==null&&(f=f.lastEffect,f!==null))){y=f=f.next;do{var w=y,C=w.destroy;w=w.tag,C!==void 0&&((w&2)!==0||(w&4)!==0)&&pd(u,s,C),y=y.next}while(y!==f)}ao(r,s,u);break;case 1:if(!ln&&(xs(u,s),f=u.stateNode,typeof f.componentWillUnmount=="function"))try{f.props=u.memoizedProps,f.state=u.memoizedState,f.componentWillUnmount()}catch(z){kt(u,s,z)}ao(r,s,u);break;case 21:ao(r,s,u);break;case 22:u.mode&1?(ln=(f=ln)||u.memoizedState!==null,ao(r,s,u),ln=f):ao(r,s,u);break;default:ao(r,s,u)}}function Pg(r){var s=r.updateQueue;if(s!==null){r.updateQueue=null;var u=r.stateNode;u===null&&(u=r.stateNode=new uj),s.forEach(function(f){var y=bj.bind(null,r,f);u.has(f)||(u.add(f),f.then(y,y))})}}function ir(r,s){var u=s.deletions;if(u!==null)for(var f=0;f<u.length;f++){var y=u[f];try{var w=r,C=s,z=C;e:for(;z!==null;){switch(z.tag){case 5:Xt=z.stateNode,sr=!1;break e;case 3:Xt=z.stateNode.containerInfo,sr=!0;break e;case 4:Xt=z.stateNode.containerInfo,sr=!0;break e}z=z.return}if(Xt===null)throw Error(n(160));Eg(w,C,y),Xt=null,sr=!1;var H=y.alternate;H!==null&&(H.return=null),y.return=null}catch(Z){kt(y,s,Z)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)Tg(s,r),s=s.sibling}function Tg(r,s){var u=r.alternate,f=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:if(ir(s,r),vr(r),f&4){try{Ti(3,r,r.return),fl(3,r)}catch(je){kt(r,r.return,je)}try{Ti(5,r,r.return)}catch(je){kt(r,r.return,je)}}break;case 1:ir(s,r),vr(r),f&512&&u!==null&&xs(u,u.return);break;case 5:if(ir(s,r),vr(r),f&512&&u!==null&&xs(u,u.return),r.flags&32){var y=r.stateNode;try{ye(y,"")}catch(je){kt(r,r.return,je)}}if(f&4&&(y=r.stateNode,y!=null)){var w=r.memoizedProps,C=u!==null?u.memoizedProps:w,z=r.type,H=r.updateQueue;if(r.updateQueue=null,H!==null)try{z==="input"&&w.type==="radio"&&w.name!=null&&et(y,w),ve(z,C);var Z=ve(z,w);for(C=0;C<H.length;C+=2){var ie=H[C],ae=H[C+1];ie==="style"?Gt(y,ae):ie==="dangerouslySetInnerHTML"?te(y,ae):ie==="children"?ye(y,ae):R(y,ie,ae,Z)}switch(z){case"input":mt(y,w);break;case"textarea":Tn(y,w);break;case"select":var oe=y._wrapperState.wasMultiple;y._wrapperState.wasMultiple=!!w.multiple;var ge=w.value;ge!=null?Kt(y,!!w.multiple,ge,!1):oe!==!!w.multiple&&(w.defaultValue!=null?Kt(y,!!w.multiple,w.defaultValue,!0):Kt(y,!!w.multiple,w.multiple?[]:"",!1))}y[yi]=w}catch(je){kt(r,r.return,je)}}break;case 6:if(ir(s,r),vr(r),f&4){if(r.stateNode===null)throw Error(n(162));y=r.stateNode,w=r.memoizedProps;try{y.nodeValue=w}catch(je){kt(r,r.return,je)}}break;case 3:if(ir(s,r),vr(r),f&4&&u!==null&&u.memoizedState.isDehydrated)try{ai(s.containerInfo)}catch(je){kt(r,r.return,je)}break;case 4:ir(s,r),vr(r);break;case 13:ir(s,r),vr(r),y=r.child,y.flags&8192&&(w=y.memoizedState!==null,y.stateNode.isHidden=w,!w||y.alternate!==null&&y.alternate.memoizedState!==null||(vd=Ct())),f&4&&Pg(r);break;case 22:if(ie=u!==null&&u.memoizedState!==null,r.mode&1?(ln=(Z=ln)||ie,ir(s,r),ln=Z):ir(s,r),vr(r),f&8192){if(Z=r.memoizedState!==null,(r.stateNode.isHidden=Z)&&!ie&&(r.mode&1)!==0)for(be=r,ie=r.child;ie!==null;){for(ae=be=ie;be!==null;){switch(oe=be,ge=oe.child,oe.tag){case 0:case 11:case 14:case 15:Ti(4,oe,oe.return);break;case 1:xs(oe,oe.return);var ke=oe.stateNode;if(typeof ke.componentWillUnmount=="function"){f=oe,u=oe.return;try{s=f,ke.props=s.memoizedProps,ke.state=s.memoizedState,ke.componentWillUnmount()}catch(je){kt(f,u,je)}}break;case 5:xs(oe,oe.return);break;case 22:if(oe.memoizedState!==null){Dg(ae);continue}}ge!==null?(ge.return=oe,be=ge):Dg(ae)}ie=ie.sibling}e:for(ie=null,ae=r;;){if(ae.tag===5){if(ie===null){ie=ae;try{y=ae.stateNode,Z?(w=y.style,typeof w.setProperty=="function"?w.setProperty("display","none","important"):w.display="none"):(z=ae.stateNode,H=ae.memoizedProps.style,C=H!=null&&H.hasOwnProperty("display")?H.display:null,z.style.display=en("display",C))}catch(je){kt(r,r.return,je)}}}else if(ae.tag===6){if(ie===null)try{ae.stateNode.nodeValue=Z?"":ae.memoizedProps}catch(je){kt(r,r.return,je)}}else if((ae.tag!==22&&ae.tag!==23||ae.memoizedState===null||ae===r)&&ae.child!==null){ae.child.return=ae,ae=ae.child;continue}if(ae===r)break e;for(;ae.sibling===null;){if(ae.return===null||ae.return===r)break e;ie===ae&&(ie=null),ae=ae.return}ie===ae&&(ie=null),ae.sibling.return=ae.return,ae=ae.sibling}}break;case 19:ir(s,r),vr(r),f&4&&Pg(r);break;case 21:break;default:ir(s,r),vr(r)}}function vr(r){var s=r.flags;if(s&2){try{e:{for(var u=r.return;u!==null;){if(Cg(u)){var f=u;break e}u=u.return}throw Error(n(160))}switch(f.tag){case 5:var y=f.stateNode;f.flags&32&&(ye(y,""),f.flags&=-33);var w=Ng(r);gd(r,w,y);break;case 3:case 4:var C=f.stateNode.containerInfo,z=Ng(r);md(r,z,C);break;default:throw Error(n(161))}}catch(H){kt(r,r.return,H)}r.flags&=-3}s&4096&&(r.flags&=-4097)}function fj(r,s,u){be=r,Rg(r)}function Rg(r,s,u){for(var f=(r.mode&1)!==0;be!==null;){var y=be,w=y.child;if(y.tag===22&&f){var C=y.memoizedState!==null||dl;if(!C){var z=y.alternate,H=z!==null&&z.memoizedState!==null||ln;z=dl;var Z=ln;if(dl=C,(ln=H)&&!Z)for(be=y;be!==null;)C=be,H=C.child,C.tag===22&&C.memoizedState!==null?Ig(y):H!==null?(H.return=C,be=H):Ig(y);for(;w!==null;)be=w,Rg(w),w=w.sibling;be=y,dl=z,ln=Z}Ag(r)}else(y.subtreeFlags&8772)!==0&&w!==null?(w.return=y,be=w):Ag(r)}}function Ag(r){for(;be!==null;){var s=be;if((s.flags&8772)!==0){var u=s.alternate;try{if((s.flags&8772)!==0)switch(s.tag){case 0:case 11:case 15:ln||fl(5,s);break;case 1:var f=s.stateNode;if(s.flags&4&&!ln)if(u===null)f.componentDidMount();else{var y=s.elementType===s.type?u.memoizedProps:or(s.type,u.memoizedProps);f.componentDidUpdate(y,u.memoizedState,f.__reactInternalSnapshotBeforeUpdate)}var w=s.updateQueue;w!==null&&Dm(s,w,f);break;case 3:var C=s.updateQueue;if(C!==null){if(u=null,s.child!==null)switch(s.child.tag){case 5:u=s.child.stateNode;break;case 1:u=s.child.stateNode}Dm(s,C,u)}break;case 5:var z=s.stateNode;if(u===null&&s.flags&4){u=z;var H=s.memoizedProps;switch(s.type){case"button":case"input":case"select":case"textarea":H.autoFocus&&u.focus();break;case"img":H.src&&(u.src=H.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(s.memoizedState===null){var Z=s.alternate;if(Z!==null){var ie=Z.memoizedState;if(ie!==null){var ae=ie.dehydrated;ae!==null&&ai(ae)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}ln||s.flags&512&&hd(s)}catch(oe){kt(s,s.return,oe)}}if(s===r){be=null;break}if(u=s.sibling,u!==null){u.return=s.return,be=u;break}be=s.return}}function Dg(r){for(;be!==null;){var s=be;if(s===r){be=null;break}var u=s.sibling;if(u!==null){u.return=s.return,be=u;break}be=s.return}}function Ig(r){for(;be!==null;){var s=be;try{switch(s.tag){case 0:case 11:case 15:var u=s.return;try{fl(4,s)}catch(H){kt(s,u,H)}break;case 1:var f=s.stateNode;if(typeof f.componentDidMount=="function"){var y=s.return;try{f.componentDidMount()}catch(H){kt(s,y,H)}}var w=s.return;try{hd(s)}catch(H){kt(s,w,H)}break;case 5:var C=s.return;try{hd(s)}catch(H){kt(s,C,H)}}}catch(H){kt(s,s.return,H)}if(s===r){be=null;break}var z=s.sibling;if(z!==null){z.return=s.return,be=z;break}be=s.return}}var pj=Math.ceil,pl=D.ReactCurrentDispatcher,xd=D.ReactCurrentOwner,Gn=D.ReactCurrentBatchConfig,He=0,Bt=null,Tt=null,Qt=0,On=0,ys=no(0),Lt=0,Ri=null,$o=0,hl=0,yd=0,Ai=null,bn=null,vd=0,vs=1/0,zr=null,ml=!1,bd=null,lo=null,gl=!1,co=null,xl=0,Di=0,wd=null,yl=-1,vl=0;function fn(){return(He&6)!==0?Ct():yl!==-1?yl:yl=Ct()}function uo(r){return(r.mode&1)===0?1:(He&2)!==0&&Qt!==0?Qt&-Qt:Xk.transition!==null?(vl===0&&(vl=Nh()),vl):(r=Ye,r!==0||(r=window.event,r=r===void 0?16:Oh(r.type)),r)}function ar(r,s,u,f){if(50<Di)throw Di=0,wd=null,Error(n(185));ni(r,u,f),((He&2)===0||r!==Bt)&&(r===Bt&&((He&2)===0&&(hl|=u),Lt===4&&fo(r,Qt)),wn(r,f),u===1&&He===0&&(s.mode&1)===0&&(vs=Ct()+500,Ka&&oo()))}function wn(r,s){var u=r.callbackNode;X1(r,s);var f=Pa(r,r===Bt?Qt:0);if(f===0)u!==null&&jh(u),r.callbackNode=null,r.callbackPriority=0;else if(s=f&-f,r.callbackPriority!==s){if(u!=null&&jh(u),s===1)r.tag===0?Yk(Og.bind(null,r)):bm(Og.bind(null,r)),Vk(function(){(He&6)===0&&oo()}),u=null;else{switch(Eh(f)){case 1:u=eu;break;case 4:u=Sh;break;case 16:u=Sa;break;case 536870912:u=Ch;break;default:u=Sa}u=Hg(u,Lg.bind(null,r))}r.callbackPriority=s,r.callbackNode=u}}function Lg(r,s){if(yl=-1,vl=0,(He&6)!==0)throw Error(n(327));var u=r.callbackNode;if(bs()&&r.callbackNode!==u)return null;var f=Pa(r,r===Bt?Qt:0);if(f===0)return null;if((f&30)!==0||(f&r.expiredLanes)!==0||s)s=bl(r,f);else{s=f;var y=He;He|=2;var w=Mg();(Bt!==r||Qt!==s)&&(zr=null,vs=Ct()+500,zo(r,s));do try{gj();break}catch(z){_g(r,z)}while(!0);Fu(),pl.current=w,He=y,Tt!==null?s=0:(Bt=null,Qt=0,s=Lt)}if(s!==0){if(s===2&&(y=tu(r),y!==0&&(f=y,s=kd(r,y))),s===1)throw u=Ri,zo(r,0),fo(r,f),wn(r,Ct()),u;if(s===6)fo(r,f);else{if(y=r.current.alternate,(f&30)===0&&!hj(y)&&(s=bl(r,f),s===2&&(w=tu(r),w!==0&&(f=w,s=kd(r,w))),s===1))throw u=Ri,zo(r,0),fo(r,f),wn(r,Ct()),u;switch(r.finishedWork=y,r.finishedLanes=f,s){case 0:case 1:throw Error(n(345));case 2:Bo(r,bn,zr);break;case 3:if(fo(r,f),(f&130023424)===f&&(s=vd+500-Ct(),10<s)){if(Pa(r,0)!==0)break;if(y=r.suspendedLanes,(y&f)!==f){fn(),r.pingedLanes|=r.suspendedLanes&y;break}r.timeoutHandle=Pu(Bo.bind(null,r,bn,zr),s);break}Bo(r,bn,zr);break;case 4:if(fo(r,f),(f&4194240)===f)break;for(s=r.eventTimes,y=-1;0<f;){var C=31-tr(f);w=1<<C,C=s[C],C>y&&(y=C),f&=~w}if(f=y,f=Ct()-f,f=(120>f?120:480>f?480:1080>f?1080:1920>f?1920:3e3>f?3e3:4320>f?4320:1960*pj(f/1960))-f,10<f){r.timeoutHandle=Pu(Bo.bind(null,r,bn,zr),f);break}Bo(r,bn,zr);break;case 5:Bo(r,bn,zr);break;default:throw Error(n(329))}}}return wn(r,Ct()),r.callbackNode===u?Lg.bind(null,r):null}function kd(r,s){var u=Ai;return r.current.memoizedState.isDehydrated&&(zo(r,s).flags|=256),r=bl(r,s),r!==2&&(s=bn,bn=u,s!==null&&jd(s)),r}function jd(r){bn===null?bn=r:bn.push.apply(bn,r)}function hj(r){for(var s=r;;){if(s.flags&16384){var u=s.updateQueue;if(u!==null&&(u=u.stores,u!==null))for(var f=0;f<u.length;f++){var y=u[f],w=y.getSnapshot;y=y.value;try{if(!nr(w(),y))return!1}catch{return!1}}}if(u=s.child,s.subtreeFlags&16384&&u!==null)u.return=s,s=u;else{if(s===r)break;for(;s.sibling===null;){if(s.return===null||s.return===r)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function fo(r,s){for(s&=~yd,s&=~hl,r.suspendedLanes|=s,r.pingedLanes&=~s,r=r.expirationTimes;0<s;){var u=31-tr(s),f=1<<u;r[u]=-1,s&=~f}}function Og(r){if((He&6)!==0)throw Error(n(327));bs();var s=Pa(r,0);if((s&1)===0)return wn(r,Ct()),null;var u=bl(r,s);if(r.tag!==0&&u===2){var f=tu(r);f!==0&&(s=f,u=kd(r,f))}if(u===1)throw u=Ri,zo(r,0),fo(r,s),wn(r,Ct()),u;if(u===6)throw Error(n(345));return r.finishedWork=r.current.alternate,r.finishedLanes=s,Bo(r,bn,zr),wn(r,Ct()),null}function Sd(r,s){var u=He;He|=1;try{return r(s)}finally{He=u,He===0&&(vs=Ct()+500,Ka&&oo())}}function Fo(r){co!==null&&co.tag===0&&(He&6)===0&&bs();var s=He;He|=1;var u=Gn.transition,f=Ye;try{if(Gn.transition=null,Ye=1,r)return r()}finally{Ye=f,Gn.transition=u,He=s,(He&6)===0&&oo()}}function Cd(){On=ys.current,at(ys)}function zo(r,s){r.finishedWork=null,r.finishedLanes=0;var u=r.timeoutHandle;if(u!==-1&&(r.timeoutHandle=-1,Wk(u)),Tt!==null)for(u=Tt.return;u!==null;){var f=u;switch(Lu(f),f.tag){case 1:f=f.type.childContextTypes,f!=null&&Va();break;case 3:ms(),at(xn),at(on),Ku();break;case 5:Vu(f);break;case 4:ms();break;case 13:at(yt);break;case 19:at(yt);break;case 10:zu(f.type._context);break;case 22:case 23:Cd()}u=u.return}if(Bt=r,Tt=r=po(r.current,null),Qt=On=s,Lt=0,Ri=null,yd=hl=$o=0,bn=Ai=null,Oo!==null){for(s=0;s<Oo.length;s++)if(u=Oo[s],f=u.interleaved,f!==null){u.interleaved=null;var y=f.next,w=u.pending;if(w!==null){var C=w.next;w.next=y,f.next=C}u.pending=f}Oo=null}return r}function _g(r,s){do{var u=Tt;try{if(Fu(),rl.current=al,ol){for(var f=vt.memoizedState;f!==null;){var y=f.queue;y!==null&&(y.pending=null),f=f.next}ol=!1}if(Mo=0,zt=It=vt=null,Si=!1,Ci=0,xd.current=null,u===null||u.return===null){Lt=1,Ri=s,Tt=null;break}e:{var w=r,C=u.return,z=u,H=s;if(s=Qt,z.flags|=32768,H!==null&&typeof H=="object"&&typeof H.then=="function"){var Z=H,ie=z,ae=ie.tag;if((ie.mode&1)===0&&(ae===0||ae===11||ae===15)){var oe=ie.alternate;oe?(ie.updateQueue=oe.updateQueue,ie.memoizedState=oe.memoizedState,ie.lanes=oe.lanes):(ie.updateQueue=null,ie.memoizedState=null)}var ge=ag(C);if(ge!==null){ge.flags&=-257,lg(ge,C,z,w,s),ge.mode&1&&ig(w,Z,s),s=ge,H=Z;var ke=s.updateQueue;if(ke===null){var je=new Set;je.add(H),s.updateQueue=je}else ke.add(H);break e}else{if((s&1)===0){ig(w,Z,s),Nd();break e}H=Error(n(426))}}else if(ut&&z.mode&1){var Nt=ag(C);if(Nt!==null){(Nt.flags&65536)===0&&(Nt.flags|=256),lg(Nt,C,z,w,s),Mu(gs(H,z));break e}}w=H=gs(H,z),Lt!==4&&(Lt=2),Ai===null?Ai=[w]:Ai.push(w),w=C;do{switch(w.tag){case 3:w.flags|=65536,s&=-s,w.lanes|=s;var Y=og(w,H,s);Am(w,Y);break e;case 1:z=H;var W=w.type,Q=w.stateNode;if((w.flags&128)===0&&(typeof W.getDerivedStateFromError=="function"||Q!==null&&typeof Q.componentDidCatch=="function"&&(lo===null||!lo.has(Q)))){w.flags|=65536,s&=-s,w.lanes|=s;var de=sg(w,z,s);Am(w,de);break e}}w=w.return}while(w!==null)}Fg(u)}catch(Ne){s=Ne,Tt===u&&u!==null&&(Tt=u=u.return);continue}break}while(!0)}function Mg(){var r=pl.current;return pl.current=al,r===null?al:r}function Nd(){(Lt===0||Lt===3||Lt===2)&&(Lt=4),Bt===null||($o&268435455)===0&&(hl&268435455)===0||fo(Bt,Qt)}function bl(r,s){var u=He;He|=2;var f=Mg();(Bt!==r||Qt!==s)&&(zr=null,zo(r,s));do try{mj();break}catch(y){_g(r,y)}while(!0);if(Fu(),He=u,pl.current=f,Tt!==null)throw Error(n(261));return Bt=null,Qt=0,Lt}function mj(){for(;Tt!==null;)$g(Tt)}function gj(){for(;Tt!==null&&!B1();)$g(Tt)}function $g(r){var s=Ug(r.alternate,r,On);r.memoizedProps=r.pendingProps,s===null?Fg(r):Tt=s,xd.current=null}function Fg(r){var s=r;do{var u=s.alternate;if(r=s.return,(s.flags&32768)===0){if(u=lj(u,s,On),u!==null){Tt=u;return}}else{if(u=cj(u,s),u!==null){u.flags&=32767,Tt=u;return}if(r!==null)r.flags|=32768,r.subtreeFlags=0,r.deletions=null;else{Lt=6,Tt=null;return}}if(s=s.sibling,s!==null){Tt=s;return}Tt=s=r}while(s!==null);Lt===0&&(Lt=5)}function Bo(r,s,u){var f=Ye,y=Gn.transition;try{Gn.transition=null,Ye=1,xj(r,s,u,f)}finally{Gn.transition=y,Ye=f}return null}function xj(r,s,u,f){do bs();while(co!==null);if((He&6)!==0)throw Error(n(327));u=r.finishedWork;var y=r.finishedLanes;if(u===null)return null;if(r.finishedWork=null,r.finishedLanes=0,u===r.current)throw Error(n(177));r.callbackNode=null,r.callbackPriority=0;var w=u.lanes|u.childLanes;if(Q1(r,w),r===Bt&&(Tt=Bt=null,Qt=0),(u.subtreeFlags&2064)===0&&(u.flags&2064)===0||gl||(gl=!0,Hg(Sa,function(){return bs(),null})),w=(u.flags&15990)!==0,(u.subtreeFlags&15990)!==0||w){w=Gn.transition,Gn.transition=null;var C=Ye;Ye=1;var z=He;He|=4,xd.current=null,dj(r,u),Tg(u,r),Mk(Nu),Aa=!!Cu,Nu=Cu=null,r.current=u,fj(u),U1(),He=z,Ye=C,Gn.transition=w}else r.current=u;if(gl&&(gl=!1,co=r,xl=y),w=r.pendingLanes,w===0&&(lo=null),V1(u.stateNode),wn(r,Ct()),s!==null)for(f=r.onRecoverableError,u=0;u<s.length;u++)y=s[u],f(y.value,{componentStack:y.stack,digest:y.digest});if(ml)throw ml=!1,r=bd,bd=null,r;return(xl&1)!==0&&r.tag!==0&&bs(),w=r.pendingLanes,(w&1)!==0?r===wd?Di++:(Di=0,wd=r):Di=0,oo(),null}function bs(){if(co!==null){var r=Eh(xl),s=Gn.transition,u=Ye;try{if(Gn.transition=null,Ye=16>r?16:r,co===null)var f=!1;else{if(r=co,co=null,xl=0,(He&6)!==0)throw Error(n(331));var y=He;for(He|=4,be=r.current;be!==null;){var w=be,C=w.child;if((be.flags&16)!==0){var z=w.deletions;if(z!==null){for(var H=0;H<z.length;H++){var Z=z[H];for(be=Z;be!==null;){var ie=be;switch(ie.tag){case 0:case 11:case 15:Ti(8,ie,w)}var ae=ie.child;if(ae!==null)ae.return=ie,be=ae;else for(;be!==null;){ie=be;var oe=ie.sibling,ge=ie.return;if(Sg(ie),ie===Z){be=null;break}if(oe!==null){oe.return=ge,be=oe;break}be=ge}}}var ke=w.alternate;if(ke!==null){var je=ke.child;if(je!==null){ke.child=null;do{var Nt=je.sibling;je.sibling=null,je=Nt}while(je!==null)}}be=w}}if((w.subtreeFlags&2064)!==0&&C!==null)C.return=w,be=C;else e:for(;be!==null;){if(w=be,(w.flags&2048)!==0)switch(w.tag){case 0:case 11:case 15:Ti(9,w,w.return)}var Y=w.sibling;if(Y!==null){Y.return=w.return,be=Y;break e}be=w.return}}var W=r.current;for(be=W;be!==null;){C=be;var Q=C.child;if((C.subtreeFlags&2064)!==0&&Q!==null)Q.return=C,be=Q;else e:for(C=W;be!==null;){if(z=be,(z.flags&2048)!==0)try{switch(z.tag){case 0:case 11:case 15:fl(9,z)}}catch(Ne){kt(z,z.return,Ne)}if(z===C){be=null;break e}var de=z.sibling;if(de!==null){de.return=z.return,be=de;break e}be=z.return}}if(He=y,oo(),mr&&typeof mr.onPostCommitFiberRoot=="function")try{mr.onPostCommitFiberRoot(Ca,r)}catch{}f=!0}return f}finally{Ye=u,Gn.transition=s}}return!1}function zg(r,s,u){s=gs(u,s),s=og(r,s,1),r=io(r,s,1),s=fn(),r!==null&&(ni(r,1,s),wn(r,s))}function kt(r,s,u){if(r.tag===3)zg(r,r,u);else for(;s!==null;){if(s.tag===3){zg(s,r,u);break}else if(s.tag===1){var f=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof f.componentDidCatch=="function"&&(lo===null||!lo.has(f))){r=gs(u,r),r=sg(s,r,1),s=io(s,r,1),r=fn(),s!==null&&(ni(s,1,r),wn(s,r));break}}s=s.return}}function yj(r,s,u){var f=r.pingCache;f!==null&&f.delete(s),s=fn(),r.pingedLanes|=r.suspendedLanes&u,Bt===r&&(Qt&u)===u&&(Lt===4||Lt===3&&(Qt&130023424)===Qt&&500>Ct()-vd?zo(r,0):yd|=u),wn(r,s)}function Bg(r,s){s===0&&((r.mode&1)===0?s=1:(s=Ea,Ea<<=1,(Ea&130023424)===0&&(Ea=4194304)));var u=fn();r=Mr(r,s),r!==null&&(ni(r,s,u),wn(r,u))}function vj(r){var s=r.memoizedState,u=0;s!==null&&(u=s.retryLane),Bg(r,u)}function bj(r,s){var u=0;switch(r.tag){case 13:var f=r.stateNode,y=r.memoizedState;y!==null&&(u=y.retryLane);break;case 19:f=r.stateNode;break;default:throw Error(n(314))}f!==null&&f.delete(s),Bg(r,u)}var Ug;Ug=function(r,s,u){if(r!==null)if(r.memoizedProps!==s.pendingProps||xn.current)vn=!0;else{if((r.lanes&u)===0&&(s.flags&128)===0)return vn=!1,aj(r,s,u);vn=(r.flags&131072)!==0}else vn=!1,ut&&(s.flags&1048576)!==0&&wm(s,Ya,s.index);switch(s.lanes=0,s.tag){case 2:var f=s.type;ul(r,s),r=s.pendingProps;var y=ls(s,on.current);hs(s,u),y=Xu(null,s,f,r,y,u);var w=Qu();return s.flags|=1,typeof y=="object"&&y!==null&&typeof y.render=="function"&&y.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,yn(f)?(w=!0,qa(s)):w=!1,s.memoizedState=y.state!==null&&y.state!==void 0?y.state:null,Hu(s),y.updater=ll,s.stateNode=y,y._reactInternals=s,rd(s,f,r,u),s=ad(null,s,f,!0,w,u)):(s.tag=0,ut&&w&&Iu(s),dn(null,s,y,u),s=s.child),s;case 16:f=s.elementType;e:{switch(ul(r,s),r=s.pendingProps,y=f._init,f=y(f._payload),s.type=f,y=s.tag=kj(f),r=or(f,r),y){case 0:s=id(null,s,f,r,u);break e;case 1:s=hg(null,s,f,r,u);break e;case 11:s=cg(null,s,f,r,u);break e;case 14:s=ug(null,s,f,or(f.type,r),u);break e}throw Error(n(306,f,""))}return s;case 0:return f=s.type,y=s.pendingProps,y=s.elementType===f?y:or(f,y),id(r,s,f,y,u);case 1:return f=s.type,y=s.pendingProps,y=s.elementType===f?y:or(f,y),hg(r,s,f,y,u);case 3:e:{if(mg(s),r===null)throw Error(n(387));f=s.pendingProps,w=s.memoizedState,y=w.element,Rm(r,s),tl(s,f,null,u);var C=s.memoizedState;if(f=C.element,w.isDehydrated)if(w={element:f,isDehydrated:!1,cache:C.cache,pendingSuspenseBoundaries:C.pendingSuspenseBoundaries,transitions:C.transitions},s.updateQueue.baseState=w,s.memoizedState=w,s.flags&256){y=gs(Error(n(423)),s),s=gg(r,s,f,u,y);break e}else if(f!==y){y=gs(Error(n(424)),s),s=gg(r,s,f,u,y);break e}else for(Ln=to(s.stateNode.containerInfo.firstChild),In=s,ut=!0,rr=null,u=Pm(s,null,f,u),s.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling;else{if(ds(),f===y){s=Fr(r,s,u);break e}dn(r,s,f,u)}s=s.child}return s;case 5:return Im(s),r===null&&_u(s),f=s.type,y=s.pendingProps,w=r!==null?r.memoizedProps:null,C=y.children,Eu(f,y)?C=null:w!==null&&Eu(f,w)&&(s.flags|=32),pg(r,s),dn(r,s,C,u),s.child;case 6:return r===null&&_u(s),null;case 13:return xg(r,s,u);case 4:return Wu(s,s.stateNode.containerInfo),f=s.pendingProps,r===null?s.child=fs(s,null,f,u):dn(r,s,f,u),s.child;case 11:return f=s.type,y=s.pendingProps,y=s.elementType===f?y:or(f,y),cg(r,s,f,y,u);case 7:return dn(r,s,s.pendingProps,u),s.child;case 8:return dn(r,s,s.pendingProps.children,u),s.child;case 12:return dn(r,s,s.pendingProps.children,u),s.child;case 10:e:{if(f=s.type._context,y=s.pendingProps,w=s.memoizedProps,C=y.value,tt(Ja,f._currentValue),f._currentValue=C,w!==null)if(nr(w.value,C)){if(w.children===y.children&&!xn.current){s=Fr(r,s,u);break e}}else for(w=s.child,w!==null&&(w.return=s);w!==null;){var z=w.dependencies;if(z!==null){C=w.child;for(var H=z.firstContext;H!==null;){if(H.context===f){if(w.tag===1){H=$r(-1,u&-u),H.tag=2;var Z=w.updateQueue;if(Z!==null){Z=Z.shared;var ie=Z.pending;ie===null?H.next=H:(H.next=ie.next,ie.next=H),Z.pending=H}}w.lanes|=u,H=w.alternate,H!==null&&(H.lanes|=u),Bu(w.return,u,s),z.lanes|=u;break}H=H.next}}else if(w.tag===10)C=w.type===s.type?null:w.child;else if(w.tag===18){if(C=w.return,C===null)throw Error(n(341));C.lanes|=u,z=C.alternate,z!==null&&(z.lanes|=u),Bu(C,u,s),C=w.sibling}else C=w.child;if(C!==null)C.return=w;else for(C=w;C!==null;){if(C===s){C=null;break}if(w=C.sibling,w!==null){w.return=C.return,C=w;break}C=C.return}w=C}dn(r,s,y.children,u),s=s.child}return s;case 9:return y=s.type,f=s.pendingProps.children,hs(s,u),y=qn(y),f=f(y),s.flags|=1,dn(r,s,f,u),s.child;case 14:return f=s.type,y=or(f,s.pendingProps),y=or(f.type,y),ug(r,s,f,y,u);case 15:return dg(r,s,s.type,s.pendingProps,u);case 17:return f=s.type,y=s.pendingProps,y=s.elementType===f?y:or(f,y),ul(r,s),s.tag=1,yn(f)?(r=!0,qa(s)):r=!1,hs(s,u),ng(s,f,y),rd(s,f,y,u),ad(null,s,f,!0,r,u);case 19:return vg(r,s,u);case 22:return fg(r,s,u)}throw Error(n(156,s.tag))};function Hg(r,s){return kh(r,s)}function wj(r,s,u,f){this.tag=r,this.key=u,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=f,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Yn(r,s,u,f){return new wj(r,s,u,f)}function Ed(r){return r=r.prototype,!(!r||!r.isReactComponent)}function kj(r){if(typeof r=="function")return Ed(r)?1:0;if(r!=null){if(r=r.$$typeof,r===G)return 11;if(r===$)return 14}return 2}function po(r,s){var u=r.alternate;return u===null?(u=Yn(r.tag,s,r.key,r.mode),u.elementType=r.elementType,u.type=r.type,u.stateNode=r.stateNode,u.alternate=r,r.alternate=u):(u.pendingProps=s,u.type=r.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=r.flags&14680064,u.childLanes=r.childLanes,u.lanes=r.lanes,u.child=r.child,u.memoizedProps=r.memoizedProps,u.memoizedState=r.memoizedState,u.updateQueue=r.updateQueue,s=r.dependencies,u.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},u.sibling=r.sibling,u.index=r.index,u.ref=r.ref,u}function wl(r,s,u,f,y,w){var C=2;if(f=r,typeof r=="function")Ed(r)&&(C=1);else if(typeof r=="string")C=5;else e:switch(r){case L:return Uo(u.children,y,w,s);case _:C=8,y|=8;break;case J:return r=Yn(12,u,s,y|2),r.elementType=J,r.lanes=w,r;case q:return r=Yn(13,u,s,y),r.elementType=q,r.lanes=w,r;case ee:return r=Yn(19,u,s,y),r.elementType=ee,r.lanes=w,r;case A:return kl(u,y,w,s);default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case ne:C=10;break e;case U:C=9;break e;case G:C=11;break e;case $:C=14;break e;case I:C=16,f=null;break e}throw Error(n(130,r==null?r:typeof r,""))}return s=Yn(C,u,s,y),s.elementType=r,s.type=f,s.lanes=w,s}function Uo(r,s,u,f){return r=Yn(7,r,f,s),r.lanes=u,r}function kl(r,s,u,f){return r=Yn(22,r,f,s),r.elementType=A,r.lanes=u,r.stateNode={isHidden:!1},r}function Pd(r,s,u){return r=Yn(6,r,null,s),r.lanes=u,r}function Td(r,s,u){return s=Yn(4,r.children!==null?r.children:[],r.key,s),s.lanes=u,s.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},s}function jj(r,s,u,f,y){this.tag=s,this.containerInfo=r,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=nu(0),this.expirationTimes=nu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=nu(0),this.identifierPrefix=f,this.onRecoverableError=y,this.mutableSourceEagerHydrationData=null}function Rd(r,s,u,f,y,w,C,z,H){return r=new jj(r,s,u,z,H),s===1?(s=1,w===!0&&(s|=8)):s=0,w=Yn(3,null,null,s),r.current=w,w.stateNode=r,w.memoizedState={element:f,isDehydrated:u,cache:null,transitions:null,pendingSuspenseBoundaries:null},Hu(w),r}function Sj(r,s,u){var f=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:P,key:f==null?null:""+f,children:r,containerInfo:s,implementation:u}}function Wg(r){if(!r)return ro;r=r._reactInternals;e:{if(Ro(r)!==r||r.tag!==1)throw Error(n(170));var s=r;do{switch(s.tag){case 3:s=s.stateNode.context;break e;case 1:if(yn(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break e}}s=s.return}while(s!==null);throw Error(n(171))}if(r.tag===1){var u=r.type;if(yn(u))return ym(r,u,s)}return s}function Vg(r,s,u,f,y,w,C,z,H){return r=Rd(u,f,!0,r,y,w,C,z,H),r.context=Wg(null),u=r.current,f=fn(),y=uo(u),w=$r(f,y),w.callback=s??null,io(u,w,y),r.current.lanes=y,ni(r,y,f),wn(r,f),r}function jl(r,s,u,f){var y=s.current,w=fn(),C=uo(y);return u=Wg(u),s.context===null?s.context=u:s.pendingContext=u,s=$r(w,C),s.payload={element:r},f=f===void 0?null:f,f!==null&&(s.callback=f),r=io(y,s,C),r!==null&&(ar(r,y,C,w),el(r,y,C)),C}function Sl(r){if(r=r.current,!r.child)return null;switch(r.child.tag){case 5:return r.child.stateNode;default:return r.child.stateNode}}function qg(r,s){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var u=r.retryLane;r.retryLane=u!==0&&u<s?u:s}}function Ad(r,s){qg(r,s),(r=r.alternate)&&qg(r,s)}function Cj(){return null}var Kg=typeof reportError=="function"?reportError:function(r){console.error(r)};function Dd(r){this._internalRoot=r}Cl.prototype.render=Dd.prototype.render=function(r){var s=this._internalRoot;if(s===null)throw Error(n(409));jl(r,s,null,null)},Cl.prototype.unmount=Dd.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var s=r.containerInfo;Fo(function(){jl(null,r,null,null)}),s[Ir]=null}};function Cl(r){this._internalRoot=r}Cl.prototype.unstable_scheduleHydration=function(r){if(r){var s=Rh();r={blockedOn:null,target:r,priority:s};for(var u=0;u<Jr.length&&s!==0&&s<Jr[u].priority;u++);Jr.splice(u,0,r),u===0&&Ih(r)}};function Id(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function Nl(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11&&(r.nodeType!==8||r.nodeValue!==" react-mount-point-unstable "))}function Gg(){}function Nj(r,s,u,f,y){if(y){if(typeof f=="function"){var w=f;f=function(){var Z=Sl(C);w.call(Z)}}var C=Vg(s,f,r,0,null,!1,!1,"",Gg);return r._reactRootContainer=C,r[Ir]=C.current,gi(r.nodeType===8?r.parentNode:r),Fo(),C}for(;y=r.lastChild;)r.removeChild(y);if(typeof f=="function"){var z=f;f=function(){var Z=Sl(H);z.call(Z)}}var H=Rd(r,0,!1,null,null,!1,!1,"",Gg);return r._reactRootContainer=H,r[Ir]=H.current,gi(r.nodeType===8?r.parentNode:r),Fo(function(){jl(s,H,u,f)}),H}function El(r,s,u,f,y){var w=u._reactRootContainer;if(w){var C=w;if(typeof y=="function"){var z=y;y=function(){var H=Sl(C);z.call(H)}}jl(s,C,r,y)}else C=Nj(u,s,r,y,f);return Sl(C)}Ph=function(r){switch(r.tag){case 3:var s=r.stateNode;if(s.current.memoizedState.isDehydrated){var u=ti(s.pendingLanes);u!==0&&(ru(s,u|1),wn(s,Ct()),(He&6)===0&&(vs=Ct()+500,oo()))}break;case 13:Fo(function(){var f=Mr(r,1);if(f!==null){var y=fn();ar(f,r,1,y)}}),Ad(r,1)}},ou=function(r){if(r.tag===13){var s=Mr(r,134217728);if(s!==null){var u=fn();ar(s,r,134217728,u)}Ad(r,134217728)}},Th=function(r){if(r.tag===13){var s=uo(r),u=Mr(r,s);if(u!==null){var f=fn();ar(u,r,s,f)}Ad(r,s)}},Rh=function(){return Ye},Ah=function(r,s){var u=Ye;try{return Ye=r,s()}finally{Ye=u}},tn=function(r,s,u){switch(s){case"input":if(mt(r,u),s=u.name,u.type==="radio"&&s!=null){for(u=r;u.parentNode;)u=u.parentNode;for(u=u.querySelectorAll("input[name="+JSON.stringify(""+s)+'][type="radio"]'),s=0;s<u.length;s++){var f=u[s];if(f!==r&&f.form===r.form){var y=Wa(f);if(!y)throw Error(n(90));Ke(f),mt(f,y)}}}break;case"textarea":Tn(r,u);break;case"select":s=u.value,s!=null&&Kt(r,!!u.multiple,s,!1)}},Yt=Sd,nn=Fo;var Ej={usingClientEntryPoint:!1,Events:[vi,is,Wa,St,Ft,Sd]},Ii={findFiberByHostInstance:Ao,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Pj={bundleType:Ii.bundleType,version:Ii.version,rendererPackageName:Ii.rendererPackageName,rendererConfig:Ii.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:D.ReactCurrentDispatcher,findHostInstanceByFiber:function(r){return r=bh(r),r===null?null:r.stateNode},findFiberByHostInstance:Ii.findFiberByHostInstance||Cj,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Pl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Pl.isDisabled&&Pl.supportsFiber)try{Ca=Pl.inject(Pj),mr=Pl}catch{}}return kn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Ej,kn.createPortal=function(r,s){var u=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Id(s))throw Error(n(200));return Sj(r,s,null,u)},kn.createRoot=function(r,s){if(!Id(r))throw Error(n(299));var u=!1,f="",y=Kg;return s!=null&&(s.unstable_strictMode===!0&&(u=!0),s.identifierPrefix!==void 0&&(f=s.identifierPrefix),s.onRecoverableError!==void 0&&(y=s.onRecoverableError)),s=Rd(r,1,!1,null,null,u,!1,f,y),r[Ir]=s.current,gi(r.nodeType===8?r.parentNode:r),new Dd(s)},kn.findDOMNode=function(r){if(r==null)return null;if(r.nodeType===1)return r;var s=r._reactInternals;if(s===void 0)throw typeof r.render=="function"?Error(n(188)):(r=Object.keys(r).join(","),Error(n(268,r)));return r=bh(s),r=r===null?null:r.stateNode,r},kn.flushSync=function(r){return Fo(r)},kn.hydrate=function(r,s,u){if(!Nl(s))throw Error(n(200));return El(null,r,s,!0,u)},kn.hydrateRoot=function(r,s,u){if(!Id(r))throw Error(n(405));var f=u!=null&&u.hydratedSources||null,y=!1,w="",C=Kg;if(u!=null&&(u.unstable_strictMode===!0&&(y=!0),u.identifierPrefix!==void 0&&(w=u.identifierPrefix),u.onRecoverableError!==void 0&&(C=u.onRecoverableError)),s=Vg(s,null,r,1,u??null,y,!1,w,C),r[Ir]=s.current,gi(r),f)for(r=0;r<f.length;r++)u=f[r],y=u._getVersion,y=y(u._source),s.mutableSourceEagerHydrationData==null?s.mutableSourceEagerHydrationData=[u,y]:s.mutableSourceEagerHydrationData.push(u,y);return new Cl(s)},kn.render=function(r,s,u){if(!Nl(s))throw Error(n(200));return El(null,r,s,!1,u)},kn.unmountComponentAtNode=function(r){if(!Nl(r))throw Error(n(40));return r._reactRootContainer?(Fo(function(){El(null,null,r,!1,function(){r._reactRootContainer=null,r[Ir]=null})}),!0):!1},kn.unstable_batchedUpdates=Sd,kn.unstable_renderSubtreeIntoContainer=function(r,s,u,f){if(!Nl(u))throw Error(n(200));if(r==null||r._reactInternals===void 0)throw Error(n(38));return El(r,s,u,!1,f)},kn.version="18.3.1-next-f1338f8080-20240426",kn}var nx;function uv(){if(nx)return _d.exports;nx=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(),_d.exports=_j(),_d.exports}var rx;function Mj(){if(rx)return Tl;rx=1;var e=uv();return Tl.createRoot=e.createRoot,Tl.hydrateRoot=e.hydrateRoot,Tl}var $j=Mj();/**
|
|
41
|
+
* react-router v7.13.1
|
|
42
|
+
*
|
|
43
|
+
* Copyright (c) Remix Software Inc.
|
|
44
|
+
*
|
|
45
|
+
* This source code is licensed under the MIT license found in the
|
|
46
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
47
|
+
*
|
|
48
|
+
* @license MIT
|
|
49
|
+
*/var ox="popstate";function sx(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function Fj(e={}){function t(o,i){var m;let l=(m=i.state)==null?void 0:m.masked,{pathname:c,search:d,hash:p}=l||o.location;return Pf("",{pathname:c,search:d,hash:p},i.state&&i.state.usr||null,i.state&&i.state.key||"default",l?{pathname:o.location.pathname,search:o.location.search,hash:o.location.hash}:void 0)}function n(o,i){return typeof i=="string"?i:ta(i)}return Bj(t,n,null,e)}function bt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function lr(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function zj(){return Math.random().toString(36).substring(2,10)}function ix(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 Pf(e,t,n=null,o,i){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Bs(t):t,state:n,key:t&&t.key||o||zj(),unstable_mask:i}}function ta({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 Bs(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let o=e.indexOf("?");o>=0&&(t.search=e.substring(o),e=e.substring(0,o)),e&&(t.pathname=e)}return t}function Bj(e,t,n,o={}){let{window:i=document.defaultView,v5Compat:l=!1}=o,c=i.history,d="POP",p=null,m=h();m==null&&(m=0,c.replaceState({...c.state,idx:m},""));function h(){return(c.state||{idx:null}).idx}function x(){d="POP";let j=h(),S=j==null?null:j-m;m=j,p&&p({action:d,location:k.location,delta:S})}function v(j,S){d="PUSH";let T=sx(j)?j:Pf(k.location,j,S);m=h()+1;let R=ix(T,m),D=k.createHref(T.unstable_mask||T);try{c.pushState(R,"",D)}catch(M){if(M instanceof DOMException&&M.name==="DataCloneError")throw M;i.location.assign(D)}l&&p&&p({action:d,location:k.location,delta:1})}function b(j,S){d="REPLACE";let T=sx(j)?j:Pf(k.location,j,S);m=h();let R=ix(T,m),D=k.createHref(T.unstable_mask||T);c.replaceState(R,"",D),l&&p&&p({action:d,location:k.location,delta:0})}function N(j){return Uj(j)}let k={get action(){return d},get location(){return e(i,c)},listen(j){if(p)throw new Error("A history only accepts one active listener");return i.addEventListener(ox,x),p=j,()=>{i.removeEventListener(ox,x),p=null}},createHref(j){return t(i,j)},createURL:N,encodeLocation(j){let S=N(j);return{pathname:S.pathname,search:S.search,hash:S.hash}},push:v,replace:b,go(j){return c.go(j)}};return k}function Uj(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),bt(n,"No window.location.(origin|href) available to create URL");let o=typeof e=="string"?e:ta(e);return o=o.replace(/ $/,"%20"),!t&&o.startsWith("//")&&(o=n+o),new URL(o,n)}function dv(e,t,n="/"){return Hj(e,t,n,!1)}function Hj(e,t,n,o){let i=typeof t=="string"?Bs(t):t,l=Wr(i.pathname||"/",n);if(l==null)return null;let c=fv(e);Wj(c);let d=null;for(let p=0;d==null&&p<c.length;++p){let m=tS(l);d=Zj(c[p],m,o)}return d}function fv(e,t=[],n=[],o="",i=!1){let l=(c,d,p=i,m)=>{let h={relativePath:m===void 0?c.path||"":m,caseSensitive:c.caseSensitive===!0,childrenIndex:d,route:c};if(h.relativePath.startsWith("/")){if(!h.relativePath.startsWith(o)&&p)return;bt(h.relativePath.startsWith(o),`Absolute route path "${h.relativePath}" nested under path "${o}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),h.relativePath=h.relativePath.slice(o.length)}let x=Sr([o,h.relativePath]),v=n.concat(h);c.children&&c.children.length>0&&(bt(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${x}".`),fv(c.children,t,v,x,p)),!(c.path==null&&!c.index)&&t.push({path:x,score:Qj(x,c.index),routesMeta:v})};return e.forEach((c,d)=>{var p;if(c.path===""||!((p=c.path)!=null&&p.includes("?")))l(c,d);else for(let m of pv(c.path))l(c,d,!0,m)}),t}function pv(e){let t=e.split("/");if(t.length===0)return[];let[n,...o]=t,i=n.endsWith("?"),l=n.replace(/\?$/,"");if(o.length===0)return i?[l,""]:[l];let c=pv(o.join("/")),d=[];return d.push(...c.map(p=>p===""?l:[l,p].join("/"))),i&&d.push(...c),d.map(p=>e.startsWith("/")&&p===""?"/":p)}function Wj(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Jj(t.routesMeta.map(o=>o.childrenIndex),n.routesMeta.map(o=>o.childrenIndex)))}var Vj=/^:[\w-]+$/,qj=3,Kj=2,Gj=1,Yj=10,Xj=-2,ax=e=>e==="*";function Qj(e,t){let n=e.split("/"),o=n.length;return n.some(ax)&&(o+=Xj),t&&(o+=Kj),n.filter(i=>!ax(i)).reduce((i,l)=>i+(Vj.test(l)?qj:l===""?Gj:Yj),o)}function Jj(e,t){return e.length===t.length&&e.slice(0,-1).every((o,i)=>o===t[i])?e[e.length-1]-t[t.length-1]:0}function Zj(e,t,n=!1){let{routesMeta:o}=e,i={},l="/",c=[];for(let d=0;d<o.length;++d){let p=o[d],m=d===o.length-1,h=l==="/"?t:t.slice(l.length)||"/",x=tc({path:p.relativePath,caseSensitive:p.caseSensitive,end:m},h),v=p.route;if(!x&&m&&n&&!o[o.length-1].route.index&&(x=tc({path:p.relativePath,caseSensitive:p.caseSensitive,end:!1},h)),!x)return null;Object.assign(i,x.params),c.push({params:i,pathname:Sr([l,x.pathname]),pathnameBase:sS(Sr([l,x.pathnameBase])),route:v}),x.pathnameBase!=="/"&&(l=Sr([l,x.pathnameBase]))}return c}function tc(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,o]=eS(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let l=i[0],c=l.replace(/(.)\/+$/,"$1"),d=i.slice(1);return{params:o.reduce((m,{paramName:h,isOptional:x},v)=>{if(h==="*"){let N=d[v]||"";c=l.slice(0,l.length-N.length).replace(/(.)\/+$/,"$1")}const b=d[v];return x&&!b?m[h]=void 0:m[h]=(b||"").replace(/%2F/g,"/"),m},{}),pathname:l,pathnameBase:c,pattern:e}}function eS(e,t=!1,n=!0){lr(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 o=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(c,d,p,m,h)=>{if(o.push({paramName:d,isOptional:p!=null}),p){let x=h.charAt(m+c.length);return x&&x!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(o.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),o]}function tS(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return lr(!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 Wr(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,o=e.charAt(n);return o&&o!=="/"?null:e.slice(n)||"/"}var nS=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function rS(e,t="/"){let{pathname:n,search:o="",hash:i=""}=typeof e=="string"?Bs(e):e,l;return n?(n=n.replace(/\/\/+/g,"/"),n.startsWith("/")?l=lx(n.substring(1),"/"):l=lx(n,t)):l=t,{pathname:l,search:iS(o),hash:aS(i)}}function lx(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function Fd(e,t,n,o){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(o)}]. 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 oS(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function hv(e){let t=oS(e);return t.map((n,o)=>o===t.length-1?n.pathname:n.pathnameBase)}function lp(e,t,n,o=!1){let i;typeof e=="string"?i=Bs(e):(i={...e},bt(!i.pathname||!i.pathname.includes("?"),Fd("?","pathname","search",i)),bt(!i.pathname||!i.pathname.includes("#"),Fd("#","pathname","hash",i)),bt(!i.search||!i.search.includes("#"),Fd("#","search","hash",i)));let l=e===""||i.pathname==="",c=l?"/":i.pathname,d;if(c==null)d=n;else{let x=t.length-1;if(!o&&c.startsWith("..")){let v=c.split("/");for(;v[0]==="..";)v.shift(),x-=1;i.pathname=v.join("/")}d=x>=0?t[x]:"/"}let p=rS(i,d),m=c&&c!=="/"&&c.endsWith("/"),h=(l||c===".")&&n.endsWith("/");return!p.pathname.endsWith("/")&&(m||h)&&(p.pathname+="/"),p}var Sr=e=>e.join("/").replace(/\/\/+/g,"/"),sS=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),iS=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,aS=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,lS=class{constructor(e,t,n,o=!1){this.status=e,this.statusText=t||"",this.internal=o,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function cS(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function uS(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var mv=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function gv(e,t){let n=e;if(typeof n!="string"||!nS.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let o=n,i=!1;if(mv)try{let l=new URL(window.location.href),c=n.startsWith("//")?new URL(l.protocol+n):new URL(n),d=Wr(c.pathname,t);c.origin===l.origin&&d!=null?n=d+c.search+c.hash:i=!0}catch{lr(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:o,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var xv=["POST","PUT","PATCH","DELETE"];new Set(xv);var dS=["GET",...xv];new Set(dS);var Us=g.createContext(null);Us.displayName="DataRouter";var vc=g.createContext(null);vc.displayName="DataRouterState";var fS=g.createContext(!1),yv=g.createContext({isTransitioning:!1});yv.displayName="ViewTransition";var pS=g.createContext(new Map);pS.displayName="Fetchers";var hS=g.createContext(null);hS.displayName="Await";var Jn=g.createContext(null);Jn.displayName="Navigation";var la=g.createContext(null);la.displayName="Location";var fr=g.createContext({outlet:null,matches:[],isDataRoute:!1});fr.displayName="Route";var cp=g.createContext(null);cp.displayName="RouteError";var vv="REACT_ROUTER_ERROR",mS="REDIRECT",gS="ROUTE_ERROR_RESPONSE";function xS(e){if(e.startsWith(`${vv}:${mS}:{`))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 yS(e){if(e.startsWith(`${vv}:${gS}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new lS(t.status,t.statusText,t.data)}catch{}}function vS(e,{relative:t}={}){bt(ca(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:o}=g.useContext(Jn),{hash:i,pathname:l,search:c}=ua(e,{relative:t}),d=l;return n!=="/"&&(d=l==="/"?n:Sr([n,l])),o.createHref({pathname:d,search:c,hash:i})}function ca(){return g.useContext(la)!=null}function pn(){return bt(ca(),"useLocation() may be used only in the context of a <Router> component."),g.useContext(la).location}var bv="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function wv(e){g.useContext(Jn).static||g.useLayoutEffect(e)}function qt(){let{isDataRoute:e}=g.useContext(fr);return e?LS():bS()}function bS(){bt(ca(),"useNavigate() may be used only in the context of a <Router> component.");let e=g.useContext(Us),{basename:t,navigator:n}=g.useContext(Jn),{matches:o}=g.useContext(fr),{pathname:i}=pn(),l=JSON.stringify(hv(o)),c=g.useRef(!1);return wv(()=>{c.current=!0}),g.useCallback((p,m={})=>{if(lr(c.current,bv),!c.current)return;if(typeof p=="number"){n.go(p);return}let h=lp(p,JSON.parse(l),i,m.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:Sr([t,h.pathname])),(m.replace?n.replace:n.push)(h,m.state,m)},[t,n,l,i,e])}var wS=g.createContext(null);function kS(e){let t=g.useContext(fr).outlet;return g.useMemo(()=>t&&g.createElement(wS.Provider,{value:e},t),[t,e])}function Et(){let{matches:e}=g.useContext(fr),t=e[e.length-1];return t?t.params:{}}function ua(e,{relative:t}={}){let{matches:n}=g.useContext(fr),{pathname:o}=pn(),i=JSON.stringify(hv(n));return g.useMemo(()=>lp(e,JSON.parse(i),o,t==="path"),[e,i,o,t])}function jS(e,t){return kv(e,t)}function kv(e,t,n){var j;bt(ca(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=g.useContext(Jn),{matches:i}=g.useContext(fr),l=i[i.length-1],c=l?l.params:{},d=l?l.pathname:"/",p=l?l.pathnameBase:"/",m=l&&l.route;{let S=m&&m.path||"";Sv(d,!m||S.endsWith("*")||S.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${d}" (under <Route path="${S}">) 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.
|
|
50
|
+
|
|
51
|
+
Please change the parent <Route path="${S}"> to <Route path="${S==="/"?"*":`${S}/*`}">.`)}let h=pn(),x;if(t){let S=typeof t=="string"?Bs(t):t;bt(p==="/"||((j=S.pathname)==null?void 0:j.startsWith(p)),`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 "${p}" but pathname "${S.pathname}" was given in the \`location\` prop.`),x=S}else x=h;let v=x.pathname||"/",b=v;if(p!=="/"){let S=p.replace(/^\//,"").split("/");b="/"+v.replace(/^\//,"").split("/").slice(S.length).join("/")}let N=dv(e,{pathname:b});lr(m||N!=null,`No routes matched location "${x.pathname}${x.search}${x.hash}" `),lr(N==null||N[N.length-1].route.element!==void 0||N[N.length-1].route.Component!==void 0||N[N.length-1].route.lazy!==void 0,`Matched leaf route at location "${x.pathname}${x.search}${x.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 k=PS(N&&N.map(S=>Object.assign({},S,{params:Object.assign({},c,S.params),pathname:Sr([p,o.encodeLocation?o.encodeLocation(S.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:S.pathname]),pathnameBase:S.pathnameBase==="/"?p:Sr([p,o.encodeLocation?o.encodeLocation(S.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:S.pathnameBase])})),i,n);return t&&k?g.createElement(la.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...x},navigationType:"POP"}},k):k}function SS(){let e=IS(),t=cS(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,o="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:o},l={padding:"2px 4px",backgroundColor:o},c=null;return console.error("Error handled by React Router default ErrorBoundary:",e),c=g.createElement(g.Fragment,null,g.createElement("p",null,"💿 Hey developer 👋"),g.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",g.createElement("code",{style:l},"ErrorBoundary")," or"," ",g.createElement("code",{style:l},"errorElement")," prop on your route.")),g.createElement(g.Fragment,null,g.createElement("h2",null,"Unexpected Application Error!"),g.createElement("h3",{style:{fontStyle:"italic"}},t),n?g.createElement("pre",{style:i},n):null,c)}var CS=g.createElement(SS,null),jv=class extends g.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=yS(e.digest);n&&(e=n)}let t=e!==void 0?g.createElement(fr.Provider,{value:this.props.routeContext},g.createElement(cp.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?g.createElement(NS,{error:e},t):t}};jv.contextType=fS;var zd=new WeakMap;function NS({children:e,error:t}){let{basename:n}=g.useContext(Jn);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let o=xS(t.digest);if(o){let i=zd.get(t);if(i)throw i;let l=gv(o.location,n);if(mv&&!zd.get(t))if(l.isExternal||o.reloadDocument)window.location.href=l.absoluteURL||l.to;else{const c=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(l.to,{replace:o.replace}));throw zd.set(t,c),c}return g.createElement("meta",{httpEquiv:"refresh",content:`0;url=${l.absoluteURL||l.to}`})}}return e}function ES({routeContext:e,match:t,children:n}){let o=g.useContext(Us);return o&&o.static&&o.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=t.route.id),g.createElement(fr.Provider,{value:e},n)}function PS(e,t=[],n){let o=n==null?void 0:n.state;if(e==null){if(!o)return null;if(o.errors)e=o.matches;else if(t.length===0&&!o.initialized&&o.matches.length>0)e=o.matches;else return null}let i=e,l=o==null?void 0:o.errors;if(l!=null){let h=i.findIndex(x=>x.route.id&&(l==null?void 0:l[x.route.id])!==void 0);bt(h>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(l).join(",")}`),i=i.slice(0,Math.min(i.length,h+1))}let c=!1,d=-1;if(n&&o){c=o.renderFallback;for(let h=0;h<i.length;h++){let x=i[h];if((x.route.HydrateFallback||x.route.hydrateFallbackElement)&&(d=h),x.route.id){let{loaderData:v,errors:b}=o,N=x.route.loader&&!v.hasOwnProperty(x.route.id)&&(!b||b[x.route.id]===void 0);if(x.route.lazy||N){n.isStatic&&(c=!0),d>=0?i=i.slice(0,d+1):i=[i[0]];break}}}}let p=n==null?void 0:n.onError,m=o&&p?(h,x)=>{var v,b;p(h,{location:o.location,params:((b=(v=o.matches)==null?void 0:v[0])==null?void 0:b.params)??{},unstable_pattern:uS(o.matches),errorInfo:x})}:void 0;return i.reduceRight((h,x,v)=>{let b,N=!1,k=null,j=null;o&&(b=l&&x.route.id?l[x.route.id]:void 0,k=x.route.errorElement||CS,c&&(d<0&&v===0?(Sv("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),N=!0,j=null):d===v&&(N=!0,j=x.route.hydrateFallbackElement||null)));let S=t.concat(i.slice(0,v+1)),T=()=>{let R;return b?R=k:N?R=j:x.route.Component?R=g.createElement(x.route.Component,null):x.route.element?R=x.route.element:R=h,g.createElement(ES,{match:x,routeContext:{outlet:h,matches:S,isDataRoute:o!=null},children:R})};return o&&(x.route.ErrorBoundary||x.route.errorElement||v===0)?g.createElement(jv,{location:o.location,revalidation:o.revalidation,component:k,error:b,children:T(),routeContext:{outlet:null,matches:S,isDataRoute:!0},onError:m}):T()},null)}function up(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function TS(e){let t=g.useContext(Us);return bt(t,up(e)),t}function RS(e){let t=g.useContext(vc);return bt(t,up(e)),t}function AS(e){let t=g.useContext(fr);return bt(t,up(e)),t}function dp(e){let t=AS(e),n=t.matches[t.matches.length-1];return bt(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function DS(){return dp("useRouteId")}function IS(){var o;let e=g.useContext(cp),t=RS("useRouteError"),n=dp("useRouteError");return e!==void 0?e:(o=t.errors)==null?void 0:o[n]}function LS(){let{router:e}=TS("useNavigate"),t=dp("useNavigate"),n=g.useRef(!1);return wv(()=>{n.current=!0}),g.useCallback(async(i,l={})=>{lr(n.current,bv),n.current&&(typeof i=="number"?await e.navigate(i):await e.navigate(i,{fromRouteId:t,...l}))},[e,t])}var cx={};function Sv(e,t,n){!t&&!cx[e]&&(cx[e]=!0,lr(!1,n))}g.memo(OS);function OS({routes:e,future:t,state:n,isStatic:o,onError:i}){return kv(e,void 0,{state:n,isStatic:o,onError:i})}function _S(e){return kS(e.context)}function De(e){bt(!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 MS({basename:e="/",children:t=null,location:n,navigationType:o="POP",navigator:i,static:l=!1,unstable_useTransitions:c}){bt(!ca(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let d=e.replace(/^\/*/,"/"),p=g.useMemo(()=>({basename:d,navigator:i,static:l,unstable_useTransitions:c,future:{}}),[d,i,l,c]);typeof n=="string"&&(n=Bs(n));let{pathname:m="/",search:h="",hash:x="",state:v=null,key:b="default",unstable_mask:N}=n,k=g.useMemo(()=>{let j=Wr(m,d);return j==null?null:{location:{pathname:j,search:h,hash:x,state:v,key:b,unstable_mask:N},navigationType:o}},[d,m,h,x,v,b,o,N]);return lr(k!=null,`<Router basename="${d}"> is not able to match the URL "${m}${h}${x}" because it does not start with the basename, so the <Router> won't render anything.`),k==null?null:g.createElement(Jn.Provider,{value:p},g.createElement(la.Provider,{children:t,value:k}))}function $S({children:e,location:t}){return jS(Tf(e),t)}function Tf(e,t=[]){let n=[];return g.Children.forEach(e,(o,i)=>{if(!g.isValidElement(o))return;let l=[...t,i];if(o.type===g.Fragment){n.push.apply(n,Tf(o.props.children,l));return}bt(o.type===De,`[${typeof o.type=="string"?o.type:o.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),bt(!o.props.index||!o.props.children,"An index route cannot have child routes.");let c={id:o.props.id||l.join("-"),caseSensitive:o.props.caseSensitive,element:o.props.element,Component:o.props.Component,index:o.props.index,path:o.props.path,middleware:o.props.middleware,loader:o.props.loader,action:o.props.action,hydrateFallbackElement:o.props.hydrateFallbackElement,HydrateFallback:o.props.HydrateFallback,errorElement:o.props.errorElement,ErrorBoundary:o.props.ErrorBoundary,hasErrorBoundary:o.props.hasErrorBoundary===!0||o.props.ErrorBoundary!=null||o.props.errorElement!=null,shouldRevalidate:o.props.shouldRevalidate,handle:o.props.handle,lazy:o.props.lazy};o.props.children&&(c.children=Tf(o.props.children,l)),n.push(c)}),n}var Wl="get",Vl="application/x-www-form-urlencoded";function bc(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function FS(e){return bc(e)&&e.tagName.toLowerCase()==="button"}function zS(e){return bc(e)&&e.tagName.toLowerCase()==="form"}function BS(e){return bc(e)&&e.tagName.toLowerCase()==="input"}function US(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function HS(e,t){return e.button===0&&(!t||t==="_self")&&!US(e)}function Rf(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let o=e[n];return t.concat(Array.isArray(o)?o.map(i=>[n,i]):[[n,o]])},[]))}function WS(e,t){let n=Rf(e);return t&&t.forEach((o,i)=>{n.has(i)||t.getAll(i).forEach(l=>{n.append(i,l)})}),n}var Rl=null;function VS(){if(Rl===null)try{new FormData(document.createElement("form"),0),Rl=!1}catch{Rl=!0}return Rl}var qS=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Bd(e){return e!=null&&!qS.has(e)?(lr(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Vl}"`),null):e}function KS(e,t){let n,o,i,l,c;if(zS(e)){let d=e.getAttribute("action");o=d?Wr(d,t):null,n=e.getAttribute("method")||Wl,i=Bd(e.getAttribute("enctype"))||Vl,l=new FormData(e)}else if(FS(e)||BS(e)&&(e.type==="submit"||e.type==="image")){let d=e.form;if(d==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let p=e.getAttribute("formaction")||d.getAttribute("action");if(o=p?Wr(p,t):null,n=e.getAttribute("formmethod")||d.getAttribute("method")||Wl,i=Bd(e.getAttribute("formenctype"))||Bd(d.getAttribute("enctype"))||Vl,l=new FormData(d,e),!VS()){let{name:m,type:h,value:x}=e;if(h==="image"){let v=m?`${m}.`:"";l.append(`${v}x`,"0"),l.append(`${v}y`,"0")}else m&&l.append(m,x)}}else{if(bc(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Wl,o=null,i=Vl,c=e}return l&&i==="text/plain"&&(c=l,l=void 0),{action:o,method:n.toLowerCase(),encType:i,formData:l,body:c}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function fp(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function GS(e,t,n,o){let i=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?i.pathname.endsWith("/")?i.pathname=`${i.pathname}_.${o}`:i.pathname=`${i.pathname}.${o}`:i.pathname==="/"?i.pathname=`_root.${o}`:t&&Wr(i.pathname,t)==="/"?i.pathname=`${t.replace(/\/$/,"")}/_root.${o}`:i.pathname=`${i.pathname.replace(/\/$/,"")}.${o}`,i}async function YS(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 XS(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 QS(e,t,n){let o=await Promise.all(e.map(async i=>{let l=t.routes[i.route.id];if(l){let c=await YS(l,n);return c.links?c.links():[]}return[]}));return tC(o.flat(1).filter(XS).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function ux(e,t,n,o,i,l){let c=(p,m)=>n[m]?p.route.id!==n[m].route.id:!0,d=(p,m)=>{var h;return n[m].pathname!==p.pathname||((h=n[m].route.path)==null?void 0:h.endsWith("*"))&&n[m].params["*"]!==p.params["*"]};return l==="assets"?t.filter((p,m)=>c(p,m)||d(p,m)):l==="data"?t.filter((p,m)=>{var x;let h=o.routes[p.route.id];if(!h||!h.hasLoader)return!1;if(c(p,m)||d(p,m))return!0;if(p.route.shouldRevalidate){let v=p.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:((x=n[0])==null?void 0:x.params)||{},nextUrl:new URL(e,window.origin),nextParams:p.params,defaultShouldRevalidate:!0});if(typeof v=="boolean")return v}return!0}):[]}function JS(e,t,{includeHydrateFallback:n}={}){return ZS(e.map(o=>{let i=t.routes[o.route.id];if(!i)return[];let l=[i.module];return i.clientActionModule&&(l=l.concat(i.clientActionModule)),i.clientLoaderModule&&(l=l.concat(i.clientLoaderModule)),n&&i.hydrateFallbackModule&&(l=l.concat(i.hydrateFallbackModule)),i.imports&&(l=l.concat(i.imports)),l}).flat(1))}function ZS(e){return[...new Set(e)]}function eC(e){let t={},n=Object.keys(e).sort();for(let o of n)t[o]=e[o];return t}function tC(e,t){let n=new Set;return new Set(t),e.reduce((o,i)=>{let l=JSON.stringify(eC(i));return n.has(l)||(n.add(l),o.push({key:l,link:i})),o},[])}function Cv(){let e=g.useContext(Us);return fp(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function nC(){let e=g.useContext(vc);return fp(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var pp=g.createContext(void 0);pp.displayName="FrameworkContext";function Nv(){let e=g.useContext(pp);return fp(e,"You must render this element inside a <HydratedRouter> element"),e}function rC(e,t){let n=g.useContext(pp),[o,i]=g.useState(!1),[l,c]=g.useState(!1),{onFocus:d,onBlur:p,onMouseEnter:m,onMouseLeave:h,onTouchStart:x}=t,v=g.useRef(null);g.useEffect(()=>{if(e==="render"&&c(!0),e==="viewport"){let k=S=>{S.forEach(T=>{c(T.isIntersecting)})},j=new IntersectionObserver(k,{threshold:.5});return v.current&&j.observe(v.current),()=>{j.disconnect()}}},[e]),g.useEffect(()=>{if(o){let k=setTimeout(()=>{c(!0)},100);return()=>{clearTimeout(k)}}},[o]);let b=()=>{i(!0)},N=()=>{i(!1),c(!1)};return n?e!=="intent"?[l,v,{}]:[l,v,{onFocus:Oi(d,b),onBlur:Oi(p,N),onMouseEnter:Oi(m,b),onMouseLeave:Oi(h,N),onTouchStart:Oi(x,b)}]:[!1,v,{}]}function Oi(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function oC({page:e,...t}){let{router:n}=Cv(),o=g.useMemo(()=>dv(n.routes,e,n.basename),[n.routes,e,n.basename]);return o?g.createElement(iC,{page:e,matches:o,...t}):null}function sC(e){let{manifest:t,routeModules:n}=Nv(),[o,i]=g.useState([]);return g.useEffect(()=>{let l=!1;return QS(e,t,n).then(c=>{l||i(c)}),()=>{l=!0}},[e,t,n]),o}function iC({page:e,matches:t,...n}){let o=pn(),{future:i,manifest:l,routeModules:c}=Nv(),{basename:d}=Cv(),{loaderData:p,matches:m}=nC(),h=g.useMemo(()=>ux(e,t,m,l,o,"data"),[e,t,m,l,o]),x=g.useMemo(()=>ux(e,t,m,l,o,"assets"),[e,t,m,l,o]),v=g.useMemo(()=>{if(e===o.pathname+o.search+o.hash)return[];let k=new Set,j=!1;if(t.forEach(T=>{var D;let R=l.routes[T.route.id];!R||!R.hasLoader||(!h.some(M=>M.route.id===T.route.id)&&T.route.id in p&&((D=c[T.route.id])!=null&&D.shouldRevalidate)||R.hasClientLoader?j=!0:k.add(T.route.id))}),k.size===0)return[];let S=GS(e,d,i.unstable_trailingSlashAwareDataRequests,"data");return j&&k.size>0&&S.searchParams.set("_routes",t.filter(T=>k.has(T.route.id)).map(T=>T.route.id).join(",")),[S.pathname+S.search]},[d,i.unstable_trailingSlashAwareDataRequests,p,o,l,h,t,e,c]),b=g.useMemo(()=>JS(x,l),[x,l]),N=sC(x);return g.createElement(g.Fragment,null,v.map(k=>g.createElement("link",{key:k,rel:"prefetch",as:"fetch",href:k,...n})),b.map(k=>g.createElement("link",{key:k,rel:"modulepreload",href:k,...n})),N.map(({key:k,link:j})=>g.createElement("link",{key:k,nonce:n.nonce,...j,crossOrigin:j.crossOrigin??n.crossOrigin})))}function aC(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var lC=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{lC&&(window.__reactRouterVersion="7.13.1")}catch{}function cC({basename:e,children:t,unstable_useTransitions:n,window:o}){let i=g.useRef();i.current==null&&(i.current=Fj({window:o,v5Compat:!0}));let l=i.current,[c,d]=g.useState({action:l.action,location:l.location}),p=g.useCallback(m=>{n===!1?d(m):g.startTransition(()=>d(m))},[n]);return g.useLayoutEffect(()=>l.listen(p),[l,p]),g.createElement(MS,{basename:e,children:t,location:c.location,navigationType:c.action,navigator:l,unstable_useTransitions:n})}var Ev=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ee=g.forwardRef(function({onClick:t,discover:n="render",prefetch:o="none",relative:i,reloadDocument:l,replace:c,unstable_mask:d,state:p,target:m,to:h,preventScrollReset:x,viewTransition:v,unstable_defaultShouldRevalidate:b,...N},k){let{basename:j,navigator:S,unstable_useTransitions:T}=g.useContext(Jn),R=typeof h=="string"&&Ev.test(h),D=gv(h,j);h=D.to;let M=vS(h,{relative:i}),P=pn(),L=null;if(d){let $=lp(d,[],P.unstable_mask?P.unstable_mask.pathname:"/",!0);j!=="/"&&($.pathname=$.pathname==="/"?j:Sr([j,$.pathname])),L=S.createHref($)}let[_,J,ne]=rC(o,N),U=pC(h,{replace:c,unstable_mask:d,state:p,target:m,preventScrollReset:x,relative:i,viewTransition:v,unstable_defaultShouldRevalidate:b,unstable_useTransitions:T});function G($){t&&t($),$.defaultPrevented||U($)}let q=!(D.isExternal||l),ee=g.createElement("a",{...N,...ne,href:(q?L:void 0)||D.absoluteURL||M,onClick:q?G:t,ref:aC(k,J),target:m,"data-discover":!R&&n==="render"?"true":void 0});return _&&!R?g.createElement(g.Fragment,null,ee,g.createElement(oC,{page:M})):ee});Ee.displayName="Link";var uC=g.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:o="",end:i=!1,style:l,to:c,viewTransition:d,children:p,...m},h){let x=ua(c,{relative:m.relative}),v=pn(),b=g.useContext(vc),{navigator:N,basename:k}=g.useContext(Jn),j=b!=null&&yC(x)&&d===!0,S=N.encodeLocation?N.encodeLocation(x).pathname:x.pathname,T=v.pathname,R=b&&b.navigation&&b.navigation.location?b.navigation.location.pathname:null;n||(T=T.toLowerCase(),R=R?R.toLowerCase():null,S=S.toLowerCase()),R&&k&&(R=Wr(R,k)||R);const D=S!=="/"&&S.endsWith("/")?S.length-1:S.length;let M=T===S||!i&&T.startsWith(S)&&T.charAt(D)==="/",P=R!=null&&(R===S||!i&&R.startsWith(S)&&R.charAt(S.length)==="/"),L={isActive:M,isPending:P,isTransitioning:j},_=M?t:void 0,J;typeof o=="function"?J=o(L):J=[o,M?"active":null,P?"pending":null,j?"transitioning":null].filter(Boolean).join(" ");let ne=typeof l=="function"?l(L):l;return g.createElement(Ee,{...m,"aria-current":_,className:J,ref:h,style:ne,to:c,viewTransition:d},typeof p=="function"?p(L):p)});uC.displayName="NavLink";var dC=g.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:o,replace:i,state:l,method:c=Wl,action:d,onSubmit:p,relative:m,preventScrollReset:h,viewTransition:x,unstable_defaultShouldRevalidate:v,...b},N)=>{let{unstable_useTransitions:k}=g.useContext(Jn),j=gC(),S=xC(d,{relative:m}),T=c.toLowerCase()==="get"?"get":"post",R=typeof d=="string"&&Ev.test(d),D=M=>{if(p&&p(M),M.defaultPrevented)return;M.preventDefault();let P=M.nativeEvent.submitter,L=(P==null?void 0:P.getAttribute("formmethod"))||c,_=()=>j(P||M.currentTarget,{fetcherKey:t,method:L,navigate:n,replace:i,state:l,relative:m,preventScrollReset:h,viewTransition:x,unstable_defaultShouldRevalidate:v});k&&n!==!1?g.startTransition(()=>_()):_()};return g.createElement("form",{ref:N,method:T,action:S,onSubmit:o?p:D,...b,"data-discover":!R&&e==="render"?"true":void 0})});dC.displayName="Form";function fC(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Pv(e){let t=g.useContext(Us);return bt(t,fC(e)),t}function pC(e,{target:t,replace:n,unstable_mask:o,state:i,preventScrollReset:l,relative:c,viewTransition:d,unstable_defaultShouldRevalidate:p,unstable_useTransitions:m}={}){let h=qt(),x=pn(),v=ua(e,{relative:c});return g.useCallback(b=>{if(HS(b,t)){b.preventDefault();let N=n!==void 0?n:ta(x)===ta(v),k=()=>h(e,{replace:N,unstable_mask:o,state:i,preventScrollReset:l,relative:c,viewTransition:d,unstable_defaultShouldRevalidate:p});m?g.startTransition(()=>k()):k()}},[x,h,v,n,o,i,t,e,l,c,d,p,m])}function No(e){lr(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=g.useRef(Rf(e)),n=g.useRef(!1),o=pn(),i=g.useMemo(()=>WS(o.search,n.current?null:t.current),[o.search]),l=qt(),c=g.useCallback((d,p)=>{const m=Rf(typeof d=="function"?d(new URLSearchParams(i)):d);n.current=!0,l("?"+m,p)},[l,i]);return[i,c]}var hC=0,mC=()=>`__${String(++hC)}__`;function gC(){let{router:e}=Pv("useSubmit"),{basename:t}=g.useContext(Jn),n=DS(),o=e.fetch,i=e.navigate;return g.useCallback(async(l,c={})=>{let{action:d,method:p,encType:m,formData:h,body:x}=KS(l,t);if(c.navigate===!1){let v=c.fetcherKey||mC();await o(v,n,c.action||d,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:h,body:x,formMethod:c.method||p,formEncType:c.encType||m,flushSync:c.flushSync})}else await i(c.action||d,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:h,body:x,formMethod:c.method||p,formEncType:c.encType||m,replace:c.replace,state:c.state,fromRouteId:n,flushSync:c.flushSync,viewTransition:c.viewTransition})},[o,i,t,n])}function xC(e,{relative:t}={}){let{basename:n}=g.useContext(Jn),o=g.useContext(fr);bt(o,"useFormAction must be used inside a RouteContext");let[i]=o.matches.slice(-1),l={...ua(e||".",{relative:t})},c=pn();if(e==null){l.search=c.search;let d=new URLSearchParams(l.search),p=d.getAll("index");if(p.some(h=>h==="")){d.delete("index"),p.filter(x=>x).forEach(x=>d.append("index",x));let h=d.toString();l.search=h?`?${h}`:""}}return(!e||e===".")&&i.route.index&&(l.search=l.search?l.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(l.pathname=l.pathname==="/"?n:Sr([n,l.pathname])),ta(l)}function yC(e,{relative:t}={}){let n=g.useContext(yv);bt(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=Pv("useViewTransitionState"),i=ua(e,{relative:t});if(!n.isTransitioning)return!1;let l=Wr(n.currentLocation.pathname,o)||n.currentLocation.pathname,c=Wr(n.nextLocation.pathname,o)||n.nextLocation.pathname;return tc(i.pathname,c)!=null||tc(i.pathname,l)!=null}var wo=uv();const vC=yc(wo);/**
|
|
52
|
+
* @license lucide-react v0.460.0 - ISC
|
|
53
|
+
*
|
|
54
|
+
* This source code is licensed under the ISC license.
|
|
55
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
56
|
+
*/const bC=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Tv=(...e)=>e.filter((t,n,o)=>!!t&&t.trim()!==""&&o.indexOf(t)===n).join(" ").trim();/**
|
|
57
|
+
* @license lucide-react v0.460.0 - ISC
|
|
58
|
+
*
|
|
59
|
+
* This source code is licensed under the ISC license.
|
|
60
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
61
|
+
*/var wC={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"};/**
|
|
62
|
+
* @license lucide-react v0.460.0 - ISC
|
|
63
|
+
*
|
|
64
|
+
* This source code is licensed under the ISC license.
|
|
65
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
66
|
+
*/const kC=g.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:o,className:i="",children:l,iconNode:c,...d},p)=>g.createElement("svg",{ref:p,...wC,width:t,height:t,stroke:e,strokeWidth:o?Number(n)*24/Number(t):n,className:Tv("lucide",i),...d},[...c.map(([m,h])=>g.createElement(m,h)),...Array.isArray(l)?l:[l]]));/**
|
|
67
|
+
* @license lucide-react v0.460.0 - ISC
|
|
68
|
+
*
|
|
69
|
+
* This source code is licensed under the ISC license.
|
|
70
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
71
|
+
*/const we=(e,t)=>{const n=g.forwardRef(({className:o,...i},l)=>g.createElement(kC,{ref:l,iconNode:t,className:Tv(`lucide-${bC(e)}`,o),...i}));return n.displayName=`${e}`,n};/**
|
|
72
|
+
* @license lucide-react v0.460.0 - ISC
|
|
73
|
+
*
|
|
74
|
+
* This source code is licensed under the ISC license.
|
|
75
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
76
|
+
*/const wc=we("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/**
|
|
77
|
+
* @license lucide-react v0.460.0 - ISC
|
|
78
|
+
*
|
|
79
|
+
* This source code is licensed under the ISC license.
|
|
80
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
81
|
+
*/const Rv=we("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
|
|
82
|
+
* @license lucide-react v0.460.0 - ISC
|
|
83
|
+
*
|
|
84
|
+
* This source code is licensed under the ISC license.
|
|
85
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
86
|
+
*/const jC=we("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
|
|
87
|
+
* @license lucide-react v0.460.0 - ISC
|
|
88
|
+
*
|
|
89
|
+
* This source code is licensed under the ISC license.
|
|
90
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
91
|
+
*/const nc=we("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);/**
|
|
92
|
+
* @license lucide-react v0.460.0 - ISC
|
|
93
|
+
*
|
|
94
|
+
* This source code is licensed under the ISC license.
|
|
95
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
96
|
+
*/const SC=we("BookOpenText",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M16 12h2",key:"7q9ll5"}],["path",{d:"M16 8h2",key:"msurwy"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}],["path",{d:"M6 12h2",key:"32wvfc"}],["path",{d:"M6 8h2",key:"30oboj"}]]);/**
|
|
97
|
+
* @license lucide-react v0.460.0 - ISC
|
|
98
|
+
*
|
|
99
|
+
* This source code is licensed under the ISC license.
|
|
100
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
101
|
+
*/const Av=we("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/**
|
|
102
|
+
* @license lucide-react v0.460.0 - ISC
|
|
103
|
+
*
|
|
104
|
+
* This source code is licensed under the ISC license.
|
|
105
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
106
|
+
*/const da=we("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
107
|
+
* @license lucide-react v0.460.0 - ISC
|
|
108
|
+
*
|
|
109
|
+
* This source code is licensed under the ISC license.
|
|
110
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
111
|
+
*/const na=we("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
112
|
+
* @license lucide-react v0.460.0 - ISC
|
|
113
|
+
*
|
|
114
|
+
* This source code is licensed under the ISC license.
|
|
115
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
116
|
+
*/const Dv=we("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
|
|
117
|
+
* @license lucide-react v0.460.0 - ISC
|
|
118
|
+
*
|
|
119
|
+
* This source code is licensed under the ISC license.
|
|
120
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
121
|
+
*/const Af=we("CircleAlert",[["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"}]]);/**
|
|
122
|
+
* @license lucide-react v0.460.0 - ISC
|
|
123
|
+
*
|
|
124
|
+
* This source code is licensed under the ISC license.
|
|
125
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
126
|
+
*/const hp=we("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
|
127
|
+
* @license lucide-react v0.460.0 - ISC
|
|
128
|
+
*
|
|
129
|
+
* This source code is licensed under the ISC license.
|
|
130
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
131
|
+
*/const Df=we("CircleDot",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]]);/**
|
|
132
|
+
* @license lucide-react v0.460.0 - ISC
|
|
133
|
+
*
|
|
134
|
+
* This source code is licensed under the ISC license.
|
|
135
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
136
|
+
*/const CC=we("CircleStop",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["rect",{x:"9",y:"9",width:"6",height:"6",rx:"1",key:"1ssd4o"}]]);/**
|
|
137
|
+
* @license lucide-react v0.460.0 - ISC
|
|
138
|
+
*
|
|
139
|
+
* This source code is licensed under the ISC license.
|
|
140
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
141
|
+
*/const NC=we("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
|
|
142
|
+
* @license lucide-react v0.460.0 - ISC
|
|
143
|
+
*
|
|
144
|
+
* This source code is licensed under the ISC license.
|
|
145
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
146
|
+
*/const EC=we("ClipboardCheck",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"m9 14 2 2 4-4",key:"df797q"}]]);/**
|
|
147
|
+
* @license lucide-react v0.460.0 - ISC
|
|
148
|
+
*
|
|
149
|
+
* This source code is licensed under the ISC license.
|
|
150
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
151
|
+
*/const PC=we("Clock3",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16.5 12",key:"1aq6pp"}]]);/**
|
|
152
|
+
* @license lucide-react v0.460.0 - ISC
|
|
153
|
+
*
|
|
154
|
+
* This source code is licensed under the ISC license.
|
|
155
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
156
|
+
*/const TC=we("Cloud",[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]]);/**
|
|
157
|
+
* @license lucide-react v0.460.0 - ISC
|
|
158
|
+
*
|
|
159
|
+
* This source code is licensed under the ISC license.
|
|
160
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
161
|
+
*/const RC=we("Compass",[["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",key:"9ktpf1"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
|
|
162
|
+
* @license lucide-react v0.460.0 - ISC
|
|
163
|
+
*
|
|
164
|
+
* This source code is licensed under the ISC license.
|
|
165
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
166
|
+
*/const kc=we("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
|
|
167
|
+
* @license lucide-react v0.460.0 - ISC
|
|
168
|
+
*
|
|
169
|
+
* This source code is licensed under the ISC license.
|
|
170
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
171
|
+
*/const AC=we("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
|
|
172
|
+
* @license lucide-react v0.460.0 - ISC
|
|
173
|
+
*
|
|
174
|
+
* This source code is licensed under the ISC license.
|
|
175
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
176
|
+
*/const DC=we("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/**
|
|
177
|
+
* @license lucide-react v0.460.0 - ISC
|
|
178
|
+
*
|
|
179
|
+
* This source code is licensed under the ISC license.
|
|
180
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
181
|
+
*/const Iv=we("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
|
|
182
|
+
* @license lucide-react v0.460.0 - ISC
|
|
183
|
+
*
|
|
184
|
+
* This source code is licensed under the ISC license.
|
|
185
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
186
|
+
*/const dx=we("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
187
|
+
* @license lucide-react v0.460.0 - ISC
|
|
188
|
+
*
|
|
189
|
+
* This source code is licensed under the ISC license.
|
|
190
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
191
|
+
*/const IC=we("FileCode2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m5 12-3 3 3 3",key:"oke12k"}],["path",{d:"m9 18 3-3-3-3",key:"112psh"}]]);/**
|
|
192
|
+
* @license lucide-react v0.460.0 - ISC
|
|
193
|
+
*
|
|
194
|
+
* This source code is licensed under the ISC license.
|
|
195
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
196
|
+
*/const LC=we("FilePenLine",[["path",{d:"m18 5-2.414-2.414A2 2 0 0 0 14.172 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2",key:"142zxg"}],["path",{d:"M21.378 12.626a1 1 0 0 0-3.004-3.004l-4.01 4.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:"2t3380"}],["path",{d:"M8 18h1",key:"13wk12"}]]);/**
|
|
197
|
+
* @license lucide-react v0.460.0 - ISC
|
|
198
|
+
*
|
|
199
|
+
* This source code is licensed under the ISC license.
|
|
200
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
201
|
+
*/const OC=we("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
|
|
202
|
+
* @license lucide-react v0.460.0 - ISC
|
|
203
|
+
*
|
|
204
|
+
* This source code is licensed under the ISC license.
|
|
205
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
206
|
+
*/const _C=we("Flame",[["path",{d:"M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z",key:"96xj49"}]]);/**
|
|
207
|
+
* @license lucide-react v0.460.0 - ISC
|
|
208
|
+
*
|
|
209
|
+
* This source code is licensed under the ISC license.
|
|
210
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
211
|
+
*/const mp=we("FolderKanban",[["path",{d:"M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.93a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2Z",key:"1fr9dc"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M12 10v2",key:"hh53o1"}],["path",{d:"M16 10v6",key:"1d6xys"}]]);/**
|
|
212
|
+
* @license lucide-react v0.460.0 - ISC
|
|
213
|
+
*
|
|
214
|
+
* This source code is licensed under the ISC license.
|
|
215
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
216
|
+
*/const MC=we("Gauge",[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]);/**
|
|
217
|
+
* @license lucide-react v0.460.0 - ISC
|
|
218
|
+
*
|
|
219
|
+
* This source code is licensed under the ISC license.
|
|
220
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
221
|
+
*/const Lv=we("GitBranch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);/**
|
|
222
|
+
* @license lucide-react v0.460.0 - ISC
|
|
223
|
+
*
|
|
224
|
+
* This source code is licensed under the ISC license.
|
|
225
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
226
|
+
*/const Ov=we("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/**
|
|
227
|
+
* @license lucide-react v0.460.0 - ISC
|
|
228
|
+
*
|
|
229
|
+
* This source code is licensed under the ISC license.
|
|
230
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
231
|
+
*/const $C=we("Hammer",[["path",{d:"m15 12-8.373 8.373a1 1 0 1 1-3-3L12 9",key:"eefl8a"}],["path",{d:"m18 15 4-4",key:"16gjal"}],["path",{d:"m21.5 11.5-1.914-1.914A2 2 0 0 1 19 8.172V7l-2.26-2.26a6 6 0 0 0-4.202-1.756L9 2.96l.92.82A6.18 6.18 0 0 1 12 8.4V10l2 2h1.172a2 2 0 0 1 1.414.586L18.5 14.5",key:"b7pghm"}]]);/**
|
|
232
|
+
* @license lucide-react v0.460.0 - ISC
|
|
233
|
+
*
|
|
234
|
+
* This source code is licensed under the ISC license.
|
|
235
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
236
|
+
*/const FC=we("Hourglass",[["path",{d:"M5 22h14",key:"ehvnwv"}],["path",{d:"M5 2h14",key:"pdyrp9"}],["path",{d:"M17 22v-4.172a2 2 0 0 0-.586-1.414L12 12l-4.414 4.414A2 2 0 0 0 7 17.828V22",key:"1d314k"}],["path",{d:"M7 2v4.172a2 2 0 0 0 .586 1.414L12 12l4.414-4.414A2 2 0 0 0 17 6.172V2",key:"1vvvr6"}]]);/**
|
|
237
|
+
* @license lucide-react v0.460.0 - ISC
|
|
238
|
+
*
|
|
239
|
+
* This source code is licensed under the ISC license.
|
|
240
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
241
|
+
*/const _v=we("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
|
|
242
|
+
* @license lucide-react v0.460.0 - ISC
|
|
243
|
+
*
|
|
244
|
+
* This source code is licensed under the ISC license.
|
|
245
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
246
|
+
*/const zC=we("LifeBuoy",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.93 4.93 4.24 4.24",key:"1ymg45"}],["path",{d:"m14.83 9.17 4.24-4.24",key:"1cb5xl"}],["path",{d:"m14.83 14.83 4.24 4.24",key:"q42g0n"}],["path",{d:"m9.17 14.83-4.24 4.24",key:"bqpfvv"}],["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}]]);/**
|
|
247
|
+
* @license lucide-react v0.460.0 - ISC
|
|
248
|
+
*
|
|
249
|
+
* This source code is licensed under the ISC license.
|
|
250
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
251
|
+
*/const BC=we("Link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]);/**
|
|
252
|
+
* @license lucide-react v0.460.0 - ISC
|
|
253
|
+
*
|
|
254
|
+
* This source code is licensed under the ISC license.
|
|
255
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
256
|
+
*/const UC=we("ListTodo",[["rect",{x:"3",y:"5",width:"6",height:"6",rx:"1",key:"1defrl"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"M13 6h8",key:"15sg57"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 18h8",key:"oe0vm4"}]]);/**
|
|
257
|
+
* @license lucide-react v0.460.0 - ISC
|
|
258
|
+
*
|
|
259
|
+
* This source code is licensed under the ISC license.
|
|
260
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
261
|
+
*/const Mv=we("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
|
|
262
|
+
* @license lucide-react v0.460.0 - ISC
|
|
263
|
+
*
|
|
264
|
+
* This source code is licensed under the ISC license.
|
|
265
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
266
|
+
*/const HC=we("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/**
|
|
267
|
+
* @license lucide-react v0.460.0 - ISC
|
|
268
|
+
*
|
|
269
|
+
* This source code is licensed under the ISC license.
|
|
270
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
271
|
+
*/const gp=we("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/**
|
|
272
|
+
* @license lucide-react v0.460.0 - ISC
|
|
273
|
+
*
|
|
274
|
+
* This source code is licensed under the ISC license.
|
|
275
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
276
|
+
*/const WC=we("MoonStar",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9",key:"4ay0iu"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}]]);/**
|
|
277
|
+
* @license lucide-react v0.460.0 - ISC
|
|
278
|
+
*
|
|
279
|
+
* This source code is licensed under the ISC license.
|
|
280
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
281
|
+
*/const Ud=we("NotebookPen",[["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"}]]);/**
|
|
282
|
+
* @license lucide-react v0.460.0 - ISC
|
|
283
|
+
*
|
|
284
|
+
* This source code is licensed under the ISC license.
|
|
285
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
286
|
+
*/const VC=we("OctagonX",[["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
|
|
287
|
+
* @license lucide-react v0.460.0 - ISC
|
|
288
|
+
*
|
|
289
|
+
* This source code is licensed under the ISC license.
|
|
290
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
291
|
+
*/const qC=we("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/**
|
|
292
|
+
* @license lucide-react v0.460.0 - ISC
|
|
293
|
+
*
|
|
294
|
+
* This source code is licensed under the ISC license.
|
|
295
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
296
|
+
*/const Bn=we("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
297
|
+
* @license lucide-react v0.460.0 - ISC
|
|
298
|
+
*
|
|
299
|
+
* This source code is licensed under the ISC license.
|
|
300
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
301
|
+
*/const $v=we("RefreshCw",[["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"}]]);/**
|
|
302
|
+
* @license lucide-react v0.460.0 - ISC
|
|
303
|
+
*
|
|
304
|
+
* This source code is licensed under the ISC license.
|
|
305
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
306
|
+
*/const KC=we("Reply",[["polyline",{points:"9 17 4 12 9 7",key:"hvgpf2"}],["path",{d:"M20 18v-2a4 4 0 0 0-4-4H4",key:"5vmcpk"}]]);/**
|
|
307
|
+
* @license lucide-react v0.460.0 - ISC
|
|
308
|
+
*
|
|
309
|
+
* This source code is licensed under the ISC license.
|
|
310
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
311
|
+
*/const fx=we("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
|
|
312
|
+
* @license lucide-react v0.460.0 - ISC
|
|
313
|
+
*
|
|
314
|
+
* This source code is licensed under the ISC license.
|
|
315
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
316
|
+
*/const xp=we("Save",[["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"}]]);/**
|
|
317
|
+
* @license lucide-react v0.460.0 - ISC
|
|
318
|
+
*
|
|
319
|
+
* This source code is licensed under the ISC license.
|
|
320
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
321
|
+
*/const GC=we("SearchCheck",[["path",{d:"m8 11 2 2 4-4",key:"1sed1v"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
322
|
+
* @license lucide-react v0.460.0 - ISC
|
|
323
|
+
*
|
|
324
|
+
* This source code is licensed under the ISC license.
|
|
325
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
326
|
+
*/const Hs=we("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
327
|
+
* @license lucide-react v0.460.0 - ISC
|
|
328
|
+
*
|
|
329
|
+
* This source code is licensed under the ISC license.
|
|
330
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
331
|
+
*/const YC=we("SendToBack",[["rect",{x:"14",y:"14",width:"8",height:"8",rx:"2",key:"1b0bso"}],["rect",{x:"2",y:"2",width:"8",height:"8",rx:"2",key:"1x09vl"}],["path",{d:"M7 14v1a2 2 0 0 0 2 2h1",key:"pao6x6"}],["path",{d:"M14 7h1a2 2 0 0 1 2 2v1",key:"19tdru"}]]);/**
|
|
332
|
+
* @license lucide-react v0.460.0 - ISC
|
|
333
|
+
*
|
|
334
|
+
* This source code is licensed under the ISC license.
|
|
335
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
336
|
+
*/const XC=we("ServerOff",[["path",{d:"M7 2h13a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-5",key:"bt2siv"}],["path",{d:"M10 10 2.5 2.5C2 2 2 2.5 2 5v3a2 2 0 0 0 2 2h6z",key:"1hjrv1"}],["path",{d:"M22 17v-1a2 2 0 0 0-2-2h-1",key:"1iynyr"}],["path",{d:"M4 14a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h16.5l1-.5.5.5-8-8H4z",key:"161ggg"}],["path",{d:"M6 18h.01",key:"uhywen"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
|
|
337
|
+
* @license lucide-react v0.460.0 - ISC
|
|
338
|
+
*
|
|
339
|
+
* This source code is licensed under the ISC license.
|
|
340
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
341
|
+
*/const QC=we("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
342
|
+
* @license lucide-react v0.460.0 - ISC
|
|
343
|
+
*
|
|
344
|
+
* This source code is licensed under the ISC license.
|
|
345
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
346
|
+
*/const JC=we("ShieldX",[["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:"m14.5 9.5-5 5",key:"17q4r4"}],["path",{d:"m9.5 9.5 5 5",key:"18nt4w"}]]);/**
|
|
347
|
+
* @license lucide-react v0.460.0 - ISC
|
|
348
|
+
*
|
|
349
|
+
* This source code is licensed under the ISC license.
|
|
350
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
351
|
+
*/const Fn=we("SquareCheckBig",[["path",{d:"M21 10.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.5",key:"1uzm8b"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
|
|
352
|
+
* @license lucide-react v0.460.0 - ISC
|
|
353
|
+
*
|
|
354
|
+
* This source code is licensed under the ISC license.
|
|
355
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
356
|
+
*/const px=we("SquarePen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);/**
|
|
357
|
+
* @license lucide-react v0.460.0 - ISC
|
|
358
|
+
*
|
|
359
|
+
* This source code is licensed under the ISC license.
|
|
360
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
361
|
+
*/const Fv=we("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/**
|
|
362
|
+
* @license lucide-react v0.460.0 - ISC
|
|
363
|
+
*
|
|
364
|
+
* This source code is licensed under the ISC license.
|
|
365
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
366
|
+
*/const ZC=we("SunMedium",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 3v1",key:"1asbbs"}],["path",{d:"M12 20v1",key:"1wcdkc"}],["path",{d:"M3 12h1",key:"lp3yf2"}],["path",{d:"M20 12h1",key:"1vloll"}],["path",{d:"m18.364 5.636-.707.707",key:"1hakh0"}],["path",{d:"m6.343 17.657-.707.707",key:"18m9nf"}],["path",{d:"m5.636 5.636.707.707",key:"1xv1c5"}],["path",{d:"m17.657 17.657.707.707",key:"vl76zb"}]]);/**
|
|
367
|
+
* @license lucide-react v0.460.0 - ISC
|
|
368
|
+
*
|
|
369
|
+
* This source code is licensed under the ISC license.
|
|
370
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
371
|
+
*/const zv=we("Tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);/**
|
|
372
|
+
* @license lucide-react v0.460.0 - ISC
|
|
373
|
+
*
|
|
374
|
+
* This source code is licensed under the ISC license.
|
|
375
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
376
|
+
*/const eN=we("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/**
|
|
377
|
+
* @license lucide-react v0.460.0 - ISC
|
|
378
|
+
*
|
|
379
|
+
* This source code is licensed under the ISC license.
|
|
380
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
381
|
+
*/const Eo=we("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
|
|
382
|
+
* @license lucide-react v0.460.0 - ISC
|
|
383
|
+
*
|
|
384
|
+
* This source code is licensed under the ISC license.
|
|
385
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
386
|
+
*/const Ws=we("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
|
|
387
|
+
* @license lucide-react v0.460.0 - ISC
|
|
388
|
+
*
|
|
389
|
+
* This source code is licensed under the ISC license.
|
|
390
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
391
|
+
*/const tN=we("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
|
|
392
|
+
* @license lucide-react v0.460.0 - ISC
|
|
393
|
+
*
|
|
394
|
+
* This source code is licensed under the ISC license.
|
|
395
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
396
|
+
*/const Bv=we("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function Uv(e){var t,n,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Uv(e[t]))&&(o&&(o+=" "),o+=n)}else for(n in e)e[n]&&(o&&(o+=" "),o+=n);return o}function nN(){for(var e,t,n=0,o="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Uv(e))&&(o&&(o+=" "),o+=t);return o}const yp="-",rN=e=>{const t=sN(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:c=>{const d=c.split(yp);return d[0]===""&&d.length!==1&&d.shift(),Hv(d,t)||oN(c)},getConflictingClassGroupIds:(c,d)=>{const p=n[c]||[];return d&&o[c]?[...p,...o[c]]:p}}},Hv=(e,t)=>{var c;if(e.length===0)return t.classGroupId;const n=e[0],o=t.nextPart.get(n),i=o?Hv(e.slice(1),o):void 0;if(i)return i;if(t.validators.length===0)return;const l=e.join(yp);return(c=t.validators.find(({validator:d})=>d(l)))==null?void 0:c.classGroupId},hx=/^\[(.+)\]$/,oN=e=>{if(hx.test(e)){const t=hx.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},sN=e=>{const{theme:t,prefix:n}=e,o={nextPart:new Map,validators:[]};return aN(Object.entries(e.classGroups),n).forEach(([l,c])=>{If(c,o,l,t)}),o},If=(e,t,n,o)=>{e.forEach(i=>{if(typeof i=="string"){const l=i===""?t:mx(t,i);l.classGroupId=n;return}if(typeof i=="function"){if(iN(i)){If(i(o),t,n,o);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([l,c])=>{If(c,mx(t,l),n,o)})})},mx=(e,t)=>{let n=e;return t.split(yp).forEach(o=>{n.nextPart.has(o)||n.nextPart.set(o,{nextPart:new Map,validators:[]}),n=n.nextPart.get(o)}),n},iN=e=>e.isThemeGetter,aN=(e,t)=>t?e.map(([n,o])=>{const i=o.map(l=>typeof l=="string"?t+l:typeof l=="object"?Object.fromEntries(Object.entries(l).map(([c,d])=>[t+c,d])):l);return[n,i]}):e,lN=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,o=new Map;const i=(l,c)=>{n.set(l,c),t++,t>e&&(t=0,o=n,n=new Map)};return{get(l){let c=n.get(l);if(c!==void 0)return c;if((c=o.get(l))!==void 0)return i(l,c),c},set(l,c){n.has(l)?n.set(l,c):i(l,c)}}},Wv="!",cN=e=>{const{separator:t,experimentalParseClassName:n}=e,o=t.length===1,i=t[0],l=t.length,c=d=>{const p=[];let m=0,h=0,x;for(let j=0;j<d.length;j++){let S=d[j];if(m===0){if(S===i&&(o||d.slice(j,j+l)===t)){p.push(d.slice(h,j)),h=j+l;continue}if(S==="/"){x=j;continue}}S==="["?m++:S==="]"&&m--}const v=p.length===0?d:d.substring(h),b=v.startsWith(Wv),N=b?v.substring(1):v,k=x&&x>h?x-h:void 0;return{modifiers:p,hasImportantModifier:b,baseClassName:N,maybePostfixModifierPosition:k}};return n?d=>n({className:d,parseClassName:c}):c},uN=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(o=>{o[0]==="["?(t.push(...n.sort(),o),n=[]):n.push(o)}),t.push(...n.sort()),t},dN=e=>({cache:lN(e.cacheSize),parseClassName:cN(e),...rN(e)}),fN=/\s+/,pN=(e,t)=>{const{parseClassName:n,getClassGroupId:o,getConflictingClassGroupIds:i}=t,l=[],c=e.trim().split(fN);let d="";for(let p=c.length-1;p>=0;p-=1){const m=c[p],{modifiers:h,hasImportantModifier:x,baseClassName:v,maybePostfixModifierPosition:b}=n(m);let N=!!b,k=o(N?v.substring(0,b):v);if(!k){if(!N){d=m+(d.length>0?" "+d:d);continue}if(k=o(v),!k){d=m+(d.length>0?" "+d:d);continue}N=!1}const j=uN(h).join(":"),S=x?j+Wv:j,T=S+k;if(l.includes(T))continue;l.push(T);const R=i(k,N);for(let D=0;D<R.length;++D){const M=R[D];l.push(S+M)}d=m+(d.length>0?" "+d:d)}return d};function hN(){let e=0,t,n,o="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Vv(t))&&(o&&(o+=" "),o+=n);return o}const Vv=e=>{if(typeof e=="string")return e;let t,n="";for(let o=0;o<e.length;o++)e[o]&&(t=Vv(e[o]))&&(n&&(n+=" "),n+=t);return n};function mN(e,...t){let n,o,i,l=c;function c(p){const m=t.reduce((h,x)=>x(h),e());return n=dN(m),o=n.cache.get,i=n.cache.set,l=d,d(p)}function d(p){const m=o(p);if(m)return m;const h=pN(p,n);return i(p,h),h}return function(){return l(hN.apply(null,arguments))}}const lt=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},qv=/^\[(?:([a-z-]+):)?(.+)\]$/i,gN=/^\d+\/\d+$/,xN=new Set(["px","full","screen"]),yN=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,vN=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,bN=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,wN=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,kN=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Br=e=>Ps(e)||xN.has(e)||gN.test(e),mo=e=>Vs(e,"length",RN),Ps=e=>!!e&&!Number.isNaN(Number(e)),Hd=e=>Vs(e,"number",Ps),_i=e=>!!e&&Number.isInteger(Number(e)),jN=e=>e.endsWith("%")&&Ps(e.slice(0,-1)),$e=e=>qv.test(e),go=e=>yN.test(e),SN=new Set(["length","size","percentage"]),CN=e=>Vs(e,SN,Kv),NN=e=>Vs(e,"position",Kv),EN=new Set(["image","url"]),PN=e=>Vs(e,EN,DN),TN=e=>Vs(e,"",AN),Mi=()=>!0,Vs=(e,t,n)=>{const o=qv.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):n(o[2]):!1},RN=e=>vN.test(e)&&!bN.test(e),Kv=()=>!1,AN=e=>wN.test(e),DN=e=>kN.test(e),IN=()=>{const e=lt("colors"),t=lt("spacing"),n=lt("blur"),o=lt("brightness"),i=lt("borderColor"),l=lt("borderRadius"),c=lt("borderSpacing"),d=lt("borderWidth"),p=lt("contrast"),m=lt("grayscale"),h=lt("hueRotate"),x=lt("invert"),v=lt("gap"),b=lt("gradientColorStops"),N=lt("gradientColorStopPositions"),k=lt("inset"),j=lt("margin"),S=lt("opacity"),T=lt("padding"),R=lt("saturate"),D=lt("scale"),M=lt("sepia"),P=lt("skew"),L=lt("space"),_=lt("translate"),J=()=>["auto","contain","none"],ne=()=>["auto","hidden","clip","visible","scroll"],U=()=>["auto",$e,t],G=()=>[$e,t],q=()=>["",Br,mo],ee=()=>["auto",Ps,$e],$=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],I=()=>["solid","dashed","dotted","double","none"],A=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],F=()=>["start","end","center","between","around","evenly","stretch"],K=()=>["","0",$e],E=()=>["auto","avoid","all","avoid-page","page","left","right","column"],B=()=>[Ps,$e];return{cacheSize:500,separator:":",theme:{colors:[Mi],spacing:[Br,mo],blur:["none","",go,$e],brightness:B(),borderColor:[e],borderRadius:["none","","full",go,$e],borderSpacing:G(),borderWidth:q(),contrast:B(),grayscale:K(),hueRotate:B(),invert:K(),gap:G(),gradientColorStops:[e],gradientColorStopPositions:[jN,mo],inset:U(),margin:U(),opacity:B(),padding:G(),saturate:B(),scale:B(),sepia:K(),skew:B(),space:G(),translate:G()},classGroups:{aspect:[{aspect:["auto","square","video",$e]}],container:["container"],columns:[{columns:[go]}],"break-after":[{"break-after":E()}],"break-before":[{"break-before":E()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...$(),$e]}],overflow:[{overflow:ne()}],"overflow-x":[{"overflow-x":ne()}],"overflow-y":[{"overflow-y":ne()}],overscroll:[{overscroll:J()}],"overscroll-x":[{"overscroll-x":J()}],"overscroll-y":[{"overscroll-y":J()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[k]}],"inset-x":[{"inset-x":[k]}],"inset-y":[{"inset-y":[k]}],start:[{start:[k]}],end:[{end:[k]}],top:[{top:[k]}],right:[{right:[k]}],bottom:[{bottom:[k]}],left:[{left:[k]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",_i,$e]}],basis:[{basis:U()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",$e]}],grow:[{grow:K()}],shrink:[{shrink:K()}],order:[{order:["first","last","none",_i,$e]}],"grid-cols":[{"grid-cols":[Mi]}],"col-start-end":[{col:["auto",{span:["full",_i,$e]},$e]}],"col-start":[{"col-start":ee()}],"col-end":[{"col-end":ee()}],"grid-rows":[{"grid-rows":[Mi]}],"row-start-end":[{row:["auto",{span:[_i,$e]},$e]}],"row-start":[{"row-start":ee()}],"row-end":[{"row-end":ee()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",$e]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",$e]}],gap:[{gap:[v]}],"gap-x":[{"gap-x":[v]}],"gap-y":[{"gap-y":[v]}],"justify-content":[{justify:["normal",...F()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...F(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...F(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[T]}],px:[{px:[T]}],py:[{py:[T]}],ps:[{ps:[T]}],pe:[{pe:[T]}],pt:[{pt:[T]}],pr:[{pr:[T]}],pb:[{pb:[T]}],pl:[{pl:[T]}],m:[{m:[j]}],mx:[{mx:[j]}],my:[{my:[j]}],ms:[{ms:[j]}],me:[{me:[j]}],mt:[{mt:[j]}],mr:[{mr:[j]}],mb:[{mb:[j]}],ml:[{ml:[j]}],"space-x":[{"space-x":[L]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[L]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",$e,t]}],"min-w":[{"min-w":[$e,t,"min","max","fit"]}],"max-w":[{"max-w":[$e,t,"none","full","min","max","fit","prose",{screen:[go]},go]}],h:[{h:[$e,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[$e,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[$e,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[$e,t,"auto","min","max","fit"]}],"font-size":[{text:["base",go,mo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Hd]}],"font-family":[{font:[Mi]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",$e]}],"line-clamp":[{"line-clamp":["none",Ps,Hd]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Br,$e]}],"list-image":[{"list-image":["none",$e]}],"list-style-type":[{list:["none","disc","decimal",$e]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[S]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[S]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...I(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Br,mo]}],"underline-offset":[{"underline-offset":["auto",Br,$e]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:G()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",$e]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",$e]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[S]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...$(),NN]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",CN]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},PN]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[N]}],"gradient-via-pos":[{via:[N]}],"gradient-to-pos":[{to:[N]}],"gradient-from":[{from:[b]}],"gradient-via":[{via:[b]}],"gradient-to":[{to:[b]}],rounded:[{rounded:[l]}],"rounded-s":[{"rounded-s":[l]}],"rounded-e":[{"rounded-e":[l]}],"rounded-t":[{"rounded-t":[l]}],"rounded-r":[{"rounded-r":[l]}],"rounded-b":[{"rounded-b":[l]}],"rounded-l":[{"rounded-l":[l]}],"rounded-ss":[{"rounded-ss":[l]}],"rounded-se":[{"rounded-se":[l]}],"rounded-ee":[{"rounded-ee":[l]}],"rounded-es":[{"rounded-es":[l]}],"rounded-tl":[{"rounded-tl":[l]}],"rounded-tr":[{"rounded-tr":[l]}],"rounded-br":[{"rounded-br":[l]}],"rounded-bl":[{"rounded-bl":[l]}],"border-w":[{border:[d]}],"border-w-x":[{"border-x":[d]}],"border-w-y":[{"border-y":[d]}],"border-w-s":[{"border-s":[d]}],"border-w-e":[{"border-e":[d]}],"border-w-t":[{"border-t":[d]}],"border-w-r":[{"border-r":[d]}],"border-w-b":[{"border-b":[d]}],"border-w-l":[{"border-l":[d]}],"border-opacity":[{"border-opacity":[S]}],"border-style":[{border:[...I(),"hidden"]}],"divide-x":[{"divide-x":[d]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[d]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[S]}],"divide-style":[{divide:I()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...I()]}],"outline-offset":[{"outline-offset":[Br,$e]}],"outline-w":[{outline:[Br,mo]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[S]}],"ring-offset-w":[{"ring-offset":[Br,mo]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",go,TN]}],"shadow-color":[{shadow:[Mi]}],opacity:[{opacity:[S]}],"mix-blend":[{"mix-blend":[...A(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":A()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[o]}],contrast:[{contrast:[p]}],"drop-shadow":[{"drop-shadow":["","none",go,$e]}],grayscale:[{grayscale:[m]}],"hue-rotate":[{"hue-rotate":[h]}],invert:[{invert:[x]}],saturate:[{saturate:[R]}],sepia:[{sepia:[M]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[p]}],"backdrop-grayscale":[{"backdrop-grayscale":[m]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[h]}],"backdrop-invert":[{"backdrop-invert":[x]}],"backdrop-opacity":[{"backdrop-opacity":[S]}],"backdrop-saturate":[{"backdrop-saturate":[R]}],"backdrop-sepia":[{"backdrop-sepia":[M]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[c]}],"border-spacing-x":[{"border-spacing-x":[c]}],"border-spacing-y":[{"border-spacing-y":[c]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",$e]}],duration:[{duration:B()}],ease:[{ease:["linear","in","out","in-out",$e]}],delay:[{delay:B()}],animate:[{animate:["none","spin","ping","pulse","bounce",$e]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[D]}],"scale-x":[{"scale-x":[D]}],"scale-y":[{"scale-y":[D]}],rotate:[{rotate:[_i,$e]}],"translate-x":[{"translate-x":[_]}],"translate-y":[{"translate-y":[_]}],"skew-x":[{"skew-x":[P]}],"skew-y":[{"skew-y":[P]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",$e]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",$e]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":G()}],"scroll-mx":[{"scroll-mx":G()}],"scroll-my":[{"scroll-my":G()}],"scroll-ms":[{"scroll-ms":G()}],"scroll-me":[{"scroll-me":G()}],"scroll-mt":[{"scroll-mt":G()}],"scroll-mr":[{"scroll-mr":G()}],"scroll-mb":[{"scroll-mb":G()}],"scroll-ml":[{"scroll-ml":G()}],"scroll-p":[{"scroll-p":G()}],"scroll-px":[{"scroll-px":G()}],"scroll-py":[{"scroll-py":G()}],"scroll-ps":[{"scroll-ps":G()}],"scroll-pe":[{"scroll-pe":G()}],"scroll-pt":[{"scroll-pt":G()}],"scroll-pr":[{"scroll-pr":G()}],"scroll-pb":[{"scroll-pb":G()}],"scroll-pl":[{"scroll-pl":G()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",$e]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Br,mo,Hd]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},LN=mN(IN);function ze(...e){return LN(nN(e))}function ko(e){if(!e)return"—";const t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric"})}function Cr(e){if(!e)return"—";const t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString(void 0,{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"})}function ON(e){if(!e)return"—";const t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleDateString(void 0,{month:"short",day:"numeric"})}function _N(e){if(!e)return"—";const t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString(void 0,{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}function MN(e){if(!e)return"—";const t=new Date(e);if(Number.isNaN(t.getTime()))return e;const n=Math.floor((Date.now()-t.getTime())/1e3);if(n<60)return"just now";const o=Math.floor(n/60);if(o<60)return`${o}m ago`;const i=Math.floor(o/60);return i<24?`${i}h ago`:`${Math.floor(i/24)}d ago`}function Cn(e){return e.split(/[_\s-]+/).filter(Boolean).map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ")}function Gv(e){return!e||e==="/"?"/":e.endsWith("/")?e.slice(0,-1):e}function $N(e){let t=Gv(e);const n=t.match(/^\/w\/[^/]+(\/.*)?$/);return n&&(t=n[1]||"/"),t==="/"?"/":t.startsWith("/projects")?/^\/projects\/[^/]+\/assignments\//.test(t)?"/assignments":"/projects":t.startsWith("/assignments")?"/assignments":t.startsWith("/servers")?"/servers":t.startsWith("/agent-sessions")?"/agent-sessions":t.startsWith("/playbooks")?"/playbooks":t.startsWith("/todos")?"/todos":t.startsWith("/attention")?"/attention":t.startsWith("/help")?"/help":t.startsWith("/settings")?"/settings":null}function Yv(e,t){return $N(e)===t}function Xv(e){let n=Gv(e).split("/").filter(Boolean);const o=[];let i="Overview",l=null,c="";return n[0]==="w"&&n[1]&&(c=`/w/${n[1]}`,o.push({label:Cn(n[1]),path:`${c}/projects`}),n=n.slice(2)),n.length===0?{title:i,breadcrumbs:o,projectSlug:l}:(n[0]==="projects"?(o.push({label:"Projects",path:`${c}/projects`}),i="Projects",n[1]&&(l=n[1],o.push({label:Cn(n[1]),path:`${c}/projects/${n[1]}`}),i=Cn(n[1])),n[2]==="edit"?i="Edit Project":n[2]==="create"&&n[3]==="assignment"?i="Create Assignment":n[2]==="assignments"&&n[3]&&(o.push({label:Cn(n[3]),path:`${c}/projects/${n[1]}/assignments/${n[3]}`}),i=Cn(n[3]),n[4]==="edit"?i="Edit Assignment":n[4]==="plan"&&n[5]==="edit"?i="Edit Plan":n[4]==="scratchpad"&&n[5]==="edit"?i="Edit Scratchpad":n[4]==="handoff"&&n[5]==="edit"?i="Append Handoff":n[4]==="decision-record"&&n[5]==="edit"&&(i="Append Decision"))):n[0]==="servers"?(i="Servers",o.push({label:"Servers",path:`${c}/servers`})):n[0]==="agent-sessions"?(i="Agent Sessions",o.push({label:"Agent Sessions",path:`${c}/agent-sessions`})):n[0]==="attention"?(i="Attention",o.push({label:"Attention",path:"/attention"})):n[0]==="assignments"?(i="Assignments",o.push({label:"Assignments",path:`${c}/assignments`})):n[0]==="playbooks"?(o.push({label:"Playbooks",path:"/playbooks"}),i="Playbooks",n[1]==="create"?i="Create Playbook":n[1]&&n[2]==="edit"?(o.push({label:Cn(n[1]),path:`/playbooks/${n[1]}`}),i="Edit Playbook"):n[1]&&(o.push({label:Cn(n[1]),path:`/playbooks/${n[1]}`}),i=Cn(n[1]))):n[0]==="todos"?(i="Todos",o.push({label:"Todos",path:`${c}/todos`})):n[0]==="help"?(i="Help",o.push({label:"Help",path:"/help"})):n[0]==="settings"?(i="Settings",o.push({label:"Settings",path:"/settings"})):n[0]==="create"&&n[1]==="project"&&(i="Create Project",o.push({label:"Create Project",path:`${c}/create/project`})),{title:i,breadcrumbs:o,projectSlug:l})}function gx({items:e,onNavigate:t}){const n=pn();return a.jsx("nav",{className:"space-y-1",children:e.map(o=>{const i=o.icon,l=Yv(n.pathname,o.to)&&!n.pathname.startsWith("/w/");return a.jsxs(Ee,{to:o.to,onClick:t,className:ze("flex items-center gap-3 rounded-md px-3 py-2 text-sm font-medium transition",l?"bg-foreground text-background shadow-sm":"text-muted-foreground hover:bg-background/80 hover:text-foreground"),children:[a.jsx(i,{className:"h-4 w-4"}),a.jsx("span",{children:o.label})]},o.to)})})}const Qv=[{slug:"default",label:"Syntaur",description:"Brand purple, warm yellow, coral & teal accents.",swatches:{primary:"oklch(70% 0.18 290)",secondary:"oklch(80% 0.14 75)",coral:"oklch(72% 0.17 15)",teal:"oklch(72% 0.14 185)",amber:"oklch(82% 0.16 75)"}},{slug:"ocean",label:"Midnight",description:"Deep indigo-blue with cyan accents. Inspired by One Dark Pro.",swatches:{primary:"oklch(70% 0.16 240)",secondary:"oklch(78% 0.13 200)",coral:"oklch(72% 0.18 350)",teal:"oklch(78% 0.14 195)",amber:"oklch(84% 0.15 90)"}},{slug:"forest",label:"Verdant",description:"Saturated emerald and pine on a dark olive base.",swatches:{primary:"oklch(72% 0.17 145)",secondary:"oklch(80% 0.13 110)",coral:"oklch(72% 0.17 25)",teal:"oklch(75% 0.13 175)",amber:"oklch(82% 0.16 95)"}},{slug:"sunset",label:"Ember",description:"Warm sepia surfaces with copper and amber accents.",swatches:{primary:"oklch(72% 0.18 35)",secondary:"oklch(80% 0.16 60)",coral:"oklch(72% 0.19 15)",teal:"oklch(72% 0.12 180)",amber:"oklch(86% 0.17 70)"}}],FN=Qv.map(e=>e.slug),rc="default";function Jv(e){return typeof e=="string"&&FN.includes(e)}const Zv={preset:rc,custom:!1};let Wi=null,ws=null;function vp(e){if(!e||typeof e!="object")return Zv;const t=e;return{preset:Jv(t.preset)?t.preset:rc,custom:t.custom===!0}}function zN(){return Wi?Promise.resolve(Wi):ws||(ws=fetch("/api/config/theme").then(e=>{if(!e.ok)throw new Error(`HTTP ${e.status}`);return e.json()}).then(e=>{const t=vp(e);return Wi=t,ws=null,t}).catch(()=>(ws=null,Zv)),ws)}async function BN(e){const t=await fetch("/api/config/theme",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({preset:e})});if(!t.ok){const o=await t.json().catch(()=>({error:`HTTP ${t.status}`}));throw new Error(o.error??"Failed to save theme")}const n=vp(await t.json());return Wi=n,n}async function UN(){const e=await fetch("/api/config/theme",{method:"DELETE"});if(!e.ok)throw new Error(`HTTP ${e.status}`);const t=vp(await e.json());return Wi=t,t}const Lf="syntaur-theme",ql="syntaur-preset",eb=g.createContext(null);function Of(){try{const e=window.localStorage.getItem(Lf);return e==="light"||e==="dark"?e:null}catch{return null}}function tb(){try{const e=window.localStorage.getItem(ql);return Jv(e)?e:rc}catch{return rc}}function nb(){return typeof window>"u"||!window.matchMedia?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function rb(e){document.documentElement.classList.toggle("dark",e==="dark")}function ob(e){document.documentElement.dataset.theme=e}function HN(){typeof document>"u"||(rb(Of()??nb()),ob(tb()))}function WN({children:e}){const[t,n]=g.useState(()=>Of()),[o,i]=g.useState(()=>Of()??nb()),[l,c]=g.useState(()=>tb());g.useEffect(()=>{rb(o)},[o]),g.useEffect(()=>{ob(l)},[l]),g.useEffect(()=>{let h=!1;return zN().then(x=>{if(!h&&x.preset!==l){c(x.preset);try{window.localStorage.setItem(ql,x.preset)}catch{}}}),()=>{h=!0}},[]),g.useEffect(()=>{if(!window.matchMedia)return;const h=window.matchMedia("(prefers-color-scheme: dark)"),x=()=>{t||i(h.matches?"dark":"light")};return x(),h.addEventListener("change",x),()=>{h.removeEventListener("change",x)}},[t]);async function d(h){c(h);try{window.localStorage.setItem(ql,h)}catch{}await BN(h)}async function p(){const h=await UN();c(h.preset);try{window.localStorage.setItem(ql,h.preset)}catch{}}const m={resolvedTheme:o,explicitTheme:t,setTheme:h=>{window.localStorage.setItem(Lf,h),n(h),i(h)},toggleTheme:()=>{const h=o==="dark"?"light":"dark";window.localStorage.setItem(Lf,h),n(h),i(h)},preset:l,setPreset:d,resetPreset:p};return a.jsx(eb.Provider,{value:m,children:e})}function bp(){const e=g.useContext(eb);if(!e)throw new Error("useTheme must be used within ThemeProvider");return e}const Kl=new Set;let Sn=null,Ts=null;function VN(){return`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws`}function sb(){Sn&&(Sn.readyState===WebSocket.OPEN||Sn.readyState===WebSocket.CONNECTING)||(Sn=new WebSocket(VN()),Sn.onmessage=e=>{try{const t=JSON.parse(e.data);for(const n of Kl)n(t)}catch{}},Sn.onclose=()=>{Sn=null,Ts&&clearTimeout(Ts),Ts=setTimeout(sb,2e3)},Sn.onerror=()=>{Sn==null||Sn.close()})}function jc(e){const t=g.useRef(e);t.current=e,g.useEffect(()=>{const n=o=>t.current(o);return Kl.add(n),sb(),()=>{Kl.delete(n),Kl.size===0&&Sn&&(Ts&&clearTimeout(Ts),Ts=null,Sn.close(),Sn=null)}},[])}function hn(e,t){const[n,o]=g.useState(null),[i,l]=g.useState(!0),[c,d]=g.useState(null),[p,m]=g.useState(0),h=g.useCallback(()=>{m(x=>x+1)},[]);return g.useEffect(()=>{if(!e){l(!1),o(null);return}let x=!1;return l(!0),d(null),fetch(e).then(async v=>{if(!v.ok){const b=await v.json().catch(()=>null);throw new Error((b==null?void 0:b.error)||`HTTP ${v.status}`)}return v.json()}).then(v=>{x||(o(v),l(!1))}).catch(v=>{x||(d(v.message),l(!1))}),()=>{x=!0}},[e,p]),jc(x=>{t&&((x.type==="project-updated"||x.type==="assignment-updated")&&h(),x.type==="servers-updated"&&t==="servers"&&h(),x.type==="agent-sessions-updated"&&t==="agent-sessions"&&h(),x.type==="playbooks-updated"&&t==="playbooks"&&h())}),{data:n,loading:i,error:c,refetch:h}}function Sc(){return hn("/api/projects","projects")}function wp(){return hn("/api/workspaces","projects")}function At(){const{workspace:e}=Et();return e?`/w/${e}`:""}function qN(){return hn("/api/overview","overview")}function ib(){return hn("/api/assignments","assignments")}function KN(){return hn("/api/attention","attention")}function ab(){return hn("/api/help")}function lb(e){const t=e?`/api/projects/${e}`:null;return hn(t,"project")}function GN(e,t){const n=e&&t?`/api/projects/${e}/assignments/${t}`:null;return hn(n,"assignment")}function YN(e){const t=e?`/api/assignments/${e}`:null;return hn(t,"assignment")}function cb(e){return hn(e)}function kp(){return hn("/api/servers","servers")}function XN(){return hn("/api/agent-sessions","agent-sessions")}function QN(e,t){const n=e&&t?`/api/agent-sessions/${e}?assignment=${t}`:null;return hn(n,"agent-sessions")}function ub(){return hn("/api/playbooks","playbooks")}function JN(e){const t=e?`/api/playbooks/${e}`:null;return hn(t,"playbooks")}function Es(){if(typeof navigator>"u")return!1;const e=navigator.platform||"",t=navigator.userAgent||"";return/Mac|iPhone|iPad|iPod/.test(e)||/Mac OS X/.test(t)}function ZN(e){const t=e.split("+").map(i=>i.trim()),n=t[t.length-1]??"",o=new Set(t.slice(0,-1).map(i=>i.toLowerCase()));return{key:n.toLowerCase(),mod:o.has("mod"),shift:o.has("shift"),alt:o.has("alt"),ctrl:o.has("ctrl")}}function Al(e,t){const n=ZN(t);if(e.key.toLowerCase()!==n.key)return!1;const i=Es()?e.metaKey:e.ctrlKey;return!(n.mod&&!i||!n.mod&&!n.ctrl&&i||n.ctrl&&!e.ctrlKey||n.shift&&!e.shiftKey||!n.shift&&!(n.key.length===1&&!/^[a-z0-9]$/.test(n.key))&&e.shiftKey||n.alt&&!e.altKey||!n.alt&&e.altKey)}function Rs(e){return e.split("+").map(n=>{const o=n.toLowerCase();return o==="mod"?Es()?"⌘":"Ctrl":o==="shift"?Es()?"⇧":"Shift":o==="alt"?Es()?"⌥":"Alt":o==="ctrl"?Es()?"⌃":"Ctrl":o==="enter"?"↵":o==="escape"?"Esc":o==="arrowup"?"↑":o==="arrowdown"?"↓":n.length===1?n.toUpperCase():n}).join(Es()?"":"+")}function e2(e){const[t,n]=g.useState(null),[o,i]=g.useState(!0),[l,c]=g.useState(null),d=g.useCallback(async()=>{try{const p=await fetch(`/api/todos/${encodeURIComponent(e)}`);if(!p.ok)throw new Error(`HTTP ${p.status}`);n(await p.json()),c(null)}catch(p){c(p instanceof Error?p.message:"Failed to fetch todos")}finally{i(!1)}},[e]);return g.useEffect(()=>{d()},[d]),jc(p=>{p.type==="todos-updated"&&!p.projectSlug&&d()}),{data:t,loading:o,error:l,refetch:d}}function jp(){const[e,t]=g.useState(null),[n,o]=g.useState(!0),[i,l]=g.useState(null),c=g.useCallback(async()=>{try{const d=await fetch("/api/todos");if(!d.ok)throw new Error(`HTTP ${d.status}`);t(await d.json()),l(null)}catch(d){l(d instanceof Error?d.message:"Failed to fetch todos")}finally{o(!1)}},[]);return g.useEffect(()=>{c()},[c]),jc(d=>{d.type==="todos-updated"&&!d.projectSlug&&c()}),{data:e,loading:n,error:i,refetch:c}}async function db(e,t,n){await fetch(`/api/todos/${encodeURIComponent(e)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({description:t,tags:n})})}async function fb(e,t,n){await fetch(`/api/todos/${encodeURIComponent(e)}/${t}/complete`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({summary:"Completed."})})}async function pb(e,t,n){await fetch(`/api/todos/${encodeURIComponent(e)}/${t}/block`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({reason:n})})}async function hb(e,t,n){await fetch(`/api/todos/${encodeURIComponent(e)}/${t}/start`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({session:n})})}async function mb(e,t){await fetch(`/api/todos/${encodeURIComponent(e)}/${t}/reopen`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})})}async function t2(e,t){await fetch(`/api/todos/${encodeURIComponent(e)}/reorder`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ids:t})})}async function gb(e,t){await fetch(`/api/todos/${encodeURIComponent(e)}/${t}`,{method:"DELETE"})}const n2=new Set(["/projects","/assignments","/servers","/todos"]);function Gl(e,t){return n2.has(e)?`${t}${e}`:e}const r2=[{id:"page-overview",title:"Overview",basePath:"/",keywords:["home","dashboard"]},{id:"page-projects",title:"Projects",basePath:"/projects",keywords:[]},{id:"page-assignments",title:"Assignments",basePath:"/assignments",keywords:[]},{id:"page-todos",title:"Todos",basePath:"/todos",keywords:["tasks"]},{id:"page-servers",title:"Servers",basePath:"/servers",keywords:["sessions"]},{id:"page-attention",title:"Attention",basePath:"/attention",keywords:["alerts"]},{id:"page-playbooks",title:"Playbooks",basePath:"/playbooks",keywords:[]},{id:"page-settings",title:"Settings",basePath:"/settings",keywords:[]},{id:"page-help",title:"Help",basePath:"/help",keywords:["shortcuts"]}];function o2(e){const t=[];for(const n of r2)t.push({type:"page",id:n.id,title:n.title,keywords:[...n.keywords],route:Gl(n.basePath,e.wsPrefix)});for(const n of e.projects??[]){const o=n.workspace?`/w/${n.workspace}`:"";t.push({type:"project",id:`project-${n.slug}`,title:n.title,subtitle:n.slug,keywords:n.tags,route:`${o}/projects/${n.slug}`}),t.push({type:"todo",id:`project-todos-${n.slug}`,title:`${n.title} todos`,subtitle:`${n.slug} · project`,keywords:[...n.tags??[],"project","todos"],route:`${o}/projects/${n.slug}?tab=todos`})}for(const n of e.assignments??[]){const o=n.projectWorkspace?`/w/${n.projectWorkspace}`:"";t.push({type:"assignment",id:n.projectSlug===null?`assignment-standalone-${n.id}`:`assignment-${n.projectSlug}-${n.slug}`,title:n.title,subtitle:`${n.projectTitle} · ${n.status}`,keywords:[n.projectSlug??"standalone",n.assignee??""].filter(i=>!!i),route:n.projectSlug===null?`/assignments/${n.id}`:`${o}/projects/${n.projectSlug}/assignments/${n.slug}`})}for(const n of e.playbooks??[])t.push({type:"playbook",id:`playbook-${n.slug}`,title:n.name,subtitle:n.description,keywords:n.tags,route:`/playbooks/${n.slug}`});for(const n of e.servers??[])t.push({type:"server",id:`server-${n.name}`,title:n.name,subtitle:n.alive?"alive":"dead",route:`${Gl("/servers",e.wsPrefix)}#server-${encodeURIComponent(n.name)}`});for(const n of e.todos??[]){const o=n.workspace&&n.workspace!=="_ungrouped"?`/w/${n.workspace}`:e.wsPrefix,i=Gl("/todos",o);t.push({type:"todo",id:`todo-${n.id}`,title:n.description,subtitle:n.status,keywords:n.tags,route:`${i}?focus=${encodeURIComponent(n.id)}`})}return t}async function s2(e,t,n){const o=t?"disable":"enable",i=await fetch(`/api/playbooks/${encodeURIComponent(e)}/${o}`,{method:"POST"});if(!i.ok){const l=await i.json().catch(()=>({}));throw new Error(l.error||`Failed to ${o} playbook`)}n()}async function Wd(e,t){const n=await fetch(`/api/todos/${encodeURIComponent(e)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({description:t})});if(!n.ok){const o=await n.json().catch(()=>({}));throw new Error(o.error||`Failed to create todo (HTTP ${n.status})`)}}function i2(e){const{playbooks:t,projectSlug:n,currentProjectTitle:o,currentProjectWorkspace:i,wsPrefix:l,refetchPlaybooks:c,navigate:d,toggleTheme:p}=e,m=[];if(m.push({id:"create-project",title:"New Project",group:"Create",keywords:["new","create","project"],run:()=>d(`${l}/create/project`)}),m.push({id:"create-standalone-assignment",title:"New Standalone Assignment",subtitle:"Not attached to a project",group:"Create",keywords:["new","create","assignment","standalone","one-off"],run:()=>d(`${l}/assignments/new`)}),n&&m.push({id:`create-assignment-in-${n}`,title:`New Assignment in ${o??n}`,subtitle:n,group:"Create",keywords:["new","create","assignment",n],run:()=>d(`${l}/projects/${n}/create/assignment`)}),m.push({id:"create-playbook",title:"New Playbook",group:"Create",keywords:["new","create","playbook"],run:()=>d("/playbooks/create")}),m.push({id:"create-todo-global",title:"New Todo (global)",subtitle:"Ungrouped",group:"Create",keywords:["new","create","todo","global","ungrouped"],requiresInput:{placeholder:"Describe the todo…",runWithInput:async h=>{const x=h.trim();x&&await Wd("_ungrouped",x)}}}),l){const h=l.replace(/^\/w\//,"");m.push({id:`create-todo-workspace-${h}`,title:`New Todo in workspace ${h}`,subtitle:h,group:"Create",keywords:["new","create","todo","workspace",h],requiresInput:{placeholder:`Describe the todo for workspace ${h}…`,runWithInput:async x=>{const v=x.trim();v&&await Wd(h,v)}}})}n&&i&&m.push({id:`create-todo-project-${n}`,title:`New Todo in project ${o??n}`,subtitle:`${n} · workspace ${i}`,group:"Create",keywords:["new","create","todo","project",n,i],requiresInput:{placeholder:`Describe the todo for project ${o??n}…`,runWithInput:async h=>{const x=h.trim();x&&await Wd(i,x)}}});for(const h of t)m.push({id:`toggle-playbook-${h.slug}`,title:`Toggle Playbook: ${h.name}`,subtitle:h.enabled?"enabled":"disabled",group:"Toggle",keywords:["toggle","playbook",h.slug,...h.tags??[]],run:()=>s2(h.slug,h.enabled,c)});return m.push({id:"toggle-theme",title:"Toggle theme",subtitle:"Light / dark",group:"Theme",keywords:["theme","toggle","light","dark","appearance"],run:()=>p()}),m}function pt(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function xx(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Cc(...e){return t=>{let n=!1;const o=e.map(i=>{const l=xx(i,t);return!n&&typeof l=="function"&&(n=!0),l});if(n)return()=>{for(let i=0;i<o.length;i++){const l=o[i];typeof l=="function"?l():xx(e[i],null)}}}}function cn(...e){return g.useCallback(Cc(...e),e)}function a2(e,t){const n=g.createContext(t),o=l=>{const{children:c,...d}=l,p=g.useMemo(()=>d,Object.values(d));return a.jsx(n.Provider,{value:p,children:c})};o.displayName=e+"Provider";function i(l){const c=g.useContext(n);if(c)return c;if(t!==void 0)return t;throw new Error(`\`${l}\` must be used within \`${e}\``)}return[o,i]}function Go(e,t=[]){let n=[];function o(l,c){const d=g.createContext(c),p=n.length;n=[...n,c];const m=x=>{var S;const{scope:v,children:b,...N}=x,k=((S=v==null?void 0:v[e])==null?void 0:S[p])||d,j=g.useMemo(()=>N,Object.values(N));return a.jsx(k.Provider,{value:j,children:b})};m.displayName=l+"Provider";function h(x,v){var k;const b=((k=v==null?void 0:v[e])==null?void 0:k[p])||d,N=g.useContext(b);if(N)return N;if(c!==void 0)return c;throw new Error(`\`${x}\` must be used within \`${l}\``)}return[m,h]}const i=()=>{const l=n.map(c=>g.createContext(c));return function(d){const p=(d==null?void 0:d[e])||l;return g.useMemo(()=>({[`__scope${e}`]:{...d,[e]:p}}),[d,p])}};return i.scopeName=e,[o,l2(i,...t)]}function l2(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(l){const c=o.reduce((d,{useScope:p,scopeName:m})=>{const x=p(l)[`__scope${m}`];return{...d,...x}},{});return g.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return n.scopeName=t.scopeName,n}var jo=globalThis!=null&&globalThis.document?g.useLayoutEffect:()=>{},c2=cv[" useId ".trim().toString()]||(()=>{}),u2=0;function As(e){const[t,n]=g.useState(c2());return jo(()=>{n(o=>o??String(u2++))},[e]),t?`radix-${t}`:""}var d2=cv[" useInsertionEffect ".trim().toString()]||jo;function Nc({prop:e,defaultProp:t,onChange:n=()=>{},caller:o}){const[i,l,c]=f2({defaultProp:t,onChange:n}),d=e!==void 0,p=d?e:i;{const h=g.useRef(e!==void 0);g.useEffect(()=>{const x=h.current;x!==d&&console.warn(`${o} is changing from ${x?"controlled":"uncontrolled"} to ${d?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),h.current=d},[d,o])}const m=g.useCallback(h=>{var x;if(d){const v=p2(h)?h(e):h;v!==e&&((x=c.current)==null||x.call(c,v))}else l(h)},[d,e,l,c]);return[p,m]}function f2({defaultProp:e,onChange:t}){const[n,o]=g.useState(e),i=g.useRef(n),l=g.useRef(t);return d2(()=>{l.current=t},[t]),g.useEffect(()=>{var c;i.current!==n&&((c=l.current)==null||c.call(l,n),i.current=n)},[n,i]),[n,o,l]}function p2(e){return typeof e=="function"}function h2(e){const t=m2(e),n=g.forwardRef((o,i)=>{const{children:l,...c}=o,d=g.Children.toArray(l),p=d.find(x2);if(p){const m=p.props.children,h=d.map(x=>x===p?g.Children.count(m)>1?g.Children.only(null):g.isValidElement(m)?m.props.children:null:x);return a.jsx(t,{...c,ref:i,children:g.isValidElement(m)?g.cloneElement(m,void 0,h):null})}return a.jsx(t,{...c,ref:i,children:l})});return n.displayName=`${e}.Slot`,n}function m2(e){const t=g.forwardRef((n,o)=>{const{children:i,...l}=n;if(g.isValidElement(i)){const c=v2(i),d=y2(l,i.props);return i.type!==g.Fragment&&(d.ref=o?Cc(o,c):c),g.cloneElement(i,d)}return g.Children.count(i)>1?g.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var g2=Symbol("radix.slottable");function x2(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===g2}function y2(e,t){const n={...t};for(const o in t){const i=e[o],l=t[o];/^on[A-Z]/.test(o)?i&&l?n[o]=(...d)=>{const p=l(...d);return i(...d),p}:i&&(n[o]=i):o==="style"?n[o]={...i,...l}:o==="className"&&(n[o]=[i,l].filter(Boolean).join(" "))}return{...e,...n}}function v2(e){var o,i;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var b2=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Dt=b2.reduce((e,t)=>{const n=h2(`Primitive.${t}`),o=g.forwardRef((i,l)=>{const{asChild:c,...d}=i,p=c?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),a.jsx(p,{...d,ref:l})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function w2(e,t){e&&wo.flushSync(()=>e.dispatchEvent(t))}function Vo(e){const t=g.useRef(e);return g.useEffect(()=>{t.current=e}),g.useMemo(()=>(...n)=>{var o;return(o=t.current)==null?void 0:o.call(t,...n)},[])}function k2(e,t=globalThis==null?void 0:globalThis.document){const n=Vo(e);g.useEffect(()=>{const o=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[n,t])}var j2="DismissableLayer",_f="dismissableLayer.update",S2="dismissableLayer.pointerDownOutside",C2="dismissableLayer.focusOutside",yx,xb=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Sp=g.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:l,onInteractOutside:c,onDismiss:d,...p}=e,m=g.useContext(xb),[h,x]=g.useState(null),v=(h==null?void 0:h.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,b]=g.useState({}),N=cn(t,L=>x(L)),k=Array.from(m.layers),[j]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),S=k.indexOf(j),T=h?k.indexOf(h):-1,R=m.layersWithOutsidePointerEventsDisabled.size>0,D=T>=S,M=P2(L=>{const _=L.target,J=[...m.branches].some(ne=>ne.contains(_));!D||J||(i==null||i(L),c==null||c(L),L.defaultPrevented||d==null||d())},v),P=T2(L=>{const _=L.target;[...m.branches].some(ne=>ne.contains(_))||(l==null||l(L),c==null||c(L),L.defaultPrevented||d==null||d())},v);return k2(L=>{T===m.layers.size-1&&(o==null||o(L),!L.defaultPrevented&&d&&(L.preventDefault(),d()))},v),g.useEffect(()=>{if(h)return n&&(m.layersWithOutsidePointerEventsDisabled.size===0&&(yx=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),m.layersWithOutsidePointerEventsDisabled.add(h)),m.layers.add(h),vx(),()=>{n&&m.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=yx)}},[h,v,n,m]),g.useEffect(()=>()=>{h&&(m.layers.delete(h),m.layersWithOutsidePointerEventsDisabled.delete(h),vx())},[h,m]),g.useEffect(()=>{const L=()=>b({});return document.addEventListener(_f,L),()=>document.removeEventListener(_f,L)},[]),a.jsx(Dt.div,{...p,ref:N,style:{pointerEvents:R?D?"auto":"none":void 0,...e.style},onFocusCapture:pt(e.onFocusCapture,P.onFocusCapture),onBlurCapture:pt(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:pt(e.onPointerDownCapture,M.onPointerDownCapture)})});Sp.displayName=j2;var N2="DismissableLayerBranch",E2=g.forwardRef((e,t)=>{const n=g.useContext(xb),o=g.useRef(null),i=cn(t,o);return g.useEffect(()=>{const l=o.current;if(l)return n.branches.add(l),()=>{n.branches.delete(l)}},[n.branches]),a.jsx(Dt.div,{...e,ref:i})});E2.displayName=N2;function P2(e,t=globalThis==null?void 0:globalThis.document){const n=Vo(e),o=g.useRef(!1),i=g.useRef(()=>{});return g.useEffect(()=>{const l=d=>{if(d.target&&!o.current){let p=function(){yb(S2,n,m,{discrete:!0})};const m={originalEvent:d};d.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=p,t.addEventListener("click",i.current,{once:!0})):p()}else t.removeEventListener("click",i.current);o.current=!1},c=window.setTimeout(()=>{t.addEventListener("pointerdown",l)},0);return()=>{window.clearTimeout(c),t.removeEventListener("pointerdown",l),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function T2(e,t=globalThis==null?void 0:globalThis.document){const n=Vo(e),o=g.useRef(!1);return g.useEffect(()=>{const i=l=>{l.target&&!o.current&&yb(C2,n,{originalEvent:l},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function vx(){const e=new CustomEvent(_f);document.dispatchEvent(e)}function yb(e,t,n,{discrete:o}){const i=n.originalEvent.target,l=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),o?w2(i,l):i.dispatchEvent(l)}var Vd="focusScope.autoFocusOnMount",qd="focusScope.autoFocusOnUnmount",bx={bubbles:!1,cancelable:!0},R2="FocusScope",vb=g.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:i,onUnmountAutoFocus:l,...c}=e,[d,p]=g.useState(null),m=Vo(i),h=Vo(l),x=g.useRef(null),v=cn(t,k=>p(k)),b=g.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;g.useEffect(()=>{if(o){let k=function(R){if(b.paused||!d)return;const D=R.target;d.contains(D)?x.current=D:vo(x.current,{select:!0})},j=function(R){if(b.paused||!d)return;const D=R.relatedTarget;D!==null&&(d.contains(D)||vo(x.current,{select:!0}))},S=function(R){if(document.activeElement===document.body)for(const M of R)M.removedNodes.length>0&&vo(d)};document.addEventListener("focusin",k),document.addEventListener("focusout",j);const T=new MutationObserver(S);return d&&T.observe(d,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",k),document.removeEventListener("focusout",j),T.disconnect()}}},[o,d,b.paused]),g.useEffect(()=>{if(d){kx.add(b);const k=document.activeElement;if(!d.contains(k)){const S=new CustomEvent(Vd,bx);d.addEventListener(Vd,m),d.dispatchEvent(S),S.defaultPrevented||(A2(_2(bb(d)),{select:!0}),document.activeElement===k&&vo(d))}return()=>{d.removeEventListener(Vd,m),setTimeout(()=>{const S=new CustomEvent(qd,bx);d.addEventListener(qd,h),d.dispatchEvent(S),S.defaultPrevented||vo(k??document.body,{select:!0}),d.removeEventListener(qd,h),kx.remove(b)},0)}}},[d,m,h,b]);const N=g.useCallback(k=>{if(!n&&!o||b.paused)return;const j=k.key==="Tab"&&!k.altKey&&!k.ctrlKey&&!k.metaKey,S=document.activeElement;if(j&&S){const T=k.currentTarget,[R,D]=D2(T);R&&D?!k.shiftKey&&S===D?(k.preventDefault(),n&&vo(R,{select:!0})):k.shiftKey&&S===R&&(k.preventDefault(),n&&vo(D,{select:!0})):S===T&&k.preventDefault()}},[n,o,b.paused]);return a.jsx(Dt.div,{tabIndex:-1,...c,ref:v,onKeyDown:N})});vb.displayName=R2;function A2(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(vo(o,{select:t}),document.activeElement!==n)return}function D2(e){const t=bb(e),n=wx(t,e),o=wx(t.reverse(),e);return[n,o]}function bb(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const i=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||i?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function wx(e,t){for(const n of e)if(!I2(n,{upTo:t}))return n}function I2(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function L2(e){return e instanceof HTMLInputElement&&"select"in e}function vo(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&L2(e)&&t&&e.select()}}var kx=O2();function O2(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=jx(e,t),e.unshift(t)},remove(t){var n;e=jx(e,t),(n=e[0])==null||n.resume()}}}function jx(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function _2(e){return e.filter(t=>t.tagName!=="A")}var M2="Portal",Cp=g.forwardRef((e,t)=>{var d;const{container:n,...o}=e,[i,l]=g.useState(!1);jo(()=>l(!0),[]);const c=n||i&&((d=globalThis==null?void 0:globalThis.document)==null?void 0:d.body);return c?vC.createPortal(a.jsx(Dt.div,{...o,ref:t}),c):null});Cp.displayName=M2;function $2(e,t){return g.useReducer((n,o)=>t[n][o]??n,e)}var Yo=e=>{const{present:t,children:n}=e,o=F2(t),i=typeof n=="function"?n({present:o.isPresent}):g.Children.only(n),l=cn(o.ref,z2(i));return typeof n=="function"||o.isPresent?g.cloneElement(i,{ref:l}):null};Yo.displayName="Presence";function F2(e){const[t,n]=g.useState(),o=g.useRef(null),i=g.useRef(e),l=g.useRef("none"),c=e?"mounted":"unmounted",[d,p]=$2(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return g.useEffect(()=>{const m=Dl(o.current);l.current=d==="mounted"?m:"none"},[d]),jo(()=>{const m=o.current,h=i.current;if(h!==e){const v=l.current,b=Dl(m);e?p("MOUNT"):b==="none"||(m==null?void 0:m.display)==="none"?p("UNMOUNT"):p(h&&v!==b?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,p]),jo(()=>{if(t){let m;const h=t.ownerDocument.defaultView??window,x=b=>{const k=Dl(o.current).includes(CSS.escape(b.animationName));if(b.target===t&&k&&(p("ANIMATION_END"),!i.current)){const j=t.style.animationFillMode;t.style.animationFillMode="forwards",m=h.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=j)})}},v=b=>{b.target===t&&(l.current=Dl(o.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",x),t.addEventListener("animationend",x),()=>{h.clearTimeout(m),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",x),t.removeEventListener("animationend",x)}}else p("ANIMATION_END")},[t,p]),{isPresent:["mounted","unmountSuspended"].includes(d),ref:g.useCallback(m=>{o.current=m?getComputedStyle(m):null,n(m)},[])}}function Dl(e){return(e==null?void 0:e.animationName)||"none"}function z2(e){var o,i;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Kd=0;function B2(){g.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Sx()),document.body.insertAdjacentElement("beforeend",e[1]??Sx()),Kd++,()=>{Kd===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Kd--}},[])}function Sx(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var wr=function(){return wr=Object.assign||function(t){for(var n,o=1,i=arguments.length;o<i;o++){n=arguments[o];for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(t[l]=n[l])}return t},wr.apply(this,arguments)};function wb(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(e);i<o.length;i++)t.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(n[o[i]]=e[o[i]]);return n}function U2(e,t,n){if(n||arguments.length===2)for(var o=0,i=t.length,l;o<i;o++)(l||!(o in t))&&(l||(l=Array.prototype.slice.call(t,0,o)),l[o]=t[o]);return e.concat(l||Array.prototype.slice.call(t))}var Yl="right-scroll-bar-position",Xl="width-before-scroll-bar",H2="with-scroll-bars-hidden",W2="--removed-body-scroll-bar-size";function Gd(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function V2(e,t){var n=g.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(o){var i=n.value;i!==o&&(n.value=o,n.callback(o,i))}}}})[0];return n.callback=t,n.facade}var q2=typeof window<"u"?g.useLayoutEffect:g.useEffect,Cx=new WeakMap;function K2(e,t){var n=V2(null,function(o){return e.forEach(function(i){return Gd(i,o)})});return q2(function(){var o=Cx.get(n);if(o){var i=new Set(o),l=new Set(e),c=n.current;i.forEach(function(d){l.has(d)||Gd(d,null)}),l.forEach(function(d){i.has(d)||Gd(d,c)})}Cx.set(n,e)},[e]),n}function G2(e){return e}function Y2(e,t){t===void 0&&(t=G2);var n=[],o=!1,i={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(l){var c=t(l,o);return n.push(c),function(){n=n.filter(function(d){return d!==c})}},assignSyncMedium:function(l){for(o=!0;n.length;){var c=n;n=[],c.forEach(l)}n={push:function(d){return l(d)},filter:function(){return n}}},assignMedium:function(l){o=!0;var c=[];if(n.length){var d=n;n=[],d.forEach(l),c=n}var p=function(){var h=c;c=[],h.forEach(l)},m=function(){return Promise.resolve().then(p)};m(),n={push:function(h){c.push(h),m()},filter:function(h){return c=c.filter(h),n}}}};return i}function X2(e){e===void 0&&(e={});var t=Y2(null);return t.options=wr({async:!0,ssr:!1},e),t}var kb=function(e){var t=e.sideCar,n=wb(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return g.createElement(o,wr({},n))};kb.isSideCarExport=!0;function Q2(e,t){return e.useMedium(t),kb}var jb=X2(),Yd=function(){},Ec=g.forwardRef(function(e,t){var n=g.useRef(null),o=g.useState({onScrollCapture:Yd,onWheelCapture:Yd,onTouchMoveCapture:Yd}),i=o[0],l=o[1],c=e.forwardProps,d=e.children,p=e.className,m=e.removeScrollBar,h=e.enabled,x=e.shards,v=e.sideCar,b=e.noRelative,N=e.noIsolation,k=e.inert,j=e.allowPinchZoom,S=e.as,T=S===void 0?"div":S,R=e.gapMode,D=wb(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),M=v,P=K2([n,t]),L=wr(wr({},D),i);return g.createElement(g.Fragment,null,h&&g.createElement(M,{sideCar:jb,removeScrollBar:m,shards:x,noRelative:b,noIsolation:N,inert:k,setCallbacks:l,allowPinchZoom:!!j,lockRef:n,gapMode:R}),c?g.cloneElement(g.Children.only(d),wr(wr({},L),{ref:P})):g.createElement(T,wr({},L,{className:p,ref:P}),d))});Ec.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Ec.classNames={fullWidth:Xl,zeroRight:Yl};var J2=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Z2(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=J2();return t&&e.setAttribute("nonce",t),e}function eE(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function tE(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var nE=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Z2())&&(eE(t,n),tE(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},rE=function(){var e=nE();return function(t,n){g.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Sb=function(){var e=rE(),t=function(n){var o=n.styles,i=n.dynamic;return e(o,i),null};return t},oE={left:0,top:0,right:0,gap:0},Xd=function(e){return parseInt(e||"",10)||0},sE=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],o=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[Xd(n),Xd(o),Xd(i)]},iE=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return oE;var t=sE(e),n=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-n+t[2]-t[0])}},aE=Sb(),Ds="data-scroll-locked",lE=function(e,t,n,o){var i=e.left,l=e.top,c=e.right,d=e.gap;return n===void 0&&(n="margin"),`
|
|
397
|
+
.`.concat(H2,` {
|
|
398
|
+
overflow: hidden `).concat(o,`;
|
|
399
|
+
padding-right: `).concat(d,"px ").concat(o,`;
|
|
400
|
+
}
|
|
401
|
+
body[`).concat(Ds,`] {
|
|
402
|
+
overflow: hidden `).concat(o,`;
|
|
403
|
+
overscroll-behavior: contain;
|
|
404
|
+
`).concat([t&&"position: relative ".concat(o,";"),n==="margin"&&`
|
|
405
|
+
padding-left: `.concat(i,`px;
|
|
406
|
+
padding-top: `).concat(l,`px;
|
|
407
|
+
padding-right: `).concat(c,`px;
|
|
408
|
+
margin-left:0;
|
|
409
|
+
margin-top:0;
|
|
410
|
+
margin-right: `).concat(d,"px ").concat(o,`;
|
|
411
|
+
`),n==="padding"&&"padding-right: ".concat(d,"px ").concat(o,";")].filter(Boolean).join(""),`
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
.`).concat(Yl,` {
|
|
415
|
+
right: `).concat(d,"px ").concat(o,`;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
.`).concat(Xl,` {
|
|
419
|
+
margin-right: `).concat(d,"px ").concat(o,`;
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
.`).concat(Yl," .").concat(Yl,` {
|
|
423
|
+
right: 0 `).concat(o,`;
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
.`).concat(Xl," .").concat(Xl,` {
|
|
427
|
+
margin-right: 0 `).concat(o,`;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
body[`).concat(Ds,`] {
|
|
431
|
+
`).concat(W2,": ").concat(d,`px;
|
|
432
|
+
}
|
|
433
|
+
`)},Nx=function(){var e=parseInt(document.body.getAttribute(Ds)||"0",10);return isFinite(e)?e:0},cE=function(){g.useEffect(function(){return document.body.setAttribute(Ds,(Nx()+1).toString()),function(){var e=Nx()-1;e<=0?document.body.removeAttribute(Ds):document.body.setAttribute(Ds,e.toString())}},[])},uE=function(e){var t=e.noRelative,n=e.noImportant,o=e.gapMode,i=o===void 0?"margin":o;cE();var l=g.useMemo(function(){return iE(i)},[i]);return g.createElement(aE,{styles:lE(l,!t,i,n?"":"!important")})},Mf=!1;if(typeof window<"u")try{var Il=Object.defineProperty({},"passive",{get:function(){return Mf=!0,!0}});window.addEventListener("test",Il,Il),window.removeEventListener("test",Il,Il)}catch{Mf=!1}var ks=Mf?{passive:!1}:!1,dE=function(e){return e.tagName==="TEXTAREA"},Cb=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!dE(e)&&n[t]==="visible")},fE=function(e){return Cb(e,"overflowY")},pE=function(e){return Cb(e,"overflowX")},Ex=function(e,t){var n=t.ownerDocument,o=t;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var i=Nb(e,o);if(i){var l=Eb(e,o),c=l[1],d=l[2];if(c>d)return!0}o=o.parentNode}while(o&&o!==n.body);return!1},hE=function(e){var t=e.scrollTop,n=e.scrollHeight,o=e.clientHeight;return[t,n,o]},mE=function(e){var t=e.scrollLeft,n=e.scrollWidth,o=e.clientWidth;return[t,n,o]},Nb=function(e,t){return e==="v"?fE(t):pE(t)},Eb=function(e,t){return e==="v"?hE(t):mE(t)},gE=function(e,t){return e==="h"&&t==="rtl"?-1:1},xE=function(e,t,n,o,i){var l=gE(e,window.getComputedStyle(t).direction),c=l*o,d=n.target,p=t.contains(d),m=!1,h=c>0,x=0,v=0;do{if(!d)break;var b=Eb(e,d),N=b[0],k=b[1],j=b[2],S=k-j-l*N;(N||S)&&Nb(e,d)&&(x+=S,v+=N);var T=d.parentNode;d=T&&T.nodeType===Node.DOCUMENT_FRAGMENT_NODE?T.host:T}while(!p&&d!==document.body||p&&(t.contains(d)||t===d));return(h&&Math.abs(x)<1||!h&&Math.abs(v)<1)&&(m=!0),m},Ll=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Px=function(e){return[e.deltaX,e.deltaY]},Tx=function(e){return e&&"current"in e?e.current:e},yE=function(e,t){return e[0]===t[0]&&e[1]===t[1]},vE=function(e){return`
|
|
434
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
435
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
436
|
+
`)},bE=0,js=[];function wE(e){var t=g.useRef([]),n=g.useRef([0,0]),o=g.useRef(),i=g.useState(bE++)[0],l=g.useState(Sb)[0],c=g.useRef(e);g.useEffect(function(){c.current=e},[e]),g.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var k=U2([e.lockRef.current],(e.shards||[]).map(Tx),!0).filter(Boolean);return k.forEach(function(j){return j.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),k.forEach(function(j){return j.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var d=g.useCallback(function(k,j){if("touches"in k&&k.touches.length===2||k.type==="wheel"&&k.ctrlKey)return!c.current.allowPinchZoom;var S=Ll(k),T=n.current,R="deltaX"in k?k.deltaX:T[0]-S[0],D="deltaY"in k?k.deltaY:T[1]-S[1],M,P=k.target,L=Math.abs(R)>Math.abs(D)?"h":"v";if("touches"in k&&L==="h"&&P.type==="range")return!1;var _=window.getSelection(),J=_&&_.anchorNode,ne=J?J===P||J.contains(P):!1;if(ne)return!1;var U=Ex(L,P);if(!U)return!0;if(U?M=L:(M=L==="v"?"h":"v",U=Ex(L,P)),!U)return!1;if(!o.current&&"changedTouches"in k&&(R||D)&&(o.current=M),!M)return!0;var G=o.current||M;return xE(G,j,k,G==="h"?R:D)},[]),p=g.useCallback(function(k){var j=k;if(!(!js.length||js[js.length-1]!==l)){var S="deltaY"in j?Px(j):Ll(j),T=t.current.filter(function(M){return M.name===j.type&&(M.target===j.target||j.target===M.shadowParent)&&yE(M.delta,S)})[0];if(T&&T.should){j.cancelable&&j.preventDefault();return}if(!T){var R=(c.current.shards||[]).map(Tx).filter(Boolean).filter(function(M){return M.contains(j.target)}),D=R.length>0?d(j,R[0]):!c.current.noIsolation;D&&j.cancelable&&j.preventDefault()}}},[]),m=g.useCallback(function(k,j,S,T){var R={name:k,delta:j,target:S,should:T,shadowParent:kE(S)};t.current.push(R),setTimeout(function(){t.current=t.current.filter(function(D){return D!==R})},1)},[]),h=g.useCallback(function(k){n.current=Ll(k),o.current=void 0},[]),x=g.useCallback(function(k){m(k.type,Px(k),k.target,d(k,e.lockRef.current))},[]),v=g.useCallback(function(k){m(k.type,Ll(k),k.target,d(k,e.lockRef.current))},[]);g.useEffect(function(){return js.push(l),e.setCallbacks({onScrollCapture:x,onWheelCapture:x,onTouchMoveCapture:v}),document.addEventListener("wheel",p,ks),document.addEventListener("touchmove",p,ks),document.addEventListener("touchstart",h,ks),function(){js=js.filter(function(k){return k!==l}),document.removeEventListener("wheel",p,ks),document.removeEventListener("touchmove",p,ks),document.removeEventListener("touchstart",h,ks)}},[]);var b=e.removeScrollBar,N=e.inert;return g.createElement(g.Fragment,null,N?g.createElement(l,{styles:vE(i)}):null,b?g.createElement(uE,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function kE(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const jE=Q2(jb,wE);var Pb=g.forwardRef(function(e,t){return g.createElement(Ec,wr({},e,{ref:t,sideCar:jE}))});Pb.classNames=Ec.classNames;var SE=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ss=new WeakMap,Ol=new WeakMap,_l={},Qd=0,Tb=function(e){return e&&(e.host||Tb(e.parentNode))},CE=function(e,t){return t.map(function(n){if(e.contains(n))return n;var o=Tb(n);return o&&e.contains(o)?o:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},NE=function(e,t,n,o){var i=CE(t,Array.isArray(e)?e:[e]);_l[n]||(_l[n]=new WeakMap);var l=_l[n],c=[],d=new Set,p=new Set(i),m=function(x){!x||d.has(x)||(d.add(x),m(x.parentNode))};i.forEach(m);var h=function(x){!x||p.has(x)||Array.prototype.forEach.call(x.children,function(v){if(d.has(v))h(v);else try{var b=v.getAttribute(o),N=b!==null&&b!=="false",k=(Ss.get(v)||0)+1,j=(l.get(v)||0)+1;Ss.set(v,k),l.set(v,j),c.push(v),k===1&&N&&Ol.set(v,!0),j===1&&v.setAttribute(n,"true"),N||v.setAttribute(o,"true")}catch(S){console.error("aria-hidden: cannot operate on ",v,S)}})};return h(t),d.clear(),Qd++,function(){c.forEach(function(x){var v=Ss.get(x)-1,b=l.get(x)-1;Ss.set(x,v),l.set(x,b),v||(Ol.has(x)||x.removeAttribute(o),Ol.delete(x)),b||x.removeAttribute(n)}),Qd--,Qd||(Ss=new WeakMap,Ss=new WeakMap,Ol=new WeakMap,_l={})}},EE=function(e,t,n){n===void 0&&(n="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),i=SE(e);return i?(o.push.apply(o,Array.from(i.querySelectorAll("[aria-live], script"))),NE(o,i,n,"aria-hidden")):function(){return null}};function PE(e){const t=TE(e),n=g.forwardRef((o,i)=>{const{children:l,...c}=o,d=g.Children.toArray(l),p=d.find(AE);if(p){const m=p.props.children,h=d.map(x=>x===p?g.Children.count(m)>1?g.Children.only(null):g.isValidElement(m)?m.props.children:null:x);return a.jsx(t,{...c,ref:i,children:g.isValidElement(m)?g.cloneElement(m,void 0,h):null})}return a.jsx(t,{...c,ref:i,children:l})});return n.displayName=`${e}.Slot`,n}function TE(e){const t=g.forwardRef((n,o)=>{const{children:i,...l}=n;if(g.isValidElement(i)){const c=IE(i),d=DE(l,i.props);return i.type!==g.Fragment&&(d.ref=o?Cc(o,c):c),g.cloneElement(i,d)}return g.Children.count(i)>1?g.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var RE=Symbol("radix.slottable");function AE(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===RE}function DE(e,t){const n={...t};for(const o in t){const i=e[o],l=t[o];/^on[A-Z]/.test(o)?i&&l?n[o]=(...d)=>{const p=l(...d);return i(...d),p}:i&&(n[o]=i):o==="style"?n[o]={...i,...l}:o==="className"&&(n[o]=[i,l].filter(Boolean).join(" "))}return{...e,...n}}function IE(e){var o,i;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Pc="Dialog",[Rb,Ab]=Go(Pc),[LE,pr]=Rb(Pc),Db=e=>{const{__scopeDialog:t,children:n,open:o,defaultOpen:i,onOpenChange:l,modal:c=!0}=e,d=g.useRef(null),p=g.useRef(null),[m,h]=Nc({prop:o,defaultProp:i??!1,onChange:l,caller:Pc});return a.jsx(LE,{scope:t,triggerRef:d,contentRef:p,contentId:As(),titleId:As(),descriptionId:As(),open:m,onOpenChange:h,onOpenToggle:g.useCallback(()=>h(x=>!x),[h]),modal:c,children:n})};Db.displayName=Pc;var Ib="DialogTrigger",Lb=g.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,i=pr(Ib,n),l=cn(t,i.triggerRef);return a.jsx(Dt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":Pp(i.open),...o,ref:l,onClick:pt(e.onClick,i.onOpenToggle)})});Lb.displayName=Ib;var Np="DialogPortal",[OE,Ob]=Rb(Np,{forceMount:void 0}),_b=e=>{const{__scopeDialog:t,forceMount:n,children:o,container:i}=e,l=pr(Np,t);return a.jsx(OE,{scope:t,forceMount:n,children:g.Children.map(o,c=>a.jsx(Yo,{present:n||l.open,children:a.jsx(Cp,{asChild:!0,container:i,children:c})}))})};_b.displayName=Np;var oc="DialogOverlay",Mb=g.forwardRef((e,t)=>{const n=Ob(oc,e.__scopeDialog),{forceMount:o=n.forceMount,...i}=e,l=pr(oc,e.__scopeDialog);return l.modal?a.jsx(Yo,{present:o||l.open,children:a.jsx(ME,{...i,ref:t})}):null});Mb.displayName=oc;var _E=PE("DialogOverlay.RemoveScroll"),ME=g.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,i=pr(oc,n);return a.jsx(Pb,{as:_E,allowPinchZoom:!0,shards:[i.contentRef],children:a.jsx(Dt.div,{"data-state":Pp(i.open),...o,ref:t,style:{pointerEvents:"auto",...o.style}})})}),qo="DialogContent",$b=g.forwardRef((e,t)=>{const n=Ob(qo,e.__scopeDialog),{forceMount:o=n.forceMount,...i}=e,l=pr(qo,e.__scopeDialog);return a.jsx(Yo,{present:o||l.open,children:l.modal?a.jsx($E,{...i,ref:t}):a.jsx(FE,{...i,ref:t})})});$b.displayName=qo;var $E=g.forwardRef((e,t)=>{const n=pr(qo,e.__scopeDialog),o=g.useRef(null),i=cn(t,n.contentRef,o);return g.useEffect(()=>{const l=o.current;if(l)return EE(l)},[]),a.jsx(Fb,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:pt(e.onCloseAutoFocus,l=>{var c;l.preventDefault(),(c=n.triggerRef.current)==null||c.focus()}),onPointerDownOutside:pt(e.onPointerDownOutside,l=>{const c=l.detail.originalEvent,d=c.button===0&&c.ctrlKey===!0;(c.button===2||d)&&l.preventDefault()}),onFocusOutside:pt(e.onFocusOutside,l=>l.preventDefault())})}),FE=g.forwardRef((e,t)=>{const n=pr(qo,e.__scopeDialog),o=g.useRef(!1),i=g.useRef(!1);return a.jsx(Fb,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:l=>{var c,d;(c=e.onCloseAutoFocus)==null||c.call(e,l),l.defaultPrevented||(o.current||(d=n.triggerRef.current)==null||d.focus(),l.preventDefault()),o.current=!1,i.current=!1},onInteractOutside:l=>{var p,m;(p=e.onInteractOutside)==null||p.call(e,l),l.defaultPrevented||(o.current=!0,l.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const c=l.target;((m=n.triggerRef.current)==null?void 0:m.contains(c))&&l.preventDefault(),l.detail.originalEvent.type==="focusin"&&i.current&&l.preventDefault()}})}),Fb=g.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:l,...c}=e,d=pr(qo,n),p=g.useRef(null),m=cn(t,p);return B2(),a.jsxs(a.Fragment,{children:[a.jsx(vb,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:i,onUnmountAutoFocus:l,children:a.jsx(Sp,{role:"dialog",id:d.contentId,"aria-describedby":d.descriptionId,"aria-labelledby":d.titleId,"data-state":Pp(d.open),...c,ref:m,onDismiss:()=>d.onOpenChange(!1)})}),a.jsxs(a.Fragment,{children:[a.jsx(BE,{titleId:d.titleId}),a.jsx(HE,{contentRef:p,descriptionId:d.descriptionId})]})]})}),Ep="DialogTitle",zb=g.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,i=pr(Ep,n);return a.jsx(Dt.h2,{id:i.titleId,...o,ref:t})});zb.displayName=Ep;var Bb="DialogDescription",Ub=g.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,i=pr(Bb,n);return a.jsx(Dt.p,{id:i.descriptionId,...o,ref:t})});Ub.displayName=Bb;var Hb="DialogClose",Wb=g.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,i=pr(Hb,n);return a.jsx(Dt.button,{type:"button",...o,ref:t,onClick:pt(e.onClick,()=>i.onOpenChange(!1))})});Wb.displayName=Hb;function Pp(e){return e?"open":"closed"}var Vb="DialogTitleWarning",[zE,qb]=a2(Vb,{contentName:qo,titleName:Ep,docsSlug:"dialog"}),BE=({titleId:e})=>{const t=qb(Vb),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
437
|
+
|
|
438
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
439
|
+
|
|
440
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return g.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},UE="DialogDescriptionWarning",HE=({contentRef:e,descriptionId:t})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${qb(UE).contentName}}.`;return g.useEffect(()=>{var l;const i=(l=e.current)==null?void 0:l.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(o))},[o,e,t]),null},Kb=Db,WE=Lb,Gb=_b,Tp=Mb,Rp=$b,Ap=zb,Dp=Ub,Yb=Wb;const Tc=Kb,VE=Gb,Xb=g.forwardRef(({className:e,...t},n)=>a.jsx(Tp,{ref:n,className:ze("fixed inset-0 z-50 bg-background/80 backdrop-blur-sm",e),...t}));Xb.displayName=Tp.displayName;const fa=g.forwardRef(({className:e,children:t,...n},o)=>a.jsxs(VE,{children:[a.jsx(Xb,{}),a.jsx(Rp,{ref:o,className:ze("fixed left-1/2 top-1/2 z-50 grid w-[calc(100%-2rem)] max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl border border-border/70 bg-card p-6 shadow-2xl outline-none",e),...n,children:t})]}));fa.displayName=Rp.displayName;function qE({className:e,...t}){return a.jsx("div",{className:ze("flex flex-col space-y-2 text-left",e),...t})}function KE({className:e,...t}){return a.jsx("div",{className:ze("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}const pa=g.forwardRef(({className:e,...t},n)=>a.jsx(Ap,{ref:n,className:ze("text-lg font-semibold tracking-tight text-foreground",e),...t}));pa.displayName=Ap.displayName;const Ip=g.forwardRef(({className:e,...t},n)=>a.jsx(Dp,{ref:n,className:ze("text-sm leading-6 text-muted-foreground",e),...t}));Ip.displayName=Dp.displayName;const GE=-1,YE=-40;function Jd(e,t){if(e.length===0)return 0;if(t.length===0)return-1/0;let n=0,o=0,i=-2,l=0;for(let c=0;c<e.length;c++){const d=e[c];let p=!1;for(;o<t.length;)if(t[o]===d){if(n+=100,o===i+1&&(n+=20),o===0)n+=30;else{const m=t[o-1];(m===" "||m==="-"||m==="_"||m==="/")&&(n+=15)}l>0&&(n+=Math.max(YE,l*GE)),i=o,l=0,o++,p=!0;break}else l++,o++;if(!p)return-1/0}return n}const Rx={page:0,project:1,assignment:2,playbook:3,server:4,todo:5};function Qb(e,t,n=50){const o=e.toLowerCase();if(!o)return t.slice(0,n).map(c=>({...c,score:0}));const l=t.map(c=>{var x;const d=Jd(o,c.title.toLowerCase())*1,p=c.subtitle?Jd(o,c.subtitle.toLowerCase())*.5:-1/0,m=(x=c.keywords)!=null&&x.length?Jd(o,c.keywords.join(" ").toLowerCase())*.3:-1/0,h=Math.max(d,p,m);return{...c,score:h}}).filter(c=>c.score>-1/0);return l.sort((c,d)=>d.score!==c.score?d.score-c.score:c.title.length!==d.title.length?c.title.length-d.title.length:c.title!==d.title?c.title<d.title?-1:1:(Rx[c.type]??99)-(Rx[d.type]??99)),l.slice(0,n)}const XE={page:"Page",project:"Project",assignment:"Assignment",playbook:"Playbook",server:"Server",todo:"Todo"};function QE({entries:e}){const{paletteOpen:t,closePalette:n}=Xo(),o=qt(),[i,l]=g.useState(""),[c,d]=g.useState(0),p=g.useRef(null),m=g.useMemo(()=>Qb(i,e,50),[i,e]);g.useEffect(()=>{d(0)},[i,t]),g.useEffect(()=>{t||l("")},[t]),g.useEffect(()=>{var b;const v=(b=p.current)==null?void 0:b.querySelector(`[data-palette-idx="${c}"]`);v==null||v.scrollIntoView({block:"nearest"})},[c]);function h(v){o(v.route),n()}function x(v){if(v.key==="ArrowDown")v.preventDefault(),d(b=>Math.min(m.length-1,b+1));else if(v.key==="ArrowUp")v.preventDefault(),d(b=>Math.max(0,b-1));else if(v.key==="Enter"){v.preventDefault();const b=m[c];b&&h(b)}}return a.jsx(Tc,{open:t,onOpenChange:v=>v?null:n(),children:a.jsxs(fa,{className:"max-w-xl p-0 gap-0",children:[a.jsx(pa,{className:"sr-only",children:"Command palette"}),a.jsx("input",{autoFocus:!0,type:"text",value:i,onChange:v=>l(v.target.value),onKeyDown:x,placeholder:"Search projects, assignments, playbooks, servers, todos…",className:"w-full rounded-t-xl border-0 border-b border-border/70 bg-transparent px-4 py-3 text-sm text-foreground outline-none focus:ring-0"}),a.jsx("div",{ref:p,className:"max-h-[60vh] overflow-y-auto p-1",children:m.length===0?a.jsx("div",{className:"px-4 py-6 text-center text-sm text-muted-foreground",children:i?"No matches":"Start typing to search"}):m.map((v,b)=>{const N=b===c;return a.jsxs("button",{type:"button","data-palette-idx":b,onClick:()=>h(v),onMouseEnter:()=>d(b),className:`flex w-full items-center gap-3 rounded-md px-3 py-2 text-left text-sm transition-colors ${N?"bg-accent text-accent-foreground":"hover:bg-accent/50 text-foreground"}`,children:[a.jsx("span",{className:"shrink-0 rounded border border-border/70 bg-background/60 px-1.5 py-0.5 text-[10px] font-medium uppercase tracking-wide text-muted-foreground",children:XE[v.type]??v.type}),a.jsx("span",{className:"min-w-0 flex-1 truncate",children:v.title}),v.subtitle?a.jsx("span",{className:"shrink-0 truncate text-xs text-muted-foreground",children:v.subtitle}):null]},v.id)})}),a.jsxs("div",{className:"flex items-center justify-between border-t border-border/70 px-3 py-2 text-[11px] text-muted-foreground",children:[a.jsxs("span",{children:["↑↓"," navigate ","·"," ","↵"," open ","·"," Esc close"]}),a.jsxs("span",{children:[m.length," result",m.length===1?"":"s"]})]})]})})}function JE({entries:e}){const{actionsPaletteOpen:t,closeActionsPalette:n}=Xo(),[o,i]=g.useState(""),[l,c]=g.useState(0),[d,p]=g.useState(null),[m,h]=g.useState(""),[x,v]=g.useState(!1),[b,N]=g.useState(null),k=g.useRef(null),j=g.useMemo(()=>e.map(L=>({type:L.group.toLowerCase(),title:L.title,subtitle:L.subtitle,keywords:L.keywords,action:L})),[e]),S=g.useMemo(()=>Qb(o,j,50),[o,j]);g.useEffect(()=>{c(0)},[o,t]),g.useEffect(()=>{t||(i(""),p(null),h(""),v(!1),N(null))},[t]),g.useEffect(()=>{var _;const L=(_=k.current)==null?void 0:_.querySelector(`[data-palette-idx="${l}"]`);L==null||L.scrollIntoView({block:"nearest"})},[l]);async function T(L){if(!x){if(L.requiresInput){p(L),h(""),N(null);return}if(L.run){v(!0),N(null);try{await L.run(),n()}catch(_){N(_ instanceof Error?_.message:"Action failed")}finally{v(!1)}}}}async function R(){if(x||!(d!=null&&d.requiresInput))return;const L=m.trim();if(L){v(!0),N(null);try{await d.requiresInput.runWithInput(L),n()}catch(_){N(_ instanceof Error?_.message:"Action failed")}finally{v(!1)}}}function D(L){if(L.key==="ArrowDown")L.preventDefault(),c(_=>Math.min(S.length-1,_+1));else if(L.key==="ArrowUp")L.preventDefault(),c(_=>Math.max(0,_-1));else if(L.key==="Enter"){L.preventDefault();const _=S[l];_&&T(_.action)}}function M(L){L.key==="Enter"?(L.preventDefault(),R()):L.key==="Escape"&&(L.preventDefault(),p(null),h(""))}const P=d!==null;return a.jsx(Tc,{open:t,onOpenChange:L=>L?null:n(),children:a.jsxs(fa,{className:"max-w-xl p-0 gap-0",onEscapeKeyDown:L=>{P&&!x&&(L.preventDefault(),p(null),h(""),N(null))},children:[a.jsx(pa,{className:"sr-only",children:"Actions palette"}),P?a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"flex items-center gap-2 border-b border-border/70 px-4 py-3",children:[a.jsx("span",{className:"shrink-0 rounded border border-border/70 bg-background/60 px-1.5 py-0.5 text-[10px] font-medium uppercase tracking-wide text-muted-foreground",children:d.group}),a.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-foreground",children:d.title})]}),a.jsx("input",{autoFocus:!0,type:"text",value:m,onChange:L=>h(L.target.value),onKeyDown:M,placeholder:d.requiresInput.placeholder,disabled:x,className:"w-full border-0 border-b border-border/70 bg-transparent px-4 py-3 text-sm text-foreground outline-none focus:ring-0 disabled:opacity-60"}),b?a.jsx("div",{className:"border-b border-border/70 bg-destructive/10 px-4 py-2 text-xs text-destructive",children:b}):null,a.jsxs("div",{className:"flex items-center justify-between border-t border-border/70 px-3 py-2 text-[11px] text-muted-foreground",children:[a.jsxs("span",{children:["↵"," submit ","·"," Esc back"]}),a.jsx("span",{children:x?"Running…":""})]})]}):a.jsxs(a.Fragment,{children:[a.jsx("input",{autoFocus:!0,type:"text",value:o,onChange:L=>i(L.target.value),onKeyDown:D,placeholder:"Run an action: new project, new todo, toggle…",disabled:x,className:"w-full rounded-t-xl border-0 border-b border-border/70 bg-transparent px-4 py-3 text-sm text-foreground outline-none focus:ring-0 disabled:opacity-60"}),b?a.jsx("div",{className:"border-b border-border/70 bg-destructive/10 px-4 py-2 text-xs text-destructive",children:b}):null,a.jsx("div",{ref:k,className:"max-h-[60vh] overflow-y-auto p-1",children:S.length===0?a.jsx("div",{className:"px-4 py-6 text-center text-sm text-muted-foreground",children:o?"No matches":"Start typing to search actions"}):S.map((L,_)=>{const J=_===l;return a.jsxs("button",{type:"button","data-palette-idx":_,onClick:()=>T(L.action),onMouseEnter:()=>c(_),disabled:x,className:`flex w-full items-center gap-3 rounded-md px-3 py-2 text-left text-sm transition-colors disabled:opacity-60 ${J?"bg-accent text-accent-foreground":"hover:bg-accent/50 text-foreground"}`,children:[a.jsx("span",{className:"shrink-0 rounded border border-border/70 bg-background/60 px-1.5 py-0.5 text-[10px] font-medium uppercase tracking-wide text-muted-foreground",children:L.action.group}),a.jsx("span",{className:"min-w-0 flex-1 truncate",children:L.action.title}),L.action.subtitle?a.jsx("span",{className:"shrink-0 truncate text-xs text-muted-foreground",children:L.action.subtitle}):null]},L.action.id)})}),a.jsxs("div",{className:"flex items-center justify-between border-t border-border/70 px-3 py-2 text-[11px] text-muted-foreground",children:[a.jsxs("span",{children:["↑↓"," navigate ","·"," ","↵"," run ","·"," Esc close"]}),a.jsx("span",{children:x?"Running…":`${S.length} action${S.length===1?"":"s"}`})]})]})]})})}const ZE={global:"Global","list:projects":"Projects list","list:assignments":"Assignments list","list:todos":"Todos list",assignment:"Assignment detail",project:"Project detail"},eP=["global","list:projects","list:assignments","list:todos","project","assignment"];function tP(e){if(e.includes(" ")){const[t,n]=e.split(" ");return`${Rs(t)} then ${Rs(n)}`}return Rs(e)}function nP(){const{cheatsheetOpen:e,closeCheatsheet:t,listBindings:n}=Xo(),o=g.useMemo(()=>{if(!e)return new Map;const i=n(),l=new Map;for(const c of i){const d=l.get(c.scope)??[];d.push({keys:c.keys,description:c.description}),l.set(c.scope,d)}return l},[e,n]);return a.jsx(Tc,{open:e,onOpenChange:i=>i?null:t(),children:a.jsxs(fa,{className:"max-w-2xl",children:[a.jsx(pa,{children:"Keyboard shortcuts"}),a.jsxs(Ip,{children:["Press Esc to close. ",Rs("Mod+k")," opens the command palette. Press g twice to restart the chord timer."]}),a.jsx("div",{className:"mt-2 max-h-[60vh] space-y-4 overflow-y-auto pr-1",children:eP.map(i=>{const l=o.get(i);return!l||l.length===0?null:a.jsxs("section",{children:[a.jsx("h3",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:ZE[i]}),a.jsx("ul",{className:"space-y-1",children:l.map((c,d)=>a.jsxs("li",{className:"flex items-center justify-between gap-3 rounded-md border border-border/40 bg-background/60 px-3 py-1.5 text-sm",children:[a.jsx("span",{className:"text-foreground",children:c.description}),a.jsx("kbd",{className:"shrink-0 rounded border border-border/70 bg-muted px-2 py-0.5 font-mono text-xs text-muted-foreground",children:tP(c.keys)})]},`${i}-${c.keys}-${d}`))})]},i)})})]})})}const Ax=1500;function rP(e){const t=e.match(/^\/w\/([^/]+)(?:\/|$)/);return t?`/w/${t[1]}`:""}const Jb=g.createContext(null);function oP({children:e}){const{toggleTheme:t}=bp(),n=pn(),o=qt(),i=rP(n.pathname),l=Sc(),c=ib(),d=ub(),p=kp(),m=jp(),h=g.useMemo(()=>{var xe,Je,Ke,Me;const se=l.data??[],me=((xe=c.data)==null?void 0:xe.assignments)??[],fe=((Je=d.data)==null?void 0:Je.playbooks)??[],Pe=((Ke=p.data)==null?void 0:Ke.sessions)??[],pe=(((Me=m.data)==null?void 0:Me.workspaces)??[]).flatMap(_e=>_e.items.map(ct=>({...ct,workspace:_e.workspace})));return o2({projects:se,assignments:me,playbooks:fe,servers:Pe,todos:pe,wsPrefix:i})},[l.data,c.data,d.data,p.data,m.data,i]),v=g.useMemo(()=>Xv(n.pathname),[n.pathname]).projectSlug,b=g.useMemo(()=>{var se;return v?((se=l.data)==null?void 0:se.find(me=>me.slug===v))??null:null},[l.data,v]),N=(b==null?void 0:b.title)??null,k=(b==null?void 0:b.workspace)??null,j=g.useMemo(()=>{var se;return i2({playbooks:((se=d.data)==null?void 0:se.playbooks)??[],projectSlug:v,currentProjectTitle:N,currentProjectWorkspace:k,wsPrefix:i,refetchPlaybooks:d.refetch,navigate:o,toggleTheme:t})},[d.data,d.refetch,v,N,k,i,o,t]),S=g.useRef(new Map),T=g.useRef(["global"]),R=g.useRef({phase:"idle"}),D=g.useRef(null),M=g.useRef(1),[P,L]=g.useState(!1),[_,J]=g.useState(!1),[ne,U]=g.useState(!1),G=g.useCallback(se=>{const me=M.current++;return S.current.set(me,{...se,id:me}),me},[]),q=g.useCallback(se=>{S.current.delete(se)},[]),ee=g.useCallback(se=>{T.current.push(se)},[]),$=g.useCallback(se=>{const me=T.current;for(let fe=me.length-1;fe>=0;fe--)if(me[fe]===se){me.splice(fe,1);return}},[]),I=g.useCallback(()=>L(!0),[]),A=g.useCallback(()=>L(!1),[]),F=g.useCallback(()=>J(!0),[]),K=g.useCallback(()=>J(!1),[]),E=g.useCallback(()=>U(!0),[]),B=g.useCallback(()=>U(!1),[]),X=g.useCallback(()=>Array.from(S.current.values()),[]);g.useEffect(()=>{R.current={phase:"idle"},D.current!==null&&(window.clearTimeout(D.current),D.current=null)},[n.pathname]),g.useEffect(()=>{function se(pe){if(!(pe instanceof HTMLElement))return!1;const xe=pe.tagName;return!!(xe==="INPUT"||xe==="TEXTAREA"||xe==="SELECT"||pe.isContentEditable||pe.closest('[role="combobox"], [role="textbox"]'))}function me(){return!!(document.querySelector('[role="dialog"][data-state="open"]')||document.querySelector('[role="alertdialog"][data-state="open"]'))}function fe(){const pe=T.current;return pe[pe.length-1]??"global"}function Pe(pe){return pe.scope==="global"?!0:pe.scope===fe()}function Ce(pe){const xe=Al(pe,"Mod+k"),Je=Al(pe,"Mod+Shift+k"),Ke=pe.key==="Escape",Me=xe||Je||Ke;if(me()&&!Me||se(pe.target)&&!Me)return;const _e=R.current;if(_e.phase==="awaiting-second")if(Date.now()-_e.startedAt>Ax)R.current={phase:"idle"},D.current!==null&&(window.clearTimeout(D.current),D.current=null);else{const mt=Array.from(S.current.values());for(const Pt of mt){if(!Pe(Pt))continue;const Ge=Pt.keys.split(" ");if(!(Ge.length!==2||Ge[0]!=="g")&&Al(pe,Ge[1])&&!(Pt.when&&!Pt.when())){pe.preventDefault(),R.current={phase:"idle"},D.current!==null&&(window.clearTimeout(D.current),D.current=null),Pt.handler(pe);return}}R.current={phase:"idle"},D.current!==null&&(window.clearTimeout(D.current),D.current=null)}const ct=Array.from(S.current.values());for(const et of ct){if(!Pe(et))continue;const mt=et.keys.split(" ");if(mt.length===1&&Al(pe,mt[0])&&!(et.when&&!et.when())){pe.preventDefault(),et.handler(pe);return}}pe.key==="g"&&!pe.metaKey&&!pe.ctrlKey&&!pe.altKey&&!pe.shiftKey&&Array.from(S.current.values()).some(mt=>Pe(mt)&&mt.keys.startsWith("g "))&&(pe.preventDefault(),R.current={phase:"awaiting-second",startedAt:Date.now()},D.current!==null&&window.clearTimeout(D.current),D.current=window.setTimeout(()=>{R.current={phase:"idle"},D.current=null},Ax))}return window.addEventListener("keydown",Ce),()=>{window.removeEventListener("keydown",Ce),D.current!==null&&(window.clearTimeout(D.current),D.current=null)}},[]),g.useEffect(()=>{const se=G({keys:"Shift+t",handler:()=>t(),scope:"global",description:"Toggle light/dark theme"});return()=>q(se)},[G,q,t]),g.useEffect(()=>{const se=G({keys:"?",scope:"global",description:"Show keyboard shortcuts",handler:()=>F()});return()=>q(se)},[G,q,F]),g.useEffect(()=>{const se=G({keys:"Mod+k",scope:"global",description:"Open command palette",handler:()=>{if(P){A();return}document.querySelector('[role="dialog"][data-state="open"], [role="alertdialog"][data-state="open"]')||I()}});return()=>q(se)},[G,q,I,A,P]),g.useEffect(()=>{const se=G({keys:"Mod+Shift+k",scope:"global",description:"Open actions palette",handler:()=>{if(ne){B();return}document.querySelector('[role="dialog"][data-state="open"], [role="alertdialog"][data-state="open"]')||E()}});return()=>q(se)},[G,q,E,B,ne]),g.useEffect(()=>{const me=[{suffix:"o",basePath:"/",desc:"Go to Overview"},{suffix:"m",basePath:"/projects",desc:"Go to Projects"},{suffix:"a",basePath:"/assignments",desc:"Go to Assignments"},{suffix:"t",basePath:"/todos",desc:"Go to Todos"},{suffix:"s",basePath:"/servers",desc:"Go to Servers"},{suffix:"!",basePath:"/attention",desc:"Go to Attention"},{suffix:",",basePath:"/settings",desc:"Go to Settings"}].map(fe=>G({keys:`g ${fe.suffix}`,scope:"global",description:fe.desc,handler:()=>o(Gl(fe.basePath,i))}));return()=>me.forEach(q)},[G,q,o,i]);const O=g.useMemo(()=>({register:G,unregister:q,pushScope:ee,popScope:$,openPalette:I,closePalette:A,paletteOpen:P,openCheatsheet:F,closeCheatsheet:K,cheatsheetOpen:_,openActionsPalette:E,closeActionsPalette:B,actionsPaletteOpen:ne,listBindings:X,wsPrefix:i,paletteEntries:h,actionEntries:j}),[G,q,ee,$,I,A,P,F,K,_,E,B,ne,X,i,h,j]);return a.jsxs(Jb.Provider,{value:O,children:[e,a.jsx(QE,{entries:h}),a.jsx(JE,{entries:j}),a.jsx(nP,{})]})}function Xo(){const e=g.useContext(Jb);if(!e)throw new Error("useHotkeyContext must be used within HotkeyProvider");return e}function ft({keys:e,handler:t,scope:n="global",description:o,when:i,enabled:l=!0}){const{register:c,unregister:d}=Xo(),p=g.useRef(t),m=g.useRef(i);g.useEffect(()=>{p.current=t,m.current=i},[t,i]),g.useEffect(()=>{if(!l)return;const h=c({keys:e,handler:x=>p.current(x),scope:n,description:o,when:m.current?()=>m.current():void 0});return()=>d(h)},[c,d,e,n,o,l])}function Qo(e){const{pushScope:t,popScope:n}=Xo();g.useEffect(()=>(t(e),()=>n(e)),[t,n,e])}function ha(e,t){const[n,o]=g.useState(e.length===0?-1:0),i=pn();g.useEffect(()=>{o(e.length===0?-1:0)},[i.pathname]),g.useEffect(()=>{o(c=>e.length===0?-1:Math.min(Math.max(0,c),e.length-1))},[e.length]),g.useEffect(()=>{if(document.querySelectorAll("[data-hotkey-row-index]").forEach(d=>{const p=Number(d.getAttribute("data-hotkey-row-index"));d.setAttribute("data-hotkey-selected",p===n?"true":"false")}),n>=0){const d=document.querySelector(`[data-hotkey-row-index="${n}"]`);d==null||d.scrollIntoView({block:"nearest"})}},[n,e.length]),ft({keys:"j",scope:t.scope,description:"Select next row",handler:()=>o(c=>e.length===0?-1:Math.min(e.length-1,c<0?0:c+1))}),ft({keys:"k",scope:t.scope,description:"Select previous row",handler:()=>o(c=>e.length===0?-1:Math.max(0,c<0?0:c-1))}),ft({keys:"Enter",scope:t.scope,description:"Open selected row",handler:()=>{n>=0&&n<e.length&&t.onOpen(e[n],n)}}),ft({keys:"o",scope:t.scope,description:"Open selected row",enabled:t.bindO??!0,handler:()=>{n>=0&&n<e.length&&t.onOpen(e[n],n)}});const l=g.useCallback(c=>({"data-hotkey-row-index":c,"data-hotkey-selected":c===n?"true":"false"}),[n]);return{selectedIndex:n,hotkeyRowProps:l}}function sP({title:e,breadcrumbs:t,projectSlug:n,onOpenMobileNav:o}){const i=At(),{resolvedTheme:l,toggleTheme:c}=bp(),{openPalette:d}=Xo();return a.jsx("header",{className:"sticky top-0 z-30 border-b border-border/70 bg-background/85 backdrop-blur",children:a.jsxs("div",{className:"flex flex-wrap items-center gap-2 px-4 py-2.5 lg:px-6",children:[a.jsx("button",{type:"button",onClick:o,className:"inline-flex h-8 w-8 items-center justify-center rounded-md border border-border/70 bg-card/80 text-foreground lg:hidden","aria-label":"Open navigation",children:a.jsx(HC,{className:"h-4 w-4"})}),a.jsx("div",{className:"min-w-0 flex-1",children:a.jsxs("div",{className:"flex items-center gap-2",children:[t.length>1?a.jsxs("nav",{className:"flex items-center gap-1.5 text-xs font-medium uppercase tracking-[0.1em] text-muted-foreground",children:[t.slice(0,-1).map((p,m)=>a.jsxs("span",{className:"flex items-center gap-1.5",children:[m>0?a.jsx("span",{children:"/"}):null,a.jsx(Ee,{to:p.path,className:"hover:text-foreground",children:p.label})]},p.path)),a.jsx("span",{children:"/"})]}):null,a.jsx("h1",{className:"truncate text-base font-semibold text-foreground",children:e})]})}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsxs("button",{type:"button",onClick:d,className:"shell-action","aria-label":"Open command palette",children:[a.jsx(Hs,{className:"h-4 w-4"}),a.jsx("span",{className:"hidden sm:inline font-mono text-xs",children:Rs("Mod+k")})]}),a.jsx(Ee,{className:"shell-action",to:"/help",children:"Help"}),a.jsxs(Ee,{className:"shell-action",to:`${i}/create/project`,children:[a.jsx(Bn,{className:"h-4 w-4"}),a.jsx("span",{children:"New Project"})]}),n?a.jsxs(Ee,{className:"shell-action",to:`${i}/projects/${n}/create/assignment`,children:[a.jsx(Bn,{className:"h-4 w-4"}),a.jsx("span",{children:"New Assignment"})]}):null,a.jsxs("button",{type:"button",onClick:c,className:"shell-action","aria-label":"Toggle theme",children:[l==="dark"?a.jsx(ZC,{className:"h-4 w-4"}):a.jsx(WC,{className:"h-4 w-4"}),a.jsx("span",{children:l==="dark"?"Light":"Dark"})]})]})]})})}const iP=[{to:"/",label:"Overview",icon:RC},{to:"/attention",label:"Attention",icon:Ws},{to:"/playbooks",label:"Playbooks",icon:Av},{to:"/todos",label:"Todos",icon:Fn}],aP=[{suffix:"/projects",label:"Projects",icon:mp},{suffix:"/assignments",label:"Assignments",icon:UC},{suffix:"/servers",label:"Servers",icon:gp},{suffix:"/agent-sessions",label:"Agent Sessions",icon:wc},{suffix:"/todos",label:"Todos",icon:Fn}],lP=[{to:"/help",label:"Help",icon:zC},{to:"/settings",label:"Settings",icon:QC}],Dx="syntaur.dashboard.sourceFirstNoticeDismissed";function cP({title:e,breadcrumbs:t,projectSlug:n,workspace:o,children:i}){const[l,c]=g.useState(!1);ft({keys:"Escape",scope:"global",description:"Close mobile navigation",enabled:l,handler:()=>c(!1)});const[d,p]=g.useState(()=>{if(typeof window>"u")return!1;try{return window.localStorage.getItem(Dx)==="1"}catch{return!1}});function m(){if(p(!0),!(typeof window>"u"))try{window.localStorage.setItem(Dx,"1")}catch{}}return a.jsx("div",{className:"min-h-screen bg-background",children:a.jsxs("div",{className:"relative grid min-h-screen lg:grid-cols-[240px_minmax(0,1fr)]",children:[a.jsx("aside",{className:"hidden max-h-screen sticky top-0 overflow-y-auto border-r border-border/70 bg-sidebar/90 px-4 py-4 backdrop-blur lg:flex lg:flex-col",children:a.jsx(Ix,{sourceNoticeDismissed:d,onDismissSourceNotice:m,activeWorkspace:o})}),l?a.jsx("div",{className:"fixed inset-0 z-40 bg-overlay/40 lg:hidden",children:a.jsxs("div",{className:"h-full max-w-xs border-r border-border/70 bg-sidebar p-4 shadow-2xl",children:[a.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[a.jsx(Ee,{to:"/",className:"text-lg font-semibold text-foreground",onClick:()=>c(!1),children:"Syntaur"}),a.jsx("button",{type:"button",onClick:()=>c(!1),className:"inline-flex h-9 w-9 items-center justify-center rounded-md border border-border/70 bg-background/80",children:a.jsx(Bv,{className:"h-4 w-4"})})]}),a.jsx(Ix,{sourceNoticeDismissed:d,onDismissSourceNotice:m,activeWorkspace:o,onNavigate:()=>c(!1)})]})}):null,a.jsxs("div",{className:"min-w-0",children:[a.jsx(sP,{title:e,breadcrumbs:t,projectSlug:n,onOpenMobileNav:()=>c(!0)}),a.jsx("main",{className:"mx-auto w-full max-w-[1480px] px-4 py-4 lg:px-6 lg:py-5",children:i})]})]})})}function Ix({sourceNoticeDismissed:e,onDismissSourceNotice:t,activeWorkspace:n,onNavigate:o}){const{data:i}=wp(),l=(i==null?void 0:i.workspaces)??[],c=(i==null?void 0:i.hasUngrouped)??!1,d=pn(),[p,m]=g.useState(new Set),[h,x]=g.useState(!1),[v,b]=g.useState(""),N=qt();function k(S){m(T=>{const R=new Set(T);return R.has(S)?R.delete(S):R.add(S),R})}const j=[...l,...c?["_ungrouped"]:[]];return a.jsxs("div",{className:"flex h-full flex-col gap-3",children:[a.jsx("div",{className:"space-y-3",children:a.jsxs(Ee,{to:"/",className:"inline-flex items-center gap-3",onClick:o,children:[a.jsx("span",{className:"inline-flex h-8 w-8 items-center justify-center rounded-lg bg-card text-background shadow-sm ring-1 ring-border/60",children:a.jsx("img",{src:"/syntaur-logo.svg",alt:"Syntaur",width:20,height:20,className:"h-5 w-5"})}),a.jsxs("div",{children:[a.jsx("p",{className:"text-sm font-semibold text-foreground",children:"Syntaur"}),a.jsx("p",{className:"text-xs text-muted-foreground/60",children:"Local-first project control"})]})]})}),a.jsx(gx,{items:iP,onNavigate:o}),a.jsx("div",{className:"border-t border-border/40"}),a.jsxs("div",{className:"flex-1 space-y-1 overflow-y-auto",children:[j.length===0&&!h&&a.jsx("p",{className:"px-3 py-2 text-xs text-muted-foreground/60",children:"No workspaces yet"}),j.map(S=>{const T=S==="_ungrouped",R=T?"Ungrouped":Cn(S),D=T?"/w/_ungrouped":`/w/${S}`,M=p.has(S),P=n===S||n===null&&T&&d.pathname.startsWith("/w/_ungrouped");return a.jsxs("div",{children:[a.jsxs("button",{type:"button",onClick:()=>k(S),className:`flex w-full items-center gap-2 rounded-md px-3 py-1.5 text-xs font-semibold uppercase tracking-wider transition ${P?"text-foreground":"text-muted-foreground/70 hover:text-muted-foreground"}`,children:[a.jsx(na,{className:`h-3 w-3 transition-transform ${M?"-rotate-90":""}`}),R]}),!M&&a.jsx("nav",{className:"ml-2 space-y-0.5",children:aP.map(L=>{const _=`${D}${L.suffix}`,J=Yv(d.pathname,L.suffix)&&d.pathname.startsWith(D),ne=L.icon;return a.jsxs(Ee,{to:_,onClick:o,className:`flex items-center gap-3 rounded-md px-3 py-1.5 text-sm font-medium transition ${J?"bg-foreground text-background shadow-sm":"text-muted-foreground hover:bg-background/80 hover:text-foreground"}`,children:[a.jsx(ne,{className:"h-4 w-4"}),a.jsx("span",{children:L.label})]},_)})})]},S)}),h?a.jsx("form",{className:"px-3 py-1.5",onSubmit:S=>{S.preventDefault();const T=v.trim().toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"");T&&(x(!1),b(""),fetch("/api/workspaces",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:T})}).then(()=>{o==null||o(),N(`/w/${T}/projects`)}))},children:a.jsx("input",{autoFocus:!0,type:"text",value:v,onChange:S=>b(S.target.value),onKeyDown:S=>{S.key==="Escape"&&(x(!1),b(""))},onBlur:()=>{v.trim()||(x(!1),b(""))},placeholder:"workspace-name",className:"w-full rounded-md border border-border/60 bg-background/80 px-2 py-1 text-xs text-foreground placeholder:text-muted-foreground/50 focus:border-foreground/40 focus:outline-none"})}):a.jsxs("button",{type:"button",onClick:()=>x(!0),className:"flex w-full items-center gap-2 rounded-md px-3 py-1.5 text-xs font-medium text-muted-foreground/60 transition hover:text-muted-foreground",children:[a.jsx(Bn,{className:"h-3 w-3"}),"New Workspace"]})]}),a.jsx("div",{className:"border-t border-border/40"}),a.jsx(gx,{items:lP,onNavigate:o}),e?null:a.jsx("div",{className:"rounded-lg border border-border/60 bg-background/80 p-3",children:a.jsxs("div",{className:"flex items-start justify-between gap-3",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-sm font-semibold text-foreground",children:"Source-first dashboard"}),a.jsx("p",{className:"mt-2 text-sm leading-6 text-muted-foreground",children:"Project and assignment markdown files stay authoritative. Derived files are read-only projections."})]}),a.jsx("button",{type:"button",onClick:t,className:"inline-flex h-7 w-7 items-center justify-center rounded-md border border-border/70 bg-background/80 text-muted-foreground transition hover:text-foreground","aria-label":"Dismiss source-first dashboard notice",children:a.jsx(Bv,{className:"h-4 w-4"})})]})})]})}function uP(){const e=pn(),{workspace:t}=Et(),{title:n,breadcrumbs:o,projectSlug:i}=Xv(e.pathname);return a.jsx(cP,{title:n,breadcrumbs:o,projectSlug:i,workspace:t??null,children:a.jsx(_S,{})})}const $f="border-status-pending-foreground/30 bg-status-pending text-status-pending-foreground",Lx="border-status-in-progress-foreground/30 bg-status-in-progress text-status-in-progress-foreground",dP="border-status-blocked-foreground/30 bg-status-blocked text-status-blocked-foreground",fP="border-status-review-foreground/30 bg-status-review text-status-review-foreground",pP="border-status-completed-foreground/30 bg-status-completed text-status-completed-foreground",hP="border-status-failed-foreground/30 bg-status-failed text-status-failed-foreground",mP="border-status-archived-foreground/30 bg-status-archived text-status-archived-foreground",sc={pending:{label:"Pending",description:"Waiting to start or waiting on dependencies.",className:$f,icon:PC},in_progress:{label:"In Progress",description:"Actively being worked on.",className:Lx,icon:Mv},blocked:{label:"Blocked",description:"Blocked by an explicit obstacle that needs intervention.",className:dP,icon:Af},review:{label:"Review",description:"Ready for inspection or approval.",className:fP,icon:GC},completed:{label:"Completed",description:"Finished successfully.",className:pP,icon:hp},failed:{label:"Failed",description:"Could not be completed as planned.",className:hP,icon:Af},active:{label:"Active",description:"The project has active or review work in flight.",className:Lx,icon:Df},stopped:{label:"Stopped",description:"Session ended without completing.",className:$f,icon:CC},archived:{label:"Archived",description:"Archived by a human override.",className:mP,icon:Df}};function Vt({status:e,className:t,showIcon:n=!0,progress:o}){const i=sc[e]??{label:e.replace(/_/g," ").replace(/\b\w/g,h=>h.toUpperCase()),description:`Status: ${e}`,className:$f,icon:Df},l=i.icon,c=o&&o.total>0,d=c?Math.min(1,Math.max(0,o.checked/o.total)):0,p=c?`${i.description} (${o.checked}/${o.total} criteria)`:i.description,m=n?c?a.jsxs("span",{className:"relative inline-flex h-3.5 w-3.5 items-center justify-center",children:[a.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 16 16",className:"absolute inset-0 h-full w-full -rotate-90",children:[a.jsx("circle",{cx:"8",cy:"8",r:"7",fill:"none",stroke:"currentColor",strokeOpacity:"0.25",strokeWidth:"1.5"}),a.jsx("circle",{cx:"8",cy:"8",r:"7",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeDasharray:2*Math.PI*7,strokeDashoffset:2*Math.PI*7*(1-d)})]}),a.jsx(l,{className:"h-2.5 w-2.5"})]}):a.jsx(l,{className:"h-3.5 w-3.5"}):null;return a.jsxs("span",{title:p,className:ze("inline-flex items-center gap-1.5 whitespace-nowrap rounded-full border px-2 py-0.5 text-xs font-semibold tracking-wide",i.className,t),children:[m,a.jsx("span",{children:i.label})]})}function Zb(e){var t;return((t=sc[e])==null?void 0:t.description)??`Status: ${e}`}const gP={default:"border-border/70 bg-card/90",info:"border-primary/30 bg-primary/5 dark:border-primary/40 dark:bg-primary/10",warn:"border-warning-foreground/30 bg-warning",danger:"border-error-foreground/30 bg-error",success:"border-success-foreground/30 bg-success"};function Xe({label:e,value:t,description:n,icon:o,tone:i="default",to:l}){const c=a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"flex items-start justify-between gap-4",children:[a.jsxs("div",{className:"space-y-1",children:[a.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.1em] text-muted-foreground",children:e}),a.jsx("p",{className:"text-2xl font-semibold text-foreground",children:t})]}),o?a.jsx("span",{className:"rounded-md border border-border/60 bg-background/80 p-1.5 text-muted-foreground",children:a.jsx(o,{className:"h-5 w-5"})}):null]}),n?a.jsx("p",{className:"mt-2 text-sm leading-5 text-muted-foreground",children:n}):null]}),d=ze("rounded-lg border p-3 shadow-sm",gP[i],l?"block transition hover:-translate-y-0.5 hover:shadow-md focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40":"");return l?a.jsx(Ee,{to:l,className:d,children:c}):a.jsx("article",{className:d,children:c})}function Te({title:e,description:t,children:n,className:o,actions:i}){return a.jsxs("section",{className:ze("surface-panel space-y-3",o),children:[e||i?a.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[a.jsxs("div",{className:"space-y-1",children:[e?a.jsx("h2",{className:"text-lg font-semibold text-foreground",children:e}):null,t?a.jsx("p",{className:"text-sm text-muted-foreground",children:t}):null]}),i]}):null,n]})}function wt({label:e="Loading dashboard data…"}){return a.jsx("div",{className:"flex min-h-[240px] items-center justify-center",children:a.jsx("div",{className:"rounded-lg border border-border/70 bg-card/90 px-4 py-3 shadow-sm",children:a.jsx("p",{className:"text-sm text-muted-foreground",children:e})})})}function ht({title:e="Something went wrong",error:t,action:n}){return a.jsx("div",{className:"rounded-lg border border-error-foreground/30 bg-error px-4 py-5",children:a.jsxs("div",{className:"space-y-2",children:[a.jsx("h3",{className:"text-lg font-semibold text-error-foreground",children:e}),a.jsx("p",{className:"text-sm leading-6 text-error-foreground/90",children:t}),n?a.jsx("div",{className:"pt-2",children:n}):null]})})}function Qe({title:e,description:t,actions:n}){return a.jsx("div",{className:"rounded-lg border border-dashed border-border/80 bg-muted/30 px-4 py-6 text-center",children:a.jsxs("div",{className:"mx-auto max-w-xl space-y-2",children:[a.jsx("h3",{className:"text-base font-semibold text-foreground",children:e}),a.jsx("p",{className:"text-sm leading-6 text-muted-foreground",children:t}),n?a.jsx("div",{className:"flex flex-wrap justify-center gap-3 pt-2",children:n}):null]})})}function Ql({command:e,description:t,example:n}){return a.jsxs("div",{className:"rounded-lg border border-border/70 bg-code px-3 py-3 text-code-foreground shadow-sm",children:[a.jsx("code",{className:"block overflow-x-auto font-mono text-sm",children:e}),t?a.jsx("p",{className:"mt-2 text-sm text-code-foreground/80",children:t}):null,n?a.jsx("p",{className:"mt-2 font-mono text-xs text-code-foreground/60",children:n}):null]})}function xP({help:e,compact:t=!1}){const n=t?(e==null?void 0:e.firstProjectChecklist.slice(0,3))??[]:(e==null?void 0:e.firstProjectChecklist)??[];return a.jsx(Te,{title:t?"Getting Started Refresher":"Getting Started",description:t?"A fast reminder of the real flow for creating and running work in Syntaur.":"A first-run checklist that maps to the current CLI and dashboard flow.",actions:a.jsx(Ee,{className:"text-sm font-semibold text-primary hover:underline",to:"/help",children:"Open full help"}),children:a.jsx("div",{className:"space-y-3",children:n.map((o,i)=>a.jsx("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:a.jsxs("div",{className:"flex items-start gap-3",children:[a.jsx("span",{className:"inline-flex h-5 w-5 items-center justify-center rounded-full bg-foreground text-xs font-semibold text-background",children:i+1}),a.jsxs("div",{className:"space-y-1.5",children:[a.jsx("h3",{className:"font-semibold text-foreground",children:o.title}),a.jsx("p",{className:"text-sm leading-6 text-muted-foreground",children:o.detail}),o.command?a.jsx(Ql,{command:o.command.command,example:o.command.example}):null]})]})},o.title))})})}function yP(){var c;const{data:e,loading:t,error:n}=qN(),{data:o}=ab(),{data:i}=jp(),l=i!=null&&i.workspaces?i.workspaces.reduce((d,p)=>d+p.counts.open+p.counts.in_progress,0):0;return t?a.jsx(wt,{label:"Loading overview…"}):n||!e?a.jsx(ht,{error:n||"Overview data is unavailable."}):a.jsxs("div",{className:"space-y-5",children:[a.jsxs("div",{className:"grid gap-3 grid-cols-[repeat(auto-fill,minmax(160px,1fr))]",children:[a.jsx(Xe,{label:"Active Projects",value:e.stats.activeProjects,icon:mp,to:"/projects"}),a.jsx(Xe,{label:"In Progress",value:e.stats.inProgressAssignments,icon:MC,tone:"info",to:"/assignments?status=in_progress"}),a.jsx(Xe,{label:"Blocked",value:e.stats.blockedAssignments,icon:Ws,tone:"warn",to:"/assignments?status=blocked"}),a.jsx(Xe,{label:"Review",value:e.stats.reviewAssignments,icon:EC,tone:"info",to:"/assignments?status=review"}),a.jsx(Xe,{label:"Failed",value:e.stats.failedAssignments,icon:VC,tone:"danger",to:"/assignments?status=failed"}),a.jsx(Xe,{label:"Stale",value:e.stats.staleAssignments,icon:wc,to:"/assignments?stale=1"}),a.jsx(Xe,{label:"Open Todos",value:l,icon:Fn,to:"/todos"}),a.jsx(Xe,{label:"Active Servers",value:e.serverStats?e.serverStats.aliveSessions:"…",description:e.serverStats?`${e.serverStats.totalPorts} ports · ${e.serverStats.deadSessions>0?`${e.serverStats.deadSessions} dead`:"all healthy"}`:"connecting",icon:gp,tone:(c=e.serverStats)!=null&&c.deadSessions?"warn":"default",to:"/servers"})]}),a.jsxs("div",{className:"grid gap-4 xl:grid-cols-[minmax(0,1.1fr)_minmax(360px,0.9fr)]",children:[a.jsxs("div",{className:"space-y-4",children:[a.jsx(Te,{title:"Needs Attention Now",description:"Blocked, failed, review, and stale work from the source files.",children:e.attention.length===0?a.jsx(Qe,{title:"Nothing urgent right now",description:"The attention queue is empty. Overview will surface blocked, failed, review, and stale assignments here."}):a.jsx("div",{className:"space-y-3",children:e.attention.map(d=>a.jsxs(Ee,{to:d.href,className:"block rounded-md border border-border/60 bg-background/80 p-3 transition hover:border-primary/40 hover:bg-background",children:[a.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[a.jsxs("div",{className:"space-y-1",children:[a.jsx("p",{className:"text-sm font-semibold text-foreground",children:d.assignmentTitle}),a.jsx("p",{className:"text-sm text-muted-foreground",children:d.projectTitle})]}),a.jsx(Vt,{status:d.status})]}),a.jsx("p",{className:"mt-3 text-sm leading-6 text-muted-foreground",children:d.reason}),a.jsxs("p",{className:"mt-2 text-xs font-medium uppercase tracking-[0.1em] text-muted-foreground",children:["Updated ",Cr(d.updated)]})]},d.id))})}),a.jsxs("div",{className:"grid gap-4 lg:grid-cols-2",children:[a.jsx(Te,{title:"Recently Updated Projects",children:e.recentProjects.length===0?a.jsx(Qe,{title:"No projects yet",description:"Create your first project to populate the project directory, recent activity, and attention queue.",actions:a.jsx(Ee,{className:"shell-action bg-foreground text-background hover:opacity-90",to:"/create/project",children:"Create Project"})}):a.jsx("div",{className:"space-y-3",children:e.recentProjects.map(d=>a.jsx(Ee,{to:`/projects/${d.slug}`,className:"block rounded-md border border-border/60 bg-background/80 p-3 transition hover:border-primary/40",children:a.jsxs("div",{className:"flex items-start justify-between gap-3",children:[a.jsxs("div",{children:[a.jsx("h3",{className:"font-semibold text-foreground",children:d.title}),a.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:Cr(d.updated)})]}),a.jsx(Vt,{status:d.status})]})},d.slug))})}),a.jsx(Te,{title:"Recent Activity",children:e.recentActivity.length===0?a.jsx(Qe,{title:"No activity yet",description:"Once projects and assignments exist, Overview will show activity based on parsed source timestamps instead of file mtimes."}):a.jsx("div",{className:"space-y-3",children:e.recentActivity.map(d=>a.jsxs(Ee,{to:d.href,className:"block rounded-md border border-border/60 bg-background/80 p-3 transition hover:border-primary/40",children:[a.jsxs("div",{className:"flex items-start justify-between gap-3",children:[a.jsxs("div",{className:"space-y-1",children:[a.jsx("p",{className:"font-semibold text-foreground",children:d.title}),a.jsx("p",{className:"text-sm text-muted-foreground",children:d.summary})]}),a.jsx("span",{className:"text-xs font-medium uppercase tracking-[0.1em] text-muted-foreground",children:Cn(d.type)})]}),a.jsx("p",{className:"mt-3 text-xs text-muted-foreground",children:Cr(d.updated)})]},d.id))})})]})]}),e.firstRun&&a.jsx(xP,{help:o})]})]})}function vP(){const{data:e,loading:t,error:n}=KN();return t?a.jsx(wt,{label:"Loading attention queue…"}):n||!e?a.jsx(ht,{error:n||"Attention queue is unavailable."}):a.jsxs("div",{className:"space-y-5",children:[a.jsxs("div",{className:"grid gap-3 md:grid-cols-2 xl:grid-cols-4",children:[a.jsx(Xe,{label:"Critical",value:e.summary.critical,icon:_C,tone:"danger"}),a.jsx(Xe,{label:"High",value:e.summary.high,icon:Ws,tone:"warn"}),a.jsx(Xe,{label:"Medium",value:e.summary.medium,icon:JC,tone:"info"}),a.jsx(Xe,{label:"Low",value:e.summary.low,icon:FC})]}),a.jsx(Te,{title:"Attention Queue",description:"Ordered by severity, then by the latest parsed source update.",children:e.items.length===0?a.jsx(Qe,{title:"Attention queue is clear",description:"No blocked, failed, review, or stale assignments are currently surfacing from the source files."}):a.jsx("div",{className:"space-y-3",children:e.items.map(o=>a.jsxs(Ee,{to:o.href,className:"block rounded-md border border-border/60 bg-background/80 p-3 transition hover:border-primary/40",children:[a.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[a.jsxs("div",{className:"space-y-1",children:[a.jsx("h3",{className:"font-semibold text-foreground",children:o.assignmentTitle}),a.jsx("p",{className:"text-sm text-muted-foreground",children:o.projectTitle})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("span",{className:"rounded-full border border-border/60 bg-card/90 px-2.5 py-1 text-xs font-semibold uppercase tracking-[0.1em] text-muted-foreground",children:o.severity}),a.jsx(Vt,{status:o.status})]})]}),a.jsx("p",{className:"mt-3 text-sm leading-6 text-muted-foreground",children:o.reason}),a.jsxs("p",{className:"mt-2 text-xs text-muted-foreground",children:["Updated ",Cr(o.updated)]})]},o.id))})})]})}function bP({term:e,description:t}){return a.jsx("span",{title:t,className:"cursor-help rounded-full border border-border/70 bg-background/80 px-2.5 py-1 text-xs font-medium text-foreground underline decoration-dotted underline-offset-4",children:e})}function wP(){const{data:e,loading:t,error:n}=ab(),{openCheatsheet:o}=Xo();return t?a.jsx(wt,{label:"Loading help…"}):n||!e?a.jsx(ht,{error:n||"Help content is unavailable."}):a.jsxs("div",{className:"space-y-5",children:[a.jsx(Te,{title:"Keyboard Shortcuts",description:"Navigate the dashboard without reaching for the mouse.",children:a.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[a.jsx("button",{type:"button",onClick:o,className:"inline-flex items-center gap-2 rounded-md border border-border/70 bg-background/80 px-3 py-1.5 text-sm font-medium text-foreground hover:bg-accent",children:"Open shortcuts cheatsheet"}),a.jsxs("span",{className:"text-xs text-muted-foreground",children:["or press ",a.jsx("kbd",{className:"rounded border border-border/70 bg-muted px-1.5 py-0.5 font-mono text-[11px]",children:"?"})," ","anywhere. ",Rs("Mod+k")," opens the command palette."]})]})}),a.jsx(Te,{title:"What Syntaur Is",description:e.whatIsSyntaur.summary,children:a.jsx("div",{className:"grid gap-3 md:grid-cols-3",children:e.whatIsSyntaur.bullets.map(i=>a.jsx("div",{className:"rounded-md border border-border/60 bg-background/80 p-3 text-sm leading-6 text-muted-foreground",children:i},i))})}),a.jsx(Te,{title:"Getting Started",children:a.jsx("div",{className:"space-y-3",children:e.workflow.map((i,l)=>a.jsx("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:a.jsxs("div",{className:"flex items-start gap-3",children:[a.jsx("span",{className:"inline-flex h-5 w-5 items-center justify-center rounded-full bg-foreground text-xs font-semibold text-background",children:l+1}),a.jsxs("div",{className:"space-y-2",children:[a.jsx("h3",{className:"font-semibold text-foreground",children:i.title}),a.jsx("p",{className:"text-sm leading-6 text-muted-foreground",children:i.detail}),i.command?a.jsx(Ql,{command:i.command.command,description:i.command.description,example:i.command.example}):null,i.href?a.jsx(Ee,{className:"inline-flex text-sm font-semibold text-primary hover:underline",to:i.href,children:"Open the related surface"}):null]})]})},i.title))})}),a.jsxs("div",{className:"grid gap-3 xl:grid-cols-2",children:[a.jsxs(Te,{title:"Core Concepts",children:[a.jsx("div",{className:"flex flex-wrap gap-2",children:e.coreConcepts.map(i=>a.jsx(bP,{term:i.term,description:i.description},i.term))}),a.jsx("div",{className:"grid gap-3 pt-2",children:e.coreConcepts.map(i=>a.jsxs("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:[a.jsx("h3",{className:"font-semibold text-foreground",children:i.term}),a.jsx("p",{className:"mt-2 text-sm leading-6 text-muted-foreground",children:i.description})]},i.term))})]}),a.jsx(Te,{title:"Status Guide",children:a.jsx("div",{className:"space-y-3",children:e.statusGuide.map(i=>a.jsxs("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:[a.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[a.jsx(Vt,{status:i.status}),a.jsx("p",{className:"font-semibold text-foreground",children:i.meaning})]}),a.jsx("p",{className:"mt-3 text-sm leading-6 text-muted-foreground",children:i.useWhen})]},i.status))})})]}),a.jsxs("div",{className:"grid gap-3 xl:grid-cols-2",children:[a.jsx(Te,{title:"Ownership And File Rules",children:a.jsx("div",{className:"space-y-3",children:e.ownershipRules.map(i=>a.jsxs("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:[a.jsx("h3",{className:"font-semibold text-foreground",children:i.label}),a.jsx("p",{className:"mt-2 text-sm leading-6 text-muted-foreground",children:i.description}),a.jsx("div",{className:"mt-3 flex flex-wrap gap-2",children:i.files.map(l=>a.jsx("span",{className:"rounded-full border border-border/60 bg-card/90 px-2.5 py-1 font-mono text-xs text-foreground",children:l},l))})]},i.label))})}),a.jsx(Te,{title:"How To Navigate The Dashboard",children:a.jsx("div",{className:"space-y-3",children:e.navigation.map(i=>a.jsxs("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:[a.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[a.jsx("h3",{className:"font-semibold text-foreground",children:i.label}),a.jsx(Ee,{className:"text-sm font-semibold text-primary hover:underline",to:i.href,children:"Open"})]}),a.jsx("p",{className:"mt-2 text-sm leading-6 text-muted-foreground",children:i.description})]},i.label))})})]}),a.jsx(Te,{title:"CLI Quick Reference",children:a.jsx("div",{className:"grid gap-3 xl:grid-cols-2",children:e.commands.map(i=>a.jsx(Ql,{command:i.command,description:i.description,example:i.example},i.command))})}),a.jsxs("div",{className:"grid gap-3 xl:grid-cols-2",children:[a.jsx(Te,{title:"FAQ",children:a.jsx("div",{className:"space-y-3",children:e.faq.map(i=>a.jsxs("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:[a.jsx("h3",{className:"font-semibold text-foreground",children:i.question}),a.jsx("p",{className:"mt-2 text-sm leading-6 text-muted-foreground",children:i.answer})]},i.question))})}),a.jsx(Te,{title:"First Project Checklist",children:a.jsx("div",{className:"space-y-3",children:e.firstProjectChecklist.map((i,l)=>a.jsx("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:a.jsxs("div",{className:"flex items-start gap-3",children:[a.jsx("span",{className:"inline-flex h-5 w-5 items-center justify-center rounded-full bg-foreground text-xs font-semibold text-background",children:l+1}),a.jsxs("div",{className:"space-y-2",children:[a.jsx("h3",{className:"font-semibold text-foreground",children:i.title}),a.jsx("p",{className:"text-sm leading-6 text-muted-foreground",children:i.detail}),i.command?a.jsx(Ql,{command:i.command.command,example:i.command.example}):null,i.href?a.jsx(Ee,{className:"inline-flex text-sm font-semibold text-primary hover:underline",to:i.href,children:"Open the related surface"}):null]})]})},i.title))})})]})]})}function Lp({children:e}){return a.jsx("div",{className:"flex flex-col gap-2 rounded-lg border border-border/60 bg-card/80 p-2.5 shadow-sm md:flex-row md:flex-wrap md:items-center",children:e})}const Rc=g.forwardRef(({value:e,onChange:t,placeholder:n="Search"},o)=>a.jsxs("label",{className:"relative flex min-w-[220px] flex-1 items-center",children:[a.jsx(Hs,{className:"pointer-events-none absolute left-3 h-4 w-4 text-muted-foreground"}),a.jsx("input",{ref:o,value:e,onChange:i=>t(i.target.value),placeholder:n,className:"h-9 w-full rounded-md border border-border/60 bg-background/90 pl-9 pr-3 text-sm text-foreground outline-none transition focus:border-primary focus:ring-2 focus:ring-ring/30"})]}));Rc.displayName="SearchInput";function Op({value:e,options:t,onChange:n}){return a.jsx("div",{className:"inline-flex rounded-md border border-border/60 bg-background/80 p-1",children:t.map(o=>a.jsx("button",{type:"button",onClick:()=>n(o.value),className:ze("rounded-sm px-2.5 py-1.5 text-sm font-medium transition",e===o.value?"bg-foreground text-background":"text-muted-foreground hover:text-foreground"),children:o.label},o.value))})}function ew({columns:e,items:t,getItemId:n,getColumnId:o,renderCard:i,canDrop:l,onMove:c,emptyMessage:d="No cards in this column."}){const[p,m]=g.useState(null),[h,x]=g.useState(null),v=g.useRef(null),b=g.useMemo(()=>new Map(t.map(M=>[n(M),M])),[n,t]),N=g.useMemo(()=>e.map(M=>({column:M,items:t.filter(P=>o(P)===M.id)})),[e,o,t]),k=p?b.get(p)??null:null;function j(M){if(!k)return{allowed:!1};const P=o(k);return(l==null?void 0:l({item:k,fromColumnId:P,toColumnId:M}))??{allowed:!0}}function S(){m(null),x(null)}function T(M,P){c&&(M.dataTransfer.effectAllowed="move",M.dataTransfer.setData("text/plain",P),m(P))}function R(M,P,L){!c||!k||!j(P).allowed||(M.preventDefault(),M.dataTransfer.dropEffect="move",x(J=>(J==null?void 0:J.columnId)===P&&J.index===L?J:{columnId:P,index:L}))}async function D(M,P,L){var G;if(M.preventDefault(),!c||!k){S();return}const _=o(k),ne=(((G=N.find(q=>q.column.id===_))==null?void 0:G.items)??[]).findIndex(q=>n(q)===n(k));if(!j(P).allowed||ne<0){S();return}if(_===P&&(L===ne||L===ne+1)){S();return}try{await c({item:k,fromColumnId:_,toColumnId:P,fromIndex:ne,toIndex:L})}finally{S()}}return a.jsx("div",{className:"relative overflow-x-auto pb-2",style:{scrollbarColor:"oklch(var(--border)) transparent",scrollbarWidth:"thin"},children:a.jsx("div",{className:"grid min-w-max auto-cols-[minmax(260px,320px)] grid-flow-col gap-4",children:N.map(({column:M,items:P})=>{const L=j(M.id),_=(h==null?void 0:h.columnId)===M.id;return a.jsxs("section",{className:ze("flex min-h-[320px] flex-col rounded-lg border border-border/60 bg-card/85 p-3 shadow-sm",k&&!L.allowed?"border-dashed opacity-65":"",k&&L.allowed?"border-primary/30 bg-accent/30":"",_?"ring-2 ring-ring/30":""),title:k&&!L.allowed?L.reason:void 0,children:[a.jsxs("div",{className:"mb-3 flex items-start justify-between gap-3",children:[a.jsxs("div",{className:"space-y-1",children:[a.jsx("h2",{className:"text-sm font-semibold uppercase tracking-[0.16em] text-muted-foreground",children:M.title}),M.description?a.jsx("p",{className:"text-sm leading-6 text-muted-foreground",children:M.description}):null]}),a.jsx("span",{className:"rounded-full border border-border/60 bg-background/80 px-2.5 py-1 text-xs font-semibold text-foreground",children:P.length})]}),a.jsxs("div",{className:"flex flex-1 flex-col gap-3",onDragOver:J=>R(J,M.id,P.length),onDrop:J=>D(J,M.id,P.length),children:[P.length===0?a.jsx(kP,{active:(h==null?void 0:h.columnId)===M.id&&h.index===0,disabled:!!k&&!L.allowed,children:typeof d=="function"?d(M):d}):null,P.map((J,ne)=>{const U=n(J),G=p===U;return a.jsxs(g.Fragment,{children:[a.jsx("div",{className:ze("h-2 rounded-full transition",(h==null?void 0:h.columnId)===M.id&&h.index===ne?"bg-primary/70":"bg-transparent"),onDragOver:q=>R(q,M.id,ne),onDrop:q=>D(q,M.id,ne)}),a.jsx("div",{draggable:!!c,onMouseDown:q=>{v.current=q.target},onDragStart:q=>{const ee=v.current;if(ee!=null&&ee.closest("a, button")){q.preventDefault();return}T(q,U)},onDragEnd:S,className:ze("transition",c?"cursor-grab active:cursor-grabbing":"",G?"scale-[0.98] opacity-50":""),children:i(J,{dragging:G})})]},U)}),P.length>0?a.jsx("div",{className:ze("mt-1 rounded-md border border-dashed px-3 py-2 text-center text-xs text-muted-foreground transition",(h==null?void 0:h.columnId)===M.id&&h.index===P.length?"border-primary/50 bg-primary/10 text-foreground":"border-border/60",k&&!L.allowed?"opacity-40":""),children:"Drop here to place at the end"}):null]})]},M.id)})})})}function kP({active:e,disabled:t,children:n}){return a.jsx("div",{className:ze("flex min-h-[128px] items-center justify-center rounded-lg border border-dashed px-4 text-center text-sm text-muted-foreground transition",e?"border-primary/60 bg-primary/10 text-foreground":"border-border/60 bg-background/50",t?"opacity-45":""),children:n})}const tw={statuses:[{id:"pending",label:"Pending"},{id:"in_progress",label:"In Progress"},{id:"blocked",label:"Blocked"},{id:"review",label:"Review"},{id:"completed",label:"Completed"},{id:"failed",label:"Failed"}],order:["pending","in_progress","blocked","review","completed","failed"],transitions:[],custom:!1};let Vi=null,Wo=null;function jP(){return Vi?Promise.resolve(Vi):Wo||(Wo=fetch("/api/config/statuses").then(e=>{if(!e.ok)throw new Error(`HTTP ${e.status}`);return e.json()}).then(e=>(Vi=e,Wo=null,e)).catch(()=>(Wo=null,tw)),Wo)}function Ac(){const[e,t]=g.useState(()=>Vi??tw);return g.useEffect(()=>{jP().then(t)},[]),e}function Ox(){Vi=null,Wo=null}function SP(e,t){const n=e.statuses.find(o=>o.id===t);return(n==null?void 0:n.label)??t.replace(/_/g," ").replace(/\b\w/g,o=>o.toUpperCase())}const CP={completed:"bg-status-completed-foreground",in_progress:"bg-status-in-progress-foreground",review:"bg-status-review-foreground",blocked:"bg-status-blocked-foreground",failed:"bg-status-failed-foreground",pending:"bg-status-pending-foreground"},_x=["bg-primary","bg-secondary","bg-accent-coral","bg-accent-teal","bg-accent-amber"];function ic({progress:e,className:t,showLegend:n=!1}){const o=Ac(),i=g.useMemo(()=>{let c=0;return(o.order.length>0?o.order:Object.keys(e).filter(p=>p!=="total")).map(p=>({key:p,className:CP[p]??_x[c++%_x.length]}))},[o.order,e]),l=i.filter(c=>(e[c.key]??0)>0);return a.jsxs("div",{className:ze("space-y-2",t),children:[a.jsx("div",{className:"flex h-1.5 w-full overflow-hidden rounded-lg border border-border/70 bg-muted/60",children:e.total===0?a.jsx("div",{className:"h-full w-full bg-muted"}):l.map(c=>a.jsx("div",{className:c.className,style:{width:`${(e[c.key]??0)/e.total*100}%`},title:`${Cn(c.key)}: ${e[c.key]??0}`},c.key))}),n?a.jsx("div",{className:"flex flex-wrap gap-2 text-xs text-muted-foreground",children:i.map(c=>a.jsxs("span",{className:"inline-flex items-center gap-2 rounded-full border border-border/60 bg-background/80 px-2 py-1",children:[a.jsx("span",{className:ze("h-2 w-2 rounded-full",c.className)}),a.jsx("span",{children:Cn(c.key)}),a.jsx("span",{className:"font-medium text-foreground",children:e[c.key]??0})]},c.key))}):null]})}const NP=["pending","active","blocked","failed","completed","archived"],_p=NP,EP=["pending","in_progress","blocked","review","completed","failed"];function PP(e){return e&&e.length>0?e:[...EP]}function TP(e,t,n){if(t<0||t>=e.length)return e;const o=[...e],[i]=o.splice(t,1),l=t<n?n-1:n;return o.splice(Math.max(0,Math.min(l,o.length)),0,i),o}function Mx(){const{workspace:e}=Et(),t=At(),n=qt(),{data:o,loading:i,error:l,refetch:c}=Sc(),d=g.useRef(null);Qo("list:projects");const[p,m]=g.useState(""),[h,x]=g.useState("all"),[v,b]=g.useState("active"),[N,k]=g.useState("all"),[j,S]=g.useState("updated"),[T,R]=No(),D=T.get("view"),M=D==="table"||D==="kanban"?D:"cards",P=I=>{R(A=>{const F=new URLSearchParams(A);return I==="cards"?F.delete("view"):F.set("view",I),F})},[L,_]=g.useState({}),J=g.useMemo(()=>o?o.filter(I=>{if(e){if(e==="_ungrouped"){if(I.workspace!==null)return!1}else if(I.workspace!==e)return!1}return v==="active"&&I.archived||v==="archived"&&!I.archived||h!=="all"&&I.status!==h||N!=="all"&&!I.tags.includes(N)?!1:p.trim()?`${I.title} ${I.tags.join(" ")} ${I.slug}`.toLowerCase().includes(p.toLowerCase()):!0}).sort((I,A)=>DP(I,A,j)):[],[o,p,h,v,N,j,e]),ne=J.map(I=>`${I.slug}:${I.status}`).join("|");g.useEffect(()=>{_(IP(J))},[ne,j]);const U=g.useMemo(()=>{const I=new Map(J.map(A=>[A.slug,A]));return _p.flatMap(A=>(L[A]??J.filter(K=>K.status===A).map(K=>K.slug)).map(K=>I.get(K)).filter(K=>!!K))},[J,L]),{visibleItems:G,visibleIndexByKey:q}=g.useMemo(()=>{const I=M==="kanban"?U:J,A=new Map;return I.forEach((F,K)=>A.set(F.slug,K)),{visibleItems:I,visibleIndexByKey:A}},[M,J,U]),{hotkeyRowProps:ee}=ha(G,{scope:"list:projects",onOpen:I=>n(`${t}/projects/${I.slug}`)});if(ft({keys:"/",scope:"list:projects",description:"Focus filter",handler:()=>{var I;return(I=d.current)==null?void 0:I.focus()}}),ft({keys:"r",scope:"list:projects",description:"Refresh",handler:()=>c()}),i)return a.jsx(wt,{label:"Loading projects…"});if(l||!o)return a.jsx(ht,{error:l||"Project list is unavailable."});const $=Array.from(new Set(o.flatMap(I=>I.tags))).sort();return a.jsxs("div",{className:"space-y-5",children:[a.jsxs(Lp,{children:[a.jsx(Rc,{ref:d,value:p,onChange:m,placeholder:"Search by project title or tag"}),a.jsxs("select",{value:h,onChange:I=>x(I.target.value),className:"editor-input max-w-[180px]",children:[a.jsx("option",{value:"all",children:"All statuses"}),a.jsx("option",{value:"pending",children:"Pending"}),a.jsx("option",{value:"active",children:"Active"}),a.jsx("option",{value:"blocked",children:"Blocked"}),a.jsx("option",{value:"failed",children:"Failed"}),a.jsx("option",{value:"completed",children:"Completed"}),a.jsx("option",{value:"archived",children:"Archived"})]}),a.jsxs("select",{value:v,onChange:I=>b(I.target.value),className:"editor-input max-w-[180px]",children:[a.jsx("option",{value:"active",children:"Hide archived"}),a.jsx("option",{value:"all",children:"All projects"}),a.jsx("option",{value:"archived",children:"Archived only"})]}),a.jsxs("select",{value:N,onChange:I=>k(I.target.value),className:"editor-input max-w-[180px]",children:[a.jsx("option",{value:"all",children:"All tags"}),$.map(I=>a.jsx("option",{value:I,children:I},I))]}),a.jsxs("select",{value:j,onChange:I=>S(I.target.value),className:"editor-input max-w-[180px]",children:[a.jsx("option",{value:"updated",children:"Sort: Updated"}),a.jsx("option",{value:"created",children:"Sort: Created"}),a.jsx("option",{value:"title",children:"Sort: Title"}),a.jsx("option",{value:"attention",children:"Sort: Attention"})]}),a.jsx(Op,{value:M,onChange:I=>P(I),options:[{value:"cards",label:"Cards"},{value:"table",label:"Table"},{value:"kanban",label:"Kanban"}]})]}),J.length===0?a.jsx(Qe,{title:o.length===0?"No projects yet":"No projects match these filters",description:o.length===0?"A project is the high-level objective that groups assignments, resources, and memories. Create one to start the dashboard flow.":"Adjust the current search and filters or create a new project.",actions:a.jsx(Ee,{className:"shell-action bg-foreground text-background hover:opacity-90",to:`${t}/create/project`,children:"Create Project"})}):M==="cards"?a.jsx("div",{className:"grid gap-3 lg:grid-cols-2 2xl:grid-cols-3",children:J.map((I,A)=>a.jsxs(Ee,{to:`${t}/projects/${I.slug}`,className:"block rounded-lg border border-border/60 bg-card/90 p-3 shadow-sm transition hover:border-primary/40 hover:shadow-md",...ee(A),children:[a.jsxs("div",{className:"flex items-start justify-between gap-3",children:[a.jsxs("div",{className:"space-y-1",children:[a.jsx("h2",{className:"text-lg font-semibold text-foreground",children:I.title}),a.jsxs("p",{className:"text-sm text-muted-foreground",children:["Updated ",ko(I.updated)]})]}),a.jsx(Vt,{status:I.status})]}),a.jsxs("div",{className:"mt-4 space-y-3",children:[a.jsx(ic,{progress:I.progress,showLegend:!0}),a.jsx("div",{className:"flex flex-wrap gap-2",children:I.tags.map(F=>a.jsx("span",{className:"rounded-full border border-border/60 bg-background/80 px-2.5 py-1 text-xs text-foreground",children:F},F))}),a.jsxs("div",{className:"grid grid-cols-2 gap-3 text-sm",children:[a.jsxs("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:[a.jsx("p",{className:"text-muted-foreground",children:"Needs attention"}),a.jsx("p",{className:"mt-1 font-semibold text-foreground",children:I.needsAttention.blockedCount+I.needsAttention.failedCount})]}),a.jsxs("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:[a.jsx("p",{className:"text-muted-foreground",children:"Assignments"}),a.jsx("p",{className:"mt-1 font-semibold text-foreground",children:I.progress.total})]})]})]})]},I.slug))}):M==="table"?a.jsx(Te,{title:`${J.length} project${J.length===1?"":"s"}`,children:a.jsx("div",{className:"overflow-x-auto",children:a.jsxs("table",{className:"w-full min-w-[760px] text-left text-sm",children:[a.jsx("thead",{children:a.jsxs("tr",{className:"border-b border-border/60 text-muted-foreground",children:[a.jsx("th",{className:"pb-3 font-medium",children:"Project"}),a.jsx("th",{className:"pb-3 font-medium",children:"Status"}),a.jsx("th",{className:"pb-3 font-medium",children:"Progress"}),a.jsx("th",{className:"pb-3 font-medium",children:"Attention"}),a.jsx("th",{className:"pb-3 font-medium",children:"Updated"})]})}),a.jsx("tbody",{children:J.map((I,A)=>a.jsxs("tr",{className:"border-b border-border/50 last:border-0",...ee(A),children:[a.jsxs("td",{className:"py-4 pr-4",children:[a.jsx(Ee,{to:`${t}/projects/${I.slug}`,className:"font-semibold text-foreground hover:text-primary",children:I.title}),a.jsx("div",{className:"mt-1 flex flex-wrap gap-2",children:I.tags.map(F=>a.jsx("span",{className:"rounded-full border border-border/60 px-2 py-0.5 text-xs text-muted-foreground",children:F},F))})]}),a.jsx("td",{className:"py-4 pr-4",children:a.jsx(Vt,{status:I.status})}),a.jsx("td",{className:"py-4 pr-4",children:a.jsx("div",{className:"min-w-[220px]",children:a.jsx(ic,{progress:I.progress})})}),a.jsx("td",{className:"py-4 pr-4 text-muted-foreground",children:I.needsAttention.blockedCount+I.needsAttention.failedCount}),a.jsx("td",{className:"py-4 text-muted-foreground",children:ko(I.updated)})]},I.slug))})]})})}):a.jsx(ew,{columns:AP,items:U,getItemId:I=>I.slug,getColumnId:I=>I.status,canDrop:({fromColumnId:I,toColumnId:A})=>({allowed:!0,reason:I===A?void 0:"This will set a manual status override on the project."}),onMove:({item:I,fromColumnId:A,toColumnId:F,fromIndex:K,toIndex:E})=>{if(A===F){const B=L[A]??J.filter(X=>X.status===A).map(X=>X.slug);_(X=>({...X,[A]:TP(B,K,E)}));return}fetch(`/api/projects/${I.slug}/status-override`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({status:F})}).then(()=>{window.location.reload()})},emptyMessage:I=>`No ${I.title.toLowerCase()} projects.`,renderCard:(I,{dragging:A})=>{const F=q.get(I.slug)??-1;return a.jsx("div",{...F>=0?ee(F):{},children:a.jsx(LP,{project:I,dragging:A})})}}),a.jsx("div",{className:"rounded-lg border border-border/60 bg-card/80 p-3 text-sm text-muted-foreground",children:a.jsxs("div",{className:"flex items-start gap-3",children:[a.jsx(_v,{className:"mt-0.5 h-4 w-4"}),a.jsxs("p",{children:["Project status is derived from assignment state by default.",M==="kanban"?" Drag projects between columns or use":" Use"," the status override on the project detail page to set a manual status."]})]})})]})}const RP={pending:"Pending",active:"Active",blocked:"Blocked",failed:"Failed",completed:"Completed",archived:"Archived"},AP=_p.map(e=>({id:e,title:RP[e],description:Zb(e)}));function DP(e,t,n){switch(n){case"created":return t.created.localeCompare(e.created);case"title":return e.title.localeCompare(t.title);case"attention":return $x(t)-$x(e);case"updated":default:return t.updated.localeCompare(e.updated)}}function $x(e){return e.needsAttention.failedCount*10+e.needsAttention.blockedCount*5+e.needsAttention.openQuestions}function IP(e){return Object.fromEntries(_p.map(t=>[t,e.filter(n=>n.status===t).map(n=>n.slug)]))}function LP({project:e,dragging:t}){const n=At();return a.jsxs("div",{className:"rounded-lg border border-border/60 bg-background/85 p-3 shadow-sm",children:[a.jsxs("div",{className:"flex items-start justify-between gap-3",children:[a.jsxs("div",{className:"space-y-1",children:[a.jsx(Ee,{to:`${n}/projects/${e.slug}`,className:"text-base font-semibold text-foreground hover:text-primary",children:e.title}),a.jsxs("p",{className:"text-sm text-muted-foreground",children:["Updated ",ko(e.updated)]})]}),a.jsx(Vt,{status:e.status})]}),a.jsx("div",{className:"mt-4",children:a.jsx(ic,{progress:e.progress})}),a.jsxs("div",{className:"mt-4 flex flex-wrap gap-2",children:[e.tags.map(o=>a.jsx("span",{className:"rounded-full border border-border/60 bg-background/80 px-2.5 py-1 text-xs text-foreground",children:o},o)),a.jsxs("span",{className:"rounded-full border border-border/60 px-2.5 py-1 text-xs text-muted-foreground",children:[e.progress.total," assignments"]}),a.jsxs("span",{className:"rounded-full border border-border/60 px-2.5 py-1 text-xs text-muted-foreground",children:[e.needsAttention.blockedCount+e.needsAttention.failedCount," needs attention"]})]}),a.jsx("div",{className:"mt-4 text-xs uppercase tracking-[0.08em] text-muted-foreground",children:t?"Reordering within status":"Derived project lane"})]})}function Hr({value:e}){const[t,n]=g.useState(!1);function o(){navigator.clipboard.writeText(e),n(!0),setTimeout(()=>n(!1),1500)}return a.jsx("button",{onClick:o,className:"text-muted-foreground hover:text-foreground",title:t?"Copied!":`Copy: ${e}`,children:t?a.jsx(da,{className:"h-3 w-3 text-status-completed-foreground"}):a.jsx(kc,{className:"h-3 w-3"})})}function Fx(e){const t=OP(e),n=g.forwardRef((o,i)=>{const{children:l,...c}=o,d=g.Children.toArray(l),p=d.find(MP);if(p){const m=p.props.children,h=d.map(x=>x===p?g.Children.count(m)>1?g.Children.only(null):g.isValidElement(m)?m.props.children:null:x);return a.jsx(t,{...c,ref:i,children:g.isValidElement(m)?g.cloneElement(m,void 0,h):null})}return a.jsx(t,{...c,ref:i,children:l})});return n.displayName=`${e}.Slot`,n}function OP(e){const t=g.forwardRef((n,o)=>{const{children:i,...l}=n;if(g.isValidElement(i)){const c=FP(i),d=$P(l,i.props);return i.type!==g.Fragment&&(d.ref=o?Cc(o,c):c),g.cloneElement(i,d)}return g.Children.count(i)>1?g.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var _P=Symbol("radix.slottable");function MP(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===_P}function $P(e,t){const n={...t};for(const o in t){const i=e[o],l=t[o];/^on[A-Z]/.test(o)?i&&l?n[o]=(...d)=>{const p=l(...d);return i(...d),p}:i&&(n[o]=i):o==="style"?n[o]={...i,...l}:o==="className"&&(n[o]=[i,l].filter(Boolean).join(" "))}return{...e,...n}}function FP(e){var o,i;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function zP(e){const t=e+"CollectionProvider",[n,o]=Go(t),[i,l]=n(t,{collectionRef:{current:null},itemMap:new Map}),c=k=>{const{scope:j,children:S}=k,T=jt.useRef(null),R=jt.useRef(new Map).current;return a.jsx(i,{scope:j,itemMap:R,collectionRef:T,children:S})};c.displayName=t;const d=e+"CollectionSlot",p=Fx(d),m=jt.forwardRef((k,j)=>{const{scope:S,children:T}=k,R=l(d,S),D=cn(j,R.collectionRef);return a.jsx(p,{ref:D,children:T})});m.displayName=d;const h=e+"CollectionItemSlot",x="data-radix-collection-item",v=Fx(h),b=jt.forwardRef((k,j)=>{const{scope:S,children:T,...R}=k,D=jt.useRef(null),M=cn(j,D),P=l(h,S);return jt.useEffect(()=>(P.itemMap.set(D,{ref:D,...R}),()=>void P.itemMap.delete(D))),a.jsx(v,{[x]:"",ref:M,children:T})});b.displayName=h;function N(k){const j=l(e+"CollectionConsumer",k);return jt.useCallback(()=>{const T=j.collectionRef.current;if(!T)return[];const R=Array.from(T.querySelectorAll(`[${x}]`));return Array.from(j.itemMap.values()).sort((P,L)=>R.indexOf(P.ref.current)-R.indexOf(L.ref.current))},[j.collectionRef,j.itemMap])}return[{Provider:c,Slot:m,ItemSlot:b},N,o]}var BP=g.createContext(void 0);function nw(e){const t=g.useContext(BP);return e||t||"ltr"}var Zd="rovingFocusGroup.onEntryFocus",UP={bubbles:!1,cancelable:!0},ma="RovingFocusGroup",[Ff,rw,HP]=zP(ma),[WP,ow]=Go(ma,[HP]),[VP,qP]=WP(ma),sw=g.forwardRef((e,t)=>a.jsx(Ff.Provider,{scope:e.__scopeRovingFocusGroup,children:a.jsx(Ff.Slot,{scope:e.__scopeRovingFocusGroup,children:a.jsx(KP,{...e,ref:t})})}));sw.displayName=ma;var KP=g.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:o,loop:i=!1,dir:l,currentTabStopId:c,defaultCurrentTabStopId:d,onCurrentTabStopIdChange:p,onEntryFocus:m,preventScrollOnEntryFocus:h=!1,...x}=e,v=g.useRef(null),b=cn(t,v),N=nw(l),[k,j]=Nc({prop:c,defaultProp:d??null,onChange:p,caller:ma}),[S,T]=g.useState(!1),R=Vo(m),D=rw(n),M=g.useRef(!1),[P,L]=g.useState(0);return g.useEffect(()=>{const _=v.current;if(_)return _.addEventListener(Zd,R),()=>_.removeEventListener(Zd,R)},[R]),a.jsx(VP,{scope:n,orientation:o,dir:N,loop:i,currentTabStopId:k,onItemFocus:g.useCallback(_=>j(_),[j]),onItemShiftTab:g.useCallback(()=>T(!0),[]),onFocusableItemAdd:g.useCallback(()=>L(_=>_+1),[]),onFocusableItemRemove:g.useCallback(()=>L(_=>_-1),[]),children:a.jsx(Dt.div,{tabIndex:S||P===0?-1:0,"data-orientation":o,...x,ref:b,style:{outline:"none",...e.style},onMouseDown:pt(e.onMouseDown,()=>{M.current=!0}),onFocus:pt(e.onFocus,_=>{const J=!M.current;if(_.target===_.currentTarget&&J&&!S){const ne=new CustomEvent(Zd,UP);if(_.currentTarget.dispatchEvent(ne),!ne.defaultPrevented){const U=D().filter(I=>I.focusable),G=U.find(I=>I.active),q=U.find(I=>I.id===k),$=[G,q,...U].filter(Boolean).map(I=>I.ref.current);lw($,h)}}M.current=!1}),onBlur:pt(e.onBlur,()=>T(!1))})})}),iw="RovingFocusGroupItem",aw=g.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:o=!0,active:i=!1,tabStopId:l,children:c,...d}=e,p=As(),m=l||p,h=qP(iw,n),x=h.currentTabStopId===m,v=rw(n),{onFocusableItemAdd:b,onFocusableItemRemove:N,currentTabStopId:k}=h;return g.useEffect(()=>{if(o)return b(),()=>N()},[o,b,N]),a.jsx(Ff.ItemSlot,{scope:n,id:m,focusable:o,active:i,children:a.jsx(Dt.span,{tabIndex:x?0:-1,"data-orientation":h.orientation,...d,ref:t,onMouseDown:pt(e.onMouseDown,j=>{o?h.onItemFocus(m):j.preventDefault()}),onFocus:pt(e.onFocus,()=>h.onItemFocus(m)),onKeyDown:pt(e.onKeyDown,j=>{if(j.key==="Tab"&&j.shiftKey){h.onItemShiftTab();return}if(j.target!==j.currentTarget)return;const S=XP(j,h.orientation,h.dir);if(S!==void 0){if(j.metaKey||j.ctrlKey||j.altKey||j.shiftKey)return;j.preventDefault();let R=v().filter(D=>D.focusable).map(D=>D.ref.current);if(S==="last")R.reverse();else if(S==="prev"||S==="next"){S==="prev"&&R.reverse();const D=R.indexOf(j.currentTarget);R=h.loop?QP(R,D+1):R.slice(D+1)}setTimeout(()=>lw(R))}}),children:typeof c=="function"?c({isCurrentTabStop:x,hasTabStop:k!=null}):c})})});aw.displayName=iw;var GP={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function YP(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function XP(e,t,n){const o=YP(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return GP[o]}function lw(e,t=!1){const n=document.activeElement;for(const o of e)if(o===n||(o.focus({preventScroll:t}),document.activeElement!==n))return}function QP(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var JP=sw,ZP=aw,Dc="Tabs",[eT]=Go(Dc,[ow]),cw=ow(),[tT,Mp]=eT(Dc),uw=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,onValueChange:i,defaultValue:l,orientation:c="horizontal",dir:d,activationMode:p="automatic",...m}=e,h=nw(d),[x,v]=Nc({prop:o,onChange:i,defaultProp:l??"",caller:Dc});return a.jsx(tT,{scope:n,baseId:As(),value:x,onValueChange:v,orientation:c,dir:h,activationMode:p,children:a.jsx(Dt.div,{dir:h,"data-orientation":c,...m,ref:t})})});uw.displayName=Dc;var dw="TabsList",fw=g.forwardRef((e,t)=>{const{__scopeTabs:n,loop:o=!0,...i}=e,l=Mp(dw,n),c=cw(n);return a.jsx(JP,{asChild:!0,...c,orientation:l.orientation,dir:l.dir,loop:o,children:a.jsx(Dt.div,{role:"tablist","aria-orientation":l.orientation,...i,ref:t})})});fw.displayName=dw;var pw="TabsTrigger",hw=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,disabled:i=!1,...l}=e,c=Mp(pw,n),d=cw(n),p=xw(c.baseId,o),m=yw(c.baseId,o),h=o===c.value;return a.jsx(ZP,{asChild:!0,...d,focusable:!i,active:h,children:a.jsx(Dt.button,{type:"button",role:"tab","aria-selected":h,"aria-controls":m,"data-state":h?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:p,...l,ref:t,onMouseDown:pt(e.onMouseDown,x=>{!i&&x.button===0&&x.ctrlKey===!1?c.onValueChange(o):x.preventDefault()}),onKeyDown:pt(e.onKeyDown,x=>{[" ","Enter"].includes(x.key)&&c.onValueChange(o)}),onFocus:pt(e.onFocus,()=>{const x=c.activationMode!=="manual";!h&&!i&&x&&c.onValueChange(o)})})})});hw.displayName=pw;var mw="TabsContent",gw=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,forceMount:i,children:l,...c}=e,d=Mp(mw,n),p=xw(d.baseId,o),m=yw(d.baseId,o),h=o===d.value,x=g.useRef(h);return g.useEffect(()=>{const v=requestAnimationFrame(()=>x.current=!1);return()=>cancelAnimationFrame(v)},[]),a.jsx(Yo,{present:i||h,children:({present:v})=>a.jsx(Dt.div,{"data-state":h?"active":"inactive","data-orientation":d.orientation,role:"tabpanel","aria-labelledby":p,hidden:!v,id:m,tabIndex:0,...c,ref:t,style:{...e.style,animationDuration:x.current?"0s":void 0},children:v&&l})})});gw.displayName=mw;function xw(e,t){return`${e}-trigger-${t}`}function yw(e,t){return`${e}-content-${t}`}var nT=uw,rT=fw,oT=hw,sT=gw;function $p({value:e,onValueChange:t,items:n,className:o}){return a.jsxs(nT,{value:e,onValueChange:t,className:o,children:[a.jsx(rT,{className:"scrollbar-none flex gap-2 overflow-x-auto rounded-md border border-border/70 bg-card/80 p-1",children:n.map(i=>a.jsxs(oT,{value:i.value,className:ze("inline-flex items-center gap-2 rounded-sm px-3 py-1.5 text-sm font-medium text-muted-foreground transition","data-[state=active]:bg-foreground data-[state=active]:text-background"),children:[a.jsx("span",{children:i.label}),typeof i.count=="number"?a.jsx("span",{className:"rounded-full bg-background/20 px-2 py-0.5 text-xs data-[state=active]:bg-background/20",children:i.count}):null]},i.value))}),n.map(i=>a.jsx(sT,{value:i.value,className:"pt-3",children:i.content},i.value))]})}const iT="modulepreload",aT=function(e){return"/"+e},zx={},lT=function(t,n,o){let i=Promise.resolve();if(n&&n.length>0){let c=function(m){return Promise.all(m.map(h=>Promise.resolve(h).then(x=>({status:"fulfilled",value:x}),x=>({status:"rejected",reason:x}))))};document.getElementsByTagName("link");const d=document.querySelector("meta[property=csp-nonce]"),p=(d==null?void 0:d.nonce)||(d==null?void 0:d.getAttribute("nonce"));i=c(n.map(m=>{if(m=aT(m),m in zx)return;zx[m]=!0;const h=m.endsWith(".css"),x=h?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${m}"]${x}`))return;const v=document.createElement("link");if(v.rel=h?"stylesheet":iT,h||(v.as="script"),v.crossOrigin="",v.href=m,p&&v.setAttribute("nonce",p),document.head.appendChild(v),h)return new Promise((b,N)=>{v.addEventListener("load",b),v.addEventListener("error",()=>N(new Error(`Unable to preload CSS for ${m}`)))})}))}function l(c){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=c,window.dispatchEvent(d),!d.defaultPrevented)throw c}return i.then(c=>{for(const d of c||[])d.status==="rejected"&&l(d.reason);return t().catch(l)})};function cT({definition:e,className:t,nodeRoutes:n={}}){const o=g.useRef(null),[i,l]=g.useState(null),[c,d]=g.useState(!0),p=qt(),m=document.documentElement.classList.contains("dark")?"dark":"default";return g.useEffect(()=>{let h=!1;async function x(){if(o.current)try{const v=(await lT(async()=>{const{default:k}=await import("./mermaid.core-kxfDb1ct.js").then(j=>j.bF);return{default:k}},[])).default;if(v.initialize({startOnLoad:!1,theme:m}),h)return;const b=`mermaid-${Date.now()}`,{svg:N}=await v.render(b,e);if(h||!o.current)return;o.current.innerHTML=N,uT(o.current,n,p),d(!1)}catch(v){h||(l(v instanceof Error?v.message:"Failed to render graph"),d(!1))}}return d(!0),l(null),x(),()=>{h=!0}},[e,p,n,m]),i?a.jsxs("div",{className:ze("rounded-lg border border-border bg-card p-4",t),children:[a.jsxs("p",{className:"text-sm text-error-foreground",children:["Failed to render dependency graph: ",i]}),a.jsx("pre",{className:"mt-2 text-xs text-muted-foreground overflow-auto",children:e})]}):a.jsxs("div",{className:ze("rounded-lg border border-border bg-card p-4",t),children:[c&&a.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading graph..."}),a.jsx("div",{ref:o,className:"overflow-auto"})]})}function uT(e,t,n){var o;for(const i of e.querySelectorAll(".node")){const l=((o=i.textContent)==null?void 0:o.replace(/\s+/g," ").trim())??"",c=t[l];if(!c)continue;i.style.cursor="pointer",i.setAttribute("role","link"),i.setAttribute("tabindex","0"),i.setAttribute("aria-label",`Open ${l}`);const d=()=>n(c);i.addEventListener("click",d),i.addEventListener("keydown",p=>{(p.key==="Enter"||p.key===" ")&&(p.preventDefault(),d())})}}function dT(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const fT=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,pT=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,hT={};function Bx(e,t){return(hT.jsx?pT:fT).test(e)}const mT=/[ \t\n\f\r]/g;function gT(e){return typeof e=="object"?e.type==="text"?Ux(e.value):!1:Ux(e)}function Ux(e){return e.replace(mT,"")===""}class ga{constructor(t,n,o){this.normal=n,this.property=t,o&&(this.space=o)}}ga.prototype.normal={};ga.prototype.property={};ga.prototype.space=void 0;function vw(e,t){const n={},o={};for(const i of e)Object.assign(n,i.property),Object.assign(o,i.normal);return new ga(n,o,t)}function zf(e){return e.toLowerCase()}class En{constructor(t,n){this.attribute=n,this.property=t}}En.prototype.attribute="";En.prototype.booleanish=!1;En.prototype.boolean=!1;En.prototype.commaOrSpaceSeparated=!1;En.prototype.commaSeparated=!1;En.prototype.defined=!1;En.prototype.mustUseProperty=!1;En.prototype.number=!1;En.prototype.overloadedBoolean=!1;En.prototype.property="";En.prototype.spaceSeparated=!1;En.prototype.space=void 0;let xT=0;const Fe=Jo(),Rt=Jo(),Bf=Jo(),ue=Jo(),rt=Jo(),Is=Jo(),_n=Jo();function Jo(){return 2**++xT}const Uf=Object.freeze(Object.defineProperty({__proto__:null,boolean:Fe,booleanish:Rt,commaOrSpaceSeparated:_n,commaSeparated:Is,number:ue,overloadedBoolean:Bf,spaceSeparated:rt},Symbol.toStringTag,{value:"Module"})),ef=Object.keys(Uf);class Fp extends En{constructor(t,n,o,i){let l=-1;if(super(t,n),Hx(this,"space",i),typeof o=="number")for(;++l<ef.length;){const c=ef[l];Hx(this,ef[l],(o&Uf[c])===Uf[c])}}}Fp.prototype.defined=!0;function Hx(e,t,n){n&&(e[t]=n)}function qs(e){const t={},n={};for(const[o,i]of Object.entries(e.properties)){const l=new Fp(o,e.transform(e.attributes||{},o),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(o)&&(l.mustUseProperty=!0),t[o]=l,n[zf(o)]=o,n[zf(l.attribute)]=o}return new ga(t,n,e.space)}const bw=qs({properties:{ariaActiveDescendant:null,ariaAtomic:Rt,ariaAutoComplete:null,ariaBusy:Rt,ariaChecked:Rt,ariaColCount:ue,ariaColIndex:ue,ariaColSpan:ue,ariaControls:rt,ariaCurrent:null,ariaDescribedBy:rt,ariaDetails:null,ariaDisabled:Rt,ariaDropEffect:rt,ariaErrorMessage:null,ariaExpanded:Rt,ariaFlowTo:rt,ariaGrabbed:Rt,ariaHasPopup:null,ariaHidden:Rt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:rt,ariaLevel:ue,ariaLive:null,ariaModal:Rt,ariaMultiLine:Rt,ariaMultiSelectable:Rt,ariaOrientation:null,ariaOwns:rt,ariaPlaceholder:null,ariaPosInSet:ue,ariaPressed:Rt,ariaReadOnly:Rt,ariaRelevant:null,ariaRequired:Rt,ariaRoleDescription:rt,ariaRowCount:ue,ariaRowIndex:ue,ariaRowSpan:ue,ariaSelected:Rt,ariaSetSize:ue,ariaSort:null,ariaValueMax:ue,ariaValueMin:ue,ariaValueNow:ue,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function ww(e,t){return t in e?e[t]:t}function kw(e,t){return ww(e,t.toLowerCase())}const yT=qs({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Is,acceptCharset:rt,accessKey:rt,action:null,allow:null,allowFullScreen:Fe,allowPaymentRequest:Fe,allowUserMedia:Fe,alt:null,as:null,async:Fe,autoCapitalize:null,autoComplete:rt,autoFocus:Fe,autoPlay:Fe,blocking:rt,capture:null,charSet:null,checked:Fe,cite:null,className:rt,cols:ue,colSpan:null,content:null,contentEditable:Rt,controls:Fe,controlsList:rt,coords:ue|Is,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Fe,defer:Fe,dir:null,dirName:null,disabled:Fe,download:Bf,draggable:Rt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Fe,formTarget:null,headers:rt,height:ue,hidden:Bf,high:ue,href:null,hrefLang:null,htmlFor:rt,httpEquiv:rt,id:null,imageSizes:null,imageSrcSet:null,inert:Fe,inputMode:null,integrity:null,is:null,isMap:Fe,itemId:null,itemProp:rt,itemRef:rt,itemScope:Fe,itemType:rt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Fe,low:ue,manifest:null,max:null,maxLength:ue,media:null,method:null,min:null,minLength:ue,multiple:Fe,muted:Fe,name:null,nonce:null,noModule:Fe,noValidate:Fe,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:Fe,optimum:ue,pattern:null,ping:rt,placeholder:null,playsInline:Fe,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Fe,referrerPolicy:null,rel:rt,required:Fe,reversed:Fe,rows:ue,rowSpan:ue,sandbox:rt,scope:null,scoped:Fe,seamless:Fe,selected:Fe,shadowRootClonable:Fe,shadowRootDelegatesFocus:Fe,shadowRootMode:null,shape:null,size:ue,sizes:null,slot:null,span:ue,spellCheck:Rt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ue,step:null,style:null,tabIndex:ue,target:null,title:null,translate:null,type:null,typeMustMatch:Fe,useMap:null,value:Rt,width:ue,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:rt,axis:null,background:null,bgColor:null,border:ue,borderColor:null,bottomMargin:ue,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Fe,declare:Fe,event:null,face:null,frame:null,frameBorder:null,hSpace:ue,leftMargin:ue,link:null,longDesc:null,lowSrc:null,marginHeight:ue,marginWidth:ue,noResize:Fe,noHref:Fe,noShade:Fe,noWrap:Fe,object:null,profile:null,prompt:null,rev:null,rightMargin:ue,rules:null,scheme:null,scrolling:Rt,standby:null,summary:null,text:null,topMargin:ue,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ue,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Fe,disableRemotePlayback:Fe,prefix:null,property:null,results:ue,security:null,unselectable:null},space:"html",transform:kw}),vT=qs({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:_n,accentHeight:ue,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ue,amplitude:ue,arabicForm:null,ascent:ue,attributeName:null,attributeType:null,azimuth:ue,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ue,by:null,calcMode:null,capHeight:ue,className:rt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ue,diffuseConstant:ue,direction:null,display:null,dur:null,divisor:ue,dominantBaseline:null,download:Fe,dx:null,dy:null,edgeMode:null,editable:null,elevation:ue,enableBackground:null,end:null,event:null,exponent:ue,externalResourcesRequired:null,fill:null,fillOpacity:ue,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:Is,g2:Is,glyphName:Is,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ue,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ue,horizOriginX:ue,horizOriginY:ue,id:null,ideographic:ue,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ue,k:ue,k1:ue,k2:ue,k3:ue,k4:ue,kernelMatrix:_n,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ue,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:ue,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:ue,overlineThickness:ue,paintOrder:null,panose1:null,path:null,pathLength:ue,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:rt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ue,pointsAtY:ue,pointsAtZ:ue,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:_n,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:_n,rev:_n,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:_n,requiredFeatures:_n,requiredFonts:_n,requiredFormats:_n,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:ue,specularExponent:ue,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ue,strikethroughThickness:ue,string:null,stroke:null,strokeDashArray:_n,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ue,strokeOpacity:ue,strokeWidth:null,style:null,surfaceScale:ue,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:_n,tabIndex:ue,tableValues:null,target:null,targetX:ue,targetY:ue,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:_n,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ue,underlineThickness:ue,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ue,values:null,vAlphabetic:ue,vMathematical:ue,vectorEffect:null,vHanging:ue,vIdeographic:ue,version:null,vertAdvY:ue,vertOriginX:ue,vertOriginY:ue,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ue,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:ww}),jw=qs({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()}}),Sw=qs({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:kw}),Cw=qs({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),bT={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"},wT=/[A-Z]/g,Wx=/-[a-z]/g,kT=/^data[-\w.:]+$/i;function jT(e,t){const n=zf(t);let o=t,i=En;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&kT.test(t)){if(t.charAt(4)==="-"){const l=t.slice(5).replace(Wx,CT);o="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=t.slice(4);if(!Wx.test(l)){let c=l.replace(wT,ST);c.charAt(0)!=="-"&&(c="-"+c),t="data"+c}}i=Fp}return new i(o,t)}function ST(e){return"-"+e.toLowerCase()}function CT(e){return e.charAt(1).toUpperCase()}const NT=vw([bw,yT,jw,Sw,Cw],"html"),zp=vw([bw,vT,jw,Sw,Cw],"svg");function ET(e){return e.join(" ").trim()}var Cs={},tf,Vx;function PT(){if(Vx)return tf;Vx=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,o=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,d=/^\s+|\s+$/g,p=`
|
|
441
|
+
`,m="/",h="*",x="",v="comment",b="declaration";function N(j,S){if(typeof j!="string")throw new TypeError("First argument must be a string");if(!j)return[];S=S||{};var T=1,R=1;function D(ee){var $=ee.match(t);$&&(T+=$.length);var I=ee.lastIndexOf(p);R=~I?ee.length-I:R+ee.length}function M(){var ee={line:T,column:R};return function($){return $.position=new P(ee),J(),$}}function P(ee){this.start=ee,this.end={line:T,column:R},this.source=S.source}P.prototype.content=j;function L(ee){var $=new Error(S.source+":"+T+":"+R+": "+ee);if($.reason=ee,$.filename=S.source,$.line=T,$.column=R,$.source=j,!S.silent)throw $}function _(ee){var $=ee.exec(j);if($){var I=$[0];return D(I),j=j.slice(I.length),$}}function J(){_(n)}function ne(ee){var $;for(ee=ee||[];$=U();)$!==!1&&ee.push($);return ee}function U(){var ee=M();if(!(m!=j.charAt(0)||h!=j.charAt(1))){for(var $=2;x!=j.charAt($)&&(h!=j.charAt($)||m!=j.charAt($+1));)++$;if($+=2,x===j.charAt($-1))return L("End of comment missing");var I=j.slice(2,$-2);return R+=2,D(I),j=j.slice($),R+=2,ee({type:v,comment:I})}}function G(){var ee=M(),$=_(o);if($){if(U(),!_(i))return L("property missing ':'");var I=_(l),A=ee({type:b,property:k($[0].replace(e,x)),value:I?k(I[0].replace(e,x)):x});return _(c),A}}function q(){var ee=[];ne(ee);for(var $;$=G();)$!==!1&&(ee.push($),ne(ee));return ee}return J(),q()}function k(j){return j?j.replace(d,x):x}return tf=N,tf}var qx;function TT(){if(qx)return Cs;qx=1;var e=Cs&&Cs.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(Cs,"__esModule",{value:!0}),Cs.default=n;const t=e(PT());function n(o,i){let l=null;if(!o||typeof o!="string")return l;const c=(0,t.default)(o),d=typeof i=="function";return c.forEach(p=>{if(p.type!=="declaration")return;const{property:m,value:h}=p;d?i(m,h,p):h&&(l=l||{},l[m]=h)}),l}return Cs}var $i={},Kx;function RT(){if(Kx)return $i;Kx=1,Object.defineProperty($i,"__esModule",{value:!0}),$i.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,o=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,l=function(m){return!m||n.test(m)||e.test(m)},c=function(m,h){return h.toUpperCase()},d=function(m,h){return"".concat(h,"-")},p=function(m,h){return h===void 0&&(h={}),l(m)?m:(m=m.toLowerCase(),h.reactCompat?m=m.replace(i,d):m=m.replace(o,d),m.replace(t,c))};return $i.camelCase=p,$i}var Fi,Gx;function AT(){if(Gx)return Fi;Gx=1;var e=Fi&&Fi.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(TT()),n=RT();function o(i,l){var c={};return!i||typeof i!="string"||(0,t.default)(i,function(d,p){d&&p&&(c[(0,n.camelCase)(d,l)]=p)}),c}return o.default=o,Fi=o,Fi}var DT=AT();const IT=yc(DT),Nw=Ew("end"),Bp=Ew("start");function Ew(e){return t;function t(n){const o=n&&n.position&&n.position[e]||{};if(typeof o.line=="number"&&o.line>0&&typeof o.column=="number"&&o.column>0)return{line:o.line,column:o.column,offset:typeof o.offset=="number"&&o.offset>-1?o.offset:void 0}}}function LT(e){const t=Bp(e),n=Nw(e);if(t&&n)return{start:t,end:n}}function qi(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Yx(e.position):"start"in e||"end"in e?Yx(e):"line"in e||"column"in e?Hf(e):""}function Hf(e){return Xx(e&&e.line)+":"+Xx(e&&e.column)}function Yx(e){return Hf(e&&e.start)+"-"+Hf(e&&e.end)}function Xx(e){return e&&typeof e=="number"?e:1}class un extends Error{constructor(t,n,o){super(),typeof n=="string"&&(o=n,n=void 0);let i="",l={},c=!1;if(n&&("line"in n&&"column"in n?l={place:n}:"start"in n&&"end"in n?l={place:n}:"type"in n?l={ancestors:[n],place:n.position}:l={...n}),typeof t=="string"?i=t:!l.cause&&t&&(c=!0,i=t.message,l.cause=t),!l.ruleId&&!l.source&&typeof o=="string"){const p=o.indexOf(":");p===-1?l.ruleId=o:(l.source=o.slice(0,p),l.ruleId=o.slice(p+1))}if(!l.place&&l.ancestors&&l.ancestors){const p=l.ancestors[l.ancestors.length-1];p&&(l.place=p.position)}const d=l.place&&"start"in l.place?l.place.start:l.place;this.ancestors=l.ancestors||void 0,this.cause=l.cause||void 0,this.column=d?d.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=d?d.line:void 0,this.name=qi(l.place)||"1:1",this.place=l.place||void 0,this.reason=this.message,this.ruleId=l.ruleId||void 0,this.source=l.source||void 0,this.stack=c&&l.cause&&typeof l.cause.stack=="string"?l.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}un.prototype.file="";un.prototype.name="";un.prototype.reason="";un.prototype.message="";un.prototype.stack="";un.prototype.column=void 0;un.prototype.line=void 0;un.prototype.ancestors=void 0;un.prototype.cause=void 0;un.prototype.fatal=void 0;un.prototype.place=void 0;un.prototype.ruleId=void 0;un.prototype.source=void 0;const Up={}.hasOwnProperty,OT=new Map,_T=/[A-Z]/g,MT=new Set(["table","tbody","thead","tfoot","tr"]),$T=new Set(["td","th"]),Pw="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function FT(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let o;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");o=KT(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");o=qT(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:o,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"?zp:NT,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},l=Tw(i,e,void 0);return l&&typeof l!="string"?l:i.create(e,i.Fragment,{children:l||void 0},void 0)}function Tw(e,t,n){if(t.type==="element")return zT(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return BT(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return HT(e,t,n);if(t.type==="mdxjsEsm")return UT(e,t);if(t.type==="root")return WT(e,t,n);if(t.type==="text")return VT(e,t)}function zT(e,t,n){const o=e.schema;let i=o;t.tagName.toLowerCase()==="svg"&&o.space==="html"&&(i=zp,e.schema=i),e.ancestors.push(t);const l=Aw(e,t.tagName,!1),c=GT(e,t);let d=Wp(e,t);return MT.has(t.tagName)&&(d=d.filter(function(p){return typeof p=="string"?!gT(p):!0})),Rw(e,c,l,t),Hp(c,d),e.ancestors.pop(),e.schema=o,e.create(t,l,c,n)}function BT(e,t){if(t.data&&t.data.estree&&e.evaluater){const o=t.data.estree.body[0];return o.type,e.evaluater.evaluateExpression(o.expression)}ra(e,t.position)}function UT(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ra(e,t.position)}function HT(e,t,n){const o=e.schema;let i=o;t.name==="svg"&&o.space==="html"&&(i=zp,e.schema=i),e.ancestors.push(t);const l=t.name===null?e.Fragment:Aw(e,t.name,!0),c=YT(e,t),d=Wp(e,t);return Rw(e,c,l,t),Hp(c,d),e.ancestors.pop(),e.schema=o,e.create(t,l,c,n)}function WT(e,t,n){const o={};return Hp(o,Wp(e,t)),e.create(t,e.Fragment,o,n)}function VT(e,t){return t.value}function Rw(e,t,n,o){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=o)}function Hp(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function qT(e,t,n){return o;function o(i,l,c,d){const m=Array.isArray(c.children)?n:t;return d?m(l,c,d):m(l,c)}}function KT(e,t){return n;function n(o,i,l,c){const d=Array.isArray(l.children),p=Bp(o);return t(i,l,c,d,{columnNumber:p?p.column-1:void 0,fileName:e,lineNumber:p?p.line:void 0},void 0)}}function GT(e,t){const n={};let o,i;for(i in t.properties)if(i!=="children"&&Up.call(t.properties,i)){const l=XT(e,i,t.properties[i]);if(l){const[c,d]=l;e.tableCellAlignToStyle&&c==="align"&&typeof d=="string"&&$T.has(t.tagName)?o=d:n[c]=d}}if(o){const l=n.style||(n.style={});l[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=o}return n}function YT(e,t){const n={};for(const o of t.attributes)if(o.type==="mdxJsxExpressionAttribute")if(o.data&&o.data.estree&&e.evaluater){const l=o.data.estree.body[0];l.type;const c=l.expression;c.type;const d=c.properties[0];d.type,Object.assign(n,e.evaluater.evaluateExpression(d.argument))}else ra(e,t.position);else{const i=o.name;let l;if(o.value&&typeof o.value=="object")if(o.value.data&&o.value.data.estree&&e.evaluater){const d=o.value.data.estree.body[0];d.type,l=e.evaluater.evaluateExpression(d.expression)}else ra(e,t.position);else l=o.value===null?!0:o.value;n[i]=l}return n}function Wp(e,t){const n=[];let o=-1;const i=e.passKeys?new Map:OT;for(;++o<t.children.length;){const l=t.children[o];let c;if(e.passKeys){const p=l.type==="element"?l.tagName:l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement"?l.name:void 0;if(p){const m=i.get(p)||0;c=p+"-"+m,i.set(p,m+1)}}const d=Tw(e,l,c);d!==void 0&&n.push(d)}return n}function XT(e,t,n){const o=jT(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=o.commaSeparated?dT(n):ET(n)),o.property==="style"){let i=typeof n=="object"?n:QT(e,String(n));return e.stylePropertyNameCase==="css"&&(i=JT(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&o.space?bT[o.property]||o.property:o.attribute,n]}}function QT(e,t){try{return IT(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const o=n,i=new un("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:o,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=Pw+"#cannot-parse-style-attribute",i}}function Aw(e,t,n){let o;if(!n)o={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let l=-1,c;for(;++l<i.length;){const d=Bx(i[l])?{type:"Identifier",name:i[l]}:{type:"Literal",value:i[l]};c=c?{type:"MemberExpression",object:c,property:d,computed:!!(l&&d.type==="Literal"),optional:!1}:d}o=c}else o=Bx(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(o.type==="Literal"){const i=o.value;return Up.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(o);ra(e)}function ra(e,t){const n=new un("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=Pw+"#cannot-handle-mdx-estrees-without-createevaluater",n}function JT(e){const t={};let n;for(n in e)Up.call(e,n)&&(t[ZT(n)]=e[n]);return t}function ZT(e){let t=e.replace(_T,eR);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function eR(e){return"-"+e.toLowerCase()}const nf={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"]},tR={};function nR(e,t){const n=tR,o=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Dw(e,o,i)}function Dw(e,t,n){if(rR(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 Qx(e.children,t,n)}return Array.isArray(e)?Qx(e,t,n):""}function Qx(e,t,n){const o=[];let i=-1;for(;++i<e.length;)o[i]=Dw(e[i],t,n);return o.join("")}function rR(e){return!!(e&&typeof e=="object")}const Jx=document.createElement("i");function Vp(e){const t="&"+e+";";Jx.innerHTML=t;const n=Jx.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Er(e,t,n,o){const i=e.length;let l=0,c;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,o.length<1e4)c=Array.from(o),c.unshift(t,n),e.splice(...c);else for(n&&e.splice(t,n);l<o.length;)c=o.slice(l,l+1e4),c.unshift(t,0),e.splice(...c),l+=1e4,t+=1e4}function Qn(e,t){return e.length>0?(Er(e,e.length,0,t),e):t}const Zx={}.hasOwnProperty;function oR(e){const t={};let n=-1;for(;++n<e.length;)sR(t,e[n]);return t}function sR(e,t){let n;for(n in t){const i=(Zx.call(e,n)?e[n]:void 0)||(e[n]={}),l=t[n];let c;if(l)for(c in l){Zx.call(i,c)||(i[c]=[]);const d=l[c];iR(i[c],Array.isArray(d)?d:d?[d]:[])}}}function iR(e,t){let n=-1;const o=[];for(;++n<t.length;)(t[n].add==="after"?e:o).push(t[n]);Er(e,0,0,o)}function Iw(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 Ls(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const kr=Po(/[A-Za-z]/),$n=Po(/[\dA-Za-z]/),aR=Po(/[#-'*+\--9=?A-Z^-~]/);function Wf(e){return e!==null&&(e<32||e===127)}const Vf=Po(/\d/),lR=Po(/[\dA-Fa-f]/),cR=Po(/[!-/:-@[-`{-~]/);function Le(e){return e!==null&&e<-2}function Nn(e){return e!==null&&(e<0||e===32)}function qe(e){return e===-2||e===-1||e===32}const uR=Po(new RegExp("\\p{P}|\\p{S}","u")),dR=Po(/\s/);function Po(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Ks(e){const t=[];let n=-1,o=0,i=0;for(;++n<e.length;){const l=e.charCodeAt(n);let c="";if(l===37&&$n(e.charCodeAt(n+1))&&$n(e.charCodeAt(n+2)))i=2;else if(l<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(l))||(c=String.fromCharCode(l));else if(l>55295&&l<57344){const d=e.charCodeAt(n+1);l<56320&&d>56319&&d<57344?(c=String.fromCharCode(l,d),i=1):c="�"}else c=String.fromCharCode(l);c&&(t.push(e.slice(o,n),encodeURIComponent(c)),o=n+i+1,c=""),i&&(n+=i,i=0)}return t.join("")+e.slice(o)}function ot(e,t,n,o){const i=o?o-1:Number.POSITIVE_INFINITY;let l=0;return c;function c(p){return qe(p)?(e.enter(n),d(p)):t(p)}function d(p){return qe(p)&&l++<i?(e.consume(p),d):(e.exit(n),t(p))}}const fR={tokenize:pR};function pR(e){const t=e.attempt(this.parser.constructs.contentInitial,o,i);let n;return t;function o(d){if(d===null){e.consume(d);return}return e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),ot(e,t,"linePrefix")}function i(d){return e.enter("paragraph"),l(d)}function l(d){const p=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=p),n=p,c(d)}function c(d){if(d===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(d);return}return Le(d)?(e.consume(d),e.exit("chunkText"),l):(e.consume(d),c)}}const hR={tokenize:mR},ey={tokenize:gR};function mR(e){const t=this,n=[];let o=0,i,l,c;return d;function d(R){if(o<n.length){const D=n[o];return t.containerState=D[1],e.attempt(D[0].continuation,p,m)(R)}return m(R)}function p(R){if(o++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&T();const D=t.events.length;let M=D,P;for(;M--;)if(t.events[M][0]==="exit"&&t.events[M][1].type==="chunkFlow"){P=t.events[M][1].end;break}S(o);let L=D;for(;L<t.events.length;)t.events[L][1].end={...P},L++;return Er(t.events,M+1,0,t.events.slice(D)),t.events.length=L,m(R)}return d(R)}function m(R){if(o===n.length){if(!i)return v(R);if(i.currentConstruct&&i.currentConstruct.concrete)return N(R);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(ey,h,x)(R)}function h(R){return i&&T(),S(o),v(R)}function x(R){return t.parser.lazy[t.now().line]=o!==n.length,c=t.now().offset,N(R)}function v(R){return t.containerState={},e.attempt(ey,b,N)(R)}function b(R){return o++,n.push([t.currentConstruct,t.containerState]),v(R)}function N(R){if(R===null){i&&T(),S(0),e.consume(R);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:l}),k(R)}function k(R){if(R===null){j(e.exit("chunkFlow"),!0),S(0),e.consume(R);return}return Le(R)?(e.consume(R),j(e.exit("chunkFlow")),o=0,t.interrupt=void 0,d):(e.consume(R),k)}function j(R,D){const M=t.sliceStream(R);if(D&&M.push(null),R.previous=l,l&&(l.next=R),l=R,i.defineSkip(R.start),i.write(M),t.parser.lazy[R.start.line]){let P=i.events.length;for(;P--;)if(i.events[P][1].start.offset<c&&(!i.events[P][1].end||i.events[P][1].end.offset>c))return;const L=t.events.length;let _=L,J,ne;for(;_--;)if(t.events[_][0]==="exit"&&t.events[_][1].type==="chunkFlow"){if(J){ne=t.events[_][1].end;break}J=!0}for(S(o),P=L;P<t.events.length;)t.events[P][1].end={...ne},P++;Er(t.events,_+1,0,t.events.slice(L)),t.events.length=P}}function S(R){let D=n.length;for(;D-- >R;){const M=n[D];t.containerState=M[1],M[0].exit.call(t,e)}n.length=R}function T(){i.write([null]),l=void 0,i=void 0,t.containerState._closeFlow=void 0}}function gR(e,t,n){return ot(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ty(e){if(e===null||Nn(e)||dR(e))return 1;if(uR(e))return 2}function qp(e,t,n){const o=[];let i=-1;for(;++i<e.length;){const l=e[i].resolveAll;l&&!o.includes(l)&&(t=l(t,n),o.push(l))}return t}const qf={name:"attention",resolveAll:xR,tokenize:yR};function xR(e,t){let n=-1,o,i,l,c,d,p,m,h;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(o=n;o--;)if(e[o][0]==="exit"&&e[o][1].type==="attentionSequence"&&e[o][1]._open&&t.sliceSerialize(e[o][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[o][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[o][1].end.offset-e[o][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;p=e[o][1].end.offset-e[o][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const x={...e[o][1].end},v={...e[n][1].start};ny(x,-p),ny(v,p),c={type:p>1?"strongSequence":"emphasisSequence",start:x,end:{...e[o][1].end}},d={type:p>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:v},l={type:p>1?"strongText":"emphasisText",start:{...e[o][1].end},end:{...e[n][1].start}},i={type:p>1?"strong":"emphasis",start:{...c.start},end:{...d.end}},e[o][1].end={...c.start},e[n][1].start={...d.end},m=[],e[o][1].end.offset-e[o][1].start.offset&&(m=Qn(m,[["enter",e[o][1],t],["exit",e[o][1],t]])),m=Qn(m,[["enter",i,t],["enter",c,t],["exit",c,t],["enter",l,t]]),m=Qn(m,qp(t.parser.constructs.insideSpan.null,e.slice(o+1,n),t)),m=Qn(m,[["exit",l,t],["enter",d,t],["exit",d,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(h=2,m=Qn(m,[["enter",e[n][1],t],["exit",e[n][1],t]])):h=0,Er(e,o-1,n-o+3,m),n=o+m.length-h-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function yR(e,t){const n=this.parser.constructs.attentionMarkers.null,o=this.previous,i=ty(o);let l;return c;function c(p){return l=p,e.enter("attentionSequence"),d(p)}function d(p){if(p===l)return e.consume(p),d;const m=e.exit("attentionSequence"),h=ty(p),x=!h||h===2&&i||n.includes(p),v=!i||i===2&&h||n.includes(o);return m._open=!!(l===42?x:x&&(i||!v)),m._close=!!(l===42?v:v&&(h||!x)),t(p)}}function ny(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const vR={name:"autolink",tokenize:bR};function bR(e,t,n){let o=0;return i;function i(b){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),l}function l(b){return kr(b)?(e.consume(b),c):b===64?n(b):m(b)}function c(b){return b===43||b===45||b===46||$n(b)?(o=1,d(b)):m(b)}function d(b){return b===58?(e.consume(b),o=0,p):(b===43||b===45||b===46||$n(b))&&o++<32?(e.consume(b),d):(o=0,m(b))}function p(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||Wf(b)?n(b):(e.consume(b),p)}function m(b){return b===64?(e.consume(b),h):aR(b)?(e.consume(b),m):n(b)}function h(b){return $n(b)?x(b):n(b)}function x(b){return b===46?(e.consume(b),o=0,h):b===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),t):v(b)}function v(b){if((b===45||$n(b))&&o++<63){const N=b===45?v:x;return e.consume(b),N}return n(b)}}const Ic={partial:!0,tokenize:wR};function wR(e,t,n){return o;function o(l){return qe(l)?ot(e,i,"linePrefix")(l):i(l)}function i(l){return l===null||Le(l)?t(l):n(l)}}const Lw={continuation:{tokenize:jR},exit:SR,name:"blockQuote",tokenize:kR};function kR(e,t,n){const o=this;return i;function i(c){if(c===62){const d=o.containerState;return d.open||(e.enter("blockQuote",{_container:!0}),d.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(c),e.exit("blockQuoteMarker"),l}return n(c)}function l(c){return qe(c)?(e.enter("blockQuotePrefixWhitespace"),e.consume(c),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(c))}}function jR(e,t,n){const o=this;return i;function i(c){return qe(c)?ot(e,l,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):l(c)}function l(c){return e.attempt(Lw,t,n)(c)}}function SR(e){e.exit("blockQuote")}const Ow={name:"characterEscape",tokenize:CR};function CR(e,t,n){return o;function o(l){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(l),e.exit("escapeMarker"),i}function i(l){return cR(l)?(e.enter("characterEscapeValue"),e.consume(l),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(l)}}const _w={name:"characterReference",tokenize:NR};function NR(e,t,n){const o=this;let i=0,l,c;return d;function d(x){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(x),e.exit("characterReferenceMarker"),p}function p(x){return x===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(x),e.exit("characterReferenceMarkerNumeric"),m):(e.enter("characterReferenceValue"),l=31,c=$n,h(x))}function m(x){return x===88||x===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(x),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),l=6,c=lR,h):(e.enter("characterReferenceValue"),l=7,c=Vf,h(x))}function h(x){if(x===59&&i){const v=e.exit("characterReferenceValue");return c===$n&&!Vp(o.sliceSerialize(v))?n(x):(e.enter("characterReferenceMarker"),e.consume(x),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return c(x)&&i++<l?(e.consume(x),h):n(x)}}const ry={partial:!0,tokenize:PR},oy={concrete:!0,name:"codeFenced",tokenize:ER};function ER(e,t,n){const o=this,i={partial:!0,tokenize:M};let l=0,c=0,d;return p;function p(P){return m(P)}function m(P){const L=o.events[o.events.length-1];return l=L&&L[1].type==="linePrefix"?L[2].sliceSerialize(L[1],!0).length:0,d=P,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),h(P)}function h(P){return P===d?(c++,e.consume(P),h):c<3?n(P):(e.exit("codeFencedFenceSequence"),qe(P)?ot(e,x,"whitespace")(P):x(P))}function x(P){return P===null||Le(P)?(e.exit("codeFencedFence"),o.interrupt?t(P):e.check(ry,k,D)(P)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),v(P))}function v(P){return P===null||Le(P)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),x(P)):qe(P)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),ot(e,b,"whitespace")(P)):P===96&&P===d?n(P):(e.consume(P),v)}function b(P){return P===null||Le(P)?x(P):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),N(P))}function N(P){return P===null||Le(P)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),x(P)):P===96&&P===d?n(P):(e.consume(P),N)}function k(P){return e.attempt(i,D,j)(P)}function j(P){return e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),S}function S(P){return l>0&&qe(P)?ot(e,T,"linePrefix",l+1)(P):T(P)}function T(P){return P===null||Le(P)?e.check(ry,k,D)(P):(e.enter("codeFlowValue"),R(P))}function R(P){return P===null||Le(P)?(e.exit("codeFlowValue"),T(P)):(e.consume(P),R)}function D(P){return e.exit("codeFenced"),t(P)}function M(P,L,_){let J=0;return ne;function ne($){return P.enter("lineEnding"),P.consume($),P.exit("lineEnding"),U}function U($){return P.enter("codeFencedFence"),qe($)?ot(P,G,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)($):G($)}function G($){return $===d?(P.enter("codeFencedFenceSequence"),q($)):_($)}function q($){return $===d?(J++,P.consume($),q):J>=c?(P.exit("codeFencedFenceSequence"),qe($)?ot(P,ee,"whitespace")($):ee($)):_($)}function ee($){return $===null||Le($)?(P.exit("codeFencedFence"),L($)):_($)}}}function PR(e,t,n){const o=this;return i;function i(c){return c===null?n(c):(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),l)}function l(c){return o.parser.lazy[o.now().line]?n(c):t(c)}}const rf={name:"codeIndented",tokenize:RR},TR={partial:!0,tokenize:AR};function RR(e,t,n){const o=this;return i;function i(m){return e.enter("codeIndented"),ot(e,l,"linePrefix",5)(m)}function l(m){const h=o.events[o.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?c(m):n(m)}function c(m){return m===null?p(m):Le(m)?e.attempt(TR,c,p)(m):(e.enter("codeFlowValue"),d(m))}function d(m){return m===null||Le(m)?(e.exit("codeFlowValue"),c(m)):(e.consume(m),d)}function p(m){return e.exit("codeIndented"),t(m)}}function AR(e,t,n){const o=this;return i;function i(c){return o.parser.lazy[o.now().line]?n(c):Le(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),i):ot(e,l,"linePrefix",5)(c)}function l(c){const d=o.events[o.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?t(c):Le(c)?i(c):n(c)}}const DR={name:"codeText",previous:LR,resolve:IR,tokenize:OR};function IR(e){let t=e.length-4,n=3,o,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(o=n;++o<t;)if(e[o][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(o=n-1,t++;++o<=t;)i===void 0?o!==t&&e[o][1].type!=="lineEnding"&&(i=o):(o===t||e[o][1].type==="lineEnding")&&(e[i][1].type="codeTextData",o!==i+2&&(e[i][1].end=e[o-1][1].end,e.splice(i+2,o-i-2),t-=o-i-2,o=i+2),i=void 0);return e}function LR(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function OR(e,t,n){let o=0,i,l;return c;function c(x){return e.enter("codeText"),e.enter("codeTextSequence"),d(x)}function d(x){return x===96?(e.consume(x),o++,d):(e.exit("codeTextSequence"),p(x))}function p(x){return x===null?n(x):x===32?(e.enter("space"),e.consume(x),e.exit("space"),p):x===96?(l=e.enter("codeTextSequence"),i=0,h(x)):Le(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),p):(e.enter("codeTextData"),m(x))}function m(x){return x===null||x===32||x===96||Le(x)?(e.exit("codeTextData"),p(x)):(e.consume(x),m)}function h(x){return x===96?(e.consume(x),i++,h):i===o?(e.exit("codeTextSequence"),e.exit("codeText"),t(x)):(l.type="codeTextData",m(x))}}class _R{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 o=n??Number.POSITIVE_INFINITY;return o<this.left.length?this.left.slice(t,o):t>this.left.length?this.right.slice(this.right.length-o+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-o+this.left.length).reverse())}splice(t,n,o){const i=n||0;this.setCursor(Math.trunc(t));const l=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return o&&zi(this.left,o),l.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),zi(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),zi(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);zi(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);zi(this.left,n.reverse())}}}function zi(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 Mw(e){const t={};let n=-1,o,i,l,c,d,p,m;const h=new _R(e);for(;++n<h.length;){for(;n in t;)n=t[n];if(o=h.get(n),n&&o[1].type==="chunkFlow"&&h.get(n-1)[1].type==="listItemPrefix"&&(p=o[1]._tokenizer.events,l=0,l<p.length&&p[l][1].type==="lineEndingBlank"&&(l+=2),l<p.length&&p[l][1].type==="content"))for(;++l<p.length&&p[l][1].type!=="content";)p[l][1].type==="chunkText"&&(p[l][1]._isInFirstContentOfListItem=!0,l++);if(o[0]==="enter")o[1].contentType&&(Object.assign(t,MR(h,n)),n=t[n],m=!0);else if(o[1]._container){for(l=n,i=void 0;l--;)if(c=h.get(l),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(i&&(h.get(i)[1].type="lineEndingBlank"),c[1].type="lineEnding",i=l);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;i&&(o[1].end={...h.get(i)[1].start},d=h.slice(i,n),d.unshift(o),h.splice(i,n-i+1,d))}}return Er(e,0,Number.POSITIVE_INFINITY,h.slice(0)),!m}function MR(e,t){const n=e.get(t)[1],o=e.get(t)[2];let i=t-1;const l=[];let c=n._tokenizer;c||(c=o.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const d=c.events,p=[],m={};let h,x,v=-1,b=n,N=0,k=0;const j=[k];for(;b;){for(;e.get(++i)[1]!==b;);l.push(i),b._tokenizer||(h=o.sliceStream(b),b.next||h.push(null),x&&c.defineSkip(b.start),b._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(h),b._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),x=b,b=b.next}for(b=n;++v<d.length;)d[v][0]==="exit"&&d[v-1][0]==="enter"&&d[v][1].type===d[v-1][1].type&&d[v][1].start.line!==d[v][1].end.line&&(k=v+1,j.push(k),b._tokenizer=void 0,b.previous=void 0,b=b.next);for(c.events=[],b?(b._tokenizer=void 0,b.previous=void 0):j.pop(),v=j.length;v--;){const S=d.slice(j[v],j[v+1]),T=l.pop();p.push([T,T+S.length-1]),e.splice(T,2,S)}for(p.reverse(),v=-1;++v<p.length;)m[N+p[v][0]]=N+p[v][1],N+=p[v][1]-p[v][0]-1;return m}const $R={resolve:zR,tokenize:BR},FR={partial:!0,tokenize:UR};function zR(e){return Mw(e),e}function BR(e,t){let n;return o;function o(d){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(d)}function i(d){return d===null?l(d):Le(d)?e.check(FR,c,l)(d):(e.consume(d),i)}function l(d){return e.exit("chunkContent"),e.exit("content"),t(d)}function c(d){return e.consume(d),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function UR(e,t,n){const o=this;return i;function i(c){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),ot(e,l,"linePrefix")}function l(c){if(c===null||Le(c))return n(c);const d=o.events[o.events.length-1];return!o.parser.constructs.disable.null.includes("codeIndented")&&d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?t(c):e.interrupt(o.parser.constructs.flow,n,t)(c)}}function $w(e,t,n,o,i,l,c,d,p){const m=p||Number.POSITIVE_INFINITY;let h=0;return x;function x(S){return S===60?(e.enter(o),e.enter(i),e.enter(l),e.consume(S),e.exit(l),v):S===null||S===32||S===41||Wf(S)?n(S):(e.enter(o),e.enter(c),e.enter(d),e.enter("chunkString",{contentType:"string"}),k(S))}function v(S){return S===62?(e.enter(l),e.consume(S),e.exit(l),e.exit(i),e.exit(o),t):(e.enter(d),e.enter("chunkString",{contentType:"string"}),b(S))}function b(S){return S===62?(e.exit("chunkString"),e.exit(d),v(S)):S===null||S===60||Le(S)?n(S):(e.consume(S),S===92?N:b)}function N(S){return S===60||S===62||S===92?(e.consume(S),b):b(S)}function k(S){return!h&&(S===null||S===41||Nn(S))?(e.exit("chunkString"),e.exit(d),e.exit(c),e.exit(o),t(S)):h<m&&S===40?(e.consume(S),h++,k):S===41?(e.consume(S),h--,k):S===null||S===32||S===40||Wf(S)?n(S):(e.consume(S),S===92?j:k)}function j(S){return S===40||S===41||S===92?(e.consume(S),k):k(S)}}function Fw(e,t,n,o,i,l){const c=this;let d=0,p;return m;function m(b){return e.enter(o),e.enter(i),e.consume(b),e.exit(i),e.enter(l),h}function h(b){return d>999||b===null||b===91||b===93&&!p||b===94&&!d&&"_hiddenFootnoteSupport"in c.parser.constructs?n(b):b===93?(e.exit(l),e.enter(i),e.consume(b),e.exit(i),e.exit(o),t):Le(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),x(b))}function x(b){return b===null||b===91||b===93||Le(b)||d++>999?(e.exit("chunkString"),h(b)):(e.consume(b),p||(p=!qe(b)),b===92?v:x)}function v(b){return b===91||b===92||b===93?(e.consume(b),d++,x):x(b)}}function zw(e,t,n,o,i,l){let c;return d;function d(v){return v===34||v===39||v===40?(e.enter(o),e.enter(i),e.consume(v),e.exit(i),c=v===40?41:v,p):n(v)}function p(v){return v===c?(e.enter(i),e.consume(v),e.exit(i),e.exit(o),t):(e.enter(l),m(v))}function m(v){return v===c?(e.exit(l),p(c)):v===null?n(v):Le(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),ot(e,m,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(v))}function h(v){return v===c||v===null||Le(v)?(e.exit("chunkString"),m(v)):(e.consume(v),v===92?x:h)}function x(v){return v===c||v===92?(e.consume(v),h):h(v)}}function Ki(e,t){let n;return o;function o(i){return Le(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,o):qe(i)?ot(e,o,n?"linePrefix":"lineSuffix")(i):t(i)}}const HR={name:"definition",tokenize:VR},WR={partial:!0,tokenize:qR};function VR(e,t,n){const o=this;let i;return l;function l(b){return e.enter("definition"),c(b)}function c(b){return Fw.call(o,e,d,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(b)}function d(b){return i=Ls(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)),b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),p):n(b)}function p(b){return Nn(b)?Ki(e,m)(b):m(b)}function m(b){return $w(e,h,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(b)}function h(b){return e.attempt(WR,x,x)(b)}function x(b){return qe(b)?ot(e,v,"whitespace")(b):v(b)}function v(b){return b===null||Le(b)?(e.exit("definition"),o.parser.defined.push(i),t(b)):n(b)}}function qR(e,t,n){return o;function o(d){return Nn(d)?Ki(e,i)(d):n(d)}function i(d){return zw(e,l,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(d)}function l(d){return qe(d)?ot(e,c,"whitespace")(d):c(d)}function c(d){return d===null||Le(d)?t(d):n(d)}}const KR={name:"hardBreakEscape",tokenize:GR};function GR(e,t,n){return o;function o(l){return e.enter("hardBreakEscape"),e.consume(l),i}function i(l){return Le(l)?(e.exit("hardBreakEscape"),t(l)):n(l)}}const YR={name:"headingAtx",resolve:XR,tokenize:QR};function XR(e,t){let n=e.length-2,o=3,i,l;return e[o][1].type==="whitespace"&&(o+=2),n-2>o&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(o===n-1||n-4>o&&e[n-2][1].type==="whitespace")&&(n-=o+1===n?2:4),n>o&&(i={type:"atxHeadingText",start:e[o][1].start,end:e[n][1].end},l={type:"chunkText",start:e[o][1].start,end:e[n][1].end,contentType:"text"},Er(e,o,n-o+1,[["enter",i,t],["enter",l,t],["exit",l,t],["exit",i,t]])),e}function QR(e,t,n){let o=0;return i;function i(h){return e.enter("atxHeading"),l(h)}function l(h){return e.enter("atxHeadingSequence"),c(h)}function c(h){return h===35&&o++<6?(e.consume(h),c):h===null||Nn(h)?(e.exit("atxHeadingSequence"),d(h)):n(h)}function d(h){return h===35?(e.enter("atxHeadingSequence"),p(h)):h===null||Le(h)?(e.exit("atxHeading"),t(h)):qe(h)?ot(e,d,"whitespace")(h):(e.enter("atxHeadingText"),m(h))}function p(h){return h===35?(e.consume(h),p):(e.exit("atxHeadingSequence"),d(h))}function m(h){return h===null||h===35||Nn(h)?(e.exit("atxHeadingText"),d(h)):(e.consume(h),m)}}const JR=["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"],sy=["pre","script","style","textarea"],ZR={concrete:!0,name:"htmlFlow",resolveTo:nA,tokenize:rA},eA={partial:!0,tokenize:sA},tA={partial:!0,tokenize:oA};function nA(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 rA(e,t,n){const o=this;let i,l,c,d,p;return m;function m(O){return h(O)}function h(O){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(O),x}function x(O){return O===33?(e.consume(O),v):O===47?(e.consume(O),l=!0,k):O===63?(e.consume(O),i=3,o.interrupt?t:E):kr(O)?(e.consume(O),c=String.fromCharCode(O),j):n(O)}function v(O){return O===45?(e.consume(O),i=2,b):O===91?(e.consume(O),i=5,d=0,N):kr(O)?(e.consume(O),i=4,o.interrupt?t:E):n(O)}function b(O){return O===45?(e.consume(O),o.interrupt?t:E):n(O)}function N(O){const se="CDATA[";return O===se.charCodeAt(d++)?(e.consume(O),d===se.length?o.interrupt?t:G:N):n(O)}function k(O){return kr(O)?(e.consume(O),c=String.fromCharCode(O),j):n(O)}function j(O){if(O===null||O===47||O===62||Nn(O)){const se=O===47,me=c.toLowerCase();return!se&&!l&&sy.includes(me)?(i=1,o.interrupt?t(O):G(O)):JR.includes(c.toLowerCase())?(i=6,se?(e.consume(O),S):o.interrupt?t(O):G(O)):(i=7,o.interrupt&&!o.parser.lazy[o.now().line]?n(O):l?T(O):R(O))}return O===45||$n(O)?(e.consume(O),c+=String.fromCharCode(O),j):n(O)}function S(O){return O===62?(e.consume(O),o.interrupt?t:G):n(O)}function T(O){return qe(O)?(e.consume(O),T):ne(O)}function R(O){return O===47?(e.consume(O),ne):O===58||O===95||kr(O)?(e.consume(O),D):qe(O)?(e.consume(O),R):ne(O)}function D(O){return O===45||O===46||O===58||O===95||$n(O)?(e.consume(O),D):M(O)}function M(O){return O===61?(e.consume(O),P):qe(O)?(e.consume(O),M):R(O)}function P(O){return O===null||O===60||O===61||O===62||O===96?n(O):O===34||O===39?(e.consume(O),p=O,L):qe(O)?(e.consume(O),P):_(O)}function L(O){return O===p?(e.consume(O),p=null,J):O===null||Le(O)?n(O):(e.consume(O),L)}function _(O){return O===null||O===34||O===39||O===47||O===60||O===61||O===62||O===96||Nn(O)?M(O):(e.consume(O),_)}function J(O){return O===47||O===62||qe(O)?R(O):n(O)}function ne(O){return O===62?(e.consume(O),U):n(O)}function U(O){return O===null||Le(O)?G(O):qe(O)?(e.consume(O),U):n(O)}function G(O){return O===45&&i===2?(e.consume(O),I):O===60&&i===1?(e.consume(O),A):O===62&&i===4?(e.consume(O),B):O===63&&i===3?(e.consume(O),E):O===93&&i===5?(e.consume(O),K):Le(O)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(eA,X,q)(O)):O===null||Le(O)?(e.exit("htmlFlowData"),q(O)):(e.consume(O),G)}function q(O){return e.check(tA,ee,X)(O)}function ee(O){return e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),$}function $(O){return O===null||Le(O)?q(O):(e.enter("htmlFlowData"),G(O))}function I(O){return O===45?(e.consume(O),E):G(O)}function A(O){return O===47?(e.consume(O),c="",F):G(O)}function F(O){if(O===62){const se=c.toLowerCase();return sy.includes(se)?(e.consume(O),B):G(O)}return kr(O)&&c.length<8?(e.consume(O),c+=String.fromCharCode(O),F):G(O)}function K(O){return O===93?(e.consume(O),E):G(O)}function E(O){return O===62?(e.consume(O),B):O===45&&i===2?(e.consume(O),E):G(O)}function B(O){return O===null||Le(O)?(e.exit("htmlFlowData"),X(O)):(e.consume(O),B)}function X(O){return e.exit("htmlFlow"),t(O)}}function oA(e,t,n){const o=this;return i;function i(c){return Le(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),l):n(c)}function l(c){return o.parser.lazy[o.now().line]?n(c):t(c)}}function sA(e,t,n){return o;function o(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Ic,t,n)}}const iA={name:"htmlText",tokenize:aA};function aA(e,t,n){const o=this;let i,l,c;return d;function d(E){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(E),p}function p(E){return E===33?(e.consume(E),m):E===47?(e.consume(E),M):E===63?(e.consume(E),R):kr(E)?(e.consume(E),_):n(E)}function m(E){return E===45?(e.consume(E),h):E===91?(e.consume(E),l=0,N):kr(E)?(e.consume(E),T):n(E)}function h(E){return E===45?(e.consume(E),b):n(E)}function x(E){return E===null?n(E):E===45?(e.consume(E),v):Le(E)?(c=x,A(E)):(e.consume(E),x)}function v(E){return E===45?(e.consume(E),b):x(E)}function b(E){return E===62?I(E):E===45?v(E):x(E)}function N(E){const B="CDATA[";return E===B.charCodeAt(l++)?(e.consume(E),l===B.length?k:N):n(E)}function k(E){return E===null?n(E):E===93?(e.consume(E),j):Le(E)?(c=k,A(E)):(e.consume(E),k)}function j(E){return E===93?(e.consume(E),S):k(E)}function S(E){return E===62?I(E):E===93?(e.consume(E),S):k(E)}function T(E){return E===null||E===62?I(E):Le(E)?(c=T,A(E)):(e.consume(E),T)}function R(E){return E===null?n(E):E===63?(e.consume(E),D):Le(E)?(c=R,A(E)):(e.consume(E),R)}function D(E){return E===62?I(E):R(E)}function M(E){return kr(E)?(e.consume(E),P):n(E)}function P(E){return E===45||$n(E)?(e.consume(E),P):L(E)}function L(E){return Le(E)?(c=L,A(E)):qe(E)?(e.consume(E),L):I(E)}function _(E){return E===45||$n(E)?(e.consume(E),_):E===47||E===62||Nn(E)?J(E):n(E)}function J(E){return E===47?(e.consume(E),I):E===58||E===95||kr(E)?(e.consume(E),ne):Le(E)?(c=J,A(E)):qe(E)?(e.consume(E),J):I(E)}function ne(E){return E===45||E===46||E===58||E===95||$n(E)?(e.consume(E),ne):U(E)}function U(E){return E===61?(e.consume(E),G):Le(E)?(c=U,A(E)):qe(E)?(e.consume(E),U):J(E)}function G(E){return E===null||E===60||E===61||E===62||E===96?n(E):E===34||E===39?(e.consume(E),i=E,q):Le(E)?(c=G,A(E)):qe(E)?(e.consume(E),G):(e.consume(E),ee)}function q(E){return E===i?(e.consume(E),i=void 0,$):E===null?n(E):Le(E)?(c=q,A(E)):(e.consume(E),q)}function ee(E){return E===null||E===34||E===39||E===60||E===61||E===96?n(E):E===47||E===62||Nn(E)?J(E):(e.consume(E),ee)}function $(E){return E===47||E===62||Nn(E)?J(E):n(E)}function I(E){return E===62?(e.consume(E),e.exit("htmlTextData"),e.exit("htmlText"),t):n(E)}function A(E){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),F}function F(E){return qe(E)?ot(e,K,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(E):K(E)}function K(E){return e.enter("htmlTextData"),c(E)}}const Kp={name:"labelEnd",resolveAll:dA,resolveTo:fA,tokenize:pA},lA={tokenize:hA},cA={tokenize:mA},uA={tokenize:gA};function dA(e){let t=-1;const n=[];for(;++t<e.length;){const o=e[t][1];if(n.push(e[t]),o.type==="labelImage"||o.type==="labelLink"||o.type==="labelEnd"){const i=o.type==="labelImage"?4:2;o.type="data",t+=i}}return e.length!==n.length&&Er(e,0,e.length,n),e}function fA(e,t){let n=e.length,o=0,i,l,c,d;for(;n--;)if(i=e[n][1],l){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(c){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(l=n,i.type!=="labelLink")){o=2;break}}else i.type==="labelEnd"&&(c=n);const p={type:e[l][1].type==="labelLink"?"link":"image",start:{...e[l][1].start},end:{...e[e.length-1][1].end}},m={type:"label",start:{...e[l][1].start},end:{...e[c][1].end}},h={type:"labelText",start:{...e[l+o+2][1].end},end:{...e[c-2][1].start}};return d=[["enter",p,t],["enter",m,t]],d=Qn(d,e.slice(l+1,l+o+3)),d=Qn(d,[["enter",h,t]]),d=Qn(d,qp(t.parser.constructs.insideSpan.null,e.slice(l+o+4,c-3),t)),d=Qn(d,[["exit",h,t],e[c-2],e[c-1],["exit",m,t]]),d=Qn(d,e.slice(c+1)),d=Qn(d,[["exit",p,t]]),Er(e,l,e.length,d),e}function pA(e,t,n){const o=this;let i=o.events.length,l,c;for(;i--;)if((o.events[i][1].type==="labelImage"||o.events[i][1].type==="labelLink")&&!o.events[i][1]._balanced){l=o.events[i][1];break}return d;function d(v){return l?l._inactive?x(v):(c=o.parser.defined.includes(Ls(o.sliceSerialize({start:l.end,end:o.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(v),e.exit("labelMarker"),e.exit("labelEnd"),p):n(v)}function p(v){return v===40?e.attempt(lA,h,c?h:x)(v):v===91?e.attempt(cA,h,c?m:x)(v):c?h(v):x(v)}function m(v){return e.attempt(uA,h,x)(v)}function h(v){return t(v)}function x(v){return l._balanced=!0,n(v)}}function hA(e,t,n){return o;function o(x){return e.enter("resource"),e.enter("resourceMarker"),e.consume(x),e.exit("resourceMarker"),i}function i(x){return Nn(x)?Ki(e,l)(x):l(x)}function l(x){return x===41?h(x):$w(e,c,d,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(x)}function c(x){return Nn(x)?Ki(e,p)(x):h(x)}function d(x){return n(x)}function p(x){return x===34||x===39||x===40?zw(e,m,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(x):h(x)}function m(x){return Nn(x)?Ki(e,h)(x):h(x)}function h(x){return x===41?(e.enter("resourceMarker"),e.consume(x),e.exit("resourceMarker"),e.exit("resource"),t):n(x)}}function mA(e,t,n){const o=this;return i;function i(d){return Fw.call(o,e,l,c,"reference","referenceMarker","referenceString")(d)}function l(d){return o.parser.defined.includes(Ls(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)))?t(d):n(d)}function c(d){return n(d)}}function gA(e,t,n){return o;function o(l){return e.enter("reference"),e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),i}function i(l){return l===93?(e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),e.exit("reference"),t):n(l)}}const xA={name:"labelStartImage",resolveAll:Kp.resolveAll,tokenize:yA};function yA(e,t,n){const o=this;return i;function i(d){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(d),e.exit("labelImageMarker"),l}function l(d){return d===91?(e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelImage"),c):n(d)}function c(d){return d===94&&"_hiddenFootnoteSupport"in o.parser.constructs?n(d):t(d)}}const vA={name:"labelStartLink",resolveAll:Kp.resolveAll,tokenize:bA};function bA(e,t,n){const o=this;return i;function i(c){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelLink"),l}function l(c){return c===94&&"_hiddenFootnoteSupport"in o.parser.constructs?n(c):t(c)}}const of={name:"lineEnding",tokenize:wA};function wA(e,t){return n;function n(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),ot(e,t,"linePrefix")}}const Jl={name:"thematicBreak",tokenize:kA};function kA(e,t,n){let o=0,i;return l;function l(m){return e.enter("thematicBreak"),c(m)}function c(m){return i=m,d(m)}function d(m){return m===i?(e.enter("thematicBreakSequence"),p(m)):o>=3&&(m===null||Le(m))?(e.exit("thematicBreak"),t(m)):n(m)}function p(m){return m===i?(e.consume(m),o++,p):(e.exit("thematicBreakSequence"),qe(m)?ot(e,d,"whitespace")(m):d(m))}}const jn={continuation:{tokenize:NA},exit:PA,name:"list",tokenize:CA},jA={partial:!0,tokenize:TA},SA={partial:!0,tokenize:EA};function CA(e,t,n){const o=this,i=o.events[o.events.length-1];let l=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,c=0;return d;function d(b){const N=o.containerState.type||(b===42||b===43||b===45?"listUnordered":"listOrdered");if(N==="listUnordered"?!o.containerState.marker||b===o.containerState.marker:Vf(b)){if(o.containerState.type||(o.containerState.type=N,e.enter(N,{_container:!0})),N==="listUnordered")return e.enter("listItemPrefix"),b===42||b===45?e.check(Jl,n,m)(b):m(b);if(!o.interrupt||b===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),p(b)}return n(b)}function p(b){return Vf(b)&&++c<10?(e.consume(b),p):(!o.interrupt||c<2)&&(o.containerState.marker?b===o.containerState.marker:b===41||b===46)?(e.exit("listItemValue"),m(b)):n(b)}function m(b){return e.enter("listItemMarker"),e.consume(b),e.exit("listItemMarker"),o.containerState.marker=o.containerState.marker||b,e.check(Ic,o.interrupt?n:h,e.attempt(jA,v,x))}function h(b){return o.containerState.initialBlankLine=!0,l++,v(b)}function x(b){return qe(b)?(e.enter("listItemPrefixWhitespace"),e.consume(b),e.exit("listItemPrefixWhitespace"),v):n(b)}function v(b){return o.containerState.size=l+o.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(b)}}function NA(e,t,n){const o=this;return o.containerState._closeFlow=void 0,e.check(Ic,i,l);function i(d){return o.containerState.furtherBlankLines=o.containerState.furtherBlankLines||o.containerState.initialBlankLine,ot(e,t,"listItemIndent",o.containerState.size+1)(d)}function l(d){return o.containerState.furtherBlankLines||!qe(d)?(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,c(d)):(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,e.attempt(SA,t,c)(d))}function c(d){return o.containerState._closeFlow=!0,o.interrupt=void 0,ot(e,e.attempt(jn,t,n),"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d)}}function EA(e,t,n){const o=this;return ot(e,i,"listItemIndent",o.containerState.size+1);function i(l){const c=o.events[o.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===o.containerState.size?t(l):n(l)}}function PA(e){e.exit(this.containerState.type)}function TA(e,t,n){const o=this;return ot(e,i,"listItemPrefixWhitespace",o.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(l){const c=o.events[o.events.length-1];return!qe(l)&&c&&c[1].type==="listItemPrefixWhitespace"?t(l):n(l)}}const iy={name:"setextUnderline",resolveTo:RA,tokenize:AA};function RA(e,t){let n=e.length,o,i,l;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){o=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!l&&e[n][1].type==="definition"&&(l=n);const c={type:"setextHeading",start:{...e[o][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",l?(e.splice(i,0,["enter",c,t]),e.splice(l+1,0,["exit",e[o][1],t]),e[o][1].end={...e[l][1].end}):e[o][1]=c,e.push(["exit",c,t]),e}function AA(e,t,n){const o=this;let i;return l;function l(m){let h=o.events.length,x;for(;h--;)if(o.events[h][1].type!=="lineEnding"&&o.events[h][1].type!=="linePrefix"&&o.events[h][1].type!=="content"){x=o.events[h][1].type==="paragraph";break}return!o.parser.lazy[o.now().line]&&(o.interrupt||x)?(e.enter("setextHeadingLine"),i=m,c(m)):n(m)}function c(m){return e.enter("setextHeadingLineSequence"),d(m)}function d(m){return m===i?(e.consume(m),d):(e.exit("setextHeadingLineSequence"),qe(m)?ot(e,p,"lineSuffix")(m):p(m))}function p(m){return m===null||Le(m)?(e.exit("setextHeadingLine"),t(m)):n(m)}}const DA={tokenize:IA};function IA(e){const t=this,n=e.attempt(Ic,o,e.attempt(this.parser.constructs.flowInitial,i,ot(e,e.attempt(this.parser.constructs.flow,i,e.attempt($R,i)),"linePrefix")));return n;function o(l){if(l===null){e.consume(l);return}return e.enter("lineEndingBlank"),e.consume(l),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const LA={resolveAll:Uw()},OA=Bw("string"),_A=Bw("text");function Bw(e){return{resolveAll:Uw(e==="text"?MA:void 0),tokenize:t};function t(n){const o=this,i=this.parser.constructs[e],l=n.attempt(i,c,d);return c;function c(h){return m(h)?l(h):d(h)}function d(h){if(h===null){n.consume(h);return}return n.enter("data"),n.consume(h),p}function p(h){return m(h)?(n.exit("data"),l(h)):(n.consume(h),p)}function m(h){if(h===null)return!0;const x=i[h];let v=-1;if(x)for(;++v<x.length;){const b=x[v];if(!b.previous||b.previous.call(o,o.previous))return!0}return!1}}}function Uw(e){return t;function t(n,o){let i=-1,l;for(;++i<=n.length;)l===void 0?n[i]&&n[i][1].type==="data"&&(l=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==l+2&&(n[l][1].end=n[i-1][1].end,n.splice(l+2,i-l-2),i=l+2),l=void 0);return e?e(n,o):n}}function MA(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 o=e[n-1][1],i=t.sliceStream(o);let l=i.length,c=-1,d=0,p;for(;l--;){const m=i[l];if(typeof m=="string"){for(c=m.length;m.charCodeAt(c-1)===32;)d++,c--;if(c)break;c=-1}else if(m===-2)p=!0,d++;else if(m!==-1){l++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(d=0),d){const m={type:n===e.length||p||d<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:l?c:o.start._bufferIndex+c,_index:o.start._index+l,line:o.end.line,column:o.end.column-d,offset:o.end.offset-d},end:{...o.end}};o.end={...m.start},o.start.offset===o.end.offset?Object.assign(o,m):(e.splice(n,0,["enter",m,t],["exit",m,t]),n+=2)}n++}return e}const $A={42:jn,43:jn,45:jn,48:jn,49:jn,50:jn,51:jn,52:jn,53:jn,54:jn,55:jn,56:jn,57:jn,62:Lw},FA={91:HR},zA={[-2]:rf,[-1]:rf,32:rf},BA={35:YR,42:Jl,45:[iy,Jl],60:ZR,61:iy,95:Jl,96:oy,126:oy},UA={38:_w,92:Ow},HA={[-5]:of,[-4]:of,[-3]:of,33:xA,38:_w,42:qf,60:[vR,iA],91:vA,92:[KR,Ow],93:Kp,95:qf,96:DR},WA={null:[qf,LA]},VA={null:[42,95]},qA={null:[]},KA=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:VA,contentInitial:FA,disable:qA,document:$A,flow:BA,flowInitial:zA,insideSpan:WA,string:UA,text:HA},Symbol.toStringTag,{value:"Module"}));function GA(e,t,n){let o={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},l=[];let c=[],d=[];const p={attempt:L(M),check:L(P),consume:T,enter:R,exit:D,interrupt:L(P,{interrupt:!0})},m={code:null,containerState:{},defineSkip:k,events:[],now:N,parser:e,previous:null,sliceSerialize:v,sliceStream:b,write:x};let h=t.tokenize.call(m,p);return t.resolveAll&&l.push(t),m;function x(U){return c=Qn(c,U),j(),c[c.length-1]!==null?[]:(_(t,0),m.events=qp(l,m.events,m),m.events)}function v(U,G){return XA(b(U),G)}function b(U){return YA(c,U)}function N(){const{_bufferIndex:U,_index:G,line:q,column:ee,offset:$}=o;return{_bufferIndex:U,_index:G,line:q,column:ee,offset:$}}function k(U){i[U.line]=U.column,ne()}function j(){let U;for(;o._index<c.length;){const G=c[o._index];if(typeof G=="string")for(U=o._index,o._bufferIndex<0&&(o._bufferIndex=0);o._index===U&&o._bufferIndex<G.length;)S(G.charCodeAt(o._bufferIndex));else S(G)}}function S(U){h=h(U)}function T(U){Le(U)?(o.line++,o.column=1,o.offset+=U===-3?2:1,ne()):U!==-1&&(o.column++,o.offset++),o._bufferIndex<0?o._index++:(o._bufferIndex++,o._bufferIndex===c[o._index].length&&(o._bufferIndex=-1,o._index++)),m.previous=U}function R(U,G){const q=G||{};return q.type=U,q.start=N(),m.events.push(["enter",q,m]),d.push(q),q}function D(U){const G=d.pop();return G.end=N(),m.events.push(["exit",G,m]),G}function M(U,G){_(U,G.from)}function P(U,G){G.restore()}function L(U,G){return q;function q(ee,$,I){let A,F,K,E;return Array.isArray(ee)?X(ee):"tokenize"in ee?X([ee]):B(ee);function B(fe){return Pe;function Pe(Ce){const pe=Ce!==null&&fe[Ce],xe=Ce!==null&&fe.null,Je=[...Array.isArray(pe)?pe:pe?[pe]:[],...Array.isArray(xe)?xe:xe?[xe]:[]];return X(Je)(Ce)}}function X(fe){return A=fe,F=0,fe.length===0?I:O(fe[F])}function O(fe){return Pe;function Pe(Ce){return E=J(),K=fe,fe.partial||(m.currentConstruct=fe),fe.name&&m.parser.constructs.disable.null.includes(fe.name)?me():fe.tokenize.call(G?Object.assign(Object.create(m),G):m,p,se,me)(Ce)}}function se(fe){return U(K,E),$}function me(fe){return E.restore(),++F<A.length?O(A[F]):I}}}function _(U,G){U.resolveAll&&!l.includes(U)&&l.push(U),U.resolve&&Er(m.events,G,m.events.length-G,U.resolve(m.events.slice(G),m)),U.resolveTo&&(m.events=U.resolveTo(m.events,m))}function J(){const U=N(),G=m.previous,q=m.currentConstruct,ee=m.events.length,$=Array.from(d);return{from:ee,restore:I};function I(){o=U,m.previous=G,m.currentConstruct=q,m.events.length=ee,d=$,ne()}}function ne(){o.line in i&&o.column<2&&(o.column=i[o.line],o.offset+=i[o.line]-1)}}function YA(e,t){const n=t.start._index,o=t.start._bufferIndex,i=t.end._index,l=t.end._bufferIndex;let c;if(n===i)c=[e[n].slice(o,l)];else{if(c=e.slice(n,i),o>-1){const d=c[0];typeof d=="string"?c[0]=d.slice(o):c.shift()}l>0&&c.push(e[i].slice(0,l))}return c}function XA(e,t){let n=-1;const o=[];let i;for(;++n<e.length;){const l=e[n];let c;if(typeof l=="string")c=l;else switch(l){case-5:{c="\r";break}case-4:{c=`
|
|
442
|
+
`;break}case-3:{c=`\r
|
|
443
|
+
`;break}case-2:{c=t?" ":" ";break}case-1:{if(!t&&i)continue;c=" ";break}default:c=String.fromCharCode(l)}i=l===-2,o.push(c)}return o.join("")}function QA(e){const o={constructs:oR([KA,...(e||{}).extensions||[]]),content:i(fR),defined:[],document:i(hR),flow:i(DA),lazy:{},string:i(OA),text:i(_A)};return o;function i(l){return c;function c(d){return GA(o,l,d)}}}function JA(e){for(;!Mw(e););return e}const ay=/[\0\t\n\r]/g;function ZA(){let e=1,t="",n=!0,o;return i;function i(l,c,d){const p=[];let m,h,x,v,b;for(l=t+(typeof l=="string"?l.toString():new TextDecoder(c||void 0).decode(l)),x=0,t="",n&&(l.charCodeAt(0)===65279&&x++,n=void 0);x<l.length;){if(ay.lastIndex=x,m=ay.exec(l),v=m&&m.index!==void 0?m.index:l.length,b=l.charCodeAt(v),!m){t=l.slice(x);break}if(b===10&&x===v&&o)p.push(-3),o=void 0;else switch(o&&(p.push(-5),o=void 0),x<v&&(p.push(l.slice(x,v)),e+=v-x),b){case 0:{p.push(65533),e++;break}case 9:{for(h=Math.ceil(e/4)*4,p.push(-2);e++<h;)p.push(-1);break}case 10:{p.push(-4),e=1;break}default:o=!0,e=1}x=v+1}return d&&(o&&p.push(-5),t&&p.push(t),p.push(null)),p}}const e3=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function t3(e){return e.replace(e3,n3)}function n3(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),l=i===120||i===88;return Iw(n.slice(l?2:1),l?16:10)}return Vp(n)||e}const Hw={}.hasOwnProperty;function r3(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),o3(n)(JA(QA(n).document().write(ZA()(e,t,!0))))}function o3(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:l(Ge),autolinkProtocol:J,autolinkEmail:J,atxHeading:l(ct),blockQuote:l(xe),characterEscape:J,characterReference:J,codeFenced:l(Je),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:l(Je,c),codeText:l(Ke,c),codeTextData:J,data:J,codeFlowValue:J,definition:l(Me),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:l(_e),hardBreakEscape:l(et),hardBreakTrailing:l(et),htmlFlow:l(mt,c),htmlFlowData:J,htmlText:l(mt,c),htmlTextData:J,image:l(Pt),label:c,link:l(Ge),listItem:l(Kt),listItemValue:v,listOrdered:l(st,x),listUnordered:l(st),paragraph:l(Zt),reference:O,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:l(ct),strong:l(mn),thematicBreak:l(Rn)},exit:{atxHeading:p(),atxHeadingSequence:M,autolink:p(),autolinkEmail:pe,autolinkProtocol:Ce,blockQuote:p(),characterEscapeValue:ne,characterReferenceMarkerHexadecimal:me,characterReferenceMarkerNumeric:me,characterReferenceValue:fe,characterReference:Pe,codeFenced:p(j),codeFencedFence:k,codeFencedFenceInfo:b,codeFencedFenceMeta:N,codeFlowValue:ne,codeIndented:p(S),codeText:p($),codeTextData:ne,data:ne,definition:p(),definitionDestinationString:D,definitionLabelString:T,definitionTitleString:R,emphasis:p(),hardBreakEscape:p(G),hardBreakTrailing:p(G),htmlFlow:p(q),htmlFlowData:ne,htmlText:p(ee),htmlTextData:ne,image:p(A),label:K,labelText:F,lineEnding:U,link:p(I),listItem:p(),listOrdered:p(),listUnordered:p(),paragraph:p(),referenceString:se,resourceDestinationString:E,resourceTitleString:B,resource:X,setextHeading:p(_),setextHeadingLineSequence:L,setextHeadingText:P,strong:p(),thematicBreak:p()}};Ww(t,(e||{}).mdastExtensions||[]);const n={};return o;function o(re){let le={type:"root",children:[]};const he={stack:[le],tokenStack:[],config:t,enter:d,exit:m,buffer:c,resume:h,data:n},te=[];let ye=-1;for(;++ye<re.length;)if(re[ye][1].type==="listOrdered"||re[ye][1].type==="listUnordered")if(re[ye][0]==="enter")te.push(ye);else{const Se=te.pop();ye=i(re,Se,ye)}for(ye=-1;++ye<re.length;){const Se=t[re[ye][0]];Hw.call(Se,re[ye][1].type)&&Se[re[ye][1].type].call(Object.assign({sliceSerialize:re[ye][2].sliceSerialize},he),re[ye][1])}if(he.tokenStack.length>0){const Se=he.tokenStack[he.tokenStack.length-1];(Se[1]||ly).call(he,void 0,Se[0])}for(le.position={start:xo(re.length>0?re[0][1].start:{line:1,column:1,offset:0}),end:xo(re.length>0?re[re.length-2][1].end:{line:1,column:1,offset:0})},ye=-1;++ye<t.transforms.length;)le=t.transforms[ye](le)||le;return le}function i(re,le,he){let te=le-1,ye=-1,Se=!1,$t,en,Gt,V;for(;++te<=he;){const ce=re[te];switch(ce[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ce[0]==="enter"?ye++:ye--,V=void 0;break}case"lineEndingBlank":{ce[0]==="enter"&&($t&&!V&&!ye&&!Gt&&(Gt=te),V=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:V=void 0}if(!ye&&ce[0]==="enter"&&ce[1].type==="listItemPrefix"||ye===-1&&ce[0]==="exit"&&(ce[1].type==="listUnordered"||ce[1].type==="listOrdered")){if($t){let ve=te;for(en=void 0;ve--;){const Oe=re[ve];if(Oe[1].type==="lineEnding"||Oe[1].type==="lineEndingBlank"){if(Oe[0]==="exit")continue;en&&(re[en][1].type="lineEndingBlank",Se=!0),Oe[1].type="lineEnding",en=ve}else if(!(Oe[1].type==="linePrefix"||Oe[1].type==="blockQuotePrefix"||Oe[1].type==="blockQuotePrefixWhitespace"||Oe[1].type==="blockQuoteMarker"||Oe[1].type==="listItemIndent"))break}Gt&&(!en||Gt<en)&&($t._spread=!0),$t.end=Object.assign({},en?re[en][1].start:ce[1].end),re.splice(en||te,0,["exit",$t,ce[2]]),te++,he++}if(ce[1].type==="listItemPrefix"){const ve={type:"listItem",_spread:!1,start:Object.assign({},ce[1].start),end:void 0};$t=ve,re.splice(te,0,["enter",ve,ce[2]]),te++,he++,Gt=void 0,V=!0}}}return re[le][1]._spread=Se,he}function l(re,le){return he;function he(te){d.call(this,re(te),te),le&&le.call(this,te)}}function c(){this.stack.push({type:"fragment",children:[]})}function d(re,le,he){this.stack[this.stack.length-1].children.push(re),this.stack.push(re),this.tokenStack.push([le,he||void 0]),re.position={start:xo(le.start),end:void 0}}function p(re){return le;function le(he){re&&re.call(this,he),m.call(this,he)}}function m(re,le){const he=this.stack.pop(),te=this.tokenStack.pop();if(te)te[0].type!==re.type&&(le?le.call(this,re,te[0]):(te[1]||ly).call(this,re,te[0]));else throw new Error("Cannot close `"+re.type+"` ("+qi({start:re.start,end:re.end})+"): it’s not open");he.position.end=xo(re.end)}function h(){return nR(this.stack.pop())}function x(){this.data.expectingFirstListItemValue=!0}function v(re){if(this.data.expectingFirstListItemValue){const le=this.stack[this.stack.length-2];le.start=Number.parseInt(this.sliceSerialize(re),10),this.data.expectingFirstListItemValue=void 0}}function b(){const re=this.resume(),le=this.stack[this.stack.length-1];le.lang=re}function N(){const re=this.resume(),le=this.stack[this.stack.length-1];le.meta=re}function k(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function j(){const re=this.resume(),le=this.stack[this.stack.length-1];le.value=re.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function S(){const re=this.resume(),le=this.stack[this.stack.length-1];le.value=re.replace(/(\r?\n|\r)$/g,"")}function T(re){const le=this.resume(),he=this.stack[this.stack.length-1];he.label=le,he.identifier=Ls(this.sliceSerialize(re)).toLowerCase()}function R(){const re=this.resume(),le=this.stack[this.stack.length-1];le.title=re}function D(){const re=this.resume(),le=this.stack[this.stack.length-1];le.url=re}function M(re){const le=this.stack[this.stack.length-1];if(!le.depth){const he=this.sliceSerialize(re).length;le.depth=he}}function P(){this.data.setextHeadingSlurpLineEnding=!0}function L(re){const le=this.stack[this.stack.length-1];le.depth=this.sliceSerialize(re).codePointAt(0)===61?1:2}function _(){this.data.setextHeadingSlurpLineEnding=void 0}function J(re){const he=this.stack[this.stack.length-1].children;let te=he[he.length-1];(!te||te.type!=="text")&&(te=Tn(),te.position={start:xo(re.start),end:void 0},he.push(te)),this.stack.push(te)}function ne(re){const le=this.stack.pop();le.value+=this.sliceSerialize(re),le.position.end=xo(re.end)}function U(re){const le=this.stack[this.stack.length-1];if(this.data.atHardBreak){const he=le.children[le.children.length-1];he.position.end=xo(re.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(le.type)&&(J.call(this,re),ne.call(this,re))}function G(){this.data.atHardBreak=!0}function q(){const re=this.resume(),le=this.stack[this.stack.length-1];le.value=re}function ee(){const re=this.resume(),le=this.stack[this.stack.length-1];le.value=re}function $(){const re=this.resume(),le=this.stack[this.stack.length-1];le.value=re}function I(){const re=this.stack[this.stack.length-1];if(this.data.inReference){const le=this.data.referenceType||"shortcut";re.type+="Reference",re.referenceType=le,delete re.url,delete re.title}else delete re.identifier,delete re.label;this.data.referenceType=void 0}function A(){const re=this.stack[this.stack.length-1];if(this.data.inReference){const le=this.data.referenceType||"shortcut";re.type+="Reference",re.referenceType=le,delete re.url,delete re.title}else delete re.identifier,delete re.label;this.data.referenceType=void 0}function F(re){const le=this.sliceSerialize(re),he=this.stack[this.stack.length-2];he.label=t3(le),he.identifier=Ls(le).toLowerCase()}function K(){const re=this.stack[this.stack.length-1],le=this.resume(),he=this.stack[this.stack.length-1];if(this.data.inReference=!0,he.type==="link"){const te=re.children;he.children=te}else he.alt=le}function E(){const re=this.resume(),le=this.stack[this.stack.length-1];le.url=re}function B(){const re=this.resume(),le=this.stack[this.stack.length-1];le.title=re}function X(){this.data.inReference=void 0}function O(){this.data.referenceType="collapsed"}function se(re){const le=this.resume(),he=this.stack[this.stack.length-1];he.label=le,he.identifier=Ls(this.sliceSerialize(re)).toLowerCase(),this.data.referenceType="full"}function me(re){this.data.characterReferenceType=re.type}function fe(re){const le=this.sliceSerialize(re),he=this.data.characterReferenceType;let te;he?(te=Iw(le,he==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):te=Vp(le);const ye=this.stack[this.stack.length-1];ye.value+=te}function Pe(re){const le=this.stack.pop();le.position.end=xo(re.end)}function Ce(re){ne.call(this,re);const le=this.stack[this.stack.length-1];le.url=this.sliceSerialize(re)}function pe(re){ne.call(this,re);const le=this.stack[this.stack.length-1];le.url="mailto:"+this.sliceSerialize(re)}function xe(){return{type:"blockquote",children:[]}}function Je(){return{type:"code",lang:null,meta:null,value:""}}function Ke(){return{type:"inlineCode",value:""}}function Me(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function _e(){return{type:"emphasis",children:[]}}function ct(){return{type:"heading",depth:0,children:[]}}function et(){return{type:"break"}}function mt(){return{type:"html",value:""}}function Pt(){return{type:"image",title:null,url:"",alt:null}}function Ge(){return{type:"link",title:null,url:"",children:[]}}function st(re){return{type:"list",ordered:re.type==="listOrdered",start:null,spread:re._spread,children:[]}}function Kt(re){return{type:"listItem",spread:re._spread,checked:null,children:[]}}function Zt(){return{type:"paragraph",children:[]}}function mn(){return{type:"strong",children:[]}}function Tn(){return{type:"text",value:""}}function Rn(){return{type:"thematicBreak"}}}function xo(e){return{line:e.line,column:e.column,offset:e.offset}}function Ww(e,t){let n=-1;for(;++n<t.length;){const o=t[n];Array.isArray(o)?Ww(e,o):s3(e,o)}}function s3(e,t){let n;for(n in t)if(Hw.call(t,n))switch(n){case"canContainEols":{const o=t[n];o&&e[n].push(...o);break}case"transforms":{const o=t[n];o&&e[n].push(...o);break}case"enter":case"exit":{const o=t[n];o&&Object.assign(e[n],o);break}}}function ly(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+qi({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+qi({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+qi({start:t.start,end:t.end})+") is still open")}function i3(e){const t=this;t.parser=n;function n(o){return r3(o,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function a3(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 l3(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
444
|
+
`}]}function c3(e,t){const n=t.value?t.value+`
|
|
445
|
+
`:"",o={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(o.className=["language-"+i[0]]);let l={type:"element",tagName:"code",properties:o,children:[{type:"text",value:n}]};return t.meta&&(l.data={meta:t.meta}),e.patch(t,l),l=e.applyData(t,l),l={type:"element",tagName:"pre",properties:{},children:[l]},e.patch(t,l),l}function u3(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function d3(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function f3(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",o=String(t.identifier).toUpperCase(),i=Ks(o.toLowerCase()),l=e.footnoteOrder.indexOf(o);let c,d=e.footnoteCounts.get(o);d===void 0?(d=0,e.footnoteOrder.push(o),c=e.footnoteOrder.length):c=l+1,d+=1,e.footnoteCounts.set(o,d);const p={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(d>1?"-"+d:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(c)}]};e.patch(t,p);const m={type:"element",tagName:"sup",properties:{},children:[p]};return e.patch(t,m),e.applyData(t,m)}function p3(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 h3(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Vw(e,t){const n=t.referenceType;let o="]";if(n==="collapsed"?o+="[]":n==="full"&&(o+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+o}];const i=e.all(t),l=i[0];l&&l.type==="text"?l.value="["+l.value:i.unshift({type:"text",value:"["});const c=i[i.length-1];return c&&c.type==="text"?c.value+=o:i.push({type:"text",value:o}),i}function m3(e,t){const n=String(t.identifier).toUpperCase(),o=e.definitionById.get(n);if(!o)return Vw(e,t);const i={src:Ks(o.url||""),alt:t.alt};o.title!==null&&o.title!==void 0&&(i.title=o.title);const l={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,l),e.applyData(t,l)}function g3(e,t){const n={src:Ks(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 o={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,o),e.applyData(t,o)}function x3(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const o={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,o),e.applyData(t,o)}function y3(e,t){const n=String(t.identifier).toUpperCase(),o=e.definitionById.get(n);if(!o)return Vw(e,t);const i={href:Ks(o.url||"")};o.title!==null&&o.title!==void 0&&(i.title=o.title);const l={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,l),e.applyData(t,l)}function v3(e,t){const n={href:Ks(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const o={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function b3(e,t,n){const o=e.all(t),i=n?w3(n):qw(t),l={},c=[];if(typeof t.checked=="boolean"){const h=o[0];let x;h&&h.type==="element"&&h.tagName==="p"?x=h:(x={type:"element",tagName:"p",properties:{},children:[]},o.unshift(x)),x.children.length>0&&x.children.unshift({type:"text",value:" "}),x.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),l.className=["task-list-item"]}let d=-1;for(;++d<o.length;){const h=o[d];(i||d!==0||h.type!=="element"||h.tagName!=="p")&&c.push({type:"text",value:`
|
|
446
|
+
`}),h.type==="element"&&h.tagName==="p"&&!i?c.push(...h.children):c.push(h)}const p=o[o.length-1];p&&(i||p.type!=="element"||p.tagName!=="p")&&c.push({type:"text",value:`
|
|
447
|
+
`});const m={type:"element",tagName:"li",properties:l,children:c};return e.patch(t,m),e.applyData(t,m)}function w3(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let o=-1;for(;!t&&++o<n.length;)t=qw(n[o])}return t}function qw(e){const t=e.spread;return t??e.children.length>1}function k3(e,t){const n={},o=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<o.length;){const c=o[i];if(c.type==="element"&&c.tagName==="li"&&c.properties&&Array.isArray(c.properties.className)&&c.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const l={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(o,!0)};return e.patch(t,l),e.applyData(t,l)}function j3(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function S3(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function C3(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function N3(e,t){const n=e.all(t),o=n.shift(),i=[];if(o){const c={type:"element",tagName:"thead",properties:{},children:e.wrap([o],!0)};e.patch(t.children[0],c),i.push(c)}if(n.length>0){const c={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},d=Bp(t.children[1]),p=Nw(t.children[t.children.length-1]);d&&p&&(c.position={start:d,end:p}),i.push(c)}const l={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,l),e.applyData(t,l)}function E3(e,t,n){const o=n?n.children:void 0,l=(o?o.indexOf(t):1)===0?"th":"td",c=n&&n.type==="table"?n.align:void 0,d=c?c.length:t.children.length;let p=-1;const m=[];for(;++p<d;){const x=t.children[p],v={},b=c?c[p]:void 0;b&&(v.align=b);let N={type:"element",tagName:l,properties:v,children:[]};x&&(N.children=e.all(x),e.patch(x,N),N=e.applyData(x,N)),m.push(N)}const h={type:"element",tagName:"tr",properties:{},children:e.wrap(m,!0)};return e.patch(t,h),e.applyData(t,h)}function P3(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const cy=9,uy=32;function T3(e){const t=String(e),n=/\r?\n|\r/g;let o=n.exec(t),i=0;const l=[];for(;o;)l.push(dy(t.slice(i,o.index),i>0,!0),o[0]),i=o.index+o[0].length,o=n.exec(t);return l.push(dy(t.slice(i),i>0,!1)),l.join("")}function dy(e,t,n){let o=0,i=e.length;if(t){let l=e.codePointAt(o);for(;l===cy||l===uy;)o++,l=e.codePointAt(o)}if(n){let l=e.codePointAt(i-1);for(;l===cy||l===uy;)i--,l=e.codePointAt(i-1)}return i>o?e.slice(o,i):""}function R3(e,t){const n={type:"text",value:T3(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function A3(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const D3={blockquote:a3,break:l3,code:c3,delete:u3,emphasis:d3,footnoteReference:f3,heading:p3,html:h3,imageReference:m3,image:g3,inlineCode:x3,linkReference:y3,link:v3,listItem:b3,list:k3,paragraph:j3,root:S3,strong:C3,table:N3,tableCell:P3,tableRow:E3,text:R3,thematicBreak:A3,toml:Ml,yaml:Ml,definition:Ml,footnoteDefinition:Ml};function Ml(){}const Kw=-1,Lc=0,Gi=1,ac=2,Gp=3,Yp=4,Xp=5,Qp=6,Gw=7,Yw=8,fy=typeof self=="object"?self:globalThis,I3=(e,t)=>{const n=(i,l)=>(e.set(l,i),i),o=i=>{if(e.has(i))return e.get(i);const[l,c]=t[i];switch(l){case Lc:case Kw:return n(c,i);case Gi:{const d=n([],i);for(const p of c)d.push(o(p));return d}case ac:{const d=n({},i);for(const[p,m]of c)d[o(p)]=o(m);return d}case Gp:return n(new Date(c),i);case Yp:{const{source:d,flags:p}=c;return n(new RegExp(d,p),i)}case Xp:{const d=n(new Map,i);for(const[p,m]of c)d.set(o(p),o(m));return d}case Qp:{const d=n(new Set,i);for(const p of c)d.add(o(p));return d}case Gw:{const{name:d,message:p}=c;return n(new fy[d](p),i)}case Yw:return n(BigInt(c),i);case"BigInt":return n(Object(BigInt(c)),i);case"ArrayBuffer":return n(new Uint8Array(c).buffer,c);case"DataView":{const{buffer:d}=new Uint8Array(c);return n(new DataView(d),c)}}return n(new fy[l](c),i)};return o},py=e=>I3(new Map,e)(0),Ns="",{toString:L3}={},{keys:O3}=Object,Bi=e=>{const t=typeof e;if(t!=="object"||!e)return[Lc,t];const n=L3.call(e).slice(8,-1);switch(n){case"Array":return[Gi,Ns];case"Object":return[ac,Ns];case"Date":return[Gp,Ns];case"RegExp":return[Yp,Ns];case"Map":return[Xp,Ns];case"Set":return[Qp,Ns];case"DataView":return[Gi,n]}return n.includes("Array")?[Gi,n]:n.includes("Error")?[Gw,n]:[ac,n]},$l=([e,t])=>e===Lc&&(t==="function"||t==="symbol"),_3=(e,t,n,o)=>{const i=(c,d)=>{const p=o.push(c)-1;return n.set(d,p),p},l=c=>{if(n.has(c))return n.get(c);let[d,p]=Bi(c);switch(d){case Lc:{let h=c;switch(p){case"bigint":d=Yw,h=c.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+p);h=null;break;case"undefined":return i([Kw],c)}return i([d,h],c)}case Gi:{if(p){let v=c;return p==="DataView"?v=new Uint8Array(c.buffer):p==="ArrayBuffer"&&(v=new Uint8Array(c)),i([p,[...v]],c)}const h=[],x=i([d,h],c);for(const v of c)h.push(l(v));return x}case ac:{if(p)switch(p){case"BigInt":return i([p,c.toString()],c);case"Boolean":case"Number":case"String":return i([p,c.valueOf()],c)}if(t&&"toJSON"in c)return l(c.toJSON());const h=[],x=i([d,h],c);for(const v of O3(c))(e||!$l(Bi(c[v])))&&h.push([l(v),l(c[v])]);return x}case Gp:return i([d,c.toISOString()],c);case Yp:{const{source:h,flags:x}=c;return i([d,{source:h,flags:x}],c)}case Xp:{const h=[],x=i([d,h],c);for(const[v,b]of c)(e||!($l(Bi(v))||$l(Bi(b))))&&h.push([l(v),l(b)]);return x}case Qp:{const h=[],x=i([d,h],c);for(const v of c)(e||!$l(Bi(v)))&&h.push(l(v));return x}}const{message:m}=c;return i([d,{name:p,message:m}],c)};return l},hy=(e,{json:t,lossy:n}={})=>{const o=[];return _3(!(t||n),!!t,new Map,o)(e),o},lc=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?py(hy(e,t)):structuredClone(e):(e,t)=>py(hy(e,t));function M3(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 $3(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function F3(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||M3,o=e.options.footnoteBackLabel||$3,i=e.options.footnoteLabel||"Footnotes",l=e.options.footnoteLabelTagName||"h2",c=e.options.footnoteLabelProperties||{className:["sr-only"]},d=[];let p=-1;for(;++p<e.footnoteOrder.length;){const m=e.footnoteById.get(e.footnoteOrder[p]);if(!m)continue;const h=e.all(m),x=String(m.identifier).toUpperCase(),v=Ks(x.toLowerCase());let b=0;const N=[],k=e.footnoteCounts.get(x);for(;k!==void 0&&++b<=k;){N.length>0&&N.push({type:"text",value:" "});let T=typeof n=="string"?n:n(p,b);typeof T=="string"&&(T={type:"text",value:T}),N.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+v+(b>1?"-"+b:""),dataFootnoteBackref:"",ariaLabel:typeof o=="string"?o:o(p,b),className:["data-footnote-backref"]},children:Array.isArray(T)?T:[T]})}const j=h[h.length-1];if(j&&j.type==="element"&&j.tagName==="p"){const T=j.children[j.children.length-1];T&&T.type==="text"?T.value+=" ":j.children.push({type:"text",value:" "}),j.children.push(...N)}else h.push(...N);const S={type:"element",tagName:"li",properties:{id:t+"fn-"+v},children:e.wrap(h,!0)};e.patch(m,S),d.push(S)}if(d.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:l,properties:{...lc(c),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
448
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(d,!0)},{type:"text",value:`
|
|
449
|
+
`}]}}const Xw=(function(e){if(e==null)return H3;if(typeof e=="function")return Oc(e);if(typeof e=="object")return Array.isArray(e)?z3(e):B3(e);if(typeof e=="string")return U3(e);throw new Error("Expected function, string, or object as test")});function z3(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Xw(e[n]);return Oc(o);function o(...i){let l=-1;for(;++l<t.length;)if(t[l].apply(this,i))return!0;return!1}}function B3(e){const t=e;return Oc(n);function n(o){const i=o;let l;for(l in e)if(i[l]!==t[l])return!1;return!0}}function U3(e){return Oc(t);function t(n){return n&&n.type===e}}function Oc(e){return t;function t(n,o,i){return!!(W3(n)&&e.call(this,n,typeof o=="number"?o:void 0,i||void 0))}}function H3(){return!0}function W3(e){return e!==null&&typeof e=="object"&&"type"in e}const Qw=[],V3=!0,my=!1,q3="skip";function K3(e,t,n,o){let i;typeof t=="function"&&typeof n!="function"?(o=n,n=t):i=t;const l=Xw(i),c=o?-1:1;d(e,void 0,[])();function d(p,m,h){const x=p&&typeof p=="object"?p:{};if(typeof x.type=="string"){const b=typeof x.tagName=="string"?x.tagName:typeof x.name=="string"?x.name:void 0;Object.defineProperty(v,"name",{value:"node ("+(p.type+(b?"<"+b+">":""))+")"})}return v;function v(){let b=Qw,N,k,j;if((!t||l(p,m,h[h.length-1]||void 0))&&(b=G3(n(p,h)),b[0]===my))return b;if("children"in p&&p.children){const S=p;if(S.children&&b[0]!==q3)for(k=(o?S.children.length:-1)+c,j=h.concat(S);k>-1&&k<S.children.length;){const T=S.children[k];if(N=d(T,k,j)(),N[0]===my)return N;k=typeof N[1]=="number"?N[1]:k+c}}return b}}}function G3(e){return Array.isArray(e)?e:typeof e=="number"?[V3,e]:e==null?Qw:[e]}function Jw(e,t,n,o){let i,l,c;typeof t=="function"&&typeof n!="function"?(l=void 0,c=t,i=n):(l=t,c=n,i=o),K3(e,l,d,i);function d(p,m){const h=m[m.length-1],x=h?h.children.indexOf(p):void 0;return c(p,x,h)}}const Kf={}.hasOwnProperty,Y3={};function X3(e,t){const n=t||Y3,o=new Map,i=new Map,l=new Map,c={...D3,...n.handlers},d={all:m,applyData:J3,definitionById:o,footnoteById:i,footnoteCounts:l,footnoteOrder:[],handlers:c,one:p,options:n,patch:Q3,wrap:eD};return Jw(e,function(h){if(h.type==="definition"||h.type==="footnoteDefinition"){const x=h.type==="definition"?o:i,v=String(h.identifier).toUpperCase();x.has(v)||x.set(v,h)}}),d;function p(h,x){const v=h.type,b=d.handlers[v];if(Kf.call(d.handlers,v)&&b)return b(d,h,x);if(d.options.passThrough&&d.options.passThrough.includes(v)){if("children"in h){const{children:k,...j}=h,S=lc(j);return S.children=d.all(h),S}return lc(h)}return(d.options.unknownHandler||Z3)(d,h,x)}function m(h){const x=[];if("children"in h){const v=h.children;let b=-1;for(;++b<v.length;){const N=d.one(v[b],h);if(N){if(b&&v[b-1].type==="break"&&(!Array.isArray(N)&&N.type==="text"&&(N.value=gy(N.value)),!Array.isArray(N)&&N.type==="element")){const k=N.children[0];k&&k.type==="text"&&(k.value=gy(k.value))}Array.isArray(N)?x.push(...N):x.push(N)}}}return x}}function Q3(e,t){e.position&&(t.position=LT(e))}function J3(e,t){let n=t;if(e&&e.data){const o=e.data.hName,i=e.data.hChildren,l=e.data.hProperties;if(typeof o=="string")if(n.type==="element")n.tagName=o;else{const c="children"in n?n.children:[n];n={type:"element",tagName:o,properties:{},children:c}}n.type==="element"&&l&&Object.assign(n.properties,lc(l)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function Z3(e,t){const n=t.data||{},o="value"in t&&!(Kf.call(n,"hProperties")||Kf.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function eD(e,t){const n=[];let o=-1;for(t&&n.push({type:"text",value:`
|
|
450
|
+
`});++o<e.length;)o&&n.push({type:"text",value:`
|
|
451
|
+
`}),n.push(e[o]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
452
|
+
`}),n}function gy(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function xy(e,t){const n=X3(e,t),o=n.one(e,void 0),i=F3(n),l=Array.isArray(o)?{type:"root",children:o}:o||{type:"root",children:[]};return i&&l.children.push({type:"text",value:`
|
|
453
|
+
`},i),l}function tD(e,t){return e&&"run"in e?async function(n,o){const i=xy(n,{file:o,...t});await e.run(i,o)}:function(n,o){return xy(n,{file:o,...e||t})}}function yy(e){if(e)throw e}var sf,vy;function nD(){if(vy)return sf;vy=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,o=Object.getOwnPropertyDescriptor,i=function(m){return typeof Array.isArray=="function"?Array.isArray(m):t.call(m)==="[object Array]"},l=function(m){if(!m||t.call(m)!=="[object Object]")return!1;var h=e.call(m,"constructor"),x=m.constructor&&m.constructor.prototype&&e.call(m.constructor.prototype,"isPrototypeOf");if(m.constructor&&!h&&!x)return!1;var v;for(v in m);return typeof v>"u"||e.call(m,v)},c=function(m,h){n&&h.name==="__proto__"?n(m,h.name,{enumerable:!0,configurable:!0,value:h.newValue,writable:!0}):m[h.name]=h.newValue},d=function(m,h){if(h==="__proto__")if(e.call(m,h)){if(o)return o(m,h).value}else return;return m[h]};return sf=function p(){var m,h,x,v,b,N,k=arguments[0],j=1,S=arguments.length,T=!1;for(typeof k=="boolean"&&(T=k,k=arguments[1]||{},j=2),(k==null||typeof k!="object"&&typeof k!="function")&&(k={});j<S;++j)if(m=arguments[j],m!=null)for(h in m)x=d(k,h),v=d(m,h),k!==v&&(T&&v&&(l(v)||(b=i(v)))?(b?(b=!1,N=x&&i(x)?x:[]):N=x&&l(x)?x:{},c(k,{name:h,newValue:p(T,N,v)})):typeof v<"u"&&c(k,{name:h,newValue:v}));return k},sf}var rD=nD();const af=yc(rD);function Gf(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 oD(){const e=[],t={run:n,use:o};return t;function n(...i){let l=-1;const c=i.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);d(null,...i);function d(p,...m){const h=e[++l];let x=-1;if(p){c(p);return}for(;++x<i.length;)(m[x]===null||m[x]===void 0)&&(m[x]=i[x]);i=m,h?sD(h,d)(...m):c(null,...m)}}function o(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function sD(e,t){let n;return o;function o(...c){const d=e.length>c.length;let p;d&&c.push(i);try{p=e.apply(this,c)}catch(m){const h=m;if(d&&n)throw h;return i(h)}d||(p&&p.then&&typeof p.then=="function"?p.then(l,i):p instanceof Error?i(p):l(p))}function i(c,...d){n||(n=!0,t(c,...d))}function l(c){i(null,c)}}const br={basename:iD,dirname:aD,extname:lD,join:cD,sep:"/"};function iD(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');xa(e);let n=0,o=-1,i=e.length,l;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(l){n=i+1;break}}else o<0&&(l=!0,o=i+1);return o<0?"":e.slice(n,o)}if(t===e)return"";let c=-1,d=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(l){n=i+1;break}}else c<0&&(l=!0,c=i+1),d>-1&&(e.codePointAt(i)===t.codePointAt(d--)?d<0&&(o=i):(d=-1,o=c));return n===o?o=c:o<0&&(o=e.length),e.slice(n,o)}function aD(e){if(xa(e),e.length===0)return".";let t=-1,n=e.length,o;for(;--n;)if(e.codePointAt(n)===47){if(o){t=n;break}}else o||(o=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function lD(e){xa(e);let t=e.length,n=-1,o=0,i=-1,l=0,c;for(;t--;){const d=e.codePointAt(t);if(d===47){if(c){o=t+1;break}continue}n<0&&(c=!0,n=t+1),d===46?i<0?i=t:l!==1&&(l=1):i>-1&&(l=-1)}return i<0||n<0||l===0||l===1&&i===n-1&&i===o+1?"":e.slice(i,n)}function cD(...e){let t=-1,n;for(;++t<e.length;)xa(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":uD(n)}function uD(e){xa(e);const t=e.codePointAt(0)===47;let n=dD(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function dD(e,t){let n="",o=0,i=-1,l=0,c=-1,d,p;for(;++c<=e.length;){if(c<e.length)d=e.codePointAt(c);else{if(d===47)break;d=47}if(d===47){if(!(i===c-1||l===1))if(i!==c-1&&l===2){if(n.length<2||o!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(p=n.lastIndexOf("/"),p!==n.length-1){p<0?(n="",o=0):(n=n.slice(0,p),o=n.length-1-n.lastIndexOf("/")),i=c,l=0;continue}}else if(n.length>0){n="",o=0,i=c,l=0;continue}}t&&(n=n.length>0?n+"/..":"..",o=2)}else n.length>0?n+="/"+e.slice(i+1,c):n=e.slice(i+1,c),o=c-i-1;i=c,l=0}else d===46&&l>-1?l++:l=-1}return n}function xa(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const fD={cwd:pD};function pD(){return"/"}function Yf(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function hD(e){if(typeof e=="string")e=new URL(e);else if(!Yf(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 mD(e)}function mD(e){if(e.hostname!==""){const o=new TypeError('File URL host must be "localhost" or empty on darwin');throw o.code="ERR_INVALID_FILE_URL_HOST",o}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const o=t.codePointAt(n+2);if(o===70||o===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const lf=["history","path","basename","stem","extname","dirname"];class Zw{constructor(t){let n;t?Yf(t)?n={path:t}:typeof t=="string"||gD(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":fD.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let o=-1;for(;++o<lf.length;){const l=lf[o];l in n&&n[l]!==void 0&&n[l]!==null&&(this[l]=l==="history"?[...n[l]]:n[l])}let i;for(i in n)lf.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?br.basename(this.path):void 0}set basename(t){uf(t,"basename"),cf(t,"basename"),this.path=br.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?br.dirname(this.path):void 0}set dirname(t){by(this.basename,"dirname"),this.path=br.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?br.extname(this.path):void 0}set extname(t){if(cf(t,"extname"),by(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=br.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Yf(t)&&(t=hD(t)),uf(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?br.basename(this.path,this.extname):void 0}set stem(t){uf(t,"stem"),cf(t,"stem"),this.path=br.join(this.dirname||"",t+(this.extname||""))}fail(t,n,o){const i=this.message(t,n,o);throw i.fatal=!0,i}info(t,n,o){const i=this.message(t,n,o);return i.fatal=void 0,i}message(t,n,o){const i=new un(t,n,o);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function cf(e,t){if(e&&e.includes(br.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+br.sep+"`")}function uf(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function by(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function gD(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const xD=(function(e){const o=this.constructor.prototype,i=o[e],l=function(){return i.apply(l,arguments)};return Object.setPrototypeOf(l,o),l}),yD={}.hasOwnProperty;class Jp extends xD{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=oD()}copy(){const t=new Jp;let n=-1;for(;++n<this.attachers.length;){const o=this.attachers[n];t.use(...o)}return t.data(af(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(pf("data",this.frozen),this.namespace[t]=n,this):yD.call(this.namespace,t)&&this.namespace[t]||void 0:t?(pf("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,...o]=this.attachers[this.freezeIndex];if(o[0]===!1)continue;o[0]===!0&&(o[0]=void 0);const i=n.call(t,...o);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Fl(t),o=this.parser||this.Parser;return df("parse",o),o(String(n),n)}process(t,n){const o=this;return this.freeze(),df("process",this.parser||this.Parser),ff("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(l,c){const d=Fl(t),p=o.parse(d);o.run(p,d,function(h,x,v){if(h||!x||!v)return m(h);const b=x,N=o.stringify(b,v);wD(N)?v.value=N:v.result=N,m(h,v)});function m(h,x){h||!x?c(h):l?l(x):n(void 0,x)}}}processSync(t){let n=!1,o;return this.freeze(),df("processSync",this.parser||this.Parser),ff("processSync",this.compiler||this.Compiler),this.process(t,i),ky("processSync","process",n),o;function i(l,c){n=!0,yy(l),o=c}}run(t,n,o){wy(t),this.freeze();const i=this.transformers;return!o&&typeof n=="function"&&(o=n,n=void 0),o?l(void 0,o):new Promise(l);function l(c,d){const p=Fl(n);i.run(t,p,m);function m(h,x,v){const b=x||t;h?d(h):c?c(b):o(void 0,b,v)}}}runSync(t,n){let o=!1,i;return this.run(t,n,l),ky("runSync","run",o),i;function l(c,d){yy(c),i=d,o=!0}}stringify(t,n){this.freeze();const o=Fl(n),i=this.compiler||this.Compiler;return ff("stringify",i),wy(t),i(t,o)}use(t,...n){const o=this.attachers,i=this.namespace;if(pf("use",this.frozen),t!=null)if(typeof t=="function")p(t,n);else if(typeof t=="object")Array.isArray(t)?d(t):c(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function l(m){if(typeof m=="function")p(m,[]);else if(typeof m=="object")if(Array.isArray(m)){const[h,...x]=m;p(h,x)}else c(m);else throw new TypeError("Expected usable value, not `"+m+"`")}function c(m){if(!("plugins"in m)&&!("settings"in m))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");d(m.plugins),m.settings&&(i.settings=af(!0,i.settings,m.settings))}function d(m){let h=-1;if(m!=null)if(Array.isArray(m))for(;++h<m.length;){const x=m[h];l(x)}else throw new TypeError("Expected a list of plugins, not `"+m+"`")}function p(m,h){let x=-1,v=-1;for(;++x<o.length;)if(o[x][0]===m){v=x;break}if(v===-1)o.push([m,...h]);else if(h.length>0){let[b,...N]=h;const k=o[v][1];Gf(k)&&Gf(b)&&(b=af(!0,k,b)),o[v]=[m,b,...N]}}}}const vD=new Jp().freeze();function df(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function ff(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function pf(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 wy(e){if(!Gf(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function ky(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Fl(e){return bD(e)?e:new Zw(e)}function bD(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function wD(e){return typeof e=="string"||kD(e)}function kD(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const jD="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",jy=[],Sy={allowDangerousHtml:!0},SD=/^(https?|ircs?|mailto|xmpp)$/i,CD=[{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:"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 ND(e){const t=ED(e),n=PD(e);return TD(t.runSync(t.parse(n),n),e)}function ED(e){const t=e.rehypePlugins||jy,n=e.remarkPlugins||jy,o=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Sy}:Sy;return vD().use(i3).use(n).use(tD,o).use(t)}function PD(e){const t=e.children||"",n=new Zw;return typeof t=="string"&&(n.value=t),n}function TD(e,t){const n=t.allowedElements,o=t.allowElement,i=t.components,l=t.disallowedElements,c=t.skipHtml,d=t.unwrapDisallowed,p=t.urlTransform||RD;for(const h of CD)Object.hasOwn(t,h.from)&&(""+h.from+(h.to?"use `"+h.to+"` instead":"remove it")+jD+h.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),Jw(e,m),FT(e,{Fragment:a.Fragment,components:i,ignoreInvalidStyle:!0,jsx:a.jsx,jsxs:a.jsxs,passKeys:!0,passNode:!0});function m(h,x,v){if(h.type==="raw"&&v&&typeof x=="number")return c?v.children.splice(x,1):v.children[x]={type:"text",value:h.value},x;if(h.type==="element"){let b;for(b in nf)if(Object.hasOwn(nf,b)&&Object.hasOwn(h.properties,b)){const N=h.properties[b],k=nf[b];(k===null||k.includes(h.tagName))&&(h.properties[b]=p(String(N||""),b,h))}}if(h.type==="element"){let b=n?!n.includes(h.tagName):l?l.includes(h.tagName):!1;if(!b&&o&&typeof x=="number"&&(b=!o(h,x,v)),b&&v&&typeof x=="number")return d&&h.children?v.children.splice(x,1,...h.children):v.children.splice(x,1),x}}}function RD(e){const t=e.indexOf(":"),n=e.indexOf("?"),o=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||o!==-1&&t>o||SD.test(e.slice(0,t))?e:""}function Wt({content:e,className:t,emptyState:n="No markdown content yet."}){const o=e.replace(/<!--[\s\S]*?-->/g,"");return o.trim()?a.jsx("div",{className:ze("prose-syntaur max-w-none",t),children:a.jsx(ND,{children:o})}):a.jsx("div",{className:"rounded-md border border-dashed border-border/80 bg-muted/30 px-3 py-4 text-sm text-muted-foreground",children:n})}function AD(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return g.useMemo(()=>o=>{t.forEach(i=>i(o))},t)}const _c=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Gs(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function Zp(e){return"nodeType"in e}function Pn(e){var t,n;return e?Gs(e)?e:Zp(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function eh(e){const{Document:t}=Pn(e);return e instanceof t}function ya(e){return Gs(e)?!1:e instanceof Pn(e).HTMLElement}function e0(e){return e instanceof Pn(e).SVGElement}function Ys(e){return e?Gs(e)?e.document:Zp(e)?eh(e)?e:ya(e)||e0(e)?e.ownerDocument:document:document:document}const Pr=_c?g.useLayoutEffect:g.useEffect;function th(e){const t=g.useRef(e);return Pr(()=>{t.current=e}),g.useCallback(function(){for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return t.current==null?void 0:t.current(...o)},[])}function DD(){const e=g.useRef(null),t=g.useCallback((o,i)=>{e.current=setInterval(o,i)},[]),n=g.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function oa(e,t){t===void 0&&(t=[e]);const n=g.useRef(e);return Pr(()=>{n.current!==e&&(n.current=e)},t),n}function va(e,t){const n=g.useRef();return g.useMemo(()=>{const o=e(n.current);return n.current=o,o},[...t])}function cc(e){const t=th(e),n=g.useRef(null),o=g.useCallback(i=>{i!==n.current&&(t==null||t(i,n.current)),n.current=i},[]);return[n,o]}function Xf(e){const t=g.useRef();return g.useEffect(()=>{t.current=e},[e]),t.current}let hf={};function ba(e,t){return g.useMemo(()=>{if(t)return t;const n=hf[e]==null?0:hf[e]+1;return hf[e]=n,e+"-"+n},[e,t])}function t0(e){return function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return o.reduce((l,c)=>{const d=Object.entries(c);for(const[p,m]of d){const h=l[p];h!=null&&(l[p]=h+e*m)}return l},{...t})}}const Os=t0(1),uc=t0(-1);function ID(e){return"clientX"in e&&"clientY"in e}function nh(e){if(!e)return!1;const{KeyboardEvent:t}=Pn(e.target);return t&&e instanceof t}function LD(e){if(!e)return!1;const{TouchEvent:t}=Pn(e.target);return t&&e instanceof t}function Qf(e){if(LD(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return ID(e)?{x:e.clientX,y:e.clientY}:null}const $s=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[$s.Translate.toString(e),$s.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:o}=e;return t+" "+n+"ms "+o}}}),Cy="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function OD(e){return e.matches(Cy)?e:e.querySelector(Cy)}const _D={display:"none"};function MD(e){let{id:t,value:n}=e;return jt.createElement("div",{id:t,style:_D},n)}function $D(e){let{id:t,announcement:n,ariaLiveType:o="assertive"}=e;const i={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return jt.createElement("div",{id:t,style:i,role:"status","aria-live":o,"aria-atomic":!0},n)}function FD(){const[e,t]=g.useState("");return{announce:g.useCallback(o=>{o!=null&&t(o)},[]),announcement:e}}const n0=g.createContext(null);function zD(e){const t=g.useContext(n0);g.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function BD(){const[e]=g.useState(()=>new Set),t=g.useCallback(o=>(e.add(o),()=>e.delete(o)),[e]);return[g.useCallback(o=>{let{type:i,event:l}=o;e.forEach(c=>{var d;return(d=c[i])==null?void 0:d.call(c,l)})},[e]),t]}const UD={draggable:`
|
|
454
|
+
To pick up a draggable item, press the space bar.
|
|
455
|
+
While dragging, use the arrow keys to move the item.
|
|
456
|
+
Press space again to drop the item in its new position, or press escape to cancel.
|
|
457
|
+
`},HD={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function WD(e){let{announcements:t=HD,container:n,hiddenTextDescribedById:o,screenReaderInstructions:i=UD}=e;const{announce:l,announcement:c}=FD(),d=ba("DndLiveRegion"),[p,m]=g.useState(!1);if(g.useEffect(()=>{m(!0)},[]),zD(g.useMemo(()=>({onDragStart(x){let{active:v}=x;l(t.onDragStart({active:v}))},onDragMove(x){let{active:v,over:b}=x;t.onDragMove&&l(t.onDragMove({active:v,over:b}))},onDragOver(x){let{active:v,over:b}=x;l(t.onDragOver({active:v,over:b}))},onDragEnd(x){let{active:v,over:b}=x;l(t.onDragEnd({active:v,over:b}))},onDragCancel(x){let{active:v,over:b}=x;l(t.onDragCancel({active:v,over:b}))}}),[l,t])),!p)return null;const h=jt.createElement(jt.Fragment,null,jt.createElement(MD,{id:o,value:i.draggable}),jt.createElement($D,{id:d,announcement:c}));return n?wo.createPortal(h,n):h}var Ot;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(Ot||(Ot={}));function dc(){}function fc(e,t){return g.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function r0(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return g.useMemo(()=>[...t].filter(o=>o!=null),[...t])}const cr=Object.freeze({x:0,y:0});function VD(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function qD(e,t){let{data:{value:n}}=e,{data:{value:o}}=t;return n-o}function KD(e,t){let{data:{value:n}}=e,{data:{value:o}}=t;return o-n}function GD(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function Ny(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+e.width*.5,y:n+e.height*.5}}const o0=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:o}=e;const i=Ny(t,t.left,t.top),l=[];for(const c of o){const{id:d}=c,p=n.get(d);if(p){const m=VD(Ny(p),i);l.push({id:d,data:{droppableContainer:c,value:m}})}}return l.sort(qD)};function YD(e,t){const n=Math.max(t.top,e.top),o=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),l=Math.min(t.top+t.height,e.top+e.height),c=i-o,d=l-n;if(o<i&&n<l){const p=t.width*t.height,m=e.width*e.height,h=c*d,x=h/(p+m-h);return Number(x.toFixed(4))}return 0}const XD=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:o}=e;const i=[];for(const l of o){const{id:c}=l,d=n.get(c);if(d){const p=YD(d,t);p>0&&i.push({id:c,data:{droppableContainer:l,value:p}})}}return i.sort(KD)};function QD(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function s0(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:cr}function JD(e){return function(n){for(var o=arguments.length,i=new Array(o>1?o-1:0),l=1;l<o;l++)i[l-1]=arguments[l];return i.reduce((c,d)=>({...c,top:c.top+e*d.y,bottom:c.bottom+e*d.y,left:c.left+e*d.x,right:c.right+e*d.x}),{...n})}}const ZD=JD(1);function e4(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function t4(e,t,n){const o=e4(t);if(!o)return e;const{scaleX:i,scaleY:l,x:c,y:d}=o,p=e.left-c-(1-i)*parseFloat(n),m=e.top-d-(1-l)*parseFloat(n.slice(n.indexOf(" ")+1)),h=i?e.width/i:e.width,x=l?e.height/l:e.height;return{width:h,height:x,top:m,right:p+h,bottom:m+x,left:p}}const n4={ignoreTransform:!1};function Xs(e,t){t===void 0&&(t=n4);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:m,transformOrigin:h}=Pn(e).getComputedStyle(e);m&&(n=t4(n,m,h))}const{top:o,left:i,width:l,height:c,bottom:d,right:p}=n;return{top:o,left:i,width:l,height:c,bottom:d,right:p}}function Ey(e){return Xs(e,{ignoreTransform:!0})}function r4(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function o4(e,t){return t===void 0&&(t=Pn(e).getComputedStyle(e)),t.position==="fixed"}function s4(e,t){t===void 0&&(t=Pn(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(i=>{const l=t[i];return typeof l=="string"?n.test(l):!1})}function rh(e,t){const n=[];function o(i){if(t!=null&&n.length>=t||!i)return n;if(eh(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!ya(i)||e0(i)||n.includes(i))return n;const l=Pn(e).getComputedStyle(i);return i!==e&&s4(i,l)&&n.push(i),o4(i,l)?n:o(i.parentNode)}return e?o(e):n}function i0(e){const[t]=rh(e,1);return t??null}function mf(e){return!_c||!e?null:Gs(e)?e:Zp(e)?eh(e)||e===Ys(e).scrollingElement?window:ya(e)?e:null:null}function a0(e){return Gs(e)?e.scrollX:e.scrollLeft}function l0(e){return Gs(e)?e.scrollY:e.scrollTop}function Jf(e){return{x:a0(e),y:l0(e)}}var Ht;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(Ht||(Ht={}));function c0(e){return!_c||!e?!1:e===document.scrollingElement}function u0(e){const t={x:0,y:0},n=c0(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},o={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},i=e.scrollTop<=t.y,l=e.scrollLeft<=t.x,c=e.scrollTop>=o.y,d=e.scrollLeft>=o.x;return{isTop:i,isLeft:l,isBottom:c,isRight:d,maxScroll:o,minScroll:t}}const i4={x:.2,y:.2};function a4(e,t,n,o,i){let{top:l,left:c,right:d,bottom:p}=n;o===void 0&&(o=10),i===void 0&&(i=i4);const{isTop:m,isBottom:h,isLeft:x,isRight:v}=u0(e),b={x:0,y:0},N={x:0,y:0},k={height:t.height*i.y,width:t.width*i.x};return!m&&l<=t.top+k.height?(b.y=Ht.Backward,N.y=o*Math.abs((t.top+k.height-l)/k.height)):!h&&p>=t.bottom-k.height&&(b.y=Ht.Forward,N.y=o*Math.abs((t.bottom-k.height-p)/k.height)),!v&&d>=t.right-k.width?(b.x=Ht.Forward,N.x=o*Math.abs((t.right-k.width-d)/k.width)):!x&&c<=t.left+k.width&&(b.x=Ht.Backward,N.x=o*Math.abs((t.left+k.width-c)/k.width)),{direction:b,speed:N}}function l4(e){if(e===document.scrollingElement){const{innerWidth:l,innerHeight:c}=window;return{top:0,left:0,right:l,bottom:c,width:l,height:c}}const{top:t,left:n,right:o,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:o,bottom:i,width:e.clientWidth,height:e.clientHeight}}function d0(e){return e.reduce((t,n)=>Os(t,Jf(n)),cr)}function c4(e){return e.reduce((t,n)=>t+a0(n),0)}function u4(e){return e.reduce((t,n)=>t+l0(n),0)}function d4(e,t){if(t===void 0&&(t=Xs),!e)return;const{top:n,left:o,bottom:i,right:l}=t(e);i0(e)&&(i<=0||l<=0||n>=window.innerHeight||o>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const f4=[["x",["left","right"],c4],["y",["top","bottom"],u4]];class oh{constructor(t,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const o=rh(n),i=d0(o);this.rect={...t},this.width=t.width,this.height=t.height;for(const[l,c,d]of f4)for(const p of c)Object.defineProperty(this,p,{get:()=>{const m=d(o),h=i[l]-m;return this.rect[p]+h},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Yi{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var o;return(o=this.target)==null?void 0:o.removeEventListener(...n)})},this.target=t}add(t,n,o){var i;(i=this.target)==null||i.addEventListener(t,n,o),this.listeners.push([t,n,o])}}function p4(e){const{EventTarget:t}=Pn(e);return e instanceof t?e:Ys(e)}function gf(e,t){const n=Math.abs(e.x),o=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+o**2)>t:"x"in t&&"y"in t?n>t.x&&o>t.y:"x"in t?n>t.x:"y"in t?o>t.y:!1}var Xn;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(Xn||(Xn={}));function Py(e){e.preventDefault()}function h4(e){e.stopPropagation()}var Ve;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(Ve||(Ve={}));const f0={start:[Ve.Space,Ve.Enter],cancel:[Ve.Esc],end:[Ve.Space,Ve.Enter,Ve.Tab]},m4=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case Ve.Right:return{...n,x:n.x+25};case Ve.Left:return{...n,x:n.x-25};case Ve.Down:return{...n,y:n.y+25};case Ve.Up:return{...n,y:n.y-25}}};class Mc{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new Yi(Ys(n)),this.windowListeners=new Yi(Pn(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Xn.Resize,this.handleCancel),this.windowListeners.add(Xn.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Xn.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,o=t.node.current;o&&d4(o),n(cr)}handleKeyDown(t){if(nh(t)){const{active:n,context:o,options:i}=this.props,{keyboardCodes:l=f0,coordinateGetter:c=m4,scrollBehavior:d="smooth"}=i,{code:p}=t;if(l.end.includes(p)){this.handleEnd(t);return}if(l.cancel.includes(p)){this.handleCancel(t);return}const{collisionRect:m}=o.current,h=m?{x:m.left,y:m.top}:cr;this.referenceCoordinates||(this.referenceCoordinates=h);const x=c(t,{active:n,context:o.current,currentCoordinates:h});if(x){const v=uc(x,h),b={x:0,y:0},{scrollableAncestors:N}=o.current;for(const k of N){const j=t.code,{isTop:S,isRight:T,isLeft:R,isBottom:D,maxScroll:M,minScroll:P}=u0(k),L=l4(k),_={x:Math.min(j===Ve.Right?L.right-L.width/2:L.right,Math.max(j===Ve.Right?L.left:L.left+L.width/2,x.x)),y:Math.min(j===Ve.Down?L.bottom-L.height/2:L.bottom,Math.max(j===Ve.Down?L.top:L.top+L.height/2,x.y))},J=j===Ve.Right&&!T||j===Ve.Left&&!R,ne=j===Ve.Down&&!D||j===Ve.Up&&!S;if(J&&_.x!==x.x){const U=k.scrollLeft+v.x,G=j===Ve.Right&&U<=M.x||j===Ve.Left&&U>=P.x;if(G&&!v.y){k.scrollTo({left:U,behavior:d});return}G?b.x=k.scrollLeft-U:b.x=j===Ve.Right?k.scrollLeft-M.x:k.scrollLeft-P.x,b.x&&k.scrollBy({left:-b.x,behavior:d});break}else if(ne&&_.y!==x.y){const U=k.scrollTop+v.y,G=j===Ve.Down&&U<=M.y||j===Ve.Up&&U>=P.y;if(G&&!v.x){k.scrollTo({top:U,behavior:d});return}G?b.y=k.scrollTop-U:b.y=j===Ve.Down?k.scrollTop-M.y:k.scrollTop-P.y,b.y&&k.scrollBy({top:-b.y,behavior:d});break}}this.handleMove(t,Os(uc(x,this.referenceCoordinates),b))}}}handleMove(t,n){const{onMove:o}=this.props;t.preventDefault(),o(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}Mc.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:o=f0,onActivation:i}=t,{active:l}=n;const{code:c}=e.nativeEvent;if(o.start.includes(c)){const d=l.activatorNode.current;return d&&e.target!==d?!1:(e.preventDefault(),i==null||i({event:e.nativeEvent}),!0)}return!1}}];function Ty(e){return!!(e&&"distance"in e)}function Ry(e){return!!(e&&"delay"in e)}class sh{constructor(t,n,o){var i;o===void 0&&(o=p4(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=n;const{event:l}=t,{target:c}=l;this.props=t,this.events=n,this.document=Ys(c),this.documentListeners=new Yi(this.document),this.listeners=new Yi(o),this.windowListeners=new Yi(Pn(c)),this.initialCoordinates=(i=Qf(l))!=null?i:cr,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:n,bypassActivationConstraint:o}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(Xn.Resize,this.handleCancel),this.windowListeners.add(Xn.DragStart,Py),this.windowListeners.add(Xn.VisibilityChange,this.handleCancel),this.windowListeners.add(Xn.ContextMenu,Py),this.documentListeners.add(Xn.Keydown,this.handleKeydown),n){if(o!=null&&o({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Ry(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(Ty(n)){this.handlePending(n);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,n){const{active:o,onPending:i}=this.props;i(o,t,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(Xn.Click,h4,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Xn.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:o,initialCoordinates:i,props:l}=this,{onMove:c,options:{activationConstraint:d}}=l;if(!i)return;const p=(n=Qf(t))!=null?n:cr,m=uc(i,p);if(!o&&d){if(Ty(d)){if(d.tolerance!=null&&gf(m,d.tolerance))return this.handleCancel();if(gf(m,d.distance))return this.handleStart()}if(Ry(d)&&gf(m,d.tolerance))return this.handleCancel();this.handlePending(d,m);return}t.cancelable&&t.preventDefault(),c(p)}handleEnd(){const{onAbort:t,onEnd:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleCancel(){const{onAbort:t,onCancel:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleKeydown(t){t.code===Ve.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const g4={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class $c extends sh{constructor(t){const{event:n}=t,o=Ys(n.target);super(t,g4,o)}}$c.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:o}=t;return!n.isPrimary||n.button!==0?!1:(o==null||o({event:n}),!0)}}];const x4={move:{name:"mousemove"},end:{name:"mouseup"}};var Zf;(function(e){e[e.RightClick=2]="RightClick"})(Zf||(Zf={}));class y4 extends sh{constructor(t){super(t,x4,Ys(t.event.target))}}y4.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:o}=t;return n.button===Zf.RightClick?!1:(o==null||o({event:n}),!0)}}];const xf={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class v4 extends sh{constructor(t){super(t,xf)}static setup(){return window.addEventListener(xf.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(xf.move.name,t)};function t(){}}}v4.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:o}=t;const{touches:i}=n;return i.length>1?!1:(o==null||o({event:n}),!0)}}];var Xi;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(Xi||(Xi={}));var pc;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(pc||(pc={}));function b4(e){let{acceleration:t,activator:n=Xi.Pointer,canScroll:o,draggingRect:i,enabled:l,interval:c=5,order:d=pc.TreeOrder,pointerCoordinates:p,scrollableAncestors:m,scrollableAncestorRects:h,delta:x,threshold:v}=e;const b=k4({delta:x,disabled:!l}),[N,k]=DD(),j=g.useRef({x:0,y:0}),S=g.useRef({x:0,y:0}),T=g.useMemo(()=>{switch(n){case Xi.Pointer:return p?{top:p.y,bottom:p.y,left:p.x,right:p.x}:null;case Xi.DraggableRect:return i}},[n,i,p]),R=g.useRef(null),D=g.useCallback(()=>{const P=R.current;if(!P)return;const L=j.current.x*S.current.x,_=j.current.y*S.current.y;P.scrollBy(L,_)},[]),M=g.useMemo(()=>d===pc.TreeOrder?[...m].reverse():m,[d,m]);g.useEffect(()=>{if(!l||!m.length||!T){k();return}for(const P of M){if((o==null?void 0:o(P))===!1)continue;const L=m.indexOf(P),_=h[L];if(!_)continue;const{direction:J,speed:ne}=a4(P,_,T,t,v);for(const U of["x","y"])b[U][J[U]]||(ne[U]=0,J[U]=0);if(ne.x>0||ne.y>0){k(),R.current=P,N(D,c),j.current=ne,S.current=J;return}}j.current={x:0,y:0},S.current={x:0,y:0},k()},[t,D,o,k,l,c,JSON.stringify(T),JSON.stringify(b),N,m,M,h,JSON.stringify(v)])}const w4={x:{[Ht.Backward]:!1,[Ht.Forward]:!1},y:{[Ht.Backward]:!1,[Ht.Forward]:!1}};function k4(e){let{delta:t,disabled:n}=e;const o=Xf(t);return va(i=>{if(n||!o||!i)return w4;const l={x:Math.sign(t.x-o.x),y:Math.sign(t.y-o.y)};return{x:{[Ht.Backward]:i.x[Ht.Backward]||l.x===-1,[Ht.Forward]:i.x[Ht.Forward]||l.x===1},y:{[Ht.Backward]:i.y[Ht.Backward]||l.y===-1,[Ht.Forward]:i.y[Ht.Forward]||l.y===1}}},[n,t,o])}function j4(e,t){const n=t!=null?e.get(t):void 0,o=n?n.node.current:null;return va(i=>{var l;return t==null?null:(l=o??i)!=null?l:null},[o,t])}function S4(e,t){return g.useMemo(()=>e.reduce((n,o)=>{const{sensor:i}=o,l=i.activators.map(c=>({eventName:c.eventName,handler:t(c.handler,o)}));return[...n,...l]},[]),[e,t])}var sa;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(sa||(sa={}));var ep;(function(e){e.Optimized="optimized"})(ep||(ep={}));const Ay=new Map;function C4(e,t){let{dragging:n,dependencies:o,config:i}=t;const[l,c]=g.useState(null),{frequency:d,measure:p,strategy:m}=i,h=g.useRef(e),x=j(),v=oa(x),b=g.useCallback(function(S){S===void 0&&(S=[]),!v.current&&c(T=>T===null?S:T.concat(S.filter(R=>!T.includes(R))))},[v]),N=g.useRef(null),k=va(S=>{if(x&&!n)return Ay;if(!S||S===Ay||h.current!==e||l!=null){const T=new Map;for(let R of e){if(!R)continue;if(l&&l.length>0&&!l.includes(R.id)&&R.rect.current){T.set(R.id,R.rect.current);continue}const D=R.node.current,M=D?new oh(p(D),D):null;R.rect.current=M,M&&T.set(R.id,M)}return T}return S},[e,l,n,x,p]);return g.useEffect(()=>{h.current=e},[e]),g.useEffect(()=>{x||b()},[n,x]),g.useEffect(()=>{l&&l.length>0&&c(null)},[JSON.stringify(l)]),g.useEffect(()=>{x||typeof d!="number"||N.current!==null||(N.current=setTimeout(()=>{b(),N.current=null},d))},[d,x,b,...o]),{droppableRects:k,measureDroppableContainers:b,measuringScheduled:l!=null};function j(){switch(m){case sa.Always:return!1;case sa.BeforeDragging:return n;default:return!n}}}function p0(e,t){return va(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function N4(e,t){return p0(e,t)}function E4(e){let{callback:t,disabled:n}=e;const o=th(t),i=g.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:l}=window;return new l(o)},[o,n]);return g.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function Fc(e){let{callback:t,disabled:n}=e;const o=th(t),i=g.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:l}=window;return new l(o)},[n]);return g.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function P4(e){return new oh(Xs(e),e)}function Dy(e,t,n){t===void 0&&(t=P4);const[o,i]=g.useState(null);function l(){i(p=>{if(!e)return null;if(e.isConnected===!1){var m;return(m=p??n)!=null?m:null}const h=t(e);return JSON.stringify(p)===JSON.stringify(h)?p:h})}const c=E4({callback(p){if(e)for(const m of p){const{type:h,target:x}=m;if(h==="childList"&&x instanceof HTMLElement&&x.contains(e)){l();break}}}}),d=Fc({callback:l});return Pr(()=>{l(),e?(d==null||d.observe(e),c==null||c.observe(document.body,{childList:!0,subtree:!0})):(d==null||d.disconnect(),c==null||c.disconnect())},[e]),o}function T4(e){const t=p0(e);return s0(e,t)}const Iy=[];function R4(e){const t=g.useRef(e),n=va(o=>e?o&&o!==Iy&&e&&t.current&&e.parentNode===t.current.parentNode?o:rh(e):Iy,[e]);return g.useEffect(()=>{t.current=e},[e]),n}function A4(e){const[t,n]=g.useState(null),o=g.useRef(e),i=g.useCallback(l=>{const c=mf(l.target);c&&n(d=>d?(d.set(c,Jf(c)),new Map(d)):null)},[]);return g.useEffect(()=>{const l=o.current;if(e!==l){c(l);const d=e.map(p=>{const m=mf(p);return m?(m.addEventListener("scroll",i,{passive:!0}),[m,Jf(m)]):null}).filter(p=>p!=null);n(d.length?new Map(d):null),o.current=e}return()=>{c(e),c(l)};function c(d){d.forEach(p=>{const m=mf(p);m==null||m.removeEventListener("scroll",i)})}},[i,e]),g.useMemo(()=>e.length?t?Array.from(t.values()).reduce((l,c)=>Os(l,c),cr):d0(e):cr,[e,t])}function Ly(e,t){t===void 0&&(t=[]);const n=g.useRef(null);return g.useEffect(()=>{n.current=null},t),g.useEffect(()=>{const o=e!==cr;o&&!n.current&&(n.current=e),!o&&n.current&&(n.current=null)},[e]),n.current?uc(e,n.current):cr}function D4(e){g.useEffect(()=>{if(!_c)return;const t=e.map(n=>{let{sensor:o}=n;return o.setup==null?void 0:o.setup()});return()=>{for(const n of t)n==null||n()}},e.map(t=>{let{sensor:n}=t;return n}))}function I4(e,t){return g.useMemo(()=>e.reduce((n,o)=>{let{eventName:i,handler:l}=o;return n[i]=c=>{l(c,t)},n},{}),[e,t])}function h0(e){return g.useMemo(()=>e?r4(e):null,[e])}const Oy=[];function L4(e,t){t===void 0&&(t=Xs);const[n]=e,o=h0(n?Pn(n):null),[i,l]=g.useState(Oy);function c(){l(()=>e.length?e.map(p=>c0(p)?o:new oh(t(p),p)):Oy)}const d=Fc({callback:c});return Pr(()=>{d==null||d.disconnect(),c(),e.forEach(p=>d==null?void 0:d.observe(p))},[e]),i}function O4(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return ya(t)?t:e}function _4(e){let{measure:t}=e;const[n,o]=g.useState(null),i=g.useCallback(m=>{for(const{target:h}of m)if(ya(h)){o(x=>{const v=t(h);return x?{...x,width:v.width,height:v.height}:v});break}},[t]),l=Fc({callback:i}),c=g.useCallback(m=>{const h=O4(m);l==null||l.disconnect(),h&&(l==null||l.observe(h)),o(h?t(h):null)},[t,l]),[d,p]=cc(c);return g.useMemo(()=>({nodeRef:d,rect:n,setRef:p}),[n,d,p])}const M4=[{sensor:$c,options:{}},{sensor:Mc,options:{}}],$4={current:{}},Zl={draggable:{measure:Ey},droppable:{measure:Ey,strategy:sa.WhileDragging,frequency:ep.Optimized},dragOverlay:{measure:Xs}};class Qi extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,o;return(n=(o=this.get(t))==null?void 0:o.node.current)!=null?n:void 0}}const F4={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Qi,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:dc},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Zl,measureDroppableContainers:dc,windowRect:null,measuringScheduled:!1},z4={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:dc,draggableNodes:new Map,over:null,measureDroppableContainers:dc},zc=g.createContext(z4),m0=g.createContext(F4);function B4(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Qi}}}function U4(e,t){switch(t.type){case Ot.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Ot.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case Ot.DragEnd:case Ot.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Ot.RegisterDroppable:{const{element:n}=t,{id:o}=n,i=new Qi(e.droppable.containers);return i.set(o,n),{...e,droppable:{...e.droppable,containers:i}}}case Ot.SetDroppableDisabled:{const{id:n,key:o,disabled:i}=t,l=e.droppable.containers.get(n);if(!l||o!==l.key)return e;const c=new Qi(e.droppable.containers);return c.set(n,{...l,disabled:i}),{...e,droppable:{...e.droppable,containers:c}}}case Ot.UnregisterDroppable:{const{id:n,key:o}=t,i=e.droppable.containers.get(n);if(!i||o!==i.key)return e;const l=new Qi(e.droppable.containers);return l.delete(n),{...e,droppable:{...e.droppable,containers:l}}}default:return e}}function H4(e){let{disabled:t}=e;const{active:n,activatorEvent:o,draggableNodes:i}=g.useContext(zc),l=Xf(o),c=Xf(n==null?void 0:n.id);return g.useEffect(()=>{if(!t&&!o&&l&&c!=null){if(!nh(l)||document.activeElement===l.target)return;const d=i.get(c);if(!d)return;const{activatorNode:p,node:m}=d;if(!p.current&&!m.current)return;requestAnimationFrame(()=>{for(const h of[p.current,m.current]){if(!h)continue;const x=OD(h);if(x){x.focus();break}}})}},[o,t,i,c,l]),null}function W4(e,t){let{transform:n,...o}=t;return e!=null&&e.length?e.reduce((i,l)=>l({transform:i,...o}),n):n}function V4(e){return g.useMemo(()=>({draggable:{...Zl.draggable,...e==null?void 0:e.draggable},droppable:{...Zl.droppable,...e==null?void 0:e.droppable},dragOverlay:{...Zl.dragOverlay,...e==null?void 0:e.dragOverlay}}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function q4(e){let{activeNode:t,measure:n,initialRect:o,config:i=!0}=e;const l=g.useRef(!1),{x:c,y:d}=typeof i=="boolean"?{x:i,y:i}:i;Pr(()=>{if(!c&&!d||!t){l.current=!1;return}if(l.current||!o)return;const m=t==null?void 0:t.node.current;if(!m||m.isConnected===!1)return;const h=n(m),x=s0(h,o);if(c||(x.x=0),d||(x.y=0),l.current=!0,Math.abs(x.x)>0||Math.abs(x.y)>0){const v=i0(m);v&&v.scrollBy({top:x.y,left:x.x})}},[t,c,d,o,n])}const g0=g.createContext({...cr,scaleX:1,scaleY:1});var bo;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(bo||(bo={}));const x0=g.memo(function(t){var n,o,i,l;let{id:c,accessibility:d,autoScroll:p=!0,children:m,sensors:h=M4,collisionDetection:x=XD,measuring:v,modifiers:b,...N}=t;const k=g.useReducer(U4,void 0,B4),[j,S]=k,[T,R]=BD(),[D,M]=g.useState(bo.Uninitialized),P=D===bo.Initialized,{draggable:{active:L,nodes:_,translate:J},droppable:{containers:ne}}=j,U=L!=null?_.get(L):null,G=g.useRef({initial:null,translated:null}),q=g.useMemo(()=>{var Be;return L!=null?{id:L,data:(Be=U==null?void 0:U.data)!=null?Be:$4,rect:G}:null},[L,U]),ee=g.useRef(null),[$,I]=g.useState(null),[A,F]=g.useState(null),K=oa(N,Object.values(N)),E=ba("DndDescribedBy",c),B=g.useMemo(()=>ne.getEnabled(),[ne]),X=V4(v),{droppableRects:O,measureDroppableContainers:se,measuringScheduled:me}=C4(B,{dragging:P,dependencies:[J.x,J.y],config:X.droppable}),fe=j4(_,L),Pe=g.useMemo(()=>A?Qf(A):null,[A]),Ce=gt(),pe=N4(fe,X.draggable.measure);q4({activeNode:L!=null?_.get(L):null,config:Ce.layoutShiftCompensation,initialRect:pe,measure:X.draggable.measure});const xe=Dy(fe,X.draggable.measure,pe),Je=Dy(fe?fe.parentElement:null),Ke=g.useRef({activatorEvent:null,active:null,activeNode:fe,collisionRect:null,collisions:null,droppableRects:O,draggableNodes:_,draggingNode:null,draggingNodeRect:null,droppableContainers:ne,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Me=ne.getNodeFor((n=Ke.current.over)==null?void 0:n.id),_e=_4({measure:X.dragOverlay.measure}),ct=(o=_e.nodeRef.current)!=null?o:fe,et=P?(i=_e.rect)!=null?i:xe:null,mt=!!(_e.nodeRef.current&&_e.rect),Pt=T4(mt?null:xe),Ge=h0(ct?Pn(ct):null),st=R4(P?Me??fe:null),Kt=L4(st),Zt=W4(b,{transform:{x:J.x-Pt.x,y:J.y-Pt.y,scaleX:1,scaleY:1},activatorEvent:A,active:q,activeNodeRect:xe,containerNodeRect:Je,draggingNodeRect:et,over:Ke.current.over,overlayNodeRect:_e.rect,scrollableAncestors:st,scrollableAncestorRects:Kt,windowRect:Ge}),mn=Pe?Os(Pe,J):null,Tn=A4(st),Rn=Ly(Tn),re=Ly(Tn,[xe]),le=Os(Zt,Rn),he=et?ZD(et,Zt):null,te=q&&he?x({active:q,collisionRect:he,droppableRects:O,droppableContainers:B,pointerCoordinates:mn}):null,ye=GD(te,"id"),[Se,$t]=g.useState(null),en=mt?Zt:Os(Zt,re),Gt=QD(en,(l=Se==null?void 0:Se.rect)!=null?l:null,xe),V=g.useRef(null),ce=g.useCallback((Be,Ze)=>{let{sensor:St,options:Ft}=Ze;if(ee.current==null)return;const Yt=_.get(ee.current);if(!Yt)return;const nn=Be.nativeEvent,gn=new St({active:ee.current,activeNode:Yt,event:nn,options:Ft,context:Ke,onAbort(xt){if(!_.get(xt))return;const{onDragAbort:rn}=K.current,Zn={id:xt};rn==null||rn(Zn),T({type:"onDragAbort",event:Zn})},onPending(xt,Hn,rn,Zn){if(!_.get(xt))return;const{onDragPending:hr}=K.current,An={id:xt,constraint:Hn,initialCoordinates:rn,offset:Zn};hr==null||hr(An),T({type:"onDragPending",event:An})},onStart(xt){const Hn=ee.current;if(Hn==null)return;const rn=_.get(Hn);if(!rn)return;const{onDragStart:Zn}=K.current,er={activatorEvent:nn,active:{id:Hn,data:rn.data,rect:G}};wo.unstable_batchedUpdates(()=>{Zn==null||Zn(er),M(bo.Initializing),S({type:Ot.DragStart,initialCoordinates:xt,active:Hn}),T({type:"onDragStart",event:er}),I(V.current),F(nn)})},onMove(xt){S({type:Ot.DragMove,coordinates:xt})},onEnd:Ar(Ot.DragEnd),onCancel:Ar(Ot.DragCancel)});V.current=gn;function Ar(xt){return async function(){const{active:rn,collisions:Zn,over:er,scrollAdjustedTranslate:hr}=Ke.current;let An=null;if(rn&&hr){const{cancelDrop:Dr}=K.current;An={activatorEvent:nn,active:rn,collisions:Zn,delta:hr,over:er},xt===Ot.DragEnd&&typeof Dr=="function"&&await Promise.resolve(Dr(An))&&(xt=Ot.DragCancel)}ee.current=null,wo.unstable_batchedUpdates(()=>{S({type:xt}),M(bo.Uninitialized),$t(null),I(null),F(null),V.current=null;const Dr=xt===Ot.DragEnd?"onDragEnd":"onDragCancel";if(An){const ei=K.current[Dr];ei==null||ei(An),T({type:Dr,event:An})}})}}},[_]),ve=g.useCallback((Be,Ze)=>(St,Ft)=>{const Yt=St.nativeEvent,nn=_.get(Ft);if(ee.current!==null||!nn||Yt.dndKit||Yt.defaultPrevented)return;const gn={active:nn};Be(St,Ze.options,gn)===!0&&(Yt.dndKit={capturedBy:Ze.sensor},ee.current=Ft,ce(St,Ze))},[_,ce]),Oe=S4(h,ve);D4(h),Pr(()=>{xe&&D===bo.Initializing&&M(bo.Initialized)},[xe,D]),g.useEffect(()=>{const{onDragMove:Be}=K.current,{active:Ze,activatorEvent:St,collisions:Ft,over:Yt}=Ke.current;if(!Ze||!St)return;const nn={active:Ze,activatorEvent:St,collisions:Ft,delta:{x:le.x,y:le.y},over:Yt};wo.unstable_batchedUpdates(()=>{Be==null||Be(nn),T({type:"onDragMove",event:nn})})},[le.x,le.y]),g.useEffect(()=>{const{active:Be,activatorEvent:Ze,collisions:St,droppableContainers:Ft,scrollAdjustedTranslate:Yt}=Ke.current;if(!Be||ee.current==null||!Ze||!Yt)return;const{onDragOver:nn}=K.current,gn=Ft.get(ye),Ar=gn&&gn.rect.current?{id:gn.id,rect:gn.rect.current,data:gn.data,disabled:gn.disabled}:null,xt={active:Be,activatorEvent:Ze,collisions:St,delta:{x:Yt.x,y:Yt.y},over:Ar};wo.unstable_batchedUpdates(()=>{$t(Ar),nn==null||nn(xt),T({type:"onDragOver",event:xt})})},[ye]),Pr(()=>{Ke.current={activatorEvent:A,active:q,activeNode:fe,collisionRect:he,collisions:te,droppableRects:O,draggableNodes:_,draggingNode:ct,draggingNodeRect:et,droppableContainers:ne,over:Se,scrollableAncestors:st,scrollAdjustedTranslate:le},G.current={initial:et,translated:he}},[q,fe,te,he,_,ct,et,O,ne,Se,st,le]),b4({...Ce,delta:J,draggingRect:he,pointerCoordinates:mn,scrollableAncestors:st,scrollableAncestorRects:Kt});const Un=g.useMemo(()=>({active:q,activeNode:fe,activeNodeRect:xe,activatorEvent:A,collisions:te,containerNodeRect:Je,dragOverlay:_e,draggableNodes:_,droppableContainers:ne,droppableRects:O,over:Se,measureDroppableContainers:se,scrollableAncestors:st,scrollableAncestorRects:Kt,measuringConfiguration:X,measuringScheduled:me,windowRect:Ge}),[q,fe,xe,A,te,Je,_e,_,ne,O,Se,se,st,Kt,X,me,Ge]),tn=g.useMemo(()=>({activatorEvent:A,activators:Oe,active:q,activeNodeRect:xe,ariaDescribedById:{draggable:E},dispatch:S,draggableNodes:_,over:Se,measureDroppableContainers:se}),[A,Oe,q,xe,S,E,_,Se,se]);return jt.createElement(n0.Provider,{value:R},jt.createElement(zc.Provider,{value:tn},jt.createElement(m0.Provider,{value:Un},jt.createElement(g0.Provider,{value:Gt},m)),jt.createElement(H4,{disabled:(d==null?void 0:d.restoreFocus)===!1})),jt.createElement(WD,{...d,hiddenTextDescribedById:E}));function gt(){const Be=($==null?void 0:$.autoScrollEnabled)===!1,Ze=typeof p=="object"?p.enabled===!1:p===!1,St=P&&!Be&&!Ze;return typeof p=="object"?{...p,enabled:St}:{enabled:St}}}),K4=g.createContext(null),_y="button",G4="Draggable";function Y4(e){let{id:t,data:n,disabled:o=!1,attributes:i}=e;const l=ba(G4),{activators:c,activatorEvent:d,active:p,activeNodeRect:m,ariaDescribedById:h,draggableNodes:x,over:v}=g.useContext(zc),{role:b=_y,roleDescription:N="draggable",tabIndex:k=0}=i??{},j=(p==null?void 0:p.id)===t,S=g.useContext(j?g0:K4),[T,R]=cc(),[D,M]=cc(),P=I4(c,t),L=oa(n);Pr(()=>(x.set(t,{id:t,key:l,node:T,activatorNode:D,data:L}),()=>{const J=x.get(t);J&&J.key===l&&x.delete(t)}),[x,t]);const _=g.useMemo(()=>({role:b,tabIndex:k,"aria-disabled":o,"aria-pressed":j&&b===_y?!0:void 0,"aria-roledescription":N,"aria-describedby":h.draggable}),[o,b,k,j,N,h.draggable]);return{active:p,activatorEvent:d,activeNodeRect:m,attributes:_,isDragging:j,listeners:o?void 0:P,node:T,over:v,setNodeRef:R,setActivatorNodeRef:M,transform:S}}function X4(){return g.useContext(m0)}const Q4="Droppable",J4={timeout:25};function Z4(e){let{data:t,disabled:n=!1,id:o,resizeObserverConfig:i}=e;const l=ba(Q4),{active:c,dispatch:d,over:p,measureDroppableContainers:m}=g.useContext(zc),h=g.useRef({disabled:n}),x=g.useRef(!1),v=g.useRef(null),b=g.useRef(null),{disabled:N,updateMeasurementsFor:k,timeout:j}={...J4,...i},S=oa(k??o),T=g.useCallback(()=>{if(!x.current){x.current=!0;return}b.current!=null&&clearTimeout(b.current),b.current=setTimeout(()=>{m(Array.isArray(S.current)?S.current:[S.current]),b.current=null},j)},[j]),R=Fc({callback:T,disabled:N||!c}),D=g.useCallback((_,J)=>{R&&(J&&(R.unobserve(J),x.current=!1),_&&R.observe(_))},[R]),[M,P]=cc(D),L=oa(t);return g.useEffect(()=>{!R||!M.current||(R.disconnect(),x.current=!1,R.observe(M.current))},[M,R]),g.useEffect(()=>(d({type:Ot.RegisterDroppable,element:{id:o,key:l,disabled:n,node:M,rect:v,data:L}}),()=>d({type:Ot.UnregisterDroppable,key:l,id:o})),[o]),g.useEffect(()=>{n!==h.current.disabled&&(d({type:Ot.SetDroppableDisabled,id:o,key:l,disabled:n}),h.current.disabled=n)},[o,l,n,d]),{active:c,rect:v,isOver:(p==null?void 0:p.id)===o,node:M,over:p,setNodeRef:P}}function Bc(e,t,n){const o=e.slice();return o.splice(n<0?o.length+n:n,0,o.splice(t,1)[0]),o}function eI(e,t){return e.reduce((n,o,i)=>{const l=t.get(o);return l&&(n[i]=l),n},Array(e.length))}function zl(e){return e!==null&&e>=0}function tI(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function nI(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const y0=e=>{let{rects:t,activeIndex:n,overIndex:o,index:i}=e;const l=Bc(t,o,n),c=t[i],d=l[i];return!d||!c?null:{x:d.left-c.left,y:d.top-c.top,scaleX:d.width/c.width,scaleY:d.height/c.height}},Bl={scaleX:1,scaleY:1},v0=e=>{var t;let{activeIndex:n,activeNodeRect:o,index:i,rects:l,overIndex:c}=e;const d=(t=l[n])!=null?t:o;if(!d)return null;if(i===n){const m=l[c];return m?{x:0,y:n<c?m.top+m.height-(d.top+d.height):m.top-d.top,...Bl}:null}const p=rI(l,i,n);return i>n&&i<=c?{x:0,y:-d.height-p,...Bl}:i<n&&i>=c?{x:0,y:d.height+p,...Bl}:{x:0,y:0,...Bl}};function rI(e,t,n){const o=e[t],i=e[t-1],l=e[t+1];return o?n<t?i?o.top-(i.top+i.height):l?l.top-(o.top+o.height):0:l?l.top-(o.top+o.height):i?o.top-(i.top+i.height):0:0}const b0="Sortable",w0=jt.createContext({activeIndex:-1,containerId:b0,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:y0,disabled:{draggable:!1,droppable:!1}});function k0(e){let{children:t,id:n,items:o,strategy:i=y0,disabled:l=!1}=e;const{active:c,dragOverlay:d,droppableRects:p,over:m,measureDroppableContainers:h}=X4(),x=ba(b0,n),v=d.rect!==null,b=g.useMemo(()=>o.map(P=>typeof P=="object"&&"id"in P?P.id:P),[o]),N=c!=null,k=c?b.indexOf(c.id):-1,j=m?b.indexOf(m.id):-1,S=g.useRef(b),T=!tI(b,S.current),R=j!==-1&&k===-1||T,D=nI(l);Pr(()=>{T&&N&&h(b)},[T,b,N,h]),g.useEffect(()=>{S.current=b},[b]);const M=g.useMemo(()=>({activeIndex:k,containerId:x,disabled:D,disableTransforms:R,items:b,overIndex:j,useDragOverlay:v,sortedRects:eI(b,p),strategy:i}),[k,x,D.draggable,D.droppable,R,b,j,p,v,i]);return jt.createElement(w0.Provider,{value:M},t)}const oI=e=>{let{id:t,items:n,activeIndex:o,overIndex:i}=e;return Bc(n,o,i).indexOf(t)},sI=e=>{let{containerId:t,isSorting:n,wasDragging:o,index:i,items:l,newIndex:c,previousItems:d,previousContainerId:p,transition:m}=e;return!m||!o||d!==l&&i===c?!1:n?!0:c!==i&&t===p},iI={duration:200,easing:"ease"},j0="transform",aI=$s.Transition.toString({property:j0,duration:0,easing:"linear"}),lI={roleDescription:"sortable"};function cI(e){let{disabled:t,index:n,node:o,rect:i}=e;const[l,c]=g.useState(null),d=g.useRef(n);return Pr(()=>{if(!t&&n!==d.current&&o.current){const p=i.current;if(p){const m=Xs(o.current,{ignoreTransform:!0}),h={x:p.left-m.left,y:p.top-m.top,scaleX:p.width/m.width,scaleY:p.height/m.height};(h.x||h.y)&&c(h)}}n!==d.current&&(d.current=n)},[t,n,o,i]),g.useEffect(()=>{l&&c(null)},[l]),l}function S0(e){let{animateLayoutChanges:t=sI,attributes:n,disabled:o,data:i,getNewIndex:l=oI,id:c,strategy:d,resizeObserverConfig:p,transition:m=iI}=e;const{items:h,containerId:x,activeIndex:v,disabled:b,disableTransforms:N,sortedRects:k,overIndex:j,useDragOverlay:S,strategy:T}=g.useContext(w0),R=uI(o,b),D=h.indexOf(c),M=g.useMemo(()=>({sortable:{containerId:x,index:D,items:h},...i}),[x,i,D,h]),P=g.useMemo(()=>h.slice(h.indexOf(c)),[h,c]),{rect:L,node:_,isOver:J,setNodeRef:ne}=Z4({id:c,data:M,disabled:R.droppable,resizeObserverConfig:{updateMeasurementsFor:P,...p}}),{active:U,activatorEvent:G,activeNodeRect:q,attributes:ee,setNodeRef:$,listeners:I,isDragging:A,over:F,setActivatorNodeRef:K,transform:E}=Y4({id:c,data:M,attributes:{...lI,...n},disabled:R.draggable}),B=AD(ne,$),X=!!U,O=X&&!N&&zl(v)&&zl(j),se=!S&&A,me=se&&O?E:null,Pe=O?me??(d??T)({rects:k,activeNodeRect:q,activeIndex:v,overIndex:j,index:D}):null,Ce=zl(v)&&zl(j)?l({id:c,items:h,activeIndex:v,overIndex:j}):D,pe=U==null?void 0:U.id,xe=g.useRef({activeId:pe,items:h,newIndex:Ce,containerId:x}),Je=h!==xe.current.items,Ke=t({active:U,containerId:x,isDragging:A,isSorting:X,id:c,index:D,items:h,newIndex:xe.current.newIndex,previousItems:xe.current.items,previousContainerId:xe.current.containerId,transition:m,wasDragging:xe.current.activeId!=null}),Me=cI({disabled:!Ke,index:D,node:_,rect:L});return g.useEffect(()=>{X&&xe.current.newIndex!==Ce&&(xe.current.newIndex=Ce),x!==xe.current.containerId&&(xe.current.containerId=x),h!==xe.current.items&&(xe.current.items=h)},[X,Ce,x,h]),g.useEffect(()=>{if(pe===xe.current.activeId)return;if(pe!=null&&xe.current.activeId==null){xe.current.activeId=pe;return}const ct=setTimeout(()=>{xe.current.activeId=pe},50);return()=>clearTimeout(ct)},[pe]),{active:U,activeIndex:v,attributes:ee,data:M,rect:L,index:D,newIndex:Ce,items:h,isOver:J,isSorting:X,isDragging:A,listeners:I,node:_,overIndex:j,over:F,setNodeRef:B,setActivatorNodeRef:K,setDroppableNodeRef:ne,setDraggableNodeRef:$,transform:Me??Pe,transition:_e()};function _e(){if(Me||Je&&xe.current.newIndex===D)return aI;if(!(se&&!nh(G)||!m)&&(X||Ke))return $s.Transition.toString({...m,property:j0})}}function uI(e,t){var n,o;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(n=e==null?void 0:e.draggable)!=null?n:t.draggable,droppable:(o=e==null?void 0:e.droppable)!=null?o:t.droppable}}Ve.Down,Ve.Right,Ve.Up,Ve.Left;function To(e){return`/api/projects/${encodeURIComponent(e)}/todos`}function dI(e){const[t,n]=g.useState(null),[o,i]=g.useState(!0),[l,c]=g.useState(null),d=g.useCallback(async()=>{if(e)try{const p=await fetch(To(e));if(!p.ok)throw new Error(`HTTP ${p.status}`);n(await p.json()),c(null)}catch(p){c(p instanceof Error?p.message:"Failed to fetch todos")}finally{i(!1)}},[e]);return g.useEffect(()=>{d()},[d]),jc(p=>{p.type==="todos-updated"&&p.projectSlug===e&&d()}),{data:t,loading:o,error:l,refetch:d}}async function fI(e,t,n){await fetch(To(e),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({description:t,tags:n})})}async function pI(e,t,n){await fetch(`${To(e)}/${t}/complete`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({summary:"Completed."})})}async function hI(e,t,n){await fetch(`${To(e)}/${t}/block`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({reason:n})})}async function mI(e,t,n){await fetch(`${To(e)}/${t}/start`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({session:n})})}async function gI(e,t){await fetch(`${To(e)}/${t}/reopen`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})})}async function xI(e,t){await fetch(`${To(e)}/reorder`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ids:t})})}async function yI(e,t){await fetch(`${To(e)}/${t}`,{method:"DELETE"})}const My=[{value:"open",icon:"○",label:"Open",color:"text-muted-foreground"},{value:"in_progress",icon:"◉",label:"In Progress",color:"text-status-in-progress-foreground"},{value:"completed",icon:"✓",label:"Completed",color:"text-status-completed-foreground"},{value:"blocked",icon:"✕",label:"Blocked",color:"text-status-blocked-foreground"}];function ih({status:e,onChange:t}){const[n,o]=g.useState(!1),i=g.useRef(null);g.useEffect(()=>{if(!n)return;function c(d){i.current&&!i.current.contains(d.target)&&o(!1)}return document.addEventListener("mousedown",c),()=>document.removeEventListener("mousedown",c)},[n]);const l=My.find(c=>c.value===e);return a.jsxs("div",{className:"relative",ref:i,onClick:c=>c.stopPropagation(),children:[a.jsx("button",{onClick:()=>o(!n),className:`text-lg leading-none ${l.color} hover:opacity-70 transition`,title:l.label,children:l.icon}),n&&a.jsx("div",{className:"absolute left-0 top-full mt-1 z-20 min-w-[140px] rounded-md border border-border/70 bg-background shadow-lg py-1",children:My.filter(c=>c.value!==e).map(c=>a.jsxs("button",{onClick:()=>{t(c.value),o(!1)},className:`flex w-full items-center gap-2 px-3 py-1.5 text-sm hover:bg-foreground/5 transition ${c.color}`,children:[a.jsx("span",{className:"text-base leading-none",children:c.icon}),a.jsx("span",{children:c.label})]},c.value))})]})}function vI({item:e,copiedId:t,onCycleStatus:n,onStatusChange:o,onCopyId:i,onDelete:l,disabled:c,hotkeyRowProps:d}){const{attributes:p,listeners:m,setNodeRef:h,setActivatorNodeRef:x,transform:v,transition:b,isDragging:N}=S0({id:e.id,disabled:c}),k={transform:$s.Transform.toString(v),transition:b,zIndex:N?50:void 0,position:N?"relative":void 0};return a.jsxs("div",{ref:h,style:k,"data-todo-id":e.id,...d??{},className:`surface-panel flex items-center gap-3 px-3 py-2 cursor-pointer hover:bg-foreground/[0.03] transition ${N?"opacity-50 shadow-lg":""}`,onClick:()=>n(e.id,e.status),children:[!c&&a.jsx("button",{ref:x,...p,...m,className:"cursor-grab active:cursor-grabbing text-muted-foreground/40 hover:text-muted-foreground transition touch-none",onClick:j=>j.stopPropagation(),children:a.jsx(Ov,{className:"h-4 w-4"})}),a.jsx(ih,{status:e.status,onChange:j=>o(e.id,j)}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("span",{className:`text-sm ${e.status==="completed"?"line-through text-muted-foreground":"text-foreground"}`,children:e.description}),e.tags.length>0&&a.jsx("span",{className:"ml-2 text-xs text-muted-foreground",children:e.tags.map(j=>`#${j}`).join(" ")}),e.session&&a.jsxs("span",{className:"ml-2 text-xs text-info-foreground/70 font-mono",children:["session:",e.session.slice(0,8)]})]}),t===e.id?a.jsxs("span",{className:"text-xs text-status-completed-foreground flex items-center gap-1",children:[a.jsx(da,{className:"h-3 w-3"})," Copied to clipboard"]}):a.jsxs(a.Fragment,{children:[a.jsxs("button",{className:"text-xs text-muted-foreground/60 font-mono hover:text-foreground transition",onClick:j=>i(j,e.id),children:["t:",e.id]}),a.jsx("button",{className:"text-muted-foreground/40 hover:text-foreground transition",title:"Copy ID",onClick:j=>i(j,e.id),children:a.jsx(kc,{className:"h-3 w-3"})}),a.jsx("button",{className:"text-muted-foreground/40 hover:text-destructive transition",title:"Delete todo",onClick:j=>l(j,e.id,e.description),children:a.jsx(Eo,{className:"h-3 w-3"})})]})]})}function bI({projectId:e}){const{data:t,loading:n,error:o,refetch:i}=dI(e),[l,c]=g.useState(""),[d,p]=g.useState(""),[m,h]=g.useState(""),[x,v]=g.useState(""),[b,N]=g.useState(null),k=g.useRef(null);Qo("list:todos");const j=!!(l.trim()||d||m),S=r0(fc($c,{activationConstraint:{distance:8}}),fc(Mc));function T(I,A){I.stopPropagation(),navigator.clipboard.writeText(A),N(A),setTimeout(()=>N(F=>F===A?null:F),1500)}const R=g.useMemo(()=>{if(!(t!=null&&t.items))return[];const I=new Set;for(const A of t.items)for(const F of A.tags)I.add(F);return Array.from(I).sort()},[t]),D=g.useMemo(()=>{if(!(t!=null&&t.items))return[];let I=t.items;if(l.trim()){const A=l.toLowerCase();I=I.filter(F=>F.description.toLowerCase().includes(A)||F.tags.some(K=>K.toLowerCase().includes(A))||F.id.includes(A))}return d&&(I=I.filter(A=>A.status===d)),m&&(I=I.filter(A=>A.tags.includes(m))),I},[t,l,d,m]);async function M(){x.trim()&&(await fI(e,x.trim()),v(""),i())}const P={open:"in_progress",in_progress:"completed",completed:"open",blocked:"open"};function L(I,A){J(I,P[A]||"open")}async function _(I,A,F){I.stopPropagation(),window.confirm(`Delete "${F}"? This can't be undone.`)&&(await yI(e,A),i())}async function J(I,A){switch(A){case"open":await gI(e,I);break;case"in_progress":await mI(e,I);break;case"completed":await pI(e,I);break;case"blocked":await hI(e,I);break}i()}const{hotkeyRowProps:ne}=ha(D,{scope:"list:todos",bindO:!1,onOpen:I=>L(I.id,I.status)});ft({keys:"/",scope:"list:todos",description:"Focus filter",handler:()=>{var I;return(I=k.current)==null?void 0:I.focus()}}),ft({keys:"r",scope:"list:todos",description:"Refresh",handler:()=>i()});const[U,G]=No(),q=U.get("focus");g.useEffect(()=>{if(!q)return;const I=document.querySelector(`[data-todo-id="${window.CSS.escape(q)}"]`);if(!I)return;I.scrollIntoView({block:"nearest"}),I.classList.add("ring-2","ring-primary/60");const A=window.setTimeout(()=>{I.classList.remove("ring-2","ring-primary/60"),G(F=>{const K=new URLSearchParams(F);return K.delete("focus"),K},{replace:!0})},1500);return()=>window.clearTimeout(A)},[q,D.length,G]);async function ee(I){const{active:A,over:F}=I;if(!F||A.id===F.id||!(t!=null&&t.items))return;const K=t.items.findIndex(X=>X.id===A.id),E=t.items.findIndex(X=>X.id===F.id);if(K===-1||E===-1)return;const B=Bc(t.items,K,E);await xI(e,B.map(X=>X.id)),i()}if(n)return a.jsx(wt,{label:"Loading todos..."});if(o)return a.jsx(ht,{error:o});const $=(t==null?void 0:t.counts)||{open:0,in_progress:0,blocked:0,total:0};return a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{className:"grid gap-3 grid-cols-[repeat(auto-fill,minmax(140px,1fr))]",children:[a.jsx(Xe,{label:"Open",value:$.open,icon:Fn}),a.jsx(Xe,{label:"In Progress",value:$.in_progress,icon:Fn,tone:"info"}),a.jsx(Xe,{label:"Blocked",value:$.blocked,icon:Ws,tone:"warn"}),a.jsx(Xe,{label:"Total",value:$.total,icon:Fn})]}),a.jsx("div",{className:"surface-panel p-3",children:a.jsxs("div",{className:"flex gap-2",children:[a.jsx("input",{type:"text",placeholder:"Add a todo...",value:x,onChange:I=>v(I.target.value),onKeyDown:I=>I.key==="Enter"&&M(),className:"h-9 flex-1 rounded-md border border-border/70 bg-background px-3 text-sm text-foreground placeholder:text-muted-foreground/60 focus:border-foreground/30 focus:outline-none"}),a.jsxs("button",{onClick:M,disabled:!x.trim(),className:"inline-flex h-9 items-center gap-1.5 rounded-md bg-foreground px-3 text-sm font-medium text-background transition hover:bg-foreground/90 disabled:opacity-40",children:[a.jsx(Bn,{className:"h-4 w-4"}),"Add"]})]})}),a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsxs("div",{className:"relative flex-1 max-w-sm",children:[a.jsx(Hs,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),a.jsx("input",{ref:k,type:"text",placeholder:"Search...",value:l,onChange:I=>c(I.target.value),className:"h-9 w-full rounded-md border border-border/70 bg-background pl-9 pr-3 text-sm text-foreground placeholder:text-muted-foreground/60 focus:border-foreground/30 focus:outline-none"})]}),a.jsxs("select",{value:d,onChange:I=>p(I.target.value),className:"h-9 rounded-md border border-border/70 bg-background px-2 text-sm text-foreground focus:border-foreground/30 focus:outline-none",children:[a.jsx("option",{value:"",children:"All statuses"}),a.jsx("option",{value:"open",children:"Open"}),a.jsx("option",{value:"in_progress",children:"In Progress"}),a.jsx("option",{value:"completed",children:"Completed"}),a.jsx("option",{value:"blocked",children:"Blocked"})]}),R.length>0&&a.jsxs("select",{value:m,onChange:I=>h(I.target.value),className:"h-9 rounded-md border border-border/70 bg-background px-2 text-sm text-foreground focus:border-foreground/30 focus:outline-none",children:[a.jsx("option",{value:"",children:"All tags"}),R.map(I=>a.jsxs("option",{value:I,children:["#",I]},I))]})]}),D.length===0?a.jsx(Qe,{title:"No todos",description:"Add your first todo above."}):a.jsx(x0,{sensors:S,collisionDetection:o0,onDragEnd:ee,children:a.jsx(k0,{items:D.map(I=>I.id),strategy:v0,children:a.jsx("div",{className:"space-y-1",children:D.map((I,A)=>a.jsx(vI,{item:I,copiedId:b,onCycleStatus:L,onStatusChange:J,onCopyId:T,onDelete:_,disabled:j,hotkeyRowProps:ne(A)},I.id))})})})]})}const wI=new Set(["overview","assignments","todos","dependencies","knowledge"]);function $y(){const{slug:e}=Et(),t=At(),n=qt();Qo("project"),ft({keys:"a",scope:"project",description:"Create assignment",handler:()=>n(`${t}/projects/${e}/create/assignment`)}),ft({keys:"e",scope:"project",description:"Edit project",handler:()=>n(`${t}/projects/${e}/edit`)});const{data:o,loading:i,error:l,refetch:c}=lb(e),d=Ac(),{data:p}=wp(),[m,h]=No(),x=m.get("tab"),v=x&&wI.has(x)?x:"overview";function b(U){h(G=>{const q=new URLSearchParams(G);return U==="overview"?q.delete("tab"):q.set("tab",U),q},{replace:!0})}const[N,k]=g.useState("board"),[j,S]=g.useState("all"),[T,R]=g.useState("all"),[D,M]=g.useState("all"),P=g.useMemo(()=>o?Object.fromEntries(o.assignments.flatMap(U=>{const G=`${t}/projects/${o.slug}/assignments/${U.slug}`;return[[U.slug,G],[U.title,G]]})):{},[o]);async function L(U){await fetch(`/api/projects/${e}/status-override`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({status:U})}),c()}async function _(U){await fetch(`/api/projects/${e}/move-workspace`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({workspace:U})}),c()}if(i)return a.jsx(wt,{label:"Loading project workspace…"});if(l||!o)return a.jsx(ht,{error:l||"Project not found."});const J=Array.from(new Set(o.assignments.map(U=>U.assignee).filter(Boolean))).sort(),ne=o.assignments.filter(U=>!(j!=="all"&&U.status!==j||T!=="all"&&U.assignee!==T||D!=="all"&&U.priority!==D));return a.jsxs("div",{className:"space-y-5",children:[a.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[a.jsx(Vt,{status:o.status}),o.statusOverride&&a.jsx("button",{type:"button",className:"shell-action border-warning-foreground/40 text-warning-foreground",onClick:()=>L(null),title:"Clear manual status override and return to derived status",children:"Clear Override"}),a.jsxs("select",{className:"shell-action appearance-none bg-transparent text-sm",value:"",onChange:U=>{U.target.value&&L(U.target.value)},title:"Override project status",children:[a.jsx("option",{value:"",children:"Set Status…"}),d.statuses.map(U=>a.jsx("option",{value:U.id,children:U.label},U.id)),a.jsx("option",{value:"active",children:"Active"})]}),p&&p.workspaces.length>0&&a.jsxs("select",{className:"shell-action appearance-none bg-transparent text-sm",value:"",onChange:U=>{U.target.value==="_ungrouped"?_(null):U.target.value&&_(U.target.value)},title:"Move project to a different workspace",children:[a.jsx("option",{value:"",children:"Move to Workspace…"}),p.workspaces.filter(U=>U!==o.workspace).map(U=>a.jsx("option",{value:U,children:U},U)),o.workspace&&a.jsx("option",{value:"_ungrouped",children:"Ungrouped"})]}),a.jsxs(Ee,{className:"shell-action",to:`${t}/projects/${o.slug}/edit`,children:[a.jsx(px,{className:"h-4 w-4"}),a.jsx("span",{children:"Edit Project"})]}),a.jsxs(Ee,{className:"shell-action bg-foreground text-background hover:opacity-90",to:`${t}/projects/${o.slug}/create/assignment`,children:[a.jsx(Bn,{className:"h-4 w-4"}),a.jsx("span",{children:"New Assignment"})]}),a.jsxs("span",{className:"text-xs text-muted-foreground",children:["Created ",ko(o.created),". Last source update ",Cr(o.updated),"."]})]}),a.jsxs("div",{className:"grid gap-3 md:grid-cols-2 xl:grid-cols-5",children:[a.jsx(Xe,{label:"Assignments",value:o.progress.total}),a.jsx(Xe,{label:"In Progress",value:o.progress.in_progress??0,tone:"info"}),a.jsx(Xe,{label:"Review",value:o.progress.review??0,tone:"info"}),a.jsx(Xe,{label:"Blocked",value:o.progress.blocked??0,tone:"warn"}),a.jsx(Xe,{label:"Completed",value:o.progress.completed??0,tone:"success"})]}),a.jsxs("div",{className:"grid gap-4 xl:grid-cols-[minmax(0,1fr)_280px]",children:[a.jsx("div",{className:"space-y-4",children:a.jsx($p,{value:v,onValueChange:b,items:[{value:"overview",label:"Overview",content:a.jsx("div",{className:"space-y-5",children:a.jsx(Te,{title:"Project Overview",children:a.jsx(Wt,{content:o.body,emptyState:"This project does not have overview content yet."})})})},{value:"assignments",label:"Assignments",count:o.assignments.length,content:a.jsx("div",{className:"space-y-5",children:a.jsx(Te,{title:"Assignment Queue",description:"Board and table views over the source assignment files.",actions:a.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[a.jsxs("select",{value:j,onChange:U=>S(U.target.value),className:"editor-input max-w-[170px]",children:[a.jsx("option",{value:"all",children:"All statuses"}),d.statuses.map(U=>a.jsx("option",{value:U.id,children:U.label},U.id))]}),a.jsxs("select",{value:T,onChange:U=>R(U.target.value),className:"editor-input max-w-[170px]",children:[a.jsx("option",{value:"all",children:"All assignees"}),J.map(U=>a.jsx("option",{value:U??"",children:U},U))]}),a.jsxs("select",{value:D,onChange:U=>M(U.target.value),className:"editor-input max-w-[170px]",children:[a.jsx("option",{value:"all",children:"All priorities"}),a.jsx("option",{value:"low",children:"Low"}),a.jsx("option",{value:"medium",children:"Medium"}),a.jsx("option",{value:"high",children:"High"}),a.jsx("option",{value:"critical",children:"Critical"})]}),a.jsx(Op,{value:N,onChange:U=>k(U),options:[{value:"board",label:"Board"},{value:"table",label:"Table"}]})]}),children:ne.length===0?a.jsx(Qe,{title:"No assignments match these filters",description:"Clear the current filters or create a new assignment for this project.",actions:a.jsx(Ee,{className:"shell-action bg-foreground text-background hover:opacity-90",to:`${t}/projects/${o.slug}/create/assignment`,children:"Create Assignment"})}):N==="board"?a.jsx("div",{className:"grid gap-3 lg:grid-cols-2",children:ne.map(U=>a.jsx(kI,{projectSlug:o.slug,assignment:U},U.slug))}):a.jsx("div",{className:"overflow-x-auto",children:a.jsxs("table",{className:"w-full min-w-[720px] text-left text-sm",children:[a.jsx("thead",{children:a.jsxs("tr",{className:"border-b border-border/60 text-muted-foreground",children:[a.jsx("th",{className:"pb-3 font-medium",children:"Assignment"}),a.jsx("th",{className:"pb-3 font-medium",children:"Status"}),a.jsx("th",{className:"pb-3 font-medium",children:"Priority"}),a.jsx("th",{className:"pb-3 font-medium",children:"Assignee"}),a.jsx("th",{className:"pb-3 font-medium",children:"Updated"})]})}),a.jsx("tbody",{children:ne.map(U=>a.jsxs("tr",{className:"border-b border-border/50 last:border-0",children:[a.jsx("td",{className:"py-4",children:a.jsx(Ee,{to:`${t}/projects/${o.slug}/assignments/${U.slug}`,className:"font-semibold text-foreground hover:text-primary",children:U.title})}),a.jsx("td",{className:"py-4",children:a.jsx(Vt,{status:U.status})}),a.jsx("td",{className:"py-4 capitalize text-muted-foreground",children:U.priority}),a.jsx("td",{className:"py-4 text-muted-foreground",children:U.assignee??"—"}),a.jsx("td",{className:"py-4 text-muted-foreground",children:ko(U.updated)})]},U.slug))})]})})})})},{value:"todos",label:"Todos",content:a.jsx(bI,{projectId:o.slug})},{value:"dependencies",label:"Dependencies",content:o.dependencyGraph?a.jsx(Te,{title:"Dependency Graph",description:"Rendered from the derived graph when available, with a source-based fallback.",children:a.jsx(cT,{definition:o.dependencyGraph,nodeRoutes:P})}):a.jsx(Qe,{title:"No dependency graph yet",description:"Dependencies appear here once assignments declare dependsOn relationships."})},{value:"knowledge",label:"Knowledge",content:a.jsxs("div",{className:"grid gap-3 lg:grid-cols-2",children:[a.jsx(Te,{title:"Resources",description:"Shared project references.",children:o.resources.length===0?a.jsx(Qe,{title:"No resources yet",description:"Resources live at the project level and stay available to every assignment."}):a.jsx("div",{className:"space-y-3",children:o.resources.map(U=>a.jsxs("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:[a.jsx("h3",{className:"font-semibold text-foreground",children:U.name}),a.jsxs("p",{className:"mt-2 text-sm text-muted-foreground",children:[U.category," · ",U.source]})]},U.slug))})}),a.jsx(Te,{title:"Memories",description:"Learnings and patterns captured during the project.",children:o.memories.length===0?a.jsx(Qe,{title:"No memories yet",description:"Memories capture patterns discovered during execution so later assignments can reuse them."}):a.jsx("div",{className:"space-y-3",children:o.memories.map(U=>a.jsxs("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:[a.jsx("h3",{className:"font-semibold text-foreground",children:U.name}),a.jsxs("p",{className:"mt-2 text-sm text-muted-foreground",children:[U.scope," · ",U.source]})]},U.slug))})})]})}]})}),a.jsxs("div",{className:"space-y-5",children:[a.jsx(Te,{title:"Progress Summary",children:a.jsx(ic,{progress:o.progress,showLegend:!0})}),a.jsx(Te,{title:"Attention",children:a.jsxs("dl",{className:"space-y-3 text-sm",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("dt",{className:"text-muted-foreground",children:"Blocked"}),a.jsx("dd",{className:"font-semibold text-foreground",children:o.needsAttention.blockedCount})]}),a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("dt",{className:"text-muted-foreground",children:"Failed"}),a.jsx("dd",{className:"font-semibold text-foreground",children:o.needsAttention.failedCount})]}),a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("dt",{className:"text-muted-foreground",children:"Unanswered questions"}),a.jsx("dd",{className:"font-semibold text-foreground",children:o.needsAttention.openQuestions})]})]})}),a.jsx(Te,{title:"Quick Links",children:a.jsxs("div",{className:"space-y-2 text-sm",children:[a.jsxs(Ee,{className:"flex items-center gap-2 text-primary hover:underline",to:`${t}/projects/${o.slug}/edit`,children:[a.jsx(px,{className:"h-4 w-4"}),"Edit project source"]}),a.jsxs(Ee,{className:"flex items-center gap-2 text-primary hover:underline",to:`${t}/projects/${o.slug}/create/assignment`,children:[a.jsx(Bn,{className:"h-4 w-4"}),"Create assignment"]}),a.jsxs(Ee,{className:"flex items-center gap-2 text-primary hover:underline",to:"/help",children:[a.jsx(SC,{className:"h-4 w-4"}),"Review project rules"]}),a.jsxs("button",{type:"button",onClick:()=>b("dependencies"),className:"flex items-center gap-2 text-primary hover:underline",children:[a.jsx(Lv,{className:"h-4 w-4"}),"Jump to dependencies"]})]})}),o.archived?a.jsxs(Te,{title:"Archive Metadata",children:[a.jsxs("p",{className:"text-sm leading-6 text-muted-foreground",children:["Archived ",o.archivedAt?Cr(o.archivedAt):"with no timestamp recorded","."]}),o.archivedReason?a.jsx("p",{className:"mt-2 text-sm leading-6 text-muted-foreground",children:o.archivedReason}):null]}):null]})]})]})}function kI({projectSlug:e,assignment:t}){const n=At();return a.jsxs(Ee,{to:`${n}/projects/${e}/assignments/${t.slug}`,className:"block rounded-lg border border-border/60 bg-background/80 p-3 transition hover:border-primary/40",children:[a.jsxs("div",{className:"flex items-start justify-between gap-3",children:[a.jsxs("div",{className:"space-y-1",children:[a.jsx("h3",{className:"font-semibold text-foreground",children:t.title}),a.jsxs("p",{className:"inline-flex items-center gap-1.5 font-mono text-xs text-muted-foreground/70",title:t.id,children:[t.id.slice(0,8),a.jsx("span",{onClick:o=>{o.preventDefault(),o.stopPropagation()},children:a.jsx(Hr,{value:t.id})})]}),a.jsxs("p",{className:"text-sm text-muted-foreground",children:["Updated ",ko(t.updated)]})]}),a.jsx(Vt,{status:t.status})]}),a.jsxs("div",{className:"mt-4 flex flex-wrap gap-2",children:[a.jsx("span",{className:"rounded-full border border-border/60 px-2.5 py-1 text-xs capitalize text-muted-foreground",children:t.priority}),a.jsx("span",{className:"rounded-full border border-border/60 px-2.5 py-1 text-xs text-muted-foreground",children:t.assignee??"Unassigned"}),a.jsxs("span",{className:"rounded-full border border-border/60 px-2.5 py-1 text-xs text-muted-foreground",children:[t.dependsOn.length," dependencies"]})]})]})}function C0({open:e,action:t,assignmentTitle:n,loading:o=!1,onConfirm:i,onOpenChange:l}){const[c,d]=g.useState("");g.useEffect(()=>{e||d("")},[e,t==null?void 0:t.command]);const p=g.useMemo(()=>t&&t.command==="block"?"Blocked Reason":"Reason",[t]);if(!t)return null;const m=`${t.label} "${n}"`,h=o?"Applying...":t.label,x=c.trim()||void 0;return a.jsx(Tc,{open:e,onOpenChange:v=>o?void 0:l(v),children:a.jsx(fa,{className:"max-w-xl",children:a.jsxs("form",{className:"space-y-5",onSubmit:v=>{v.preventDefault(),i(x)},children:[a.jsxs(qE,{children:[a.jsx(pa,{children:m}),a.jsx(Ip,{children:t.description})]}),t.warning?a.jsx("div",{className:"rounded-lg border border-warning-foreground/30 bg-warning px-4 py-3 text-sm text-warning-foreground",children:t.warning}):null,a.jsxs("div",{className:"space-y-2",children:[a.jsx("label",{className:"block text-xs font-medium uppercase tracking-[0.08em] text-muted-foreground",children:p}),a.jsx("textarea",{value:c,onChange:v=>d(v.target.value),autoFocus:!0,rows:4,disabled:o,placeholder:"Optional context for why this assignment is blocked.",className:"editor-textarea min-h-[120px] bg-background/95 font-sans"}),a.jsx("p",{className:"text-xs text-muted-foreground",children:"Leave this blank to continue without a written reason."})]}),a.jsxs(KE,{children:[a.jsx("button",{type:"button",onClick:()=>l(!1),disabled:o,className:"shell-action disabled:cursor-not-allowed disabled:opacity-50",children:"Cancel"}),a.jsx("button",{type:"submit",disabled:o,className:"shell-action bg-foreground text-background hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-50",children:h})]})]})})})}var jI=Symbol("radix.slottable");function SI(e){const t=({children:n})=>a.jsx(a.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=jI,t}var N0="AlertDialog",[CI]=Go(N0,[Ab]),Kr=Ab(),E0=e=>{const{__scopeAlertDialog:t,...n}=e,o=Kr(t);return a.jsx(Kb,{...o,...n,modal:!0})};E0.displayName=N0;var NI="AlertDialogTrigger",EI=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,i=Kr(n);return a.jsx(WE,{...i,...o,ref:t})});EI.displayName=NI;var PI="AlertDialogPortal",P0=e=>{const{__scopeAlertDialog:t,...n}=e,o=Kr(t);return a.jsx(Gb,{...o,...n})};P0.displayName=PI;var TI="AlertDialogOverlay",T0=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,i=Kr(n);return a.jsx(Tp,{...i,...o,ref:t})});T0.displayName=TI;var _s="AlertDialogContent",[RI,AI]=CI(_s),DI=SI("AlertDialogContent"),R0=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:o,...i}=e,l=Kr(n),c=g.useRef(null),d=cn(t,c),p=g.useRef(null);return a.jsx(zE,{contentName:_s,titleName:A0,docsSlug:"alert-dialog",children:a.jsx(RI,{scope:n,cancelRef:p,children:a.jsxs(Rp,{role:"alertdialog",...l,...i,ref:d,onOpenAutoFocus:pt(i.onOpenAutoFocus,m=>{var h;m.preventDefault(),(h=p.current)==null||h.focus({preventScroll:!0})}),onPointerDownOutside:m=>m.preventDefault(),onInteractOutside:m=>m.preventDefault(),children:[a.jsx(DI,{children:o}),a.jsx(LI,{contentRef:c})]})})})});R0.displayName=_s;var A0="AlertDialogTitle",D0=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,i=Kr(n);return a.jsx(Ap,{...i,...o,ref:t})});D0.displayName=A0;var I0="AlertDialogDescription",L0=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,i=Kr(n);return a.jsx(Dp,{...i,...o,ref:t})});L0.displayName=I0;var II="AlertDialogAction",O0=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,i=Kr(n);return a.jsx(Yb,{...i,...o,ref:t})});O0.displayName=II;var _0="AlertDialogCancel",M0=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,{cancelRef:i}=AI(_0,n),l=Kr(n),c=cn(t,i);return a.jsx(Yb,{...l,...o,ref:c})});M0.displayName=_0;var LI=({contentRef:e})=>{const t=`\`${_s}\` requires a description for the component to be accessible for screen reader users.
|
|
458
|
+
|
|
459
|
+
You can add a description to the \`${_s}\` by passing a \`${I0}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
460
|
+
|
|
461
|
+
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${_s}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
|
462
|
+
|
|
463
|
+
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return g.useEffect(()=>{var o;document.getElementById((o=e.current)==null?void 0:o.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},OI=E0,_I=P0,$0=T0,F0=R0,z0=O0,B0=M0,U0=D0,H0=L0;const MI=OI,$I=_I,W0=g.forwardRef(({className:e,...t},n)=>a.jsx($0,{ref:n,className:ze("fixed inset-0 z-50 bg-background/80 backdrop-blur-sm",e),...t}));W0.displayName=$0.displayName;const V0=g.forwardRef(({className:e,...t},n)=>a.jsxs($I,{children:[a.jsx(W0,{}),a.jsx(F0,{ref:n,className:ze("fixed left-1/2 top-1/2 z-50 grid w-[calc(100%-2rem)] max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl border border-border/70 bg-card p-6 shadow-2xl outline-none",e),...t})]}));V0.displayName=F0.displayName;function FI({className:e,...t}){return a.jsx("div",{className:ze("flex flex-col space-y-2 text-left",e),...t})}function zI({className:e,...t}){return a.jsx("div",{className:ze("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}const q0=g.forwardRef(({className:e,...t},n)=>a.jsx(U0,{ref:n,className:ze("text-lg font-semibold tracking-tight text-foreground",e),...t}));q0.displayName=U0.displayName;const K0=g.forwardRef(({className:e,...t},n)=>a.jsx(H0,{ref:n,className:ze("text-sm leading-6 text-muted-foreground",e),...t}));K0.displayName=H0.displayName;const G0=g.forwardRef(({className:e,...t},n)=>a.jsx(z0,{ref:n,className:ze(e),...t}));G0.displayName=z0.displayName;const Y0=g.forwardRef(({className:e,...t},n)=>a.jsx(B0,{ref:n,className:ze(e),...t}));Y0.displayName=B0.displayName;function X0({open:e,title:t,description:n,confirmLabel:o,cancelLabel:i="Cancel",loading:l=!1,destructive:c=!1,onConfirm:d,onOpenChange:p}){return a.jsx(MI,{open:e,onOpenChange:m=>l?void 0:p(m),children:a.jsxs(V0,{children:[a.jsxs(FI,{children:[a.jsx(q0,{children:t}),a.jsx(K0,{children:n})]}),a.jsxs(zI,{children:[a.jsx(Y0,{disabled:l,className:"shell-action mt-0 disabled:cursor-not-allowed disabled:opacity-50",children:i}),a.jsx(G0,{disabled:l,className:`shell-action mt-0 disabled:cursor-not-allowed disabled:opacity-50 ${c?"border-destructive/80 bg-destructive text-destructive-foreground hover:bg-destructive/90":"bg-foreground text-background hover:opacity-90"}`,onClick:m=>{m.preventDefault(),d()},children:l?"Working...":o})]})]})})}const BI=["top","right","bottom","left"],So=Math.min,Mn=Math.max,hc=Math.round,Ul=Math.floor,Nr=e=>({x:e,y:e}),UI={left:"right",right:"left",bottom:"top",top:"bottom"};function tp(e,t,n){return Mn(e,So(t,n))}function Vr(e,t){return typeof e=="function"?e(t):e}function qr(e){return e.split("-")[0]}function Qs(e){return e.split("-")[1]}function ah(e){return e==="x"?"y":"x"}function lh(e){return e==="y"?"height":"width"}function jr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function ch(e){return ah(jr(e))}function HI(e,t,n){n===void 0&&(n=!1);const o=Qs(e),i=ch(e),l=lh(i);let c=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[l]>t.floating[l]&&(c=mc(c)),[c,mc(c)]}function WI(e){const t=mc(e);return[np(e),t,np(t)]}function np(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Fy=["left","right"],zy=["right","left"],VI=["top","bottom"],qI=["bottom","top"];function KI(e,t,n){switch(e){case"top":case"bottom":return n?t?zy:Fy:t?Fy:zy;case"left":case"right":return t?VI:qI;default:return[]}}function GI(e,t,n,o){const i=Qs(e);let l=KI(qr(e),n==="start",o);return i&&(l=l.map(c=>c+"-"+i),t&&(l=l.concat(l.map(np)))),l}function mc(e){const t=qr(e);return UI[t]+e.slice(t.length)}function YI(e){return{top:0,right:0,bottom:0,left:0,...e}}function Q0(e){return typeof e!="number"?YI(e):{top:e,right:e,bottom:e,left:e}}function gc(e){const{x:t,y:n,width:o,height:i}=e;return{width:o,height:i,top:n,left:t,right:t+o,bottom:n+i,x:t,y:n}}function By(e,t,n){let{reference:o,floating:i}=e;const l=jr(t),c=ch(t),d=lh(c),p=qr(t),m=l==="y",h=o.x+o.width/2-i.width/2,x=o.y+o.height/2-i.height/2,v=o[d]/2-i[d]/2;let b;switch(p){case"top":b={x:h,y:o.y-i.height};break;case"bottom":b={x:h,y:o.y+o.height};break;case"right":b={x:o.x+o.width,y:x};break;case"left":b={x:o.x-i.width,y:x};break;default:b={x:o.x,y:o.y}}switch(Qs(t)){case"start":b[c]-=v*(n&&m?-1:1);break;case"end":b[c]+=v*(n&&m?-1:1);break}return b}async function XI(e,t){var n;t===void 0&&(t={});const{x:o,y:i,platform:l,rects:c,elements:d,strategy:p}=e,{boundary:m="clippingAncestors",rootBoundary:h="viewport",elementContext:x="floating",altBoundary:v=!1,padding:b=0}=Vr(t,e),N=Q0(b),j=d[v?x==="floating"?"reference":"floating":x],S=gc(await l.getClippingRect({element:(n=await(l.isElement==null?void 0:l.isElement(j)))==null||n?j:j.contextElement||await(l.getDocumentElement==null?void 0:l.getDocumentElement(d.floating)),boundary:m,rootBoundary:h,strategy:p})),T=x==="floating"?{x:o,y:i,width:c.floating.width,height:c.floating.height}:c.reference,R=await(l.getOffsetParent==null?void 0:l.getOffsetParent(d.floating)),D=await(l.isElement==null?void 0:l.isElement(R))?await(l.getScale==null?void 0:l.getScale(R))||{x:1,y:1}:{x:1,y:1},M=gc(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:T,offsetParent:R,strategy:p}):T);return{top:(S.top-M.top+N.top)/D.y,bottom:(M.bottom-S.bottom+N.bottom)/D.y,left:(S.left-M.left+N.left)/D.x,right:(M.right-S.right+N.right)/D.x}}const QI=50,JI=async(e,t,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:l=[],platform:c}=n,d=c.detectOverflow?c:{...c,detectOverflow:XI},p=await(c.isRTL==null?void 0:c.isRTL(t));let m=await c.getElementRects({reference:e,floating:t,strategy:i}),{x:h,y:x}=By(m,o,p),v=o,b=0;const N={};for(let k=0;k<l.length;k++){const j=l[k];if(!j)continue;const{name:S,fn:T}=j,{x:R,y:D,data:M,reset:P}=await T({x:h,y:x,initialPlacement:o,placement:v,strategy:i,middlewareData:N,rects:m,platform:d,elements:{reference:e,floating:t}});h=R??h,x=D??x,N[S]={...N[S],...M},P&&b<QI&&(b++,typeof P=="object"&&(P.placement&&(v=P.placement),P.rects&&(m=P.rects===!0?await c.getElementRects({reference:e,floating:t,strategy:i}):P.rects),{x:h,y:x}=By(m,v,p)),k=-1)}return{x:h,y:x,placement:v,strategy:i,middlewareData:N}},ZI=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:i,rects:l,platform:c,elements:d,middlewareData:p}=t,{element:m,padding:h=0}=Vr(e,t)||{};if(m==null)return{};const x=Q0(h),v={x:n,y:o},b=ch(i),N=lh(b),k=await c.getDimensions(m),j=b==="y",S=j?"top":"left",T=j?"bottom":"right",R=j?"clientHeight":"clientWidth",D=l.reference[N]+l.reference[b]-v[b]-l.floating[N],M=v[b]-l.reference[b],P=await(c.getOffsetParent==null?void 0:c.getOffsetParent(m));let L=P?P[R]:0;(!L||!await(c.isElement==null?void 0:c.isElement(P)))&&(L=d.floating[R]||l.floating[N]);const _=D/2-M/2,J=L/2-k[N]/2-1,ne=So(x[S],J),U=So(x[T],J),G=ne,q=L-k[N]-U,ee=L/2-k[N]/2+_,$=tp(G,ee,q),I=!p.arrow&&Qs(i)!=null&&ee!==$&&l.reference[N]/2-(ee<G?ne:U)-k[N]/2<0,A=I?ee<G?ee-G:ee-q:0;return{[b]:v[b]+A,data:{[b]:$,centerOffset:ee-$-A,...I&&{alignmentOffset:A}},reset:I}}}),eL=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:i,middlewareData:l,rects:c,initialPlacement:d,platform:p,elements:m}=t,{mainAxis:h=!0,crossAxis:x=!0,fallbackPlacements:v,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:N="none",flipAlignment:k=!0,...j}=Vr(e,t);if((n=l.arrow)!=null&&n.alignmentOffset)return{};const S=qr(i),T=jr(d),R=qr(d)===d,D=await(p.isRTL==null?void 0:p.isRTL(m.floating)),M=v||(R||!k?[mc(d)]:WI(d)),P=N!=="none";!v&&P&&M.push(...GI(d,k,N,D));const L=[d,...M],_=await p.detectOverflow(t,j),J=[];let ne=((o=l.flip)==null?void 0:o.overflows)||[];if(h&&J.push(_[S]),x){const ee=HI(i,c,D);J.push(_[ee[0]],_[ee[1]])}if(ne=[...ne,{placement:i,overflows:J}],!J.every(ee=>ee<=0)){var U,G;const ee=(((U=l.flip)==null?void 0:U.index)||0)+1,$=L[ee];if($&&(!(x==="alignment"?T!==jr($):!1)||ne.every(F=>jr(F.placement)===T?F.overflows[0]>0:!0)))return{data:{index:ee,overflows:ne},reset:{placement:$}};let I=(G=ne.filter(A=>A.overflows[0]<=0).sort((A,F)=>A.overflows[1]-F.overflows[1])[0])==null?void 0:G.placement;if(!I)switch(b){case"bestFit":{var q;const A=(q=ne.filter(F=>{if(P){const K=jr(F.placement);return K===T||K==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(K=>K>0).reduce((K,E)=>K+E,0)]).sort((F,K)=>F[1]-K[1])[0])==null?void 0:q[0];A&&(I=A);break}case"initialPlacement":I=d;break}if(i!==I)return{reset:{placement:I}}}return{}}}};function Uy(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Hy(e){return BI.some(t=>e[t]>=0)}const tL=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:o}=t,{strategy:i="referenceHidden",...l}=Vr(e,t);switch(i){case"referenceHidden":{const c=await o.detectOverflow(t,{...l,elementContext:"reference"}),d=Uy(c,n.reference);return{data:{referenceHiddenOffsets:d,referenceHidden:Hy(d)}}}case"escaped":{const c=await o.detectOverflow(t,{...l,altBoundary:!0}),d=Uy(c,n.floating);return{data:{escapedOffsets:d,escaped:Hy(d)}}}default:return{}}}}},J0=new Set(["left","top"]);async function nL(e,t){const{placement:n,platform:o,elements:i}=e,l=await(o.isRTL==null?void 0:o.isRTL(i.floating)),c=qr(n),d=Qs(n),p=jr(n)==="y",m=J0.has(c)?-1:1,h=l&&p?-1:1,x=Vr(t,e);let{mainAxis:v,crossAxis:b,alignmentAxis:N}=typeof x=="number"?{mainAxis:x,crossAxis:0,alignmentAxis:null}:{mainAxis:x.mainAxis||0,crossAxis:x.crossAxis||0,alignmentAxis:x.alignmentAxis};return d&&typeof N=="number"&&(b=d==="end"?N*-1:N),p?{x:b*h,y:v*m}:{x:v*m,y:b*h}}const rL=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:i,y:l,placement:c,middlewareData:d}=t,p=await nL(t,e);return c===((n=d.offset)==null?void 0:n.placement)&&(o=d.arrow)!=null&&o.alignmentOffset?{}:{x:i+p.x,y:l+p.y,data:{...p,placement:c}}}}},oL=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:i,platform:l}=t,{mainAxis:c=!0,crossAxis:d=!1,limiter:p={fn:S=>{let{x:T,y:R}=S;return{x:T,y:R}}},...m}=Vr(e,t),h={x:n,y:o},x=await l.detectOverflow(t,m),v=jr(qr(i)),b=ah(v);let N=h[b],k=h[v];if(c){const S=b==="y"?"top":"left",T=b==="y"?"bottom":"right",R=N+x[S],D=N-x[T];N=tp(R,N,D)}if(d){const S=v==="y"?"top":"left",T=v==="y"?"bottom":"right",R=k+x[S],D=k-x[T];k=tp(R,k,D)}const j=p.fn({...t,[b]:N,[v]:k});return{...j,data:{x:j.x-n,y:j.y-o,enabled:{[b]:c,[v]:d}}}}}},sL=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:i,rects:l,middlewareData:c}=t,{offset:d=0,mainAxis:p=!0,crossAxis:m=!0}=Vr(e,t),h={x:n,y:o},x=jr(i),v=ah(x);let b=h[v],N=h[x];const k=Vr(d,t),j=typeof k=="number"?{mainAxis:k,crossAxis:0}:{mainAxis:0,crossAxis:0,...k};if(p){const R=v==="y"?"height":"width",D=l.reference[v]-l.floating[R]+j.mainAxis,M=l.reference[v]+l.reference[R]-j.mainAxis;b<D?b=D:b>M&&(b=M)}if(m){var S,T;const R=v==="y"?"width":"height",D=J0.has(qr(i)),M=l.reference[x]-l.floating[R]+(D&&((S=c.offset)==null?void 0:S[x])||0)+(D?0:j.crossAxis),P=l.reference[x]+l.reference[R]+(D?0:((T=c.offset)==null?void 0:T[x])||0)-(D?j.crossAxis:0);N<M?N=M:N>P&&(N=P)}return{[v]:b,[x]:N}}}},iL=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:i,rects:l,platform:c,elements:d}=t,{apply:p=()=>{},...m}=Vr(e,t),h=await c.detectOverflow(t,m),x=qr(i),v=Qs(i),b=jr(i)==="y",{width:N,height:k}=l.floating;let j,S;x==="top"||x==="bottom"?(j=x,S=v===(await(c.isRTL==null?void 0:c.isRTL(d.floating))?"start":"end")?"left":"right"):(S=x,j=v==="end"?"top":"bottom");const T=k-h.top-h.bottom,R=N-h.left-h.right,D=So(k-h[j],T),M=So(N-h[S],R),P=!t.middlewareData.shift;let L=D,_=M;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(_=R),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(L=T),P&&!v){const ne=Mn(h.left,0),U=Mn(h.right,0),G=Mn(h.top,0),q=Mn(h.bottom,0);b?_=N-2*(ne!==0||U!==0?ne+U:Mn(h.left,h.right)):L=k-2*(G!==0||q!==0?G+q:Mn(h.top,h.bottom))}await p({...t,availableWidth:_,availableHeight:L});const J=await c.getDimensions(d.floating);return N!==J.width||k!==J.height?{reset:{rects:!0}}:{}}}};function Uc(){return typeof window<"u"}function Js(e){return Z0(e)?(e.nodeName||"").toLowerCase():"#document"}function zn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Tr(e){var t;return(t=(Z0(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Z0(e){return Uc()?e instanceof Node||e instanceof zn(e).Node:!1}function ur(e){return Uc()?e instanceof Element||e instanceof zn(e).Element:!1}function Gr(e){return Uc()?e instanceof HTMLElement||e instanceof zn(e).HTMLElement:!1}function Wy(e){return!Uc()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof zn(e).ShadowRoot}function wa(e){const{overflow:t,overflowX:n,overflowY:o,display:i}=dr(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&i!=="inline"&&i!=="contents"}function aL(e){return/^(table|td|th)$/.test(Js(e))}function Hc(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const lL=/transform|translate|scale|rotate|perspective|filter/,cL=/paint|layout|strict|content/,Ho=e=>!!e&&e!=="none";let yf;function uh(e){const t=ur(e)?dr(e):e;return Ho(t.transform)||Ho(t.translate)||Ho(t.scale)||Ho(t.rotate)||Ho(t.perspective)||!dh()&&(Ho(t.backdropFilter)||Ho(t.filter))||lL.test(t.willChange||"")||cL.test(t.contain||"")}function uL(e){let t=Co(e);for(;Gr(t)&&!Fs(t);){if(uh(t))return t;if(Hc(t))return null;t=Co(t)}return null}function dh(){return yf==null&&(yf=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),yf}function Fs(e){return/^(html|body|#document)$/.test(Js(e))}function dr(e){return zn(e).getComputedStyle(e)}function Wc(e){return ur(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Co(e){if(Js(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Wy(e)&&e.host||Tr(e);return Wy(t)?t.host:t}function e1(e){const t=Co(e);return Fs(t)?e.ownerDocument?e.ownerDocument.body:e.body:Gr(t)&&wa(t)?t:e1(t)}function ia(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=e1(e),l=i===((o=e.ownerDocument)==null?void 0:o.body),c=zn(i);if(l){const d=rp(c);return t.concat(c,c.visualViewport||[],wa(i)?i:[],d&&n?ia(d):[])}else return t.concat(i,ia(i,[],n))}function rp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function t1(e){const t=dr(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const i=Gr(e),l=i?e.offsetWidth:n,c=i?e.offsetHeight:o,d=hc(n)!==l||hc(o)!==c;return d&&(n=l,o=c),{width:n,height:o,$:d}}function fh(e){return ur(e)?e:e.contextElement}function Ms(e){const t=fh(e);if(!Gr(t))return Nr(1);const n=t.getBoundingClientRect(),{width:o,height:i,$:l}=t1(t);let c=(l?hc(n.width):n.width)/o,d=(l?hc(n.height):n.height)/i;return(!c||!Number.isFinite(c))&&(c=1),(!d||!Number.isFinite(d))&&(d=1),{x:c,y:d}}const dL=Nr(0);function n1(e){const t=zn(e);return!dh()||!t.visualViewport?dL:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function fL(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==zn(e)?!1:t}function Ko(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),l=fh(e);let c=Nr(1);t&&(o?ur(o)&&(c=Ms(o)):c=Ms(e));const d=fL(l,n,o)?n1(l):Nr(0);let p=(i.left+d.x)/c.x,m=(i.top+d.y)/c.y,h=i.width/c.x,x=i.height/c.y;if(l){const v=zn(l),b=o&&ur(o)?zn(o):o;let N=v,k=rp(N);for(;k&&o&&b!==N;){const j=Ms(k),S=k.getBoundingClientRect(),T=dr(k),R=S.left+(k.clientLeft+parseFloat(T.paddingLeft))*j.x,D=S.top+(k.clientTop+parseFloat(T.paddingTop))*j.y;p*=j.x,m*=j.y,h*=j.x,x*=j.y,p+=R,m+=D,N=zn(k),k=rp(N)}}return gc({width:h,height:x,x:p,y:m})}function Vc(e,t){const n=Wc(e).scrollLeft;return t?t.left+n:Ko(Tr(e)).left+n}function r1(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-Vc(e,n),i=n.top+t.scrollTop;return{x:o,y:i}}function pL(e){let{elements:t,rect:n,offsetParent:o,strategy:i}=e;const l=i==="fixed",c=Tr(o),d=t?Hc(t.floating):!1;if(o===c||d&&l)return n;let p={scrollLeft:0,scrollTop:0},m=Nr(1);const h=Nr(0),x=Gr(o);if((x||!x&&!l)&&((Js(o)!=="body"||wa(c))&&(p=Wc(o)),x)){const b=Ko(o);m=Ms(o),h.x=b.x+o.clientLeft,h.y=b.y+o.clientTop}const v=c&&!x&&!l?r1(c,p):Nr(0);return{width:n.width*m.x,height:n.height*m.y,x:n.x*m.x-p.scrollLeft*m.x+h.x+v.x,y:n.y*m.y-p.scrollTop*m.y+h.y+v.y}}function hL(e){return Array.from(e.getClientRects())}function mL(e){const t=Tr(e),n=Wc(e),o=e.ownerDocument.body,i=Mn(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),l=Mn(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let c=-n.scrollLeft+Vc(e);const d=-n.scrollTop;return dr(o).direction==="rtl"&&(c+=Mn(t.clientWidth,o.clientWidth)-i),{width:i,height:l,x:c,y:d}}const Vy=25;function gL(e,t){const n=zn(e),o=Tr(e),i=n.visualViewport;let l=o.clientWidth,c=o.clientHeight,d=0,p=0;if(i){l=i.width,c=i.height;const h=dh();(!h||h&&t==="fixed")&&(d=i.offsetLeft,p=i.offsetTop)}const m=Vc(o);if(m<=0){const h=o.ownerDocument,x=h.body,v=getComputedStyle(x),b=h.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,N=Math.abs(o.clientWidth-x.clientWidth-b);N<=Vy&&(l-=N)}else m<=Vy&&(l+=m);return{width:l,height:c,x:d,y:p}}function xL(e,t){const n=Ko(e,!0,t==="fixed"),o=n.top+e.clientTop,i=n.left+e.clientLeft,l=Gr(e)?Ms(e):Nr(1),c=e.clientWidth*l.x,d=e.clientHeight*l.y,p=i*l.x,m=o*l.y;return{width:c,height:d,x:p,y:m}}function qy(e,t,n){let o;if(t==="viewport")o=gL(e,n);else if(t==="document")o=mL(Tr(e));else if(ur(t))o=xL(t,n);else{const i=n1(e);o={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return gc(o)}function o1(e,t){const n=Co(e);return n===t||!ur(n)||Fs(n)?!1:dr(n).position==="fixed"||o1(n,t)}function yL(e,t){const n=t.get(e);if(n)return n;let o=ia(e,[],!1).filter(d=>ur(d)&&Js(d)!=="body"),i=null;const l=dr(e).position==="fixed";let c=l?Co(e):e;for(;ur(c)&&!Fs(c);){const d=dr(c),p=uh(c);!p&&d.position==="fixed"&&(i=null),(l?!p&&!i:!p&&d.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||wa(c)&&!p&&o1(e,c))?o=o.filter(h=>h!==c):i=d,c=Co(c)}return t.set(e,o),o}function vL(e){let{element:t,boundary:n,rootBoundary:o,strategy:i}=e;const c=[...n==="clippingAncestors"?Hc(t)?[]:yL(t,this._c):[].concat(n),o],d=qy(t,c[0],i);let p=d.top,m=d.right,h=d.bottom,x=d.left;for(let v=1;v<c.length;v++){const b=qy(t,c[v],i);p=Mn(b.top,p),m=So(b.right,m),h=So(b.bottom,h),x=Mn(b.left,x)}return{width:m-x,height:h-p,x,y:p}}function bL(e){const{width:t,height:n}=t1(e);return{width:t,height:n}}function wL(e,t,n){const o=Gr(t),i=Tr(t),l=n==="fixed",c=Ko(e,!0,l,t);let d={scrollLeft:0,scrollTop:0};const p=Nr(0);function m(){p.x=Vc(i)}if(o||!o&&!l)if((Js(t)!=="body"||wa(i))&&(d=Wc(t)),o){const b=Ko(t,!0,l,t);p.x=b.x+t.clientLeft,p.y=b.y+t.clientTop}else i&&m();l&&!o&&i&&m();const h=i&&!o&&!l?r1(i,d):Nr(0),x=c.left+d.scrollLeft-p.x-h.x,v=c.top+d.scrollTop-p.y-h.y;return{x,y:v,width:c.width,height:c.height}}function vf(e){return dr(e).position==="static"}function Ky(e,t){if(!Gr(e)||dr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Tr(e)===n&&(n=n.ownerDocument.body),n}function s1(e,t){const n=zn(e);if(Hc(e))return n;if(!Gr(e)){let i=Co(e);for(;i&&!Fs(i);){if(ur(i)&&!vf(i))return i;i=Co(i)}return n}let o=Ky(e,t);for(;o&&aL(o)&&vf(o);)o=Ky(o,t);return o&&Fs(o)&&vf(o)&&!uh(o)?n:o||uL(e)||n}const kL=async function(e){const t=this.getOffsetParent||s1,n=this.getDimensions,o=await n(e.floating);return{reference:wL(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function jL(e){return dr(e).direction==="rtl"}const SL={convertOffsetParentRelativeRectToViewportRelativeRect:pL,getDocumentElement:Tr,getClippingRect:vL,getOffsetParent:s1,getElementRects:kL,getClientRects:hL,getDimensions:bL,getScale:Ms,isElement:ur,isRTL:jL};function i1(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function CL(e,t){let n=null,o;const i=Tr(e);function l(){var d;clearTimeout(o),(d=n)==null||d.disconnect(),n=null}function c(d,p){d===void 0&&(d=!1),p===void 0&&(p=1),l();const m=e.getBoundingClientRect(),{left:h,top:x,width:v,height:b}=m;if(d||t(),!v||!b)return;const N=Ul(x),k=Ul(i.clientWidth-(h+v)),j=Ul(i.clientHeight-(x+b)),S=Ul(h),R={rootMargin:-N+"px "+-k+"px "+-j+"px "+-S+"px",threshold:Mn(0,So(1,p))||1};let D=!0;function M(P){const L=P[0].intersectionRatio;if(L!==p){if(!D)return c();L?c(!1,L):o=setTimeout(()=>{c(!1,1e-7)},1e3)}L===1&&!i1(m,e.getBoundingClientRect())&&c(),D=!1}try{n=new IntersectionObserver(M,{...R,root:i.ownerDocument})}catch{n=new IntersectionObserver(M,R)}n.observe(e)}return c(!0),l}function NL(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:l=!0,elementResize:c=typeof ResizeObserver=="function",layoutShift:d=typeof IntersectionObserver=="function",animationFrame:p=!1}=o,m=fh(e),h=i||l?[...m?ia(m):[],...t?ia(t):[]]:[];h.forEach(S=>{i&&S.addEventListener("scroll",n,{passive:!0}),l&&S.addEventListener("resize",n)});const x=m&&d?CL(m,n):null;let v=-1,b=null;c&&(b=new ResizeObserver(S=>{let[T]=S;T&&T.target===m&&b&&t&&(b.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var R;(R=b)==null||R.observe(t)})),n()}),m&&!p&&b.observe(m),t&&b.observe(t));let N,k=p?Ko(e):null;p&&j();function j(){const S=Ko(e);k&&!i1(k,S)&&n(),k=S,N=requestAnimationFrame(j)}return n(),()=>{var S;h.forEach(T=>{i&&T.removeEventListener("scroll",n),l&&T.removeEventListener("resize",n)}),x==null||x(),(S=b)==null||S.disconnect(),b=null,p&&cancelAnimationFrame(N)}}const EL=rL,PL=oL,TL=eL,RL=iL,AL=tL,Gy=ZI,DL=sL,IL=(e,t,n)=>{const o=new Map,i={platform:SL,...n},l={...i.platform,_c:o};return JI(e,t,{...i,platform:l})};var LL=typeof document<"u",OL=function(){},ec=LL?g.useLayoutEffect:OL;function xc(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,o,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!xc(e[o],t[o]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,i[o]))return!1;for(o=n;o--!==0;){const l=i[o];if(!(l==="_owner"&&e.$$typeof)&&!xc(e[l],t[l]))return!1}return!0}return e!==e&&t!==t}function a1(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Yy(e,t){const n=a1(e);return Math.round(t*n)/n}function bf(e){const t=g.useRef(e);return ec(()=>{t.current=e}),t}function _L(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:i,elements:{reference:l,floating:c}={},transform:d=!0,whileElementsMounted:p,open:m}=e,[h,x]=g.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[v,b]=g.useState(o);xc(v,o)||b(o);const[N,k]=g.useState(null),[j,S]=g.useState(null),T=g.useCallback(F=>{F!==P.current&&(P.current=F,k(F))},[]),R=g.useCallback(F=>{F!==L.current&&(L.current=F,S(F))},[]),D=l||N,M=c||j,P=g.useRef(null),L=g.useRef(null),_=g.useRef(h),J=p!=null,ne=bf(p),U=bf(i),G=bf(m),q=g.useCallback(()=>{if(!P.current||!L.current)return;const F={placement:t,strategy:n,middleware:v};U.current&&(F.platform=U.current),IL(P.current,L.current,F).then(K=>{const E={...K,isPositioned:G.current!==!1};ee.current&&!xc(_.current,E)&&(_.current=E,wo.flushSync(()=>{x(E)}))})},[v,t,n,U,G]);ec(()=>{m===!1&&_.current.isPositioned&&(_.current.isPositioned=!1,x(F=>({...F,isPositioned:!1})))},[m]);const ee=g.useRef(!1);ec(()=>(ee.current=!0,()=>{ee.current=!1}),[]),ec(()=>{if(D&&(P.current=D),M&&(L.current=M),D&&M){if(ne.current)return ne.current(D,M,q);q()}},[D,M,q,ne,J]);const $=g.useMemo(()=>({reference:P,floating:L,setReference:T,setFloating:R}),[T,R]),I=g.useMemo(()=>({reference:D,floating:M}),[D,M]),A=g.useMemo(()=>{const F={position:n,left:0,top:0};if(!I.floating)return F;const K=Yy(I.floating,h.x),E=Yy(I.floating,h.y);return d?{...F,transform:"translate("+K+"px, "+E+"px)",...a1(I.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:K,top:E}},[n,d,I.floating,h.x,h.y]);return g.useMemo(()=>({...h,update:q,refs:$,elements:I,floatingStyles:A}),[h,q,$,I,A])}const ML=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:o,padding:i}=typeof e=="function"?e(n):e;return o&&t(o)?o.current!=null?Gy({element:o.current,padding:i}).fn(n):{}:o?Gy({element:o,padding:i}).fn(n):{}}}},$L=(e,t)=>{const n=EL(e);return{name:n.name,fn:n.fn,options:[e,t]}},FL=(e,t)=>{const n=PL(e);return{name:n.name,fn:n.fn,options:[e,t]}},zL=(e,t)=>({fn:DL(e).fn,options:[e,t]}),BL=(e,t)=>{const n=TL(e);return{name:n.name,fn:n.fn,options:[e,t]}},UL=(e,t)=>{const n=RL(e);return{name:n.name,fn:n.fn,options:[e,t]}},HL=(e,t)=>{const n=AL(e);return{name:n.name,fn:n.fn,options:[e,t]}},WL=(e,t)=>{const n=ML(e);return{name:n.name,fn:n.fn,options:[e,t]}};var VL="Arrow",l1=g.forwardRef((e,t)=>{const{children:n,width:o=10,height:i=5,...l}=e;return a.jsx(Dt.svg,{...l,ref:t,width:o,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:a.jsx("polygon",{points:"0,0 30,0 15,10"})})});l1.displayName=VL;var qL=l1;function KL(e){const[t,n]=g.useState(void 0);return jo(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const l=i[0];let c,d;if("borderBoxSize"in l){const p=l.borderBoxSize,m=Array.isArray(p)?p[0]:p;c=m.inlineSize,d=m.blockSize}else c=e.offsetWidth,d=e.offsetHeight;n({width:c,height:d})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}var ph="Popper",[c1,u1]=Go(ph),[GL,d1]=c1(ph),f1=e=>{const{__scopePopper:t,children:n}=e,[o,i]=g.useState(null);return a.jsx(GL,{scope:t,anchor:o,onAnchorChange:i,children:n})};f1.displayName=ph;var p1="PopperAnchor",h1=g.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...i}=e,l=d1(p1,n),c=g.useRef(null),d=cn(t,c),p=g.useRef(null);return g.useEffect(()=>{const m=p.current;p.current=(o==null?void 0:o.current)||c.current,m!==p.current&&l.onAnchorChange(p.current)}),o?null:a.jsx(Dt.div,{...i,ref:d})});h1.displayName=p1;var hh="PopperContent",[YL,XL]=c1(hh),m1=g.forwardRef((e,t)=>{var Pe,Ce,pe,xe,Je,Ke;const{__scopePopper:n,side:o="bottom",sideOffset:i=0,align:l="center",alignOffset:c=0,arrowPadding:d=0,avoidCollisions:p=!0,collisionBoundary:m=[],collisionPadding:h=0,sticky:x="partial",hideWhenDetached:v=!1,updatePositionStrategy:b="optimized",onPlaced:N,...k}=e,j=d1(hh,n),[S,T]=g.useState(null),R=cn(t,Me=>T(Me)),[D,M]=g.useState(null),P=KL(D),L=(P==null?void 0:P.width)??0,_=(P==null?void 0:P.height)??0,J=o+(l!=="center"?"-"+l:""),ne=typeof h=="number"?h:{top:0,right:0,bottom:0,left:0,...h},U=Array.isArray(m)?m:[m],G=U.length>0,q={padding:ne,boundary:U.filter(JL),altBoundary:G},{refs:ee,floatingStyles:$,placement:I,isPositioned:A,middlewareData:F}=_L({strategy:"fixed",placement:J,whileElementsMounted:(...Me)=>NL(...Me,{animationFrame:b==="always"}),elements:{reference:j.anchor},middleware:[$L({mainAxis:i+_,alignmentAxis:c}),p&&FL({mainAxis:!0,crossAxis:!1,limiter:x==="partial"?zL():void 0,...q}),p&&BL({...q}),UL({...q,apply:({elements:Me,rects:_e,availableWidth:ct,availableHeight:et})=>{const{width:mt,height:Pt}=_e.reference,Ge=Me.floating.style;Ge.setProperty("--radix-popper-available-width",`${ct}px`),Ge.setProperty("--radix-popper-available-height",`${et}px`),Ge.setProperty("--radix-popper-anchor-width",`${mt}px`),Ge.setProperty("--radix-popper-anchor-height",`${Pt}px`)}}),D&&WL({element:D,padding:d}),ZL({arrowWidth:L,arrowHeight:_}),v&&HL({strategy:"referenceHidden",...q})]}),[K,E]=y1(I),B=Vo(N);jo(()=>{A&&(B==null||B())},[A,B]);const X=(Pe=F.arrow)==null?void 0:Pe.x,O=(Ce=F.arrow)==null?void 0:Ce.y,se=((pe=F.arrow)==null?void 0:pe.centerOffset)!==0,[me,fe]=g.useState();return jo(()=>{S&&fe(window.getComputedStyle(S).zIndex)},[S]),a.jsx("div",{ref:ee.setFloating,"data-radix-popper-content-wrapper":"",style:{...$,transform:A?$.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:me,"--radix-popper-transform-origin":[(xe=F.transformOrigin)==null?void 0:xe.x,(Je=F.transformOrigin)==null?void 0:Je.y].join(" "),...((Ke=F.hide)==null?void 0:Ke.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:a.jsx(YL,{scope:n,placedSide:K,onArrowChange:M,arrowX:X,arrowY:O,shouldHideArrow:se,children:a.jsx(Dt.div,{"data-side":K,"data-align":E,...k,ref:R,style:{...k.style,animation:A?void 0:"none"}})})})});m1.displayName=hh;var g1="PopperArrow",QL={top:"bottom",right:"left",bottom:"top",left:"right"},x1=g.forwardRef(function(t,n){const{__scopePopper:o,...i}=t,l=XL(g1,o),c=QL[l.placedSide];return a.jsx("span",{ref:l.onArrowChange,style:{position:"absolute",left:l.arrowX,top:l.arrowY,[c]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[l.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[l.placedSide],visibility:l.shouldHideArrow?"hidden":void 0},children:a.jsx(qL,{...i,ref:n,style:{...i.style,display:"block"}})})});x1.displayName=g1;function JL(e){return e!==null}var ZL=e=>({name:"transformOrigin",options:e,fn(t){var j,S,T;const{placement:n,rects:o,middlewareData:i}=t,c=((j=i.arrow)==null?void 0:j.centerOffset)!==0,d=c?0:e.arrowWidth,p=c?0:e.arrowHeight,[m,h]=y1(n),x={start:"0%",center:"50%",end:"100%"}[h],v=(((S=i.arrow)==null?void 0:S.x)??0)+d/2,b=(((T=i.arrow)==null?void 0:T.y)??0)+p/2;let N="",k="";return m==="bottom"?(N=c?x:`${v}px`,k=`${-p}px`):m==="top"?(N=c?x:`${v}px`,k=`${o.floating.height+p}px`):m==="right"?(N=`${-p}px`,k=c?x:`${b}px`):m==="left"&&(N=`${o.floating.width+p}px`,k=c?x:`${b}px`),{data:{x:N,y:k}}}});function y1(e){const[t,n="center"]=e.split("-");return[t,n]}var eO=f1,tO=h1,nO=m1,rO=x1,oO=Symbol("radix.slottable");function sO(e){const t=({children:n})=>a.jsx(a.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=oO,t}var iO=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),aO="VisuallyHidden",v1=g.forwardRef((e,t)=>a.jsx(Dt.span,{...e,ref:t,style:{...iO,...e.style}}));v1.displayName=aO;var lO=v1,[qc]=Go("Tooltip",[u1]),Kc=u1(),b1="TooltipProvider",cO=700,op="tooltip.open",[uO,mh]=qc(b1),w1=e=>{const{__scopeTooltip:t,delayDuration:n=cO,skipDelayDuration:o=300,disableHoverableContent:i=!1,children:l}=e,c=g.useRef(!0),d=g.useRef(!1),p=g.useRef(0);return g.useEffect(()=>{const m=p.current;return()=>window.clearTimeout(m)},[]),a.jsx(uO,{scope:t,isOpenDelayedRef:c,delayDuration:n,onOpen:g.useCallback(()=>{window.clearTimeout(p.current),c.current=!1},[]),onClose:g.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>c.current=!0,o)},[o]),isPointerInTransitRef:d,onPointerInTransitChange:g.useCallback(m=>{d.current=m},[]),disableHoverableContent:i,children:l})};w1.displayName=b1;var aa="Tooltip",[dO,ka]=qc(aa),k1=e=>{const{__scopeTooltip:t,children:n,open:o,defaultOpen:i,onOpenChange:l,disableHoverableContent:c,delayDuration:d}=e,p=mh(aa,e.__scopeTooltip),m=Kc(t),[h,x]=g.useState(null),v=As(),b=g.useRef(0),N=c??p.disableHoverableContent,k=d??p.delayDuration,j=g.useRef(!1),[S,T]=Nc({prop:o,defaultProp:i??!1,onChange:L=>{L?(p.onOpen(),document.dispatchEvent(new CustomEvent(op))):p.onClose(),l==null||l(L)},caller:aa}),R=g.useMemo(()=>S?j.current?"delayed-open":"instant-open":"closed",[S]),D=g.useCallback(()=>{window.clearTimeout(b.current),b.current=0,j.current=!1,T(!0)},[T]),M=g.useCallback(()=>{window.clearTimeout(b.current),b.current=0,T(!1)},[T]),P=g.useCallback(()=>{window.clearTimeout(b.current),b.current=window.setTimeout(()=>{j.current=!0,T(!0),b.current=0},k)},[k,T]);return g.useEffect(()=>()=>{b.current&&(window.clearTimeout(b.current),b.current=0)},[]),a.jsx(eO,{...m,children:a.jsx(dO,{scope:t,contentId:v,open:S,stateAttribute:R,trigger:h,onTriggerChange:x,onTriggerEnter:g.useCallback(()=>{p.isOpenDelayedRef.current?P():D()},[p.isOpenDelayedRef,P,D]),onTriggerLeave:g.useCallback(()=>{N?M():(window.clearTimeout(b.current),b.current=0)},[M,N]),onOpen:D,onClose:M,disableHoverableContent:N,children:n})})};k1.displayName=aa;var sp="TooltipTrigger",j1=g.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,i=ka(sp,n),l=mh(sp,n),c=Kc(n),d=g.useRef(null),p=cn(t,d,i.onTriggerChange),m=g.useRef(!1),h=g.useRef(!1),x=g.useCallback(()=>m.current=!1,[]);return g.useEffect(()=>()=>document.removeEventListener("pointerup",x),[x]),a.jsx(tO,{asChild:!0,...c,children:a.jsx(Dt.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...o,ref:p,onPointerMove:pt(e.onPointerMove,v=>{v.pointerType!=="touch"&&!h.current&&!l.isPointerInTransitRef.current&&(i.onTriggerEnter(),h.current=!0)}),onPointerLeave:pt(e.onPointerLeave,()=>{i.onTriggerLeave(),h.current=!1}),onPointerDown:pt(e.onPointerDown,()=>{i.open&&i.onClose(),m.current=!0,document.addEventListener("pointerup",x,{once:!0})}),onFocus:pt(e.onFocus,()=>{m.current||i.onOpen()}),onBlur:pt(e.onBlur,i.onClose),onClick:pt(e.onClick,i.onClose)})})});j1.displayName=sp;var gh="TooltipPortal",[fO,pO]=qc(gh,{forceMount:void 0}),S1=e=>{const{__scopeTooltip:t,forceMount:n,children:o,container:i}=e,l=ka(gh,t);return a.jsx(fO,{scope:t,forceMount:n,children:a.jsx(Yo,{present:n||l.open,children:a.jsx(Cp,{asChild:!0,container:i,children:o})})})};S1.displayName=gh;var zs="TooltipContent",C1=g.forwardRef((e,t)=>{const n=pO(zs,e.__scopeTooltip),{forceMount:o=n.forceMount,side:i="top",...l}=e,c=ka(zs,e.__scopeTooltip);return a.jsx(Yo,{present:o||c.open,children:c.disableHoverableContent?a.jsx(N1,{side:i,...l,ref:t}):a.jsx(hO,{side:i,...l,ref:t})})}),hO=g.forwardRef((e,t)=>{const n=ka(zs,e.__scopeTooltip),o=mh(zs,e.__scopeTooltip),i=g.useRef(null),l=cn(t,i),[c,d]=g.useState(null),{trigger:p,onClose:m}=n,h=i.current,{onPointerInTransitChange:x}=o,v=g.useCallback(()=>{d(null),x(!1)},[x]),b=g.useCallback((N,k)=>{const j=N.currentTarget,S={x:N.clientX,y:N.clientY},T=vO(S,j.getBoundingClientRect()),R=bO(S,T),D=wO(k.getBoundingClientRect()),M=jO([...R,...D]);d(M),x(!0)},[x]);return g.useEffect(()=>()=>v(),[v]),g.useEffect(()=>{if(p&&h){const N=j=>b(j,h),k=j=>b(j,p);return p.addEventListener("pointerleave",N),h.addEventListener("pointerleave",k),()=>{p.removeEventListener("pointerleave",N),h.removeEventListener("pointerleave",k)}}},[p,h,b,v]),g.useEffect(()=>{if(c){const N=k=>{const j=k.target,S={x:k.clientX,y:k.clientY},T=(p==null?void 0:p.contains(j))||(h==null?void 0:h.contains(j)),R=!kO(S,c);T?v():R&&(v(),m())};return document.addEventListener("pointermove",N),()=>document.removeEventListener("pointermove",N)}},[p,h,c,m,v]),a.jsx(N1,{...e,ref:l})}),[mO,gO]=qc(aa,{isInside:!1}),xO=sO("TooltipContent"),N1=g.forwardRef((e,t)=>{const{__scopeTooltip:n,children:o,"aria-label":i,onEscapeKeyDown:l,onPointerDownOutside:c,...d}=e,p=ka(zs,n),m=Kc(n),{onClose:h}=p;return g.useEffect(()=>(document.addEventListener(op,h),()=>document.removeEventListener(op,h)),[h]),g.useEffect(()=>{if(p.trigger){const x=v=>{const b=v.target;b!=null&&b.contains(p.trigger)&&h()};return window.addEventListener("scroll",x,{capture:!0}),()=>window.removeEventListener("scroll",x,{capture:!0})}},[p.trigger,h]),a.jsx(Sp,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:x=>x.preventDefault(),onDismiss:h,children:a.jsxs(nO,{"data-state":p.stateAttribute,...m,...d,ref:t,style:{...d.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[a.jsx(xO,{children:o}),a.jsx(mO,{scope:n,isInside:!0,children:a.jsx(lO,{id:p.contentId,role:"tooltip",children:i||o})})]})})});C1.displayName=zs;var E1="TooltipArrow",yO=g.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,i=Kc(n);return gO(E1,n).isInside?null:a.jsx(rO,{...i,...o,ref:t})});yO.displayName=E1;function vO(e,t){const n=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),l=Math.abs(t.left-e.x);switch(Math.min(n,o,i,l)){case l:return"left";case i:return"right";case n:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function bO(e,t,n=5){const o=[];switch(t){case"top":o.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":o.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":o.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":o.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return o}function wO(e){const{top:t,right:n,bottom:o,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:o},{x:i,y:o}]}function kO(e,t){const{x:n,y:o}=e;let i=!1;for(let l=0,c=t.length-1;l<t.length;c=l++){const d=t[l],p=t[c],m=d.x,h=d.y,x=p.x,v=p.y;h>o!=v>o&&n<(x-m)*(o-h)/(v-h)+m&&(i=!i)}return i}function jO(e){const t=e.slice();return t.sort((n,o)=>n.x<o.x?-1:n.x>o.x?1:n.y<o.y?-1:n.y>o.y?1:0),SO(t)}function SO(e){if(e.length<=1)return e.slice();const t=[];for(let o=0;o<e.length;o++){const i=e[o];for(;t.length>=2;){const l=t[t.length-1],c=t[t.length-2];if((l.x-c.x)*(i.y-c.y)>=(l.y-c.y)*(i.x-c.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let o=e.length-1;o>=0;o--){const i=e[o];for(;n.length>=2;){const l=n[n.length-1],c=n[n.length-2];if((l.x-c.x)*(i.y-c.y)>=(l.y-c.y)*(i.x-c.x))n.pop();else break}n.push(i)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var CO=w1,NO=k1,EO=j1,PO=S1,P1=C1;const T1=CO,R1=NO,A1=EO,xh=g.forwardRef(({className:e,sideOffset:t=4,...n},o)=>a.jsx(PO,{children:a.jsx(P1,{ref:o,sideOffset:t,className:ze("z-50 overflow-hidden rounded-md border border-border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));xh.displayName=P1.displayName;function TO({items:e,align:t="end"}){const[n,o]=g.useState(!1),i=g.useRef(null);return g.useEffect(()=>{if(!n)return;function l(d){i.current&&!i.current.contains(d.target)&&o(!1)}function c(d){d.key==="Escape"&&o(!1)}return document.addEventListener("mousedown",l),document.addEventListener("keydown",c),()=>{document.removeEventListener("mousedown",l),document.removeEventListener("keydown",c)}},[n]),e.length===0?null:a.jsxs("div",{className:"relative",ref:i,children:[a.jsx("button",{type:"button",onClick:()=>o(l=>!l),className:"shell-action",title:"More actions","aria-haspopup":"true","aria-expanded":n,children:a.jsx(DC,{className:"h-4 w-4"})}),n&&a.jsx("div",{className:ze("absolute top-full mt-1 z-30 min-w-[220px] rounded-md border border-border/70 bg-background shadow-lg py-1",t==="end"?"right-0":"left-0"),children:a.jsx(T1,{delayDuration:200,children:e.map(l=>{const c=l.icon,d=ze("flex w-full items-center gap-2 px-3 py-1.5 text-sm text-left transition",l.disabled?"opacity-50 cursor-not-allowed":l.destructive?"text-destructive hover:bg-destructive/10":"hover:bg-foreground/5"),p=a.jsxs(a.Fragment,{children:[c?a.jsx(c,{className:"h-4 w-4 shrink-0"}):null,a.jsx("span",{className:"truncate",children:l.label})]});if(l.disabled){const m=a.jsx("span",{tabIndex:0,className:"inline-block w-full outline-none focus-visible:ring-1 focus-visible:ring-ring",children:a.jsx("button",{type:"button",disabled:!0,className:d,children:p})});return l.disabledReason?a.jsxs(R1,{children:[a.jsx(A1,{asChild:!0,children:m}),a.jsx(xh,{side:"left",children:l.disabledReason})]},l.key):a.jsx("div",{children:m},l.key)}return l.href?a.jsx(Ee,{to:l.href,className:d,onClick:()=>o(!1),children:p},l.key):a.jsx("button",{type:"button",className:d,onClick:()=>{var m;(m=l.onSelect)==null||m.call(l),o(!1)},children:p},l.key)})})})]})}async function D1(e,t,n,o){const i=await fetch(`/api/projects/${e}/assignments/${t}/transitions/${n.command}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(o?{reason:o}:{})}),l=await i.json().catch(()=>null);if(!i.ok)throw new Error((l==null?void 0:l.error)||`HTTP ${i.status}`);return l.assignment}async function I1(e,t,n){const o=await fetch(`/api/projects/${e}/assignments/${t}/status-override`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({status:n})}),i=await o.json().catch(()=>null);if(!o.ok)throw new Error((i==null?void 0:i.error)||`HTTP ${o.status}`);return i.assignment}async function RO(e,t){const n=await fetch(`/api/projects/${e}/assignments/${t}`,{method:"DELETE"}),o=await n.json().catch(()=>null);if(!n.ok)throw new Error((o==null?void 0:o.error)||`HTTP ${n.status}`)}function L1(e){return e.requiresReason||e.command==="block"}function AO(e){const t=e.split(`
|
|
464
|
+
`),n=t.findIndex(c=>/^##\s+Acceptance Criteria\s*$/i.test(c.trim()));if(n===-1)return{acceptanceCriteria:[],summaryBody:e};let o=t.length;for(let c=n+1;c<t.length;c+=1)if(/^#{1,2}\s+\S/.test(t[c].trim())){o=c;break}const i=t.slice(n+1,o).map(c=>c.match(/^\s*[-*]\s+\[( |x|X)\]\s+(.*)$/)).filter(c=>!!c).map(c=>({checked:c[1].toLowerCase()==="x",text:c[2].trim()})),l=[...t.slice(0,n),...t.slice(o)].join(`
|
|
465
|
+
`).replace(/\n{3,}/g,`
|
|
466
|
+
|
|
467
|
+
`).trim();return{acceptanceCriteria:i,summaryBody:l}}function DO(e){const t=e.split(`
|
|
468
|
+
`),n=t.findIndex(c=>/^##\s+Todos\s*$/i.test(c.trim()));if(n===-1)return{hasSection:!1,todosMarkdown:"",remaining:e};let o=t.length;for(let c=n+1;c<t.length;c+=1)if(/^#{1,2}\s+\S/.test(t[c].trim())){o=c;break}const i=t.slice(n+1,o).join(`
|
|
469
|
+
`).replace(/<!--[\s\S]*?-->/g,"").replace(/\n{3,}/g,`
|
|
470
|
+
|
|
471
|
+
`).trim(),l=[...t.slice(0,n),...t.slice(o)].join(`
|
|
472
|
+
`).replace(/\n{3,}/g,`
|
|
473
|
+
|
|
474
|
+
`).trim();return{hasSection:!0,todosMarkdown:i,remaining:l}}function IO({projectSlug:e,dependencies:t,blockedReason:n}){const[o,i]=g.useState(!1);if(t.length===0)return null;const l=t.filter(d=>d.status!=="completed"&&d.status!=="review"),c=l.length===0;return c&&!o?a.jsxs("button",{type:"button",onClick:()=>i(!0),className:"flex w-full items-center gap-2 rounded-lg border border-success-foreground/30 bg-success/70 px-4 py-2.5 text-left transition hover:bg-success",children:[a.jsx(hp,{className:"h-4 w-4 shrink-0 text-success-foreground"}),a.jsxs("span",{className:"text-sm font-medium text-success-foreground",children:["All ",t.length," ",t.length===1?"dependency":"dependencies"," resolved"]}),a.jsx(na,{className:"ml-auto h-4 w-4 text-success-foreground"})]}):a.jsxs("div",{className:"space-y-3",children:[l.length>0&&a.jsxs("div",{className:"flex items-start gap-3 rounded-lg border border-warning-foreground/30 bg-warning px-4 py-3",children:[a.jsx(Af,{className:"mt-0.5 h-4 w-4 shrink-0 text-warning-foreground"}),a.jsxs("div",{className:"text-sm text-warning-foreground",children:[a.jsxs("strong",{children:[l.length," ",l.length===1?"dependency is":"dependencies are"," not yet completed."]}),n&&a.jsxs("p",{className:"mt-1 text-warning-foreground/80",children:["Blocked reason: ",n]})]})]}),a.jsx(Te,{title:"Dependencies",description:`${t.length-l.length} of ${t.length} resolved`,actions:c?a.jsx("button",{type:"button",onClick:()=>i(!1),className:"text-xs text-muted-foreground hover:text-foreground",children:"Collapse"}):void 0,children:a.jsx("div",{className:"divide-y divide-border/40",children:t.map(d=>a.jsxs(Ee,{to:`/projects/${e}/assignments/${d.slug}`,className:"flex items-center gap-3 px-1 py-2.5 transition hover:bg-muted/40 first:pt-0 last:pb-0",children:[a.jsx(Vt,{status:d.status}),a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsx("p",{className:"truncate text-sm font-medium text-foreground",children:d.title}),a.jsx("p",{className:"truncate text-xs text-muted-foreground",children:d.slug})]}),d.assignee&&a.jsx("span",{className:"hidden text-xs text-muted-foreground sm:inline",children:d.assignee}),a.jsx(nc,{className:"h-4 w-4 shrink-0 text-muted-foreground"})]},d.slug))})})]})}function LO({links:e}){const t=At();if(e.length===0)return null;const n=e.filter(i=>!i.isReverse),o=e.filter(i=>i.isReverse);return a.jsx(Te,{title:"Linked Assignments",description:`${e.length} ${e.length===1?"link":"links"}`,children:a.jsxs("div",{className:"divide-y divide-border/40",children:[n.map(i=>a.jsxs(Ee,{to:`${t}/projects/${i.projectSlug}/assignments/${i.assignmentSlug}`,className:"flex items-center gap-3 px-1 py-2.5 transition hover:bg-muted/40 first:pt-0 last:pb-0",children:[a.jsx(jC,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),a.jsx(Vt,{status:i.status}),a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsx("p",{className:"truncate text-sm font-medium text-foreground",children:i.title}),a.jsx("p",{className:"truncate text-xs text-muted-foreground",children:i.slug})]}),a.jsx(nc,{className:"h-4 w-4 shrink-0 text-muted-foreground"})]},`fwd-${i.slug}`)),o.map(i=>a.jsxs(Ee,{to:`${t}/projects/${i.projectSlug}/assignments/${i.assignmentSlug}`,className:"flex items-center gap-3 px-1 py-2.5 transition hover:bg-muted/40 first:pt-0 last:pb-0",children:[a.jsx(Rv,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),a.jsx(Vt,{status:i.status}),a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsx("p",{className:"truncate text-sm font-medium text-foreground",children:i.title}),a.jsx("p",{className:"truncate text-xs text-muted-foreground",children:i.slug})]}),a.jsx(nc,{className:"h-4 w-4 shrink-0 text-muted-foreground"})]},`rev-${i.slug}`))]})})}function OO(e){const t=new Map;for(const o of e)t.set(o.id,{entry:o,replies:[]});const n=[];for(const o of e){const i=t.get(o.id);o.replyTo&&t.has(o.replyTo)?t.get(o.replyTo).replies.push(i):n.push(i)}return n}function _O(e,t){return e===null?`/api/assignments/${encodeURIComponent(t)}/comments`:`/api/projects/${encodeURIComponent(e)}/assignments/${encodeURIComponent(t)}/comments`}function O1({projectSlug:e,assignmentSlug:t,entries:n}){const[o,i]=g.useState(n);g.useEffect(()=>{i(n)},[n]);const l=g.useMemo(()=>OO(o),[o]),[c,d]=g.useState(""),[p,m]=g.useState("note"),[h,x]=g.useState(!1),[v,b]=g.useState(null);async function N(j){var R;if(j.preventDefault(),!c.trim())return;x(!0),b(null);const S=`tmp-${Date.now()}`,T={id:S,timestamp:new Date().toISOString(),author:"human",type:p,body:c,resolved:p==="question"?!1:void 0};i(D=>[...D,T]);try{const D=await fetch(_O(e,t),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({body:c,type:p})});if(!D.ok){const L=await D.text();throw new Error(L||`HTTP ${D.status}`)}const M=await D.json().catch(()=>null),P=(R=M==null?void 0:M.comment)==null?void 0:R.id;i(L=>L.map(_=>_.id===S?{..._,id:P??_.id}:_)),d(""),window.dispatchEvent(new CustomEvent("syntaur-refresh"))}catch(D){b(D instanceof Error?D.message:String(D)),i(M=>M.filter(P=>P.id!==S))}finally{x(!1)}}async function k(j,S){i(T=>T.map(R=>R.id===j?{...R,resolved:S}:R));try{const T=e===null?`/api/assignments/${encodeURIComponent(t)}/comments/${encodeURIComponent(j)}/resolved`:`/api/projects/${encodeURIComponent(e)}/assignments/${encodeURIComponent(t)}/comments/${encodeURIComponent(j)}/resolved`,R=await fetch(T,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({resolved:S})});if(!R.ok)throw new Error(`HTTP ${R.status}`);window.dispatchEvent(new CustomEvent("syntaur-refresh"))}catch(T){b(T instanceof Error?T.message:String(T)),i(R=>R.map(D=>D.id===j?{...D,resolved:!S}:D))}}return a.jsx(Te,{title:"Comments",description:"Threaded questions, notes, and feedback. Questions can be resolved once answered.",children:a.jsxs("div",{className:"space-y-4",children:[l.map(j=>a.jsx(_1,{node:j,onToggleResolved:k,depth:0},j.entry.id)),a.jsxs("form",{onSubmit:N,className:"mt-6 space-y-2 border-t border-border pt-4",children:[a.jsx("label",{className:"block text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Add comment"}),a.jsx("textarea",{value:c,onChange:j=>d(j.target.value),className:"w-full rounded border border-border bg-background p-2 text-sm",rows:3,placeholder:"Ask a question, leave a note, or give feedback…"}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsxs("select",{value:p,onChange:j=>m(j.target.value),className:"rounded border border-border bg-background px-2 py-1 text-xs",children:[a.jsx("option",{value:"note",children:"note"}),a.jsx("option",{value:"question",children:"question"}),a.jsx("option",{value:"feedback",children:"feedback"})]}),a.jsx("button",{type:"submit",disabled:h||!c.trim(),className:"shell-action",children:h?"Posting…":"Post comment"}),v?a.jsx("span",{className:"text-xs text-error-foreground",children:v}):null]})]})]})})}function _1({node:e,depth:t,onToggleResolved:n}){const{entry:o,replies:i}=e,l=o.type==="question";return a.jsxs("div",{className:ze("space-y-2",t>0&&"ml-4 border-l border-border pl-4"),children:[a.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-xs text-muted-foreground",children:[a.jsx("span",{className:"font-mono",children:o.id}),a.jsx("span",{children:"·"}),a.jsx("span",{children:o.timestamp}),a.jsx("span",{children:"·"}),a.jsx("span",{className:"font-medium text-foreground",children:o.author}),a.jsx("span",{children:"·"}),a.jsx("span",{className:ze("rounded px-1.5 py-0.5 font-mono text-[10px] uppercase",l&&"bg-warning text-warning-foreground",o.type==="feedback"&&"bg-info text-info-foreground",o.type==="note"&&"bg-muted text-muted-foreground"),children:o.type}),l?a.jsxs("button",{type:"button",onClick:()=>n(o.id,!o.resolved),className:ze("inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[10px] font-medium",o.resolved?"bg-success text-success-foreground hover:bg-success/80":"bg-muted text-muted-foreground hover:bg-muted/80"),title:o.resolved?"Mark unresolved":"Mark resolved",children:[o.resolved?a.jsx(hp,{className:"h-3 w-3"}):a.jsx(NC,{className:"h-3 w-3"}),o.resolved?"resolved":"open"]}):null,o.replyTo?a.jsxs("span",{className:"inline-flex items-center gap-1 text-muted-foreground",children:[a.jsx(KC,{className:"h-3 w-3"}),o.replyTo]}):null]}),a.jsx(Wt,{content:o.body}),i.length>0?a.jsx("div",{className:"space-y-2",children:i.map(c=>a.jsx(_1,{node:c,depth:t+1,onToggleResolved:n},c.entry.id))}):null]})}const MO=["review","complete","unblock","start","block","fail","reopen"];function Xy(){var mn,Tn,Rn,re,le,he;const{slug:e,aslug:t}=Et(),n=qt(),o=At(),[i,l]=No(),[c,d]=g.useState(null),[p,m]=g.useState(null),[h,x]=g.useState(null),[v,b]=g.useState(null),[N,k]=g.useState(null),[j,S]=g.useState(!1),[T,R]=g.useState(!1),[D,M]=g.useState(0),P=i.get("tab")??"summary",L=Ac(),{data:_,loading:J,error:ne,refetch:U}=GN(e,t),{data:G}=lb(e),{data:q}=kp(),{data:ee}=QN(e,t),$=g.useMemo(()=>{if(!_||!G)return[];const te=new Map(G.assignments.map(ye=>[ye.slug,ye]));return _.dependsOn.map(ye=>{const Se=te.get(ye);return{slug:ye,title:(Se==null?void 0:Se.title)??ye,status:(Se==null?void 0:Se.status)??"pending",priority:(Se==null?void 0:Se.priority)??"medium",assignee:(Se==null?void 0:Se.assignee)??null}})},[_,G]),I=$.filter(te=>te.status!=="completed"&&te.status!=="review");Qo("assignment");const A=g.useMemo(()=>((G==null?void 0:G.assignments)??[]).map(te=>te.slug),[G]),F=t?A.indexOf(t):-1,K=F>0?A[F-1]:null,E=F>=0&&F<A.length-1?A[F+1]:null,B=`${o}/projects/${e}/assignments/${t}`;ft({keys:"e",scope:"assignment",description:"Edit assignment",handler:()=>n(`${B}/edit`)}),ft({keys:"p",scope:"assignment",description:"Edit plan",handler:()=>n(`${B}/plan/edit`)}),ft({keys:"h",scope:"assignment",description:"Append handoff",handler:()=>n(`${B}/handoff/edit`)}),ft({keys:"d",scope:"assignment",description:"Append decision record",handler:()=>n(`${B}/decision-record/edit`)}),ft({keys:"s",scope:"assignment",description:"Edit scratchpad",handler:()=>n(`${B}/scratchpad/edit`)}),ft({keys:"[",scope:"assignment",description:"Previous assignment in project",enabled:!!K,handler:()=>K&&n(`${o}/projects/${e}/assignments/${K}`)}),ft({keys:"]",scope:"assignment",description:"Next assignment in project",enabled:!!E,handler:()=>E&&n(`${o}/projects/${e}/assignments/${E}`)});const X=g.useMemo(()=>_?AO(_.body):{acceptanceCriteria:[],summaryBody:""},[_]),O=g.useMemo(()=>DO(X.summaryBody),[X.summaryBody]),se=X.acceptanceCriteria,me=se.filter(te=>te.checked).length,fe=se.length>0&&me===se.length,Pe=g.useRef(fe),Ce=g.useRef(!1);if(g.useEffect(()=>{if(_){if(!Ce.current){Pe.current=fe,Ce.current=!0;return}fe&&!Pe.current&&M(te=>te+1),Pe.current=fe}},[fe,_]),J)return a.jsx(wt,{label:"Loading assignment workspace…"});if(ne||!_||!e||!t)return a.jsx(ht,{error:ne||"Assignment not found."});const pe=e,xe=t,Je=se.length>0?{checked:me,total:se.length}:void 0,Ke=_.availableTransitions??[],Me=Ke.filter(te=>!te.disabled&&te.targetStatus!==_.status),_e=MO.map(te=>Me.find(ye=>ye.command===te)).find(Boolean)??Me[0]??null,ct=[];if(q!=null&&q.sessions)for(const te of q.sessions)for(const ye of te.windows)for(const Se of ye.panes)((mn=Se.assignment)==null?void 0:mn.project)===e&&((Tn=Se.assignment)==null?void 0:Tn.slug)===t&&ct.push({sessionName:te.name,command:Se.command,urls:Se.urls});async function et(te){d(null);try{await I1(pe,xe,te),U()}catch(ye){d(ye.message)}}async function mt(){R(!0);try{await RO(pe,xe),n(`${o}/projects/${pe}`)}catch(te){d(te.message),R(!1),S(!1)}}async function Pt(te,ye){d(null),m(te.command);try{return await D1(pe,xe,te,ye),U(),!0}catch(Se){return d(Se.message),!1}finally{m(null)}}function Ge(te){if(L1(te)){x(te);return}Pt(te)}async function st(te,ye){b(null),k(te);try{const Se=await fetch(`/api/projects/${pe}/assignments/${xe}/acceptance-criteria/${te}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({checked:ye})}),$t=await Se.json();if(!Se.ok)throw new Error($t.error||`HTTP ${Se.status}`);U()}catch(Se){b(Se.message)}finally{k(null)}}const Kt=[...Me.filter(te=>te!==_e).map(te=>({key:`transition-${te.command}`,label:te.label,onSelect:()=>Ge(te),disabled:p===te.command})),...Ke.filter(te=>te.disabled||te.targetStatus===_.status).map(te=>({key:`transition-${te.command}`,label:te.label,disabled:!0,disabledReason:te.targetStatus===_.status?`Already ${_.status.replace(/_/g," ")}`:te.disabledReason??te.warning??te.description})),...L.statuses.map(te=>({key:`override-${te.id}`,label:`Override → ${te.label}`,onSelect:()=>et(te.id),disabled:te.id===_.status,disabledReason:te.id===_.status?"Already in this status":void 0})),{key:"edit-assignment",label:"Edit assignment source",icon:LC,href:`${o}/projects/${e}/assignments/${t}/edit`},{key:"edit-plan",label:"Edit plan",icon:YC,href:`${o}/projects/${e}/assignments/${t}/plan/edit`},{key:"edit-scratchpad",label:"Edit scratchpad",icon:Ud,href:`${o}/projects/${e}/assignments/${t}/scratchpad/edit`},{key:"append-handoff",label:"Append handoff",icon:nc,href:`${o}/projects/${e}/assignments/${t}/handoff/edit`},{key:"append-decision",label:"Append decision",icon:$C,href:`${o}/projects/${e}/assignments/${t}/decision-record/edit`},{key:"delete",label:"Delete assignment",icon:Eo,destructive:!0,onSelect:()=>S(!0)}],Zt=(_e==null?void 0:_e.command)==="review";return a.jsxs("div",{className:"space-y-5",children:[a.jsxs("div",{className:"sticky top-12 z-20 rounded-lg border border-border/60 bg-card/90 p-3 shadow-sm backdrop-blur",children:[a.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[a.jsx(Vt,{status:_.status,progress:Je}),a.jsx("h1",{className:"text-lg font-semibold text-foreground",children:_.title}),a.jsxs("span",{className:"text-xs text-muted-foreground",children:["Updated ",MN(_.updated)]}),I.length>0&&a.jsxs("span",{className:"text-xs text-warning-foreground",children:["⚠ ",I.length," unmet dep",I.length===1?"":"s"]}),a.jsxs("span",{className:"ml-auto flex items-center gap-2",children:[_e&&a.jsx("button",{type:"button",title:_e.warning||_e.description,disabled:p===_e.command,onClick:()=>Ge(_e),className:ze("shell-action disabled:cursor-not-allowed disabled:opacity-50",_e.warning&&"border-warning-foreground/40",Zt&&D>0&&"send-to-review-glow"),children:a.jsx("span",{children:p===_e.command?"Working…":_e.label})},Zt?`review-${D}`:_e.command),a.jsx(TO,{items:Kt,align:"end"})]})]}),c?a.jsx("p",{className:"mt-4 rounded-md border border-error-foreground/30 bg-error px-4 py-3 text-sm text-error-foreground",children:c}):null,_.blockedReason?a.jsxs("div",{className:"mt-4 rounded-md border border-warning-foreground/30 bg-warning px-4 py-3 text-sm text-warning-foreground",children:[a.jsx("strong",{children:"Blocked reason:"})," ",_.blockedReason]}):null]}),$.length>0&&a.jsx(IO,{projectSlug:e,dependencies:$,blockedReason:_.blockedReason}),_.enrichedLinks&&_.enrichedLinks.length>0&&a.jsx(LO,{links:_.enrichedLinks}),_.referencedBy&&_.referencedBy.length>0&&a.jsx(Te,{title:"Referenced by",description:"Other assignments whose Todos, progress, comments, or handoffs link to this one.",children:a.jsx("ul",{className:"space-y-2",children:_.referencedBy.map(te=>{const ye=te.sourceProjectSlug===null?`/assignments/${te.sourceId}`:`${o}/projects/${te.sourceProjectSlug}/assignments/${te.sourceSlug}`;return a.jsxs("li",{className:"flex items-center gap-2 text-sm",children:[a.jsx(Ee,{to:ye,className:"text-foreground hover:text-primary",children:te.sourceTitle}),a.jsxs("span",{className:"text-xs text-muted-foreground",children:["(",te.mentions," mention",te.mentions===1?"":"s",")"]}),te.sourceProjectSlug===null?a.jsx("span",{className:"rounded bg-muted px-1.5 py-0.5 font-mono text-[10px] uppercase text-muted-foreground",children:"Standalone"}):null]},te.sourceId)})})}),a.jsxs("div",{className:"grid gap-4 xl:grid-cols-[minmax(0,1fr)_280px]",children:[a.jsx("div",{className:"space-y-4",children:a.jsx($p,{value:P,onValueChange:te=>l({tab:te}),items:[{value:"summary",label:"Summary",content:a.jsxs("div",{className:"space-y-5",children:[X.acceptanceCriteria.length>0?a.jsx(Te,{title:"Acceptance Criteria",description:"These checkboxes update the source assignment markdown.",children:a.jsxs("div",{className:"space-y-3",children:[v?a.jsx("p",{className:"rounded-md border border-error-foreground/30 bg-error px-4 py-3 text-sm text-error-foreground",children:v}):null,X.acceptanceCriteria.map((te,ye)=>{const Se=N!==null;return a.jsxs("label",{className:"flex items-start gap-3 rounded-md border border-border/60 bg-background/80 px-3 py-3",children:[a.jsx("input",{type:"checkbox",checked:te.checked,disabled:Se,onChange:$t=>st(ye,$t.target.checked),className:"mt-1 h-4 w-4 rounded border-border text-primary"}),a.jsx("span",{className:"criterion-label text-sm leading-6","data-checked":te.checked,children:te.text})]},`${ye}-${te.text}`)})]})}):null,O.hasSection?a.jsx(Te,{title:"Todos",description:"Checklist of work items from assignment.md. Links point to plan files.",children:a.jsx(Wt,{content:O.todosMarkdown,emptyState:"No todos yet."})}):null,a.jsx(Te,{title:"Assignment Summary",children:a.jsx(Wt,{content:O.remaining,emptyState:X.acceptanceCriteria.length>0||O.hasSection?"No additional summary markdown beyond the acceptance criteria and todos.":"This assignment does not have summary markdown yet."})})]})},{value:"plan",label:"Plan",count:_.plan?1:0,content:_.plan?a.jsx("div",{className:"space-y-5",children:a.jsxs(Te,{title:"Plan",description:"Shows plan.md only. Versioned plans (plan-v2.md, ...) linked from the Todos section are not yet rendered here — open them from the filesystem.",actions:a.jsxs(Ee,{className:"shell-action",to:`${o}/projects/${e}/assignments/${t}/plan/edit`,children:[a.jsx(Ud,{className:"h-4 w-4"}),a.jsx("span",{children:"Edit Plan"})]}),children:[a.jsx("div",{className:"mb-4",children:a.jsx(Vt,{status:_.plan.status})}),a.jsx(Wt,{content:_.plan.body,emptyState:"No plan content yet."})]})}):a.jsx(Qe,{title:"No plan yet",description:"Plan files are optional and versioned. Run /plan-assignment to create plan.md (or plan-v2.md, ...) and link it from the Todos section."})},{value:"scratchpad",label:"Scratchpad",count:_.scratchpad?1:0,content:_.scratchpad?a.jsx(Te,{title:"Scratchpad",actions:a.jsxs(Ee,{className:"shell-action",to:`${o}/projects/${e}/assignments/${t}/scratchpad/edit`,children:[a.jsx(Ud,{className:"h-4 w-4"}),a.jsx("span",{children:"Edit Scratchpad"})]}),children:a.jsx(Wt,{content:_.scratchpad.body,emptyState:"Scratchpad is empty."})}):a.jsx(Qe,{title:"No scratchpad yet",description:"Scratchpad notes appear here when you use the Edit Scratchpad action."})},{value:"handoff",label:"Handoff",count:((Rn=_.handoff)==null?void 0:Rn.handoffCount)??0,content:a.jsx("div",{className:"space-y-5",children:_.handoff?a.jsx(Te,{children:a.jsx(Wt,{content:_.handoff.body,emptyState:"No handoff history yet."})}):a.jsx(Qe,{title:"No handoff log yet",description:"Handoffs appear here when an agent runs /complete-assignment or you append one manually."})})},{value:"progress",label:"Progress",count:((re=_.progress)==null?void 0:re.entryCount)??0,content:a.jsx("div",{className:"space-y-5",children:_.progress&&_.progress.entries.length>0?a.jsx(Te,{title:"Progress",description:"Reverse-chronological log of work done on this assignment. Agents append entries via progress.md.",children:a.jsx("ol",{className:"space-y-4",children:_.progress.entries.map((te,ye)=>a.jsxs("li",{className:"border-l-2 border-border pl-3",children:[a.jsx("div",{className:"text-xs font-mono text-muted-foreground",children:te.timestamp}),a.jsx(Wt,{content:te.body})]},`${te.timestamp}-${ye}`))})}):a.jsx(Qe,{title:"No progress entries yet",description:"Progress entries appear here as the agent appends them to progress.md."})})},{value:"comments",label:"Comments",count:((le=_.comments)==null?void 0:le.entryCount)??0,content:a.jsx("div",{className:"space-y-5",children:_.comments&&_.comments.entries.length>0?a.jsx(O1,{projectSlug:e,assignmentSlug:t,entries:_.comments.entries}):a.jsx(Qe,{title:"No comments yet",description:"Comments appear here when agents or humans post via `syntaur comment` or the dashboard."})})},{value:"decisions",label:"Decisions",count:((he=_.decisionRecord)==null?void 0:he.decisionCount)??0,content:a.jsx("div",{className:"space-y-5",children:_.decisionRecord?a.jsx(Te,{children:a.jsx(Wt,{content:_.decisionRecord.body,emptyState:"No decision history yet."})}):a.jsx(Qe,{title:"No decision record yet",description:"Decision records appear here when you append one via the Append Decision action."})})}]})}),a.jsxs("div",{className:"space-y-5",children:[a.jsx(Te,{title:"Details",children:a.jsxs("dl",{className:"space-y-3 text-sm",children:[a.jsx(yo,{label:"ID",value:_.id,copyable:!0}),a.jsx(yo,{label:"Priority",value:_.priority}),_.assignee&&a.jsx(yo,{label:"Assignee",value:_.assignee}),a.jsx(yo,{label:"Updated",value:`${_N(_.updated)} · Created ${ON(_.created)}`}),_.workspace.repository&&a.jsx(yo,{label:"Repository",value:_.workspace.repository,copyable:!0}),_.workspace.worktreePath&&a.jsx(yo,{label:"Worktree",value:_.workspace.worktreePath,copyable:!0}),_.workspace.branch&&a.jsx(yo,{label:"Branch",value:_.workspace.branch,copyable:!0}),_.workspace.parentBranch&&a.jsx(yo,{label:"Parent branch",value:_.workspace.parentBranch,copyable:!0})]})}),ct.length>0&&a.jsx(Te,{title:"Servers",children:a.jsx("div",{className:"space-y-2",children:ct.map((te,ye)=>a.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[a.jsx("span",{className:"rounded bg-muted/60 px-1.5 py-0.5 font-mono text-xs",children:te.command}),a.jsx("span",{className:"text-xs text-muted-foreground",children:te.sessionName}),te.urls.map(Se=>a.jsxs("a",{href:Se,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-xs text-primary hover:underline",children:[Se.replace("http://localhost:",":"),a.jsx(Iv,{className:"h-2.5 w-2.5"})]},Se))]},ye))})}),ee&&ee.sessions.length>0&&a.jsx(Te,{title:"Agent Sessions",children:a.jsx("div",{className:"space-y-2",children:ee.sessions.map(te=>a.jsxs("div",{className:"flex flex-wrap items-center gap-x-2 gap-y-1 text-sm",children:[a.jsxs("span",{className:"flex items-center gap-1.5",children:[a.jsx(wc,{className:"h-3 w-3 shrink-0 text-muted-foreground"}),a.jsx("span",{className:"font-medium text-foreground",children:te.agent}),a.jsxs("span",{className:"inline-flex items-center gap-1.5 font-mono text-xs text-muted-foreground",title:te.sessionId,children:[te.sessionId.slice(0,8),a.jsx(Hr,{value:te.sessionId})]})]}),a.jsxs("span",{className:"flex items-center gap-2",children:[a.jsx(Vt,{status:te.status}),a.jsx("span",{className:"text-xs text-muted-foreground",children:Cr(te.started)})]})]},te.sessionId))})})]})]}),a.jsx(C0,{open:h!==null,action:h,assignmentTitle:_.title,loading:p===(h==null?void 0:h.command),onOpenChange:te=>{te||x(null)},onConfirm:async te=>{if(!h)return;await Pt(h,te)&&x(null)}}),a.jsx(X0,{open:j,title:"Delete assignment?",description:`This will permanently delete "${_.title}" and all its files (plan, scratchpad, handoff, decision record). This cannot be undone.`,confirmLabel:"Delete Assignment",destructive:!0,loading:T,onOpenChange:te=>{te||S(!1)},onConfirm:mt})]})}function yo({label:e,value:t,copyable:n}){return a.jsxs("div",{className:"flex items-start justify-between gap-3",children:[a.jsx("dt",{className:"text-muted-foreground",children:e}),a.jsxs("dd",{className:"flex items-center gap-1.5 max-w-[60%] text-right text-foreground break-all",children:[a.jsx("span",{className:"truncate",title:t,children:t}),n&&t!=="—"&&a.jsx(Hr,{value:t})]})]})}function $O(){var d,p,m,h,x;const{id:e}=Et(),[t,n]=No(),o=t.get("tab")??"summary",{data:i,loading:l,error:c}=YN(e);return l?a.jsx(wt,{}):c?a.jsx(ht,{error:c}):i?a.jsxs("div",{className:"space-y-6",children:[a.jsxs("header",{className:"space-y-2",children:[a.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[a.jsx(Vt,{status:i.status}),a.jsx("span",{className:"text-xs font-mono text-muted-foreground",children:i.id}),a.jsx(Ee,{to:`/assignments/${i.id}/edit`,className:"ml-auto rounded border border-border px-2 py-1 text-xs text-muted-foreground hover:border-foreground/40 hover:text-foreground",children:"Edit"})]}),a.jsx("h1",{className:"text-2xl font-semibold text-foreground",children:i.title}),i.blockedReason?a.jsxs("p",{className:"text-sm text-warning-foreground",children:["Blocked: ",i.blockedReason]}):null]}),i.referencedBy&&i.referencedBy.length>0?a.jsx(Te,{title:"Referenced by",description:"Other assignments whose bodies link to this one.",children:a.jsx("ul",{className:"space-y-2",children:i.referencedBy.map(v=>a.jsxs("li",{className:"flex items-center gap-2 text-sm",children:[a.jsx(Ee,{to:v.sourceProjectSlug===null?`/assignments/${v.sourceId}`:`/projects/${v.sourceProjectSlug}/assignments/${v.sourceSlug}`,className:"text-foreground hover:text-primary",children:v.sourceTitle}),a.jsxs("span",{className:"text-xs text-muted-foreground",children:["(",v.mentions," mention",v.mentions===1?"":"s",")"]})]},v.sourceId))})}):null,a.jsx($p,{value:o,onValueChange:v=>n({tab:v}),items:[{value:"summary",label:"Summary",content:a.jsx("div",{className:"space-y-5",children:a.jsx(Te,{title:"Assignment",children:a.jsx(Wt,{content:i.body,emptyState:"This assignment does not have summary markdown yet."})})})},{value:"progress",label:"Progress",count:((d=i.progress)==null?void 0:d.entryCount)??0,content:a.jsx("div",{className:"space-y-5",children:i.progress&&i.progress.entries.length>0?a.jsx(Te,{title:"Progress",description:"Reverse-chronological log of work done on this assignment.",children:a.jsx("ol",{className:"space-y-4",children:i.progress.entries.map((v,b)=>a.jsxs("li",{className:"border-l-2 border-border pl-3",children:[a.jsx("div",{className:"text-xs font-mono text-muted-foreground",children:v.timestamp}),a.jsx(Wt,{content:v.body})]},`${v.timestamp}-${b}`))})}):a.jsx(Qe,{title:"No progress entries yet",description:"Progress entries appear here as the agent appends them to progress.md."})})},{value:"comments",label:"Comments",count:((p=i.comments)==null?void 0:p.entryCount)??0,content:a.jsx("div",{className:"space-y-5",children:a.jsx(O1,{projectSlug:null,assignmentSlug:i.id,entries:((m=i.comments)==null?void 0:m.entries)??[]})})},{value:"plan",label:"Plan",content:a.jsx("div",{className:"space-y-5",children:i.plan?a.jsxs(Te,{children:[a.jsx(Wt,{content:i.plan.body,emptyState:"Plan file exists but is empty."}),a.jsx("div",{className:"mt-3 flex justify-end",children:a.jsx(Ee,{to:`/assignments/${i.id}/plan/edit`,className:"rounded border border-border px-2 py-1 text-xs text-muted-foreground hover:border-foreground/40 hover:text-foreground",children:"Edit plan"})})]}):a.jsx(Qe,{title:"No plan file yet",description:"Create one via the CLI or `/plan-assignment`."})})},{value:"scratchpad",label:"Scratchpad",content:a.jsx("div",{className:"space-y-5",children:i.scratchpad?a.jsxs(Te,{children:[a.jsx(Wt,{content:i.scratchpad.body,emptyState:"Scratchpad is empty."}),a.jsx("div",{className:"mt-3 flex justify-end",children:a.jsx(Ee,{to:`/assignments/${i.id}/scratchpad/edit`,className:"rounded border border-border px-2 py-1 text-xs text-muted-foreground hover:border-foreground/40 hover:text-foreground",children:"Edit scratchpad"})})]}):a.jsx(Qe,{title:"No scratchpad yet",description:"Scratchpad is scaffolded at assignment creation time."})})},{value:"handoff",label:"Handoff",count:((h=i.handoff)==null?void 0:h.handoffCount)??0,content:a.jsx("div",{className:"space-y-5",children:i.handoff?a.jsxs(Te,{children:[a.jsx(Wt,{content:i.handoff.body,emptyState:"No handoff history yet."}),a.jsx("div",{className:"mt-3 flex justify-end",children:a.jsx(Ee,{to:`/assignments/${i.id}/handoff/edit`,className:"rounded border border-border px-2 py-1 text-xs text-muted-foreground hover:border-foreground/40 hover:text-foreground",children:"Append handoff"})})]}):a.jsx(Qe,{title:"No handoff log yet",description:"Handoffs appear here when an agent appends one."})})},{value:"decisions",label:"Decisions",count:((x=i.decisionRecord)==null?void 0:x.decisionCount)??0,content:a.jsx("div",{className:"space-y-5",children:i.decisionRecord?a.jsxs(Te,{children:[a.jsx(Wt,{content:i.decisionRecord.body,emptyState:"No decision history yet."}),a.jsx("div",{className:"mt-3 flex justify-end",children:a.jsx(Ee,{to:`/assignments/${i.id}/decision-record/edit`,className:"rounded border border-border px-2 py-1 text-xs text-muted-foreground hover:border-foreground/40 hover:text-foreground",children:"Append decision"})})]}):a.jsx(Qe,{title:"No decision record yet",description:"Decision records appear here once appended."})})}]})]}):a.jsx(ht,{error:"Assignment not found"})}const FO=["table","list","kanban"],Qy={critical:0,high:1,medium:2,low:3};function Jy(e){return e==="1"?"stale":e==="0"?"fresh":"all"}function zO(e,t){return e.toString()===t.toString()}function Zy(e){const t=Date.parse(e);return Number.isNaN(t)?!1:Date.now()-t>10080*60*1e3}function BO(e,t,n){return[...e].sort((i,l)=>{let c=0;switch(t){case"title":c=i.title.localeCompare(l.title);break;case"status":c=i.status.localeCompare(l.status);break;case"priority":c=(Qy[i.priority]??99)-(Qy[l.priority]??99);break;case"assignee":c=(i.assignee??"").localeCompare(l.assignee??"");break;case"dependencies":c=i.dependsOn.length-l.dependsOn.length;break;case"updated":c=i.updated.localeCompare(l.updated);break}return n==="asc"?c:-c})}function ev(){const{workspace:e}=Et(),t=At(),n=qt(),o=g.useRef(null);Qo("list:assignments");const{data:i,loading:l,error:c,refetch:d}=ib(),p=Ac(),[m,h]=No(),x=g.useMemo(()=>PP(p.order),[p]),v=g.useMemo(()=>{const V={};for(const ce of x)V[ce]=SP(p,ce);return V},[x,p]),b=g.useMemo(()=>x.map(V=>({id:V,title:v[V]??V,description:Zb(V)})),[x,v]),N=g.useMemo(()=>new Set(["all",...x]),[x]),k=m.get("view"),j=m.get("status"),S=m.get("stale"),T=k&&FO.includes(k)?k:"kanban";function R(V){return!V||!N.has(V)?"all":V}const D=g.useCallback(V=>{h(ce=>{const ve=new URLSearchParams(ce);return V==="kanban"?ve.delete("view"):ve.set("view",V),ve})},[h]),[M,P]=g.useState(""),[L,_]=g.useState(()=>R(j)),[J,ne]=g.useState("all"),[U,G]=g.useState("all"),[q,ee]=g.useState("all"),[$,I]=g.useState(()=>Jy(S)),[A,F]=g.useState("updated"),[K,E]=g.useState("desc"),[B,X]=g.useState(()=>new Set(x)),[O,se]=g.useState([]),[me,fe]=g.useState(null),[Pe,Ce]=g.useState(null),[pe,xe]=g.useState(null),[Je,Ke]=g.useState(null),[Me,_e]=g.useState(null);g.useEffect(()=>{se((i==null?void 0:i.assignments)??[])},[i]),g.useEffect(()=>{const V=R(j);V!==L&&_(V);const ce=Jy(S);ce!==$&&I(ce)},[$,S,L,j]),g.useEffect(()=>{h(V=>{const ce=new URLSearchParams(V);return L==="all"?ce.delete("status"):ce.set("status",L),$==="all"?ce.delete("stale"):$==="stale"?ce.set("stale","1"):ce.set("stale","0"),zO(V,ce)?V:ce})},[$,h,L]);const ct=g.useMemo(()=>Array.from(new Set(O.map(V=>V.status))).sort(),[O]),et=g.useMemo(()=>Array.from(new Set(O.map(V=>V.priority))).sort(),[O]),mt=g.useMemo(()=>Array.from(new Set(O.map(V=>V.assignee??"__unassigned__"))).sort(),[O]),Pt=g.useMemo(()=>Array.from(new Map(O.filter(V=>V.projectSlug!==null).map(V=>[V.projectSlug,V.projectTitle]))).sort(([,V],[,ce])=>V.localeCompare(ce)),[O]),Ge=g.useMemo(()=>O.filter(V=>{if(e){if(e==="_ungrouped"){if(V.projectWorkspace!==null)return!1}else if(V.projectWorkspace!==e)return!1}if(L!=="all"&&V.status!==L||J!=="all"&&V.priority!==J||$==="stale"&&!Zy(V.updated)||$==="fresh"&&Zy(V.updated)||U!=="all"&&(V.assignee??"__unassigned__")!==U)return!1;if(q!=="all"){if(q==="__standalone__"){if(V.projectSlug!==null)return!1}else if(V.projectSlug!==q)return!1}const ce=M.trim().toLowerCase();return!(ce&&!`${V.title} ${V.slug} ${V.projectTitle??"standalone"} ${V.projectSlug??""}`.toLowerCase().includes(ce))}),[$,O,M,L,J,U,q,e]),st=g.useMemo(()=>BO(Ge,A,K),[Ge,A,K]),{visibleItems:Kt,visibleIndexByKey:Zt}=g.useMemo(()=>{const V=T==="table"?st:x.flatMap(ve=>Ge.filter(Oe=>Oe.status===ve)),ce=new Map;return V.forEach((ve,Oe)=>ce.set(Jt(ve),Oe)),{visibleItems:V,visibleIndexByKey:ce}},[T,st,Ge,x]),{hotkeyRowProps:mn}=ha(Kt,{scope:"list:assignments",onOpen:V=>{if(V.projectSlug===null){n(`/assignments/${V.id}`);return}const ce=V.projectWorkspace?`/w/${V.projectWorkspace}`:t;n(`${ce}/projects/${V.projectSlug}/assignments/${V.slug}`)}});if(ft({keys:"/",scope:"list:assignments",description:"Focus filter",handler:()=>{var V;return(V=o.current)==null?void 0:V.focus()}}),ft({keys:"r",scope:"list:assignments",description:"Refresh",handler:()=>d()}),l)return a.jsx(wt,{label:"Loading assignments board…"});if(c||!i)return a.jsx(ht,{error:c||"Assignments board is unavailable."});async function Tn({item:V,toColumnId:ce,action:ve,reason:Oe}){fe(null),Ce(Jt(V));const Un=O;se(tn=>tn.map(gt=>Jt(gt)===Jt(V)?{...gt,status:ce,blockedReason:ce==="blocked"?Oe??gt.blockedReason:null}:gt));try{if(V.projectSlug===null){if(!ve)throw new Error("Standalone assignments require a transition action, not status override.");const gt=await fetch(`/api/assignments/${encodeURIComponent(V.id)}/transitions/${encodeURIComponent(ve.command)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Oe?{reason:Oe}:{})});if(!gt.ok)throw new Error((await gt.json()).error??`HTTP ${gt.status}`);const Ze=(await gt.json()).assignment;se(St=>St.map(Ft=>Jt(Ft)===Jt(V)?{...Ft,status:Ze.status,blockedReason:Ze.blockedReason,availableTransitions:Ze.availableTransitions,updated:Ze.updated}:Ft));return}const tn=ve?await D1(V.projectSlug,V.slug,ve,Oe):await I1(V.projectSlug,V.slug,ce);return se(gt=>gt.map(Be=>Jt(Be)===Jt(V)?{...Be,status:tn.status,blockedReason:tn.blockedReason,availableTransitions:tn.availableTransitions,updated:tn.updated}:Be)),d(),!0}catch(tn){return se(Un),fe(tn.message),!1}finally{Ce(null)}}async function Rn({item:V,toColumnId:ce}){if(V.status===ce)return;const ve=Ui(V,ce);if(ve!=null&&ve.disabled){fe(ve.disabledReason||`Cannot move this assignment to ${ce}.`);return}if(ve&&L1(ve)){_e({item:V,toColumnId:ce,action:ve});return}await Tn({item:V,toColumnId:ce,action:ve})}function re(V){X(ce=>{const ve=new Set(ce);return ve.has(V)?ve.delete(V):ve.add(V),ve})}function le(V){A===V?E(ce=>ce==="asc"?"desc":"asc"):(F(V),E("asc"))}const he=pe?O.find(V=>Jt(V)===pe)??null:null;function te(V,ce){V.dataTransfer.effectAllowed="move",V.dataTransfer.setData("text/plain",ce),xe(ce)}function ye(){xe(null),Ke(null)}function Se(V,ce){if(!he)return;const ve=Ui(he,ce);he.status===ce||ve!=null&&ve.disabled||(V.preventDefault(),V.dataTransfer.dropEffect="move",Ke(ce))}function $t(V,ce){Je===ce&&!V.currentTarget.contains(V.relatedTarget)&&Ke(null)}function en(V,ce){if(V.preventDefault(),!he||he.status===ce){ye();return}ye(),Rn({item:he,toColumnId:ce})}function Gt({field:V,children:ce}){const ve=A===V;return a.jsx("th",{className:"pb-3 font-medium",children:a.jsxs("button",{type:"button",onClick:()=>le(V),className:"inline-flex items-center gap-1 hover:text-foreground",children:[ce,ve?K==="asc"?a.jsx(Dv,{className:"h-3 w-3"}):a.jsx(na,{className:"h-3 w-3"}):null]})})}return a.jsxs("div",{className:"space-y-5",children:[a.jsx("div",{className:"flex items-center justify-end",children:a.jsxs(Ee,{to:`${t}/assignments/new`,className:"inline-flex h-9 items-center gap-2 rounded-md bg-foreground px-3 text-sm font-medium text-background transition hover:bg-foreground/90",children:[a.jsx(Bn,{className:"h-4 w-4"}),"New Assignment"]})}),a.jsxs(Lp,{children:[a.jsx(Rc,{ref:o,value:M,onChange:P,placeholder:"Search assignments or projects"}),a.jsxs("select",{value:L,onChange:V=>_(R(V.target.value)),className:"editor-input max-w-[180px]",children:[a.jsx("option",{value:"all",children:"All statuses"}),ct.map(V=>a.jsx("option",{value:V,children:v[V]??V},V))]}),a.jsxs("select",{value:J,onChange:V=>ne(V.target.value),className:"editor-input max-w-[180px]",children:[a.jsx("option",{value:"all",children:"All priorities"}),et.map(V=>a.jsx("option",{value:V,className:"capitalize",children:V},V))]}),a.jsxs("select",{value:U,onChange:V=>G(V.target.value),className:"editor-input max-w-[180px]",children:[a.jsx("option",{value:"all",children:"All assignees"}),mt.map(V=>a.jsx("option",{value:V,children:V==="__unassigned__"?"Unassigned":V},V))]}),a.jsxs("select",{value:q,onChange:V=>ee(V.target.value),className:"editor-input max-w-[180px]",children:[a.jsx("option",{value:"all",children:"All projects"}),a.jsx("option",{value:"__standalone__",children:"Standalone"}),Pt.map(([V,ce])=>a.jsx("option",{value:V,children:ce},V))]}),a.jsxs("select",{value:$,onChange:V=>I(V.target.value),className:"editor-input max-w-[180px]",children:[a.jsx("option",{value:"all",children:"All activity"}),a.jsx("option",{value:"stale",children:"Stale only"}),a.jsx("option",{value:"fresh",children:"Fresh only"})]}),a.jsx(Op,{value:T,onChange:V=>D(V),options:[{value:"table",label:"Table"},{value:"list",label:"List"},{value:"kanban",label:"Kanban"}]})]}),me?a.jsx("div",{className:"rounded-md border border-error-foreground/30 bg-error px-4 py-3 text-sm text-error-foreground",children:me}):null,i.assignments.length===0?a.jsx(Qe,{title:"No assignments yet",description:"Assignments appear here once projects contain concrete work items.",actions:a.jsxs(Ee,{className:"shell-action bg-foreground text-background hover:opacity-90",to:`${t}/projects`,children:[a.jsx(mp,{className:"h-4 w-4"}),a.jsx("span",{children:"Browse Projects"})]})}):Ge.length===0?a.jsx(Qe,{title:"No assignments match these filters",description:"Adjust the search term or filters to show assignments across all projects again."}):T==="table"?a.jsx(Te,{title:`${st.length} assignment${st.length===1?"":"s"}`,children:a.jsx("div",{className:"overflow-x-auto",children:a.jsxs("table",{className:"w-full min-w-[760px] text-left text-sm",children:[a.jsx("thead",{children:a.jsxs("tr",{className:"border-b border-border/60 text-muted-foreground",children:[a.jsx(Gt,{field:"title",children:"Assignment"}),a.jsx(Gt,{field:"status",children:"Status"}),a.jsx(Gt,{field:"priority",children:"Priority"}),a.jsx(Gt,{field:"assignee",children:"Assignee"}),a.jsx(Gt,{field:"dependencies",children:"Dependencies"}),a.jsx(Gt,{field:"updated",children:"Updated"})]})}),a.jsx("tbody",{children:st.map((V,ce)=>a.jsxs("tr",{className:"border-b border-border/50 last:border-0",...mn(ce),children:[a.jsxs("td",{className:"py-4 pr-4",children:[a.jsx(Ee,{to:V.projectSlug===null?`/assignments/${V.id}`:`${t}/projects/${V.projectSlug}/assignments/${V.slug}`,className:"font-semibold text-foreground hover:text-primary",children:V.title}),a.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:V.projectTitle??a.jsx("span",{className:"rounded bg-muted px-1.5 py-0.5 font-mono text-[10px] uppercase text-muted-foreground",children:"Standalone"})}),a.jsxs("p",{className:"mt-0.5 inline-flex items-center gap-1.5 font-mono text-xs text-muted-foreground/70",title:V.id,children:[V.id.slice(0,8),a.jsx(Hr,{value:V.id})]})]}),a.jsx("td",{className:"py-4 pr-4",children:a.jsx("select",{value:V.status,disabled:Pe===Jt(V),onChange:ve=>Rn({item:V,toColumnId:ve.target.value}),className:ze("appearance-none rounded-full border px-2.5 py-0.5 text-xs font-semibold tracking-wide outline-none","cursor-pointer bg-[length:12px] bg-[right_6px_center] bg-no-repeat pr-6",`bg-[url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor'%3E%3Cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z'/%3E%3C/svg%3E")]`,(sc[V.status]??sc.pending).className,Pe===Jt(V)&&"animate-pulse opacity-60"),children:x.map(ve=>{const Oe=V.status===ve?void 0:Ui(V,ve),Un=(Oe==null?void 0:Oe.disabled)??!1;return a.jsx("option",{value:ve,disabled:Un,title:Un?(Oe==null?void 0:Oe.disabledReason)??void 0:void 0,children:v[ve]},ve)})})}),a.jsx("td",{className:"py-4 pr-4 capitalize text-muted-foreground",children:V.priority}),a.jsx("td",{className:"py-4 pr-4 text-muted-foreground",children:V.assignee??"Unassigned"}),a.jsx("td",{className:"py-4 pr-4 text-muted-foreground",children:V.dependsOn.length}),a.jsx("td",{className:"py-4 text-muted-foreground",children:ko(V.updated)})]},Jt(V)))})]})})}):T==="list"?a.jsx("div",{className:"space-y-3",children:x.map(V=>{var gt;const ce=Ge.filter(Be=>Be.status===V);if(ce.length===0&&!he)return null;const ve=B.has(V),Oe=he?he.status!==V&&!((gt=Ui(he,V))!=null&>.disabled):!1,Un=he?he.status!==V&&!Oe:!1,tn=Je===V;return a.jsxs("div",{className:ze("rounded-lg border border-border/60 bg-card/90 transition",tn&&Oe&&"ring-2 ring-ring/30",Un&&"border-dashed opacity-65"),onDragOver:Be=>Se(Be,V),onDragLeave:Be=>$t(Be,V),onDrop:Be=>en(Be,V),children:[a.jsxs("button",{type:"button",onClick:()=>re(V),className:"flex w-full items-center gap-2 px-4 py-3 text-left",children:[a.jsx(na,{className:`h-4 w-4 text-muted-foreground transition-transform ${ve?"":"-rotate-90"}`}),a.jsx("span",{className:"font-semibold text-foreground",children:v[V]}),a.jsx("span",{className:"rounded-full border border-border/60 px-2 py-0.5 text-xs text-muted-foreground",children:ce.length})]}),ve&&ce.length>0&&a.jsx("div",{className:"space-y-3 px-4 pb-4",children:ce.map(Be=>{const Ze=Jt(Be),St=pe===Ze,Ft=Zt.get(Ze)??-1;return a.jsx("div",{draggable:!0,onDragStart:Yt=>te(Yt,Ze),onDragEnd:ye,...Ft>=0?mn(Ft):{},className:ze("cursor-grab transition active:cursor-grabbing",St&&"scale-[0.98] opacity-50"),children:a.jsx(tv,{assignment:Be,dragging:St,transitioning:Pe===Ze})},Ze)})})]},V)})}):a.jsx(ew,{columns:b,items:Ge,getItemId:Jt,getColumnId:V=>V.status,canDrop:({item:V,fromColumnId:ce,toColumnId:ve})=>{if(ce===ve)return{allowed:!0};const Oe=Ui(V,ve);return Oe!=null&&Oe.disabled?{allowed:!1,reason:Oe.disabledReason||Oe.description}:{allowed:!0,reason:Oe?Oe.warning||Oe.description:`Move to ${ve} (direct status change).`}},onMove:({item:V,toColumnId:ce})=>Rn({item:V,toColumnId:ce}),emptyMessage:V=>`No ${V.title.toLowerCase()} assignments.`,renderCard:(V,{dragging:ce})=>{const ve=Zt.get(Jt(V))??-1;return a.jsx("div",{...ve>=0?mn(ve):{},children:a.jsx(tv,{assignment:V,dragging:ce,transitioning:Pe===Jt(V)})})}}),a.jsx(C0,{open:Me!==null,action:(Me==null?void 0:Me.action)??null,assignmentTitle:(Me==null?void 0:Me.item.title)??"Assignment",loading:Pe===(Me?Jt(Me.item):null),onOpenChange:V=>{V||_e(null)},onConfirm:async V=>{if(!Me)return;const ce=Me;await Tn({item:ce.item,toColumnId:ce.toColumnId,action:ce.action,reason:V})&&_e(null)}})]})}function tv({assignment:e,dragging:t,transitioning:n}){var i;const o=At();return a.jsxs("div",{className:"rounded-lg border border-border/60 bg-background/85 p-3 shadow-sm",children:[a.jsxs("div",{className:"flex items-start justify-between gap-3",children:[a.jsxs("div",{className:"space-y-1",children:[a.jsx(Ee,{to:e.projectSlug===null?`/assignments/${e.id}`:`${o}/projects/${e.projectSlug}/assignments/${e.slug}`,className:"text-base font-semibold text-foreground hover:text-primary",children:e.title}),a.jsx("p",{className:"text-sm text-muted-foreground",children:e.projectTitle??a.jsx("span",{className:"rounded bg-muted px-1.5 py-0.5 font-mono text-[10px] uppercase text-muted-foreground",children:"Standalone"})}),a.jsxs("p",{className:"inline-flex items-center gap-1.5 font-mono text-xs text-muted-foreground/70",title:e.id??"",children:[(i=e.id)==null?void 0:i.slice(0,8),e.id&&a.jsx(Hr,{value:e.id})]})]}),a.jsx(Vt,{status:e.status})]}),e.blockedReason?a.jsx("p",{className:"mt-3 rounded-md border border-warning-foreground/30 bg-warning px-3 py-2 text-sm text-warning-foreground",children:e.blockedReason}):null,a.jsxs("div",{className:"mt-4 flex flex-wrap gap-2",children:[a.jsx("span",{className:"rounded-full border border-border/60 px-2.5 py-1 text-xs capitalize text-muted-foreground",children:e.priority}),a.jsx("span",{className:"rounded-full border border-border/60 px-2.5 py-1 text-xs text-muted-foreground",children:e.assignee??"Unassigned"}),a.jsxs("span",{className:"rounded-full border border-border/60 px-2.5 py-1 text-xs text-muted-foreground",children:[e.dependsOn.length," dependencies"]})]}),a.jsxs("div",{className:"mt-4 flex items-center justify-between gap-3 text-xs uppercase tracking-[0.08em] text-muted-foreground",children:[a.jsx("span",{children:n?"Updating":t?"Dragging":"Source-first"}),a.jsx("span",{children:ko(e.updated)})]})]})}function Ui(e,t){return e.availableTransitions.find(n=>n.targetStatus===t)}function Jt(e){return e.id||e.slug||"unknown"}function Rr(e){const t=e.match(/^---\n([\s\S]*?)\n---\n?/);if(!t)return{order:[],blocks:new Map,body:e};const n=t[1],o=e.slice(t[0].length),i=n.split(`
|
|
475
|
+
`),l=[],c=new Map;let d=null,p=[];const m=()=>{d&&(l.push(d),c.set(d,p))};for(const h of i){const x=h.match(/^([A-Za-z_][A-Za-z0-9_-]*):/);if(x&&!h.startsWith(" ")){m(),d=x[1],p=[h];continue}d&&p.push(h)}return m(),{order:l,blocks:c,body:o}}function ja(e){return`---
|
|
476
|
+
${e.order.map(n=>e.blocks.get(n)).filter(n=>!!n).flat().join(`
|
|
477
|
+
`)}
|
|
478
|
+
---
|
|
479
|
+
|
|
480
|
+
${e.body.replace(/^\n+/,"")}`}function _t(e,t){const n=e.blocks.get(t);if(!(n!=null&&n[0]))return"";const o=n[0].match(/^[^:]+:\s*(.*)$/);if(!o)return"";const i=o[1].trim();return i==="null"?"":i.startsWith('"')&&i.endsWith('"')||i.startsWith("'")&&i.endsWith("'")?i.slice(1,-1):i}function UO(e,t){return _t(e,t)==="true"}function Ji(e,t){const n=e.blocks.get(t);return n!=null&&n.length?n[0].trim().endsWith("[]")?[]:n.slice(1).map(o=>o.trim()).filter(o=>o.startsWith("- ")).map(o=>o.slice(2).trim()):[]}function HO(e){return typeof e=="boolean"?e?"true":"false":e===null||e===""?"null":/^\d{4}-\d{2}-\d{2}T/.test(e)?`"${e}"`:/[:#{}[\],&*?|>!%@`]/.test(e)||/^\s|\s$/.test(e)?`"${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`:e}function Mt(e,t,n){e.blocks.has(t)||e.order.push(t),e.blocks.set(t,[`${t}: ${HO(n)}`])}function Zi(e,t,n){if(e.blocks.has(t)||e.order.push(t),n.length===0){e.blocks.set(t,[`${t}: []`]);return}e.blocks.set(t,[`${t}:`,...n.map(o=>` - ${o}`)])}function ea(e){return e.split(",").map(t=>t.trim()).filter(Boolean)}function Gc(e){const t=Rr(e);return{title:_t(t,"title"),slug:_t(t,"slug"),workspace:_t(t,"workspace"),archived:UO(t,"archived"),archivedAt:_t(t,"archivedAt"),archivedReason:_t(t,"archivedReason"),tags:Ji(t,"tags").join(", "),body:t.body}}function WO(e,t){const n=Rr(e),o={...Gc(e),...t};return Mt(n,"title",o.title),Mt(n,"slug",o.slug),Mt(n,"workspace",o.workspace||null),Mt(n,"archived",o.archived),Mt(n,"archivedAt",o.archivedAt||null),Mt(n,"archivedReason",o.archivedReason||null),Zi(n,"tags",ea(o.tags)),n.body=o.body,ja(n)}function Yc(e){const t=Rr(e);return{title:_t(t,"title"),slug:_t(t,"slug"),status:_t(t,"status"),priority:_t(t,"priority")||"medium",assignee:_t(t,"assignee"),dependsOn:Ji(t,"dependsOn").join(", "),links:Ji(t,"links").join(", "),blockedReason:_t(t,"blockedReason"),tags:Ji(t,"tags").join(", "),body:t.body}}function VO(e,t){const n=Rr(e),o={...Yc(e),...t};return Mt(n,"title",o.title),Mt(n,"slug",o.slug),Mt(n,"status",o.status),Mt(n,"priority",o.priority),Mt(n,"assignee",o.assignee||null),Zi(n,"dependsOn",ea(o.dependsOn)),Zi(n,"links",ea(o.links)),Mt(n,"blockedReason",o.blockedReason||null),Zi(n,"tags",ea(o.tags)),n.body=o.body,ja(n)}function Xc(e){const t=Rr(e);return{assignment:_t(t,"assignment"),status:_t(t,"status"),body:t.body}}function qO(e,t){const n=Rr(e),o={...Xc(e),...t};return Mt(n,"assignment",o.assignment),Mt(n,"status",o.status),n.body=o.body,ja(n)}function Qc(e){const t=Rr(e);return{assignment:_t(t,"assignment"),body:t.body}}function KO(e,t){const n=Rr(e),o={...Qc(e),...t};return Mt(n,"assignment",o.assignment),n.body=o.body,ja(n)}function Jc(e){const t=Rr(e);return{name:_t(t,"name"),slug:_t(t,"slug"),description:_t(t,"description"),whenToUse:_t(t,"when_to_use"),tags:Ji(t,"tags").join(", "),body:t.body}}function GO(e,t){const n=Rr(e),o={...Jc(e),...t};return Mt(n,"name",o.name),Mt(n,"slug",o.slug),Mt(n,"description",o.description||null),Mt(n,"when_to_use",o.whenToUse||null),Zi(n,"tags",ea(o.tags)),n.body=o.body,ja(n)}function dt(e,t,n){switch(e){case"project":return WO(t,n);case"assignment":return VO(t,n);case"plan":return qO(t,n);case"scratchpad":return KO(t,n);case"playbook":return GO(t,n);default:return t}}function Ur(e){return e.toLowerCase().trim().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")}function wf(e){return/^[a-z0-9]+(-[a-z0-9]+)*$/.test(e)}function Zs({initialContent:e,documentType:t,mode:n="edit",onSave:o,saving:i,error:l,title:c,description:d,onCancel:p,helpTitle:m,helpBody:h,allowSlugEdit:x=!1}){const[v,b]=g.useState(e),[N,k]=g.useState(!1),[j,S]=g.useState("edit");g.useEffect(()=>{b(e)},[e]);const T=JO(t,v),R=v!==e,D=QO(t,v),M=R?"Unsaved changes":n==="create"?"Draft":"Saved";return a.jsxs("div",{className:"space-y-3",children:[a.jsxs("div",{className:"rounded-lg border border-border/70 bg-card/90 p-3 shadow-sm",children:[a.jsxs("div",{className:"flex flex-col gap-4 lg:flex-row lg:items-start lg:justify-between",children:[a.jsxs("div",{className:"space-y-2",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("h1",{className:"text-lg font-semibold text-foreground",children:c}),a.jsx("span",{className:"rounded-full border border-border/70 bg-background/80 px-2.5 py-1 text-xs font-medium text-muted-foreground",children:M})]}),d?a.jsx("p",{className:"max-w-3xl text-sm leading-6 text-muted-foreground",children:d}):null]}),a.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[a.jsxs("button",{type:"button",onClick:p,className:"shell-action",children:[a.jsx(Rv,{className:"h-4 w-4"}),a.jsx("span",{children:"Back"})]}),a.jsxs("button",{type:"button",onClick:()=>k(P=>!P),className:"shell-action",children:[a.jsx(IC,{className:"h-4 w-4"}),a.jsx("span",{children:N?"Structured":"Raw Markdown"})]}),a.jsxs("button",{type:"button",onClick:()=>o(v),disabled:i||T.length>0,className:"inline-flex items-center gap-2 rounded-md bg-foreground px-4 py-2 text-sm font-semibold text-background transition hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-50",children:[a.jsx(xp,{className:"h-4 w-4"}),a.jsx("span",{children:i?"Saving…":"Save"})]})]})]}),l?a.jsx("p",{className:"mt-4 rounded-md border border-error-foreground/30 bg-error px-4 py-3 text-sm text-error-foreground",children:l}):null,T.length>0?a.jsx("div",{className:"mt-4 rounded-md border border-warning-foreground/30 bg-warning px-4 py-3 text-sm text-warning-foreground",children:a.jsx("ul",{className:"space-y-1",children:T.map(P=>a.jsx("li",{children:P},P))})}):null]}),a.jsxs("div",{className:"flex items-center gap-2 md:hidden",children:[a.jsx("button",{type:"button",onClick:()=>S("edit"),className:`shell-action ${j==="edit"?"bg-foreground text-background":""}`,children:"Edit"}),a.jsxs("button",{type:"button",onClick:()=>S("preview"),className:`shell-action ${j==="preview"?"bg-foreground text-background":""}`,children:[a.jsx(dx,{className:"h-4 w-4"}),"Preview"]})]}),a.jsxs("div",{className:"grid gap-3 xl:grid-cols-[minmax(0,1.2fr)_minmax(320px,0.8fr)]",children:[a.jsx("div",{className:j==="preview"?"hidden md:block":"",children:a.jsx("div",{className:"surface-panel space-y-3",children:N?a.jsx("textarea",{value:v,onChange:P=>b(P.target.value),className:"min-h-[720px] w-full rounded-md border border-border/70 bg-background/90 p-4 font-mono text-sm text-foreground outline-none transition focus:border-primary focus:ring-2 focus:ring-ring/30",spellCheck:!1}):a.jsx(YO,{documentType:t,content:v,onChange:b,allowSlugEdit:x})})}),a.jsx("div",{className:j==="edit"?"hidden md:block":"",children:a.jsxs("div",{className:"surface-panel sticky top-16 space-y-4",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(dx,{className:"h-4 w-4 text-muted-foreground"}),a.jsx("h2",{className:"text-lg font-semibold text-foreground",children:"Preview"})]}),a.jsx(Wt,{content:D,emptyState:"Write markdown body content to preview it here."})]})})]})]})}function YO({documentType:e,content:t,onChange:n,allowSlugEdit:o}){if(e==="project"){const l=Gc(t);return a.jsxs("div",{className:"space-y-3",children:[a.jsxs(Hi,{children:[a.jsx(nt,{label:"Project title",children:a.jsx("input",{value:l.title,onChange:c=>{const d=c.target.value,p={title:d};o&&(l.slug===Ur(l.title)||!l.slug.trim())&&(p.slug=Ur(d)),n(dt(e,t,p))},className:"editor-input"})}),a.jsx(nt,{label:"Slug",children:a.jsxs("div",{className:"space-y-2",children:[a.jsx("input",{value:l.slug,disabled:!o,onChange:c=>n(dt(e,t,{slug:Ur(c.target.value)})),className:`editor-input ${o?"":"editor-input-disabled"}`}),a.jsx("p",{className:"text-xs leading-5 text-muted-foreground",children:o?"The slug becomes the folder name and URL. It is auto-generated from the title until you change it, and it cannot be renamed after creation.":"The slug is the folder name and URL-safe identifier. It is locked after creation so links and file paths stay stable."})]})}),a.jsx(nt,{label:"Tags",children:a.jsx("input",{value:l.tags,onChange:c=>n(dt(e,t,{tags:c.target.value})),placeholder:"Comma-separated tags",className:"editor-input"})}),a.jsx(XO,{value:l.workspace,onChange:c=>n(dt(e,t,{workspace:c}))})]}),a.jsx(nt,{label:"Project body",children:a.jsx("textarea",{value:l.body,onChange:c=>n(dt(e,t,{body:c.target.value})),className:"editor-textarea",spellCheck:!1})})]})}if(e==="assignment"){const l=Yc(t);return a.jsxs("div",{className:"space-y-3",children:[a.jsxs(Hi,{children:[a.jsx(nt,{label:"Assignment title",children:a.jsx("input",{value:l.title,onChange:c=>{const d=c.target.value,p={title:d};o&&(l.slug===Ur(l.title)||!l.slug.trim())&&(p.slug=Ur(d)),n(dt(e,t,p))},className:"editor-input"})}),a.jsx(nt,{label:"Slug",children:a.jsxs("div",{className:"space-y-2",children:[a.jsx("input",{value:l.slug,disabled:!o,onChange:c=>n(dt(e,t,{slug:Ur(c.target.value)})),className:`editor-input ${o?"":"editor-input-disabled"}`}),a.jsx("p",{className:"text-xs leading-5 text-muted-foreground",children:o?"The slug becomes the assignment folder name and URL. It is auto-generated from the title until you change it, and it cannot be renamed after creation.":"The slug is locked after creation because assignment paths and dependency references use it as a stable identifier."})]})}),a.jsx(nt,{label:"Status",children:a.jsxs("select",{value:l.status,onChange:c=>n(dt(e,t,{status:c.target.value})),className:"editor-input",children:[a.jsx("option",{value:"pending",children:"Pending"}),a.jsx("option",{value:"in_progress",children:"In Progress"}),a.jsx("option",{value:"blocked",children:"Blocked"}),a.jsx("option",{value:"review",children:"Review"}),a.jsx("option",{value:"completed",children:"Completed"}),a.jsx("option",{value:"failed",children:"Failed"})]})}),a.jsx(nt,{label:"Priority",children:a.jsxs("select",{value:l.priority,onChange:c=>n(dt(e,t,{priority:c.target.value})),className:"editor-input",children:[a.jsx("option",{value:"low",children:"Low"}),a.jsx("option",{value:"medium",children:"Medium"}),a.jsx("option",{value:"high",children:"High"}),a.jsx("option",{value:"critical",children:"Critical"})]})}),a.jsx(nt,{label:"Assignee",children:a.jsx("input",{value:l.assignee,onChange:c=>n(dt(e,t,{assignee:c.target.value})),placeholder:"Agent name",className:"editor-input"})}),a.jsx(nt,{label:"Depends on",className:"md:col-span-2",children:a.jsx("input",{value:l.dependsOn,onChange:c=>n(dt(e,t,{dependsOn:c.target.value})),placeholder:"Comma-separated assignment slugs",className:"editor-input"})}),a.jsx(nt,{label:"Links",className:"md:col-span-2",children:a.jsx("input",{value:l.links,onChange:c=>n(dt(e,t,{links:c.target.value})),placeholder:"Comma-separated: projectSlug/assignmentSlug",className:"editor-input"})}),a.jsx(nt,{label:"Blocked reason",className:"md:col-span-2",children:a.jsx("input",{value:l.blockedReason,onChange:c=>n(dt(e,t,{blockedReason:c.target.value})),placeholder:"Read-only unless the assignment is actually blocked",className:"editor-input"})}),a.jsx(nt,{label:"Tags",className:"md:col-span-2",children:a.jsx("input",{value:l.tags,onChange:c=>n(dt(e,t,{tags:c.target.value})),placeholder:"Comma-separated tags",className:"editor-input"})})]}),a.jsx(nt,{label:"Assignment body",children:a.jsx("textarea",{value:l.body,onChange:c=>n(dt(e,t,{body:c.target.value})),className:"editor-textarea",spellCheck:!1})})]})}if(e==="plan"){const l=Xc(t);return a.jsxs("div",{className:"space-y-3",children:[a.jsxs(Hi,{children:[a.jsx(nt,{label:"Assignment",children:a.jsx("input",{value:l.assignment,disabled:!0,className:"editor-input editor-input-disabled"})}),a.jsx(nt,{label:"Plan status",children:a.jsxs("select",{value:l.status,onChange:c=>n(dt(e,t,{status:c.target.value})),className:"editor-input",children:[a.jsx("option",{value:"draft",children:"Draft"}),a.jsx("option",{value:"approved",children:"Approved"}),a.jsx("option",{value:"in_progress",children:"In Progress"}),a.jsx("option",{value:"completed",children:"Completed"})]})})]}),a.jsx(nt,{label:"Plan body",children:a.jsx("textarea",{value:l.body,onChange:c=>n(dt(e,t,{body:c.target.value})),className:"editor-textarea",spellCheck:!1})})]})}if(e==="scratchpad"){const l=Qc(t);return a.jsxs("div",{className:"space-y-3",children:[a.jsx(Hi,{children:a.jsx(nt,{label:"Assignment",children:a.jsx("input",{value:l.assignment,disabled:!0,className:"editor-input editor-input-disabled"})})}),a.jsx(nt,{label:"Scratchpad body",children:a.jsx("textarea",{value:l.body,onChange:c=>n(dt(e,t,{body:c.target.value})),className:"editor-textarea",spellCheck:!1})})]})}const i=Jc(t);return a.jsxs("div",{className:"space-y-3",children:[a.jsxs(Hi,{children:[a.jsx(nt,{label:"Playbook name",children:a.jsx("input",{value:i.name,onChange:l=>{const c=l.target.value,d={name:c};o&&(i.slug===Ur(i.name)||!i.slug.trim())&&(d.slug=Ur(c)),n(dt(e,t,d))},className:"editor-input"})}),a.jsx(nt,{label:"Slug",children:a.jsxs("div",{className:"space-y-2",children:[a.jsx("input",{value:i.slug,disabled:!o,onChange:l=>n(dt(e,t,{slug:Ur(l.target.value)})),className:`editor-input ${o?"":"editor-input-disabled"}`}),a.jsx("p",{className:"text-xs leading-5 text-muted-foreground",children:o?"The slug becomes the filename. It is auto-generated from the name until you change it.":"The slug is locked after creation because it is the filename."})]})}),a.jsx(nt,{label:"Description",className:"md:col-span-2",children:a.jsx("input",{value:i.description,onChange:l=>n(dt(e,t,{description:l.target.value})),placeholder:"One-line description of what this playbook does",className:"editor-input"})}),a.jsx(nt,{label:"Tags",className:"md:col-span-2",children:a.jsx("input",{value:i.tags,onChange:l=>n(dt(e,t,{tags:l.target.value})),placeholder:"Comma-separated tags",className:"editor-input"})}),a.jsx(nt,{label:"When to use",className:"md:col-span-2",children:a.jsx("input",{value:i.whenToUse,onChange:l=>n(dt(e,t,{whenToUse:l.target.value})),placeholder:"Describe when agents should apply this playbook",className:"editor-input"})})]}),a.jsx(nt,{label:"Playbook rules",children:a.jsx("textarea",{value:i.body,onChange:l=>n(dt(e,t,{body:l.target.value})),className:"editor-textarea",spellCheck:!1})})]})}function Hi({children:e}){return a.jsx("div",{className:"grid gap-4 md:grid-cols-2",children:e})}function nt({label:e,children:t,className:n}){return a.jsxs("label",{className:`block space-y-2 ${n??""}`,children:[a.jsx("span",{className:"text-sm font-medium text-foreground",children:e}),t]})}function XO({value:e,onChange:t}){const{data:n}=wp(),o=(n==null?void 0:n.workspaces)??[];return a.jsx(nt,{label:"Workspace",children:a.jsxs("select",{value:e,onChange:i=>t(i.target.value),className:"editor-input",children:[a.jsx("option",{value:"",children:"Ungrouped"}),o.map(i=>a.jsx("option",{value:i,children:i},i))]})})}function QO(e,t){switch(e){case"project":return Gc(t).body;case"assignment":return Yc(t).body;case"plan":return Xc(t).body;case"scratchpad":return Qc(t).body;case"playbook":return Jc(t).body}}function JO(e,t){switch(e){case"project":{const n=Gc(t);return[n.title.trim()?null:"Project title is required.",n.slug.trim()?null:"Project slug is required.",n.slug.trim()&&!wf(n.slug)?"Project slug must be lowercase letters, numbers, and hyphens only.":null].filter(o=>!!o)}case"assignment":{const n=Yc(t);return[n.title.trim()?null:"Assignment title is required.",n.slug.trim()?null:"Assignment slug is required.",n.slug.trim()&&!wf(n.slug)?"Assignment slug must be lowercase letters, numbers, and hyphens only.":null].filter(o=>!!o)}case"plan":return Xc(t).assignment.trim()?[]:["Plan assignment is required."];case"scratchpad":return Qc(t).assignment.trim()?[]:["Scratchpad assignment is required."];case"playbook":{const n=Jc(t);return[n.name.trim()?null:"Playbook name is required.",n.slug.trim()?null:"Playbook slug is required.",n.slug.trim()&&!wf(n.slug)?"Playbook slug must be lowercase letters, numbers, and hyphens only.":null].filter(o=>!!o)}}}function nv(){const e=qt(),{workspace:t}=Et(),n=At(),[o,i]=g.useState(null),[l,c]=g.useState(!0),[d,p]=g.useState(!1),[m,h]=g.useState(null);g.useEffect(()=>{fetch("/api/templates/project").then(v=>v.json()).then(v=>{let b=v.content;t&&t!=="_ungrouped"&&(b=b.replace(/^(tags: \[\])$/m,`$1
|
|
481
|
+
workspace: ${t}`)),i(b),c(!1)}).catch(v=>{h(v.message),c(!1)})},[t]);async function x(v){p(!0),h(null);try{const b=await fetch("/api/projects",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:v})}),N=await b.json();if(!b.ok){h(N.error||`HTTP ${b.status}`),p(!1);return}e(`${n}/projects/${N.slug}`)}catch(b){h(b.message),p(!1);return}p(!1)}return l?a.jsx(wt,{label:"Loading project template…"}):m&&!o?a.jsx(ht,{error:m}):a.jsx(Zs,{initialContent:o||"",documentType:"project",mode:"create",onSave:x,saving:d,error:m,title:"Create Project",description:"Projects hold the high-level objective, shared context, and human-authored overview. Put execution details in assignments instead of overloading project.md.",onCancel:()=>e(`${n}/projects`),helpTitle:"Project editing rules",helpBody:"Use this form for project intent, slug, tags, and overview content. If you ever need less common metadata, raw markdown mode still exposes the full file.",allowSlugEdit:!0})}function rv(){const{slug:e}=Et(),t=At(),n=qt(),[o,i]=g.useState(null),[l,c]=g.useState(!0),[d,p]=g.useState(!1),[m,h]=g.useState(null);g.useEffect(()=>{fetch("/api/templates/assignment").then(v=>v.json()).then(v=>{i(v.content),c(!1)}).catch(v=>{h(v.message),c(!1)})},[]);async function x(v){if(!e){h("Project slug is required.");return}p(!0),h(null);try{const b=await fetch(`/api/projects/${e}/assignments`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:v})}),N=await b.json();if(!b.ok){h(N.error||`HTTP ${b.status}`),p(!1);return}n(`${t}/projects/${e}/assignments/${N.slug}`)}catch(b){h(b.message),p(!1);return}p(!1)}return l?a.jsx(wt,{label:"Loading assignment template…"}):m&&!o?a.jsx(ht,{error:m}):a.jsx(Zs,{initialContent:o||"",documentType:"assignment",mode:"create",onSave:x,saving:d,error:m,title:"Create Assignment",description:"Assignments are the execution unit. Declare dependencies here, keep status pending until work starts, and use blocked later only for runtime obstacles.",onCancel:()=>n(e?`${t}/projects/${e}`:`${t}/projects`),helpTitle:"Assignment editing rules",helpBody:"Use structured fields for priority, assignee, dependencies, and tags. Status can be changed through lifecycle actions, kanban drag, or the status override.",allowSlugEdit:!0})}function ov(){const{workspace:e}=Et(),t=At(),n=qt(),[o,i]=g.useState(null),[l,c]=g.useState(!0),[d,p]=g.useState(!1),[m,h]=g.useState(null);g.useEffect(()=>{const v=new URLSearchParams({standalone:"1"});e&&v.set("workspace",e),fetch(`/api/templates/assignment?${v.toString()}`).then(b=>b.json()).then(b=>{i(b.content),c(!1)}).catch(b=>{h(b.message),c(!1)})},[e]);async function x(v){var b;p(!0),h(null);try{const N=await fetch("/api/assignments",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:v})}),k=await N.json();if(!N.ok){h(k.error||`HTTP ${N.status}`),p(!1);return}const j=(b=k==null?void 0:k.assignment)==null?void 0:b.id;if(!j){h("Server did not return the new assignment id."),p(!1);return}n(`/assignments/${j}`)}catch(N){h(N.message),p(!1);return}p(!1)}return l?a.jsx(wt,{label:"Loading assignment template…"}):m&&!o?a.jsx(ht,{error:m}):a.jsx(Zs,{initialContent:o||"",documentType:"assignment",mode:"create",onSave:x,saving:d,error:m,title:"Create Standalone Assignment",description:e?`Standalone assignments live outside any project. This one will be tagged with workspaceGroup: ${e} so it appears in this workspace's views.`:"Standalone assignments live outside any project. Add a workspaceGroup to make them appear in workspace-filtered views.",onCancel:()=>n(`${t}/assignments`),helpTitle:"Standalone assignment editing rules",helpBody:"No project field is needed (it must remain null). Use workspaceGroup to group with other workspace work. Status, priority, and tags work the same as project-nested assignments.",allowSlugEdit:!0})}function Zc({loadUrl:e,saveUrl:t,redirectTo:n,title:o,description:i,documentType:l,helpTitle:c,helpBody:d}){const p=qt(),{data:m,loading:h,error:x}=cb(e),[v,b]=g.useState(!1),[N,k]=g.useState(null);async function j(S){b(!0),k(null);try{const T=await fetch(t,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:S})}),R=await T.json();if(!T.ok){k(R.error||`HTTP ${T.status}`),b(!1);return}p(n)}catch(T){k(T.message),b(!1);return}b(!1)}return h?a.jsx(wt,{label:`Loading ${o.toLowerCase()}…`}):x||!m?a.jsx(ht,{error:x||`${o} is unavailable.`}):a.jsx(Zs,{initialContent:m.content,documentType:l,onSave:j,saving:v,error:N,title:o,description:i,onCancel:()=>p(n),helpTitle:c,helpBody:d})}function sv(){const{slug:e}=Et(),t=At(),n=e??"";return a.jsx(Zc,{loadUrl:`/api/projects/${n}/edit`,saveUrl:`/api/projects/${n}`,redirectTo:`${t}/projects/${n}`,title:"Edit Project",description:"Project edits change the human-authored source document. The structured form stays focused on title, slug, tags, and overview content.",documentType:"project",helpTitle:"Editable vs derived project fields",helpBody:"Project status remains derived from assignment state. If you need less common frontmatter fields, switch to raw markdown mode instead of expanding the structured form."})}function kf(){const{slug:e,aslug:t,id:n}=Et(),o=At(),i=!!n,l=i?`/api/assignments/${n}/edit`:`/api/projects/${e}/assignments/${t}/edit`,c=i?`/api/assignments/${n}`:`/api/projects/${e}/assignments/${t}`,d=i?`/assignments/${n}`:`${o}/projects/${e}/assignments/${t}`;return a.jsx(Zc,{loadUrl:l,saveUrl:c,redirectTo:d,title:"Edit Assignment",description:"Edit assignment fields including status, priority, assignee, dependencies, and body.",documentType:"assignment",helpTitle:"Assignment editing",helpBody:"All fields are editable. Status can also be changed through lifecycle actions or kanban drag."})}function jf(){const{slug:e,aslug:t,id:n}=Et(),o=At(),i=!!n,l=i?`/api/assignments/${n}/plan/edit`:`/api/projects/${e}/assignments/${t}/plan/edit`,c=i?`/api/assignments/${n}/plan`:`/api/projects/${e}/assignments/${t}/plan`,d=i?`/assignments/${n}?tab=plan`:`${o}/projects/${e}/assignments/${t}?tab=plan`;return a.jsx(Zc,{loadUrl:l,saveUrl:c,redirectTo:d,title:"Edit Plan",description:"Plans are separate from assignment status, so keep implementation steps here instead of overloading the assignment body.",documentType:"plan",helpTitle:"Plan status is separate",helpBody:"Plan status tracks the plan document itself. It does not replace the assignment lifecycle state."})}function Sf(){const{slug:e,aslug:t,id:n}=Et(),o=At(),i=!!n,l=i?`/api/assignments/${n}/scratchpad/edit`:`/api/projects/${e}/assignments/${t}/scratchpad/edit`,c=i?`/api/assignments/${n}/scratchpad`:`/api/projects/${e}/assignments/${t}/scratchpad`,d=i?`/assignments/${n}?tab=scratchpad`:`${o}/projects/${e}/assignments/${t}?tab=scratchpad`;return a.jsx(Zc,{loadUrl:l,saveUrl:c,redirectTo:d,title:"Edit Scratchpad",description:"Scratchpad is the assignment’s working memory surface for notes, experiments, and temporary context.",documentType:"scratchpad",helpTitle:"Scratchpad usage",helpBody:"Scratchpad is for transient notes. Keep canonical objective and lifecycle data in assignment.md and any active plan files (plan.md, plan-v2.md, ...)."})}function M1({loadUrl:e,saveUrl:t,redirectTo:n,title:o,description:i,helpTitle:l,helpBody:c}){const d=qt(),{data:p,loading:m,error:h}=cb(e),[x,v]=g.useState(""),[b,N]=g.useState(""),[k,j]=g.useState(!1),[S,T]=g.useState(null);async function R(){j(!0),T(null);try{const D=await fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:x,body:b})}),M=await D.json();if(!D.ok){T(M.error||`HTTP ${D.status}`),j(!1);return}d(n)}catch(D){T(D.message),j(!1);return}j(!1)}return m?a.jsx(wt,{label:`Loading ${o.toLowerCase()}…`}):h||!p?a.jsx(ht,{error:h||`${o} is unavailable.`}):a.jsxs("div",{className:"space-y-4",children:[a.jsx(Te,{title:o,description:i,children:a.jsxs("div",{className:"space-y-4",children:[a.jsxs("label",{className:"block space-y-2",children:[a.jsx("span",{className:"text-sm font-medium text-foreground",children:"Entry title"}),a.jsx("input",{value:x,onChange:D=>v(D.target.value),placeholder:"Optional title",className:"editor-input"})]}),a.jsxs("label",{className:"block space-y-2",children:[a.jsx("span",{className:"text-sm font-medium text-foreground",children:"Entry body"}),a.jsx("textarea",{value:b,onChange:D=>N(D.target.value),className:"editor-textarea",spellCheck:!1})]}),S?a.jsx("p",{className:"rounded-md border border-error-foreground/30 bg-error px-4 py-3 text-sm text-error-foreground",children:S}):null,a.jsxs("div",{className:"flex flex-wrap gap-2",children:[a.jsx("button",{type:"button",onClick:()=>d(n),className:"shell-action",children:"Cancel"}),a.jsx("button",{type:"button",onClick:R,disabled:k||!b.trim(),className:"shell-action bg-foreground text-background hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-50",children:k?"Appending…":"Append Entry"})]})]})}),a.jsx(Te,{title:"Current Document",children:a.jsx(Wt,{content:p.content.replace(/^---[\s\S]*?---\n?/,""),emptyState:"No existing content."})})]})}function Cf(){const{slug:e,aslug:t,id:n}=Et(),o=At(),i=!!n,l=i?`/api/assignments/${n}/handoff/edit`:`/api/projects/${e}/assignments/${t}/handoff/edit`,c=i?`/api/assignments/${n}/handoff/entries`:`/api/projects/${e}/assignments/${t}/handoff/entries`,d=i?`/assignments/${n}?tab=handoff`:`${o}/projects/${e}/assignments/${t}?tab=handoff`;return a.jsx(M1,{loadUrl:l,saveUrl:c,redirectTo:d,title:"Append Handoff Entry",description:"Add a new handoff without rewriting previous history.",helpTitle:"Append-only handoff history",helpBody:"Handoff log entries preserve the baton-passing trail between sessions and agents. Add a new entry instead of editing older ones."})}function Nf(){const{slug:e,aslug:t,id:n}=Et(),o=At(),i=!!n,l=i?`/api/assignments/${n}/decision-record/edit`:`/api/projects/${e}/assignments/${t}/decision-record/edit`,c=i?`/api/assignments/${n}/decision-record/entries`:`/api/projects/${e}/assignments/${t}/decision-record/entries`,d=i?`/assignments/${n}?tab=decisions`:`${o}/projects/${e}/assignments/${t}?tab=decisions`;return a.jsx(M1,{loadUrl:l,saveUrl:c,redirectTo:d,title:"Append Decision Entry",description:"Record a new decision and rationale without editing prior entries.",helpTitle:"Append-only decision history",helpBody:"Decision records should accumulate over time so the implementation rationale remains auditable and reviewable."})}function iv(){const{workspace:e}=Et(),{data:t}=Sc(),{data:n,loading:o,error:i,refetch:l}=kp(),[c,d]=g.useState(!1),[p,m]=g.useState(""),[h,x]=g.useState(!1),v=pn();g.useEffect(()=>{const T=v.hash.match(/^#server-(.+)/);if(!T)return;const R=decodeURIComponent(T[1]),D=document.querySelector(`[data-server-name="${window.CSS.escape(R)}"]`);if(!D)return;D.scrollIntoView({block:"nearest"}),D.classList.add("ring-2","ring-primary/60");const M=window.setTimeout(()=>D.classList.remove("ring-2","ring-primary/60"),1500);return()=>window.clearTimeout(M)},[v.hash,n]);const b=(()=>{if(!e||!n)return(n==null?void 0:n.sessions)??[];if(!t)return[];const T=new Set(t.filter(R=>e==="_ungrouped"?R.workspace===null:R.workspace===e).map(R=>R.slug));return n.sessions.filter(R=>R.windows.some(D=>D.panes.some(M=>M.assignment&&M.assignment.project!==null&&T.has(M.assignment.project))))})();async function N(T){if(T.preventDefault(),!!p.trim())try{await fetch("/api/servers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:p.trim()})}),m(""),d(!1),l()}catch{}}async function k(){x(!0);try{await fetch("/api/servers/refresh",{method:"POST"}),l()}finally{x(!1)}}async function j(T){await fetch(`/api/servers/${encodeURIComponent(T)}`,{method:"DELETE"}),l()}async function S(T){await fetch(`/api/servers/${encodeURIComponent(T)}/refresh`,{method:"POST"}),l()}return o?a.jsx(wt,{label:"Loading servers…"}):i?a.jsx(ht,{error:i}):n?n.tmuxAvailable?a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[c?a.jsxs("form",{onSubmit:N,className:"flex items-center gap-2",children:[a.jsx("input",{type:"text",value:p,onChange:T=>m(T.target.value),placeholder:"tmux session name",className:"editor-input text-sm",autoFocus:!0}),a.jsx("button",{type:"submit",className:"shell-action",children:"Add"}),a.jsx("button",{type:"button",className:"shell-action",onClick:()=>d(!1),children:"Cancel"})]}):a.jsxs("button",{className:"shell-action",onClick:()=>d(!0),children:[a.jsx(Bn,{className:"h-3.5 w-3.5"}),"Track Session"]}),a.jsxs("button",{className:"shell-action",onClick:k,disabled:h,children:[a.jsx($v,{className:`h-3.5 w-3.5 ${h?"animate-spin":""}`}),"Refresh All"]})]}),b.length===0?a.jsx(Qe,{title:"No sessions tracked",description:"Register a tmux session to start tracking your dev servers."}):a.jsx("div",{className:"mt-4 space-y-4",children:b.map(T=>a.jsx(ZO,{session:T,onRefresh:()=>S(T.name),onRemove:()=>j(T.name),onRefetch:l},T.name))})]}):a.jsx(a.Fragment,{children:a.jsxs("div",{className:"surface-panel mt-4 flex flex-col items-center gap-3 py-12 text-center",children:[a.jsx(eN,{className:"h-10 w-10 text-muted-foreground/40"}),a.jsx("p",{className:"text-sm font-medium text-foreground",children:"tmux is not installed"}),a.jsxs("p",{className:"max-w-md text-sm text-muted-foreground",children:["Server tracking requires tmux. Install it with ",a.jsx("code",{className:"rounded bg-muted px-1.5 py-0.5 text-xs",children:"brew install tmux"})," to get started."]})]})}):null}function ZO({session:e,onRefresh:t,onRemove:n,onRefetch:o}){return a.jsxs("div",{className:"surface-panel","data-server-name":e.name,children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx(gp,{className:"h-4 w-4 text-muted-foreground"}),a.jsx("span",{className:"text-sm font-semibold text-foreground",children:e.name}),a.jsx("span",{className:`inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium ${e.alive?"border border-success-foreground/30 bg-success text-success-foreground":"border border-error-foreground/30 bg-error text-error-foreground"}`,children:e.alive?"alive":"dead"}),a.jsxs("span",{className:"text-xs text-muted-foreground",children:["Last refreshed: ",new Date(e.lastRefreshed).toLocaleString()]})]}),a.jsxs("div",{className:"flex items-center gap-1",children:[a.jsx("button",{className:"shell-action",onClick:t,title:"Refresh",children:a.jsx($v,{className:"h-3.5 w-3.5"})}),a.jsx("button",{className:"shell-action",onClick:n,title:"Remove",children:a.jsx(Eo,{className:"h-3.5 w-3.5"})})]})]}),e.alive&&e.windows.length>0&&a.jsx("div",{className:"mt-3 space-y-3",children:e.windows.map(i=>a.jsxs("div",{children:[a.jsxs("p",{className:"mb-1.5 text-xs font-medium uppercase tracking-wider text-muted-foreground",children:["Window ",i.index,": ",i.name]}),a.jsx("div",{className:"space-y-1.5",children:i.panes.map(l=>a.jsx(e_,{pane:l,sessionName:e.name,windowIndex:i.index,onRefetch:o},`${i.index}:${l.index}`))})]},i.index))}),!e.alive&&a.jsxs("div",{className:"mt-3 flex items-center gap-2 text-sm text-muted-foreground",children:[a.jsx(XC,{className:"h-4 w-4"}),a.jsx("span",{children:e.kind==="process"?"Process no longer running":"Session no longer exists"})]})]})}function e_({pane:e,sessionName:t,windowIndex:n,onRefetch:o}){const i=At(),l=e.cwd.replace(/^\/Users\/[^/]+/,"~");return a.jsxs("div",{className:"flex items-center gap-3 rounded-md border border-border/40 bg-background/60 px-3 py-2 text-sm",children:[a.jsxs("span",{className:"shrink-0 font-mono text-xs text-muted-foreground/60",children:[":",e.index]}),a.jsx("span",{className:"shrink-0 rounded bg-muted/60 px-1.5 py-0.5 font-mono text-xs",children:e.command}),a.jsxs("span",{className:"inline-flex min-w-0 items-center gap-1.5 text-xs text-muted-foreground",children:[a.jsx("span",{className:"truncate",title:e.cwd,children:l}),a.jsx(Hr,{value:e.cwd})]}),e.branch&&a.jsxs("span",{className:"flex shrink-0 items-center gap-1 text-xs text-muted-foreground",children:[a.jsx(Lv,{className:"h-3 w-3"}),e.branch,e.worktree&&a.jsx("span",{className:"rounded bg-status-in-progress px-1 py-0.5 text-[10px] font-medium text-status-in-progress-foreground",children:"worktree"})]}),e.ports.length>0&&a.jsx("div",{className:"flex shrink-0 items-center gap-1.5",children:e.urls.map(c=>a.jsxs("a",{href:c,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 rounded border border-primary/30 bg-primary/5 px-1.5 py-0.5 text-xs font-medium text-primary hover:bg-primary/10 dark:border-primary/40 dark:bg-primary/10 dark:hover:bg-primary/20",children:[c.replace("http://localhost:",":"),a.jsx(Iv,{className:"h-2.5 w-2.5"})]},c))}),a.jsx("div",{className:"ml-auto shrink-0",children:e.assignment?a.jsxs(Ee,{to:e.assignment.project===null?`/assignments/${e.assignment.slug}`:`${i}/projects/${e.assignment.project}/assignments/${e.assignment.slug}`,className:"inline-flex items-center gap-1 rounded border border-primary/30 bg-primary/10 px-1.5 py-0.5 text-xs font-medium text-primary hover:bg-primary/20",children:[a.jsx(BC,{className:"h-2.5 w-2.5"}),e.assignment.title,e.assignment.project===null?a.jsx("span",{className:"ml-1 rounded bg-muted px-1 py-0.5 text-[9px] uppercase tracking-wide text-muted-foreground",children:"Standalone"}):null]}):a.jsx("span",{className:"text-xs text-muted-foreground/40",children:"unlinked"})})]})}function av(){const{workspace:e}=Et(),{data:t}=Sc(),{data:n,loading:o,error:i}=XN(),[l,c]=g.useState(""),[d,p]=g.useState(""),[m,h]=g.useState(""),[x,v]=g.useState("started_desc"),[b,N]=g.useState(0),[k,j]=g.useState(new Set),[S,T]=g.useState(!1),[R,D]=g.useState(null),[M,P]=g.useState(null),L=(n==null?void 0:n.sessions.some(q=>q.status==="active"))??!1;g.useEffect(()=>{if(!L)return;const q=window.setInterval(()=>N(ee=>ee+1),3e4);return()=>window.clearInterval(q)},[L]),g.useEffect(()=>{j(q=>{if(q.size===0)return q;const ee=new Set((n==null?void 0:n.sessions.map(I=>I.sessionId))??[]),$=new Set([...q].filter(I=>ee.has(I)));return $.size===q.size?q:$})},[n]);const _=g.useMemo(()=>{if(!n)return[];if(e&&!t)return[];const q=l.trim().toLowerCase();return[...n.sessions.filter($=>{var F;if(e&&t){const K=((F=t.find(E=>E.slug===$.projectSlug))==null?void 0:F.workspace)??null;if(e==="_ungrouped"){if(K!==null)return!1}else if(K!==e)return!1}const I=n_($.started);return d&&(!I||I<d)||m&&(!I||I>m)?!1:q?[$.projectSlug??"",$.assignmentSlug??"",$.agent,$.sessionId,$.path,$.description??"",$.transcriptPath??""].join(" ").toLowerCase().includes(q):!0})].sort(($,I)=>r_($,I,x))},[n,l,x,d,m,b,e,t]);function J(q){j(ee=>{const $=new Set(ee);return $.has(q)?$.delete(q):$.add(q),$})}function ne(){k.size===_.length&&_.length>0?j(new Set):j(new Set(_.map(q=>q.sessionId)))}async function U(q){D(null),T(!0);try{const ee=await fetch("/api/agent-sessions",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionIds:q})}),$=await ee.json().catch(()=>null);if(!ee.ok)throw new Error(($==null?void 0:$.error)||`HTTP ${ee.status}`);j(I=>new Set([...I].filter(A=>!q.includes(A)))),P(null)}catch(ee){D(ee.message)}finally{T(!1)}}if(o)return a.jsx(wt,{label:"Loading agent sessions..."});if(i)return a.jsx(ht,{error:i});if(!n)return null;const G=n.sessions.length>0;return a.jsxs(a.Fragment,{children:[a.jsxs(Lp,{children:[a.jsx(Rc,{value:l,onChange:c,placeholder:"Search project, assignment, agent, session ID, path, or description"}),a.jsxs("label",{className:"flex min-w-[150px] flex-col gap-1 text-xs font-medium uppercase tracking-[0.08em] text-muted-foreground",children:["Started From",a.jsx("input",{type:"date",value:d,onChange:q=>p(q.target.value),className:"editor-input min-w-[150px]"})]}),a.jsxs("label",{className:"flex min-w-[150px] flex-col gap-1 text-xs font-medium uppercase tracking-[0.08em] text-muted-foreground",children:["Started To",a.jsx("input",{type:"date",value:m,onChange:q=>h(q.target.value),className:"editor-input min-w-[150px]"})]}),a.jsxs("select",{value:x,onChange:q=>v(q.target.value),className:"editor-input max-w-[200px]",children:[a.jsx("option",{value:"started_desc",children:"Newest first"}),a.jsx("option",{value:"started_asc",children:"Oldest first"}),a.jsx("option",{value:"assignment_asc",children:"Assignment A-Z"}),a.jsx("option",{value:"agent_asc",children:"Agent A-Z"})]})]}),R?a.jsx("div",{className:"mt-4 rounded-md border border-error-foreground/30 bg-error px-4 py-3 text-sm text-error-foreground",children:R}):null,k.size>0&&a.jsxs("div",{className:"mt-4 flex items-center gap-3 rounded border border-border/40 bg-muted/30 px-4 py-2 text-sm",children:[a.jsxs("span",{className:"text-muted-foreground",children:[k.size," session",k.size!==1?"s":""," selected"]}),a.jsxs("button",{className:"shell-action text-destructive",onClick:()=>P({sessionIds:[...k],title:`Delete ${k.size} selected session${k.size===1?"":"s"}?`,description:"This removes the selected agent session records from the dashboard. This cannot be undone.",confirmLabel:k.size===1?"Delete Session":"Delete Sessions"}),disabled:S,children:[a.jsx(Eo,{className:"mr-1 inline h-3.5 w-3.5"}),"Delete Selected"]}),a.jsx("button",{className:"shell-action",onClick:()=>j(new Set),children:"Clear Selection"})]}),G?_.length===0?a.jsx(Qe,{title:"No agent sessions match these filters",description:"Adjust the status, search term, date range, or sorting controls to show sessions again."}):a.jsx("div",{className:"surface-panel mt-4 overflow-x-auto",children:a.jsxs("table",{className:"w-full min-w-[1040px] text-sm",children:[a.jsx("thead",{children:a.jsxs("tr",{className:"border-b border-border/40 text-left text-xs uppercase tracking-wider text-muted-foreground",children:[a.jsx("th",{className:"w-8 pb-2 pr-3",children:a.jsx("button",{onClick:ne,className:"text-muted-foreground hover:text-foreground",children:k.size===_.length&&_.length>0?a.jsx(Fn,{className:"h-4 w-4"}):a.jsx(Fv,{className:"h-4 w-4"})})}),a.jsx("th",{className:"pb-2 pr-3",children:"Project"}),a.jsx("th",{className:"pb-2 pr-3",children:"Assignment"}),a.jsx("th",{className:"pb-2 pr-3",children:"Description"}),a.jsx("th",{className:"pb-2 pr-3",children:"Agent"}),a.jsx("th",{className:"pb-2 pr-3",children:"Session ID"}),a.jsx("th",{className:"pb-2 pr-3",children:"Started"}),a.jsx("th",{className:"pb-2 pr-3",children:"Path"}),a.jsx("th",{className:"pb-2 pr-3",children:"Transcript"}),a.jsx("th",{className:"w-8 pb-2"})]})}),a.jsx("tbody",{children:_.map(q=>a.jsx(t_,{session:q,selected:k.has(q.sessionId),onToggle:()=>J(q.sessionId),onDelete:()=>P({sessionIds:[q.sessionId],title:`Delete session ${q.sessionId.slice(0,8)}...?`,description:`Remove this ${q.agent} session record${q.assignmentSlug?` for ${q.assignmentSlug}`:""}. This cannot be undone.`,confirmLabel:"Delete Session"})},q.sessionId))})]})}):a.jsx(Qe,{title:"No agent sessions",description:"No agent sessions have been registered yet. Use /grab-assignment or syntaur track-session to register one."}),a.jsx(X0,{open:M!==null,title:(M==null?void 0:M.title)??"Delete session?",description:(M==null?void 0:M.description)??"",confirmLabel:(M==null?void 0:M.confirmLabel)??"Delete",destructive:!0,loading:S,onOpenChange:q=>{q||P(null)},onConfirm:async()=>{M&&await U(M.sessionIds)}})]})}function t_({session:e,selected:t,onToggle:n,onDelete:o}){const i=At(),l=e.sessionId.length>12?e.sessionId.slice(0,8)+"...":e.sessionId,c=e.path?e.path.replace(/^\/Users\/[^/]+/,"~"):"—",d=e.transcriptPath?e.transcriptPath.replace(/^\/Users\/[^/]+/,"~"):"—";return a.jsxs("tr",{className:"border-b border-border/20 last:border-0",children:[a.jsx("td",{className:"py-2 pr-3",children:a.jsx("button",{onClick:n,className:"text-muted-foreground hover:text-foreground",children:t?a.jsx(Fn,{className:"h-4 w-4"}):a.jsx(Fv,{className:"h-4 w-4"})})}),a.jsx("td",{className:"py-2 pr-3",children:e.projectSlug?a.jsx(Ee,{to:`${i}/projects/${e.projectSlug}`,className:"text-primary hover:underline",children:Cn(e.projectSlug)}):e.assignmentSlug?a.jsx("span",{className:"rounded bg-muted px-1.5 py-0.5 text-[10px] font-mono uppercase tracking-wide text-muted-foreground",children:"Standalone"}):a.jsx("span",{className:"text-muted-foreground",children:"—"})}),a.jsx("td",{className:"py-2 pr-3",children:e.projectSlug&&e.assignmentSlug?a.jsx(Ee,{to:`${i}/projects/${e.projectSlug}/assignments/${e.assignmentSlug}`,className:"text-primary hover:underline",children:Cn(e.assignmentSlug)}):e.assignmentSlug?a.jsx(Ee,{to:`/assignments/${e.assignmentSlug}`,className:"text-primary hover:underline font-mono",children:e.assignmentSlug}):a.jsx("span",{className:"text-muted-foreground",children:"—"})}),a.jsx("td",{className:"max-w-[200px] py-2 pr-3",children:e.description?a.jsx("span",{className:"truncate text-xs text-muted-foreground",title:e.description,children:e.description.length>60?e.description.slice(0,57)+"...":e.description}):a.jsx("span",{className:"text-muted-foreground",children:"—"})}),a.jsx("td",{className:"py-2 pr-3",children:a.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[a.jsx(wc,{className:"h-3 w-3 text-muted-foreground"}),e.agent]})}),a.jsx("td",{className:"py-2 pr-3",children:a.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[a.jsx("span",{className:"font-mono text-xs text-muted-foreground",title:e.sessionId,children:l}),a.jsx(Hr,{value:e.sessionId})]})}),a.jsx("td",{className:"py-2 pr-3 text-xs text-muted-foreground",children:Cr(e.started)}),a.jsx("td",{className:"max-w-[240px] py-2 pr-3",children:a.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[a.jsx("span",{className:"truncate text-xs text-muted-foreground",title:e.path,children:c}),e.path&&a.jsx(Hr,{value:e.path})]})}),a.jsx("td",{className:"max-w-[260px] py-2 pr-3",children:e.transcriptPath?a.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[a.jsx("span",{className:"truncate font-mono text-xs text-muted-foreground",title:e.transcriptPath,children:d}),a.jsx(Hr,{value:e.transcriptPath})]}):a.jsx("span",{className:"text-muted-foreground",children:"—"})}),a.jsx("td",{className:"py-2",children:a.jsx("button",{onClick:o,className:"text-muted-foreground hover:text-destructive",title:"Delete session",children:a.jsx(Eo,{className:"h-3.5 w-3.5"})})})]})}function n_(e){const t=new Date(e);if(Number.isNaN(t.getTime()))return null;const n=t.getFullYear(),o=String(t.getMonth()+1).padStart(2,"0"),i=String(t.getDate()).padStart(2,"0");return`${n}-${o}-${i}`}function Hl(e){const t=Date.parse(e.started),n=e.ended?Date.parse(e.ended):Date.now();return Number.isNaN(t)||Number.isNaN(n)?0:Math.max(0,Math.floor((n-t)/6e4))}function r_(e,t,n){switch(n){case"started_asc":return e.started.localeCompare(t.started);case"started_desc":return t.started.localeCompare(e.started);case"duration_asc":return Hl(e)-Hl(t);case"duration_desc":return Hl(t)-Hl(e);case"assignment_asc":return(e.assignmentSlug??"").localeCompare(t.assignmentSlug??"")||(e.projectSlug??"").localeCompare(t.projectSlug??"");case"agent_asc":return e.agent.localeCompare(t.agent)||(e.assignmentSlug??"").localeCompare(t.assignmentSlug??"");default:return 0}}function o_(){const{data:e,loading:t,error:n,refetch:o}=ub(),[i,l]=g.useState(""),[c,d]=g.useState(null),p=g.useMemo(()=>{if(!(e!=null&&e.playbooks))return[];if(!i.trim())return e.playbooks;const h=i.toLowerCase();return e.playbooks.filter(x=>x.name.toLowerCase().includes(h)||x.description.toLowerCase().includes(h)||x.slug.toLowerCase().includes(h)||x.tags.some(v=>v.toLowerCase().includes(h)))},[e,i]);async function m(h,x,v){if(h.preventDefault(),h.stopPropagation(),!c){d(x);try{const b=v?"disable":"enable",N=await fetch(`/api/playbooks/${encodeURIComponent(x)}/${b}`,{method:"POST"});if(!N.ok){const k=await N.json().catch(()=>({}));throw new Error(k.error||`Failed to ${b} playbook`)}o()}catch(b){console.error(b),alert(b instanceof Error?b.message:"Failed to update playbook")}finally{d(null)}}}return t?a.jsx(wt,{label:"Loading playbooks..."}):n?a.jsx(ht,{error:n}):a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{className:"flex items-center justify-between gap-4",children:[a.jsxs("div",{className:"relative flex-1 max-w-sm",children:[a.jsx(Hs,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),a.jsx("input",{type:"text",placeholder:"Search playbooks...",value:i,onChange:h=>l(h.target.value),className:"h-9 w-full rounded-md border border-border/70 bg-background pl-9 pr-3 text-sm text-foreground placeholder:text-muted-foreground/60 focus:border-foreground/30 focus:outline-none"})]}),a.jsxs(Ee,{to:"/playbooks/create",className:"inline-flex h-9 items-center gap-2 rounded-md bg-foreground px-3 text-sm font-medium text-background transition hover:bg-foreground/90",children:[a.jsx(Bn,{className:"h-4 w-4"}),"Create Playbook"]})]}),a.jsxs(Ee,{to:"/playbooks/manifest",className:"surface-panel group flex items-center gap-3 p-3 transition hover:border-foreground/20",children:[a.jsx(OC,{className:"h-5 w-5 shrink-0 text-muted-foreground"}),a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("h3",{className:"text-sm font-semibold text-foreground group-hover:underline",children:"Playbook Manifest"}),a.jsx("span",{className:"rounded-full border border-border/60 bg-muted/50 px-2 py-0.5 text-[10px] text-muted-foreground",children:"auto-generated"})]}),a.jsxs("p",{className:"mt-0.5 text-xs text-muted-foreground",children:["Index of all playbooks with descriptions. Include ",a.jsx("code",{className:"rounded bg-muted px-1 py-0.5 text-[11px]",children:"~/.syntaur/playbooks/manifest.md"})," in your CLAUDE.md for agent context."]})]})]}),p.length===0?a.jsx(Qe,{title:"No playbooks found",description:(e==null?void 0:e.playbooks.length)===0?"Playbooks define rules and workflows for how agents should operate. Create your first one to get started.":"No playbooks match your search.",actions:(e==null?void 0:e.playbooks.length)===0?a.jsxs(Ee,{to:"/playbooks/create",className:"inline-flex items-center gap-2 rounded-md bg-foreground px-3 py-2 text-sm font-medium text-background transition hover:bg-foreground/90",children:[a.jsx(Bn,{className:"h-4 w-4"}),"Create Playbook"]}):void 0}):a.jsx("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3",children:p.map(h=>{const x=c===h.slug;return a.jsxs("div",{className:`surface-panel relative flex flex-col gap-2 p-4 transition hover:border-foreground/20 ${h.enabled?"":"opacity-75"}`,children:[a.jsxs(Ee,{to:`/playbooks/${h.slug}`,className:"group flex flex-col gap-2",children:[a.jsxs("div",{className:"flex items-start gap-2",children:[a.jsx(Av,{className:"mt-0.5 h-4 w-4 shrink-0 text-muted-foreground"}),a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsx("h3",{className:"text-sm font-semibold text-foreground group-hover:underline",children:h.name}),h.description?a.jsx("p",{className:"mt-1 text-xs leading-5 text-muted-foreground line-clamp-2",children:h.description}):null]})]}),a.jsx("div",{className:"flex items-center gap-2 pt-1 pr-20",children:a.jsxs("div",{className:"flex flex-wrap gap-1",children:[h.tags.slice(0,3).map(v=>a.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full border border-border/60 bg-muted/50 px-2 py-0.5 text-[10px] text-muted-foreground",children:[a.jsx(zv,{className:"h-2.5 w-2.5"}),v]},v)),h.tags.length>3?a.jsxs("span",{className:"text-[10px] text-muted-foreground/60",children:["+",h.tags.length-3]}):null]})})]}),a.jsx("button",{type:"button",role:"switch","aria-checked":h.enabled,"aria-label":h.enabled?"Disable playbook":"Enable playbook",onClick:v=>m(v,h.slug,h.enabled),disabled:x,className:`absolute bottom-3 right-3 z-10 inline-flex h-5 w-9 items-center rounded-full border opacity-100 transition disabled:opacity-50 ${h.enabled?"border-status-completed-foreground/60 bg-status-completed-foreground/80":"border-foreground/40 bg-foreground/15"}`,children:a.jsx("span",{className:`block h-4 w-4 rounded-full shadow-sm transition-transform ${h.enabled?"translate-x-[18px] bg-background":"translate-x-[2px] bg-foreground/70"}`})})]},h.slug)})})]})}function s_(){const{slug:e}=Et(),t=qt(),{data:n,loading:o,error:i,refetch:l}=JN(e),[c,d]=g.useState(!1),[p,m]=g.useState(!1),[h,x]=g.useState(!1),v=e==="manifest";async function b(){if(e){m(!0);try{(await fetch(`/api/playbooks/${e}`,{method:"DELETE"})).ok&&t("/playbooks")}finally{m(!1)}}}async function N(){if(!(!e||!n)){x(!0);try{const k=n.enabled?"disable":"enable",j=await fetch(`/api/playbooks/${encodeURIComponent(e)}/${k}`,{method:"POST"});if(!j.ok){const S=await j.json().catch(()=>({}));throw new Error(S.error||`Failed to ${k} playbook`)}l()}catch(k){console.error(k),alert(k instanceof Error?k.message:"Failed to update playbook")}finally{x(!1)}}}return o?a.jsx(wt,{label:"Loading playbook..."}):i?a.jsx(ht,{error:i}):n?a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{className:"flex items-start justify-between gap-4",children:[a.jsxs("div",{className:"min-w-0",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("h2",{className:"text-lg font-semibold text-foreground",children:v?"Playbook Manifest":n.name}),v?a.jsx("span",{className:"rounded-full border border-border/60 bg-muted/50 px-2 py-0.5 text-xs text-muted-foreground",children:"auto-generated"}):null]}),!v&&n.description?a.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:n.description}):null,v?a.jsxs("p",{className:"mt-1 text-sm text-muted-foreground",children:["This file is rebuilt automatically when playbooks are added or removed. Include"," ",a.jsx("code",{className:"rounded bg-muted px-1 py-0.5 text-xs",children:"~/.syntaur/playbooks/manifest.md"})," ","in your CLAUDE.md for agent context."]}):null,!v&&n.whenToUse?a.jsxs("p",{className:"mt-2 text-sm text-muted-foreground italic",children:["When to use: ",n.whenToUse]}):null,a.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-3 text-xs text-muted-foreground",children:[a.jsxs("span",{children:["Created ",Cr(n.created)]}),a.jsxs("span",{children:["Updated ",Cr(n.updated)]})]}),n.tags.length>0?a.jsx("div",{className:"mt-2 flex flex-wrap gap-1.5",children:n.tags.map(k=>a.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full border border-border/60 bg-muted/50 px-2 py-0.5 text-xs text-muted-foreground",children:[a.jsx(zv,{className:"h-3 w-3"}),k]},k))}):null]}),v?null:a.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:n.enabled?"Enabled":"Disabled"}),a.jsx("button",{type:"button",role:"switch","aria-checked":n.enabled,"aria-label":n.enabled?"Disable playbook":"Enable playbook",onClick:N,disabled:h,className:`inline-flex h-5 w-9 items-center rounded-full border transition disabled:opacity-50 ${n.enabled?"border-status-completed-foreground/60 bg-status-completed-foreground/80":"border-foreground/40 bg-foreground/15"}`,children:a.jsx("span",{className:`block h-4 w-4 rounded-full shadow-sm transition-transform ${n.enabled?"translate-x-[18px] bg-background":"translate-x-[2px] bg-foreground/70"}`})})]}),a.jsxs(Ee,{to:`/playbooks/${e}/edit`,className:"inline-flex h-8 items-center gap-1.5 rounded-md border border-border/70 bg-background px-3 text-xs font-medium text-foreground transition hover:bg-muted",children:[a.jsx(qC,{className:"h-3 w-3"}),"Edit"]}),c?a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("button",{type:"button",onClick:b,disabled:p,className:"inline-flex h-8 items-center gap-1.5 rounded-md bg-destructive px-3 text-xs font-medium text-destructive-foreground transition hover:bg-destructive/90 disabled:opacity-50",children:p?"Deleting...":"Confirm"}),a.jsx("button",{type:"button",onClick:()=>d(!1),className:"inline-flex h-8 items-center rounded-md border border-border/70 bg-background px-3 text-xs font-medium text-foreground transition hover:bg-muted",children:"Cancel"})]}):a.jsxs("button",{type:"button",onClick:()=>d(!0),className:"inline-flex h-8 items-center gap-1.5 rounded-md border border-border/70 bg-background px-3 text-xs font-medium text-destructive transition hover:bg-destructive/10",children:[a.jsx(Eo,{className:"h-3 w-3"}),"Delete"]})]})]}),a.jsx("div",{className:"surface-panel p-4",children:a.jsx(Wt,{content:n.body})})]}):null}function i_(){const e=qt(),[t,n]=g.useState(null),[o,i]=g.useState(!0),[l,c]=g.useState(!1),[d,p]=g.useState(null);g.useEffect(()=>{fetch("/api/playbooks/template/new").then(h=>h.json()).then(h=>{n(h.content),i(!1)}).catch(h=>{p(h.message),i(!1)})},[]);async function m(h){c(!0),p(null);try{const x=await fetch("/api/playbooks",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:h})}),v=await x.json();if(!x.ok){p(v.error||`HTTP ${x.status}`),c(!1);return}e(`/playbooks/${v.slug}`)}catch(x){p(x.message),c(!1);return}c(!1)}return o?a.jsx(wt,{label:"Loading playbook template..."}):d&&!t?a.jsx(ht,{error:d}):a.jsx(Zs,{initialContent:t||"",documentType:"playbook",mode:"create",onSave:m,saving:l,error:d,title:"Create Playbook",description:"Playbooks define rules and workflows for how agents should operate. Keep them short, imperative, and focused on a single concern.",onCancel:()=>e("/playbooks"),allowSlugEdit:!0})}function a_(){const{slug:e}=Et(),t=qt(),[n,o]=g.useState(null),[i,l]=g.useState(!0),[c,d]=g.useState(!1),[p,m]=g.useState(null);g.useEffect(()=>{e&&fetch(`/api/playbooks/${e}/edit`).then(x=>x.json()).then(x=>{o(x.content),l(!1)}).catch(x=>{m(x.message),l(!1)})},[e]);async function h(x){if(e){d(!0),m(null);try{const v=await fetch(`/api/playbooks/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:x})}),b=await v.json();if(!v.ok){m(b.error||`HTTP ${v.status}`),d(!1);return}t(`/playbooks/${e}`)}catch(v){m(v.message),d(!1);return}d(!1)}}return i?a.jsx(wt,{label:"Loading playbook..."}):p&&!n?a.jsx(ht,{error:p}):a.jsx(Zs,{initialContent:n||"",documentType:"playbook",mode:"edit",onSave:h,saving:c,error:p,title:"Edit Playbook",onCancel:()=>t(`/playbooks/${e}`)})}function l_({value:e,onChange:t}){return a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("input",{type:"color",value:e||"#64748b",onChange:n=>t(n.target.value),className:"h-7 w-7 shrink-0 cursor-pointer rounded-md border border-border/60 bg-transparent p-0.5",title:"Pick a color"}),a.jsx("input",{type:"text",value:e,onChange:n=>t(n.target.value),placeholder:"#64748b",className:"editor-input w-[5.5rem] font-mono text-xs"})]})}const ip=["projects","playbooks","todos","servers","config"];function c_(e){const t=new Set;for(const n of e.split(",").map(o=>o.trim()))ip.includes(n)&&t.add(n);return t}function lv(e){if(!e)return"never";try{return new Date(e).toLocaleString()}catch{return e}}function u_(){const[e,t]=g.useState(!0),[n,o]=g.useState(null),[i,l]=g.useState(""),[c,d]=g.useState(new Set(ip)),[p,m]=g.useState(!1),[h,x]=g.useState(!1),[v,b]=g.useState(null),[N,k]=g.useState(null),j=g.useCallback(async()=>{try{const P=await fetch("/api/backup");if(!P.ok)throw new Error(`HTTP ${P.status}`);const L=await P.json();o(L),l(L.repo??""),d(c_(L.categories)),m(!1)}catch(P){k({type:"error",message:`Failed to load backup config: ${P instanceof Error?P.message:String(P)}`})}finally{t(!1)}},[]);g.useEffect(()=>{j()},[j]);function S(P){d(L=>{const _=new Set(L);return _.has(P)?_.delete(P):_.add(P),_}),m(!0)}async function T(){x(!0),k(null);try{const P=Array.from(c),L=await fetch("/api/backup/config",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({repo:i.trim()||null,categories:P})}),_=await L.json();if(!L.ok)throw new Error(_.error||`HTTP ${L.status}`);o(_),m(!1),k({type:"success",message:"Backup configuration saved."})}catch(P){k({type:"error",message:`Save failed: ${P instanceof Error?P.message:String(P)}`})}finally{x(!1)}}async function R(){b("push"),k(null);try{const P=await fetch("/api/backup/push",{method:"POST"}),L=await P.json();if(!P.ok||L.success===!1)throw new Error(L.error||L.message||`HTTP ${P.status}`);k({type:"success",message:L.message||"Backup complete."}),await j()}catch(P){k({type:"error",message:`Backup failed: ${P instanceof Error?P.message:String(P)}`})}finally{b(null)}}async function D(){if(window.confirm("Restore will overwrite local files for the selected categories with the contents of the GitHub repo. This cannot be undone. Continue?")){b("pull"),k(null);try{const L=await fetch("/api/backup/pull",{method:"POST"}),_=await L.json();if(!L.ok||_.success===!1)throw new Error(_.error||_.message||`HTTP ${L.status}`);k({type:"success",message:_.message||"Restore complete."}),await j()}catch(L){k({type:"error",message:`Restore failed: ${L instanceof Error?L.message:String(L)}`})}finally{b(null)}}}if(e)return a.jsx(Te,{title:"GitHub Backup",description:"Back up Syntaur files to a GitHub repository",children:a.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."})});const M=!!i.trim()&&c.size>0&&!v&&!p;return a.jsx(Te,{title:"GitHub Backup",description:"Back up Syntaur files to a GitHub repository and restore from it",children:a.jsxs("div",{className:"space-y-4",children:[N&&a.jsx("div",{className:`rounded-lg border px-4 py-2 text-sm ${N.type==="success"?"border-success-foreground/30 bg-success text-success-foreground":"border-error-foreground/30 bg-error text-error-foreground"}`,children:N.message}),a.jsxs("div",{className:"space-y-2",children:[a.jsx("label",{className:"text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Repository URL"}),a.jsx("input",{type:"text",value:i,onChange:P=>{l(P.target.value),m(!0)},placeholder:"git@github.com:you/syntaur-backup.git",className:"editor-input w-full text-sm"}),a.jsxs("p",{className:"text-xs text-muted-foreground",children:["SSH or HTTPS URL. Requires ",a.jsx("code",{className:"rounded bg-muted px-1",children:"git"})," installed and credentials configured locally."]})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx("label",{className:"text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Categories to back up"}),a.jsx("div",{className:"flex flex-wrap gap-2",children:ip.map(P=>{const L=c.has(P);return a.jsxs("button",{type:"button",onClick:()=>S(P),className:`shell-action text-xs ${L?"bg-primary/10 text-primary hover:bg-primary/20":"bg-muted/30 text-muted-foreground hover:bg-muted/60"}`,children:[a.jsx("span",{className:`mr-1 inline-block h-2 w-2 rounded-full ${L?"bg-primary":"bg-muted-foreground/40"}`}),P]},P)})})]}),a.jsxs("div",{className:"grid grid-cols-1 gap-2 text-xs text-muted-foreground sm:grid-cols-2",children:[a.jsxs("div",{children:[a.jsx("span",{className:"font-medium text-foreground",children:"Last backup: "}),lv((n==null?void 0:n.lastBackup)??null)]}),a.jsxs("div",{children:[a.jsx("span",{className:"font-medium text-foreground",children:"Last restore: "}),lv((n==null?void 0:n.lastRestore)??null)]}),(n==null?void 0:n.locked)&&a.jsx("div",{className:"sm:col-span-2 text-warning-foreground",children:"⚠ A backup operation is in progress or the lock file is stale."})]}),a.jsxs("div",{className:"flex flex-wrap items-center gap-3 pt-2",children:[a.jsxs("button",{className:"shell-action bg-primary/10 text-primary hover:bg-primary/20",onClick:T,disabled:h||!p,children:[a.jsx(xp,{className:"h-3.5 w-3.5"}),h?"Saving...":"Save Config"]}),a.jsxs("button",{className:"shell-action",onClick:R,disabled:!M,title:M?"Back up now":p?"Save config first":"Set repo and pick categories",children:[a.jsx(tN,{className:"h-3.5 w-3.5"}),v==="push"?"Backing up...":"Back Up Now"]}),a.jsxs("button",{className:"shell-action",onClick:D,disabled:!M,title:M?"Restore from backup":p?"Save config first":"Set repo and pick categories",children:[a.jsx(AC,{className:"h-3.5 w-3.5"}),v==="pull"?"Restoring...":"Restore"]}),p&&a.jsx("span",{className:"text-xs text-muted-foreground",children:"Unsaved changes"})]}),a.jsxs("p",{className:"flex items-start gap-2 rounded-md border border-border/40 bg-muted/20 p-3 text-xs text-muted-foreground",children:[a.jsx(TC,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),a.jsxs("span",{children:["Restore never overwrites ",a.jsx("code",{className:"rounded bg-muted px-1",children:"config.md"})," (would clobber backup settings). The agent sessions database is not backed up — only markdown files."]})]})]})})}function Ef(e){return{statuses:e.statuses.map(t=>({id:t.id,label:t.label,description:t.description??"",color:t.color??"",terminal:t.terminal??!1})),order:[...e.order]}}function d_(){const[e,t]=g.useState(!0),[n,o]=g.useState(null),[i,l]=g.useState(!1),[c,d]=g.useState([]),[p,m]=g.useState([]),[h,x]=g.useState(!1),[v,b]=g.useState(null),[N,k]=g.useState(!1),{preset:j,setPreset:S,resetPreset:T}=bp(),[R,D]=g.useState(!1),[M,P]=g.useState(null);async function L(A){if(!(A===j||R)){D(!0),P(null);try{await S(A),P({type:"success",message:"Theme updated"}),setTimeout(()=>P(null),2e3)}catch(F){P({type:"error",message:F instanceof Error?F.message:"Failed to save theme"})}finally{D(!1)}}}async function _(){D(!0),P(null);try{await T(),P({type:"success",message:"Theme reset to default"}),setTimeout(()=>P(null),2e3)}catch(A){P({type:"error",message:A instanceof Error?A.message:"Failed to reset theme"})}finally{D(!1)}}const J=g.useCallback(async()=>{try{const A=await fetch("/api/config/statuses");if(!A.ok)throw new Error(`HTTP ${A.status}`);const F=await A.json(),K=Ef(F);d(K.statuses),m(K.order),l(F.custom),k(!1),o(null)}catch(A){o(A instanceof Error?A.message:"Failed to load config")}finally{t(!1)}},[]);g.useEffect(()=>{J()},[J]);function ne(){setTimeout(()=>b(null),3e3)}async function U(){x(!0),b(null);try{const A={statuses:c.map(B=>({id:B.id,label:B.label,...B.description?{description:B.description}:{},...B.color?{color:B.color}:{},...B.terminal?{terminal:!0}:{}})),order:p,transitions:[]},F=await fetch("/api/config/statuses",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(A)});if(!F.ok){const B=await F.json().catch(()=>({error:"Unknown error"}));throw new Error(B.error??"Save failed")}const K=await F.json(),E=Ef(K);d(E.statuses),m(E.order),l(K.custom),k(!1),Ox(),b({type:"success",message:"Status config saved"}),ne()}catch(A){b({type:"error",message:A instanceof Error?A.message:"Save failed"})}finally{x(!1)}}async function G(){x(!0),b(null);try{const A=await fetch("/api/config/statuses",{method:"DELETE"});if(!A.ok)throw new Error("Reset failed");const F=await A.json(),K=Ef(F);d(K.statuses),m(K.order),l(F.custom),k(!1),Ox(),b({type:"success",message:"Reset to defaults"}),ne()}catch(A){b({type:"error",message:A instanceof Error?A.message:"Reset failed"})}finally{x(!1)}}function q(A,F,K){d(E=>{const B=[...E];if(B[A]={...B[A],[F]:K},F==="id"&&typeof K=="string"){const X=E[A].id;m(O=>O.map(se=>se===X?K:se))}return B}),k(!0)}function ee(){const A=`status_${c.length+1}`;d(F=>[...F,{id:A,label:"New Status",description:"",color:"",terminal:!1}]),m(F=>[...F,A]),k(!0)}function $(A){const F=c[A].id;d(K=>K.filter((E,B)=>B!==A)),m(K=>K.filter(E=>E!==F)),k(!0)}function I(A,F){const K=A+F;K<0||K>=p.length||(m(E=>{const B=[...E];return[B[A],B[K]]=[B[K],B[A]],B}),k(!0))}return e?a.jsx(wt,{label:"Loading settings..."}):n?a.jsx(ht,{error:n}):a.jsx(T1,{children:a.jsxs("div",{className:"space-y-6",children:[a.jsxs(Te,{title:"Theme",description:"Pick a color theme for the dashboard. The default is the Syntaur brand.",actions:j!=="default"?a.jsxs("button",{className:"shell-action text-xs",onClick:_,disabled:R,children:[a.jsx(fx,{className:"h-3 w-3"}),"Reset"]}):void 0,children:[M&&a.jsx("div",{className:`mb-3 rounded-md border px-3 py-1.5 text-xs ${M.type==="success"?"border-success-foreground/30 bg-success text-success-foreground":"border-error-foreground/30 bg-error text-error-foreground"}`,children:M.message}),a.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-4",children:Qv.map(A=>{const F=A.slug===j;return a.jsxs("button",{type:"button",onClick:()=>L(A.slug),disabled:R,"aria-pressed":F,className:`group relative flex flex-col gap-2 rounded-lg border bg-card/95 p-3 text-left transition disabled:opacity-60 ${F?"border-primary ring-2 ring-primary/40":"border-border/60 hover:border-primary/40"}`,children:[a.jsxs("div",{className:"flex items-center gap-1.5",children:[a.jsx("span",{className:"h-5 w-5 rounded-full ring-1 ring-border/60",style:{background:A.swatches.primary}}),a.jsx("span",{className:"h-5 w-5 rounded-full ring-1 ring-border/60",style:{background:A.swatches.secondary}}),a.jsx("span",{className:"h-5 w-5 rounded-full ring-1 ring-border/60",style:{background:A.swatches.coral}}),a.jsx("span",{className:"h-5 w-5 rounded-full ring-1 ring-border/60",style:{background:A.swatches.teal}}),a.jsx("span",{className:"h-5 w-5 rounded-full ring-1 ring-border/60",style:{background:A.swatches.amber}}),F&&a.jsx("span",{className:"ml-auto inline-flex h-5 w-5 items-center justify-center rounded-full bg-primary text-primary-foreground",children:a.jsx(da,{className:"h-3 w-3"})})]}),a.jsxs("div",{children:[a.jsx("div",{className:"text-sm font-medium text-foreground",children:A.label}),a.jsx("div",{className:"text-xs text-muted-foreground",children:A.description})]})]},A.slug)})})]}),a.jsxs("div",{className:`flex items-center justify-between rounded-lg border px-4 py-3 text-sm ${i?"border-primary/30 bg-primary/5 text-primary":"border-border/60 bg-muted/30 text-muted-foreground"}`,children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(_v,{className:"h-4 w-4"}),i?"Using custom status configuration from ~/.syntaur/config.md":"Using default status configuration"]}),a.jsxs("button",{className:"shell-action text-xs",onClick:G,disabled:h||!i&&!N,children:[a.jsx(fx,{className:"h-3 w-3"}),"Reset to Defaults"]})]}),v&&a.jsx("div",{className:`rounded-lg border px-4 py-2 text-sm ${v.type==="success"?"border-success-foreground/30 bg-success text-success-foreground":"border-error-foreground/30 bg-error text-error-foreground"}`,children:v.message}),a.jsx(Te,{title:"Status Definitions",description:"Define the statuses assignments can have",actions:a.jsxs("button",{className:"shell-action text-xs",onClick:ee,children:[a.jsx(Bn,{className:"h-3 w-3"}),"Add Status"]}),children:a.jsx("div",{className:"overflow-x-auto",children:a.jsxs("table",{className:"w-full text-sm",children:[a.jsx("thead",{children:a.jsxs("tr",{className:"border-b border-border/50 text-left text-xs font-medium uppercase tracking-wider text-muted-foreground",children:[a.jsx("th",{className:"pb-2 pr-3",children:"ID"}),a.jsx("th",{className:"pb-2 pr-3",children:"Label"}),a.jsx("th",{className:"pb-2 pr-3",children:"Color"}),a.jsx("th",{className:"pb-2 pr-3",children:a.jsxs(R1,{children:[a.jsx(A1,{asChild:!0,children:a.jsx("span",{className:"cursor-help underline decoration-dotted underline-offset-4",children:"Done State"})}),a.jsx(xh,{className:"max-w-xs text-xs font-normal normal-case tracking-normal",children:'When enabled, assignments in this status count as finished — they fill the "done" portion of progress bars and satisfy dependency requirements.'})]})}),a.jsx("th",{className:"pb-2 w-10"})]})}),a.jsx("tbody",{className:"divide-y divide-border/30",children:c.map((A,F)=>a.jsxs("tr",{children:[a.jsx("td",{className:"py-2 pr-3",children:a.jsx("input",{type:"text",value:A.id,onChange:K=>q(F,"id",K.target.value),className:"editor-input w-full text-sm"})}),a.jsx("td",{className:"py-2 pr-3",children:a.jsx("input",{type:"text",value:A.label,onChange:K=>q(F,"label",K.target.value),className:"editor-input w-full text-sm"})}),a.jsx("td",{className:"py-2 pr-3",children:a.jsx(l_,{value:A.color,onChange:K=>q(F,"color",K)})}),a.jsx("td",{className:"py-2 pr-3",children:a.jsx("button",{type:"button",role:"switch","aria-checked":A.terminal,onClick:()=>q(F,"terminal",!A.terminal),className:`relative inline-flex h-5 w-9 shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 focus-visible:ring-offset-background ${A.terminal?"bg-primary":"bg-muted"}`,children:a.jsx("span",{className:`pointer-events-none inline-block h-4 w-4 rounded-full bg-background shadow-sm ring-0 transition-transform ${A.terminal?"translate-x-4":"translate-x-0"}`})})}),a.jsx("td",{className:"py-2",children:a.jsx("button",{className:"inline-flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground hover:bg-muted hover:text-foreground",onClick:()=>$(F),title:"Remove status",children:a.jsx(Eo,{className:"h-3.5 w-3.5"})})})]},F))})]})})}),a.jsx(Te,{title:"Status Order",description:"Controls display order in the dashboard (Kanban columns, progress bars, dropdowns)",children:a.jsx("div",{className:"space-y-1",children:p.map((A,F)=>{var E;const K=((E=c.find(B=>B.id===A))==null?void 0:E.label)??A;return a.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-border/40 bg-background/60 px-3 py-2 text-sm",children:[a.jsx("span",{className:"mr-1 font-mono text-xs text-muted-foreground/60",children:F+1}),a.jsx("span",{className:"flex-1 font-medium",children:K}),a.jsx("span",{className:"text-xs text-muted-foreground",children:A}),a.jsx("button",{className:"inline-flex h-6 w-6 items-center justify-center rounded text-muted-foreground hover:bg-muted hover:text-foreground disabled:opacity-30",onClick:()=>I(F,-1),disabled:F===0,title:"Move up",children:a.jsx(Dv,{className:"h-3.5 w-3.5"})}),a.jsx("button",{className:"inline-flex h-6 w-6 items-center justify-center rounded text-muted-foreground hover:bg-muted hover:text-foreground disabled:opacity-30",onClick:()=>I(F,1),disabled:F===p.length-1,title:"Move down",children:a.jsx(na,{className:"h-3.5 w-3.5"})})]},F)})})}),a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsxs("button",{className:"shell-action bg-primary/10 text-primary hover:bg-primary/20",onClick:U,disabled:h||!N,children:[a.jsx(xp,{className:"h-3.5 w-3.5"}),h?"Saving...":"Save Configuration"]}),N&&a.jsxs(a.Fragment,{children:[a.jsx("button",{className:"shell-action text-xs",onClick:()=>{t(!0),J()},disabled:h,children:"Discard Changes"}),a.jsx("span",{className:"text-xs text-muted-foreground",children:"Unsaved changes"})]})]}),a.jsx(u_,{})]})})}function f_(){const{data:e,loading:t,error:n,refetch:o}=jp(),[i,l]=g.useState(""),c=g.useRef(null);Qo("list:todos");const[d,p]=g.useState(""),[m,h]=g.useState(""),[x,v]=g.useState(""),[b,N]=g.useState("_global"),[k,j]=g.useState(null);function S($,I){$.stopPropagation(),navigator.clipboard.writeText(I),j(I),setTimeout(()=>j(A=>A===I?null:A),1500)}const T=g.useMemo(()=>{if(!(e!=null&&e.workspaces))return[];const $=[];for(const I of e.workspaces)for(const A of I.items)$.push({...A,workspace:I.workspace});return $},[e]),R=g.useMemo(()=>{const $=new Set;for(const I of T)for(const A of I.tags)$.add(A);return Array.from($).sort()},[T]),D=g.useMemo(()=>{let $=T;if(i.trim()){const I=i.toLowerCase();$=$.filter(A=>A.description.toLowerCase().includes(I)||A.tags.some(F=>F.toLowerCase().includes(I))||A.id.includes(I))}return d&&($=$.filter(I=>I.status===d)),m&&($=$.filter(I=>I.tags.includes(m))),$},[T,i,d,m]),M=g.useMemo(()=>{if(!(e!=null&&e.workspaces))return{open:0,in_progress:0,completed:0,blocked:0,total:0};const $={open:0,in_progress:0,completed:0,blocked:0,total:0};for(const I of e.workspaces)$.open+=I.counts.open,$.in_progress+=I.counts.in_progress,$.completed+=I.counts.completed,$.blocked+=I.counts.blocked,$.total+=I.counts.total;return $},[e]);async function P(){x.trim()&&(await db(b,x.trim()),v(""),o())}const L={open:"in_progress",in_progress:"completed",completed:"open",blocked:"open"};function _($,I,A){J($,I,L[A]||"open")}async function J($,I,A){switch(A){case"open":await mb($,I);break;case"in_progress":await hb($,I);break;case"completed":await fb($,I);break;case"blocked":await pb($,I);break}o()}async function ne($,I){await gb($,I),o()}const{hotkeyRowProps:U}=ha(D,{scope:"list:todos",bindO:!1,onOpen:$=>_($.workspace,$.id,$.status)});ft({keys:"/",scope:"list:todos",description:"Focus filter",handler:()=>{var $;return($=c.current)==null?void 0:$.focus()}}),ft({keys:"r",scope:"list:todos",description:"Refresh",handler:()=>o()});const[G,q]=No(),ee=G.get("focus");return g.useEffect(()=>{if(!ee)return;const $=document.querySelector(`[data-todo-id="${CSS.escape(ee)}"]`);if(!$)return;$.scrollIntoView({block:"nearest"}),$.classList.add("ring-2","ring-primary/60");const I=window.setTimeout(()=>{$.classList.remove("ring-2","ring-primary/60"),q(A=>{const F=new URLSearchParams(A);return F.delete("focus"),F})},1500);return()=>window.clearTimeout(I)},[ee,D.length,q]),t?a.jsx(wt,{label:"Loading todos..."}):n?a.jsx(ht,{error:n}):a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{className:"grid gap-3 grid-cols-[repeat(auto-fill,minmax(140px,1fr))]",children:[a.jsx(Xe,{label:"Open",value:M.open,icon:Fn}),a.jsx(Xe,{label:"In Progress",value:M.in_progress,icon:Mv,tone:"info"}),a.jsx(Xe,{label:"Blocked",value:M.blocked,icon:Ws,tone:"warn"}),a.jsx(Xe,{label:"Completed",value:M.completed,icon:Fn,tone:"default"})]}),a.jsx("div",{className:"surface-panel p-3",children:a.jsxs("div",{className:"flex gap-2",children:[a.jsxs("select",{value:b,onChange:$=>N($.target.value),className:"h-9 rounded-md border border-border/70 bg-background px-2 text-sm text-foreground focus:border-foreground/30 focus:outline-none",children:[a.jsx("option",{value:"_global",children:"Global"}),e==null?void 0:e.workspaces.filter($=>$.workspace!=="_global").map($=>a.jsx("option",{value:$.workspace,children:$.workspace},$.workspace))]}),a.jsx("input",{type:"text",placeholder:"Add a todo...",value:x,onChange:$=>v($.target.value),onKeyDown:$=>$.key==="Enter"&&P(),className:"h-9 flex-1 rounded-md border border-border/70 bg-background px-3 text-sm text-foreground placeholder:text-muted-foreground/60 focus:border-foreground/30 focus:outline-none"}),a.jsxs("button",{onClick:P,disabled:!x.trim(),className:"inline-flex h-9 items-center gap-1.5 rounded-md bg-foreground px-3 text-sm font-medium text-background transition hover:bg-foreground/90 disabled:opacity-40",children:[a.jsx(Bn,{className:"h-4 w-4"}),"Add"]})]})}),a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsxs("div",{className:"relative flex-1 max-w-sm",children:[a.jsx(Hs,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),a.jsx("input",{ref:c,type:"text",placeholder:"Search todos...",value:i,onChange:$=>l($.target.value),className:"h-9 w-full rounded-md border border-border/70 bg-background pl-9 pr-3 text-sm text-foreground placeholder:text-muted-foreground/60 focus:border-foreground/30 focus:outline-none"})]}),a.jsxs("select",{value:d,onChange:$=>p($.target.value),className:"h-9 rounded-md border border-border/70 bg-background px-2 text-sm text-foreground focus:border-foreground/30 focus:outline-none",children:[a.jsx("option",{value:"",children:"All statuses"}),a.jsx("option",{value:"open",children:"Open"}),a.jsx("option",{value:"in_progress",children:"In Progress"}),a.jsx("option",{value:"completed",children:"Completed"}),a.jsx("option",{value:"blocked",children:"Blocked"})]}),R.length>0&&a.jsxs("select",{value:m,onChange:$=>h($.target.value),className:"h-9 rounded-md border border-border/70 bg-background px-2 text-sm text-foreground focus:border-foreground/30 focus:outline-none",children:[a.jsx("option",{value:"",children:"All tags"}),R.map($=>a.jsxs("option",{value:$,children:["#",$]},$))]})]}),D.length===0?a.jsx(Qe,{title:"No todos",description:"Add your first todo above or use the CLI: syntaur todo add"}):a.jsx("div",{className:"space-y-1",children:D.map(($,I)=>a.jsxs("div",{"data-todo-id":$.id,...U(I),className:"surface-panel flex items-center gap-3 px-3 py-2 group cursor-pointer hover:bg-foreground/[0.03] transition",onClick:()=>_($.workspace,$.id,$.status),children:[a.jsx(ih,{status:$.status,onChange:A=>J($.workspace,$.id,A)}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("span",{className:`text-sm ${$.status==="completed"?"line-through text-muted-foreground":"text-foreground"}`,children:$.description}),$.tags.length>0&&a.jsx("span",{className:"ml-2 text-xs text-muted-foreground",children:$.tags.map(A=>`#${A}`).join(" ")})]}),a.jsx("span",{className:"text-xs text-muted-foreground/60 font-mono",children:$.workspace!=="_global"&&a.jsx(Ee,{to:`/w/${$.workspace}/todos`,className:"hover:text-foreground transition mr-2",onClick:A=>A.stopPropagation(),children:$.workspace})}),k===$.id?a.jsxs("span",{className:"text-xs text-status-completed-foreground flex items-center gap-1",children:[a.jsx(da,{className:"h-3 w-3"})," Copied to clipboard"]}):a.jsxs(a.Fragment,{children:[a.jsxs("button",{className:"text-xs text-muted-foreground/60 font-mono hover:text-foreground transition",onClick:A=>S(A,$.id),children:["t:",$.id]}),a.jsx("button",{className:"text-muted-foreground/40 hover:text-foreground transition",title:"Copy ID",onClick:A=>S(A,$.id),children:a.jsx(kc,{className:"h-3 w-3"})})]}),a.jsx("button",{onClick:()=>ne($.workspace,$.id),className:"text-xs text-muted-foreground/40 hover:text-destructive transition opacity-0 group-hover:opacity-100",children:"delete"})]},`${$.workspace}-${$.id}`))})]})}function p_({item:e,copiedId:t,onCycleStatus:n,onStatusChange:o,onCopyId:i,onDelete:l,disabled:c,hotkeyRowProps:d}){const{attributes:p,listeners:m,setNodeRef:h,setActivatorNodeRef:x,transform:v,transition:b,isDragging:N}=S0({id:e.id,disabled:c}),k={transform:$s.Transform.toString(v),transition:b,zIndex:N?50:void 0,position:N?"relative":void 0};return a.jsxs("div",{ref:h,style:k,"data-todo-id":e.id,...d??{},className:`surface-panel flex items-center gap-3 px-3 py-2 cursor-pointer hover:bg-foreground/[0.03] transition ${N?"opacity-50 shadow-lg":""}`,onClick:()=>n(e.id,e.status),children:[!c&&a.jsx("button",{ref:x,...p,...m,className:"cursor-grab active:cursor-grabbing text-muted-foreground/40 hover:text-muted-foreground transition touch-none",onClick:j=>j.stopPropagation(),children:a.jsx(Ov,{className:"h-4 w-4"})}),a.jsx(ih,{status:e.status,onChange:j=>o(e.id,j)}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("span",{className:`text-sm ${e.status==="completed"?"line-through text-muted-foreground":"text-foreground"}`,children:e.description}),e.tags.length>0&&a.jsx("span",{className:"ml-2 text-xs text-muted-foreground",children:e.tags.map(j=>`#${j}`).join(" ")}),e.session&&a.jsxs("span",{className:"ml-2 text-xs text-info-foreground/70 font-mono",children:["session:",e.session.slice(0,8)]})]}),t===e.id?a.jsxs("span",{className:"text-xs text-status-completed-foreground flex items-center gap-1",children:[a.jsx(da,{className:"h-3 w-3"})," Copied to clipboard"]}):a.jsxs(a.Fragment,{children:[a.jsxs("button",{className:"text-xs text-muted-foreground/60 font-mono hover:text-foreground transition",onClick:j=>i(j,e.id),children:["t:",e.id]}),a.jsx("button",{className:"text-muted-foreground/40 hover:text-foreground transition",title:"Copy ID",onClick:j=>i(j,e.id),children:a.jsx(kc,{className:"h-3 w-3"})}),a.jsx("button",{className:"text-muted-foreground/40 hover:text-destructive transition",title:"Delete todo",onClick:j=>l(j,e.id,e.description),children:a.jsx(Eo,{className:"h-3 w-3"})})]})]})}function h_(){const{workspace:e}=Et(),t=e||"_global",{data:n,loading:o,error:i,refetch:l}=e2(t),[c,d]=g.useState(""),[p,m]=g.useState(""),[h,x]=g.useState(""),[v,b]=g.useState(""),[N,k]=g.useState(null),j=g.useRef(null);Qo("list:todos");const S=!!(c.trim()||p||h),T=r0(fc($c,{activationConstraint:{distance:8}}),fc(Mc));function R(A,F){A.stopPropagation(),navigator.clipboard.writeText(F),k(F),setTimeout(()=>k(K=>K===F?null:K),1500)}const D=g.useMemo(()=>{if(!(n!=null&&n.items))return[];const A=new Set;for(const F of n.items)for(const K of F.tags)A.add(K);return Array.from(A).sort()},[n]),M=g.useMemo(()=>{if(!(n!=null&&n.items))return[];let A=n.items;if(c.trim()){const F=c.toLowerCase();A=A.filter(K=>K.description.toLowerCase().includes(F)||K.tags.some(E=>E.toLowerCase().includes(F))||K.id.includes(F))}return p&&(A=A.filter(F=>F.status===p)),h&&(A=A.filter(F=>F.tags.includes(h))),A},[n,c,p,h]);async function P(){v.trim()&&(await db(t,v.trim()),b(""),l())}const L={open:"in_progress",in_progress:"completed",completed:"open",blocked:"open"};function _(A,F){ne(A,L[F]||"open")}async function J(A,F,K){A.stopPropagation(),window.confirm(`Delete "${K}"? This can't be undone.`)&&(await gb(t,F),l())}async function ne(A,F){switch(F){case"open":await mb(t,A);break;case"in_progress":await hb(t,A);break;case"completed":await fb(t,A);break;case"blocked":await pb(t,A);break}l()}const{hotkeyRowProps:U}=ha(M,{scope:"list:todos",bindO:!1,onOpen:A=>_(A.id,A.status)});ft({keys:"/",scope:"list:todos",description:"Focus filter",handler:()=>{var A;return(A=j.current)==null?void 0:A.focus()}}),ft({keys:"r",scope:"list:todos",description:"Refresh",handler:()=>l()});const[G,q]=No(),ee=G.get("focus");g.useEffect(()=>{if(!ee)return;const A=document.querySelector(`[data-todo-id="${window.CSS.escape(ee)}"]`);if(!A)return;A.scrollIntoView({block:"nearest"}),A.classList.add("ring-2","ring-primary/60");const F=window.setTimeout(()=>{A.classList.remove("ring-2","ring-primary/60"),q(K=>{const E=new URLSearchParams(K);return E.delete("focus"),E})},1500);return()=>window.clearTimeout(F)},[ee,M.length,q]);async function $(A){const{active:F,over:K}=A;if(!K||F.id===K.id||!(n!=null&&n.items))return;const E=n.items.findIndex(O=>O.id===F.id),B=n.items.findIndex(O=>O.id===K.id);if(E===-1||B===-1)return;const X=Bc(n.items,E,B);await t2(t,X.map(O=>O.id)),l()}if(o)return a.jsx(wt,{label:"Loading todos..."});if(i)return a.jsx(ht,{error:i});const I=(n==null?void 0:n.counts)||{open:0,in_progress:0,blocked:0,total:0};return a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{className:"grid gap-3 grid-cols-[repeat(auto-fill,minmax(140px,1fr))]",children:[a.jsx(Xe,{label:"Open",value:I.open,icon:Fn}),a.jsx(Xe,{label:"In Progress",value:I.in_progress,icon:Fn,tone:"info"}),a.jsx(Xe,{label:"Blocked",value:I.blocked,icon:Ws,tone:"warn"}),a.jsx(Xe,{label:"Total",value:I.total,icon:Fn})]}),a.jsx("div",{className:"surface-panel p-3",children:a.jsxs("div",{className:"flex gap-2",children:[a.jsx("input",{type:"text",placeholder:"Add a todo...",value:v,onChange:A=>b(A.target.value),onKeyDown:A=>A.key==="Enter"&&P(),className:"h-9 flex-1 rounded-md border border-border/70 bg-background px-3 text-sm text-foreground placeholder:text-muted-foreground/60 focus:border-foreground/30 focus:outline-none"}),a.jsxs("button",{onClick:P,disabled:!v.trim(),className:"inline-flex h-9 items-center gap-1.5 rounded-md bg-foreground px-3 text-sm font-medium text-background transition hover:bg-foreground/90 disabled:opacity-40",children:[a.jsx(Bn,{className:"h-4 w-4"}),"Add"]})]})}),a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsxs("div",{className:"relative flex-1 max-w-sm",children:[a.jsx(Hs,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),a.jsx("input",{ref:j,type:"text",placeholder:"Search...",value:c,onChange:A=>d(A.target.value),className:"h-9 w-full rounded-md border border-border/70 bg-background pl-9 pr-3 text-sm text-foreground placeholder:text-muted-foreground/60 focus:border-foreground/30 focus:outline-none"})]}),a.jsxs("select",{value:p,onChange:A=>m(A.target.value),className:"h-9 rounded-md border border-border/70 bg-background px-2 text-sm text-foreground focus:border-foreground/30 focus:outline-none",children:[a.jsx("option",{value:"",children:"All statuses"}),a.jsx("option",{value:"open",children:"Open"}),a.jsx("option",{value:"in_progress",children:"In Progress"}),a.jsx("option",{value:"completed",children:"Completed"}),a.jsx("option",{value:"blocked",children:"Blocked"})]}),D.length>0&&a.jsxs("select",{value:h,onChange:A=>x(A.target.value),className:"h-9 rounded-md border border-border/70 bg-background px-2 text-sm text-foreground focus:border-foreground/30 focus:outline-none",children:[a.jsx("option",{value:"",children:"All tags"}),D.map(A=>a.jsxs("option",{value:A,children:["#",A]},A))]})]}),M.length===0?a.jsx(Qe,{title:"No todos",description:"Add your first todo above."}):a.jsx(x0,{sensors:T,collisionDetection:o0,onDragEnd:$,children:a.jsx(k0,{items:M.map(A=>A.id),strategy:v0,children:a.jsx("div",{className:"space-y-1",children:M.map((A,F)=>a.jsx(p_,{item:A,copiedId:N,onCycleStatus:_,onStatusChange:ne,onCopyId:R,onDelete:J,disabled:S,hotkeyRowProps:U(F)},A.id))})})})]})}function m_(){return a.jsx(cC,{children:a.jsx(oP,{children:a.jsx($S,{children:a.jsxs(De,{element:a.jsx(uP,{}),children:[a.jsx(De,{path:"/",element:a.jsx(yP,{})}),a.jsx(De,{path:"/projects",element:a.jsx(Mx,{})}),a.jsx(De,{path:"/assignments",element:a.jsx(ev,{})}),a.jsx(De,{path:"/assignments/new",element:a.jsx(ov,{})}),a.jsx(De,{path:"/assignments/:id",element:a.jsx($O,{})}),a.jsx(De,{path:"/assignments/:id/edit",element:a.jsx(kf,{})}),a.jsx(De,{path:"/assignments/:id/plan/edit",element:a.jsx(jf,{})}),a.jsx(De,{path:"/assignments/:id/scratchpad/edit",element:a.jsx(Sf,{})}),a.jsx(De,{path:"/assignments/:id/handoff/edit",element:a.jsx(Cf,{})}),a.jsx(De,{path:"/assignments/:id/decision-record/edit",element:a.jsx(Nf,{})}),a.jsx(De,{path:"/attention",element:a.jsx(vP,{})}),a.jsx(De,{path:"/servers",element:a.jsx(iv,{})}),a.jsx(De,{path:"/agent-sessions",element:a.jsx(av,{})}),a.jsx(De,{path:"/playbooks",element:a.jsx(o_,{})}),a.jsx(De,{path:"/playbooks/create",element:a.jsx(i_,{})}),a.jsx(De,{path:"/playbooks/:slug",element:a.jsx(s_,{})}),a.jsx(De,{path:"/playbooks/:slug/edit",element:a.jsx(a_,{})}),a.jsx(De,{path:"/todos",element:a.jsx(f_,{})}),a.jsx(De,{path:"/help",element:a.jsx(wP,{})}),a.jsx(De,{path:"/settings",element:a.jsx(d_,{})}),a.jsx(De,{path:"/create/project",element:a.jsx(nv,{})}),a.jsx(De,{path:"/projects/:slug",element:a.jsx($y,{})}),a.jsx(De,{path:"/projects/:slug/edit",element:a.jsx(sv,{})}),a.jsx(De,{path:"/projects/:slug/create/assignment",element:a.jsx(rv,{})}),a.jsx(De,{path:"/projects/:slug/assignments/:aslug",element:a.jsx(Xy,{})}),a.jsx(De,{path:"/projects/:slug/assignments/:aslug/edit",element:a.jsx(kf,{})}),a.jsx(De,{path:"/projects/:slug/assignments/:aslug/plan/edit",element:a.jsx(jf,{})}),a.jsx(De,{path:"/projects/:slug/assignments/:aslug/scratchpad/edit",element:a.jsx(Sf,{})}),a.jsx(De,{path:"/projects/:slug/assignments/:aslug/handoff/edit",element:a.jsx(Cf,{})}),a.jsx(De,{path:"/projects/:slug/assignments/:aslug/decision-record/edit",element:a.jsx(Nf,{})}),a.jsx(De,{path:"/w/:workspace/projects",element:a.jsx(Mx,{})}),a.jsx(De,{path:"/w/:workspace/assignments",element:a.jsx(ev,{})}),a.jsx(De,{path:"/w/:workspace/assignments/new",element:a.jsx(ov,{})}),a.jsx(De,{path:"/w/:workspace/servers",element:a.jsx(iv,{})}),a.jsx(De,{path:"/w/:workspace/agent-sessions",element:a.jsx(av,{})}),a.jsx(De,{path:"/w/:workspace/todos",element:a.jsx(h_,{})}),a.jsx(De,{path:"/w/:workspace/create/project",element:a.jsx(nv,{})}),a.jsx(De,{path:"/w/:workspace/projects/:slug",element:a.jsx($y,{})}),a.jsx(De,{path:"/w/:workspace/projects/:slug/edit",element:a.jsx(sv,{})}),a.jsx(De,{path:"/w/:workspace/projects/:slug/create/assignment",element:a.jsx(rv,{})}),a.jsx(De,{path:"/w/:workspace/projects/:slug/assignments/:aslug",element:a.jsx(Xy,{})}),a.jsx(De,{path:"/w/:workspace/projects/:slug/assignments/:aslug/edit",element:a.jsx(kf,{})}),a.jsx(De,{path:"/w/:workspace/projects/:slug/assignments/:aslug/plan/edit",element:a.jsx(jf,{})}),a.jsx(De,{path:"/w/:workspace/projects/:slug/assignments/:aslug/scratchpad/edit",element:a.jsx(Sf,{})}),a.jsx(De,{path:"/w/:workspace/projects/:slug/assignments/:aslug/handoff/edit",element:a.jsx(Cf,{})}),a.jsx(De,{path:"/w/:workspace/projects/:slug/assignments/:aslug/decision-record/edit",element:a.jsx(Nf,{})})]})})})})}HN();$j.createRoot(document.getElementById("root")).render(a.jsx(g.StrictMode,{children:a.jsx(WN,{children:a.jsx(m_,{})})}));export{lT as _,g_ as a,yc as g};
|