@puddle-code/cli 0.2.15 → 0.2.16
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/CHANGELOG.md +4 -4
- package/dist/index.js +3 -2
- package/dist/public/assets/{App-CWsXEgQo.js → App-BG0mdlS1.js} +2 -2
- package/dist/public/assets/{Dashboard-C15aDbkk.js → Dashboard-CWiBhmle.js} +1 -1
- package/dist/public/assets/{EditorTabClose-BFzx32u3.js → EditorTabClose-cB987DFw.js} +1 -1
- package/dist/public/assets/FindWidget-CZ_Qh10J.js +1 -0
- package/dist/public/assets/{LazyTerminal-6Bphkjrt.js → LazyTerminal-DmvpxIqJ.js} +2 -2
- package/dist/public/assets/{ModelRefcount-BEFEhOd-.js → ModelRefcount-B3iGJHJf.js} +1 -1
- package/dist/public/assets/{NewProjectDialog-FuWwzfl3.js → NewProjectDialog-I9vWidJt.js} +1 -1
- package/dist/public/assets/PaneEditorBody-C4j5nh1M.js +299 -0
- package/dist/public/assets/{PdfViewer-5fGgoeRa.js → PdfViewer-C5eSzJcC.js} +2 -2
- package/dist/public/assets/SettingsDialog-BM5YUClE.js +8 -0
- package/dist/public/assets/Terminal-CAPi0WAe.js +66 -0
- package/dist/public/assets/Workspace-q_eTRA6m.js +20 -0
- package/dist/public/assets/{abnfDiagram-VCTEODGH-XhK-a9bV.js → abnfDiagram-VCTEODGH-jGPHgpeM.js} +1 -1
- package/dist/public/assets/architecture-7GRP2DOG-DP0eDupc.js +1 -0
- package/dist/public/assets/{architectureDiagram-5GKGNRK7-BQsZjKQJ.js → architectureDiagram-5GKGNRK7-WzHiExt_.js} +1 -1
- package/dist/public/assets/{blockDiagram-I7D4REHJ-S9hiaolp.js → blockDiagram-I7D4REHJ-DBRl_xPg.js} +1 -1
- package/dist/public/assets/{buffer-store-Dzoky9Vk.js → buffer-store-C32442jB.js} +2 -2
- package/dist/public/assets/{button-DGZ41AMs.js → button-1G8TaWHA.js} +1 -1
- package/dist/public/assets/{c4Diagram-7LVT6UL2-C6TJUUbc.js → c4Diagram-7LVT6UL2-MDXaO3qN.js} +1 -1
- package/dist/public/assets/channel-CihecDxw.js +1 -0
- package/dist/public/assets/{chunk-2E4U76K2-ByXO-8Jy.js → chunk-2E4U76K2-AY--rEt0.js} +1 -1
- package/dist/public/assets/{chunk-4HAMMTFA-B7Ra5AlZ.js → chunk-4HAMMTFA-FPp5hj4L.js} +1 -1
- package/dist/public/assets/{chunk-75Z2AOVW-C43rOJkc.js → chunk-75Z2AOVW-BORaUDn8.js} +1 -1
- package/dist/public/assets/{chunk-CLGD4ZFX-CbsVLCQc.js → chunk-CLGD4ZFX-oFNi47Ux.js} +1 -1
- package/dist/public/assets/chunk-DU6HZSFF-CBPmk1pL.js +125 -0
- package/dist/public/assets/{chunk-F27PBJKO-B9Cce-ZX.js → chunk-F27PBJKO-DE-cpUSw.js} +1 -1
- package/dist/public/assets/{chunk-GMAD6QVW-s6lxZwdj.js → chunk-GMAD6QVW-uwctnGjU.js} +1 -1
- package/dist/public/assets/{chunk-GVQU2GXP-DRviL7ux.js → chunk-GVQU2GXP-BQITYCKv.js} +1 -1
- package/dist/public/assets/{chunk-IMKFNOWR-B2Nnx4Lg.js → chunk-IMKFNOWR-NpFZBNPP.js} +5 -5
- package/dist/public/assets/{chunk-L3NEJ4N5-C56MSu53.js → chunk-L3NEJ4N5-DyGyqqsq.js} +1 -1
- package/dist/public/assets/{chunk-OSK3NFVY-mliURn7i.js → chunk-OSK3NFVY-BJidWKYd.js} +1 -1
- package/dist/public/assets/{chunk-P2QGCYS3-CPc7THMm.js → chunk-P2QGCYS3-Dxh_lkTg.js} +1 -1
- package/dist/public/assets/{chunk-POPQ4Y6H-D0UNfRu-.js → chunk-POPQ4Y6H-C_gyiAmS.js} +1 -1
- package/dist/public/assets/{chunk-PWAF6VOD-CduHIAB_.js → chunk-PWAF6VOD-By_8bGJX.js} +1 -1
- package/dist/public/assets/chunk-SHT3W25Y-IgOb9-zw.js +168 -0
- package/dist/public/assets/{chunk-SVP7TREG-DkwvYHWO.js → chunk-SVP7TREG-DA05MA7w.js} +1 -1
- package/dist/public/assets/{chunk-TICWLB2K-szMdmNBk.js → chunk-TICWLB2K-RUoyl2rG.js} +6 -6
- package/dist/public/assets/{chunk-TLUHSLCS-BbRvA7V9.js → chunk-TLUHSLCS-ROOkcM6u.js} +2 -2
- package/dist/public/assets/classDiagram-ZZMXUADV-D2vAdlHX.js +1 -0
- package/dist/public/assets/classDiagram-v2-VYDZK3BY-D2vAdlHX.js +1 -0
- package/dist/public/assets/code-DRWf9a5s.js +1 -0
- package/dist/public/assets/{context-menu-CMR3quc3.js → context-menu-HlXs3B2p.js} +1 -1
- package/dist/public/assets/{cssMode-D9ZNJNk8.js → cssMode-BhKXKmly.js} +1 -1
- package/dist/public/assets/{cynefin-OW5HDTMX-DuWZHcIt.js → cynefin-OW5HDTMX-B3kGmmPW.js} +1 -1
- package/dist/public/assets/{cynefinDiagram-5FMLGOSQ-BVe6SJXs.js → cynefinDiagram-5FMLGOSQ-Ch-mhRC4.js} +1 -1
- package/dist/public/assets/{dagre-GXQ25YYZ-LBBjMgc9.js → dagre-GXQ25YYZ-BbkznBXW.js} +1 -1
- package/dist/public/assets/{diagram-S7CK7UJ4-B4sD_cGV.js → diagram-S7CK7UJ4-B4SWXzuX.js} +1 -1
- package/dist/public/assets/{diagram-UQ7AKVKN-D14T_Ejl.js → diagram-UQ7AKVKN-C7CBIDh7.js} +1 -1
- package/dist/public/assets/{diagram-VSXAHHWV-BsUsOo2p.js → diagram-VSXAHHWV-B-5Z6jOF.js} +1 -1
- package/dist/public/assets/{diagram-VX7I27RA-0Rs_NGAd.js → diagram-VX7I27RA-D-TSzAXO.js} +1 -1
- package/dist/public/assets/{diagram-Z3DM3KII-DNODOMxK.js → diagram-Z3DM3KII-CqpRUlDU.js} +1 -1
- package/dist/public/assets/{dialog-Cmn5pHjL.js → dialog-DL-fFhai.js} +1 -1
- package/dist/public/assets/{disclosure-DjzCBlJA.js → disclosure-Bj0A7RNa.js} +1 -1
- package/dist/public/assets/{dist-B9oip1LR.js → dist-DzQAeBM9.js} +1 -1
- package/dist/public/assets/{dist-BJToJfnO.js → dist-FZIjlARg.js} +1 -1
- package/dist/public/assets/{ebnfDiagram-PWID7BFC-C3tG-YWl.js → ebnfDiagram-PWID7BFC-Cofjwha8.js} +1 -1
- package/dist/public/assets/{erDiagram-RLTQ6QDP-BjJBvNFm.js → erDiagram-RLTQ6QDP-DwodqGKb.js} +1 -1
- package/dist/public/assets/eventmodeling-NTZA5JFV-CHBx7_oz.js +1 -0
- package/dist/public/assets/flowDiagram-HODETNUW-D_byNUu2.js +1 -0
- package/dist/public/assets/{ganttDiagram-EL5Y4UJY-Bp7Kcqlf.js → ganttDiagram-EL5Y4UJY-CcUsJIyb.js} +1 -1
- package/dist/public/assets/{gitGraph-4MIJSDKK-B9sWzsBd.js → gitGraph-4MIJSDKK-DFSf-C3S.js} +1 -1
- package/dist/public/assets/{gitGraphDiagram-WWUBYQGX-Cun29dQ7.js → gitGraphDiagram-WWUBYQGX-C1lNmV85.js} +1 -1
- package/dist/public/assets/{htmlMode-DQSWM26C.js → htmlMode-BWs3Q_d8.js} +1 -1
- package/dist/public/assets/{index-CL_uWson.js → index-DimSEdqL.js} +2 -2
- package/dist/public/assets/index-trR7_UK8.css +2 -0
- package/dist/public/assets/{info-A6RAGUB7-CzsgGaNb.js → info-A6RAGUB7-syflKP6j.js} +1 -1
- package/dist/public/assets/{infoDiagram-27XIBGKW-Bg1W61Gw.js → infoDiagram-27XIBGKW-D-ypuF8_.js} +1 -1
- package/dist/public/assets/{ishikawaDiagram-5VMMS53U-6IHY1rOf.js → ishikawaDiagram-5VMMS53U-BkRl4B7A.js} +1 -1
- package/dist/public/assets/{journeyDiagram-3NMN7TZE-B_agREdq.js → journeyDiagram-3NMN7TZE-BDDQuzDH.js} +1 -1
- package/dist/public/assets/{jsonMode-D9cfPVjU.js → jsonMode-C-J7IxkG.js} +1 -1
- package/dist/public/assets/{kanban-definition-UXKFOSKX-D2wcFvhb.js → kanban-definition-UXKFOSKX-KHxfc5wc.js} +1 -1
- package/dist/public/assets/katex.min-ZqdHjttS.js +1 -0
- package/dist/public/assets/{line-Bwz8kfjg.js → line-DP_McEBB.js} +1 -1
- package/dist/public/assets/markdown-mermaid-DAuI0dnv.js +2 -0
- package/dist/public/assets/math-BNwf_Ju1.js +257 -0
- package/dist/public/assets/{media-refresh-store-6tLpeYlc.js → media-refresh-store-DwR5z285.js} +1 -1
- package/dist/public/assets/{mermaid-parser.core-Bij84NHT.js → mermaid-parser.core-ByJNQf82.js} +3 -3
- package/dist/public/assets/mermaid.core-BFVfe-_-.js +11 -0
- package/dist/public/assets/{mindmap-definition-YA3MSWOX-thQjkbqR.js → mindmap-definition-YA3MSWOX-Bo9ob_mQ.js} +1 -1
- package/dist/public/assets/{notification-permission-CP-Ev34n.js → notification-permission-DVm7P4Wk.js} +1 -1
- package/dist/public/assets/{packet-AYTQ26CC-VEf85sJW.js → packet-AYTQ26CC-o07r9Vr8.js} +1 -1
- package/dist/public/assets/{pdf-pdjeUnwA.js → pdf-BIrMXTqc.js} +1 -1
- package/dist/public/assets/{pegDiagram-XKGWAZYB-DjeXy23-.js → pegDiagram-XKGWAZYB-BtqMklw1.js} +1 -1
- package/dist/public/assets/{pie-WAS4IAKB-DQ4Pzsu9.js → pie-WAS4IAKB-BwpVJNHe.js} +1 -1
- package/dist/public/assets/{pieDiagram-E7YTZNPT-D3Wr8BWV.js → pieDiagram-E7YTZNPT-Dncu9vCX.js} +1 -1
- package/dist/public/assets/{project-abbrev-BGeqmg57.js → project-abbrev-Cx2jLlWm.js} +1 -1
- package/dist/public/assets/{protocol-support-DaYYcqG_.js → protocol-support-Cnojvarm.js} +1 -1
- package/dist/public/assets/purify.es-D8QhFVkO.js +3 -0
- package/dist/public/assets/{quadrantDiagram-AXDQQJYC-lBYptjAR.js → quadrantDiagram-AXDQQJYC-XuE3YoY0.js} +1 -1
- package/dist/public/assets/{radar-RG4KPBEZ-DVZohL9m.js → radar-RG4KPBEZ-DSTJnjXl.js} +1 -1
- package/dist/public/assets/{railroad-74A4TZTK-Dmhib9Zs.js → railroad-74A4TZTK-BMKVma7c.js} +1 -1
- package/dist/public/assets/railroad-abnf-HS5TGJTU-Wq7qIXqX.js +1 -0
- package/dist/public/assets/railroad-ebnf-LZEXJU2U-nEF79E8p.js +1 -0
- package/dist/public/assets/railroad-peg-WCYAUIDC-UPoD6gFx.js +1 -0
- package/dist/public/assets/{railroadDiagram-O6MQD6OU-Bd1ZQ21E.js → railroadDiagram-O6MQD6OU-NYkCNnqw.js} +1 -1
- package/dist/public/assets/{requirementDiagram-BXWQKSXE-ConecC48.js → requirementDiagram-BXWQKSXE-B3RL471h.js} +1 -1
- package/dist/public/assets/{sankeyDiagram-P5KCCOFB-C4lXXGjQ.js → sankeyDiagram-P5KCCOFB-DHgi9F_Q.js} +1 -1
- package/dist/public/assets/{scroll-restoration-Bilkt5uk.js → scroll-restoration-CIKfGFs2.js} +1 -1
- package/dist/public/assets/selection-actions-Cdyt7B5w.js +1 -0
- package/dist/public/assets/{sequenceDiagram-WJ2MYXX4-CGD6epTx.js → sequenceDiagram-WJ2MYXX4-CVzi2D1O.js} +1 -1
- package/dist/public/assets/{stateDiagram-D77RDMKH-BcQB6zAy.js → stateDiagram-D77RDMKH-DngjefeP.js} +1 -1
- package/dist/public/assets/stateDiagram-v2-MP3YSRHH--wHLryr3.js +1 -0
- package/dist/public/assets/{swimlanes-42K2YHIH-CH64A-ib.js → swimlanes-42K2YHIH-CyX5RiVy.js} +1 -1
- package/dist/public/assets/swimlanesDiagram-VR7AAH4N-BEtZV8RT.js +8 -0
- package/dist/public/assets/{switch-Cbf2XiYk.js → switch-5VXcu2UI.js} +1 -1
- package/dist/public/assets/{timeline-definition-24CTP7MA-Bwx2bFj5.js → timeline-definition-24CTP7MA-DhdTaBK5.js} +1 -1
- package/dist/public/assets/{treeView-Q6P3EWNA-xMDq_lmo.js → treeView-Q6P3EWNA-BlUF5psp.js} +1 -1
- package/dist/public/assets/{treemap-WGGIJYW6-2Nm-KmFC.js → treemap-WGGIJYW6-CBBJYmO9.js} +1 -1
- package/dist/public/assets/{tsMode-hIR7zVp-.js → tsMode-D_AutCCc.js} +1 -1
- package/dist/public/assets/{use-ui-state-yjATjSie.js → use-ui-state-DIucS4Z6.js} +1 -1
- package/dist/public/assets/{vennDiagram-4TSXK5OY-BJ_I3GhP.js → vennDiagram-4TSXK5OY-Qx2LbVrf.js} +1 -1
- package/dist/public/assets/{view-state-store-B972uFu5.js → view-state-store-Cu5yK2QF.js} +1 -1
- package/dist/public/assets/{wardley-WFR3VGLG-BunCz_zh.js → wardley-WFR3VGLG-COf-GTqU.js} +1 -1
- package/dist/public/assets/{wardleyDiagram-VM6X3IG4-DxgqzL3a.js → wardleyDiagram-VM6X3IG4-C4Qc2JCE.js} +1 -1
- package/dist/public/assets/{ws-BvrqdKhU.js → ws-BOTI-Z0Y.js} +1 -1
- package/dist/public/assets/{xychartDiagram-S5SC5T6Z-DqCBllTD.js → xychartDiagram-S5SC5T6Z-CDRnPbH3.js} +1 -1
- package/dist/public/index.html +2 -2
- package/package.json +1 -1
- package/dist/public/assets/FindWidget-9Ywn_ivQ.js +0 -1
- package/dist/public/assets/PaneEditorBody-ewLML4UF.js +0 -555
- package/dist/public/assets/SettingsDialog-CfjM1tX0.js +0 -8
- package/dist/public/assets/Terminal-ByNpeJX9.js +0 -61
- package/dist/public/assets/Workspace-keytr4i3.js +0 -20
- package/dist/public/assets/architecture-7GRP2DOG-MIdlSbNT.js +0 -1
- package/dist/public/assets/channel-N3bn9EDb.js +0 -1
- package/dist/public/assets/chunk-DU6HZSFF-Ca-rr7Zz.js +0 -125
- package/dist/public/assets/chunk-SHT3W25Y-yBu3YZFN.js +0 -168
- package/dist/public/assets/classDiagram-ZZMXUADV-DB1dQcGs.js +0 -1
- package/dist/public/assets/classDiagram-v2-VYDZK3BY-DB1dQcGs.js +0 -1
- package/dist/public/assets/eventmodeling-NTZA5JFV-DkPsptXM.js +0 -1
- package/dist/public/assets/flowDiagram-HODETNUW-Cos7ERss.js +0 -1
- package/dist/public/assets/index-DRbjjH1k.css +0 -2
- package/dist/public/assets/mermaid.core-BQCS3LpW.js +0 -11
- package/dist/public/assets/purify.es-sLXpNpJ5.js +0 -3
- package/dist/public/assets/railroad-abnf-HS5TGJTU-cLJl7G8r.js +0 -1
- package/dist/public/assets/railroad-ebnf-LZEXJU2U-C7AZtQYe.js +0 -1
- package/dist/public/assets/railroad-peg-WCYAUIDC-m1NYo-UH.js +0 -1
- package/dist/public/assets/selection-actions-Cqc4SzZ3.js +0 -1
- package/dist/public/assets/stateDiagram-v2-MP3YSRHH-BLJcIDB-.js +0 -1
- package/dist/public/assets/swimlanesDiagram-VR7AAH4N-B-XMrfmY.js +0 -8
- /package/dist/public/assets/{PaneEditorBody-Dz-67XSV.css → katex-Dz-67XSV.css} +0 -0
package/dist/public/assets/{pegDiagram-XKGWAZYB-DjeXy23-.js → pegDiagram-XKGWAZYB-BtqMklw1.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e,u as t}from"./mermaid-parser.core-
|
|
1
|
+
import{t as e,u as t}from"./mermaid-parser.core-ByJNQf82.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as r}from"./src-_wZywoZs.js";import"./chunk-DU6HZSFF-CBPmk1pL.js";import"./chunk-CLGD4ZFX-oFNi47Ux.js";import{n as i,r as a,t as o}from"./chunk-SVP7TREG-DA05MA7w.js";import{t as s}from"./chunk-JWPE2WC7-DVXcaiue.js";var c=t().RailroadPeg.parser.LangiumParser,l=n(e=>{let t=e.alternatives.map(u);return t.length===1?t[0]:{type:`choice`,alternatives:t}},`transformOrderedChoice`),u=n(e=>{let t=e.elements.map(d);return t.length===1?t[0]:{type:`sequence`,elements:t}},`transformSequence`),d=n(e=>{let t=p(e.suffix);return e.operator?{type:`special`,text:e.operator===`&`?`&${f(t)}`:`!${f(t)}`}:t},`transformPrefix`),f=n(e=>{switch(e.type){case`terminal`:return`"${e.value}"`;case`nonterminal`:return e.name;case`special`:return e.text;default:return`(...)`}},`nodeToLabel`),p=n(e=>{let t=m(e.primary);if(!e.operator)return t;switch(e.operator){case`?`:return{type:`optional`,element:t};case`*`:return{type:`repetition`,element:t,min:0,max:1/0};case`+`:return{type:`repetition`,element:t,min:1,max:1/0};default:throw Error(`Unsupported PEG suffix operator: ${e.operator}`)}},`transformSuffix`),m=n(e=>{switch(e.$type){case`PegLiteral`:return{type:`terminal`,value:e.value};case`PegIdentifier`:return{type:`nonterminal`,name:e.name};case`PegGroup`:return l(e.element);case`PegAny`:return{type:`special`,text:e.dot};default:throw Error(`Unsupported PEG primary node: ${e.$type}`)}},`transformPrimary`),h=n(e=>({name:e.name,definition:l(e.definition)}),`transformRule`),g=n(e=>{s(e,o),e.title&&o.setTitle(e.title),e.rules.map(e=>o.addRule(h(e)))},`populateDb`),_={parser:{parse:n(t=>{o.clear(),r.debug(`[PEG Parser] Starting Langium parse`);let n=c.parse(t);if(n.lexerErrors.length>0||n.parserErrors.length>0)throw new e(n);let i=n.value;r.debug(`[PEG Parser] Parsed rules:`,i.rules.length),g(i),r.debug(`[PEG Parser] Parse complete`)},`parse`),parser:{yy:o}},db:o,renderer:a,styles:i};export{_ as diagram};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./chunk-FOHPRMQF-CdD2_EOh.js";import{b as e}from"./mermaid-parser.core-
|
|
1
|
+
import"./chunk-FOHPRMQF-CdD2_EOh.js";import{b as e}from"./mermaid-parser.core-ByJNQf82.js";export{e as createPieServices};
|
package/dist/public/assets/{pieDiagram-E7YTZNPT-D3Wr8BWV.js → pieDiagram-E7YTZNPT-Dncu9vCX.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e}from"./mermaid-parser.core-
|
|
1
|
+
import{n as e}from"./mermaid-parser.core-ByJNQf82.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as n}from"./src-_wZywoZs.js";import{H as r,K as i,U as a,a as o,c as s,f as c,v as l,w as u,x as d,y as f}from"./chunk-DU6HZSFF-CBPmk1pL.js";import{t as p}from"./ordinal-hYBb2elL.js";import{n as m}from"./path-BWPyau1x.js";import{m as h}from"./dist-D9sYb5Oa.js";import{t as g}from"./arc-BjSQqbzd.js";import{t as _}from"./array-BifhSqXX.js";import{i as v,p as y}from"./chunk-75Z2AOVW-BORaUDn8.js";import{t as b}from"./chunk-CLGD4ZFX-oFNi47Ux.js";import{t as x}from"./chunk-JWPE2WC7-DVXcaiue.js";function S(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function C(e){return e}function w(){var e=C,t=S,n=null,r=m(0),i=m(h),a=m(0);function o(o){var s,c=(o=_(o)).length,l,u,d=0,f=Array(c),p=Array(c),m=+r.apply(this,arguments),g=Math.min(h,Math.max(-h,i.apply(this,arguments)-m)),v,y=Math.min(Math.abs(g)/c,a.apply(this,arguments)),b=y*(g<0?-1:1),x;for(s=0;s<c;++s)(x=p[f[s]=s]=+e(o[s],s,o))>0&&(d+=x);for(t==null?n!=null&&f.sort(function(e,t){return n(o[e],o[t])}):f.sort(function(e,n){return t(p[e],p[n])}),s=0,u=d?(g-c*b)/d:0;s<c;++s,m=v)l=f[s],x=p[l],v=m+(x>0?x*u:0)+b,p[l]={data:o[l],index:s,value:x,startAngle:m,endAngle:v,padAngle:y};return p}return o.value=function(t){return arguments.length?(e=typeof t==`function`?t:m(+t),o):e},o.sortValues=function(e){return arguments.length?(t=e,n=null,o):t},o.sort=function(e){return arguments.length?(n=e,t=null,o):n},o.startAngle=function(e){return arguments.length?(r=typeof e==`function`?e:m(+e),o):r},o.endAngle=function(e){return arguments.length?(i=typeof e==`function`?e:m(+e),o):i},o.padAngle=function(e){return arguments.length?(a=typeof e==`function`?e:m(+e),o):a},o}var T=c.pie,E={sections:new Map,showData:!1,config:T},D=E.sections,O=E.showData,k=structuredClone(T),A={getConfig:t(()=>structuredClone(k),`getConfig`),clear:t(()=>{D=new Map,O=E.showData,o()},`clear`),setDiagramTitle:i,getDiagramTitle:u,setAccTitle:a,getAccTitle:f,setAccDescription:r,getAccDescription:l,addSection:t(({label:e,value:t})=>{if(t<0)throw Error(`"${e}" has invalid value: ${t}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);D.has(e)||(D.set(e,t),n.debug(`added new section: ${e}, with value: ${t}`))},`addSection`),getSections:t(()=>D,`getSections`),setShowData:t(e=>{O=e},`setShowData`),getShowData:t(()=>O,`getShowData`)},j=t((e,t)=>{x(e,t),t.setShowData(e.showData),e.sections.map(t.addSection)},`populateDb`),M={parse:t(async t=>{let r=await e(`pie`,t);n.debug(r),j(r,A)},`parse`)},N=t(e=>`
|
|
2
2
|
.pieCircle{
|
|
3
3
|
stroke: ${e.pieStrokeColor};
|
|
4
4
|
stroke-width : ${e.pieStrokeWidth};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";import{t as n}from"./index-CL_uWson.js";import{t as r}from"./createLucideIcon-DyMAgLa3.js";var i=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,a=/^[\\/]{2}/;function o(e,t){return t+e.replace(/\\/g,`/`)}var s=`popstate`;function c(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function l(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return m(``,{pathname:r,search:i,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||`default`,n?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)}function n(e,t){return typeof t==`string`?t:h(t)}return _(t,n,null,e)}function u(e,t){if(e===!1||e==null)throw Error(t)}function d(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function f(){return Math.random().toString(36).substring(2,10)}function p(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function m(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?g(t):t,state:n,key:t&&t.key||r||f(),mask:i}}function h({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 g(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function _(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,l=`POP`,u=null,d=f();d??(d=0,o.replaceState({...o.state,idx:d},``));function f(){return(o.state||{idx:null}).idx}function h(){l=`POP`;let e=f(),t=e==null?null:e-d;d=e,u&&u({action:l,location:b.location,delta:t})}function g(e,t){l=`PUSH`;let r=c(e)?e:m(b.location,e,t);n&&n(r,e),d=f()+1;let s=p(r,d),h=b.createHref(r.mask||r);try{o.pushState(s,``,h)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(h)}a&&u&&u({action:l,location:b.location,delta:1})}function _(e,t){l=`REPLACE`;let r=c(e)?e:m(b.location,e,t);n&&n(r,e),d=f();let i=p(r,d),s=b.createHref(r.mask||r);o.replaceState(i,``,s),a&&u&&u({action:l,location:b.location,delta:0})}function y(e){return v(i,e)}let b={get action(){return l},get location(){return e(i,o)},listen(e){if(u)throw Error(`A history only accepts one active listener`);return i.addEventListener(s,h),u=e,()=>{i.removeEventListener(s,h),u=null}},createHref(e){return t(i,e)},createURL:y,encodeLocation(e){let t=y(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:g,replace:_,go(e){return o.go(e)}};return b}function v(e,t,n=!1){let r=`http://localhost`;e&&(r=e.location.origin===`null`?e.location.href:e.location.origin),u(r,`No window.location.(origin|href) available to create URL`);let i=typeof t==`string`?t:h(t);return i=i.replace(/ $/,`%20`),!n&&a.test(i)&&(i=r+i),new URL(i,r)}var y=e(t(),1);function b(e,t,n=`/`){return x(e,t,n,!1)}function x(e,t,n,r,i){let a=A((typeof t==`string`?g(t):t).pathname||`/`,n);if(a==null)return null;let o=i??C(e),s=null,c=fe(a);for(let e=0;s==null&&e<o.length;++e)s=le(o[e],c,r);return s}function S(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,loaderData:t[n.id],handle:n.handle}}function C(e){let t=w(e);return E(t),t}function w(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;u(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=N([r,c.relativePath]),d=n.concat(c);e.children&&e.children.length>0&&(u(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),w(e.children,t,d,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:se(l,e.index),routesMeta:d.map((e,t)=>{let[n,r]=de(e.relativePath,e.caseSensitive,t===d.length-1);return{...e,matcher:n,compiledParams:r}})})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of T(e.path))a(e,t,!0,n)}),t}function T(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=T(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function E(e){e.sort((e,t)=>e.score===t.score?ce(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var ee=/^:[\w-]+$/,te=/^:[\w-]+/,ne=3.5,D=3,O=2,re=1,ie=10,ae=-2,oe=e=>e===`*`;function se(e,t){let n=e.split(`/`),r=n.length;return n.some(oe)&&(r+=ae),t&&(r+=O),n.filter(e=>!oe(e)).reduce((e,t)=>e+(ee.test(t)?D:te.test(t)?ne:t===``?re:ie),r)}function ce(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function le(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u={path:s.relativePath,caseSensitive:s.caseSensitive,end:c},d=s.matcher&&s.compiledParams?ue(u,l,s.matcher,s.compiledParams):k(u,l),f=s.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=k({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!d)return null;Object.assign(i,d.params),o.push({params:i,pathname:N([a,d.pathname]),pathnameBase:ye(N([a,d.pathnameBase])),route:f}),d.pathnameBase!==`/`&&(a=N([a,d.pathnameBase]))}return o}function k(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=de(e.path,e.caseSensitive,e.end);return ue(e,t,n,r)}function ue(e,t,n,r){let i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,`$1`),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,`$1`)}let i=s[r];return n&&!i?e[t]=void 0:e[t]=(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function de(e,t=!1,n=!0){d(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/([\w-]+)\?(?=\/|$|\()/g,`(?:/$1)?`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function fe(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return d(!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 A(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}function pe(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?g(e):e,a;return n?(n=_e(n),a=n.startsWith(`/`)?me(n.substring(1),`/`):me(n,t)):a=t,{pathname:a,search:be(r),hash:xe(i)}}function me(e,t){let n=ve(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function j(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function he(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function ge(e){let t=he(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function M(e,t,n,r=!1){let i;typeof e==`string`?i=g(e):(i={...e},u(!i.pathname||!i.pathname.includes(`?`),j(`?`,`pathname`,`search`,i)),u(!i.pathname||!i.pathname.includes(`#`),j(`#`,`pathname`,`hash`,i)),u(!i.search||!i.search.includes(`#`),j(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=pe(i,s),l=o&&o!==`/`&&o.endsWith(`/`),d=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||d)&&(c.pathname+=`/`),c}var _e=e=>e.replace(/[\\/]{2,}/g,`/`),N=e=>_e(e.join(`/`)),ve=e=>e.replace(/\/+$/,``),ye=e=>ve(e).replace(/^\/*/,`/`),be=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,xe=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,Se=class{status;statusText;data;error;internal;constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function Ce(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function we(e){return N(e.map(e=>e.route.path).filter(Boolean))||`/`}var Te=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function Ee(e,t){let n=e;if(typeof n!=`string`||!i.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,s=!1;if(Te)try{let e=new URL(window.location.href),r=a.test(n)?new URL(o(n,e.protocol)):new URL(n),i=A(r.pathname,t);r.origin===e.origin&&i!=null?n=i+r.search+r.hash:s=!0}catch{d(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:s,to:n}}var De=[`POST`,`PUT`,`PATCH`,`DELETE`];new Set(De);var Oe=[`GET`,...De];new Set(Oe);var ke=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function Ae(e){try{return ke.includes(new URL(e).protocol)}catch{return!1}}var P=y.createContext(null);P.displayName=`DataRouter`;var F=y.createContext(null);F.displayName=`DataRouterState`;var je=y.createContext(!1);function Me(){return y.useContext(je)}var Ne=y.createContext({isTransitioning:!1});Ne.displayName=`ViewTransition`;var Pe=y.createContext(new Map);Pe.displayName=`Fetchers`;var Fe=y.createContext(null);Fe.displayName=`Await`;var I=y.createContext(null);I.displayName=`Navigation`;var L=y.createContext(null);L.displayName=`Location`;var R=y.createContext({outlet:null,matches:[],isDataRoute:!1});R.displayName=`Route`;var z=y.createContext(null);z.displayName=`RouteError`;var Ie=`REACT_ROUTER_ERROR`,Le=`REDIRECT`,Re=`ROUTE_ERROR_RESPONSE`;function ze(e){if(e.startsWith(`${Ie}:${Le}:{`))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 Be(e){if(e.startsWith(`${Ie}:${Re}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new Se(t.status,t.statusText,t.data)}catch{}}function Ve(e,{relative:t}={}){u(B(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=y.useContext(I),{hash:i,pathname:a,search:o}=H(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:N([n,a])),r.createHref({pathname:s,search:o,hash:i})}function B(){return y.useContext(L)!=null}function V(){return u(B(),`useLocation() may be used only in the context of a <Router> component.`),y.useContext(L).location}var He=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function Ue(){let{isDataRoute:e}=y.useContext(R);return e?ct():We()}function We(){u(B(),`useNavigate() may be used only in the context of a <Router> component.`);let e=y.useContext(P),{basename:t,navigator:n}=y.useContext(I),{matches:r}=y.useContext(R),{pathname:i}=V(),a=JSON.stringify(ge(r)),o=y.useRef(!1);return y.useLayoutEffect(()=>{o.current=!0}),y.useCallback((r,s={})=>{if(d(o.current,He),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=M(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:N([t,c.pathname])),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}var Ge=y.createContext(null);function Ke(e){let t=y.useContext(R).outlet;return y.useMemo(()=>t&&y.createElement(Ge.Provider,{value:e},t),[t,e])}function qe(){let{matches:e}=y.useContext(R);return e[e.length-1]?.params??{}}function H(e,{relative:t}={}){let{matches:n}=y.useContext(R),{pathname:r}=V(),i=JSON.stringify(ge(n));return y.useMemo(()=>M(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function Je(e,t){return Ye(e,t)}function Ye(e,t,n){u(B(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=y.useContext(I),{matches:i}=y.useContext(R),a=i[i.length-1],o=a?a.params:{};a&&a.pathname;let s=a?a.pathnameBase:`/`;a&&a.route;let c=V(),l;if(t){let e=typeof t==`string`?g(t):t;u(s===`/`||e.pathname?.startsWith(s),`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 "${s}" but pathname "${e.pathname}" was given in the \`location\` prop.`),l=e}else l=c;let d=l.pathname||`/`,f=d;if(s!==`/`){let e=s.replace(/^\//,``).split(`/`);f=`/`+d.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let p=n&&n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):b(e,{pathname:f}),m=tt(p&&p.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:N([s,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?s:N([s,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&m?y.createElement(L.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...l},navigationType:`POP`}},m):m}function Xe(){let e=st(),t=Ce(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null;return y.createElement(y.Fragment,null,y.createElement(`h2`,null,`Unexpected Application Error!`),y.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?y.createElement(`pre`,{style:{padding:`0.5rem`,backgroundColor:`rgba(200,200,200, 0.5)`}},n):null,null)}var Ze=y.createElement(Xe,null),Qe=class extends y.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static contextType=je;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?t.error:e.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`){let t=Be(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:y.createElement(R.Provider,{value:this.props.routeContext},y.createElement(z.Provider,{value:e,children:this.props.component}));return this.context?y.createElement($e,{error:e},t):t}},U=new WeakMap;function $e({children:e,error:t}){let{basename:n}=y.useContext(I);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=ze(t.digest);if(e){let r=U.get(t);if(r)throw r;let i=Ee(e.location,n),a=i.absoluteURL||i.to;if(Ae(a))throw Error(`Invalid redirect location`);if(Te&&!U.get(t))if(i.isExternal||e.reloadDocument)window.location.href=a;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw U.set(t,n),n}return y.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${a}`})}}return e}function et({routeContext:e,match:t,children:n}){let r=y.useContext(P);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),y.createElement(R.Provider,{value:e},n)}function tt(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);u(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(s=e),t.route.id){let{loaderData:e,errors:a}=r,c=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||a[t.route.id]===void 0);if(t.route.lazy||c){n.isStatic&&(o=!0),i=s>=0?i.slice(0,s+1):[i[0]];break}}}}let c=n?.onError,l=r&&c?(e,t)=>{c(e,{location:r.location,params:r.matches?.[0]?.params??{},pattern:we(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,c)=>{let u,d=!1,f=null,p=null;r&&(u=a&&n.route.id?a[n.route.id]:void 0,f=n.route.errorElement||Ze,o&&(s<0&&c===0?(ut(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,p=null):s===c&&(d=!0,p=n.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,c+1)),h=()=>{let t;return t=u?f:d?p:n.route.Component?y.createElement(n.route.Component,null):n.route.element?n.route.element:e,y.createElement(et,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?y.createElement(Qe,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):h()},null)}function W(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function nt(e){let t=y.useContext(P);return u(t,W(e)),t}function G(e){let t=y.useContext(F);return u(t,W(e)),t}function rt(e){let t=y.useContext(R);return u(t,W(e)),t}function K(e){let t=rt(e),n=t.matches[t.matches.length-1];return u(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function it(){return K(`useRouteId`)}function at(){let e=G(`useNavigation`);return y.useMemo(()=>{let{matches:t,historyAction:n,...r}=e.navigation;return r},[e.navigation])}function ot(){let{matches:e,loaderData:t}=G(`useMatches`);return y.useMemo(()=>e.map(e=>S(e,t)),[e,t])}function st(){let e=y.useContext(z),t=G(`useRouteError`),n=K(`useRouteError`);return e===void 0?t.errors?.[n]:e}function ct(){let{router:e}=nt(`useNavigate`),t=K(`useNavigate`),n=y.useRef(!1);return y.useLayoutEffect(()=>{n.current=!0}),y.useCallback(async(r,i={})=>{d(n.current,He),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var lt={};function ut(e,t,n){!t&&!lt[e]&&(lt[e]=!0,d(!1,n))}y.memo(dt);function dt({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:a}){return Ye(e,void 0,{manifest:t,state:r,isStatic:i,onError:a,future:n})}function ft(e){return Ke(e.context)}function pt(e){u(!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 mt({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,useTransitions:o}){u(!B(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=y.useMemo(()=>({basename:s,navigator:i,static:a,useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=g(n));let{pathname:l=`/`,search:f=``,hash:p=``,state:m=null,key:h=`default`,mask:_}=n,v=y.useMemo(()=>{let e=A(l,s);return e==null?null:{location:{pathname:e,search:f,hash:p,state:m,key:h,mask:_},navigationType:r}},[s,l,f,p,m,h,r,_]);return d(v!=null,`<Router basename="${s}"> is not able to match the URL "${l}${f}${p}" because it does not start with the basename, so the <Router> won't render anything.`),v==null?null:y.createElement(I.Provider,{value:c},y.createElement(L.Provider,{children:t,value:v}))}function ht({children:e,location:t}){return Je(q(e),t)}y.Component;function q(e,t=[]){let n=[];return y.Children.forEach(e,(e,r)=>{if(!y.isValidElement(e))return;let i=[...t,r];if(e.type===y.Fragment){n.push.apply(n,q(e.props.children,i));return}u(e.type===pt,`[${typeof e.type==`string`?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`);let a=e.props;u(!a.index||!a.children,`An index route cannot have child routes.`);let o={id:a.id||i.join(`-`),caseSensitive:a.caseSensitive,element:a.element,Component:a.Component,index:a.index,path:a.path,middleware:a.middleware,loader:a.loader,action:a.action,hydrateFallbackElement:a.hydrateFallbackElement,HydrateFallback:a.HydrateFallback,errorElement:a.errorElement,ErrorBoundary:a.ErrorBoundary,shouldRevalidate:a.shouldRevalidate,handle:a.handle,lazy:a.lazy};a.children&&(o.children=q(a.children,i)),n.push(o)}),n}var J=`application/x-www-form-urlencoded`;function Y(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function gt(e){return Y(e)&&e.tagName.toLowerCase()===`button`}function _t(e){return Y(e)&&e.tagName.toLowerCase()===`form`}function vt(e){return Y(e)&&e.tagName.toLowerCase()===`input`}function yt(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function bt(e,t){return e.button===0&&(!t||t===`_self`)&&!yt(e)}var X=null;function xt(){if(X===null)try{new FormData(document.createElement(`form`),0),X=!1}catch{X=!0}return X}var St=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function Ct(e){return e!=null&&!St.has(e)?(d(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${J}"`),null):e}function wt(e,t){let n,r,i,a,o;if(_t(e)){let o=e.getAttribute(`action`);r=o?A(o,t):null,n=e.getAttribute(`method`)||`get`,i=Ct(e.getAttribute(`enctype`))||J,a=new FormData(e)}else if(gt(e)||vt(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?A(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||`get`,i=Ct(e.getAttribute(`formenctype`))||Ct(o.getAttribute(`enctype`))||J,a=new FormData(o,e),!xt()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(Y(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=`get`,r=null,i=J,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}function Tt(e,t){if(e===!1||e==null)throw Error(t)}var Et={"&":`\\u0026`,">":`\\u003e`,"<":`\\u003c`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},Dt=/[&><\u2028\u2029]/g;function Ot(e){return e.replace(Dt,e=>Et[e])}function kt(e,t){let n=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return n.pathname.endsWith(`/`)?n.pathname=`${n.pathname}_.${t}`:n.pathname=`${n.pathname}.${t}`,n}async function At(e,t){if(e.id in t)return t[e.id];try{let r=await n(()=>import(e.module),[]);return t[e.id]=r,r}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function jt(e){return e!=null&&typeof e.page==`string`}function Mt(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 Nt(e,t,n){return Rt((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await At(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(Mt).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function Pt(e,t,n,r,i,a){let o=(e,t)=>!n[t]||e.route.id!==n[t].route.id,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function Ft(e,t,{includeHydrateFallback:n}={}){return It(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function It(e){return[...new Set(e)]}function Lt(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function Rt(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!jt(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(Lt(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function zt(){let e=y.useContext(P);return Tt(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function Bt(){let e=y.useContext(F);return Tt(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var Z=y.createContext(void 0);Z.displayName=`FrameworkContext`;function Vt(){let e=y.useContext(Z);return Tt(e,`You must render this element inside a <HydratedRouter> element`),e}function Ht(e,t){let n=y.useContext(Z),[r,i]=y.useState(!1),[a,o]=y.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:u,onTouchStart:d}=t,f=y.useRef(null);y.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[e]),y.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let p=()=>{i(!0)},m=()=>{i(!1),o(!1)};return n?e===`intent`?[a,f,{onFocus:Q(s,p),onBlur:Q(c,m),onMouseEnter:Q(l,p),onMouseLeave:Q(u,m),onTouchStart:Q(d,p)}]:[a,f,{}]:[!1,f,{}]}function Q(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Ut({page:e,...t}){let n=Me(),{nonce:r}=Vt(),{router:i}=zt(),a=y.useMemo(()=>b(i.routes,e,i.basename),[i.routes,e,i.basename]);return a?(t.nonce==null&&r&&(t={...t,nonce:r}),n?y.createElement(Gt,{page:e,matches:a,...t}):y.createElement(Kt,{page:e,matches:a,...t})):null}function Wt(e){let{manifest:t,routeModules:n}=Vt(),[r,i]=y.useState([]);return y.useEffect(()=>{let r=!1;return Nt(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function Gt({page:e,matches:t,...n}){let r=V(),i=y.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=kt(e,`rsc`),i=!1,a=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?i=!0:a.push(e.route.id);return i&&a.length>0&&n.searchParams.set(`_routes`,a.join(`,`)),[n.pathname+n.search]},[e,r,t]);return y.createElement(y.Fragment,null,i.map(e=>y.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function Kt({page:e,matches:t,...n}){let r=V(),{manifest:i,routeModules:a}=Vt(),{loaderData:o,matches:s}=Bt(),c=y.useMemo(()=>Pt(e,t,s,i,r,`data`),[e,t,s,i,r]),l=y.useMemo(()=>Pt(e,t,s,i,r,`assets`),[e,t,s,i,r]),u=y.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,s=!1;if(t.forEach(e=>{let t=i.routes[e.route.id];!t||!t.hasLoader||(!c.some(t=>t.route.id===e.route.id)&&e.route.id in o&&a[e.route.id]?.shouldRevalidate||t.hasClientLoader?s=!0:n.add(e.route.id))}),n.size===0)return[];let l=kt(e,`data`);return s&&n.size>0&&l.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[l.pathname+l.search]},[o,r,i,c,t,e,a]),d=y.useMemo(()=>Ft(l,i),[l,i]),f=Wt(l);return y.createElement(y.Fragment,null,u.map(e=>y.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),d.map(e=>y.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),f.map(({key:e,link:t})=>y.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function qt(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}var Jt=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{Jt&&(window.__reactRouterVersion=`8.2.0`)}catch{}function Yt({basename:e,children:t,useTransitions:n,window:r}){let i=y.useRef(null);i.current??=l({window:r,v5Compat:!0});let a=i.current,[o,s]=y.useState({action:a.action,location:a.location}),c=y.useCallback(e=>{n===!1?s(e):y.startTransition(()=>s(e))},[n]);return y.useLayoutEffect(()=>a.listen(c),[a,c]),y.createElement(mt,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:a,useTransitions:n})}function Xt({basename:e,children:t,history:n,useTransitions:r}){let[i,a]=y.useState({action:n.action,location:n.location}),o=y.useCallback(e=>{r===!1?a(e):y.startTransition(()=>a(e))},[r]);return y.useLayoutEffect(()=>n.listen(o),[n,o]),y.createElement(mt,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:n,useTransitions:r})}Xt.displayName=`unstable_HistoryRouter`;var Zt=y.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:a,replace:o,mask:s,state:c,target:l,to:u,preventScrollReset:d,viewTransition:f,defaultShouldRevalidate:p,...m},h){let{basename:g,navigator:_,useTransitions:v}=y.useContext(I),b=typeof u==`string`&&i.test(u),x=Ee(u,g);u=x.to;let S=Ve(u,{relative:r}),C=V(),w=null;if(s){let e=M(s,[],C.mask?C.mask.pathname:`/`,!0);g!==`/`&&(e.pathname=e.pathname===`/`?g:N([g,e.pathname])),w=_.createHref(e)}let[T,E,ee]=Ht(n,m),te=an(u,{replace:o,mask:s,state:c,target:l,preventScrollReset:d,relative:r,viewTransition:f,defaultShouldRevalidate:p,useTransitions:v});function ne(t){e&&e(t),t.defaultPrevented||te(t)}let D=!(x.isExternal||a),O=y.createElement(`a`,{...m,...ee,href:(D?w:void 0)||x.absoluteURL||S,onClick:D?ne:e,ref:qt(h,E),target:l,"data-discover":!b&&t===`render`?`true`:void 0});return T&&!b?y.createElement(y.Fragment,null,O,y.createElement(Ut,{page:S})):O});Zt.displayName=`Link`;var Qt=y.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:o,children:s,...c},l){let u=H(a,{relative:c.relative}),d=V(),f=y.useContext(F),{navigator:p,basename:m}=y.useContext(I),h=f!=null&&mn(u)&&o===!0,g=p.encodeLocation?p.encodeLocation(u).pathname:u.pathname,_=d.pathname,v=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;t||(_=_.toLowerCase(),v=v?v.toLowerCase():null,g=g.toLowerCase()),v&&m&&(v=A(v,m)||v);let b=g!==`/`&&g.endsWith(`/`)?g.length-1:g.length,x=_===g||!r&&_.startsWith(g)&&_.charAt(b)===`/`,S=v!=null&&(v===g||!r&&v.startsWith(g)&&v.charAt(g.length)===`/`),C={isActive:x,isPending:S,isTransitioning:h},w=x?e:void 0,T;T=typeof n==`function`?n(C):[n,x?`active`:null,S?`pending`:null,h?`transitioning`:null].filter(Boolean).join(` `);let E=typeof i==`function`?i(C):i;return y.createElement(Zt,{...c,"aria-current":w,className:T,ref:l,style:E,to:a,viewTransition:o},typeof s==`function`?s(C):s)});Qt.displayName=`NavLink`;var $t=y.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:a,state:o,method:s=`get`,action:c,onSubmit:l,relative:u,preventScrollReset:d,viewTransition:f,defaultShouldRevalidate:p,...m},h)=>{let{useTransitions:g}=y.useContext(I),_=cn(),v=ln(c,{relative:u}),b=s.toLowerCase()===`get`?`get`:`post`,x=typeof c==`string`&&i.test(c);return y.createElement(`form`,{ref:h,method:b,action:v,onSubmit:r?l:e=>{if(l&&l(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,i=r?.getAttribute(`formmethod`)||s,c=()=>_(r||e.currentTarget,{fetcherKey:t,method:i,navigate:n,replace:a,state:o,relative:u,preventScrollReset:d,viewTransition:f,defaultShouldRevalidate:p});g&&n!==!1?y.startTransition(()=>c()):c()},...m,"data-discover":!x&&e===`render`?`true`:void 0})});$t.displayName=`Form`;function en({getKey:e,storageKey:t,...n}){let r=y.useContext(Z),{basename:i}=y.useContext(I),a=V(),o=ot();fn({getKey:e,storageKey:t});let s=y.useMemo(()=>{if(!r||!e)return null;let t=dn(a,o,i,e);return t===a.key?null:t},[]);if(!r||r.isSpaMode)return null;let c=((e,t)=>{if(!window.history.state||!window.history.state.key){let e=Math.random().toString(32).slice(2);window.history.replaceState({key:e},``)}try{let n=JSON.parse(sessionStorage.getItem(e)||`{}`)[t||window.history.state.key];typeof n==`number`&&window.scrollTo(0,n)}catch(t){console.error(t),sessionStorage.removeItem(e)}}).toString();return n.nonce==null&&r?.nonce&&(n.nonce=r.nonce),y.createElement(`script`,{...n,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${c})(${Ot(JSON.stringify(t||un))}, ${Ot(JSON.stringify(s))})`}})}en.displayName=`ScrollRestoration`;function tn(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function nn(e){let t=y.useContext(P);return u(t,tn(e)),t}function rn(e){let t=y.useContext(F);return u(t,tn(e)),t}function an(e,{target:t,replace:n,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c,useTransitions:l}={}){let u=Ue(),d=V(),f=H(e,{relative:o});return y.useCallback(p=>{if(bt(p,t)){p.preventDefault();let t=n===void 0?h(d)===h(f):n,m=()=>u(e,{replace:t,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c});l?y.startTransition(()=>m()):m()}},[d,u,f,n,r,i,t,e,a,o,s,c,l])}var on=0,sn=()=>`__${String(++on)}__`;function cn(){let{router:e}=nn(`useSubmit`),{basename:t}=y.useContext(I),n=it(),r=e.fetch,i=e.navigate;return y.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=wt(e,t);a.navigate===!1?await r(a.fetcherKey||sn(),n,a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync}):await i(a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function ln(e,{relative:t}={}){let{basename:n}=y.useContext(I),r=y.useContext(R);u(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...H(e||`.`,{relative:t})},o=V();if(e==null){a.search=o.search;let e=new URLSearchParams(a.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:N([n,a.pathname])),h(a)}var un=`react-router-scroll-positions`,$={};function dn(e,t,n,r){let i=null;return r&&(i=r(n===`/`?e:{...e,pathname:A(e.pathname,n)||e.pathname},t)),i??=e.key,i}function fn({getKey:e,storageKey:t}={}){let{router:n}=nn(`useScrollRestoration`),{restoreScrollPosition:r,preventScrollReset:i}=rn(`useScrollRestoration`),{basename:a}=y.useContext(I),o=V(),s=ot(),c=at();y.useEffect(()=>(window.history.scrollRestoration=`manual`,()=>{window.history.scrollRestoration=`auto`}),[]),pn(y.useCallback(()=>{if(c.state===`idle`){let t=dn(o,s,a,e);$[t]=window.scrollY}try{sessionStorage.setItem(t||un,JSON.stringify($))}catch(e){d(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${e}).`)}window.history.scrollRestoration=`auto`},[c.state,e,a,o,s,t])),typeof document<`u`&&(y.useLayoutEffect(()=>{try{let e=sessionStorage.getItem(t||un);e&&($=JSON.parse(e))}catch{}},[t]),y.useLayoutEffect(()=>{let t=n?.enableScrollRestoration($,()=>window.scrollY,e?(t,n)=>dn(t,n,a,e):void 0);return()=>t&&t()},[n,a,e]),y.useLayoutEffect(()=>{if(r!==!1){if(typeof r==`number`){window.scrollTo(0,r);return}try{if(o.hash){let e=document.getElementById(decodeURIComponent(o.hash.slice(1)));if(e){e.scrollIntoView();return}}}catch{d(!1,`"${o.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}i!==!0&&window.scrollTo(0,0)}},[o,r,i]))}function pn(e,t){let{capture:n}=t||{};y.useEffect(()=>{let t=n==null?void 0:{capture:n};return window.addEventListener(`pagehide`,e,t),()=>{window.removeEventListener(`pagehide`,e,t)}},[e,n])}function mn(e,{relative:t}={}){let n=y.useContext(Ne);u(n!=null,"`useViewTransitionState` must be used within `react-router/dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=nn(`useViewTransitionState`),i=H(e,{relative:t});if(!n.isTransitioning)return!1;let a=A(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=A(n.nextLocation.pathname,r)||n.nextLocation.pathname;return k(i.pathname,o)!=null||k(i.pathname,a)!=null}var hn=r(`corner-left-up`,[[`path`,{d:`M14 9 9 4 4 9`,key:`1af5af`}],[`path`,{d:`M20 20h-7a4 4 0 0 1-4-4V4`,key:`1blwi3`}]]),gn=r(`folder-open`,[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]),_n=r(`square-terminal`,[[`path`,{d:`m7 11 2-2-2-2`,key:`1lz0vl`}],[`path`,{d:`M11 13h4`,key:`1p7l4v`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}]]);function vn(e){return e.trim().slice(0,5).toUpperCase()}function yn(e){return e.abbrev??vn(e.name)}function bn(e){return e.trim().toUpperCase().slice(0,5)}export{gn as a,Zt as c,ht as d,V as f,_n as i,ft as l,qe as m,bn as n,hn as o,Ue as p,yn as r,Yt as s,vn as t,pt as u};
|
|
1
|
+
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";import{t as n}from"./index-DimSEdqL.js";import{t as r}from"./createLucideIcon-DyMAgLa3.js";var i=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,a=/^[\\/]{2}/;function o(e,t){return t+e.replace(/\\/g,`/`)}var s=`popstate`;function c(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function l(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return m(``,{pathname:r,search:i,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||`default`,n?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)}function n(e,t){return typeof t==`string`?t:h(t)}return _(t,n,null,e)}function u(e,t){if(e===!1||e==null)throw Error(t)}function d(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function f(){return Math.random().toString(36).substring(2,10)}function p(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function m(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?g(t):t,state:n,key:t&&t.key||r||f(),mask:i}}function h({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 g(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function _(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,l=`POP`,u=null,d=f();d??(d=0,o.replaceState({...o.state,idx:d},``));function f(){return(o.state||{idx:null}).idx}function h(){l=`POP`;let e=f(),t=e==null?null:e-d;d=e,u&&u({action:l,location:b.location,delta:t})}function g(e,t){l=`PUSH`;let r=c(e)?e:m(b.location,e,t);n&&n(r,e),d=f()+1;let s=p(r,d),h=b.createHref(r.mask||r);try{o.pushState(s,``,h)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(h)}a&&u&&u({action:l,location:b.location,delta:1})}function _(e,t){l=`REPLACE`;let r=c(e)?e:m(b.location,e,t);n&&n(r,e),d=f();let i=p(r,d),s=b.createHref(r.mask||r);o.replaceState(i,``,s),a&&u&&u({action:l,location:b.location,delta:0})}function y(e){return v(i,e)}let b={get action(){return l},get location(){return e(i,o)},listen(e){if(u)throw Error(`A history only accepts one active listener`);return i.addEventListener(s,h),u=e,()=>{i.removeEventListener(s,h),u=null}},createHref(e){return t(i,e)},createURL:y,encodeLocation(e){let t=y(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:g,replace:_,go(e){return o.go(e)}};return b}function v(e,t,n=!1){let r=`http://localhost`;e&&(r=e.location.origin===`null`?e.location.href:e.location.origin),u(r,`No window.location.(origin|href) available to create URL`);let i=typeof t==`string`?t:h(t);return i=i.replace(/ $/,`%20`),!n&&a.test(i)&&(i=r+i),new URL(i,r)}var y=e(t(),1);function b(e,t,n=`/`){return x(e,t,n,!1)}function x(e,t,n,r,i){let a=A((typeof t==`string`?g(t):t).pathname||`/`,n);if(a==null)return null;let o=i??C(e),s=null,c=fe(a);for(let e=0;s==null&&e<o.length;++e)s=le(o[e],c,r);return s}function S(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,loaderData:t[n.id],handle:n.handle}}function C(e){let t=w(e);return E(t),t}function w(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;u(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=N([r,c.relativePath]),d=n.concat(c);e.children&&e.children.length>0&&(u(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),w(e.children,t,d,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:se(l,e.index),routesMeta:d.map((e,t)=>{let[n,r]=de(e.relativePath,e.caseSensitive,t===d.length-1);return{...e,matcher:n,compiledParams:r}})})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of T(e.path))a(e,t,!0,n)}),t}function T(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=T(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function E(e){e.sort((e,t)=>e.score===t.score?ce(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var ee=/^:[\w-]+$/,te=/^:[\w-]+/,ne=3.5,D=3,O=2,re=1,ie=10,ae=-2,oe=e=>e===`*`;function se(e,t){let n=e.split(`/`),r=n.length;return n.some(oe)&&(r+=ae),t&&(r+=O),n.filter(e=>!oe(e)).reduce((e,t)=>e+(ee.test(t)?D:te.test(t)?ne:t===``?re:ie),r)}function ce(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function le(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u={path:s.relativePath,caseSensitive:s.caseSensitive,end:c},d=s.matcher&&s.compiledParams?ue(u,l,s.matcher,s.compiledParams):k(u,l),f=s.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=k({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!d)return null;Object.assign(i,d.params),o.push({params:i,pathname:N([a,d.pathname]),pathnameBase:ye(N([a,d.pathnameBase])),route:f}),d.pathnameBase!==`/`&&(a=N([a,d.pathnameBase]))}return o}function k(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=de(e.path,e.caseSensitive,e.end);return ue(e,t,n,r)}function ue(e,t,n,r){let i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,`$1`),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,`$1`)}let i=s[r];return n&&!i?e[t]=void 0:e[t]=(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function de(e,t=!1,n=!0){d(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/([\w-]+)\?(?=\/|$|\()/g,`(?:/$1)?`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function fe(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return d(!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 A(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}function pe(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?g(e):e,a;return n?(n=_e(n),a=n.startsWith(`/`)?me(n.substring(1),`/`):me(n,t)):a=t,{pathname:a,search:be(r),hash:xe(i)}}function me(e,t){let n=ve(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function j(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function he(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function ge(e){let t=he(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function M(e,t,n,r=!1){let i;typeof e==`string`?i=g(e):(i={...e},u(!i.pathname||!i.pathname.includes(`?`),j(`?`,`pathname`,`search`,i)),u(!i.pathname||!i.pathname.includes(`#`),j(`#`,`pathname`,`hash`,i)),u(!i.search||!i.search.includes(`#`),j(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=pe(i,s),l=o&&o!==`/`&&o.endsWith(`/`),d=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||d)&&(c.pathname+=`/`),c}var _e=e=>e.replace(/[\\/]{2,}/g,`/`),N=e=>_e(e.join(`/`)),ve=e=>e.replace(/\/+$/,``),ye=e=>ve(e).replace(/^\/*/,`/`),be=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,xe=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,Se=class{status;statusText;data;error;internal;constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function Ce(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function we(e){return N(e.map(e=>e.route.path).filter(Boolean))||`/`}var Te=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function Ee(e,t){let n=e;if(typeof n!=`string`||!i.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,s=!1;if(Te)try{let e=new URL(window.location.href),r=a.test(n)?new URL(o(n,e.protocol)):new URL(n),i=A(r.pathname,t);r.origin===e.origin&&i!=null?n=i+r.search+r.hash:s=!0}catch{d(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:s,to:n}}var De=[`POST`,`PUT`,`PATCH`,`DELETE`];new Set(De);var Oe=[`GET`,...De];new Set(Oe);var ke=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function Ae(e){try{return ke.includes(new URL(e).protocol)}catch{return!1}}var P=y.createContext(null);P.displayName=`DataRouter`;var F=y.createContext(null);F.displayName=`DataRouterState`;var je=y.createContext(!1);function Me(){return y.useContext(je)}var Ne=y.createContext({isTransitioning:!1});Ne.displayName=`ViewTransition`;var Pe=y.createContext(new Map);Pe.displayName=`Fetchers`;var Fe=y.createContext(null);Fe.displayName=`Await`;var I=y.createContext(null);I.displayName=`Navigation`;var L=y.createContext(null);L.displayName=`Location`;var R=y.createContext({outlet:null,matches:[],isDataRoute:!1});R.displayName=`Route`;var z=y.createContext(null);z.displayName=`RouteError`;var Ie=`REACT_ROUTER_ERROR`,Le=`REDIRECT`,Re=`ROUTE_ERROR_RESPONSE`;function ze(e){if(e.startsWith(`${Ie}:${Le}:{`))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 Be(e){if(e.startsWith(`${Ie}:${Re}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new Se(t.status,t.statusText,t.data)}catch{}}function Ve(e,{relative:t}={}){u(B(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=y.useContext(I),{hash:i,pathname:a,search:o}=H(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:N([n,a])),r.createHref({pathname:s,search:o,hash:i})}function B(){return y.useContext(L)!=null}function V(){return u(B(),`useLocation() may be used only in the context of a <Router> component.`),y.useContext(L).location}var He=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function Ue(){let{isDataRoute:e}=y.useContext(R);return e?ct():We()}function We(){u(B(),`useNavigate() may be used only in the context of a <Router> component.`);let e=y.useContext(P),{basename:t,navigator:n}=y.useContext(I),{matches:r}=y.useContext(R),{pathname:i}=V(),a=JSON.stringify(ge(r)),o=y.useRef(!1);return y.useLayoutEffect(()=>{o.current=!0}),y.useCallback((r,s={})=>{if(d(o.current,He),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=M(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:N([t,c.pathname])),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}var Ge=y.createContext(null);function Ke(e){let t=y.useContext(R).outlet;return y.useMemo(()=>t&&y.createElement(Ge.Provider,{value:e},t),[t,e])}function qe(){let{matches:e}=y.useContext(R);return e[e.length-1]?.params??{}}function H(e,{relative:t}={}){let{matches:n}=y.useContext(R),{pathname:r}=V(),i=JSON.stringify(ge(n));return y.useMemo(()=>M(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function Je(e,t){return Ye(e,t)}function Ye(e,t,n){u(B(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=y.useContext(I),{matches:i}=y.useContext(R),a=i[i.length-1],o=a?a.params:{};a&&a.pathname;let s=a?a.pathnameBase:`/`;a&&a.route;let c=V(),l;if(t){let e=typeof t==`string`?g(t):t;u(s===`/`||e.pathname?.startsWith(s),`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 "${s}" but pathname "${e.pathname}" was given in the \`location\` prop.`),l=e}else l=c;let d=l.pathname||`/`,f=d;if(s!==`/`){let e=s.replace(/^\//,``).split(`/`);f=`/`+d.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let p=n&&n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):b(e,{pathname:f}),m=tt(p&&p.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:N([s,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?s:N([s,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&m?y.createElement(L.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...l},navigationType:`POP`}},m):m}function Xe(){let e=st(),t=Ce(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null;return y.createElement(y.Fragment,null,y.createElement(`h2`,null,`Unexpected Application Error!`),y.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?y.createElement(`pre`,{style:{padding:`0.5rem`,backgroundColor:`rgba(200,200,200, 0.5)`}},n):null,null)}var Ze=y.createElement(Xe,null),Qe=class extends y.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static contextType=je;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?t.error:e.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`){let t=Be(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:y.createElement(R.Provider,{value:this.props.routeContext},y.createElement(z.Provider,{value:e,children:this.props.component}));return this.context?y.createElement($e,{error:e},t):t}},U=new WeakMap;function $e({children:e,error:t}){let{basename:n}=y.useContext(I);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=ze(t.digest);if(e){let r=U.get(t);if(r)throw r;let i=Ee(e.location,n),a=i.absoluteURL||i.to;if(Ae(a))throw Error(`Invalid redirect location`);if(Te&&!U.get(t))if(i.isExternal||e.reloadDocument)window.location.href=a;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw U.set(t,n),n}return y.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${a}`})}}return e}function et({routeContext:e,match:t,children:n}){let r=y.useContext(P);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),y.createElement(R.Provider,{value:e},n)}function tt(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);u(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(s=e),t.route.id){let{loaderData:e,errors:a}=r,c=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||a[t.route.id]===void 0);if(t.route.lazy||c){n.isStatic&&(o=!0),i=s>=0?i.slice(0,s+1):[i[0]];break}}}}let c=n?.onError,l=r&&c?(e,t)=>{c(e,{location:r.location,params:r.matches?.[0]?.params??{},pattern:we(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,c)=>{let u,d=!1,f=null,p=null;r&&(u=a&&n.route.id?a[n.route.id]:void 0,f=n.route.errorElement||Ze,o&&(s<0&&c===0?(ut(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,p=null):s===c&&(d=!0,p=n.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,c+1)),h=()=>{let t;return t=u?f:d?p:n.route.Component?y.createElement(n.route.Component,null):n.route.element?n.route.element:e,y.createElement(et,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?y.createElement(Qe,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):h()},null)}function W(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function nt(e){let t=y.useContext(P);return u(t,W(e)),t}function G(e){let t=y.useContext(F);return u(t,W(e)),t}function rt(e){let t=y.useContext(R);return u(t,W(e)),t}function K(e){let t=rt(e),n=t.matches[t.matches.length-1];return u(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function it(){return K(`useRouteId`)}function at(){let e=G(`useNavigation`);return y.useMemo(()=>{let{matches:t,historyAction:n,...r}=e.navigation;return r},[e.navigation])}function ot(){let{matches:e,loaderData:t}=G(`useMatches`);return y.useMemo(()=>e.map(e=>S(e,t)),[e,t])}function st(){let e=y.useContext(z),t=G(`useRouteError`),n=K(`useRouteError`);return e===void 0?t.errors?.[n]:e}function ct(){let{router:e}=nt(`useNavigate`),t=K(`useNavigate`),n=y.useRef(!1);return y.useLayoutEffect(()=>{n.current=!0}),y.useCallback(async(r,i={})=>{d(n.current,He),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var lt={};function ut(e,t,n){!t&&!lt[e]&&(lt[e]=!0,d(!1,n))}y.memo(dt);function dt({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:a}){return Ye(e,void 0,{manifest:t,state:r,isStatic:i,onError:a,future:n})}function ft(e){return Ke(e.context)}function pt(e){u(!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 mt({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,useTransitions:o}){u(!B(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=y.useMemo(()=>({basename:s,navigator:i,static:a,useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=g(n));let{pathname:l=`/`,search:f=``,hash:p=``,state:m=null,key:h=`default`,mask:_}=n,v=y.useMemo(()=>{let e=A(l,s);return e==null?null:{location:{pathname:e,search:f,hash:p,state:m,key:h,mask:_},navigationType:r}},[s,l,f,p,m,h,r,_]);return d(v!=null,`<Router basename="${s}"> is not able to match the URL "${l}${f}${p}" because it does not start with the basename, so the <Router> won't render anything.`),v==null?null:y.createElement(I.Provider,{value:c},y.createElement(L.Provider,{children:t,value:v}))}function ht({children:e,location:t}){return Je(q(e),t)}y.Component;function q(e,t=[]){let n=[];return y.Children.forEach(e,(e,r)=>{if(!y.isValidElement(e))return;let i=[...t,r];if(e.type===y.Fragment){n.push.apply(n,q(e.props.children,i));return}u(e.type===pt,`[${typeof e.type==`string`?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`);let a=e.props;u(!a.index||!a.children,`An index route cannot have child routes.`);let o={id:a.id||i.join(`-`),caseSensitive:a.caseSensitive,element:a.element,Component:a.Component,index:a.index,path:a.path,middleware:a.middleware,loader:a.loader,action:a.action,hydrateFallbackElement:a.hydrateFallbackElement,HydrateFallback:a.HydrateFallback,errorElement:a.errorElement,ErrorBoundary:a.ErrorBoundary,shouldRevalidate:a.shouldRevalidate,handle:a.handle,lazy:a.lazy};a.children&&(o.children=q(a.children,i)),n.push(o)}),n}var J=`application/x-www-form-urlencoded`;function Y(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function gt(e){return Y(e)&&e.tagName.toLowerCase()===`button`}function _t(e){return Y(e)&&e.tagName.toLowerCase()===`form`}function vt(e){return Y(e)&&e.tagName.toLowerCase()===`input`}function yt(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function bt(e,t){return e.button===0&&(!t||t===`_self`)&&!yt(e)}var X=null;function xt(){if(X===null)try{new FormData(document.createElement(`form`),0),X=!1}catch{X=!0}return X}var St=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function Ct(e){return e!=null&&!St.has(e)?(d(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${J}"`),null):e}function wt(e,t){let n,r,i,a,o;if(_t(e)){let o=e.getAttribute(`action`);r=o?A(o,t):null,n=e.getAttribute(`method`)||`get`,i=Ct(e.getAttribute(`enctype`))||J,a=new FormData(e)}else if(gt(e)||vt(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?A(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||`get`,i=Ct(e.getAttribute(`formenctype`))||Ct(o.getAttribute(`enctype`))||J,a=new FormData(o,e),!xt()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(Y(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=`get`,r=null,i=J,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}function Tt(e,t){if(e===!1||e==null)throw Error(t)}var Et={"&":`\\u0026`,">":`\\u003e`,"<":`\\u003c`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},Dt=/[&><\u2028\u2029]/g;function Ot(e){return e.replace(Dt,e=>Et[e])}function kt(e,t){let n=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return n.pathname.endsWith(`/`)?n.pathname=`${n.pathname}_.${t}`:n.pathname=`${n.pathname}.${t}`,n}async function At(e,t){if(e.id in t)return t[e.id];try{let r=await n(()=>import(e.module),[]);return t[e.id]=r,r}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function jt(e){return e!=null&&typeof e.page==`string`}function Mt(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 Nt(e,t,n){return Rt((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await At(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(Mt).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function Pt(e,t,n,r,i,a){let o=(e,t)=>!n[t]||e.route.id!==n[t].route.id,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function Ft(e,t,{includeHydrateFallback:n}={}){return It(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function It(e){return[...new Set(e)]}function Lt(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function Rt(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!jt(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(Lt(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function zt(){let e=y.useContext(P);return Tt(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function Bt(){let e=y.useContext(F);return Tt(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var Z=y.createContext(void 0);Z.displayName=`FrameworkContext`;function Vt(){let e=y.useContext(Z);return Tt(e,`You must render this element inside a <HydratedRouter> element`),e}function Ht(e,t){let n=y.useContext(Z),[r,i]=y.useState(!1),[a,o]=y.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:u,onTouchStart:d}=t,f=y.useRef(null);y.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[e]),y.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let p=()=>{i(!0)},m=()=>{i(!1),o(!1)};return n?e===`intent`?[a,f,{onFocus:Q(s,p),onBlur:Q(c,m),onMouseEnter:Q(l,p),onMouseLeave:Q(u,m),onTouchStart:Q(d,p)}]:[a,f,{}]:[!1,f,{}]}function Q(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Ut({page:e,...t}){let n=Me(),{nonce:r}=Vt(),{router:i}=zt(),a=y.useMemo(()=>b(i.routes,e,i.basename),[i.routes,e,i.basename]);return a?(t.nonce==null&&r&&(t={...t,nonce:r}),n?y.createElement(Gt,{page:e,matches:a,...t}):y.createElement(Kt,{page:e,matches:a,...t})):null}function Wt(e){let{manifest:t,routeModules:n}=Vt(),[r,i]=y.useState([]);return y.useEffect(()=>{let r=!1;return Nt(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function Gt({page:e,matches:t,...n}){let r=V(),i=y.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=kt(e,`rsc`),i=!1,a=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?i=!0:a.push(e.route.id);return i&&a.length>0&&n.searchParams.set(`_routes`,a.join(`,`)),[n.pathname+n.search]},[e,r,t]);return y.createElement(y.Fragment,null,i.map(e=>y.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function Kt({page:e,matches:t,...n}){let r=V(),{manifest:i,routeModules:a}=Vt(),{loaderData:o,matches:s}=Bt(),c=y.useMemo(()=>Pt(e,t,s,i,r,`data`),[e,t,s,i,r]),l=y.useMemo(()=>Pt(e,t,s,i,r,`assets`),[e,t,s,i,r]),u=y.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,s=!1;if(t.forEach(e=>{let t=i.routes[e.route.id];!t||!t.hasLoader||(!c.some(t=>t.route.id===e.route.id)&&e.route.id in o&&a[e.route.id]?.shouldRevalidate||t.hasClientLoader?s=!0:n.add(e.route.id))}),n.size===0)return[];let l=kt(e,`data`);return s&&n.size>0&&l.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[l.pathname+l.search]},[o,r,i,c,t,e,a]),d=y.useMemo(()=>Ft(l,i),[l,i]),f=Wt(l);return y.createElement(y.Fragment,null,u.map(e=>y.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),d.map(e=>y.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),f.map(({key:e,link:t})=>y.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function qt(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}var Jt=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{Jt&&(window.__reactRouterVersion=`8.2.0`)}catch{}function Yt({basename:e,children:t,useTransitions:n,window:r}){let i=y.useRef(null);i.current??=l({window:r,v5Compat:!0});let a=i.current,[o,s]=y.useState({action:a.action,location:a.location}),c=y.useCallback(e=>{n===!1?s(e):y.startTransition(()=>s(e))},[n]);return y.useLayoutEffect(()=>a.listen(c),[a,c]),y.createElement(mt,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:a,useTransitions:n})}function Xt({basename:e,children:t,history:n,useTransitions:r}){let[i,a]=y.useState({action:n.action,location:n.location}),o=y.useCallback(e=>{r===!1?a(e):y.startTransition(()=>a(e))},[r]);return y.useLayoutEffect(()=>n.listen(o),[n,o]),y.createElement(mt,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:n,useTransitions:r})}Xt.displayName=`unstable_HistoryRouter`;var Zt=y.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:a,replace:o,mask:s,state:c,target:l,to:u,preventScrollReset:d,viewTransition:f,defaultShouldRevalidate:p,...m},h){let{basename:g,navigator:_,useTransitions:v}=y.useContext(I),b=typeof u==`string`&&i.test(u),x=Ee(u,g);u=x.to;let S=Ve(u,{relative:r}),C=V(),w=null;if(s){let e=M(s,[],C.mask?C.mask.pathname:`/`,!0);g!==`/`&&(e.pathname=e.pathname===`/`?g:N([g,e.pathname])),w=_.createHref(e)}let[T,E,ee]=Ht(n,m),te=an(u,{replace:o,mask:s,state:c,target:l,preventScrollReset:d,relative:r,viewTransition:f,defaultShouldRevalidate:p,useTransitions:v});function ne(t){e&&e(t),t.defaultPrevented||te(t)}let D=!(x.isExternal||a),O=y.createElement(`a`,{...m,...ee,href:(D?w:void 0)||x.absoluteURL||S,onClick:D?ne:e,ref:qt(h,E),target:l,"data-discover":!b&&t===`render`?`true`:void 0});return T&&!b?y.createElement(y.Fragment,null,O,y.createElement(Ut,{page:S})):O});Zt.displayName=`Link`;var Qt=y.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:o,children:s,...c},l){let u=H(a,{relative:c.relative}),d=V(),f=y.useContext(F),{navigator:p,basename:m}=y.useContext(I),h=f!=null&&mn(u)&&o===!0,g=p.encodeLocation?p.encodeLocation(u).pathname:u.pathname,_=d.pathname,v=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;t||(_=_.toLowerCase(),v=v?v.toLowerCase():null,g=g.toLowerCase()),v&&m&&(v=A(v,m)||v);let b=g!==`/`&&g.endsWith(`/`)?g.length-1:g.length,x=_===g||!r&&_.startsWith(g)&&_.charAt(b)===`/`,S=v!=null&&(v===g||!r&&v.startsWith(g)&&v.charAt(g.length)===`/`),C={isActive:x,isPending:S,isTransitioning:h},w=x?e:void 0,T;T=typeof n==`function`?n(C):[n,x?`active`:null,S?`pending`:null,h?`transitioning`:null].filter(Boolean).join(` `);let E=typeof i==`function`?i(C):i;return y.createElement(Zt,{...c,"aria-current":w,className:T,ref:l,style:E,to:a,viewTransition:o},typeof s==`function`?s(C):s)});Qt.displayName=`NavLink`;var $t=y.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:a,state:o,method:s=`get`,action:c,onSubmit:l,relative:u,preventScrollReset:d,viewTransition:f,defaultShouldRevalidate:p,...m},h)=>{let{useTransitions:g}=y.useContext(I),_=cn(),v=ln(c,{relative:u}),b=s.toLowerCase()===`get`?`get`:`post`,x=typeof c==`string`&&i.test(c);return y.createElement(`form`,{ref:h,method:b,action:v,onSubmit:r?l:e=>{if(l&&l(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,i=r?.getAttribute(`formmethod`)||s,c=()=>_(r||e.currentTarget,{fetcherKey:t,method:i,navigate:n,replace:a,state:o,relative:u,preventScrollReset:d,viewTransition:f,defaultShouldRevalidate:p});g&&n!==!1?y.startTransition(()=>c()):c()},...m,"data-discover":!x&&e===`render`?`true`:void 0})});$t.displayName=`Form`;function en({getKey:e,storageKey:t,...n}){let r=y.useContext(Z),{basename:i}=y.useContext(I),a=V(),o=ot();fn({getKey:e,storageKey:t});let s=y.useMemo(()=>{if(!r||!e)return null;let t=dn(a,o,i,e);return t===a.key?null:t},[]);if(!r||r.isSpaMode)return null;let c=((e,t)=>{if(!window.history.state||!window.history.state.key){let e=Math.random().toString(32).slice(2);window.history.replaceState({key:e},``)}try{let n=JSON.parse(sessionStorage.getItem(e)||`{}`)[t||window.history.state.key];typeof n==`number`&&window.scrollTo(0,n)}catch(t){console.error(t),sessionStorage.removeItem(e)}}).toString();return n.nonce==null&&r?.nonce&&(n.nonce=r.nonce),y.createElement(`script`,{...n,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${c})(${Ot(JSON.stringify(t||un))}, ${Ot(JSON.stringify(s))})`}})}en.displayName=`ScrollRestoration`;function tn(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function nn(e){let t=y.useContext(P);return u(t,tn(e)),t}function rn(e){let t=y.useContext(F);return u(t,tn(e)),t}function an(e,{target:t,replace:n,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c,useTransitions:l}={}){let u=Ue(),d=V(),f=H(e,{relative:o});return y.useCallback(p=>{if(bt(p,t)){p.preventDefault();let t=n===void 0?h(d)===h(f):n,m=()=>u(e,{replace:t,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c});l?y.startTransition(()=>m()):m()}},[d,u,f,n,r,i,t,e,a,o,s,c,l])}var on=0,sn=()=>`__${String(++on)}__`;function cn(){let{router:e}=nn(`useSubmit`),{basename:t}=y.useContext(I),n=it(),r=e.fetch,i=e.navigate;return y.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=wt(e,t);a.navigate===!1?await r(a.fetcherKey||sn(),n,a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync}):await i(a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function ln(e,{relative:t}={}){let{basename:n}=y.useContext(I),r=y.useContext(R);u(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...H(e||`.`,{relative:t})},o=V();if(e==null){a.search=o.search;let e=new URLSearchParams(a.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:N([n,a.pathname])),h(a)}var un=`react-router-scroll-positions`,$={};function dn(e,t,n,r){let i=null;return r&&(i=r(n===`/`?e:{...e,pathname:A(e.pathname,n)||e.pathname},t)),i??=e.key,i}function fn({getKey:e,storageKey:t}={}){let{router:n}=nn(`useScrollRestoration`),{restoreScrollPosition:r,preventScrollReset:i}=rn(`useScrollRestoration`),{basename:a}=y.useContext(I),o=V(),s=ot(),c=at();y.useEffect(()=>(window.history.scrollRestoration=`manual`,()=>{window.history.scrollRestoration=`auto`}),[]),pn(y.useCallback(()=>{if(c.state===`idle`){let t=dn(o,s,a,e);$[t]=window.scrollY}try{sessionStorage.setItem(t||un,JSON.stringify($))}catch(e){d(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${e}).`)}window.history.scrollRestoration=`auto`},[c.state,e,a,o,s,t])),typeof document<`u`&&(y.useLayoutEffect(()=>{try{let e=sessionStorage.getItem(t||un);e&&($=JSON.parse(e))}catch{}},[t]),y.useLayoutEffect(()=>{let t=n?.enableScrollRestoration($,()=>window.scrollY,e?(t,n)=>dn(t,n,a,e):void 0);return()=>t&&t()},[n,a,e]),y.useLayoutEffect(()=>{if(r!==!1){if(typeof r==`number`){window.scrollTo(0,r);return}try{if(o.hash){let e=document.getElementById(decodeURIComponent(o.hash.slice(1)));if(e){e.scrollIntoView();return}}}catch{d(!1,`"${o.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}i!==!0&&window.scrollTo(0,0)}},[o,r,i]))}function pn(e,t){let{capture:n}=t||{};y.useEffect(()=>{let t=n==null?void 0:{capture:n};return window.addEventListener(`pagehide`,e,t),()=>{window.removeEventListener(`pagehide`,e,t)}},[e,n])}function mn(e,{relative:t}={}){let n=y.useContext(Ne);u(n!=null,"`useViewTransitionState` must be used within `react-router/dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=nn(`useViewTransitionState`),i=H(e,{relative:t});if(!n.isTransitioning)return!1;let a=A(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=A(n.nextLocation.pathname,r)||n.nextLocation.pathname;return k(i.pathname,o)!=null||k(i.pathname,a)!=null}var hn=r(`corner-left-up`,[[`path`,{d:`M14 9 9 4 4 9`,key:`1af5af`}],[`path`,{d:`M20 20h-7a4 4 0 0 1-4-4V4`,key:`1blwi3`}]]),gn=r(`folder-open`,[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]),_n=r(`square-terminal`,[[`path`,{d:`m7 11 2-2-2-2`,key:`1lz0vl`}],[`path`,{d:`M11 13h4`,key:`1p7l4v`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}]]);function vn(e){return e.trim().slice(0,5).toUpperCase()}function yn(e){return e.abbrev??vn(e.name)}function bn(e){return e.trim().toUpperCase().slice(0,5)}export{gn as a,Zt as c,ht as d,V as f,_n as i,ft as l,qe as m,bn as n,hn as o,Ue as p,yn as r,Yt as s,vn as t,pt as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";import{b as n,n as r}from"./index-CL_uWson.js";import{i}from"./dist-B9oip1LR.js";var a=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},o=new class extends a{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},s={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},c=new class{#e=s;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function l(e){setTimeout(e,0)}var u=typeof window>`u`||`Deno`in globalThis;function d(){}function f(e,t){return typeof e==`function`?e(t):e}function p(e){return typeof e==`number`&&e>=0&&e!==1/0}function m(e,t){return Math.max(e+(t||0)-Date.now(),0)}function h(e,t){return typeof e==`function`?e(t):e}function g(e,t){return typeof e==`function`?e(t):e}function _(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==y(o,t.options))return!1}else if(!x(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function v(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(b(t.options.mutationKey)!==b(a))return!1}else if(!x(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function y(e,t){return(t?.queryKeyHashFn||b)(e)}function b(e){return JSON.stringify(e,(e,t)=>T(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function x(e,t){return e===t?!0:typeof e==typeof t&&e&&t&&typeof e==`object`&&typeof t==`object`?Object.keys(t).every(n=>x(e[n],t[n])):!1}var S=Object.prototype.hasOwnProperty;function C(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=ee(e)&&ee(t);if(!r&&!(T(e)&&T(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:S.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=C(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function w(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function ee(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function T(e){if(!E(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!E(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function E(e){return Object.prototype.toString.call(e)===`[object Object]`}function te(e){return new Promise(t=>{c.setTimeout(t,e)})}function D(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:C(e,t)}function ne(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function re(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var O=Symbol();function ie(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===O?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function k(e,t){return typeof e==`function`?e(...t):!!e}function ae(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var A=(()=>{let e=()=>u;return{isServer(){return e()},setIsServer(t){e=t}}})();function j(){let e,t,n=new Promise((n,r)=>{e=n,t=r});n.status=`pending`,n.catch(()=>{});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.resolve=t=>{r({status:`fulfilled`,value:t}),e(t)},n.reject=e=>{r({status:`rejected`,reason:e}),t(e)},n}var oe=l;function se(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=oe,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var M=se(),N=new class extends a{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function ce(e){return Math.min(1e3*2**e,3e4)}function le(e){return(e??`online`)!==`online`||N.isOnline()}var P=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function ue(e){let t=!1,n=0,r,i=j(),a=()=>i.status!==`pending`,s=t=>{if(!a()){let n=new P(t);p(n),e.onCancel?.(n)}},c=()=>{t=!0},l=()=>{t=!1},u=()=>o.isFocused()&&(e.networkMode===`always`||N.isOnline())&&e.canRun(),d=()=>le(e.networkMode)&&e.canRun(),f=e=>{a()||(r?.(),i.resolve(e))},p=e=>{a()||(r?.(),i.reject(e))},m=()=>new Promise(t=>{r=e=>{(a()||u())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,a()||e.onContinue?.()}),h=()=>{if(a())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(f).catch(r=>{if(a())return;let i=e.retry??(A.isServer()?0:3),o=e.retryDelay??ce,s=typeof o==`function`?o(n,r):o,c=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!c){p(r);return}n++,e.onFail?.(n,r),te(s).then(()=>u()?void 0:m()).then(()=>{t?p(r):h()})})};return{promise:i,status:()=>i.status,cancel:s,continue:()=>(r?.(),i),cancelRetry:c,continueRetry:l,canStart:d,start:()=>(d()?h():m().then(h),i)}}var F=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),p(this.gcTime)&&(this.#e=c.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(A.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(c.clearTimeout(this.#e),this.#e=void 0)}};function de(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{ae(e,()=>t.signal,()=>n=!0)},u=ie(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})(),o=await u(a),{maxPages:s}=t.options,c=i?re:ne;return{pages:c(e.pages,o,s),pageParams:c(e.pageParams,r,s)}};if(i&&a.length){let e=i===`backward`,t=e?fe:I,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:I(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.options.persister?t.fetchFn=()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=l}}}function I(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function fe(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function pe(e,t){return t?I(e,t)!=null:!1}function me(e,t){return!t||!e.getPreviousPageParam?!1:fe(e,t)!=null}var he=class extends F{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e){super(),this.#s=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=ve(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#o,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=ve(this.options);e.data!==void 0&&(this.setState(_e(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=D(this.state.data,e,this.options);return this.#l({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#l({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(d).catch(d):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>g(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===O||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>h(e.options.staleTime,this)===`static`)}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!m(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#a&&(this.#s||this.#c()?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}#c(){return this.state.fetchStatus===`paused`&&this.state.status===`pending`}invalidate(){this.state.isInvalidated||this.#l({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},i=()=>{let e=ie(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#s=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?de(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#l({type:`fetch`,meta:a.fetchOptions?.meta}),this.#a=ue({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof P&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#l({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#l({type:`pause`})},onContinue:()=>{this.#l({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await this.#a.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof P){if(e.silent)return this.#a.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#l({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#l(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...ge(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,..._e(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),M.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function ge(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:le(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function _e(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function ve(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var ye=class extends a{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#o=j(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),xe(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return L(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return L(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof g(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!w(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&Se(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||g(this.options.enabled,this.#t)!==g(t.enabled,this.#t)||h(this.options.staleTime,this.#t)!==h(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||g(this.options.enabled,this.#t)!==g(t.enabled,this.#t)||i!==this.#p)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return Ce(this,n)&&(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),n===`promise`&&(this.trackProp(`data`),!this.options.experimental_prefetchInRender&&this.#o.status===`pending`&&this.#o.reject(Error(`experimental_prefetchInRender feature flag is not enabled`))),Reflect.get(e,n))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(d)),t}#g(){this.#b();let e=h(this.options.staleTime,this.#t);if(A.isServer()||this.#r.isStale||!p(e))return;let t=m(this.#r.dataUpdatedAt,e)+1;this.#d=c.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#p=e,!(A.isServer()||g(this.options.enabled,this.#t)===!1||!p(this.#p)||this.#p===0)&&(this.#f=c.setInterval(()=>{(this.options.refetchIntervalInBackground||o.isFocused())&&this.#h()},this.#p))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#d!==void 0&&(c.clearTimeout(this.#d),this.#d=void 0)}#x(){this.#f!==void 0&&(c.clearInterval(this.#f),this.#f=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&xe(e,t),o=i&&Se(e,n,t,r);(a||o)&&(l={...l,...ge(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#u?.state.data,this.#u):t.placeholderData,e!==void 0&&(m=`success`,d=D(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h)if(i&&d===a?.data&&t.select===this.#c)d=this.#l;else try{this.#c=t.select,d=t.select(d),d=D(i?.data,d,t),this.#l=d,this.#s=null}catch(e){this.#s=e}this.#s&&(f=this.#s,d=this.#l,p=Date.now(),m=`error`);let _=l.fetchStatus===`fetching`,v=m===`pending`,y=m===`error`,b=v&&_,x=d!==void 0,S={status:m,fetchStatus:l.fetchStatus,isPending:v,isSuccess:m===`success`,isError:y,isInitialLoading:b,isLoading:b,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:_,isRefetching:_&&!v,isLoadingError:y&&!x,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:y&&x,isStale:R(e,t),refetch:this.refetch,promise:this.#o,isEnabled:g(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){let t=S.data!==void 0,r=S.status===`error`&&!t,i=e=>{r?e.reject(S.error):t&&e.resolve(S.data)},a=()=>{let e=this.#o=S.promise=j();i(e)},o=this.#o;switch(o.status){case`pending`:e.queryHash===n.queryHash&&i(o);break;case`fulfilled`:(r||S.data!==o.value)&&a();break;case`rejected`:(!r||S.error!==o.reason)&&a();break}}return S}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#u=this.#t),!w(t,e)&&(this.#r=t,this.#C({listeners:(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#m.size)return!0;let r=new Set(n??this.#m);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})()}))}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#C(e){M.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}};function be(e,t){return g(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status===`error`&&g(t.retryOnMount,e)===!1)}function xe(e,t){return be(e,t)||e.state.data!==void 0&&L(e,t,t.refetchOnMount)}function L(e,t,n){if(g(t.enabled,e)!==!1&&h(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&R(e,t)}return!1}function Se(e,t,n,r){return(e!==t||g(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&R(e,n)}function R(e,t){return g(t.enabled,e)!==!1&&e.isStaleByTime(h(t.staleTime,e))}function Ce(e,t){return!w(e.getCurrentResult(),t)}var we=class extends F{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||z(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=ue({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});let r=this.state.status===`pending`,i=!this.#r.canStart();try{if(r)t();else{this.#i({type:`pending`,variables:e,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:i})}let a=await this.#r.start();return await this.#n.config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),this.#i({type:`success`,data:a}),a}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#n.runNext(this)}}#i(e){let t=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=t(this.state),M.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function z(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var Te=class extends a{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),w(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&b(t.mutationKey)!==b(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??z();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){M.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},B=e(t(),1),Ee=r(),De=B.createContext(void 0),V=e=>{let t=B.useContext(De);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},Oe=({client:e,children:t})=>(B.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,Ee.jsx)(De.Provider,{value:e,children:t})),ke=B.createContext(!1),Ae=()=>B.useContext(ke);ke.Provider;function je(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Me=B.createContext(je()),Ne=()=>B.useContext(Me),Pe=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?k(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},Fe=e=>{B.useEffect(()=>{e.clearReset()},[e])},Ie=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||k(n,[e.error,r])),Le=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},Re=(e,t)=>e.isLoading&&e.isFetching&&!t,ze=(e,t)=>e?.suspense&&t.isPending,Be=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Ve(e,t,n){let r=Ae(),i=Ne(),a=V(n),o=a.defaultQueryOptions(e);a.getDefaultOptions().queries?._experimental_beforeQuery?.(o);let s=a.getQueryCache().get(o.queryHash),c=e.subscribed!==!1;o._optimisticResults=r?`isRestoring`:c?`optimistic`:void 0,Le(o),Pe(o,i,s),Fe(i);let l=!a.getQueryCache().get(o.queryHash),[u]=B.useState(()=>new t(a,o)),f=u.getOptimisticResult(o),p=!r&&c;if(B.useSyncExternalStore(B.useCallback(e=>{let t=p?u.subscribe(M.batchCalls(e)):d;return u.updateResult(),t},[u,p]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),B.useEffect(()=>{u.setOptions(o)},[o,u]),ze(o,f))throw Be(o,u,i);if(Ie({result:f,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw f.error;return a.getDefaultOptions().queries?._experimental_afterQuery?.(o,f),o.experimental_prefetchInRender&&!A.isServer()&&Re(f,r)&&(l?Be(o,u,i):s?.promise)?.catch(d).finally(()=>{u.updateResult()}),o.notifyOnChangeProps?f:u.trackResult(f)}function H(e,t){return Ve(e,ye,t)}function U(e,t){let n=V(t),[r]=B.useState(()=>new Te(n,e));B.useEffect(()=>{r.setOptions(e)},[r,e]);let i=B.useSyncExternalStore(B.useCallback(e=>r.subscribe(M.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=B.useCallback((e,t)=>{r.mutate(e,t).catch(d)},[r]);if(i.error&&k(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}var He=12,W=typeof document<`u`?document.hasFocus():!0;typeof window<`u`&&(window.addEventListener(`focus`,()=>{W=!0}),window.addEventListener(`blur`,()=>{W=!1}),o.setEventListener(e=>{let t=()=>e(void 0);return window.addEventListener(`visibilitychange`,t,!1),window.addEventListener(`focus`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t),window.removeEventListener(`focus`,t)}}));function G(e){return()=>W?e:e*He}function Ue(){return H({queryKey:[`profiles`],queryFn:()=>i(`GET`,`/api/profiles`)})}function We(e){return H({queryKey:[`profile-settings`,e],queryFn:()=>i(`GET`,`/api/profiles/${e}/settings`),enabled:e!==void 0})}function Ge(e){return H({queryKey:[`accounts`,e],queryFn:()=>i(`GET`,`/api/accounts?profile=${e}`),enabled:e!==void 0})}function Ke(e){return H({queryKey:[`account-usage`,e],queryFn:()=>i(`GET`,`/api/accounts/${e}/usage`),enabled:e!==void 0,staleTime:15e3})}function qe(){return H({queryKey:[`repos`],queryFn:()=>i(`GET`,`/api/repos`)})}function Je(e,t=!0){return H({queryKey:[`projects`,e??`all`],queryFn:()=>i(`GET`,e===void 0?`/api/projects`:`/api/projects?profile=${e}`),enabled:t})}function Ye(e){return H({queryKey:[`project`,e],queryFn:()=>i(`GET`,`/api/projects/${e}`),enabled:e!==void 0,placeholderData:e=>e})}function Xe(e){return i(`POST`,`/api/projects/${e}/conversations/refresh`)}function Ze(e){return H({queryKey:[`sessions`,e],queryFn:()=>i(`GET`,`/api/sessions?project=${e}`),enabled:e!==void 0})}var Qe={queryKey:[`sessions`,`all`],queryFn:()=>i(`GET`,`/api/sessions`)};function $e(e=!0){return H({...Qe,enabled:e})}function et(e){return e.fetchQuery(Qe)}function tt(){return H({queryKey:[`config`],queryFn:()=>i(`GET`,`/api/config`)})}function nt(e){return H({queryKey:[`repo-branches`,e],queryFn:()=>i(`GET`,`/api/repos/${e}/branches`),enabled:e!==void 0,staleTime:3e4})}function rt(e,t=1e4){return H({queryKey:[`repo-worktrees`,e],queryFn:()=>i(`GET`,`/api/repos/${e}/worktrees`),enabled:e!==void 0,staleTime:t})}function it(e,t){let n=V();return U({mutationFn:t=>i(`DELETE`,`/api/repos/${e}/worktrees?path=${encodeURIComponent(t)}`),onSuccess:r=>{n.setQueryData([`repo-worktrees`,e],r),n.invalidateQueries({queryKey:[`project`,t]})}})}function at(e,t){let n=V();return U({mutationFn:({name:t,confirm:n})=>{let r=new URLSearchParams({name:t});return n&&r.set(`confirm`,`1`),i(`DELETE`,`/api/repos/${e}/branches?${r.toString()}`)},onSuccess:r=>{n.setQueryData([`repo-worktrees`,e],r),n.invalidateQueries({queryKey:[`project`,t]})}})}function ot(e){return H({queryKey:[`fs-dirs`,e],queryFn:()=>i(`GET`,`/api/fs/dirs?prefix=${encodeURIComponent(e)}`),enabled:e.startsWith(`/`)||e.startsWith(`~`),placeholderData:e=>e,staleTime:1e4})}function st(){return H({queryKey:[`version`],queryFn:()=>i(`GET`,`/api/version`),staleTime:1/0})}function ct(){return H({queryKey:[`host`],queryFn:()=>i(`GET`,`/api/host`),staleTime:1/0})}function lt(e){return e?e.displayName||e.hostname:void 0}function ut(){return H({queryKey:[`agents`],queryFn:()=>i(`GET`,`/api/agents`),staleTime:3e4,refetchOnWindowFocus:!0})}function dt(){let e=V();return U({mutationFn:e=>i(`POST`,`/api/profiles`,e),onSuccess:()=>void e.invalidateQueries({queryKey:[`profiles`]})})}function ft(e){let t=V();return U({mutationFn:t=>i(`PATCH`,`/api/profiles/${e}/settings`,t),onSuccess:n=>t.setQueryData([`profile-settings`,e],n)})}function pt(){let e=V();return U({mutationFn:({id:e,...t})=>i(`PATCH`,`/api/profiles/${e}`,t),onSuccess:()=>void e.invalidateQueries({queryKey:[`profiles`]})})}function mt(){let e=V();return U({mutationFn:({id:e,...t})=>i(`PATCH`,`/api/accounts/${e}`,t),onSuccess:t=>{e.invalidateQueries({queryKey:[`accounts`,t.profile_id]}),e.invalidateQueries({queryKey:[`account-usage`,t.id]})}})}function ht(){let e=V();return U({mutationFn:e=>i(`DELETE`,`/api/profiles/${e}`),onSuccess:()=>e.clear()})}function gt(){let e=V();return U({mutationFn:e=>i(`DELETE`,`/api/accounts/${e}`),onSuccess:()=>void e.invalidateQueries({queryKey:[`accounts`]})})}function _t(){let e=V();return U({mutationFn:e=>i(`POST`,`/api/accounts`,e),onSuccess:t=>void e.invalidateQueries({queryKey:[`accounts`,t.profile_id]})})}function vt(){return U({mutationFn:e=>i(`POST`,`/api/accounts/${e}/login`)})}function yt(){let e=V();return U({mutationFn:e=>i(`POST`,`/api/repos`,e),onSuccess:()=>void e.invalidateQueries({queryKey:[`repos`]})})}function bt(){let e=V();return U({mutationFn:({id:e,...t})=>i(`PATCH`,`/api/repos/${e}`,t),onSuccess:()=>void e.invalidateQueries({queryKey:[`repos`]})})}function xt(){let e=V();return U({mutationFn:e=>i(`POST`,`/api/repos/${e}/fetch`),onSuccess:()=>void e.invalidateQueries({queryKey:[`repos`]})})}function St(){let e=V();return U({mutationFn:e=>i(`POST`,`/api/projects`,e),onSuccess:()=>void e.invalidateQueries({queryKey:[`projects`]})})}function Ct(){let e=V();return U({mutationFn:({id:e,...t})=>i(`PATCH`,`/api/projects/${e}`,t),onSuccess:()=>void e.invalidateQueries({queryKey:[`projects`]})})}function wt(e,t){return H({queryKey:[`scratchpad`,e,t??`none`],queryFn:()=>i(`GET`,`/api/scratchpad?profile=${e}${t?`&project=${t}`:``}`),enabled:e!==void 0})}function Tt(){let e=V();return U({mutationFn:e=>i(`POST`,`/api/scratchpad`,e),onSuccess:()=>void e.invalidateQueries({queryKey:[`scratchpad`]})})}function Et(){let e=V();return U({mutationFn:({id:e,...t})=>i(`PATCH`,`/api/scratchpad/${e}`,t),onSuccess:()=>void e.invalidateQueries({queryKey:[`scratchpad`]})})}function Dt(){let e=V();return U({mutationFn:e=>i(`DELETE`,`/api/scratchpad/${e}`),onSuccess:()=>void e.invalidateQueries({queryKey:[`scratchpad`]})})}function Ot(e,t){return H({queryKey:[`layouts`,e,t??`none`],queryFn:()=>i(`GET`,`/api/layouts?profile=${e}${t?`&project=${t}`:``}`),enabled:e!==void 0})}function kt(){let e=V();return U({mutationFn:e=>i(`POST`,`/api/layouts`,e),onSuccess:()=>void e.invalidateQueries({queryKey:[`layouts`]})})}function At(){let e=V();return U({mutationFn:({id:e,...t})=>i(`PATCH`,`/api/layouts/${e}`,t),onSuccess:()=>void e.invalidateQueries({queryKey:[`layouts`]})})}function jt(){let e=V();return U({mutationFn:e=>i(`DELETE`,`/api/layouts/${e}`),onSuccess:()=>void e.invalidateQueries({queryKey:[`layouts`]})})}function K(e,t){e.invalidateQueries({queryKey:[`sessions`]}),e.invalidateQueries({queryKey:[`project`,t.project_id]})}function Mt(){let e=V();return U({mutationFn:e=>i(`POST`,`/api/sessions`,e),onSuccess:t=>K(e,t)})}function Nt(e){let t=V();return U({mutationFn:t=>i(`POST`,`/api/sessions/${t}/${e}`),onSuccess:e=>K(t,e)})}function Pt(){let e=V();return U({mutationFn:({sessionId:e,accountId:t})=>i(`POST`,`/api/sessions/${e}/migrate`,{account_id:t}),onSuccess:t=>K(e,t)})}function Ft(){let e=V();return U({mutationFn:({sessionId:e,accountId:t})=>i(`POST`,`/api/sessions/${e}/handoff`,{account_id:t}),onSuccess:(t,{sessionId:n})=>{K(e,t),e.invalidateQueries({queryKey:[`session`,n]})}})}function It(){let e=V();return U({mutationFn:e=>i(`POST`,`/api/sessions/${e}/archive`),onSuccess:t=>K(e,t)})}function Lt(){let e=V();return U({mutationFn:e=>i(`POST`,`/api/sessions/${e}/unarchive`),onSuccess:t=>K(e,t)})}function Rt(){let e=V();return U({mutationFn:({sessionId:e,title:t})=>i(`PATCH`,`/api/sessions/${e}`,{title:t}),onSuccess:t=>K(e,t)})}function zt(){let e=V();return U({mutationFn:e=>i(`PATCH`,`/api/config`,e),onSuccess:(t,n)=>{e.setQueryData([`config`],t),`displayName`in n&&e.invalidateQueries({queryKey:[`host`]})}})}async function Bt(e){try{return await i(`GET`,`/api/profiles/${e}/state`)}catch(e){if(e instanceof Error&&`code`in e&&e.code===`no_state`)return null;throw e}}function Vt(e,t){return i(`PUT`,`/api/profiles/${e}/state`,{ui_state:t})}function Ht(e,t){return H({queryKey:[`ports`,e],queryFn:()=>i(`GET`,`/api/sessions/${e}/ports`),enabled:e!==void 0&&t,refetchInterval:G(5e3),refetchIntervalInBackground:!1})}function Ut(e,t){return H({queryKey:[`session-env`,e],queryFn:()=>i(`GET`,`/api/sessions/${e}/env`),enabled:e!==void 0&&t,refetchInterval:G(5e3),refetchIntervalInBackground:!1})}function Wt(){let e=V();return U({mutationFn:e=>i(`DELETE`,`/api/sessions/${e}/env`),onSuccess:(t,n)=>{e.setQueryData([`session-env`,n],{vars:[]})}})}var q=n(`puddle.profile-id`);function Gt(){let e=(0,B.useSyncExternalStore)(q.subscribe,q.get);return e!==null&&/^[0-9a-f]{10}$/.test(e)?e:null}function Kt(e){window.location.pathname!==`/`&&window.history.replaceState(null,``,`/`),q.set(e)}function J(){return window.puddleDesktop}function qt(){let[e,t]=(0,B.useState)({fullScreen:!1,animate:!1});return(0,B.useEffect)(()=>{let e=J();if(!e)return;let n=!0;e.isFullScreen?.()?.then(e=>{n&&t({fullScreen:e,animate:!1})});let r=e.onFullScreenChange?.(e=>t({fullScreen:e,animate:!0}));return()=>{n=!1,r?.()}},[]),e}var Jt=[`Layout & tabs`,`Editor`,`Left sidebar`,`Right sidebar`],Y=[{id:`palette.toggle`,label:`Command palette`,group:`Layout & tabs`,defaultBinding:`meta+KeyK`},{id:`tab.close`,label:`Close current tab`,group:`Layout & tabs`,defaultBinding:`ctrl+alt+KeyW`,desktopBinding:`meta+KeyW`},{id:`tab.reopen`,label:`Reopen last closed tab`,group:`Layout & tabs`,defaultBinding:`ctrl+alt+KeyT`,desktopBinding:`shift+meta+KeyT`},{id:`tab.newUntitled`,label:`New untitled file`,group:`Layout & tabs`,defaultBinding:`ctrl+alt+KeyN`,desktopBinding:`meta+KeyN`},{id:`tab.next`,label:`Next tab in pane`,group:`Layout & tabs`,defaultBinding:`ctrl+alt+BracketRight`,desktopBinding:`ctrl+Tab`},{id:`tab.prev`,label:`Previous tab in pane`,group:`Layout & tabs`,defaultBinding:`ctrl+alt+BracketLeft`,desktopBinding:`ctrl+shift+Tab`},{id:`window.close`,label:`Close window`,group:`Layout & tabs`,defaultBinding:`meta+KeyW`,desktopBinding:`shift+meta+KeyW`},{id:`sidebar.left`,label:`Toggle left sidebar`,group:`Layout & tabs`,defaultBinding:`alt+meta+Comma`,desktopBinding:`meta+KeyB`},{id:`sidebar.right`,label:`Toggle right sidebar`,group:`Layout & tabs`,defaultBinding:`alt+meta+Period`,desktopBinding:`shift+meta+KeyB`},{id:`editor.save`,label:`Save`,group:`Editor`,defaultBinding:`meta+KeyS`,editor:!0},{id:`editor.wordWrap`,label:`Toggle word wrap`,group:`Editor`,defaultBinding:`alt+KeyZ`,editor:!0},{id:`nav.files`,label:`Open Files`,group:`Left sidebar`,defaultBinding:`alt+meta+KeyE`},{id:`nav.search`,label:`Open Search`,group:`Left sidebar`,defaultBinding:`alt+meta+KeyF`},{id:`nav.changes`,label:`Open Changes`,group:`Left sidebar`,defaultBinding:`alt+meta+KeyV`},{id:`nav.worktrees`,label:`Open Worktrees`,group:`Left sidebar`,defaultBinding:`alt+meta+KeyB`},{id:`session.newAgent`,label:`New agent`,group:`Right sidebar`,defaultBinding:`ctrl+alt+Backquote`,desktopBinding:`meta+KeyT`},{id:`session.newTerminal`,label:`New terminal`,group:`Right sidebar`,defaultBinding:`ctrl+Backquote`},{id:`scratchpad.toggle`,label:`Toggle Scratchpad`,group:`Right sidebar`,defaultBinding:`alt+meta+KeyS`},{id:`layouts.toggle`,label:`Toggle Layouts`,group:`Right sidebar`,defaultBinding:`alt+meta+KeyL`}],Yt=new Map(Y.map(e=>[e.id,e])),Xt=typeof window<`u`&&J()!==void 0;function Zt(e,t=Xt){return t&&e.desktopBinding?e.desktopBinding:e.defaultBinding}function Qt(e){let t=e.code;if(!t||/^(Control|Alt|Shift|Meta)(Left|Right)$/.test(t))return null;let n=[];return e.ctrlKey&&n.push(`ctrl`),e.altKey&&n.push(`alt`),e.shiftKey&&n.push(`shift`),e.metaKey&&n.push(`meta`),n.length===0?null:(n.push(t),n.join(`+`))}var $t={ctrl:`⌃`,alt:`⌥`,shift:`⇧`,meta:`⌘`},en={Comma:`,`,Period:`.`,Backquote:"`",Slash:`/`,Backslash:`\\`,Minus:`-`,Equal:`=`,Space:`␣`,Enter:`↵`,Escape:`Esc`,Tab:`⇥`,BracketLeft:`[`,BracketRight:`]`};function tn(e){return e.startsWith(`Key`)?e.slice(3):e.startsWith(`Digit`)?e.slice(5):en[e]??e}function nn(e){if(!e)return`—`;let t=e.split(`+`),n=t.pop()??``;return t.map(e=>$t[e]??e).join(``)+tn(n)}var X=new Map;function rn(e,t){return X.set(e,t),()=>{X.get(e)===t&&X.delete(e)}}var an=e=>X.get(e),on=e=>Yt.get(e);function sn(e,t){return e.id===`editor.save`||t&&e.editor!==!0}var cn={},Z=new Set,Q=ln();function ln(){let e={};for(let t of Y)e[t.id]=cn[t.id]||Zt(t);return e}function un(e){cn=e??{},Q=ln(),Z.forEach(e=>e())}var dn=e=>Q[e]??``;function fn(e){for(let[t,n]of Object.entries(Q))if(n===e)return t}function pn(e){return nn(mn()[e]??``)}function mn(){return(0,B.useSyncExternalStore)(e=>(Z.add(e),()=>Z.delete(e)),()=>Q)}function $(e,t,n){return!e||e.major>t||e.major===t&&e.minor>=n}var hn=e=>e!==void 0&&$(e,21,3);function gn(e){return $(e,17,1)}function _n(e){return $(e,17,3)}var vn=e=>$(e,10,3),yn=e=>$(e,12,3),bn=e=>$(e,12,4),xn=e=>$(e,15,3),Sn=e=>e!==void 0&&$(e,16,3),Cn=e=>$(e,16,4),wn=e=>$(e,14,1);export{Dt as $,a as $t,Bt as A,G as At,tt as B,me as Bt,pn as C,qe as Ct,Kt as D,Ht as Dt,q as E,Ut as Et,Ge as F,V as Ft,yt as G,y as Gt,kt as H,M as Ht,ut as I,we as It,st as J,d as Jt,Tt as K,v as Kt,$e as L,ye as Lt,Vt as M,H as Mt,Xe as N,Ve as Nt,Gt as O,Ze as Ot,Ke as P,Oe as Pt,ht as Q,o as Qt,It as R,he as Rt,Zt as S,rt as St,qt as T,Nt as Tt,dt as U,f as Ut,_t as V,N as Vt,St as W,b as Wt,at as X,h as Xt,gt as Y,x as Yt,jt as Z,O as Zt,an as _,Ye as _t,wn as a,vt as at,rn as b,Rt as bt,Cn as c,zt as ct,Y as d,ft as dt,ot as et,Jt as f,Ct as ft,on as g,Ue as gt,nn as h,We as ht,Sn as i,Ot as it,lt as j,U as jt,et as k,Lt as kt,xn as l,At as lt,Qt as m,Et as mt,_n as n,Ft as nt,bn as o,Pt as ot,fn as p,bt as pt,Mt as q,_ as qt,gn as r,ct as rt,hn as s,mt as st,yn as t,xt as tt,vn as u,pt as ut,dn as v,Je as vt,J as w,wt,un as x,nt as xt,sn as y,it as yt,Wt as z,pe as zt};
|
|
1
|
+
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";import{b as n,n as r}from"./index-DimSEdqL.js";import{i}from"./dist-DzQAeBM9.js";var a=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},o=new class extends a{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},s={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},c=new class{#e=s;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function l(e){setTimeout(e,0)}var u=typeof window>`u`||`Deno`in globalThis;function d(){}function f(e,t){return typeof e==`function`?e(t):e}function p(e){return typeof e==`number`&&e>=0&&e!==1/0}function m(e,t){return Math.max(e+(t||0)-Date.now(),0)}function h(e,t){return typeof e==`function`?e(t):e}function g(e,t){return typeof e==`function`?e(t):e}function _(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==y(o,t.options))return!1}else if(!x(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function v(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(b(t.options.mutationKey)!==b(a))return!1}else if(!x(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function y(e,t){return(t?.queryKeyHashFn||b)(e)}function b(e){return JSON.stringify(e,(e,t)=>T(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function x(e,t){return e===t?!0:typeof e==typeof t&&e&&t&&typeof e==`object`&&typeof t==`object`?Object.keys(t).every(n=>x(e[n],t[n])):!1}var S=Object.prototype.hasOwnProperty;function C(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=ee(e)&&ee(t);if(!r&&!(T(e)&&T(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:S.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=C(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function w(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function ee(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function T(e){if(!E(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!E(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function E(e){return Object.prototype.toString.call(e)===`[object Object]`}function te(e){return new Promise(t=>{c.setTimeout(t,e)})}function D(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:C(e,t)}function ne(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function re(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var O=Symbol();function ie(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===O?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function k(e,t){return typeof e==`function`?e(...t):!!e}function ae(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var A=(()=>{let e=()=>u;return{isServer(){return e()},setIsServer(t){e=t}}})();function j(){let e,t,n=new Promise((n,r)=>{e=n,t=r});n.status=`pending`,n.catch(()=>{});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.resolve=t=>{r({status:`fulfilled`,value:t}),e(t)},n.reject=e=>{r({status:`rejected`,reason:e}),t(e)},n}var oe=l;function se(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=oe,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var M=se(),N=new class extends a{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function ce(e){return Math.min(1e3*2**e,3e4)}function le(e){return(e??`online`)!==`online`||N.isOnline()}var P=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function ue(e){let t=!1,n=0,r,i=j(),a=()=>i.status!==`pending`,s=t=>{if(!a()){let n=new P(t);p(n),e.onCancel?.(n)}},c=()=>{t=!0},l=()=>{t=!1},u=()=>o.isFocused()&&(e.networkMode===`always`||N.isOnline())&&e.canRun(),d=()=>le(e.networkMode)&&e.canRun(),f=e=>{a()||(r?.(),i.resolve(e))},p=e=>{a()||(r?.(),i.reject(e))},m=()=>new Promise(t=>{r=e=>{(a()||u())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,a()||e.onContinue?.()}),h=()=>{if(a())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(f).catch(r=>{if(a())return;let i=e.retry??(A.isServer()?0:3),o=e.retryDelay??ce,s=typeof o==`function`?o(n,r):o,c=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!c){p(r);return}n++,e.onFail?.(n,r),te(s).then(()=>u()?void 0:m()).then(()=>{t?p(r):h()})})};return{promise:i,status:()=>i.status,cancel:s,continue:()=>(r?.(),i),cancelRetry:c,continueRetry:l,canStart:d,start:()=>(d()?h():m().then(h),i)}}var F=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),p(this.gcTime)&&(this.#e=c.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(A.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(c.clearTimeout(this.#e),this.#e=void 0)}};function de(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{ae(e,()=>t.signal,()=>n=!0)},u=ie(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})(),o=await u(a),{maxPages:s}=t.options,c=i?re:ne;return{pages:c(e.pages,o,s),pageParams:c(e.pageParams,r,s)}};if(i&&a.length){let e=i===`backward`,t=e?fe:I,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:I(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.options.persister?t.fetchFn=()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=l}}}function I(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function fe(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function pe(e,t){return t?I(e,t)!=null:!1}function me(e,t){return!t||!e.getPreviousPageParam?!1:fe(e,t)!=null}var he=class extends F{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e){super(),this.#s=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=ve(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#o,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=ve(this.options);e.data!==void 0&&(this.setState(_e(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=D(this.state.data,e,this.options);return this.#l({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#l({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(d).catch(d):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>g(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===O||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>h(e.options.staleTime,this)===`static`)}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!m(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#a&&(this.#s||this.#c()?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}#c(){return this.state.fetchStatus===`paused`&&this.state.status===`pending`}invalidate(){this.state.isInvalidated||this.#l({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},i=()=>{let e=ie(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#s=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?de(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#l({type:`fetch`,meta:a.fetchOptions?.meta}),this.#a=ue({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof P&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#l({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#l({type:`pause`})},onContinue:()=>{this.#l({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await this.#a.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof P){if(e.silent)return this.#a.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#l({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#l(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...ge(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,..._e(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),M.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function ge(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:le(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function _e(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function ve(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var ye=class extends a{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#o=j(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),xe(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return L(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return L(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof g(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!w(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&Se(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||g(this.options.enabled,this.#t)!==g(t.enabled,this.#t)||h(this.options.staleTime,this.#t)!==h(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||g(this.options.enabled,this.#t)!==g(t.enabled,this.#t)||i!==this.#p)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return Ce(this,n)&&(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),n===`promise`&&(this.trackProp(`data`),!this.options.experimental_prefetchInRender&&this.#o.status===`pending`&&this.#o.reject(Error(`experimental_prefetchInRender feature flag is not enabled`))),Reflect.get(e,n))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(d)),t}#g(){this.#b();let e=h(this.options.staleTime,this.#t);if(A.isServer()||this.#r.isStale||!p(e))return;let t=m(this.#r.dataUpdatedAt,e)+1;this.#d=c.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#p=e,!(A.isServer()||g(this.options.enabled,this.#t)===!1||!p(this.#p)||this.#p===0)&&(this.#f=c.setInterval(()=>{(this.options.refetchIntervalInBackground||o.isFocused())&&this.#h()},this.#p))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#d!==void 0&&(c.clearTimeout(this.#d),this.#d=void 0)}#x(){this.#f!==void 0&&(c.clearInterval(this.#f),this.#f=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&xe(e,t),o=i&&Se(e,n,t,r);(a||o)&&(l={...l,...ge(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#u?.state.data,this.#u):t.placeholderData,e!==void 0&&(m=`success`,d=D(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h)if(i&&d===a?.data&&t.select===this.#c)d=this.#l;else try{this.#c=t.select,d=t.select(d),d=D(i?.data,d,t),this.#l=d,this.#s=null}catch(e){this.#s=e}this.#s&&(f=this.#s,d=this.#l,p=Date.now(),m=`error`);let _=l.fetchStatus===`fetching`,v=m===`pending`,y=m===`error`,b=v&&_,x=d!==void 0,S={status:m,fetchStatus:l.fetchStatus,isPending:v,isSuccess:m===`success`,isError:y,isInitialLoading:b,isLoading:b,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:_,isRefetching:_&&!v,isLoadingError:y&&!x,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:y&&x,isStale:R(e,t),refetch:this.refetch,promise:this.#o,isEnabled:g(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){let t=S.data!==void 0,r=S.status===`error`&&!t,i=e=>{r?e.reject(S.error):t&&e.resolve(S.data)},a=()=>{let e=this.#o=S.promise=j();i(e)},o=this.#o;switch(o.status){case`pending`:e.queryHash===n.queryHash&&i(o);break;case`fulfilled`:(r||S.data!==o.value)&&a();break;case`rejected`:(!r||S.error!==o.reason)&&a();break}}return S}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#u=this.#t),!w(t,e)&&(this.#r=t,this.#C({listeners:(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#m.size)return!0;let r=new Set(n??this.#m);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})()}))}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#C(e){M.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}};function be(e,t){return g(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status===`error`&&g(t.retryOnMount,e)===!1)}function xe(e,t){return be(e,t)||e.state.data!==void 0&&L(e,t,t.refetchOnMount)}function L(e,t,n){if(g(t.enabled,e)!==!1&&h(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&R(e,t)}return!1}function Se(e,t,n,r){return(e!==t||g(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&R(e,n)}function R(e,t){return g(t.enabled,e)!==!1&&e.isStaleByTime(h(t.staleTime,e))}function Ce(e,t){return!w(e.getCurrentResult(),t)}var we=class extends F{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||z(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=ue({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});let r=this.state.status===`pending`,i=!this.#r.canStart();try{if(r)t();else{this.#i({type:`pending`,variables:e,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:i})}let a=await this.#r.start();return await this.#n.config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),this.#i({type:`success`,data:a}),a}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#n.runNext(this)}}#i(e){let t=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=t(this.state),M.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function z(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var Te=class extends a{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),w(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&b(t.mutationKey)!==b(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??z();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){M.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},B=e(t(),1),Ee=r(),De=B.createContext(void 0),V=e=>{let t=B.useContext(De);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},Oe=({client:e,children:t})=>(B.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,Ee.jsx)(De.Provider,{value:e,children:t})),ke=B.createContext(!1),Ae=()=>B.useContext(ke);ke.Provider;function je(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Me=B.createContext(je()),Ne=()=>B.useContext(Me),Pe=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?k(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},Fe=e=>{B.useEffect(()=>{e.clearReset()},[e])},Ie=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||k(n,[e.error,r])),Le=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},Re=(e,t)=>e.isLoading&&e.isFetching&&!t,ze=(e,t)=>e?.suspense&&t.isPending,Be=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Ve(e,t,n){let r=Ae(),i=Ne(),a=V(n),o=a.defaultQueryOptions(e);a.getDefaultOptions().queries?._experimental_beforeQuery?.(o);let s=a.getQueryCache().get(o.queryHash),c=e.subscribed!==!1;o._optimisticResults=r?`isRestoring`:c?`optimistic`:void 0,Le(o),Pe(o,i,s),Fe(i);let l=!a.getQueryCache().get(o.queryHash),[u]=B.useState(()=>new t(a,o)),f=u.getOptimisticResult(o),p=!r&&c;if(B.useSyncExternalStore(B.useCallback(e=>{let t=p?u.subscribe(M.batchCalls(e)):d;return u.updateResult(),t},[u,p]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),B.useEffect(()=>{u.setOptions(o)},[o,u]),ze(o,f))throw Be(o,u,i);if(Ie({result:f,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw f.error;return a.getDefaultOptions().queries?._experimental_afterQuery?.(o,f),o.experimental_prefetchInRender&&!A.isServer()&&Re(f,r)&&(l?Be(o,u,i):s?.promise)?.catch(d).finally(()=>{u.updateResult()}),o.notifyOnChangeProps?f:u.trackResult(f)}function H(e,t){return Ve(e,ye,t)}function U(e,t){let n=V(t),[r]=B.useState(()=>new Te(n,e));B.useEffect(()=>{r.setOptions(e)},[r,e]);let i=B.useSyncExternalStore(B.useCallback(e=>r.subscribe(M.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=B.useCallback((e,t)=>{r.mutate(e,t).catch(d)},[r]);if(i.error&&k(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}var He=12,W=typeof document<`u`?document.hasFocus():!0;typeof window<`u`&&(window.addEventListener(`focus`,()=>{W=!0}),window.addEventListener(`blur`,()=>{W=!1}),o.setEventListener(e=>{let t=()=>e(void 0);return window.addEventListener(`visibilitychange`,t,!1),window.addEventListener(`focus`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t),window.removeEventListener(`focus`,t)}}));function G(e){return()=>W?e:e*He}function Ue(){return H({queryKey:[`profiles`],queryFn:()=>i(`GET`,`/api/profiles`)})}function We(e){return H({queryKey:[`profile-settings`,e],queryFn:()=>i(`GET`,`/api/profiles/${e}/settings`),enabled:e!==void 0})}function Ge(e){return H({queryKey:[`accounts`,e],queryFn:()=>i(`GET`,`/api/accounts?profile=${e}`),enabled:e!==void 0})}function Ke(e){return H({queryKey:[`account-usage`,e],queryFn:()=>i(`GET`,`/api/accounts/${e}/usage`),enabled:e!==void 0,staleTime:15e3})}function qe(){return H({queryKey:[`repos`],queryFn:()=>i(`GET`,`/api/repos`)})}function Je(e,t=!0){return H({queryKey:[`projects`,e??`all`],queryFn:()=>i(`GET`,e===void 0?`/api/projects`:`/api/projects?profile=${e}`),enabled:t})}function Ye(e){return H({queryKey:[`project`,e],queryFn:()=>i(`GET`,`/api/projects/${e}`),enabled:e!==void 0,placeholderData:e=>e})}function Xe(e){return i(`POST`,`/api/projects/${e}/conversations/refresh`)}function Ze(e){return H({queryKey:[`sessions`,e],queryFn:()=>i(`GET`,`/api/sessions?project=${e}`),enabled:e!==void 0})}var Qe={queryKey:[`sessions`,`all`],queryFn:()=>i(`GET`,`/api/sessions`)};function $e(e=!0){return H({...Qe,enabled:e})}function et(e){return e.fetchQuery(Qe)}function tt(){return H({queryKey:[`config`],queryFn:()=>i(`GET`,`/api/config`)})}function nt(e){return H({queryKey:[`repo-branches`,e],queryFn:()=>i(`GET`,`/api/repos/${e}/branches`),enabled:e!==void 0,staleTime:3e4})}function rt(e,t=1e4){return H({queryKey:[`repo-worktrees`,e],queryFn:()=>i(`GET`,`/api/repos/${e}/worktrees`),enabled:e!==void 0,staleTime:t})}function it(e,t){let n=V();return U({mutationFn:t=>i(`DELETE`,`/api/repos/${e}/worktrees?path=${encodeURIComponent(t)}`),onSuccess:r=>{n.setQueryData([`repo-worktrees`,e],r),n.invalidateQueries({queryKey:[`project`,t]})}})}function at(e,t){let n=V();return U({mutationFn:({name:t,confirm:n})=>{let r=new URLSearchParams({name:t});return n&&r.set(`confirm`,`1`),i(`DELETE`,`/api/repos/${e}/branches?${r.toString()}`)},onSuccess:r=>{n.setQueryData([`repo-worktrees`,e],r),n.invalidateQueries({queryKey:[`project`,t]})}})}function ot(e){return H({queryKey:[`fs-dirs`,e],queryFn:()=>i(`GET`,`/api/fs/dirs?prefix=${encodeURIComponent(e)}`),enabled:e.startsWith(`/`)||e.startsWith(`~`),placeholderData:e=>e,staleTime:1e4})}function st(){return H({queryKey:[`version`],queryFn:()=>i(`GET`,`/api/version`),staleTime:1/0})}function ct(){return H({queryKey:[`host`],queryFn:()=>i(`GET`,`/api/host`),staleTime:1/0})}function lt(e){return e?e.displayName||e.hostname:void 0}function ut(){return H({queryKey:[`agents`],queryFn:()=>i(`GET`,`/api/agents`),staleTime:3e4,refetchOnWindowFocus:!0})}function dt(){let e=V();return U({mutationFn:e=>i(`POST`,`/api/profiles`,e),onSuccess:()=>void e.invalidateQueries({queryKey:[`profiles`]})})}function ft(e){let t=V();return U({mutationFn:t=>i(`PATCH`,`/api/profiles/${e}/settings`,t),onSuccess:n=>t.setQueryData([`profile-settings`,e],n)})}function pt(){let e=V();return U({mutationFn:({id:e,...t})=>i(`PATCH`,`/api/profiles/${e}`,t),onSuccess:()=>void e.invalidateQueries({queryKey:[`profiles`]})})}function mt(){let e=V();return U({mutationFn:({id:e,...t})=>i(`PATCH`,`/api/accounts/${e}`,t),onSuccess:t=>{e.invalidateQueries({queryKey:[`accounts`,t.profile_id]}),e.invalidateQueries({queryKey:[`account-usage`,t.id]})}})}function ht(){let e=V();return U({mutationFn:e=>i(`DELETE`,`/api/profiles/${e}`),onSuccess:()=>e.clear()})}function gt(){let e=V();return U({mutationFn:e=>i(`DELETE`,`/api/accounts/${e}`),onSuccess:()=>void e.invalidateQueries({queryKey:[`accounts`]})})}function _t(){let e=V();return U({mutationFn:e=>i(`POST`,`/api/accounts`,e),onSuccess:t=>void e.invalidateQueries({queryKey:[`accounts`,t.profile_id]})})}function vt(){return U({mutationFn:e=>i(`POST`,`/api/accounts/${e}/login`)})}function yt(){let e=V();return U({mutationFn:e=>i(`POST`,`/api/repos`,e),onSuccess:()=>void e.invalidateQueries({queryKey:[`repos`]})})}function bt(){let e=V();return U({mutationFn:({id:e,...t})=>i(`PATCH`,`/api/repos/${e}`,t),onSuccess:()=>void e.invalidateQueries({queryKey:[`repos`]})})}function xt(){let e=V();return U({mutationFn:e=>i(`POST`,`/api/repos/${e}/fetch`),onSuccess:()=>void e.invalidateQueries({queryKey:[`repos`]})})}function St(){let e=V();return U({mutationFn:e=>i(`POST`,`/api/projects`,e),onSuccess:()=>void e.invalidateQueries({queryKey:[`projects`]})})}function Ct(){let e=V();return U({mutationFn:({id:e,...t})=>i(`PATCH`,`/api/projects/${e}`,t),onSuccess:()=>void e.invalidateQueries({queryKey:[`projects`]})})}function wt(e,t){return H({queryKey:[`scratchpad`,e,t??`none`],queryFn:()=>i(`GET`,`/api/scratchpad?profile=${e}${t?`&project=${t}`:``}`),enabled:e!==void 0})}function Tt(){let e=V();return U({mutationFn:e=>i(`POST`,`/api/scratchpad`,e),onSuccess:()=>void e.invalidateQueries({queryKey:[`scratchpad`]})})}function Et(){let e=V();return U({mutationFn:({id:e,...t})=>i(`PATCH`,`/api/scratchpad/${e}`,t),onSuccess:()=>void e.invalidateQueries({queryKey:[`scratchpad`]})})}function Dt(){let e=V();return U({mutationFn:e=>i(`DELETE`,`/api/scratchpad/${e}`),onSuccess:()=>void e.invalidateQueries({queryKey:[`scratchpad`]})})}function Ot(e,t){return H({queryKey:[`layouts`,e,t??`none`],queryFn:()=>i(`GET`,`/api/layouts?profile=${e}${t?`&project=${t}`:``}`),enabled:e!==void 0})}function kt(){let e=V();return U({mutationFn:e=>i(`POST`,`/api/layouts`,e),onSuccess:()=>void e.invalidateQueries({queryKey:[`layouts`]})})}function At(){let e=V();return U({mutationFn:({id:e,...t})=>i(`PATCH`,`/api/layouts/${e}`,t),onSuccess:()=>void e.invalidateQueries({queryKey:[`layouts`]})})}function jt(){let e=V();return U({mutationFn:e=>i(`DELETE`,`/api/layouts/${e}`),onSuccess:()=>void e.invalidateQueries({queryKey:[`layouts`]})})}function K(e,t){e.invalidateQueries({queryKey:[`sessions`]}),e.invalidateQueries({queryKey:[`project`,t.project_id]})}function Mt(){let e=V();return U({mutationFn:e=>i(`POST`,`/api/sessions`,e),onSuccess:t=>K(e,t)})}function Nt(e){let t=V();return U({mutationFn:t=>i(`POST`,`/api/sessions/${t}/${e}`),onSuccess:e=>K(t,e)})}function Pt(){let e=V();return U({mutationFn:({sessionId:e,accountId:t})=>i(`POST`,`/api/sessions/${e}/migrate`,{account_id:t}),onSuccess:t=>K(e,t)})}function Ft(){let e=V();return U({mutationFn:({sessionId:e,accountId:t})=>i(`POST`,`/api/sessions/${e}/handoff`,{account_id:t}),onSuccess:(t,{sessionId:n})=>{K(e,t),e.invalidateQueries({queryKey:[`session`,n]})}})}function It(){let e=V();return U({mutationFn:e=>i(`POST`,`/api/sessions/${e}/archive`),onSuccess:t=>K(e,t)})}function Lt(){let e=V();return U({mutationFn:e=>i(`POST`,`/api/sessions/${e}/unarchive`),onSuccess:t=>K(e,t)})}function Rt(){let e=V();return U({mutationFn:({sessionId:e,title:t})=>i(`PATCH`,`/api/sessions/${e}`,{title:t}),onSuccess:t=>K(e,t)})}function zt(){let e=V();return U({mutationFn:e=>i(`PATCH`,`/api/config`,e),onSuccess:(t,n)=>{e.setQueryData([`config`],t),`displayName`in n&&e.invalidateQueries({queryKey:[`host`]})}})}async function Bt(e){try{return await i(`GET`,`/api/profiles/${e}/state`)}catch(e){if(e instanceof Error&&`code`in e&&e.code===`no_state`)return null;throw e}}function Vt(e,t){return i(`PUT`,`/api/profiles/${e}/state`,{ui_state:t})}function Ht(e,t){return H({queryKey:[`ports`,e],queryFn:()=>i(`GET`,`/api/sessions/${e}/ports`),enabled:e!==void 0&&t,refetchInterval:G(5e3),refetchIntervalInBackground:!1})}function Ut(e,t){return H({queryKey:[`session-env`,e],queryFn:()=>i(`GET`,`/api/sessions/${e}/env`),enabled:e!==void 0&&t,refetchInterval:G(5e3),refetchIntervalInBackground:!1})}function Wt(){let e=V();return U({mutationFn:e=>i(`DELETE`,`/api/sessions/${e}/env`),onSuccess:(t,n)=>{e.setQueryData([`session-env`,n],{vars:[]})}})}var q=n(`puddle.profile-id`);function Gt(){let e=(0,B.useSyncExternalStore)(q.subscribe,q.get);return e!==null&&/^[0-9a-f]{10}$/.test(e)?e:null}function Kt(e){window.location.pathname!==`/`&&window.history.replaceState(null,``,`/`),q.set(e)}function J(){return window.puddleDesktop}function qt(){let[e,t]=(0,B.useState)({fullScreen:!1,animate:!1});return(0,B.useEffect)(()=>{let e=J();if(!e)return;let n=!0;e.isFullScreen?.()?.then(e=>{n&&t({fullScreen:e,animate:!1})});let r=e.onFullScreenChange?.(e=>t({fullScreen:e,animate:!0}));return()=>{n=!1,r?.()}},[]),e}var Jt=[`Layout & tabs`,`Editor`,`Left sidebar`,`Right sidebar`],Y=[{id:`palette.toggle`,label:`Command palette`,group:`Layout & tabs`,defaultBinding:`meta+KeyK`},{id:`tab.close`,label:`Close current tab`,group:`Layout & tabs`,defaultBinding:`ctrl+alt+KeyW`,desktopBinding:`meta+KeyW`},{id:`tab.reopen`,label:`Reopen last closed tab`,group:`Layout & tabs`,defaultBinding:`ctrl+alt+KeyT`,desktopBinding:`shift+meta+KeyT`},{id:`tab.newUntitled`,label:`New untitled file`,group:`Layout & tabs`,defaultBinding:`ctrl+alt+KeyN`,desktopBinding:`meta+KeyN`},{id:`tab.next`,label:`Next tab in pane`,group:`Layout & tabs`,defaultBinding:`ctrl+alt+BracketRight`,desktopBinding:`ctrl+Tab`},{id:`tab.prev`,label:`Previous tab in pane`,group:`Layout & tabs`,defaultBinding:`ctrl+alt+BracketLeft`,desktopBinding:`ctrl+shift+Tab`},{id:`window.close`,label:`Close window`,group:`Layout & tabs`,defaultBinding:`meta+KeyW`,desktopBinding:`shift+meta+KeyW`},{id:`sidebar.left`,label:`Toggle left sidebar`,group:`Layout & tabs`,defaultBinding:`alt+meta+Comma`,desktopBinding:`meta+KeyB`},{id:`sidebar.right`,label:`Toggle right sidebar`,group:`Layout & tabs`,defaultBinding:`alt+meta+Period`,desktopBinding:`shift+meta+KeyB`},{id:`editor.save`,label:`Save`,group:`Editor`,defaultBinding:`meta+KeyS`,editor:!0},{id:`editor.wordWrap`,label:`Toggle word wrap`,group:`Editor`,defaultBinding:`alt+KeyZ`,editor:!0},{id:`nav.files`,label:`Open Files`,group:`Left sidebar`,defaultBinding:`alt+meta+KeyE`},{id:`nav.search`,label:`Open Search`,group:`Left sidebar`,defaultBinding:`alt+meta+KeyF`},{id:`nav.changes`,label:`Open Changes`,group:`Left sidebar`,defaultBinding:`alt+meta+KeyV`},{id:`nav.worktrees`,label:`Open Worktrees`,group:`Left sidebar`,defaultBinding:`alt+meta+KeyB`},{id:`session.newAgent`,label:`New agent`,group:`Right sidebar`,defaultBinding:`ctrl+alt+Backquote`,desktopBinding:`meta+KeyT`},{id:`session.newTerminal`,label:`New terminal`,group:`Right sidebar`,defaultBinding:`ctrl+Backquote`},{id:`scratchpad.toggle`,label:`Toggle Scratchpad`,group:`Right sidebar`,defaultBinding:`alt+meta+KeyS`},{id:`layouts.toggle`,label:`Toggle Layouts`,group:`Right sidebar`,defaultBinding:`alt+meta+KeyL`}],Yt=new Map(Y.map(e=>[e.id,e])),Xt=typeof window<`u`&&J()!==void 0;function Zt(e,t=Xt){return t&&e.desktopBinding?e.desktopBinding:e.defaultBinding}function Qt(e){let t=e.code;if(!t||/^(Control|Alt|Shift|Meta)(Left|Right)$/.test(t))return null;let n=[];return e.ctrlKey&&n.push(`ctrl`),e.altKey&&n.push(`alt`),e.shiftKey&&n.push(`shift`),e.metaKey&&n.push(`meta`),n.length===0?null:(n.push(t),n.join(`+`))}var $t={ctrl:`⌃`,alt:`⌥`,shift:`⇧`,meta:`⌘`},en={Comma:`,`,Period:`.`,Backquote:"`",Slash:`/`,Backslash:`\\`,Minus:`-`,Equal:`=`,Space:`␣`,Enter:`↵`,Escape:`Esc`,Tab:`⇥`,BracketLeft:`[`,BracketRight:`]`};function tn(e){return e.startsWith(`Key`)?e.slice(3):e.startsWith(`Digit`)?e.slice(5):en[e]??e}function nn(e){if(!e)return`—`;let t=e.split(`+`),n=t.pop()??``;return t.map(e=>$t[e]??e).join(``)+tn(n)}var X=new Map;function rn(e,t){return X.set(e,t),()=>{X.get(e)===t&&X.delete(e)}}var an=e=>X.get(e),on=e=>Yt.get(e);function sn(e,t){return e.id===`editor.save`||t&&e.editor!==!0}var cn={},Z=new Set,Q=ln();function ln(){let e={};for(let t of Y)e[t.id]=cn[t.id]||Zt(t);return e}function un(e){cn=e??{},Q=ln(),Z.forEach(e=>e())}var dn=e=>Q[e]??``;function fn(e){for(let[t,n]of Object.entries(Q))if(n===e)return t}function pn(e){return nn(mn()[e]??``)}function mn(){return(0,B.useSyncExternalStore)(e=>(Z.add(e),()=>Z.delete(e)),()=>Q)}function $(e,t,n){return!e||e.major>t||e.major===t&&e.minor>=n}var hn=e=>e!==void 0&&$(e,21,3);function gn(e){return $(e,17,1)}function _n(e){return $(e,17,3)}var vn=e=>$(e,10,3),yn=e=>$(e,12,3),bn=e=>$(e,12,4),xn=e=>$(e,15,3),Sn=e=>e!==void 0&&$(e,16,3),Cn=e=>$(e,16,4),wn=e=>$(e,14,1);export{Dt as $,a as $t,Bt as A,G as At,tt as B,me as Bt,pn as C,qe as Ct,Kt as D,Ht as Dt,q as E,Ut as Et,Ge as F,V as Ft,yt as G,y as Gt,kt as H,M as Ht,ut as I,we as It,st as J,d as Jt,Tt as K,v as Kt,$e as L,ye as Lt,Vt as M,H as Mt,Xe as N,Ve as Nt,Gt as O,Ze as Ot,Ke as P,Oe as Pt,ht as Q,o as Qt,It as R,he as Rt,Zt as S,rt as St,qt as T,Nt as Tt,dt as U,f as Ut,_t as V,N as Vt,St as W,b as Wt,at as X,h as Xt,gt as Y,x as Yt,jt as Z,O as Zt,an as _,Ye as _t,wn as a,vt as at,rn as b,Rt as bt,Cn as c,zt as ct,Y as d,ft as dt,ot as et,Jt as f,Ct as ft,on as g,Ue as gt,nn as h,We as ht,Sn as i,Ot as it,lt as j,U as jt,et as k,Lt as kt,xn as l,At as lt,Qt as m,Et as mt,_n as n,Ft as nt,bn as o,Pt as ot,fn as p,bt as pt,Mt as q,_ as qt,gn as r,ct as rt,hn as s,mt as st,yn as t,xt as tt,vn as u,pt as ut,dn as v,Je as vt,J as w,wt,un as x,nt as xt,sn as y,it as yt,Wt as z,pe as zt};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{n as e}from"./rolldown-runtime-QTnfLwEv.js";var t=e({default:()=>We});function n(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function r(e){if(Array.isArray(e))return e}function i(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function a(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function o(e,t){return r(e)||i(e,t)||s(e,t)||a()}function s(e,t){if(e){if(typeof e==`string`)return n(e,t);var r={}.toString.call(e).slice(8,-1);return r===`Object`&&e.constructor&&(r=e.constructor.name),r===`Map`||r===`Set`?Array.from(e):r===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}var c=Object.entries,l=Object.setPrototypeOf,u=Object.isFrozen,d=Object.getPrototypeOf,f=Object.getOwnPropertyDescriptor,p=Object.freeze,m=Object.seal,h=Object.create,ee=typeof Reflect<`u`&&Reflect,te=ee.apply,ne=ee.construct;p||=function(e){return e},m||=function(e){return e},te||=function(e,t){var n=[...arguments].slice(2);return e.apply(t,n)},ne||=function(e){return new e(...[...arguments].slice(1))};var g=E(Array.prototype.forEach),re=E(Array.prototype.lastIndexOf),ie=E(Array.prototype.pop),_=E(Array.prototype.push),ae=E(Array.prototype.splice),v=Array.isArray,oe=E(String.prototype.toLowerCase),se=E(String.prototype.toString),ce=E(String.prototype.match),le=E(String.prototype.replace),ue=E(String.prototype.indexOf),de=E(String.prototype.trim),y=E(Number.prototype.toString),b=E(Boolean.prototype.toString),fe=typeof BigInt>`u`?null:E(BigInt.prototype.toString),x=typeof Symbol>`u`?null:E(Symbol.prototype.toString),S=E(Object.prototype.hasOwnProperty),C=E(Object.prototype.toString),w=E(RegExp.prototype.test),T=D(TypeError);function E(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);var n=[...arguments].slice(1);return te(e,t,n)}}function D(e){return function(){return ne(e,[...arguments])}}function O(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:oe;if(l&&l(e,null),!v(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(u(t)||(t[r]=e),i=e)}e[i]=!0}return e}function k(e){for(let t=0;t<e.length;t++)S(e,t)||(e[t]=null);return e}function A(e){let t=h(null);for(let r of c(e)){var n=o(r,2);let i=n[0],a=n[1];S(e,i)&&(v(a)?t[i]=k(a):a&&typeof a==`object`&&a.constructor===Object?t[i]=A(a):t[i]=a)}return t}function pe(e){switch(typeof e){case`string`:return e;case`number`:return y(e);case`boolean`:return b(e);case`bigint`:return fe?fe(e):`0`;case`symbol`:return x?x(e):`Symbol()`;case`undefined`:return C(e);case`function`:case`object`:{if(e===null)return C(e);let t=e,n=j(t,`toString`);if(typeof n==`function`){let e=n(t);return typeof e==`string`?e:C(e)}return C(e)}default:return C(e)}}function j(e,t){for(;e!==null;){let n=f(e,t);if(n){if(n.get)return E(n.get);if(typeof n.value==`function`)return E(n.value)}e=d(e)}function n(){return null}return n}function me(e){try{return w(e,``),!0}catch{return!1}}var he=p(`a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr`.split(`.`)),ge=p(`svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern`.split(`.`)),_e=p([`feBlend`,`feColorMatrix`,`feComponentTransfer`,`feComposite`,`feConvolveMatrix`,`feDiffuseLighting`,`feDisplacementMap`,`feDistantLight`,`feDropShadow`,`feFlood`,`feFuncA`,`feFuncB`,`feFuncG`,`feFuncR`,`feGaussianBlur`,`feImage`,`feMerge`,`feMergeNode`,`feMorphology`,`feOffset`,`fePointLight`,`feSpecularLighting`,`feSpotLight`,`feTile`,`feTurbulence`]),ve=p([`animate`,`color-profile`,`cursor`,`discard`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`foreignobject`,`hatch`,`hatchpath`,`mesh`,`meshgradient`,`meshpatch`,`meshrow`,`missing-glyph`,`script`,`set`,`solidcolor`,`unknown`,`use`]),ye=p(`math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts`.split(`.`)),be=p([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),xe=p([`#text`]),Se=p(`accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns`.split(`.`)),Ce=p(`accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dominant-baseline.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-orientation.text-rendering.textlength.type.u1.u2.unicode.values.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan`.split(`.`)),we=p(`accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns`.split(`.`)),Te=p([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),Ee=m(/{{[\w\W]*|^[\w\W]*}}/g),De=m(/<%[\w\W]*|^[\w\W]*%>/g),Oe=m(/\${[\w\W]*/g),ke=m(/^data-[\-\w.\u00B7-\uFFFF]+$/),Ae=m(/^aria-[\-\w]+$/),je=m(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Me=m(/^(?:\w+script|data):/i),Ne=m(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Pe=m(/^html$/i),Fe=m(/^[a-z][.\w]*(-[.\w]+)+$/i),Ie=m(/<[/\w!]/g),Le=m(/<[/\w]/g),Re=m(/<\/no(script|embed|frames)/i),ze=m(/\/>/i),M={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Be=function(){return typeof window>`u`?null:window},Ve=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},He=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},N=function(e,t,n,r){return S(e,t)&&v(e[t])?O(r.base?A(r.base):{},e[t],r.transform):n};function Ue(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Be(),t=e=>Ue(e);if(t.version=`3.4.12`,t.removed=[],!e||!e.document||e.document.nodeType!==M.document||!e.Element)return t.isSupported=!1,t;let n=e.document,r=n,i=r.currentScript;e.DocumentFragment;let a=e.HTMLTemplateElement,o=e.Node,s=e.Element,l=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;let u=e.DOMParser,d=e.trustedTypes,f=s.prototype,ee=j(f,`cloneNode`),te=j(f,`remove`),ne=j(f,`nextSibling`),y=j(f,`childNodes`),b=j(f,`parentNode`),fe=j(f,`shadowRoot`),x=j(f,`attributes`),C=o&&o.prototype?j(o.prototype,`nodeType`):null,E=o&&o.prototype?j(o.prototype,`nodeName`):null;if(typeof a==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let D,k=``,We,Ge=!1,Ke=0,qe=function(){if(Ke>0)throw T(`A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.`)},P=function(e){qe(),Ke++;try{return D.createHTML(e)}finally{Ke--}},Je=function(e){qe(),Ke++;try{return D.createScriptURL(e)}finally{Ke--}},Ye=function(){return Ge||=(We=Ve(d,i),!0),We},Xe=n,Ze=Xe.implementation,Qe=Xe.createNodeIterator,$e=Xe.createDocumentFragment,et=Xe.getElementsByTagName,tt=r.importNode,F=He();t.isSupported=typeof c==`function`&&typeof b==`function`&&Ze&&Ze.createHTMLDocument!==void 0;let nt=Ee,rt=De,it=Oe,at=ke,ot=Ae,st=Me,ct=Ne,lt=Fe,ut=je,I=null,dt=O({},[...he,...ge,..._e,...ye,...xe]),L=null,ft=O({},[...Se,...Ce,...we,...Te]),R=Object.seal(h(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),pt=null,mt=null,z=Object.seal(h(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),ht=!0,gt=!0,_t=!1,vt=!0,B=!1,V=!0,H=!1,yt=!1,bt=null,xt=null,St=!1,U=!1,Ct=!1,wt=!1,Tt=!0,Et=!1,Dt=`user-content-`,Ot=!0,kt=!1,W={},G=null,At=O({},`annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp`.split(`.`)),jt=null,Mt=O({},[`audio`,`video`,`img`,`source`,`image`,`track`]),Nt=null,Pt=O({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),Ft=`http://www.w3.org/1998/Math/MathML`,It=`http://www.w3.org/2000/svg`,K=`http://www.w3.org/1999/xhtml`,q=K,Lt=!1,Rt=null,zt=O({},[Ft,It,K],se),Bt=p([`mi`,`mo`,`mn`,`ms`,`mtext`]),Vt=O({},Bt),Ht=p([`annotation-xml`]),Ut=O({},Ht),Wt=O({},[`title`,`style`,`font`,`a`,`script`]),Gt=null,Kt=[`application/xhtml+xml`,`text/html`],J=null,Y=null,qt=n.createElement(`form`),Jt=function(e){return e instanceof RegExp||e instanceof Function},Yt=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Y&&Y===e)return;(!e||typeof e!=`object`)&&(e={}),e=A(e),Gt=Kt.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,J=Gt===`application/xhtml+xml`?se:oe,I=N(e,`ALLOWED_TAGS`,dt,{transform:J}),L=N(e,`ALLOWED_ATTR`,ft,{transform:J}),Rt=N(e,`ALLOWED_NAMESPACES`,zt,{transform:se}),Nt=N(e,`ADD_URI_SAFE_ATTR`,Pt,{transform:J,base:Pt}),jt=N(e,`ADD_DATA_URI_TAGS`,Mt,{transform:J,base:Mt}),G=N(e,`FORBID_CONTENTS`,At,{transform:J}),pt=N(e,`FORBID_TAGS`,A({}),{transform:J}),mt=N(e,`FORBID_ATTR`,A({}),{transform:J}),W=S(e,`USE_PROFILES`)?e.USE_PROFILES&&typeof e.USE_PROFILES==`object`?A(e.USE_PROFILES):e.USE_PROFILES:!1,ht=e.ALLOW_ARIA_ATTR!==!1,gt=e.ALLOW_DATA_ATTR!==!1,_t=e.ALLOW_UNKNOWN_PROTOCOLS||!1,vt=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,B=e.SAFE_FOR_TEMPLATES||!1,V=e.SAFE_FOR_XML!==!1,H=e.WHOLE_DOCUMENT||!1,U=e.RETURN_DOM||!1,Ct=e.RETURN_DOM_FRAGMENT||!1,wt=e.RETURN_TRUSTED_TYPE||!1,St=e.FORCE_BODY||!1,Tt=e.SANITIZE_DOM!==!1,Et=e.SANITIZE_NAMED_PROPS||!1,Ot=e.KEEP_CONTENT!==!1,kt=e.IN_PLACE||!1,ut=me(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:je,q=typeof e.NAMESPACE==`string`?e.NAMESPACE:K,Vt=S(e,`MATHML_TEXT_INTEGRATION_POINTS`)&&e.MATHML_TEXT_INTEGRATION_POINTS&&typeof e.MATHML_TEXT_INTEGRATION_POINTS==`object`?A(e.MATHML_TEXT_INTEGRATION_POINTS):O({},Bt),Ut=S(e,`HTML_INTEGRATION_POINTS`)&&e.HTML_INTEGRATION_POINTS&&typeof e.HTML_INTEGRATION_POINTS==`object`?A(e.HTML_INTEGRATION_POINTS):O({},Ht);let t=S(e,`CUSTOM_ELEMENT_HANDLING`)&&e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING==`object`?A(e.CUSTOM_ELEMENT_HANDLING):h(null);if(R=h(null),S(t,`tagNameCheck`)&&Jt(t.tagNameCheck)&&(R.tagNameCheck=t.tagNameCheck),S(t,`attributeNameCheck`)&&Jt(t.attributeNameCheck)&&(R.attributeNameCheck=t.attributeNameCheck),S(t,`allowCustomizedBuiltInElements`)&&typeof t.allowCustomizedBuiltInElements==`boolean`&&(R.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),m(R),B&&(gt=!1),Ct&&(U=!0),W&&(I=O({},xe),L=h(null),W.html===!0&&(O(I,he),O(L,Se)),W.svg===!0&&(O(I,ge),O(L,Ce),O(L,Te)),W.svgFilters===!0&&(O(I,_e),O(L,Ce),O(L,Te)),W.mathMl===!0&&(O(I,ye),O(L,we),O(L,Te))),z.tagCheck=null,z.attributeCheck=null,S(e,`ADD_TAGS`)&&(typeof e.ADD_TAGS==`function`?z.tagCheck=e.ADD_TAGS:v(e.ADD_TAGS)&&(I===dt&&(I=A(I)),O(I,e.ADD_TAGS,J))),S(e,`ADD_ATTR`)&&(typeof e.ADD_ATTR==`function`?z.attributeCheck=e.ADD_ATTR:v(e.ADD_ATTR)&&(L===ft&&(L=A(L)),O(L,e.ADD_ATTR,J))),S(e,`ADD_URI_SAFE_ATTR`)&&v(e.ADD_URI_SAFE_ATTR)&&O(Nt,e.ADD_URI_SAFE_ATTR,J),S(e,`FORBID_CONTENTS`)&&v(e.FORBID_CONTENTS)&&(G===At&&(G=A(G)),O(G,e.FORBID_CONTENTS,J)),S(e,`ADD_FORBID_CONTENTS`)&&v(e.ADD_FORBID_CONTENTS)&&(G===At&&(G=A(G)),O(G,e.ADD_FORBID_CONTENTS,J)),Ot&&(I[`#text`]=!0),H&&O(I,[`html`,`head`,`body`]),I.table&&(O(I,[`tbody`]),delete pt.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw T(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw T(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);let t=D;D=e.TRUSTED_TYPES_POLICY;try{k=P(``)}catch(e){throw D=t,e}}else e.TRUSTED_TYPES_POLICY===null?(D=void 0,k=``):(D===void 0&&(D=Ye()),D&&typeof k==`string`&&(k=P(``)));p&&p(e),Y=e},Xt=O({},[...ge,..._e,...ve]),Zt=O({},[...ye,...be]),Qt=function(e,t,n){return t.namespaceURI===K?e===`svg`:t.namespaceURI===Ft?e===`svg`&&(n===`annotation-xml`||Vt[n]):!!Xt[e]},$t=function(e,t,n){return t.namespaceURI===K?e===`math`:t.namespaceURI===It?e===`math`&&Ut[n]:!!Zt[e]},en=function(e,t,n){return t.namespaceURI===It&&!Ut[n]||t.namespaceURI===Ft&&!Vt[n]?!1:!Zt[e]&&(Wt[e]||!Xt[e])},tn=function(e){let t=b(e);(!t||!t.tagName)&&(t={namespaceURI:q,tagName:`template`});let n=oe(e.tagName),r=oe(t.tagName);return Rt[e.namespaceURI]?e.namespaceURI===It?Qt(n,t,r):e.namespaceURI===Ft?$t(n,t,r):e.namespaceURI===K?en(n,t,r):!!(Gt===`application/xhtml+xml`&&Rt[e.namespaceURI]):!1},X=function(e){_(t.removed,{element:e});try{b(e).removeChild(e)}catch{if(te(e),!b(e))throw T(`a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place`)}},nn=function(e){an(e);let t=y(e);if(t){let e=[];g(t,t=>{_(e,t)}),g(e,e=>{try{te(e)}catch{}})}let n=x(e);if(n)for(let t=n.length-1;t>=0;--t){let r=n[t],i=r&&r.name;if(typeof i==`string`)try{e.removeAttribute(i)}catch{}}},Z=function(e,n){try{_(t.removed,{attribute:n.getAttributeNode(e),from:n})}catch{_(t.removed,{attribute:null,from:n})}if(n.removeAttribute(e),e===`is`)if(U||Ct)try{X(n)}catch{}else try{n.setAttribute(e,``)}catch{}},rn=function(e){let t=x(e);if(t)for(let n=t.length-1;n>=0;--n){let r=t[n],i=r&&r.name;if(!(typeof i!=`string`||L[J(i)]))try{e.removeAttribute(i)}catch{}}},an=function(e){let t=[e];for(;t.length>0;){let e=t.pop();(C?C(e):e.nodeType)===M.element&&rn(e);let n=y(e);if(n)for(let e=n.length-1;e>=0;--e)t.push(n[e])}},on=function(e){if(!V)return;let t=[e];for(;t.length>0;){let e=t.pop(),n=C?C(e):e.nodeType;if(n===M.processingInstruction||n===M.comment&&w(Le,e.data)){try{te(e)}catch{}continue}if(n===M.element){let t=e,n=J(E?E(e):e.nodeName);try{t.hasAttribute&&t.hasAttribute(`patchsrc`)&&t.removeAttribute(`patchsrc`),t.hasAttribute&&t.hasAttribute(`for`)&&n!==`label`&&n!==`output`&&t.removeAttribute(`for`)}catch{}}let r=y(e);if(r)for(let e=r.length-1;e>=0;--e)t.push(r[e])}},sn=function(e){let t=null,r=null;if(St)e=`<remove></remove>`+e;else{let t=ce(e,/^[\r\n\t ]+/);r=t&&t[0]}Gt===`application/xhtml+xml`&&q===K&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=D?P(e):e;if(q===K)try{t=new u().parseFromString(i,Gt)}catch{}if(!t||!t.documentElement){t=Ze.createDocument(q,`template`,null);try{t.documentElement.innerHTML=Lt?k:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),q===K?et.call(t,H?`html`:`body`)[0]:H?t.documentElement:a},cn=function(e){return Qe.call(e.ownerDocument||e,e,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},ln=function(e){return e=le(e,nt,` `),e=le(e,rt,` `),e=le(e,it,` `),e},un=function(e){e.normalize();let t=Qe.call(e.ownerDocument||e,e,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null),n=t.nextNode();for(;n;)n.data=ln(n.data),n=t.nextNode();let r=e.querySelectorAll?.call(e,`template`);r&&g(r,e=>{Q(e.content)&&un(e.content)})},dn=function(e){let t=E?E(e):null;return typeof t!=`string`||J(t)!==`form`?!1:typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||e.attributes!==x(e)||typeof e.removeAttribute!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`||e.nodeType!==C(e)||e.childNodes!==y(e)},Q=function(e){if(!C||typeof e!=`object`||!e)return!1;try{return C(e)===M.documentFragment}catch{return!1}},fn=function(e){if(!C||typeof e!=`object`||!e)return!1;try{return typeof C(e)==`number`}catch{return!1}};function $(e,n,r){e.length!==0&&g(e,e=>{e.call(t,n,r,Y)})}let pn=function(e,t){return!!(V&&e.hasChildNodes()&&!fn(e.firstElementChild)&&w(Ie,e.textContent)&&w(Ie,e.innerHTML)||V&&e.namespaceURI===K&&t===`style`&&fn(e.firstElementChild)||e.nodeType===M.processingInstruction||V&&e.nodeType===M.comment&&w(Le,e.data))},mn=function(e,t){if(!pt[t]&&vn(t)&&(R.tagNameCheck instanceof RegExp&&w(R.tagNameCheck,t)||R.tagNameCheck instanceof Function&&R.tagNameCheck(t)))return!1;if(Ot&&!G[t]){let t=b(e),n=y(e);if(n&&t){let r=n.length;for(let i=r-1;i>=0;--i){let r=kt?n[i]:ee(n[i],!0);t.insertBefore(r,ne(e))}}}return X(e),!0},hn=function(e,n){if($(F.beforeSanitizeElements,e,null),e!==n&&b(e)===null)return!0;if(dn(e))return X(e),!0;let r=J(E?E(e):e.nodeName);if($(F.uponSanitizeElement,e,{tagName:r,allowedTags:I}),e!==n&&b(e)===null)return!0;if(pn(e,r))return X(e),!0;if(pt[r]||!(z.tagCheck instanceof Function&&z.tagCheck(r))&&!I[r]){let t=mn(e,r);return t===!1&&$(F.afterSanitizeElements,e,null),t}if((C?C(e):e.nodeType)===M.element&&!tn(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&w(Re,e.innerHTML))return X(e),!0;if(B&&e.nodeType===M.text){let n=ln(e.textContent);e.textContent!==n&&(_(t.removed,{element:e.cloneNode()}),e.textContent=n)}return $(F.afterSanitizeElements,e,null),!1},gn=function(e,t,r){if(mt[t]||V&&t===`patchsrc`||V&&t===`for`&&e!==`label`&&e!==`output`||Tt&&(t===`id`||t===`name`)&&(r in n||r in qt))return!1;let i=L[t]||z.attributeCheck instanceof Function&&z.attributeCheck(t,e);if(!(gt&&w(at,t))&&!(ht&&w(ot,t))){if(!i){if(!(vn(e)&&(R.tagNameCheck instanceof RegExp&&w(R.tagNameCheck,e)||R.tagNameCheck instanceof Function&&R.tagNameCheck(e))&&(R.attributeNameCheck instanceof RegExp&&w(R.attributeNameCheck,t)||R.attributeNameCheck instanceof Function&&R.attributeNameCheck(t,e))||t===`is`&&R.allowCustomizedBuiltInElements&&(R.tagNameCheck instanceof RegExp&&w(R.tagNameCheck,r)||R.tagNameCheck instanceof Function&&R.tagNameCheck(r))))return!1}else if(!Nt[t]&&!w(ut,le(r,ct,``))&&!((t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&ue(r,`data:`)===0&&jt[e])&&!(_t&&!w(st,le(r,ct,``)))&&r)return!1}return!0},_n=O({},[`annotation-xml`,`color-profile`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`missing-glyph`]),vn=function(e){return!_n[oe(e)]&&w(lt,e)},yn=function(e,t,n,r){if(D&&typeof d==`object`&&typeof d.getAttributeType==`function`&&!n)switch(d.getAttributeType(e,t)){case`TrustedHTML`:return P(r);case`TrustedScriptURL`:return Je(r)}return r},bn=function(e,n,r,i){try{r?e.setAttributeNS(r,n,i):e.setAttribute(n,i),dn(e)?X(e):ie(t.removed)}catch{Z(n,e)}},xn=function(e){$(F.beforeSanitizeAttributes,e,null);let t=e.attributes;if(!t||dn(e))return;let n={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:L,forceKeepAttr:void 0},r=t.length,i=J(e.nodeName);for(;r--;){let a=t[r],o=a.name,s=a.namespaceURI,c=a.value,l=J(o),u=c,d=o===`value`?u:de(u);if(n.attrName=l,n.attrValue=d,n.keepAttr=!0,n.forceKeepAttr=void 0,$(F.uponSanitizeAttribute,e,n),d=n.attrValue,Et&&(l===`id`||l===`name`)&&ue(d,Dt)!==0&&(Z(o,e),d=Dt+d),V&&w(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,d)){Z(o,e);continue}if(l===`attributename`&&ce(d,`href`)){Z(o,e);continue}if(!n.forceKeepAttr){if(!n.keepAttr){Z(o,e);continue}if(!vt&&w(ze,d)){Z(o,e);continue}if(B&&(d=ln(d)),!gn(i,l,d)){Z(o,e);continue}d=yn(i,l,s,d),d!==u&&bn(e,o,s,d)}}$(F.afterSanitizeAttributes,e,null)},Sn=function(e){let t=null,n=cn(e);for($(F.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if($(F.uponSanitizeShadowNode,t,null),hn(t,e),xn(t),Q(t.content)&&Sn(t.content),(C?C(t):t.nodeType)===M.element){let e=fe(t);Q(e)&&(Cn(e),Sn(e))}$(F.afterSanitizeShadowDOM,e,null)},Cn=function(e){let t=[{node:e,shadow:null}];for(;t.length>0;){let e=t.pop();if(e.shadow){Sn(e.shadow);continue}let n=e.node,r=(C?C(n):n.nodeType)===M.element,i=y(n);if(i)for(let e=i.length-1;e>=0;--e)t.push({node:i[e],shadow:null});if(r){let e=E?E(n):null;if(typeof e==`string`&&J(e)===`template`){let e=n.content;Q(e)&&t.push({node:e,shadow:null})}}if(r){let e=fe(n);Q(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,a=null,o=null,s=null;if(Lt=!e,Lt&&(e=`<!-->`),typeof e!=`string`&&!fn(e)&&(e=pe(e),typeof e!=`string`))throw T(`dirty is not a string, aborting`);if(!t.isSupported)return e;yt?(I=bt,L=xt):Yt(n),(F.uponSanitizeElement.length>0||F.uponSanitizeAttribute.length>0)&&(I=A(I)),F.uponSanitizeAttribute.length>0&&(L=A(L)),t.removed=[];let c=kt&&typeof e!=`string`&&fn(e);if(c){on(e);let t=E?E(e):e.nodeName;if(typeof t==`string`){let n=J(t);if(!I[n]||pt[n])throw nn(e),T(`root node is forbidden and cannot be sanitized in-place`)}if(dn(e))throw nn(e),T(`root node is clobbered and cannot be sanitized in-place`);try{Cn(e)}catch(t){throw nn(e),t}}else if(fn(e))i=sn(`<!---->`),a=i.ownerDocument.importNode(e,!0),a.nodeType===M.element&&a.nodeName===`BODY`||a.nodeName===`HTML`?i=a:i.appendChild(a),Cn(a);else{if(!U&&!B&&!H&&e.indexOf(`<`)===-1)return D&&wt?P(e):e;if(i=sn(e),!i)return U?null:wt?k:``}i&&St&&X(i.firstChild);let l=c?e:i,u=cn(l);try{for(;o=u.nextNode();)hn(o,l),xn(o),Q(o.content)&&Sn(o.content)}catch(n){throw c&&(nn(e),g(t.removed,e=>{e.element&&an(e.element)})),n}if(c)return g(t.removed,e=>{e.element&&an(e.element)}),B&&un(e),e;if(U){if(B&&un(i),Ct)for(s=$e.call(i.ownerDocument);i.firstChild;)s.appendChild(i.firstChild);else s=i;return(L.shadowroot||L.shadowrootmode)&&(s=tt.call(r,s,!0)),s}let d=H?i.outerHTML:i.innerHTML;return H&&I[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&w(Pe,i.ownerDocument.doctype.name)&&(d=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
|
|
3
|
+
`+d),B&&(d=ln(d)),D&&wt?P(d):d},t.setConfig=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Yt(e),yt=!0,bt=I,xt=L},t.clearConfig=function(){Y=null,yt=!1,bt=null,xt=null,D=We,k=``},t.isValidAttribute=function(e,t,n){Y||Yt({});let r=J(e),i=J(t);return gn(r,i,n)},t.addHook=function(e,t){typeof t==`function`&&S(F,e)&&_(F[e],t)},t.removeHook=function(e,t){if(S(F,e)){if(t!==void 0){let n=re(F[e],t);return n===-1?void 0:ae(F[e],n,1)[0]}return ie(F[e])}},t.removeHooks=function(e){S(F,e)&&(F[e]=[])},t.removeAllHooks=function(){F=He()},t}var We=Ue();export{t as n,We as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t,p as n}from"./src-_wZywoZs.js";import{D as r,H as i,K as a,U as o,a as s,c,f as l,v as u,w as d,x as f,y as p,z as m}from"./chunk-DU6HZSFF-
|
|
1
|
+
import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t,p as n}from"./src-_wZywoZs.js";import{D as r,H as i,K as a,U as o,a as s,c,f as l,v as u,w as d,x as f,y as p,z as m}from"./chunk-DU6HZSFF-CBPmk1pL.js";import{t as h}from"./linear-B7l8qgEw.js";var g=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,3],r=[1,4],i=[1,5],a=[1,6],o=[1,7],s=[1,4,5,10,12,13,14,15,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],c=[1,4,5,10,12,13,14,15,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],l=[55,56,57],u=[2,36],d=[1,37],f=[1,36],p=[1,38],m=[1,35],h=[1,43],g=[1,41],_=[1,45],v=[1,14],y=[1,23],b=[1,18],x=[1,19],S=[1,20],C=[1,21],w=[1,22],T=[1,24],E=[1,25],D=[1,26],O=[1,27],k=[1,28],A=[1,29],j=[1,32],M=[1,33],N=[1,34],P=[1,39],F=[1,40],I=[1,42],L=[1,44],R=[1,63],z=[1,62],B=[4,5,8,10,12,13,14,15,18,44,47,49,55,56,57,63,64,65,66,67],ee=[1,66],te=[1,67],ne=[1,68],re=[1,69],ie=[1,70],ae=[1,71],oe=[1,72],se=[1,73],ce=[1,74],le=[1,75],ue=[1,76],de=[1,77],V=[4,5,6,7,8,9,10,11,12,13,14,15,18],H=[1,91],U=[1,92],W=[1,93],G=[1,100],K=[1,94],q=[1,97],J=[1,95],Y=[1,96],X=[1,98],Z=[1,99],fe=[1,103],pe=[10,55,56,57],Q=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],me={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:`error`,4:`ALPHA`,5:`NUM`,6:`NODE_STRING`,7:`DOWN`,8:`MINUS`,9:`DEFAULT`,10:`COMMA`,11:`COLON`,12:`AMP`,13:`BRKT`,14:`MULT`,15:`UNICODE_TEXT`,17:`UNIT`,18:`SPACE`,19:`STYLE`,20:`PCT`,25:`CLASSDEF`,28:`QUADRANT`,35:`title`,36:`title_value`,37:`acc_title`,38:`acc_title_value`,39:`acc_descr`,40:`acc_descr_value`,41:`acc_descr_multiline_value`,42:`section`,44:`point_start`,45:`point_x`,46:`point_y`,47:`class_name`,48:`X-AXIS`,49:`AXIS-TEXT-DELIMITER`,50:`Y-AXIS`,51:`QUADRANT_1`,52:`QUADRANT_2`,53:`QUADRANT_3`,54:`QUADRANT_4`,55:`NEWLINE`,56:`SEMI`,57:`EOF`,60:`STR`,61:`MD_STR`,63:`PUNCTUATION`,64:`PLUS`,65:`EQUALS`,66:`DOT`,67:`UNDERSCORE`},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 23:this.$=a[s];break;case 24:this.$=a[s-1]+``+a[s];break;case 26:this.$=a[s-1]+a[s];break;case 27:this.$=[a[s].trim()];break;case 28:a[s-2].push(a[s].trim()),this.$=a[s-2];break;case 29:this.$=a[s-4],r.addClass(a[s-2],a[s]);break;case 37:this.$=[];break;case 42:this.$=a[s].trim(),r.setDiagramTitle(this.$);break;case 43:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 44:case 45:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 46:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 47:r.addPoint(a[s-3],``,a[s-1],a[s],[]);break;case 48:r.addPoint(a[s-4],a[s-3],a[s-1],a[s],[]);break;case 49:r.addPoint(a[s-4],``,a[s-2],a[s-1],a[s]);break;case 50:r.addPoint(a[s-5],a[s-4],a[s-2],a[s-1],a[s]);break;case 51:r.setXAxisLeftText(a[s-2]),r.setXAxisRightText(a[s]);break;case 52:a[s-1].text+=` ⟶ `,r.setXAxisLeftText(a[s-1]);break;case 53:r.setXAxisLeftText(a[s]);break;case 54:r.setYAxisBottomText(a[s-2]),r.setYAxisTopText(a[s]);break;case 55:a[s-1].text+=` ⟶ `,r.setYAxisBottomText(a[s-1]);break;case 56:r.setYAxisBottomText(a[s]);break;case 57:r.setQuadrant1Text(a[s]);break;case 58:r.setQuadrant2Text(a[s]);break;case 59:r.setQuadrant3Text(a[s]);break;case 60:r.setQuadrant4Text(a[s]);break;case 64:this.$={text:a[s],type:`text`};break;case 65:this.$={text:a[s-1].text+``+a[s],type:a[s-1].type};break;case 66:this.$={text:a[s],type:`text`};break;case 67:this.$={text:a[s],type:`markdown`};break;case 68:this.$=a[s];break;case 69:this.$=a[s-1]+``+a[s];break}},`anonymous`),table:[{18:n,26:1,27:2,28:r,55:i,56:a,57:o},{1:[3]},{18:n,26:8,27:2,28:r,55:i,56:a,57:o},{18:n,26:9,27:2,28:r,55:i,56:a,57:o},t(s,[2,33],{29:10}),t(c,[2,61]),t(c,[2,62]),t(c,[2,63]),{1:[2,30]},{1:[2,31]},t(l,u,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:d,5:f,10:p,12:m,13:h,14:g,15:_,18:v,25:y,35:b,37:x,39:S,41:C,42:w,48:T,50:E,51:D,52:O,53:k,54:A,60:j,61:M,63:N,64:P,65:F,66:I,67:L}),t(s,[2,34]),{27:46,55:i,56:a,57:o},t(l,[2,37]),t(l,u,{24:13,32:15,33:16,34:17,43:30,58:31,31:47,4:d,5:f,10:p,12:m,13:h,14:g,15:_,18:v,25:y,35:b,37:x,39:S,41:C,42:w,48:T,50:E,51:D,52:O,53:k,54:A,60:j,61:M,63:N,64:P,65:F,66:I,67:L}),t(l,[2,39]),t(l,[2,40]),t(l,[2,41]),{36:[1,48]},{38:[1,49]},{40:[1,50]},t(l,[2,45]),t(l,[2,46]),{18:[1,51]},{4:d,5:f,10:p,12:m,13:h,14:g,15:_,43:52,58:31,60:j,61:M,63:N,64:P,65:F,66:I,67:L},{4:d,5:f,10:p,12:m,13:h,14:g,15:_,43:53,58:31,60:j,61:M,63:N,64:P,65:F,66:I,67:L},{4:d,5:f,10:p,12:m,13:h,14:g,15:_,43:54,58:31,60:j,61:M,63:N,64:P,65:F,66:I,67:L},{4:d,5:f,10:p,12:m,13:h,14:g,15:_,43:55,58:31,60:j,61:M,63:N,64:P,65:F,66:I,67:L},{4:d,5:f,10:p,12:m,13:h,14:g,15:_,43:56,58:31,60:j,61:M,63:N,64:P,65:F,66:I,67:L},{4:d,5:f,10:p,12:m,13:h,14:g,15:_,43:57,58:31,60:j,61:M,63:N,64:P,65:F,66:I,67:L},{4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,44:[1,58],47:[1,59],58:61,59:60,63:N,64:P,65:F,66:I,67:L},t(B,[2,64]),t(B,[2,66]),t(B,[2,67]),t(B,[2,70]),t(B,[2,71]),t(B,[2,72]),t(B,[2,73]),t(B,[2,74]),t(B,[2,75]),t(B,[2,76]),t(B,[2,77]),t(B,[2,78]),t(B,[2,79]),t(B,[2,80]),t(B,[2,81]),t(s,[2,35]),t(l,[2,38]),t(l,[2,42]),t(l,[2,43]),t(l,[2,44]),{3:65,4:ee,5:te,6:ne,7:re,8:ie,9:ae,10:oe,11:se,12:ce,13:le,14:ue,15:de,21:64},t(l,[2,53],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,49:[1,78],63:N,64:P,65:F,66:I,67:L}),t(l,[2,56],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,49:[1,79],63:N,64:P,65:F,66:I,67:L}),t(l,[2,57],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,63:N,64:P,65:F,66:I,67:L}),t(l,[2,58],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,63:N,64:P,65:F,66:I,67:L}),t(l,[2,59],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,63:N,64:P,65:F,66:I,67:L}),t(l,[2,60],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,63:N,64:P,65:F,66:I,67:L}),{45:[1,80]},{44:[1,81]},t(B,[2,65]),t(B,[2,82]),t(B,[2,83]),t(B,[2,84]),{3:83,4:ee,5:te,6:ne,7:re,8:ie,9:ae,10:oe,11:se,12:ce,13:le,14:ue,15:de,18:[1,82]},t(V,[2,23]),t(V,[2,1]),t(V,[2,2]),t(V,[2,3]),t(V,[2,4]),t(V,[2,5]),t(V,[2,6]),t(V,[2,7]),t(V,[2,8]),t(V,[2,9]),t(V,[2,10]),t(V,[2,11]),t(V,[2,12]),t(l,[2,52],{58:31,43:84,4:d,5:f,10:p,12:m,13:h,14:g,15:_,60:j,61:M,63:N,64:P,65:F,66:I,67:L}),t(l,[2,55],{58:31,43:85,4:d,5:f,10:p,12:m,13:h,14:g,15:_,60:j,61:M,63:N,64:P,65:F,66:I,67:L}),{46:[1,86]},{45:[1,87]},{4:H,5:U,6:W,8:G,11:K,13:q,16:90,17:J,18:Y,19:X,20:Z,22:89,23:88},t(V,[2,24]),t(l,[2,51],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,63:N,64:P,65:F,66:I,67:L}),t(l,[2,54],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,63:N,64:P,65:F,66:I,67:L}),t(l,[2,47],{22:89,16:90,23:101,4:H,5:U,6:W,8:G,11:K,13:q,17:J,18:Y,19:X,20:Z}),{46:[1,102]},t(l,[2,29],{10:fe}),t(pe,[2,27],{16:104,4:H,5:U,6:W,8:G,11:K,13:q,17:J,18:Y,19:X,20:Z}),t(Q,[2,25]),t(Q,[2,13]),t(Q,[2,14]),t(Q,[2,15]),t(Q,[2,16]),t(Q,[2,17]),t(Q,[2,18]),t(Q,[2,19]),t(Q,[2,20]),t(Q,[2,21]),t(Q,[2,22]),t(l,[2,49],{10:fe}),t(l,[2,48],{22:89,16:90,23:105,4:H,5:U,6:W,8:G,11:K,13:q,17:J,18:Y,19:X,20:Z}),{4:H,5:U,6:W,8:G,11:K,13:q,16:90,17:J,18:Y,19:X,20:Z,22:106},t(Q,[2,26]),t(l,[2,50],{10:fe}),t(pe,[2,28],{16:104,4:H,5:U,6:W,8:G,11:K,13:q,17:J,18:Y,19:X,20:Z})],defaultActions:{8:[2,30],9:[2,31]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
|
|
2
2
|
`+h.showPosition()+`
|
|
3
3
|
Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};me.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./chunk-FOHPRMQF-CdD2_EOh.js";import{v as e}from"./mermaid-parser.core-
|
|
1
|
+
import"./chunk-FOHPRMQF-CdD2_EOh.js";import{v as e}from"./mermaid-parser.core-ByJNQf82.js";export{e as createRadarServices};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./chunk-FOHPRMQF-CdD2_EOh.js";import{g as e}from"./mermaid-parser.core-
|
|
1
|
+
import"./chunk-FOHPRMQF-CdD2_EOh.js";import{g as e}from"./mermaid-parser.core-ByJNQf82.js";export{e as createRailroadServices};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-FOHPRMQF-CdD2_EOh.js";import{m as e}from"./mermaid-parser.core-ByJNQf82.js";export{e as createRailroadAbnfServices};
|