From 2338fb2223bcb7a42fd8368045d55a730c5b549a Mon Sep 17 00:00:00 2001 From: liruifengv Date: Thu, 6 Aug 2026 19:34:17 +0800 Subject: [PATCH 1/5] chore: sync web dist from code-app --- ...-pVrDnT5M.js => CodeBlockNode-ZZ-0lk3E.js} | 4 +- .../assets/DesignSystemView-B7NHKYWW.js | 13 - .../assets/DesignSystemView-BOD_23qT.js | 13 + .../assets/DesignSystemView-BOdJHjg1.css | 1 - .../assets/DesignSystemView-BnL2v2lB.css | 1 + ...ooltip-DP9j1yrm.js => Tooltip-CPKMqLZA.js} | 2 +- ...DP.js => abnfDiagram-VRR7QNED-D_3zPyPt.js} | 2 +- .../{arc-DC-qDOw3.js => arc-E_7M-TWh.js} | 2 +- ... architectureDiagram-ZJ3FMSHR-CEA-tR1m.js} | 2 +- ...G.js => blockDiagram-677ZJIJ3-CpvS2-LC.js} | 2 +- ...-u6u.js => c4Diagram-LMCZKHZV-BvJQmgsI.js} | 2 +- .../dist-web/assets/channel-Bob_1R_C.js | 1 + .../dist-web/assets/channel-DV0CaBk6.js | 1 - ...BJB08iqf.js => chunk-2Q5K7J3B-B47YykJY.js} | 2 +- ...D2R4swWR.js => chunk-32BRIVSS-DAsxL712.js} | 2 +- ...DNp0lB9r.js => chunk-5VM5RSS4-CfD0Yt-O.js} | 2 +- ...DTDAbra3.js => chunk-EX3LRPZG-DGM3fHaz.js} | 2 +- ...BiIZjhuH.js => chunk-JWPE2WC7-DTx-f56M.js} | 2 +- ...CAYle-Q0.js => chunk-MOJQB5TN-hIDvr-8C.js} | 2 +- ...nfBZcgde.js => chunk-RYQCIY6F-BHZEnq1y.js} | 2 +- ...DIDk-4Yh.js => chunk-V7JOEXUC-DjiRieSh.js} | 2 +- ...Cveor6Gg.js => chunk-VR4S4FIN-he8WxbY-.js} | 2 +- ...CcyRETTg.js => chunk-XXDRQBXY-BmzWd-kT.js} | 2 +- .../assets/classDiagram-OUVF2IWQ-DSlPMBy0.js | 1 - .../assets/classDiagram-OUVF2IWQ-FzVd5qC_.js | 1 + .../classDiagram-v2-EOCWNBFH-DSlPMBy0.js | 1 - .../classDiagram-v2-EOCWNBFH-FzVd5qC_.js | 1 + ...4.js => cose-bilkent-JH36ORCC-B4N3AGR7.js} | 2 +- ...u2H2Wf.js => cynefin-VYW2F7L2-C5gNr-Q4.js} | 2 +- ...js => cynefinDiagram-TSTJHNR4-DZWywj_D.js} | 2 +- ...BbS-B0nZ.js => dagre-VKFMJZFB-CDFnWuZ_.js} | 2 +- ...GpYQg7.js => diagram-FQU43EPY-Cqley8W-.js} | 2 +- ...Pxt9_R.js => diagram-G47NLZAW-jJWknpV7.js} | 2 +- ...FCAjqP.js => diagram-NH7WQ7WH-iqDRMohg.js} | 2 +- ...Np_Rrf.js => diagram-OA4YK3LP-DSnuTLFG.js} | 2 +- ...yPHaUz.js => diagram-WEI45ONY-lGPhYqjp.js} | 2 +- ...Ya.js => ebnfDiagram-CCIWWBDH-DWQayqTx.js} | 2 +- ...l3be.js => erDiagram-Q63AITRT-MX1lpdtV.js} | 2 +- ...Dp.js => flowDiagram-23GEKE2U-BJ9xq3_H.js} | 2 +- ...L.js => ganttDiagram-NO4QXBWP-UHBCrlBo.js} | 2 +- ...s => gitGraphDiagram-IHSO6WYX-BO6zli_L.js} | 2 +- .../dist-web/assets/index-B-HzRssS.js | 626 ------------------ .../{index-ZTpPpnYb.js => index-B2KLv33G.js} | 2 +- .../dist-web/assets/index-C6xpOIeW.css | 1 - .../{index-CALEJJyh.js => index-CTjtTfCD.js} | 4 +- .../dist-web/assets/index-HRJ6xRtC.js | 626 ++++++++++++++++++ .../{index-DUhLXAkw.js => index-V37-dq86.js} | 2 +- .../dist-web/assets/index-vdPxBs-i.css | 1 + ...ndex10-BA5VPLT7.js => index10-BZ-Q5Z-w.js} | 2 +- ...ndex11-BTFBrOND.js => index11-DvlSNaLO.js} | 2 +- ...{index5-RZzprraT.js => index5-DRizs5us.js} | 2 +- ...{index6-CHOJPToe.js => index6-BS7x8iLz.js} | 2 +- ...{index7-BqOx7RWV.js => index7-CjjTl3F3.js} | 2 +- ...{index8-CNrUHH_V.js => index8-BwJHsPMm.js} | 2 +- ...mQ.js => infoDiagram-FWYZ7A6U-D1xLYfmf.js} | 2 +- ...s => ishikawaDiagram-FXEZZL3T-BpjBlRoK.js} | 2 +- ...js => journeyDiagram-5HDEW3XC-DW8NrHP6.js} | 2 +- ...=> kanban-definition-HUTT4EX6-DBZtJFK7.js} | 2 +- ...{linear-CmRMBRqQ.js => linear-DHRafvZW.js} | 2 +- ...e-BMAf1qng.js => mermaid.core-Cahi9cr1.js} | 8 +- ...> mindmap-definition-LN4V7U3C-FiRh3KHx.js} | 2 +- ...hli.js => pegDiagram-2B236MQR-DCy00Y6H.js} | 2 +- ...W9o.js => pieDiagram-ENE6RG2P-D4ADRI8d.js} | 2 +- ...s => quadrantDiagram-ABIIQ3AL-DM_U-KIt.js} | 2 +- ...s => railroadDiagram-RFXS5EU6-DemW1ILD.js} | 2 +- ...> requirementDiagram-TGXJPOKE-CxBcxos4.js} | 2 +- ....js => sankeyDiagram-HTMAVEWB-DQOKpLQv.js} | 2 +- ...s => sequenceDiagram-DBY2YBRQ-ne5mKmWY.js} | 2 +- ..._n.js => sizeCapture-X5ZJPWSS-CseHvhng.js} | 2 +- ...X.js => stateDiagram-2N3HPSRC-wqCW5C6q.js} | 2 +- .../stateDiagram-v2-6OUMAXLB-CDYO-PcE.js | 1 - .../stateDiagram-v2-6OUMAXLB-Dd3wUpwT.js | 1 + ...gNnC.js => swimlanes-5IMT3BWC-DIbCJfLo.js} | 4 +- .../swimlanesDiagram-G3AALYLV-D6x5uNZn.js | 8 - .../swimlanesDiagram-G3AALYLV-DRwlvM9F.js | 8 + ... timeline-definition-FHXFAJF6-DRuJB2Ns.js} | 2 +- ...pV.js => vennDiagram-L72KCM5P-DtEwf89X.js} | 2 +- ...js => vue.runtime.esm-bundler-BX4cWW2k.js} | 2 +- ...js => wardleyDiagram-EHGQE667-BQgMNH39.js} | 2 +- ...js => xychartDiagram-FW5EYKEG-DJUplk_O.js} | 2 +- apps/kimi-code/dist-web/index.html | 4 +- 81 files changed, 723 insertions(+), 723 deletions(-) rename apps/kimi-code/dist-web/assets/{CodeBlockNode-pVrDnT5M.js => CodeBlockNode-ZZ-0lk3E.js} (99%) delete mode 100644 apps/kimi-code/dist-web/assets/DesignSystemView-B7NHKYWW.js create mode 100644 apps/kimi-code/dist-web/assets/DesignSystemView-BOD_23qT.js delete mode 100644 apps/kimi-code/dist-web/assets/DesignSystemView-BOdJHjg1.css create mode 100644 apps/kimi-code/dist-web/assets/DesignSystemView-BnL2v2lB.css rename apps/kimi-code/dist-web/assets/{Tooltip-DP9j1yrm.js => Tooltip-CPKMqLZA.js} (98%) rename apps/kimi-code/dist-web/assets/{abnfDiagram-VRR7QNED-BHRZ0kDP.js => abnfDiagram-VRR7QNED-D_3zPyPt.js} (86%) rename apps/kimi-code/dist-web/assets/{arc-DC-qDOw3.js => arc-E_7M-TWh.js} (98%) rename apps/kimi-code/dist-web/assets/{architectureDiagram-ZJ3FMSHR-DMo1NOCy.js => architectureDiagram-ZJ3FMSHR-CEA-tR1m.js} (99%) rename apps/kimi-code/dist-web/assets/{blockDiagram-677ZJIJ3-BB6RrvwG.js => blockDiagram-677ZJIJ3-CpvS2-LC.js} (99%) rename apps/kimi-code/dist-web/assets/{c4Diagram-LMCZKHZV-CTIN-u6u.js => c4Diagram-LMCZKHZV-BvJQmgsI.js} (99%) create mode 100644 apps/kimi-code/dist-web/assets/channel-Bob_1R_C.js delete mode 100644 apps/kimi-code/dist-web/assets/channel-DV0CaBk6.js rename apps/kimi-code/dist-web/assets/{chunk-2Q5K7J3B-BJB08iqf.js => chunk-2Q5K7J3B-B47YykJY.js} (67%) rename apps/kimi-code/dist-web/assets/{chunk-32BRIVSS-D2R4swWR.js => chunk-32BRIVSS-DAsxL712.js} (96%) rename apps/kimi-code/dist-web/assets/{chunk-5VM5RSS4-DNp0lB9r.js => chunk-5VM5RSS4-CfD0Yt-O.js} (83%) rename apps/kimi-code/dist-web/assets/{chunk-EX3LRPZG-DTDAbra3.js => chunk-EX3LRPZG-DGM3fHaz.js} (99%) rename apps/kimi-code/dist-web/assets/{chunk-JWPE2WC7-BiIZjhuH.js => chunk-JWPE2WC7-DTx-f56M.js} (71%) rename apps/kimi-code/dist-web/assets/{chunk-MOJQB5TN-CAYle-Q0.js => chunk-MOJQB5TN-hIDvr-8C.js} (99%) rename apps/kimi-code/dist-web/assets/{chunk-RYQCIY6F-nfBZcgde.js => chunk-RYQCIY6F-BHZEnq1y.js} (99%) rename apps/kimi-code/dist-web/assets/{chunk-V7JOEXUC-DIDk-4Yh.js => chunk-V7JOEXUC-DjiRieSh.js} (99%) rename apps/kimi-code/dist-web/assets/{chunk-VR4S4FIN-Cveor6Gg.js => chunk-VR4S4FIN-he8WxbY-.js} (87%) rename apps/kimi-code/dist-web/assets/{chunk-XXDRQBXY-CcyRETTg.js => chunk-XXDRQBXY-BmzWd-kT.js} (72%) delete mode 100644 apps/kimi-code/dist-web/assets/classDiagram-OUVF2IWQ-DSlPMBy0.js create mode 100644 apps/kimi-code/dist-web/assets/classDiagram-OUVF2IWQ-FzVd5qC_.js delete mode 100644 apps/kimi-code/dist-web/assets/classDiagram-v2-EOCWNBFH-DSlPMBy0.js create mode 100644 apps/kimi-code/dist-web/assets/classDiagram-v2-EOCWNBFH-FzVd5qC_.js rename apps/kimi-code/dist-web/assets/{cose-bilkent-JH36ORCC-QGxEehq4.js => cose-bilkent-JH36ORCC-B4N3AGR7.js} (99%) rename apps/kimi-code/dist-web/assets/{cynefin-VYW2F7L2-B2u2H2Wf.js => cynefin-VYW2F7L2-C5gNr-Q4.js} (99%) rename apps/kimi-code/dist-web/assets/{cynefinDiagram-TSTJHNR4-Dkif7MEa.js => cynefinDiagram-TSTJHNR4-DZWywj_D.js} (98%) rename apps/kimi-code/dist-web/assets/{dagre-VKFMJZFB-BbS-B0nZ.js => dagre-VKFMJZFB-CDFnWuZ_.js} (97%) rename apps/kimi-code/dist-web/assets/{diagram-FQU43EPY-BgGpYQg7.js => diagram-FQU43EPY-Cqley8W-.js} (98%) rename apps/kimi-code/dist-web/assets/{diagram-G47NLZAW-DLPxt9_R.js => diagram-G47NLZAW-jJWknpV7.js} (97%) rename apps/kimi-code/dist-web/assets/{diagram-NH7WQ7WH-CkFCAjqP.js => diagram-NH7WQ7WH-iqDRMohg.js} (93%) rename apps/kimi-code/dist-web/assets/{diagram-OA4YK3LP-XuNp_Rrf.js => diagram-OA4YK3LP-DSnuTLFG.js} (96%) rename apps/kimi-code/dist-web/assets/{diagram-WEI45ONY-BxyPHaUz.js => diagram-WEI45ONY-lGPhYqjp.js} (95%) rename apps/kimi-code/dist-web/assets/{ebnfDiagram-CCIWWBDH-um5jZ6Ya.js => ebnfDiagram-CCIWWBDH-DWQayqTx.js} (87%) rename apps/kimi-code/dist-web/assets/{erDiagram-Q63AITRT-ClZyl3be.js => erDiagram-Q63AITRT-MX1lpdtV.js} (99%) rename apps/kimi-code/dist-web/assets/{flowDiagram-23GEKE2U-Cda1-vDp.js => flowDiagram-23GEKE2U-BJ9xq3_H.js} (99%) rename apps/kimi-code/dist-web/assets/{ganttDiagram-NO4QXBWP-BRVPZvRL.js => ganttDiagram-NO4QXBWP-UHBCrlBo.js} (99%) rename apps/kimi-code/dist-web/assets/{gitGraphDiagram-IHSO6WYX-BfyW9kzv.js => gitGraphDiagram-IHSO6WYX-BO6zli_L.js} (99%) delete mode 100644 apps/kimi-code/dist-web/assets/index-B-HzRssS.js rename apps/kimi-code/dist-web/assets/{index-ZTpPpnYb.js => index-B2KLv33G.js} (99%) delete mode 100644 apps/kimi-code/dist-web/assets/index-C6xpOIeW.css rename apps/kimi-code/dist-web/assets/{index-CALEJJyh.js => index-CTjtTfCD.js} (99%) create mode 100644 apps/kimi-code/dist-web/assets/index-HRJ6xRtC.js rename apps/kimi-code/dist-web/assets/{index-DUhLXAkw.js => index-V37-dq86.js} (99%) create mode 100644 apps/kimi-code/dist-web/assets/index-vdPxBs-i.css rename apps/kimi-code/dist-web/assets/{index10-BA5VPLT7.js => index10-BZ-Q5Z-w.js} (99%) rename apps/kimi-code/dist-web/assets/{index11-BTFBrOND.js => index11-DvlSNaLO.js} (99%) rename apps/kimi-code/dist-web/assets/{index5-RZzprraT.js => index5-DRizs5us.js} (95%) rename apps/kimi-code/dist-web/assets/{index6-CHOJPToe.js => index6-BS7x8iLz.js} (98%) rename apps/kimi-code/dist-web/assets/{index7-BqOx7RWV.js => index7-CjjTl3F3.js} (98%) rename apps/kimi-code/dist-web/assets/{index8-CNrUHH_V.js => index8-BwJHsPMm.js} (99%) rename apps/kimi-code/dist-web/assets/{infoDiagram-FWYZ7A6U-BWKmR6mQ.js => infoDiagram-FWYZ7A6U-D1xLYfmf.js} (69%) rename apps/kimi-code/dist-web/assets/{ishikawaDiagram-FXEZZL3T-Dxub-WlA.js => ishikawaDiagram-FXEZZL3T-BpjBlRoK.js} (99%) rename apps/kimi-code/dist-web/assets/{journeyDiagram-5HDEW3XC-BbQqB9Jp.js => journeyDiagram-5HDEW3XC-DW8NrHP6.js} (98%) rename apps/kimi-code/dist-web/assets/{kanban-definition-HUTT4EX6-D9rO7JqK.js => kanban-definition-HUTT4EX6-DBZtJFK7.js} (99%) rename apps/kimi-code/dist-web/assets/{linear-CmRMBRqQ.js => linear-DHRafvZW.js} (98%) rename apps/kimi-code/dist-web/assets/{mermaid.core-BMAf1qng.js => mermaid.core-Cahi9cr1.js} (99%) rename apps/kimi-code/dist-web/assets/{mindmap-definition-LN4V7U3C-DTp1GWYE.js => mindmap-definition-LN4V7U3C-FiRh3KHx.js} (98%) rename apps/kimi-code/dist-web/assets/{pegDiagram-2B236MQR-CZ-v0hli.js => pegDiagram-2B236MQR-DCy00Y6H.js} (87%) rename apps/kimi-code/dist-web/assets/{pieDiagram-ENE6RG2P-DQ4-sW9o.js => pieDiagram-ENE6RG2P-D4ADRI8d.js} (94%) rename apps/kimi-code/dist-web/assets/{quadrantDiagram-ABIIQ3AL-BLnW7KuD.js => quadrantDiagram-ABIIQ3AL-DM_U-KIt.js} (99%) rename apps/kimi-code/dist-web/assets/{railroadDiagram-RFXS5EU6-BslILK0i.js => railroadDiagram-RFXS5EU6-DemW1ILD.js} (84%) rename apps/kimi-code/dist-web/assets/{requirementDiagram-TGXJPOKE-CRL6Ek64.js => requirementDiagram-TGXJPOKE-CxBcxos4.js} (99%) rename apps/kimi-code/dist-web/assets/{sankeyDiagram-HTMAVEWB-CnczhSio.js => sankeyDiagram-HTMAVEWB-DQOKpLQv.js} (99%) rename apps/kimi-code/dist-web/assets/{sequenceDiagram-DBY2YBRQ-qM_aECMO.js => sequenceDiagram-DBY2YBRQ-ne5mKmWY.js} (99%) rename apps/kimi-code/dist-web/assets/{sizeCapture-X5ZJPWSS-CiMXtF_n.js => sizeCapture-X5ZJPWSS-CseHvhng.js} (86%) rename apps/kimi-code/dist-web/assets/{stateDiagram-2N3HPSRC-FiChRpmX.js => stateDiagram-2N3HPSRC-wqCW5C6q.js} (96%) delete mode 100644 apps/kimi-code/dist-web/assets/stateDiagram-v2-6OUMAXLB-CDYO-PcE.js create mode 100644 apps/kimi-code/dist-web/assets/stateDiagram-v2-6OUMAXLB-Dd3wUpwT.js rename apps/kimi-code/dist-web/assets/{swimlanes-5IMT3BWC-DnYOgNnC.js => swimlanes-5IMT3BWC-DIbCJfLo.js} (99%) delete mode 100644 apps/kimi-code/dist-web/assets/swimlanesDiagram-G3AALYLV-D6x5uNZn.js create mode 100644 apps/kimi-code/dist-web/assets/swimlanesDiagram-G3AALYLV-DRwlvM9F.js rename apps/kimi-code/dist-web/assets/{timeline-definition-FHXFAJF6-Dhsd8f4I.js => timeline-definition-FHXFAJF6-DRuJB2Ns.js} (99%) rename apps/kimi-code/dist-web/assets/{vennDiagram-L72KCM5P-BOIhPKpV.js => vennDiagram-L72KCM5P-DtEwf89X.js} (99%) rename apps/kimi-code/dist-web/assets/{vue.runtime.esm-bundler-0N7BeFaa.js => vue.runtime.esm-bundler-BX4cWW2k.js} (98%) rename apps/kimi-code/dist-web/assets/{wardleyDiagram-EHGQE667-DElAUW3r.js => wardleyDiagram-EHGQE667-BQgMNH39.js} (99%) rename apps/kimi-code/dist-web/assets/{xychartDiagram-FW5EYKEG-DiJMaRBQ.js => xychartDiagram-FW5EYKEG-DJUplk_O.js} (99%) diff --git a/apps/kimi-code/dist-web/assets/CodeBlockNode-pVrDnT5M.js b/apps/kimi-code/dist-web/assets/CodeBlockNode-ZZ-0lk3E.js similarity index 99% rename from apps/kimi-code/dist-web/assets/CodeBlockNode-pVrDnT5M.js rename to apps/kimi-code/dist-web/assets/CodeBlockNode-ZZ-0lk3E.js index 5acec3af13..5265af7e2c 100644 --- a/apps/kimi-code/dist-web/assets/CodeBlockNode-pVrDnT5M.js +++ b/apps/kimi-code/dist-web/assets/CodeBlockNode-ZZ-0lk3E.js @@ -1,5 +1,5 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-CALEJJyh.js","assets/index-B-HzRssS.js","assets/index-C6xpOIeW.css"])))=>i.map(i=>d[i]); -import{bR as xi,cb as Si,bQ as zo,M as vl,bl as Ci,af as dl,bY as Mi,cc as Bi,b$ as ml,aU as O,c0 as Ei,c1 as Fi,c2 as Pi,a0 as Co,aD as Ho,bE as ae,az as Li,cd as hn,c8 as vt,aI as No,aL as G,s as bn,aw as It,au as mt,bk as V,ce as Mo,u as oe,I as To,A as Oi,bJ as Ut,aY as pt,bL as cl,v as b,t as ye,bB as fl,bb as Me,q as k,b7 as $i,cf as zi,cg as gn,ch as Hi,ci as Ni,cj as Ti,ck as Ri,as as j,cl as Bo,cm as Di,cn as Ai,co as jt,cp as Eo,bO as Ro,T as ji,G as qi,F as Fo,g as Wi,c7 as _i,b_ as Ii}from"./index-B-HzRssS.js";import{i as fe,t as yn}from"./safeRaf-DGuzXxDK.js";var wn=(x,M,w)=>new Promise((te,ne)=>{var we=E=>{try{r(w.next(E))}catch(z){ne(z)}},be=E=>{try{r(w.throw(E))}catch(z){ne(z)}},r=E=>E.done?te(E.value):Promise.resolve(E.value).then(we,be);r((w=w.apply(x,M)).next())});let Po=!1,qt=null,Wt=null,_t=null;function Ui(){return wn(this,null,function*(){if(_t)return _t;_t=wn(null,null,function*(){if(!Wt)try{if(Wt=(function(x){const M=x;if(typeof M?.useMonaco=="function")return M;const w=x?.default;return typeof w?.useMonaco=="function"?w:null})(yield xi(()=>import("./index-CALEJJyh.js"),__vite__mapDeps([0,1,2]))),!Wt)return null}catch{return null}try{return yield(function(x){return wn(this,null,function*(){return Po?void 0:qt||(qt=wn(null,null,function*(){const w=globalThis?.MonacoEnvironment;w&&(typeof w.getWorker=="function"||typeof w.getWorkerUrl=="function")||typeof x?.preloadMonacoWorkers!="function"||(yield x.preloadMonacoWorkers()),Po=!0}).finally(()=>{qt=null}),qt)})})(Wt),Si(),Wt}catch{return null}});try{return yield _t}finally{_t=null}})}var Vi=Object.defineProperty,Gi=Object.defineProperties,Ji=Object.getOwnPropertyDescriptors,Lo=Object.getOwnPropertySymbols,Yi=Object.prototype.hasOwnProperty,Qi=Object.prototype.propertyIsEnumerable,Oo=(x,M,w)=>M in x?Vi(x,M,{enumerable:!0,configurable:!0,writable:!0,value:w}):x[M]=w,I=(x,M)=>{for(var w in M||(M={}))Yi.call(M,w)&&Oo(x,w,M[w]);if(Lo)for(var w of Lo(M))Qi.call(M,w)&&Oo(x,w,M[w]);return x},Ce=(x,M)=>Gi(x,Ji(M)),q=(x,M,w)=>new Promise((te,ne)=>{var we=E=>{try{r(w.next(E))}catch(z){ne(z)}},be=E=>{try{r(w.throw(E))}catch(z){ne(z)}},r=E=>E.done?te(E.value):Promise.resolve(E.value).then(we,be);r((w=w.apply(x,M)).next())});const Xi={key:0,class:"code-block-header flex justify-between items-center border-b px-[var(--ms-inset-panel-x)] py-[var(--ms-inset-panel-y)] border-[var(--code-border)] bg-[var(--code-header-bg)] text-[var(--code-fg)]"},Ki={class:"flex items-center gap-0.5"},Zi=["aria-label"],er={class:"code-diff-stat removed"},tr={class:"code-diff-stat added"},nr=["aria-label"],lr={key:0,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},or={key:1,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},ir=["aria-pressed"],rr={key:3,class:"relative"},ar=["aria-expanded"],ur=["disabled"],sr=["disabled"],dr=["disabled"],cr={key:0,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},fr={key:1,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},vr={class:"code-loading-placeholder"},mr={class:"sr-only","aria-live":"polite",role:"status"},pr=vl({__name:"CodeBlockShell",props:{showHeader:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showFontSizeButtons:{type:Boolean,default:!0},enableFontSizeControl:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExpandButton:{type:Boolean,default:!0},showPreviewButton:{type:Boolean,default:!0},showTooltips:{type:Boolean,default:!0},isDark:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},stream:{type:Boolean,default:!1},isCollapsed:{type:Boolean,default:!1},isExpanded:{type:Boolean,default:!1},copyText:{type:Boolean,default:!1},isPreviewable:{type:Boolean,default:!1},codeFontSize:{},codeFontMin:{},codeFontMax:{},defaultCodeFontSize:{},fontBaselineReady:{type:Boolean,default:!1},diffStats:{},diffStatsAriaLabel:{}},emits:["toggleCollapse","decreaseFont","resetFont","increaseFont","copy","toggleExpand","preview"],setup(x,{emit:M}){const w=x,te=M,ne=O(!1),we=O(null),be=O(null);function r(){vt(!0),ne.value=!ne.value,ne.value&&document.addEventListener("click",z,{once:!0,capture:!0})}function E(){vt(!0),ne.value=!1}function z(Y){var f,$;const yt=Y.target;(f=we.value)!=null&&f.contains(yt)||($=be.value)!=null&&$.contains(yt)?document.addEventListener("click",z,{once:!0,capture:!0}):E()}const ie=k(()=>w.showFontSizeButtons&&w.enableFontSizeControl||w.showExpandButton||w.isPreviewable&&w.showPreviewButton),{t:N}=ml(),ht=k(()=>w.showTooltips!==!1);function Ge(Y,f){ht.value&&_i(Y.currentTarget,f,"top",!1,void 0,w.isDark)}function Be(){ht.value&&vt()}function gt(Y){Ge(Y,w.copyText?N("common.copied")||"Copied":N("common.copy")||"Copy")}const pl=k(()=>{var Y,f;return!!Number.isFinite(w.codeFontSize)&&((Y=w.codeFontSize)!=null?Y:0)<=((f=w.codeFontMin)!=null?f:0)}),Vt=k(()=>!w.fontBaselineReady||w.codeFontSize===w.defaultCodeFontSize),Gt=k(()=>{var Y,f;return!!Number.isFinite(w.codeFontSize)&&((Y=w.codeFontSize)!=null?Y:0)>=((f=w.codeFontMax)!=null?f:100)});return(Y,f)=>(G(),oe(Fo,null,[w.showHeader?(G(),oe("div",Xi,[pt(Y.$slots,"header-left"),pt(Y.$slots,"header-right",{},()=>[b("div",Ki,[x.diffStats?(G(),oe("div",{key:0,class:"code-diff-stats","aria-label":x.diffStatsAriaLabel},[b("span",er,"-"+Me(x.diffStats.removed),1),b("span",tr,"+"+Me(x.diffStats.added),1)],8,Zi)):ye("",!0),w.showCopyButton?(G(),oe("button",{key:1,type:"button",class:"code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0 cursor-pointer text-[var(--code-action-fg)] hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] active:scale-[0.96] disabled:opacity-40 disabled:cursor-not-allowed transition-colors","aria-label":x.copyText?V(N)("common.copied")||"Copied":V(N)("common.copy")||"Copy",onClick:f[0]||(f[0]=$=>te("copy")),onMouseenter:f[1]||(f[1]=$=>gt($)),onFocus:f[2]||(f[2]=$=>gt($)),onMouseleave:Be,onBlur:Be},[x.copyText?(G(),oe("svg",or,[...f[14]||(f[14]=[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 6L9 17l-5-5"},null,-1)])])):(G(),oe("svg",lr,[...f[13]||(f[13]=[b("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[b("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}),b("path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"})],-1)])]))],40,nr)):ye("",!0),w.showCollapseButton?(G(),oe("button",{key:2,type:"button",class:"code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0 cursor-pointer text-[var(--code-action-fg)] hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] active:scale-[0.96] disabled:opacity-40 disabled:cursor-not-allowed transition-colors","aria-pressed":x.isCollapsed,onClick:f[3]||(f[3]=$=>te("toggleCollapse")),onMouseenter:f[4]||(f[4]=$=>Ge($,x.isCollapsed?V(N)("common.expand")||"Expand":V(N)("common.collapse")||"Collapse")),onFocus:f[5]||(f[5]=$=>Ge($,x.isCollapsed?V(N)("common.expand")||"Expand":V(N)("common.collapse")||"Collapse")),onMouseleave:Be,onBlur:Be},[(G(),oe("svg",{style:It({rotate:x.isCollapsed?"0deg":"90deg"}),xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[...f[15]||(f[15]=[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 18l6-6l-6-6"},null,-1)])],4))],40,ir)):ye("",!0),ie.value?(G(),oe("div",rr,[b("button",{ref_key:"moreBtnRef",ref:be,type:"button",class:"code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0 cursor-pointer text-[var(--code-action-fg)] hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] active:scale-[0.96] transition-colors","aria-expanded":ne.value,"aria-haspopup":"true",onClick:Ro(r,["stop"]),onMouseenter:f[6]||(f[6]=$=>Ge($,V(N)("common.more")||"More")),onFocus:f[7]||(f[7]=$=>Ge($,V(N)("common.more")||"More")),onMouseleave:Be,onBlur:Be},[...f[16]||(f[16]=[qi('',1)])],40,ar),To(Wi,{name:"code-menu"},{default:Ut(()=>[ne.value?(G(),oe("div",{key:0,ref_key:"moreMenuRef",ref:we,class:"code-more-menu min-w-[10rem] p-1 bg-[hsl(var(--ms-popover))] text-[hsl(var(--ms-popover-foreground))] border border-[var(--code-border)] shadow-[var(--ms-shadow-popover)]",role:"menu"},[w.showFontSizeButtons&&w.enableFontSizeControl?(G(),oe(Fo,{key:0},[b("button",{type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors",disabled:pl.value,onClick:f[8]||(f[8]=$=>{V(vt)(!0),te("decreaseFont")})},[f[17]||(f[17]=b("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14"})],-1)),b("span",null,Me(V(N)("common.fontSmaller")||"Font size −"),1)],8,ur),b("button",{type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors",disabled:Vt.value,onClick:f[9]||(f[9]=$=>{V(vt)(!0),te("resetFont")})},[f[18]||(f[18]=b("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[b("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[b("path",{d:"M3 12a9 9 0 1 0 9-9a9.75 9.75 0 0 0-6.74 2.74L3 8"}),b("path",{d:"M3 3v5h5"})])],-1)),b("span",null,Me(V(N)("common.fontReset")||"Font size reset"),1)],8,sr),b("button",{type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors",disabled:Gt.value,onClick:f[10]||(f[10]=$=>{V(vt)(!0),te("increaseFont")})},[f[19]||(f[19]=b("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14m-7-7v14"})],-1)),b("span",null,Me(V(N)("common.fontLarger")||"Font size +"),1)],8,dr)],64)):ye("",!0),w.showExpandButton?(G(),oe("button",{key:1,type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] transition-colors",onClick:f[11]||(f[11]=$=>{E(),te("toggleExpand")})},[x.isExpanded?(G(),oe("svg",cr,[...f[20]||(f[20]=[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m14 10l7-7m-1 7h-6V4M3 21l7-7m-6 0h6v6"},null,-1)])])):(G(),oe("svg",fr,[...f[21]||(f[21]=[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6"},null,-1)])])),b("span",null,Me(x.isExpanded?V(N)("common.collapse")||"Collapse":V(N)("common.expand")||"Expand"),1)])):ye("",!0),x.isPreviewable&&w.showPreviewButton?(G(),oe("button",{key:2,type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] transition-colors",onClick:f[12]||(f[12]=$=>{E(),te("preview")})},[f[22]||(f[22]=b("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[b("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[b("path",{d:"M2.062 12.348a1 1 0 0 1 0-.696a10.75 10.75 0 0 1 19.876 0a1 1 0 0 1 0 .696a10.75 10.75 0 0 1-19.876 0"}),b("circle",{cx:"12",cy:"12",r:"3"})])],-1)),b("span",null,Me(V(N)("common.preview")||"Preview"),1)])):ye("",!0)],512)):ye("",!0)]),_:1})])):ye("",!0)])])])):ye("",!0),cl(b("div",{class:mt(["code-block-shell-content",{"code-block-shell-content--collapsed":x.isCollapsed}])},[pt(Y.$slots,"default")],2),[[fl,!!x.stream||!x.loading]]),cl(b("div",vr,[pt(Y.$slots,"loading",{},()=>[f[23]||(f[23]=b("div",{class:"loading-skeleton"},[b("div",{class:"skeleton-line"}),b("div",{class:"skeleton-line"}),b("div",{class:"skeleton-line short"})],-1))])],512),[[fl,!x.stream&&x.loading]]),b("span",mr,Me(x.copyText?V(N)("common.copied")||"Copied":""),1)],64))}}),hr={class:"html-preview-frame__header"},gr={class:"html-preview-frame__title"},yr={class:"html-preview-frame__label"},wr=["sandbox","srcdoc"],br=zo(vl({__name:"HtmlPreviewFrame",props:{code:{},isDark:{type:Boolean},htmlPreviewAllowScripts:{type:Boolean},htmlPreviewSandbox:{},onClose:{type:Function},title:{}},setup(x){const M=x,w=import.meta!==void 0&&!1;let te=null;const{t:ne}=ml(),we=k(()=>{const E=M.code||"",z=E.trim().toLowerCase();return z.startsWith(" +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-CTjtTfCD.js","assets/index-HRJ6xRtC.js","assets/index-vdPxBs-i.css"])))=>i.map(i=>d[i]); +import{bR as xi,cb as Si,bQ as zo,M as vl,bl as Ci,af as dl,bY as Mi,cc as Bi,b$ as ml,aU as O,c0 as Ei,c1 as Fi,c2 as Pi,a0 as Co,aD as Ho,bE as ae,az as Li,cd as hn,c8 as vt,aI as No,aL as G,s as bn,aw as It,au as mt,bk as V,ce as Mo,u as oe,I as To,A as Oi,bJ as Ut,aY as pt,bL as cl,v as b,t as ye,bB as fl,bb as Me,q as k,b7 as $i,cf as zi,cg as gn,ch as Hi,ci as Ni,cj as Ti,ck as Ri,as as j,cl as Bo,cm as Di,cn as Ai,co as jt,cp as Eo,bO as Ro,T as ji,G as qi,F as Fo,g as Wi,c7 as _i,b_ as Ii}from"./index-HRJ6xRtC.js";import{i as fe,t as yn}from"./safeRaf-DGuzXxDK.js";var wn=(x,M,w)=>new Promise((te,ne)=>{var we=E=>{try{r(w.next(E))}catch(z){ne(z)}},be=E=>{try{r(w.throw(E))}catch(z){ne(z)}},r=E=>E.done?te(E.value):Promise.resolve(E.value).then(we,be);r((w=w.apply(x,M)).next())});let Po=!1,qt=null,Wt=null,_t=null;function Ui(){return wn(this,null,function*(){if(_t)return _t;_t=wn(null,null,function*(){if(!Wt)try{if(Wt=(function(x){const M=x;if(typeof M?.useMonaco=="function")return M;const w=x?.default;return typeof w?.useMonaco=="function"?w:null})(yield xi(()=>import("./index-CTjtTfCD.js"),__vite__mapDeps([0,1,2]))),!Wt)return null}catch{return null}try{return yield(function(x){return wn(this,null,function*(){return Po?void 0:qt||(qt=wn(null,null,function*(){const w=globalThis?.MonacoEnvironment;w&&(typeof w.getWorker=="function"||typeof w.getWorkerUrl=="function")||typeof x?.preloadMonacoWorkers!="function"||(yield x.preloadMonacoWorkers()),Po=!0}).finally(()=>{qt=null}),qt)})})(Wt),Si(),Wt}catch{return null}});try{return yield _t}finally{_t=null}})}var Vi=Object.defineProperty,Gi=Object.defineProperties,Ji=Object.getOwnPropertyDescriptors,Lo=Object.getOwnPropertySymbols,Yi=Object.prototype.hasOwnProperty,Qi=Object.prototype.propertyIsEnumerable,Oo=(x,M,w)=>M in x?Vi(x,M,{enumerable:!0,configurable:!0,writable:!0,value:w}):x[M]=w,I=(x,M)=>{for(var w in M||(M={}))Yi.call(M,w)&&Oo(x,w,M[w]);if(Lo)for(var w of Lo(M))Qi.call(M,w)&&Oo(x,w,M[w]);return x},Ce=(x,M)=>Gi(x,Ji(M)),q=(x,M,w)=>new Promise((te,ne)=>{var we=E=>{try{r(w.next(E))}catch(z){ne(z)}},be=E=>{try{r(w.throw(E))}catch(z){ne(z)}},r=E=>E.done?te(E.value):Promise.resolve(E.value).then(we,be);r((w=w.apply(x,M)).next())});const Xi={key:0,class:"code-block-header flex justify-between items-center border-b px-[var(--ms-inset-panel-x)] py-[var(--ms-inset-panel-y)] border-[var(--code-border)] bg-[var(--code-header-bg)] text-[var(--code-fg)]"},Ki={class:"flex items-center gap-0.5"},Zi=["aria-label"],er={class:"code-diff-stat removed"},tr={class:"code-diff-stat added"},nr=["aria-label"],lr={key:0,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},or={key:1,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},ir=["aria-pressed"],rr={key:3,class:"relative"},ar=["aria-expanded"],ur=["disabled"],sr=["disabled"],dr=["disabled"],cr={key:0,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},fr={key:1,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},vr={class:"code-loading-placeholder"},mr={class:"sr-only","aria-live":"polite",role:"status"},pr=vl({__name:"CodeBlockShell",props:{showHeader:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showFontSizeButtons:{type:Boolean,default:!0},enableFontSizeControl:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExpandButton:{type:Boolean,default:!0},showPreviewButton:{type:Boolean,default:!0},showTooltips:{type:Boolean,default:!0},isDark:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},stream:{type:Boolean,default:!1},isCollapsed:{type:Boolean,default:!1},isExpanded:{type:Boolean,default:!1},copyText:{type:Boolean,default:!1},isPreviewable:{type:Boolean,default:!1},codeFontSize:{},codeFontMin:{},codeFontMax:{},defaultCodeFontSize:{},fontBaselineReady:{type:Boolean,default:!1},diffStats:{},diffStatsAriaLabel:{}},emits:["toggleCollapse","decreaseFont","resetFont","increaseFont","copy","toggleExpand","preview"],setup(x,{emit:M}){const w=x,te=M,ne=O(!1),we=O(null),be=O(null);function r(){vt(!0),ne.value=!ne.value,ne.value&&document.addEventListener("click",z,{once:!0,capture:!0})}function E(){vt(!0),ne.value=!1}function z(Y){var f,$;const yt=Y.target;(f=we.value)!=null&&f.contains(yt)||($=be.value)!=null&&$.contains(yt)?document.addEventListener("click",z,{once:!0,capture:!0}):E()}const ie=k(()=>w.showFontSizeButtons&&w.enableFontSizeControl||w.showExpandButton||w.isPreviewable&&w.showPreviewButton),{t:N}=ml(),ht=k(()=>w.showTooltips!==!1);function Ge(Y,f){ht.value&&_i(Y.currentTarget,f,"top",!1,void 0,w.isDark)}function Be(){ht.value&&vt()}function gt(Y){Ge(Y,w.copyText?N("common.copied")||"Copied":N("common.copy")||"Copy")}const pl=k(()=>{var Y,f;return!!Number.isFinite(w.codeFontSize)&&((Y=w.codeFontSize)!=null?Y:0)<=((f=w.codeFontMin)!=null?f:0)}),Vt=k(()=>!w.fontBaselineReady||w.codeFontSize===w.defaultCodeFontSize),Gt=k(()=>{var Y,f;return!!Number.isFinite(w.codeFontSize)&&((Y=w.codeFontSize)!=null?Y:0)>=((f=w.codeFontMax)!=null?f:100)});return(Y,f)=>(G(),oe(Fo,null,[w.showHeader?(G(),oe("div",Xi,[pt(Y.$slots,"header-left"),pt(Y.$slots,"header-right",{},()=>[b("div",Ki,[x.diffStats?(G(),oe("div",{key:0,class:"code-diff-stats","aria-label":x.diffStatsAriaLabel},[b("span",er,"-"+Me(x.diffStats.removed),1),b("span",tr,"+"+Me(x.diffStats.added),1)],8,Zi)):ye("",!0),w.showCopyButton?(G(),oe("button",{key:1,type:"button",class:"code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0 cursor-pointer text-[var(--code-action-fg)] hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] active:scale-[0.96] disabled:opacity-40 disabled:cursor-not-allowed transition-colors","aria-label":x.copyText?V(N)("common.copied")||"Copied":V(N)("common.copy")||"Copy",onClick:f[0]||(f[0]=$=>te("copy")),onMouseenter:f[1]||(f[1]=$=>gt($)),onFocus:f[2]||(f[2]=$=>gt($)),onMouseleave:Be,onBlur:Be},[x.copyText?(G(),oe("svg",or,[...f[14]||(f[14]=[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 6L9 17l-5-5"},null,-1)])])):(G(),oe("svg",lr,[...f[13]||(f[13]=[b("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[b("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}),b("path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"})],-1)])]))],40,nr)):ye("",!0),w.showCollapseButton?(G(),oe("button",{key:2,type:"button",class:"code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0 cursor-pointer text-[var(--code-action-fg)] hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] active:scale-[0.96] disabled:opacity-40 disabled:cursor-not-allowed transition-colors","aria-pressed":x.isCollapsed,onClick:f[3]||(f[3]=$=>te("toggleCollapse")),onMouseenter:f[4]||(f[4]=$=>Ge($,x.isCollapsed?V(N)("common.expand")||"Expand":V(N)("common.collapse")||"Collapse")),onFocus:f[5]||(f[5]=$=>Ge($,x.isCollapsed?V(N)("common.expand")||"Expand":V(N)("common.collapse")||"Collapse")),onMouseleave:Be,onBlur:Be},[(G(),oe("svg",{style:It({rotate:x.isCollapsed?"0deg":"90deg"}),xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[...f[15]||(f[15]=[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 18l6-6l-6-6"},null,-1)])],4))],40,ir)):ye("",!0),ie.value?(G(),oe("div",rr,[b("button",{ref_key:"moreBtnRef",ref:be,type:"button",class:"code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0 cursor-pointer text-[var(--code-action-fg)] hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] active:scale-[0.96] transition-colors","aria-expanded":ne.value,"aria-haspopup":"true",onClick:Ro(r,["stop"]),onMouseenter:f[6]||(f[6]=$=>Ge($,V(N)("common.more")||"More")),onFocus:f[7]||(f[7]=$=>Ge($,V(N)("common.more")||"More")),onMouseleave:Be,onBlur:Be},[...f[16]||(f[16]=[qi('',1)])],40,ar),To(Wi,{name:"code-menu"},{default:Ut(()=>[ne.value?(G(),oe("div",{key:0,ref_key:"moreMenuRef",ref:we,class:"code-more-menu min-w-[10rem] p-1 bg-[hsl(var(--ms-popover))] text-[hsl(var(--ms-popover-foreground))] border border-[var(--code-border)] shadow-[var(--ms-shadow-popover)]",role:"menu"},[w.showFontSizeButtons&&w.enableFontSizeControl?(G(),oe(Fo,{key:0},[b("button",{type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors",disabled:pl.value,onClick:f[8]||(f[8]=$=>{V(vt)(!0),te("decreaseFont")})},[f[17]||(f[17]=b("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14"})],-1)),b("span",null,Me(V(N)("common.fontSmaller")||"Font size −"),1)],8,ur),b("button",{type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors",disabled:Vt.value,onClick:f[9]||(f[9]=$=>{V(vt)(!0),te("resetFont")})},[f[18]||(f[18]=b("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[b("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[b("path",{d:"M3 12a9 9 0 1 0 9-9a9.75 9.75 0 0 0-6.74 2.74L3 8"}),b("path",{d:"M3 3v5h5"})])],-1)),b("span",null,Me(V(N)("common.fontReset")||"Font size reset"),1)],8,sr),b("button",{type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors",disabled:Gt.value,onClick:f[10]||(f[10]=$=>{V(vt)(!0),te("increaseFont")})},[f[19]||(f[19]=b("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14m-7-7v14"})],-1)),b("span",null,Me(V(N)("common.fontLarger")||"Font size +"),1)],8,dr)],64)):ye("",!0),w.showExpandButton?(G(),oe("button",{key:1,type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] transition-colors",onClick:f[11]||(f[11]=$=>{E(),te("toggleExpand")})},[x.isExpanded?(G(),oe("svg",cr,[...f[20]||(f[20]=[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m14 10l7-7m-1 7h-6V4M3 21l7-7m-6 0h6v6"},null,-1)])])):(G(),oe("svg",fr,[...f[21]||(f[21]=[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6"},null,-1)])])),b("span",null,Me(x.isExpanded?V(N)("common.collapse")||"Collapse":V(N)("common.expand")||"Expand"),1)])):ye("",!0),x.isPreviewable&&w.showPreviewButton?(G(),oe("button",{key:2,type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] transition-colors",onClick:f[12]||(f[12]=$=>{E(),te("preview")})},[f[22]||(f[22]=b("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[b("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[b("path",{d:"M2.062 12.348a1 1 0 0 1 0-.696a10.75 10.75 0 0 1 19.876 0a1 1 0 0 1 0 .696a10.75 10.75 0 0 1-19.876 0"}),b("circle",{cx:"12",cy:"12",r:"3"})])],-1)),b("span",null,Me(V(N)("common.preview")||"Preview"),1)])):ye("",!0)],512)):ye("",!0)]),_:1})])):ye("",!0)])])])):ye("",!0),cl(b("div",{class:mt(["code-block-shell-content",{"code-block-shell-content--collapsed":x.isCollapsed}])},[pt(Y.$slots,"default")],2),[[fl,!!x.stream||!x.loading]]),cl(b("div",vr,[pt(Y.$slots,"loading",{},()=>[f[23]||(f[23]=b("div",{class:"loading-skeleton"},[b("div",{class:"skeleton-line"}),b("div",{class:"skeleton-line"}),b("div",{class:"skeleton-line short"})],-1))])],512),[[fl,!x.stream&&x.loading]]),b("span",mr,Me(x.copyText?V(N)("common.copied")||"Copied":""),1)],64))}}),hr={class:"html-preview-frame__header"},gr={class:"html-preview-frame__title"},yr={class:"html-preview-frame__label"},wr=["sandbox","srcdoc"],br=zo(vl({__name:"HtmlPreviewFrame",props:{code:{},isDark:{type:Boolean},htmlPreviewAllowScripts:{type:Boolean},htmlPreviewSandbox:{},onClose:{type:Function},title:{}},setup(x){const M=x,w=import.meta!==void 0&&!1;let te=null;const{t:ne}=ml(),we=k(()=>{const E=M.code||"",z=E.trim().toLowerCase();return z.startsWith(" diff --git a/apps/kimi-code/dist-web/assets/DesignSystemView-B7NHKYWW.js b/apps/kimi-code/dist-web/assets/DesignSystemView-B7NHKYWW.js deleted file mode 100644 index c70d8de769..0000000000 --- a/apps/kimi-code/dist-web/assets/DesignSystemView-B7NHKYWW.js +++ /dev/null @@ -1,13 +0,0 @@ -import{M as T,aD as z,aI as q,aL as o,u as i,v as a,G as t,H as s,F as p,aX as w,bb as y,I as c,bk as b,cx as h,cy as B,cz as k,cA as A,cB as M}from"./index-B-HzRssS.js";const I={class:"ds-page"},V={class:"layout"},E={class:"content"},H={class:"content-inner"},L={id:"tokens"},D={class:"icon-sizes"},W={class:"sz"},O={class:"p-ic",style:{width:"14px",height:"14px"},viewBox:"0 0 24 24",fill:"currentColor"},R={class:"sz"},U={class:"p-ic",style:{width:"16px",height:"16px"},viewBox:"0 0 24 24",fill:"currentColor"},N={class:"sz"},F={class:"p-ic",style:{width:"20px",height:"20px"},viewBox:"0 0 24 24",fill:"currentColor"},P={class:"icon-grid"},j={class:"icon-group-label"},K={class:"ic-name"},G={id:"primitives"},_={class:"stage-wrap"},J={class:"stage p"},Q={class:"p-pill",style:{color:"var(--p-warning)"}},Y={class:"stage-wrap"},Z={class:"stage p col"},X={class:"demo-row"},$={class:"p-btn primary disabled"},ee={class:"p-spinner sm",viewBox:"0 0 24 24",style:{"--p-accent":"#fff","--p-line":"rgba(255,255,255,.35)"}},ae={class:"stage-wrap"},te={class:"stage p col"},se={class:"demo-row"},de={class:"stage-wrap"},oe={class:"stage p col",style:{gap:"0",background:"var(--p-surface)",padding:"0","max-width":"300px","align-items":"stretch"}},ie={style:{display:"flex","align-items":"center",gap:"8px",padding:"7px 10px",margin:"1px 6px","border-radius":"8px",color:"var(--p-text)","font-size":"13px"}},ne={style:{color:"var(--d-fg-faint)",flex:"none"},width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor"},le={style:{display:"flex","align-items":"center",gap:"8px",padding:"7px 10px",margin:"1px 6px","border-radius":"8px",color:"var(--p-text)","font-size":"13px"}},re={style:{color:"var(--d-fg-faint)",flex:"none"},width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor"},ce={id:"chat"},ve={class:"stage-wrap"},be={class:"stage p col"},pe={style:{"max-width":"560px",width:"100%"}},he={class:"stage-wrap"},ue={class:"stage p col",style:{"align-items":"center",background:"#fff"}},ge={class:"p-composer",style:{width:"100%","max-width":"620px"}},me={class:"p-composer-bar"},fe={class:"p-composer-left"},we={class:"p-pill",style:{color:"var(--p-warning)"}},ye="/repo",ke=T({__name:"DesignSystemView",emits:["close"],setup(xe,{emit:x}){const C=[{path:"/repo/apps/web/src/components/chat/TurnFilesSummary.vue",added:19,removed:4,hasWrite:!1,statsIncomplete:!1,diff:null},{path:"/repo/apps/web/src/composables/useFilePreview.ts",added:8,removed:1,hasWrite:!1,statsIncomplete:!1,diff:null},{path:"/repo/apps/web/src/components/chatTurnRendering.ts",added:0,removed:0,hasWrite:!0,statsIncomplete:!0,diff:null},{path:"/repo/apps/web/src/lib/toolDiff.ts",added:3,removed:2,hasWrite:!1,statsIncomplete:!1,diff:null}];function u(){}const S=x;function g(){S("close")}let v=null;function m(r){r.key==="Escape"&&g()}return z(()=>{document.addEventListener("keydown",m);const r=Array.prototype.slice.call(document.querySelectorAll('#nav a[href^="#"]')),e=new Map;r.forEach(l=>{const d=l.getAttribute("href");if(!d)return;const f=document.getElementById(d.slice(1));f&&e.set(f,l)});let n=null;v=new IntersectionObserver(l=>{l.forEach(d=>{d.isIntersecting&&(n&&n.classList.remove("active"),n=e.get(d.target)??null,n&&n.classList.add("active"))})},{rootMargin:"-20% 0px -70% 0px",threshold:0}),e.forEach((l,d)=>v.observe(d)),r.length&&r[0].classList.add("active")}),q(()=>{document.removeEventListener("keydown",m),v&&(v.disconnect(),v=null)}),(r,e)=>(o(),i("div",I,[a("div",{class:"ds-topbar"},[a("button",{class:"ds-back",type:"button",onClick:g},"← Back"),e[0]||(e[0]=a("span",{class:"ds-topbar-title"},"Design system",-1))]),a("div",V,[e[44]||(e[44]=t('',1)),a("main",E,[a("div",H,[e[42]||(e[42]=t('
● Design System · v1.0

Kimi Web Design System

This document defines the visual language and component specification for Kimi Web — design tokens, component primitives, the chat interface, theming, and style rules. All UI work is grounded in it: unified, restrained, token-driven, and themeable.

Scope apps/kimi-webComponent primitivesTheme 1 set · 4 customizable colorsLight / dark mode
i
This spec is the single reference when changing the web UI. Before adding or modifying a component, style, layout, or theme, read this document first; color, font, radius, spacing, shadow, z-index, and motion always use the §02 tokens, components reuse the §03 primitives, and the §06 style rules are followed.
01

Design Principles

Every UI decision traces back to the following principles. Kimi Web is a local Agent tool for developers: quick scanning, long stretches of staring, often in the dark — the design serves the task, and is restrained, clinical, and density-first.

Brand tone (the do-not list): calm, clinical, never exaggerated. Reject purple gradients, glassmorphism, glowing shadows, AI purple / blue glows, endlessly looping fussy micro-animations, "Boost your productivity"-style marketing copy, and using emoji as icons. These are all common tells of AI-generated interfaces (an "AI tell"), deliberately avoided.
i
Declare design intent first (Design Read): before adding a component / page, write one sentence describing its scenario, audience, and tone (for example, "a lightweight tool card embedded in a conversation, for developers, calm and restrained"), then build. If the intent isn't clear, ask one question first rather than defaulting to the nearest existing style.
',2)),a("section",L,[e[7]||(e[7]=t(`
02

Design Tokens

Collapse every visual decision into tokens. Color tokens keep the existing short names and fill out the semantics (lowering migration cost), while spacing, z-index, motion, and font-weight fill in the scales that are currently missing. Every token has: name, light value, dark value, and usage.

i
Naming convention: --<category>-<role>-<state>. For example --color-text-muted, --radius-md, --space-4. To reduce churn, the existing short names (--bg / --ink / --line / --blue …) are kept as compatibility aliases for one release cycle.

Color

Semantic-first, in three layers: background / text / border + accent + status colors. All colors are defined in light / dark pairs, with contrast ≥ 4.5:1.

i
The table below shows the semantic tokens. Each ships a light value in :root and a dark override in the data-color-scheme blocks — for example --color-bg is #ffffff in light and #121212 in dark; --color-accent is the brand blue (#1783ff light / #1a88ff dark). The semantic status colors (success / warning / danger / info) are independent palettes, one set each for light / dark.
bg
#ffffff / #121212
surface
#f5f5f5 / #1f1f1f
surface-sunken
#f5f5f5 / #121212
well
#f5f5f5 / #1f1f1f
surface-deep
#f5f5f5 / #0d0d0d
surface-overlay
#ffffff / rgba(255,255,255,.1)
selected
rgba(0,0,0,.05) / rgba(255,255,255,.1)
fg
rgba(0,0,0,.9) / rgba(255,255,255,.84)
fg-muted
rgba(0,0,0,.6) / rgba(255,255,255,.56)
line
rgba(0,0,0,.13) / rgba(255,255,255,.12)
subtle
rgba(0,0,0,.05) / rgba(255,255,255,.05)
accent (KMBlue)
#1783ff / #1a88ff
accent-soft
#e8f3ff / rgba(26,136,255,.1)
TokenLightDarkUsage
--color-bg#ffffff#121212Page background
--color-surface#f5f5f5#1f1f1fPanel / sidebar / card head
--color-surface-raised#ffffff#292929Raised card / dialog / input
--color-menu-bgrgba(255,255,255,.95)rgba(41,41,41,.95)Floating menu panel — frosted glass over --p-menu-backdrop blur
--color-surface-overlay#ffffffrgba(255,255,255,.1)Field-control fill on raised cards (selects, steppers) — top rung; light tops out at white (the level is carried by the border), dark steps one rung above raised. Floating layers stay at raised
--color-well#f5f5f5#1f1f1fContent well on the page (code blocks, tool-output panels, match/file lists, media thumbnails) — light reuses the sunken recess; dark lifts one rung ABOVE the page, because a true recess (#121212) vanishes into the page there
--color-surface-deep#f5f5f5#0d0d0dDeep chrome plane one step BELOW the page (panel headers, diff gutters) — dark drops under --color-bg so chrome framing stays darker than the content it frames
--color-textrgba(0,0,0,.9)rgba(255,255,255,.84)Body text / headings
--color-text-strong#000000#ffffffMax foreground emphasis — menu-row label & icon on hover
--color-text-mutedrgba(0,0,0,.6)rgba(255,255,255,.56)Secondary text / placeholder
--color-linergba(0,0,0,.13)rgba(255,255,255,.12)Divider / card border
--color-subtlergba(0,0,0,.05)rgba(255,255,255,.05)Subtle hairline — tertiary separators below --color-line (diff-gutter column rules, quiet dividers inside wells)
--color-selectedrgba(0,0,0,.05)rgba(255,255,255,.1)Neutral selected fill (sidebar rows, list pickers) — translucent, never accent-tinted
--color-hoverrgba(0,0,0,.03)rgba(255,255,255,.05)Row hover wash — lighter than the selected fill (hover < selected); translucent, sits on any surface. The global hover rule: transparent-base controls overlay this f1 wash (hover never darkens — never sunken); filled controls use their own hover token (accent-hover, send-bg-hover)
--color-inline-code-bgrgba(0,0,0,.03)rgba(255,255,255,.1)Inline-code chip fill — fills.f1 / fills.f2; dark lifts off any dark surface (sunken == bg there)
--color-media-alpha-bg-1≈#858585≈#76797eCheckerboard square A of the <img> alpha canvas — color-mix of --color-bg/--color-text (52/48); applied via --media-alpha-canvas (16px period)
--color-media-alpha-bg-2≈#6b6b6b≈#8c8f93Checkerboard square B (42/58) — both squares stay ≥3:1 against white and black; opaque images cover the canvas
--color-sidebar-bg#f9fbfc#0d0d0dSidebar surface — one step off --color-bg (just under white in light, one step BELOW the page in dark) so the session column reads as its own plane and never brighter than the reading surface
--color-scrimrgba(0,0,0,.4)rgba(0,0,0,.6)Modal scrim — the dark veil behind dialogs/lightboxes (mask.base; legacy hardcoded overlays can migrate here)
--color-scrim-strongrgba(0,0,0,.6)rgba(0,0,0,.75)Stronger scrim for full-screen media previews (mask.strong — the PhotoSwipe image preview backdrop)
--color-text-on-scrim#ffffffsameText drawn on the scrim (captions over the media lightbox)
--color-accent#1783ff#1a88ffPrimary action / link / focus
--color-success#0e7a38#3fb950Success / pass
--color-warning#a9610a#d29922Warning / pending
--color-danger#c0392b#f85149Danger / error / abort

Palette

The palette is the production kimi.com palette (design tokens tokens.json): neutral-gray surfaces, an alpha-based label / fill / separator ramp (labels.* / fills.* / separator.s1), the KMBlue accent, and a true neutral dark ladder (#121212 → #1f1f1f → #292929; the deep chrome plane and sidebar derive one step below at #0d0d0d — the palette has nothing darker than primary).

The ONE deliberate exception is the status hues: success / warning / danger / done keep the app's own WCAG-tuned ramp (≥4.5:1 on the neutral surfaces) — the production status colours (positiveGreen #16c456, orange #ff9500, danger red #ff3849) are too bright against it. Diff add/del bands happen to coincide (both use the production 25% fills in light, 14% in dark).

Surface usage

The surface layers each have a role — choose by "field overlay / raised layer / content well / default flat layer / sunken layer / page background / deep chrome", and avoid treating --p-surface-raised as a universal background. In dark, elevation = lighter: floating layers sit above the content, content wells sit above the page, and chrome planes (sidebar, panel headers) sit below it — never the reverse. One consequence: on the page itself, never use --color-surface-sunken for a content carrier — it equals --color-bg in dark and the fill vanishes; use --color-well. Sunken stays correct INSIDE surface / raised cards, where it is a genuine recess. Field controls (selects, steppers) on a raised card use --color-surface-overlay, the top fill rung; floating layers keep --color-surface-raised — their elevation is shadow + hairline, not a lighter fill.

TokenLightDarkUsage
--p-surface-overlay#ffffff#22272eField controls on raised cards — select, stepper (top fill rung; light = white)
--p-surface-raised#ffffff#1c2128Raised card / dialog / input (raised layer)
--p-well#f3f5f8#13181eCode block / tool output / list carrier directly on the page (content well — light: recessed, dark: one rung above the page)
--p-surface#fafbfc#13181ePanel / sidebar / card head (default flat layer)
--p-surface-sunken#f3f5f8#0d1117Recessed area INSIDE a surface / raised card — never a content carrier on the page (sunken layer)
--p-bg#ffffff#0d1117Page background
--p-surface-deep#fafbfc#0a0d12Panel header / diff gutter (deep chrome layer — below the page in dark)

Borders & hairlines

Three line tokens, three jobs: --color-line is the default structural separator, --color-subtle the tertiary separator that must stay quieter (diff-gutter column rules, quiet dividers inside wells), and --color-line-strong the edge of interactive controls (inputs, selects, secondary buttons). Width is one: 0.5px — every stroke is the same hairline, on static structural edges (card rims, plane seams, header dividers), interactive control rims and floating layers alike. Separation comes from luminance first — planes one rung apart already read as distinct in dark, so their shared edge stays a 0.5px hairline rather than a heavier border; same-rung neighbours (list rows, card head / body) are exactly where a hairline is required. In dark, drop shadows fade on near-black surfaces, so a floating layer's edge IS its hairline — never ship a shadow-only floating surface. (Legacy --line / --line2 alias --color-line / --color-subtle for one cycle; new work references the v2 names.)

Focus ring

All focusable controls (button, input, link, menu item, switch, checkbox) use the focus-ring token uniformly; do not hand-write a box-shadow focus ring.

TokenValueUsage
--p-focus-ring0 0 0 3px var(--p-accent-soft)Default focus ring (link, menu item, switch, checkbox)
--p-focus-ring-strong0 0 0 3px var(--p-accent-soft), 0 0 0 1px var(--p-accent)Strong focus ring (button, primary action)

Text selection

The text-selection color uses --p-selection uniformly (light rgba(23,131,255,.18) / dark rgba(88,166,255,.32)), applied by the global ::selection rule; do not set a separate highlight background.

Disabled state

All disabled controls use opacity:.5 + cursor:not-allowed uniformly; do not separately grey out or recolor.

Font families

Kimi Web uses two font tokens: --font-ui (UI and body, with Schibsted Grotesk for Latin and Noto Sans SC for Simplified Chinese) and --font-mono (code and monospace). Components always reference the variables; do not hard-code font names.

--font-ui · UI & body (Schibsted Grotesk + Noto Sans SC)

Body and UI use self-hosted Schibsted Grotesk for Latin text and self-hosted Noto Sans SC Variable for Simplified Chinese. Platform fonts remain as fallbacks:

--font-ui
--font-ui: "Schibsted Grotesk Variable", "Helvetica Neue", Arial,
-      "Noto Sans SC Variable", "Noto Sans SC", "PingFang SC",
-      "Microsoft YaHei",
-      -apple-system, BlinkMacSystemFont, "Segoe UI",
-      Roboto, Ubuntu, sans-serif,
-      "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji";

--font-mono · Code & monospace

Code, line numbers, diffs, and Bash commands use JetBrains Mono (a self-hosted variable font), falling back to the system monospace. Other tool labels and summaries use the UI font:

--font-mono
--font-mono: "JetBrains Mono Variable", "JetBrains Mono",
-      ui-monospace, "SF Mono", Menlo, Consolas, monospace;

Loading strategy

FontSourceBundledUsage
JetBrains Mono@fontsource-variable/jetbrains-mono✓ self-hostedmonospace / code (--font-mono)
Schibsted Groteskprepare-fonts → web-ui/assets/fonts✓ generated + bundledUI / body / display (--font-ui, --font-display), wght 400-900, normal + italic
Noto Sans SCprepare-fonts → web-ui/assets/fonts✓ generated + bundledSimplified Chinese UI / body, wght 100–900
System UI / CJK fontsoperating systemlate fallback for UI / body
Schibsted Grotesk, Noto Sans SC, and JetBrains Mono are self-hosted. They make no external network requests and work offline; platform fonts remain as fallbacks.

Usage rules

Type scale & weight

The user font-size preference is one of four named steps (small / medium / large / xlarge, Medium default) written to data-font-scale on <html>; the step name is persisted, never a px value. The step only moves --base-font; every size token derives additively (default + shift), and line heights are locked to integer px via round(size × ratio, 1px) — never a unitless ratio.

Two token groups share the shift but keep their own ratios: --ui-* for chrome (tight, 1.40–1.50) and --md-* for Markdown content + the composer (loose, 1.56–1.63; body is anchored to the UI body size — the spec's +2px offset was dropped as a product decision — while keeping its own looser line-height ratios). T0/T1 cap at 24/22px on the top steps (built into the tokens via min() — do not remove). Use the .text-ui-* / .text-md-* utility classes; legacy aliases --ui-font-size (→ --ui-b2), --content-font-size (→ --md-b1) and the whole 6-level --text-* ramp (xs→c1, sm→b2−1px, base→b2, lg→t2, xl→t1, 2xl→t0) keep older components on the ramp. Panel titles sit at the base step (--ui-b2); dropdown menu items sit one rung below (--text-sm = b2 − 1px) — both still follow the user's font scale.

Section Title
--ui-t1 · title (cap 22)
Card title
--ui-t2 · subtitle
UI emphasis
--ui-b1 · body strong
UI control / button / form
--ui-b2 · body
Helper text / table
--ui-c1 · caption
Badge / timestamp
--ui-c2 · non-critical only
Markdown H1
--md-h1
Chat body / message bubbles / composer
--md-b1 · prose body
Quote / table
--md-b2 · secondary
Code block / inline code
--md-b3 · weak / code

The fixed product type tokens still define scale-independent defaults: transcript prose enables text-autospace: normal for mixed CJK and Latin text. Drop stray font-weight: 650 / 750; converge on 400 / 500 (regular / emphasis), with a dedicated 600 weight for sidebar section labels.

TokenValueUsage
--font-ui"Schibsted Grotesk Variable", …, "Noto Sans SC Variable", …UI & body (Schibsted Grotesk + Noto Sans SC)
--font-kbd"Schibsted Grotesk Variable", system-ui, sans-serifkeyboard shortcut keycaps
--font-monoJetBrains Mono…code, Bash commands, line numbers, diffs
data-font-scalesmall / medium / large / xlargeuser preference on <html>; sets --base-font (12–18px), Medium = 14px default
--ui-t0…--ui-c2default + --ui-shift, t0/t1 capped via min()chrome type ramp (title / subtitle / body / caption); .text-ui-* classes
--md-h1…--md-b3default + --md-shiftMarkdown ramp (headings / body / secondary / code); .text-md-* classes
--ui-font-size / --content-font-sizevar(--ui-b2) / var(--md-b1)legacy aliases kept on the ramp
--code-font-sizecalc(var(--content-font-size) - 2px)standalone code surfaces (diff view, file preview, tool cards) — one step below body, 12px @ Medium; prose-embedded code stays on the --md-* ramp
--text-xs / sm / base / lg / xl / 2xlc1 / b2−1 / b2 / t2 / t1 / t0legacy ramp, aliased into the scale
--leading-tight/normal/prose/relaxed1.25 / 1.5 / 1.6 / 1.7headings / UI / chat prose / long text
--weight-regular/option-label/medium/ui-strong400 / 475 / 500 / 525body / settings labels / emphasis / compact UI emphasis
--weight-section-label600sidebar section labels

Icon size

Icons use three size tokens uniformly. The global .p-ic default is 16px (--p-ic-md); components pick as needed, and random pixel sizes are forbidden.

TokenValueUsage
--p-ic-sm14pxsmall button, badge, menu item, inline link icon
--p-ic-md16pxdefault (button, icon button, toolbar)
--p-ic-lg20pxToast status icon, empty-state illustration

Icon

Icons always come from the centralized registry lib/icons.ts: in templates use the <Icon name size /> component (components/ui/Icon.vue); for v-html contexts (such as a tool glyph) use iconSvg(name, size). Do not hand-write <svg> — the scripts/check-style.mjs icon-from-registry rule flags stray SVGs. Every glyph shares the 24×24 source grid and currentColor (colour follows text); size uses the three tokens below, and only icons imported in lib/icons.ts are bundled by unplugin-icons at build time. Three collections feed the registry, in this order of preference: ~icons/kimi/* — Kimi Design System icons (24×24 outlined, 1.8px stroke), local SVGs under src/icons/kimi/ registered as a custom collection in the Vite config, used whenever a Kimi glyph exists for the intent; ~icons/tabler/* — Tabler Icons (MIT), for the few gaps it uniquely covers (today: the right-panel toggle); and ~icons/ri/*Remix Icon (Apache-2.0), for the remaining intents the Kimi set does not cover yet. A few glyphs are filed under their intent rather than the upstream asset name (see the lib/icons.ts header). When an icon is missing, prefer a glyph from the Kimi icon set: copy the SVG into src/icons/kimi/ (kebab-case name, monochrome currentColor) and register it — two static imports (component + ?raw string) plus one entry in ICONS; reach for Remix only when no Kimi glyph fits, and never draw paths in a component.

Size scale

`,49)),a("div",D,[a("div",W,[(o(),i("svg",O,[...e[1]||(e[1]=[a("path",{fill:"currentColor",d:"M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"},null,-1)])])),e[2]||(e[2]=s("sm · 14",-1))]),a("div",R,[(o(),i("svg",U,[...e[3]||(e[3]=[a("path",{fill:"currentColor",d:"M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"},null,-1)])])),e[4]||(e[4]=s("md · 16",-1))]),a("div",N,[(o(),i("svg",F,[...e[5]||(e[5]=[a("path",{fill:"currentColor",d:"M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"},null,-1)])])),e[6]||(e[6]=s("lg · 20",-1))])]),e[8]||(e[8]=a("h4",{class:"mini"},"Icon library",-1)),e[9]||(e[9]=a("p",null,[s("Currently registered icons, grouped by purpose. The display order and grouping are defined by "),a("code",null,"ICON_GROUPS"),s(" in "),a("code",null,"lib/icons.ts"),s(" (a hand-maintained array covering the same icon names), and this catalog is rendered directly from that array so the registry and the document never drift.")],-1)),a("div",P,[(o(!0),i(p,null,w(b(B),([n,l])=>(o(),i(p,{key:n},[a("div",j,y(n),1),(o(!0),i(p,null,w(l,d=>(o(),i("div",{key:d,class:"icon-cell"},[c(b(h),{name:d},null,8,["name"]),a("span",K,y(d),1)]))),128))],64))),128))]),e[10]||(e[10]=t('

Do not use emoji as functional icons. The Kimi brand mark (the robot mascot logo) is a brand asset and is not part of this icon system.

A few special graphics are not in the registry; each has a dedicated component maintained in one place, and must not be copied by hand: <ContextRing :pct /> (the Composer context progress ring, data-driven), <AuthStateIcon kind /> (the success / expired / error colored illustrations in the login flow), <Spinner /> (loading state). Status dots (such as in the Provider list) always use CSS dots (border-radius:50%), not SVG. The scripts/check-style.mjs icon-from-registry rule exempts the above and the brand mark; all other hand-written <svg> is flagged.

Spacing

A 4px base grid. All spacing, gaps, and padding inside and outside components come from this scale — no arbitrary pixels.

--space-1 · 4
icon gap, badge padding
--space-2 · 8
control gap, small padding
--space-3 · 12
button padding, form-item gap
--space-4 · 16
card padding, grid gap
--space-5 · 20
dialog padding
--space-6 · 24
section gap
--space-8 · 32
large section gap

Dense list (sidebar / file tree)

High-density navigation lists like the sidebar share one rhythm, all on the 4px grid: in-row vertical padding --space-1 (4px), no margin between rows (the hover pill provides the separation); section gap (between logo / search / action buttons / group title / list) uniformly --space-2 (8px); between groups --space-2; the brand header is slightly looser at the top (--space-3). When building similar lists, reuse this scale — do not hand-write 1/6/7/10px.

Radius

Merge the existing 14 values into the nearest of 7 scale steps. Rule: the component type determines the radius, not the author's feel. The Composer shell is the sole product-specific exception: its 32px radius pairs with superellipse(1.5) so the flatter curve stays visually concentric with its controls.

xs · 4
sm · 6
md · 8
lg · 12
xl · 16
2xl · 20
composer · 32 / 1.5
full · 999
TokenValueUsageMerged from
--radius-xs4pxsmall badge, inline tag2/3/4px →
--radius-sm6pxsmall button, icon button, menu item5/6px →
--radius-md8pxbutton, input, badge, card7/8/9px →
--radius-lg12pxmenu, toast, bubble, floating card10/12px →
--radius-xl16pxcontainer baseline: dialogs, settings cards, sheets, work panel13/16px →
--radius-2xl20pxworkspace attachment card bottom (0 0 2xl 2xl) tucked under the composer18/20px →
--radius-composer32pxComposer shell, with --corner-shape-composerproduct-specific
--radius-full999pxpill badge, avatar, send button999px / 50%

Elevation & z-index

Shadows express only "elevation", never decoration (no colored glow). z-index is unified into a scale, eradicating 9999-style one-upping.

sm · dropdown menu / sticky
md · Toast
lg · overlay (reserved)
xl · dialog
Z-index TokenValueUsage
--z-base0normal flow
--z-sticky100sticky header / sidebar
--z-dropdown200dropdown menu / tooltip
--z-overlay300overlay / bottom Sheet
--z-modal400dialog — sibling overlays tie-break by DOM order, so the global confirm (ConfirmDialogHost) mounts on demand to always land last / on top
--z-modal-dropdown500menus / popovers that open above a modal dialog (teleported to <body>, e.g. the settings SecondaryModelPicker cascade)
--z-toast600toast
--z-max9999reserved: only this tier for extreme fallback

Motion

TokenValueUsage
--ease-outcubic-bezier(0.16, 1, 0.3, 1)enter, hover, expand
--ease-in-outcubic-bezier(0.4, 0, 0.2, 1)panel width, layout changes
--duration-fast120mspress, focus
--duration-base160mshover, show/hide
--duration-slow260msdialog, Sheet, layout
--duration-hover-intent250mshover-intent reveal gate (TOC rail)
--anim-rive-spin416.7msnew-chat / folder-plus icon: plus spin on hover
--anim-leftbar533.3mssidebar toggle icon: arrow fly-in on hover
--anim-leftbar-shrink200mssidebar toggle icon: divider shrink on hover

The --anim-* lengths are track timings ported verbatim from the designer's Rive exports, so they sit outside the --duration-* ramp on purpose — retiming the ramp must not distort them. Their interpolation stays linear because the easing is already baked into the dense keyframe stops; a token easing would double-apply. Three hover tracks use them today: the sidebar toggle shrinks its divider to half height while an arrow flies in and settles (the expand variant mirrors the track from the left), and the new-chat / folder-plus pluses do one bouncy spin. Each track is keyed to an id inside its own glyph (#bar-divider, #bar-arrow / #bar-arrow-expand, #p1, #af-p1) so every instance of the icon animates, and all revert on mouse-out. They still fall under the global reduced-motion switch below.

Reduced motion

i
Under @media (prefers-reduced-motion: reduce), all animation and transition durations drop to about 0.001ms (effectively off), and the chat working indicator's mascot renders its static fallback instead of the Rive loop. Components should not check this individually; it is handled uniformly in the global styles. The switch clears durations, not transition-delay: a hover-intent gate (the conversation TOC's 250ms reveal) decides whether hidden content appears, and clearing it would make pointer fly-bys strobe content for reduced-motion users.

Layout & breakpoints

Layout sizes and responsive breakpoints are tokenized too: sidebar width, content reading-column width, and two global breakpoints. Components should not hard-code pixels.

TokenValueUsage
--p-sidebar-w264pxleft session sidebar width
--p-content-max760pxchat reading-column max width (regular chat prose)
--p-content-wide920pxwide content (settings / panel)
--p-table-max1040pxdesktop wide-table max width (see §04)
--p-table-cell-max700pxmax width of a single table column; longer cell content wraps (see §04)
--p-bp-sm640pxmobile / desktop boundary
--p-bp-md980pxnarrow / wide screen boundary
i
At ≤640px: dialogs become bottom Sheets, the sidebar collapses into an expandable drawer, and Composer toolbar controls are allowed to wrap.
',24))]),a("section",G,[e[27]||(e[27]=t(`
03

Primitives

Component primitives are the "smallest correct units" of the site UI. Each primitive exposes variants along only two dimensions — variant / size — with appearance driven by tokens, so it naturally supports light / dark mode and customizable theme colors.

i
For every interactive primitive, the keyboard behavior, focus, and ARIA contract are in §08 Accessibility. New primitives must ship with a keyboard model — mouse-only interaction is not enough.

Component selection guide

ScenarioUse
Primary action (submit / confirm)Button variant=primary
Secondary action / cancelButton secondary / ghost
Destructive action (delete / abort)Button danger / danger-soft
Status markerBadge
Toolbar filter / model switchPill
2–5 mutually exclusive optionsSegmentedControl
Top tabsTabs
Switch / multi-selectSwitch / Checkbox
Scrollable regions with overlay controlsScrollArea
Floating content card / list action menuCard / Menu
Inline notice / global toastBanner / Toast
Dialog / confirmation · bottom panel (mobile)Dialog / Sheet

Button

4 semantic variants × 3 sizes. The primary action primary takes its color from the current theme color (§05 can switch between the blue and black families). Radius uses --radius-md uniformly (small size --radius-sm), weight 600, with a visible focus ring.

Variant matrix lightpreview
medium · default
small
With icon / state
Dark skin dark

API

Button.vue · usage
<Button variant="primary" size="md" :loading="submitting">Save</Button>
-    // variant: primary | secondary | ghost | danger | danger-soft
-    // size:    sm | md | lg
States

IconButton

Unified into three sizes — 26 / 32 / 44px — with the neutral --color-hover wash on hover and a visible focus ring. Replaces the ad-hoc icon + click areas scattered across components today.

IconButton
i
The desktop IconButton comes in sm 26 / md 32; on touch devices the tap target should be ≥ 44px, so use lg 44px, satisfying the §01 accessibility principle (the mobile three-piece set uses lg).

Badge · Chip · Pill

Collapsed into two kinds: Badge (status badge, with an optional status dot) and Pill (the clickable pill in the composer toolbar). Radius, font size, and padding are all unified.

Badge · status badge
Semantic variants
pendingrunningcompletedneeds confirmationfailedKIMI
With icon / small size
planpassedread-only
`,19)),a("div",_,[e[14]||(e[14]=a("div",{class:"stage-bar"},[a("span",{class:"st"},"Pill · toolbar pill (composer)")],-1)),a("div",J,[e[12]||(e[12]=t('kimi-k2· thinking',1)),a("span",Q,[c(b(h),{name:"shield-question",size:"sm"}),e[11]||(e[11]=s("yolo",-1))]),e[13]||(e[13]=a("span",{class:"p-pill"},[a("svg",{class:"p-ic",viewBox:"0 0 24 24",fill:"currentColor"},[a("path",{fill:"currentColor",d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10s-4.477 10-10 10m0-2a8 8 0 1 0 0-16a8 8 0 0 0 0 16m1-8h4v2h-6V7h2z"})]),s("12k / 200k")],-1))])]),e[28]||(e[28]=t(`

Kbd · keyboard shortcut

Kbd renders a shortcut as keycaps — one block per key, never inline text like (⌘K). Caps are 18px tall (Badge sm rhythm): transparent ground with a 0.5px hairline edge, 11px --font-kbd (Inter + system-ui), text colour inherited from the row that carries it — the cap has no fill or colour of its own, so it follows its context (bright inside the accent-ringed recording box, quiet in a hint row). Typical placement: pushed to the row's trailing edge, opposite the label (e.g. the sidebar search row), and inside dialog navigation hints.

Kbd · keycaps
KCtrlKP

Card / Surface

All cards across the site share one structurehead / body / foot — and come in two tiers by visual weight:

Operation card · compact mono head (no fill)
read_filesession.ts
The head uses mono + a neutral background to emphasize its "code / process" nature; the body uses sans for readability. Flat, radius-md, same shape as the Swarm composite card.
Attention card · floating neutral surface (no color band)
A decision needs your confirmation
A floating neutral card — no color band. The raised surface, large radius and soft shadow lift it above the transcript; the head is a plain dark title, and the hairline footer lines up quiet text buttons leading to one solid primary action.
Activity run · a summary row expands into the folded lines
Read 2 files
Readsession.tssrc/auth34 lines
Readmiddleware.tssrc/auth58 lines

Input / Select / Textarea

Unified 38px height (32px small), --radius-md radius, --color-surface-overlay background, and a unified blue focus ring (0 0 0 3px accent-soft). Select is a custom combobox and listbox, not a native <select>; opening it centres the selected option in the scrollable menu. Open Select roots enter the dropdown layer; containing settings groups temporarily release clipping and join that layer so later sections cannot cover the menu.

Form primitives
Only letters, numbers, and hyphens are allowed.
States
Please enter a valid workspace name
Normal state · validation passed

Code / Diff

Diff controls: The non-selectable branch summary starts with a 14px branch icon, aligns to the panel header's 12px inset, uses 12px labels, and ends with a 0.5px hairline. List and tree choices use the 14px list and tree-view registry icons. Flat-list and tree-view paths use the UI font at 12px. Tree roots share the flat list's 14px content inset, then each depth advances by 12px and adds a grey indentation rule.

Diff empty state: Centre the clean-workspace message in the available panel height and lead with a quiet 32px status icon.

Diff detail body: the right-side diff detail reuses HighlightedCode unframed (the panel owns the edge and scroll) — shiki highlighting with the language inferred from the file path, an old/new line-number gutter, hunk headers as a muted band, at the shared code size --code-font-size (12px at Medium, one step below body text). The file preview's code body (text / JSON / HTML and Markdown source) renders through the same component with a per-row number gutter plus search-hit / jump-target row states.

Inline code, code blocks, and diff contents use the monospace font (--p-font-mono); diff change counts and branch summaries use the UI font. Code blocks have a filename title bar and a copy button; the action edge uses a compact 6px inset. Diffs use + / - row colors to express additions and deletions — additions use a success light background, deletions use a danger light background, with no gradients.

Code / Diff
inline code
The server uses jwt.verify(token) to verify the signature, returning 401 on failure.
code block
session.ts
import { verify } from './jwt';
-
-    export function auth(token: string) {
-      return verify(token, process.env.JWT_SECRET!);
-    }
diff
session.ts · +3 -1
import { verify } from './jwt';
-const secret = 'dev-secret';
+const secret = process.env.JWT_SECRET!;
return verify(token, secret);

Dialog

One dialog primitive replaces 6 hand-written implementations: unified --radius-xl radius, --shadow-xl shadow, 20px head padding, right-aligned footer actions, and an IconButton close button.

Dialog primitive
New chat
Create an independent Agent chat in the current workspace.
i
Size & height: Dialog offers three widths — md 440 / lg 640 / xl 760 (--p-content-max) — chosen by content weight. Height comes in two kinds: auto (default, grows with content up to max-height) and fixed (constant height min(680px, 100vh - 64px), with overflow scrolled inside the body). Content / multi-tab dialogs (settings, model picker, provider manager, folder browser) always use fixed so the frame size stays constant and doesn't jump when switching tabs or content length; short confirmation dialogs keep auto. Selectable controls inside Settings use 0.5px hairlines. Its navigation stays transparent on the grouped canvas — separated from the content region by the 0.5px hairline (horizontal in the stacked mobile layout) — and uses 12px labels at weight 525 with 16px registry icons; the selected tab paints the same neutral --color-hover wash as hover, with the label simply brightening to --color-text — the Kimi app settings nav's recipe (.ss-nav-item--activeFills-F1, no accent tint, no weight change); section captions use 16px UI text in --color-text. Every setting row has a plain-language description; option labels use --color-text at weight 475 with a 1px gap before that description. Chinese descriptions use “思考” and “计划模式” rather than the English terms; “skills” stays lowercase when it appears within a sentence. Every settings section puts its rows inside one rounded group with 0.5px dividers; the content region paints the flat --color-surface so each group (--color-surface-raised) reads one rung above it — never a sunken pit, which would sink the dialog's content below its chrome in dark. The font-size stepper is a compact 32px UI-font control with 12px values and custom minus and plus buttons. Its 52px desktop row centres the control with equal space above and below. Archived workspace headings reuse the sidebar’s folder-closed registry icon, and Restore actions lead with the undo icon. Archive counts use weight 500; timestamps and workspace paths use the UI font.

Dialog backdrop: Use a restrained 28% neutral overlay so the workspace remains legible without competing with the modal.

Settings regions: The settings title and close action belong to the right content region. The navigation is a separate full-height region that starts at the dialog's top edge, not content beneath a dialog-wide header.

Archived sessions: Start with the localized page title. Do not add a repeated English kicker above it.

Settings interaction: Notification labels and descriptions are not selectable; their switches remain fully interactive.

Conversation chrome: Header labels are not selectable; the rename input remains selectable and editable. Branch names start with a 14px branch icon. The overflow trigger is a compact 24px control with a 14px icon. Below a 720px header container, hide the workspace prefix and give the conversation title the available width. On macOS desktop the header doubles as the window-drag region and interactive controls opt out with no-drag; while one of its menus or a dock work panel is open every window-drag strip (chat header, sidebar header, panel header) drops the drag region so an outside press anywhere reaches the page and dismisses the overlay (window dragging is simply paused).

Session search: follows the §09 flush picker anatomy — a boxed Input under the head, and a result list that fills the body's available height and owns vertical scrolling.

Model picker: follows the §09 flush picker anatomy; the provider filter remains horizontally scrollable without showing a persistent scrollbar. Only the model list scrolls; the shortcut bar remains pinned at the bottom.

Toast

Unified information architecture: status icon + title + description. The status color appears only on the icon, avoiding large colored areas that create visual noise. For an undoable action there is a second, lighter form — the Action toast (ActionToast.vue): a pill floating top-center just below the 48px header, carrying a one-line sentence whose actions are plain inline <button>s (styled accent by the component), plus close. Self-timed (default 8s, hover pauses); the parent re-keys to reset and wraps it in a <Transition>. First used by session archive (Undo / Settings); warnings keep the bottom-right Toast stack.

Toast
Connected to server
The local server is responding normally; you can start a new chat.
Context usage 82%
Consider running /compact to free up space.
Action toast
or view archived chats in

Spinner

Loaders fall into two categories by scenario — do not mix them:

Spinner · plain loader (default)

`,39)),a("div",Y,[e[18]||(e[18]=a("div",{class:"stage-bar"},[a("span",{class:"st"},"Spinner · common scenarios")],-1)),a("div",Z,[a("div",X,[e[17]||(e[17]=t('Loading…',2)),a("button",$,[(o(),i("svg",ee,[...e[15]||(e[15]=[a("circle",{class:"track",cx:"12",cy:"12",r:"9"},null,-1),a("circle",{class:"arc",cx:"12",cy:"12",r:"9"},null,-1)])])),e[16]||(e[16]=s("Submitting",-1))])])])]),e[29]||(e[29]=a("h4",{class:"mini"},"WorkingIndicator · 小蓝 mascot (only the chat working state)",-1)),a("div",ae,[e[20]||(e[20]=a("div",{class:"stage-bar"},[a("span",{class:"st"},[s("WorkingIndicator · chat working state only "),a("span",{class:"tag spec"},"signature")])],-1)),a("div",te,[e[19]||(e[19]=a("span",{class:"stage-label"},"Usage · only while the chat has an unfinished prompt",-1)),a("div",se,[c(k,{label:"Requesting…"}),c(k,{label:"Working…"})])])]),e[30]||(e[30]=t('
i
The chat working state is rendered uniformly by WorkingIndicator — the 小蓝 mascot (KimiMascot, the kimi.com avatar Rive asset, with a static SVG fallback under reduced motion or when the runtime fails) plus a phase label. All other loading states use the plain Spinner.

Link

Inline text link: the default is the accent color with no underline; on hover it shows an underline and darkens. File links inside inline code use a 1.5px underline offset so the line stays clear of the chip background. The .muted variant uses the secondary text color. Used for in-text jumps, external links, "view all", and other lightweight actions.

Link · inline link
Read the full design token docs before building.View on GitHubView history

Menu / Dropdown

Desktop menus use a 3.5px panel inset. Standard items use 5px × 9px padding and a 7px icon gap. Their three-layer neutral shadow stays below 4% opacity.

Dropdown menu panel: frosted glass — the translucent --color-menu-bg fill over a blurred, saturated page backdrop (--p-menu-backdrop) — plus hairline + light shadow (--shadow-menu, a three-layer neutral ramp). This is the one place glassmorphism is the design language rather than an exception (§06); every floating menu surface (Menu.vue, the Select listbox, composer dropdowns, slash/mention popups) uses the token pair, never ad-hoc blur values. Menu items support icons, the current (active) state, the danger state, and the disabled state, with separators grouping items. All menu actions use 13px labels at weight 475 with 16px leading icons; both share a 16px line box for vertical alignment. Menu timestamps use the UI font. On touch / mobile, use lg (≥44px row height) while keeping the same type size. A dropdown menu pops in from its trigger corner — fade plus a slight 0.97 scale over --duration-base (exit --duration-fast), the composer model dropdown's motion language; the transform origin and the nudge direction follow the anchoring, including the upward flip near the viewport edge.

Row states: hover uses the mode-aware --color-hover wash (it lightens under dark, never darkens); a leading icon sits one rung below the label (--muted), and on hover both label and icon step up to --color-text-strong, the max foreground tier. Selection keeps the accent pair (--color-accent-soft / --color-accent-hover); danger keeps its own colour.

Menu · dropdown menu
Open file
Selected item
Disabled item
Delete chat

SegmentedControl

Mutually exclusive short option groups, commonly used for 2–5 option switches such as "light / dark / follow system" or the four font-scale steps. Options may include a 14px registry icon or a colour swatch. A single raised indicator with a soft shadow (no border — the edge stays clean) slides and resizes between options using the standard motion tokens. Three sizes: md (default, settings pages), sm (compact rows), and xs (dense menus such as the composer model dropdown — 20px items, 12px labels).

SegmentedControl
LightDarkFollow system

SecondaryModelPicker

Linked model + thinking-effort picker (settings → Agent → Subagents, experimental; components/settings/SecondaryModelPicker.vue, shared by both ends). Use it whenever two choices are only valid as a pair — here an effort is meaningless without its model, and every model declares a different supported set. It is a cascading variant of the §03 Select: the trigger is the Select trigger verbatim (value renders model · effort, the unset state uses the placeholder tint), and the dropdown opens as a SINGLE-LEVEL model list (grouped by provider) on the floating menu surface (--color-menu-bg / --p-menu-backdrop / --shadow-lg). The menu teleports to <body> with position: fixed — it opens on top of the settings modal (on the --z-modal-dropdown rung), and only a body-level surface escapes the dialog's scrolling-body clip; it re-anchors to the trigger on any outside scroll and closes on window resize (the UserMenu teleport's full recipe). Hovering or clicking a model row flies its effort submenu out to the RIGHT of the row — same menu surface, anchored to the row's live position, flipping to the left only near the viewport edge per the §03 anchoring rules — with a 250ms hover-intent grace (the UserMenu flyout's recipe) so the diagonal path into the submenu doesn't collapse it. Every model row carries a trailing chevron-right affordance; clicking an effort confirms the pair and closes — one atomic write, never two staggered patches. Flyout options follow the composer's thinking-level model (segmentsFor): effort models get off + their declared levels (always-thinking ones get no off), boolean-thinking models get on/off, unsupported models get off alone; while no effort is set at all, a "Model default" entry leads (it writes the model alone — POST /config merges and cannot clear a stored effort, so the entry disappears once one is set). A configured effort the model no longer declares is appended as an extra flyout option so the current pair stays visible and re-selectable. Keyboard mirrors the Select contract (focus stays on the trigger, Esc preventDefaults so the hosting dialog does not close): ↑/↓ move within the active level (the flyout follows model moves), → opens the flyout, ← collapses it, Enter confirms, Home/End jump. ARIA: combobox trigger → dialog menu holding a model listbox plus the effort listbox flyout with option rows. The menu itself flips upward when the trigger sits near the viewport bottom.

Tabs

Tabs with a bottom hairline, used for grouping and switching sibling content. The current tab is marked with accent text + an accent underline.

Tabs
GeneralAgentAdvanced

Switch

A two-state switch for settings that take effect immediately. The 36×20 track has a 0.5px hairline and full radius; its 16px knob uses 1.5px internal offsets so the visible inset remains 2px and symmetric after accounting for the border. On hover, the knob eases to an 18px rounded rectangle towards the track centre. When on, the track turns accent and the knob slides right.

Switch

Checkbox

A 17×17 checkbox. When checked it fills with the accent color and shows a white tick (inline SVG). Often paired with a text label.

Checkbox

Avatar

A 32px default avatar with md radius; .sm is 24px. Can hold an initial or an icon; falls back to this placeholder when there is no image.

Avatar
KK

EmptyState

A centered placeholder for empty lists / panels: a 48px faint icon + title + hint, avoiding blank pages.

EmptyState
No chats yet
Click "New chat" to start a conversation with Kimi

Divider

A 0.5px hairline divider (--p-line); .p-divider-v is the vertical divider, used between inline elements.

Divider
Content above

Content below
kimi-k2thinking

Tooltip

A CSS-only hover hint, wrapped in .p-tip. Inverted background (--p-text / --p-bg), single line, no wrapping — carries only short notes.

Tooltip (hover the button)
New chat

Banner

An inline notice bar placed at the top of a content area. Three states — .info / .warning / .danger — each with a matching 18px icon.

Banner
Connected to server
Currently in yolo mode; tool calls will run automatically

Sheet / BottomSheet

A mobile bottom slide-up panel: xl top radius + drag handle, xl shadow. At ≤640px, dialogs become bottom-anchored Sheets.

BottomSheet
Choose a model
kimi-k2 · thinking
kimi-k2 · instant

Skeleton

A placeholder for loading content, using a breathing opacity animation (no gradients), following the no-gradient-text rule. Composed into titles / text lines / avatars.

Skeleton

Command Bar

An inline combination of "primary action + command text + copy", sitting between a button and a code block — used for install / onboarding / one-click execution. The primary action reuses Button primary; the command area uses a mono light-grey background.

Command Bar
curl -fsSL https://code.kimi.com/install.sh | bash

TopBar

The application top bar. Solid by default; the .frost variant is translucent + background blur, used only for sticky navigation bars. Together with the floating menu surfaces (Menu / Dropdown), it is one of the two exceptions to the no-glassmorphism rule (see §06).

TopBar · solid / frosted glass
Solid TopBar
Frosted-glass TopBar · .frost

Find Bar · transcript search

The in-transcript find bar (Cmd/Ctrl+F), implemented by components/chat/TranscriptSearch.vue. A floating card pinned to the transcript's top-right (top: --panel-head-h + --space-3, right: --space-3 — equal inset on both axes), --z-sticky, raised surface + 0.5px hairline + --shadow-menu. One radius for both states: --radius-2xl is a full capsule at the collapsed height and a card once the footer expands — never animate between two radii.

PartRule
Input rowSearch icon (muted) + bare input — the list-style bare-input exception family (sidebar search row, inline rename), NOT the boxed Input primitive; the 38px bordered control would break the pill. Circular close IconButton sm (concentric with the capsule end); a 0.5px hairline separator before it. Height comes from the grid: 32px control (--space-8) + 2× --space-1 padding = 40px — at which --radius-2xl is exactly the half-height capsule.
Footer (results)Expands via the 0fr→1fr grid fold (--duration-slow), hairline top separator, prev/next IconButton sm left, right-aligned muted count (N/M results · --ui-font-size-sm). Only exists once a query has settled — while typing or empty, the bar stays a bare pill.
Statescollapsed (empty query) / searching (Spinner sm in the input row during the ~800ms debounce) / results / no-results (count reads "No results", nav disabled). Disabled is uniformly opacity:.5.
FocusComposer-style: a neutral hairline overlay (::after + --color-composer-focus-line) fading in on :focus-within. No accent ring.
Match inkCSS Custom Highlight API — the bar mutates no transcript DOM. All matches: --color-search-match (yellow); current: --color-search-match-current + a 2px --color-warning outline ring (a positioned overlay — highlight pseudos can't paint box outlines). Tokens live in web-ui/style.css with light/dark pairs.
KeyboardCmd/Ctrl+F opens + focuses (repeat = re-focus + select-all; hardcoded, reserved in the desktop keymap), Enter / Shift+Enter steps matches (wrapping), Esc closes from ANY control inside (container-level, so it never reaches the conversation's Esc-abort).
Matching semanticsRendered transcript DOM only (unloaded older pages are out of scope), capped at 1000 matches (count reads N/1000+). Matches span inline nodes within one block, never cross block breaks; inert and display:none content is excluded. Stepping scrolls the match's own rect into view, not its parent element.

SectionLabel

A small group title for sidebar lists, used to section the content below (such as Workspaces in the sidebar). Spec: 13px / 700 / uppercase / letter-spacing .08em, color --color-fg-faint; left-aligned to the row's starting padding (--sb-pad-x), keeping the same indent as the group rows below. For scripts without case (such as Chinese), text-transform:uppercase simply has no effect — no special handling needed.

',55)),a("div",de,[e[26]||(e[26]=a("div",{class:"stage-bar"},[a("span",{class:"st"},"Sidebar · group title")],-1)),a("div",oe,[e[25]||(e[25]=a("div",{class:"p-section-label",style:{padding:"12px 16px 4px"}},"Workspaces",-1)),a("div",ie,[(o(),i("svg",ne,[...e[21]||(e[21]=[a("path",{fill:"currentColor",d:"M4 5v14h16V7h-8.414l-2-2zm8.414 0H21a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h7.414z"},null,-1)])])),e[22]||(e[22]=s(" kimi-code-web ",-1))]),a("div",le,[(o(),i("svg",re,[...e[23]||(e[23]=[a("path",{fill:"currentColor",d:"M4 5v14h16V7h-8.414l-2-2zm8.414 0H21a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h7.414z"},null,-1)])])),e[24]||(e[24]=s(" playground ",-1))])])])]),a("section",ce,[e[39]||(e[39]=t('
04

Chat Interface Overhaul

The message stream is the core of Kimi Web. Tool calls render as quiet activity lines — one borderless line per call, bespoke per tool kind, auto-grouped, expanding on demand — while Question / Approval elevate to a floating neutral surface because they need a decision, and the Swarm composite keeps a card; the Composer collapses into a single rounded container.

Unified message stream

User-message bubbles follow the kimiwork production recipe (MessageItem .user-bubble): a neutral --color-user-bubble-bg fill (BubbleGray — #f5f5f5 light / #292929 dark), uniform --radius-lg corners, no border, no shadow.

Message timestamps use 12px UI text at weight 500, matching the compact metadata scale without switching to a monospace face.

The user-message metadata row sits one 8px spacing step below the bubble, so its actions and timestamp read as supporting information rather than part of the bubble edge.

Overlong user messages clamp at 10 measured lines, the tail dissolving through an alpha mask rather than a tint overlay (the translucent accent fill would double-composite); a floating pill toggle centred on the fade expands in place and collapses back, and the collapse pins the toggle itself so the reading position survives. Skill / plugin command args clamp through the same wrapper, beside the card head. Like the transcript's other disclosure controls (thinking row, turn fold, tool lines), the toggle is a bare native button carrying aria-expanded — chat-surface disclosure controls do not use the §03 Button primitive.

The floating jump-to-latest control uses 12px UI text at weight 525, led by the full down-arrow icon rather than a disclosure caret.

Thinking is an inline, borderless disclosure row in the message stream — never a side panel. The k15 bulb (the thinking registry icon) leads the row in every state; while streaming the "Thinking…" label breathes (opacity only, never a gradient shimmer) and whole elapsed seconds tick beside it, afterwards the label settles to "Thinking process" with the final span as · Ns (renderer-measured, live sessions only — history shows no seconds). Collapsed by default, it expands in place with the standard grid-rows animation and a 90° chevron rotation, and it folds itself back once the stream moves past it, even if the user expanded mid-stream. The header only animates its text colour on hover (standard duration and easing tokens), no card shell.

Conversation · 760px reading column
Please change the login endpoint to JWT and add the corresponding unit tests.
🌔Analyzing the auth module…
Read 2 files
Readsession.tssrc/auth · :12-4534 lines
12 export function verify(token: string) {
13 return jwt.verify(token, getSecret());
14 }
Readmiddleware.tssrc/auth58 lines
Editmiddleware.tssrc/auth+12−4
Search"jwt.verify"src/auth4 results

I looked at the structure of src/auth; it is currently based on a session cookie. The scope of the change is below — once you confirm, I'll start.

A decision needs your confirmation
How long should the JWT expiry be? Default 7 days, refresh token 30 days.
Write permission required
About to modify src/auth/middleware.ts, 42 lines changed. Allow?
Replace session with JWT signing
Refactor the auth middleware
Add unit tests

Wide markdown tables (desktop): regular chat prose stays within the 760px reading column (--p-content-max), and tables stay there too by default — an overflowing table scrolls horizontally inside its own wrapper, so the page and the chat area never scroll sideways. A clipped table shows a gradient fade at its truncated right edge, and hovering the table reveals a small widen button at its top-right corner; clicking it lets the table grow naturally with its content up to 1040px (--p-table-max), centred within the conversation pane, and clicking again restores the default width. At the default width a single column is capped at 36% of the pane; once widened the cap relaxes to 700px (--p-table-cell-max), so long cell content wraps inside the cell instead of stretching the table. The conversation outline (TOC) keeps its usual position just outside the reading column; when a widened table grows past it and scrolls under the rail, the TOC is hidden temporarily and returns as soon as the table leaves, without touching the user's TOC setting. On mobile a table never breaks out of the reading column.

Tool calls: quiet activity lines, bespoke per tool

High-frequency calls like read / bash / grep are "operational noise" — boxed, collapsible cards quickly drown out the conversation. Tool calls therefore render as one quiet borderless line in the message stream — never a card — and each tool kind composes that line for its own content, so the stream reads like an activity log rather than a pile of widgets. The three visual-weight tiers:

Three visual-weight tiers
① Tool line · lightest (default) — bespoke content per tool, no card chrome
Runpnpm run build && pnpm lint0.8s
② Activity run · medium (consecutive quiet activity — thinking + tool lines — folds to one smart-summary row)
Read 3 files
③ Sub Agent identity card · one per delegation — task title + agent type; the whole card opens the side panel (no in-stream expansion, never grouped)
分析双引擎架构Explore
④ Decision card · heavy (only question / approval, needs user input)
Write permission required
About to modify src/auth/middleware.ts, 42 lines changed.
',15)),a("div",ve,[e[31]||(e[31]=a("div",{class:"stage-bar"},[a("span",{class:"st"},"Turn files summary · a real TurnFilesSummary (fixed sample)")],-1)),a("div",be,[a("div",pe,[c(A,{changes:C,cwd:ye,onOpenDiff:u,onOpenFile:u})])])]),e[40]||(e[40]=t('
Tool Call · quiet lines (expand on demand)
Read 2 files
Readsession.tssrc/auth · :12-4534 lines
12 export function verify(…
Readmiddleware.tssrc/auth58 lines
Editmiddleware.ts+12−4

Decision cards · Question / Approval

The two attention cards replace the composer in the dock and share one contract: a floating neutral shell (--color-surface-raised + hairline + --radius-lg + --shadow-menu), a plain dark 16px title head, and a hairline footer whose actions read in number-key order with exactly one accent primary. There is no semantic colour band — the floating card itself is the "needs a decision" signal.

Plan review · pinned option rows, second-line descriptions
按这份 plan 开始实现?
The plan markdown scrolls in a capped area; the approaches are pinned below it — label on the first line, full description always on the second. The number chip doubles as the keyboard hint.
1方案 A:静态徽章零依赖、渲染稳定,升级时需手动同步版本号。
2方案 B:动态徽章版本自动同步免维护,但要求仓库公开可访问。

Composer

Unified into a single raised container: --radius-composer (32px) with --corner-shape-composer: superellipse(1.5) and a stable 0.5px edge. Focus crossfades a low-chroma line-and-accent edge over --duration-slow with --ease-in-out, while the neutral shadow stays unchanged — there is no added halo and no layout shift. The textarea uses text-autospace: normal for mixed CJK and Latin input. Toolbar controls use a quiet 32px full-round geometry with 8px edge inset; the send button remains a standard 32px circle, with its glyph at 28px (--composer-send-icon-size, the production kimi.com size; it sits outside the --p-ic-* scale on purpose).

Fill and edge tokens: the card's fill and rest border are their own tokens — --color-composer-bg and --color-composer-line — running the kimiwork / kimi.com production input recipe (.chat-input__shell): fill = groupedBackground.secondary (#ffffff light / #1f1f1f dark), rest border = separator.s1 (13% black / 12% white), focus line = fills.f4 (25% in both schemes), and --shadow-input = effect.shadow.inputDefault (0 5px 16px -4px rgba(0,0,0,0.07), kept identical in dark — the hairline carries the edge there). Only colours sit in the tokens; the 32px superellipse shape and the focus-only edge overlay are unchanged.

Send button tokens: the send circle runs on --color-send-bg / --color-send-bg-hover / --color-send-icon (+ *-disabled, --opacity-send-disabled, --shadow-send[-hover]), following the production recipe (.chat-input__send): a neutral labels.primary fill (90% black light / 84% white dark, hover #252525 / 84.8%) with the production lift shadow (0 7px 16px -13px 38% + 0 1px 2px 7%, one step larger on hover), a groupedBackground.secondary glyph, and a disabled state of the same vocabulary — fills.f2 fill with a labels.quaternary glyph at full opacity. The button is disabled exactly when submit would no-op — an empty draft with no ready attachment (image-only sends stay enabled), an upload in flight, or the starting spinner — so disabled is a first-class persistent state, never a fade.

Layering, anchors, and motion: the dock normally stays at --z-sticky so the Latest Messages pill can remain visible above its veil. While any Composer popup is open, the dock temporarily joins --z-dropdown, ensuring permission, work-mode, and model menus always paint above that pill. The permission menu's left edge and the model menu's right edge each follow their own trigger pill. All three menus use --shadow-menu and the same trigger-corner pop motion as Session Row menus: 0.97 scale with a 2px shift toward the trigger, --duration-base on entry, and --duration-fast on exit.

Attachment strip: attachments hang inside the composer card above the textarea as two grouped rows — images/videos as shared MediaThumb rounded thumbnails, files as the shared AttachmentChip pill — the same pair the sent bubble renders, so a draft looks exactly like the sent message. File-store videos render a static play tile instead of fetching a first frame. The strip caps at two thumbnail rows and scrolls beyond that instead of pushing the input down; while overflowing, a quiet count badge pins to the bottom-left and new attachments auto-scroll into view (to the end of whichever group grew). With two or more attachments, a one-click clear-all pins to the strip's top-right corner as a quiet 22px badge (trash glyph, danger on hover). The composer's pending preview and the bubble's media clicks open the same MediaLightbox preview, which owns Escape via the shared dialog stack: images go through PhotoSwipe (lib/mediaPreview.ts) and zoom out of the clicked thumbnail (scrim = --color-scrim-strong, caption = --color-text-on-scrim), videos keep the custom modal.

',11)),a("div",he,[e[38]||(e[38]=a("div",{class:"stage-bar"},[a("span",{class:"st"},"Composer")],-1)),a("div",ue,[a("div",ge,[e[36]||(e[36]=a("div",{class:"p-composer-ta ph"},"Message Kimi, / to run a command, @ to reference a file…",-1)),a("div",me,[a("div",fe,[e[33]||(e[33]=a("button",{class:"p-icon-btn"},[a("svg",{class:"p-ic",viewBox:"0 0 24 24",fill:"currentColor"},[a("path",{fill:"currentColor",d:"M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"})])],-1)),a("span",we,[c(b(h),{name:"shield-question",size:"sm"}),e[32]||(e[32]=s("yolo",-1))]),e[34]||(e[34]=a("span",{class:"p-pill"},[a("svg",{class:"p-ic",viewBox:"0 0 24 24",fill:"currentColor"},[a("path",{fill:"currentColor",d:"M8 4h13v2H8zM4.5 6.5a1.5 1.5 0 1 1 0-3a1.5 1.5 0 0 1 0 3m0 7a1.5 1.5 0 1 1 0-3a1.5 1.5 0 0 1 0 3m0 6.9a1.5 1.5 0 1 1 0-3a1.5 1.5 0 0 1 0 3M8 11h13v2H8zm0 7h13v2H8z"})]),s("plan")],-1))]),e[35]||(e[35]=t('
kimi-k2· thinking
',1))])]),e[37]||(e[37]=t('
kimi-code-web
',1))])]),e[41]||(e[41]=t('
i
Site-wide consistency: the composer uses one 32px superellipse shell and one 32px desktop control height. Attachment, permission, modes, compact, and model controls are all full-round and transparent at rest; hover reveals a neutral wash, open/active may use accent-soft, and Send remains the sole persistent filled control — an inverted --color-text fill with a --color-bg glyph (never the accent), disabled while the input is empty or an upload is in flight. The transparent dock floats over the transcript, while the scrolling content receives bottom padding equal to the live dock height so its final item can still clear the composer. Composer chrome is not selectable; only the message input permits text selection. Each permission mode has its own registry icon — manual hand, yolo shield-question, auto full-access — paired with the label in the pill (collapsing to the accessible icon below a 620px composer container) and leading its dropdown row in the mode's colour, with the current row's check trailing the row's end. The right toolbar is the flexible region: the model pill shrink-wraps its content, then shrinks and truncates internally only when the toolbar runs out of room. The dock's workbar above the composer carries one pill vocabulary — 32px high with --space-4 inline padding and stadium-shaped (--radius-full) corners, a --color-surface fill (one rung above the page in both schemes — sunken is degenerate in dark — the same material as the popover it opens), and the system hairline edge (0.5px at --color-line-strong, one rung up for presence; no shadow), icon + label + a count or status — for background bash tasks, background sub-agents, todos, and the goal alike; a pill toggles the shared work panel (itself at --radius-xl with the same 0.5px --color-line-strong edge outside — inner separators stay --color-line — and the menu panel's --shadow-menu), and the goal's detail (full objective, completion criterion) fills the panel body while its pause / resume / cancel controls ride the panel head (the decision cards' action vocabulary — exactly one accent primary, resume while paused; secondary pause while active; danger-soft cancel) and the meta counts (turns / tokens / time / budget) sit in a hairline footer — never a separate full-width strip.

Workspace attachment card: on the empty session, the workspace picker is a separate attachment card tucked under the composer — and the composer card itself stays complete (its own 0.5px border, --radius-composer corners with --corner-shape-composer, and shadow are never altered). The attachment lives inside the composer's padding box as the card's sibling, so its width always matches; its top --space-4 slides behind the card (the card is raised to --z-sticky), its square top edge stays hidden, and only the rounded bottom (0 0 --radius-xl --radius-xl) shows. Background --color-hover at 60% via color-mix (≈0.03 black in light, self-adapting in dark), no border, no shadow. Inside sits one quiet capsule trigger: transparent, --radius-full, 16px leading icon and 12px label at weight 475 in --color-text-muted; hover deepens to --color-selected and the label turns --color-text. The dropdown follows the §03 menu spec and is viewport-aware (flips above when more room, clamps max-height to the scrollport); at --z-dropdown it outranks both the card and the fixed click-outside backdrop (--z-sticky), which renders outside the composer because the card's container-type captures position: fixed descendants.

Responsive

See §02 --p-bp-sm for the breakpoint. This section only gives mobile-adaptation pointers for the chat interface; a full mobile mockup is out of scope for this spec.

i
At ≤640px: dialogs anchor to the bottom as Sheets (xl top radius, top drag handle), the sidebar collapses into an expandable drawer, the Composer toolbar is allowed to wrap, and the chat reading column drops its max-width to fill the screen.
',5))]),e[43]||(e[43]=t('
05

Theming

Kimi Web uses one unified theme: the same components, fonts, radii, shadows, and surfaces — theming only swaps color values. Every semantic color token ships a light value in :root and a dark override in the data-color-scheme blocks; the semantic status colors (success / warning / danger) are independent palettes, one set each for light / dark.

Accent

The app has one accent: the brand blue (--color-accent, #1783ff light / #58a6ff dark). Use it sparingly — the accent is reserved for the primary action, focus rings, links, and active marks (current tab, toggles); large fills always come from the neutral surface tokens. Selection that means "where I am" (sidebar rows, list pickers) is deliberately NOT accent-tinted — it uses --color-selected so it reads as location, not as an action.

Light / dark mode

Each semantic token ships a light value in :root and a dark override in the two data-color-scheme blocks (explicit choice, or following the OS preference via prefers-color-scheme). Switching light / dark simply swaps between these two sets of derived tokens, with zero structural change.

Benefits of one theme: components, fonts, radii, and surfaces are consistent site-wide; a single accent keeps the brand identity unambiguous; light / dark mode works out of the box; semantic status colors are independently tunable.
06

Style Rules

Anti-pattern rules that all UI code must follow. These rules are also the basis of the check-style detection script, one-to-one with a warning.

Rule IDWhat it detectsAction
no-gradient-textgradient text / gradient backgroundForbidden
no-glassmorphismbackdrop-filter: blur (TopBar sticky nav bar and menu surfaces via --p-menu-backdrop are the exceptions)TopBar + menus exempt
no-color-glowcolored / large-radius box-shadow glowForbidden
no-emoji-iconusing emoji as a functional icon (no exceptions). Emoji inside user content — session titles, messages — is not chrome and is out of scope (see §07 Session row's emoji icon)Forbidden
no-hardcoded-hexunregistered hex color inside a component <style>Warning
no-hardcoded-fonthard-coded font-family in a component (e.g. 'Inter') instead of var(--font-ui)Warning
radius-from-scaleradius value not in {4,6,8,12,16,20,999}Warning
z-from-scalez-index using an unregistered large numberWarning
weight-from-scalefont-weight not in {400,500}Warning

State matrix

Every interactive primitive should define the following states where applicable; missing ones are flagged by the style rules. focus-visible always uses --p-focus-ring (appears only on keyboard focus, see §08); disabled is uniformly opacity:.5.

StateButtonInputCardMenu itemSwitch
default
hover
active / pressed
focus-visible
disabled
loading
selected / active
error
readonly

Chat working indicator

The chat working state ("prompt sent, turn unfinished") is a brand signature of Kimi Web, rendered uniformly by the WorkingIndicator component: the 小蓝 mascot plus a phase label — "Requesting…" until the assistant's reply starts, "Working…" once it is streaming. All other loading states (including ActivityNotice) use the plain Spinner.

Glassmorphism exemption

backdrop-filter: blur is banned site-wide, with two exceptions: the .frost variant of TopBar — only in the one place of the "sticky navigation bar", used to stay readable over scrolling content — and the floating menu surfaces (Menu.vue, the Select listbox, composer dropdowns, slash/mention popups), which go through the --color-menu-bg / --p-menu-backdrop token pair so the recipe stays single-sourced. No other component (card, dialog, Toast, panel) may use glassmorphism; violations are flagged under no-glassmorphism, and menu blur with ad-hoc values (anything but the token) is flagged too. Persistent panels that stay open over scrolling content (the dock work panel) deliberately stay opaque — a live backdrop blur re-samples the scrolling page every frame and janks in Chromium.
07

App Shell & Sidebar

The structural spec for the app shell (three-column grid + right preview panel) and the left session sidebar. These are business-agnostic "skeletons" — components, fonts, radii, and surfaces are reused from §02 / §03, but layout and alignment have their own conventions.

Layout grid

On web it is a single-row 5-track grid: the sidebar and the right panel each occupy a permanent auto track, with the conversation column in the middle; two 0-width tracks are for the ResizeHandles. (The desktop app adds a second row for its terminal panel — desktop-only, see below.)

App.vue · .app
grid-template-columns: auto 0 minmax(0, 1fr) 0 auto;\n    /*         sidebar ↑    ↑handle  ↑conversation  ↑handle ↑right panel (auto) */
TokenValueUsage
sidebar width270px default (adjustable)expanded sidebar width, changed by dragging the ResizeHandle; should approach §02's --p-sidebar-w (264px)
--preview-w460pxwidth of the right preview panel when open
--panel-head-h48pxunified height for all right panel heads + the conversation column head; both use a 0.5px bottom hairline
--p-bp-sm640px≤640 switches to a mobile single column (top bar + conversation), no sidebar / handle / right panel

Sidebar alignment system (--sb-*)

All sidebar rows (group head, session row, New chat, search, and Settings buttons) share 4 custom properties. Their 16px icon slots and --sb-gap place every label on the same x-axis as the workspace name.

TokenValueUsage
--sb-inset12pxrow box (hover/selected pill) inset from the sidebar edges — matches the brand header's 12px padding
--sb-pad-x20pxcontent start x (= --sb-inset + 8px row padding)
--sb-gutter16pxleading icon slot width — matches the workspace folder icon so the session title aligns under the workspace name
--sb-gap8pxgap between the icon slot and the text
i
The session title's starting x = --sb-pad-x + --sb-gutter + --sb-gap. The group head has a folder icon and the session row has a status slot; both icons are the same width and position, so the titles align naturally.

Sidebar structure

The sidebar from top to bottom: brand header → action group → pinned head (pinned section + "Workspaces" label) → scrolling grouped list (workspace head + session rows) → user-menu footer. New chat and Search are direct sibling controls in the same grid container; the optional new-workspace action shares the first row, while Search spans the next row. A 4px gap keeps Search clear of the scroll boundary. The pinned head sits OUTSIDE the scroll container (the action-group / footer pattern — never position: sticky, which would need an opaque plate over the frosted tint), so the pinned sessions and the "Workspaces" label stay put while the workspace groups scroll beneath; the pinned section is collapsible (a chevron on its label, revealed on hover/focus and kept visible while folded; state persisted) so a long pinned set can't eat the sidebar, and it re-expands when a new session is pinned. Both pinned edges use three light near, middle and far fades across 18px, entering over 260ms only while more session content exists beyond that edge — the top seam lives at the pinned head's bottom border. The footer seam is a 0.5px hairline. Controls reuse the §03 primitives as much as possible. The sidebar sits on --color-sidebar-bg (one step off --color-bg: warm off-white just under white in light, one step BELOW the page in dark — the session column reads as its own plane, and with dark elevation = lighter the chrome never sits brighter than the conversation pane; the hairline still separates it from the pane). Vertical rhythm: the brand header keeps 12px padding (on macOS desktop the left padding grows to 80px to clear the traffic lights); rows inside the action group stack flush (0 gap, same rhythm as the list rows); adjacent groups are separated by 12px. The search glyph has a -0.5px optical correction to align its visual centre with the label. Row hover uses --sb-hover (= the global --color-hover wash); the selected row uses the lighter --sb-selected wash derived from --color-selected — On macOS desktop the sidebar is instead frosted: the window carries a native NSVisualEffectView ('menu' vibrancy, following the in-app scheme via the nativeTheme mirror, its state pinned to inactive so the material keeps its flat pressed-down colour — ≈ #282829 dark / #E7E7E7 light — with no active/inactive drift) and the sidebar column drops --color-sidebar-bg for a single translucent --color-sidebar-tint wash that presses the pinned material one step — ≈ #282829 → ≈ #1e1e1f in dark (rgba(0,0,0,0.25)), ≈ #E7E7E7 → ≈ #f1f1f1 in light (rgba(255,255,255,0.4)) — with header and footer staying transparent so the tint reads as one uniform pane; the root chain (html/body/#app/.app) stays unpainted only under the macos-desktop + vibrancy flags — the latter is the Settings → Appearance accessibility switch (default on; persisted main-side so the window is created with the right material, and live-applied on toggle): off repaints the root chain and the sidebar falls back to opaque --color-sidebar-bg, while the traffic-light layout keeps keying off macos-desktop alone — while the conversation pane, chat header and right preview keep their own opaque surfaces. The list's hover-icon clusters (session-row kebab, group-head actions) paint NOTHING there — no plate, no wash, no blur (real backdrop blur does not even render over this window: Chromium's backdrop sampler returns a flat wash above the transparent BrowserWindow + vibrancy view). Instead the row's title/name dissolves before it ever reaches the buttons: a two-stage mask-image fade — a subtle 16px dissolve at rest, extending over the cluster zone only while the actions are revealed (row hover / keyboard focus / menu open): 34px on session rows (the pin+kebab cluster overhangs the title by ≈25px), 68px on group heads (the floating cluster is ≈60px wide). The fade is zone-based, so short rows render untouched, and text-overflow becomes clip so a long tail dissolves instead of dotting.

BlockUseNote
Brand headerlogo + name + collapse IconButton (right-aligned)on Windows / web the brand is left and the collapse IconButton sm is right-aligned inside the header; the dev-only backend version/address pill uses the UI font, not monospace; the logo is animated (a blinking eye). On macOS desktop the header is a bare drag strip (brand hidden, traffic lights + resident floating toggle over it)
New chatfull-width left-aligned button (custom)500-weight label; same rhythm as the session rows in the list (left-aligned, hover = --sb-hover). Do not use Button (centered, breaks the rhythm)
Searchbare search row (custom)500-weight label; no border, hover/focus shows the faint --color-hover wash; icon + label, with the Kbd keycaps (⌘K / Ctrl K) pushed to the trailing edge — label and shortcut are justified apart. Do not use Input (the 38px bordered version is too heavy). It is a direct sibling of New chat in the action group
Section label.p-section-labeluppercase muted small titles like "Workspaces", using --weight-section-label (600)
Pinned headfixed block above the scroll container (.sessions-head): the pinned section (PinnedSessionList.vue) + the "Workspaces" section labelstays put while the workspace groups scroll; owns the top scroll-linked seam (hairline + fade, only while scrolled). The pinned section folds via its label chevron (persisted, kimi-web.pinned-collapsed) and re-expands only on an explicit pin (never on load backfill); the expanded rows are capped at 40vh with their own scroll so a long pinned set can't push the list or footer out of view
Workspace head / session rowsee next two sectionsshare --sb-* alignment
User-menu footeraccount area (components/UserMenu.vue) opening an upward §03 menupinned row under the session list, separated by a 0.5px --line hairline; trigger keeps the same list-style family as New chat (24px round avatar + nickname when signed in, user icon + sign-in hint otherwise). The menu box follows the trigger's left edge and width (ResizeObserver-tracked, so it survives a sidebar resize) and is teleported to body because the column's container-type would capture position:fixed. Rows: plan usage / theme / language are macOS-style hover flyout submenus — the parent row carries the module icon, a faint current value and a fixed chevron-right, and hovering (or moving focus to the parent row, or pressing Enter / Space / → on it) opens a teleported panel anchored to the parent menu's right edge (content-adaptive width floored by the menu's own min-width and capped at the parent menu's width; flips left near the viewport edge) with a 250ms hover-intent close grace; the usage panel shows weekly + 5h rows (percent values with severity colours), while the theme (three schemes) and language (two locales) panels move the check to the picked option without closing the menu — then the upgrade entry below the top plan level, settings (with an always-visible Kbd keycap shortcut hint on desktop) and a confirming sign-out; all menu icons come from the Kimi set
!
Why New chat / search / inline rename don't use Button / Input: they are "list-style" controls (full-width, left-aligned, compact, borderless), while Button is centered and Input is a 38px bordered control — forcing them in would break the sidebar's visual density and alignment. This is an intentional custom exception, not an oversight.

Session row

A session row is an inset rounded pill, structured as: status slot → title → time → attention Badge → hover actions (pin / archive).

PartRule
Containerpadding: 8px 8px inside the list's --sb-inset gutter, radius-sm; no fixed/min height — row height is font-driven (title line-height: --leading-tight, ≈16px) → ≈32px total, the sidebar-wide row rhythm. The hover actions are absolutely positioned so they never force the row taller (no hover jitter). hover = --sb-hover (the global --color-hover wash); active = --sb-selected (75% of the global selected wash) — neutral, no accent tint, no border, no weight change
Status slot (lead)fixed --sb-gutter width; running = Spinner sm, otherwise unread = 7px accent dot
Titleflex:1 with truncation and user-select:none; double-click enters inline rename (compact input, not Input), whose text remains selectable
Emoji iconthe session icon is the title's LEADING emoji cluster (web-core splitSessionEmoji — no icon field; every client renders the title as-is). The emoji is an ordinary title character — no decoration at rest or on hover (it stays a <button> for a11y), and clicking it opens SessionEmojiPicker — a Menu-shelled panel (bare list-style search row → scrollable sections: Recently used persisted in localStorage (cap 8) + the grouped emoji dataset, with remove/random as MenuItems in the footer; a query swaps the sections for keyword-search results), teleported + fixed + --z-dropdown, popping from the trigger corner like the right-click menu. The menu's "Set Emoji…" opens the same picker and is the discoverable path. Inline rename edits the whole title — the emoji is an ordinary character in the input
Timemono xs, fg-faint; yields to the hover actions on hover
Attention BadgeBadge sm: info (needs answer) / warning (needs approval) / danger (aborted)
Hover actionsIconButton sm × 2 — pin + archive — cross-faded over the time on row hover (no kebab button). Right-clicking the row opens the full menu (copy ID / rename / emoji / fork / export / pin / archive + timestamp) anchored to the cursor, except over the inline rename input, where the native text-editing menu stays
Archiveno confirm — the hover archive button / menu item archives immediately, then App.vue shows the §03 ActionToast (top-center) with Undo (restores the session) and Settings (opens the archived list)

Workspace group

The group head and session rows share --sb-*: folder icon (open/closed) → name, with the kebab and "+" revealed on hover.

Show more & collapse

The "expand / collapse" controls at the bottom of each workspace group are compact list controls (same family as search, New chat, inline rename — not Buttons) sharing one row: expand (chevron-down) first, collapse (chevron-up) after a faint middot when both are present. Expanding reveals the next batch of sessions, fetching the next page from the server only when the locally loaded rows can't cover it — the control never exposes whether a reveal came from memory or the network.

PartRule
Rowa single flex row holding the controls, all content-width — hover washes just the button as a snug pill, never the full row. Font-driven height (≈32px like a session row), radius-sm; hover = --sb-hover (no text recolor); :focus-visible uses --p-focus-ring
Chevronsm (down = expand, up = collapse); the row indents by --sb-gutter + --sb-gap so the first button's chevron starts exactly at the session-title x, lining the control's leading edge up with the titles above
Labelfont-ui, text-xs, --color-text-muted; truncated
Separatorfaint middot (--color-text-faint) with --space-1 side margins, rendered only when both controls are present
Behavioreach group keeps a display cap starting at the first page; "Show more" steps it up by one batch (5) and fetches the next page only when the loaded rows fall short (busy = "Loading…", disabled); "Show less" resets the cap to the first page (view-layer trim — data is kept, no refetch). "Show more" exists while undisplayed loaded rows remain or the server has more; "Show less" appears once past the first page

ResizeHandle

A 4px grab strip layered over the 1px column border (margin: 0 -2px makes the whole 4px grabbable) with a centred 2px indicator bar. The bar stays transparent at rest and shows the neutral fills one step up the ramp — f2 on hover, f3 while the drag is live (the sidebar column is translucent on macOS, so f1 read too faint) — never the accent.

RuleValue
Width / cursor4px strip, 2px bar / col-resize mid-range; w-resize / e-resize at the drag limits (hints the direction that still resizes)
Normal / hover / dragtransparent / --color-selected (f2) / --color-line-strong (f3) — the neutral ramp one step up, never accent
Layer--z-dropdown, above pane-level sticky chrome (chat dock at --z-sticky) so the overhang stays visible and grabbable
Behaviorpanel width follows the pointer 1:1 while dragging (the parent disables transitions to avoid lag); on release it is persisted to localStorage

Right panel

The right panels (file preview / Diff / compaction summary / sub-agent / side chat) share one track and one head primitive.

Bottom terminal panel (desktop-only)

The native terminal (components/terminal/) sits in the conversation column's own bottom grid slot — the sidebar and the right panel span BOTH rows and keep full height (the VS Code layout: the panel belongs to the editor area, not to the whole window). Its height transitions 0 ↔ var(--terminal-h) (260px default, 120 min, 60% viewport max; persisted), squeezing the conversation column above instead of overlaying it. The panel mounts lazily on first open and then stays mounted so xterm scrollback survives a collapse.

i
One-sentence principle: the sidebar / shell is a "list + grid" skeleton that reuses the §02 tokens and §03 primitives (Button / IconButton / Badge / Kbd / Menu / Spinner / PanelHeader); compact list controls that don't fit a primitive (search, New chat, inline rename, show-more) keep their custom form, governed by this section.
08

Accessibility (pragmatic edition)

Kimi Web is a local developer tool; it does not target a specific WCAG conformance level, nor maintain a full screen-reader QA matrix. This section collects only the rules that are "low-cost, don't hurt the look, and directly benefit keyboard-heavy users", as the baseline contract for each primitive; the more expensive, lower-ROI parts (such as real-time announcement orchestration for streaming output) are not mandatory for now.

i
On the "ugly" focus ring: the focus visibility required below always uses :focus-visible (not :focus). It appears only on keyboard focus; mouse clicks don't trigger it, so it doesn't pollute the mouse-driven visual; the ring's strength is tuned uniformly with --p-focus-ring, not overridden per place.

1. Contrast & color

2. Keyboard operable

Anything doable with a mouse must also be doable with a keyboard; Tab order follows the DOM, with no invented skipping. Composite controls define their keyboard model per the table below; a missing model is treated as incomplete:

ControlKeyboard behavior
DialogTab cycles within the dialog (focus trap); Esc closes; focus returns to the trigger element after closing.
Menu / move the highlight, Enter selects, Esc closes.
Tabs / switch tabs (roving tabindex); only the current tab is in the Tab sequence.
Switch / Segmented / or Space / Enter to toggle.

3. Focus visibility

4. Labels & semantics

5. Target size

Desktop click targets ≥ 32px; touch devices ≥ 44px (consistent with the §01 principle and the IconButton lg tier).

6. Reduced motion

Handled uniformly in the global styles per §02's @media (prefers-reduced-motion: reduce); components do not check this individually. The chat working indicator's mascot renders its static fallback.

7. Live announcements (non-mandatory)

Screen-reader announcements are not a mandatory contract in this product. Short hints like Toast can use role="status" / aria-live; chat streaming output is currently not announced word-by-word, which is an acceptable trade-off, to be added later if a real need arises.

Explicitly not mandatory for now: a WCAG conformance-level claim, a complete ARIA pattern table, a per-screen-reader QA matrix, and real-time announcement orchestration for streaming output — these are not written into the primitive contract, to avoid becoming slogans no one maintains.
09

Dialogs

Every overlay in the app — pickers, browsers, managers, confirmations — is built on the single §03 Dialog primitive. This chapter fixes the two layout anatomies allowed inside that frame, plus the row and footer contracts that make all dialogs read as one family. Do not hand-roll a third anatomy.

The frame (recap)

All dialogs share the §03 primitive: --radius-xl radius, --shadow-xl shadow, a restrained 28% neutral backdrop, a head (title + IconButton close), a body, and a right-aligned foot. Widths md 440 / lg 640 / xl 760 and auto / fixed height are chosen per §03. One interruptive overlay at a time; Esc closes; focus is trapped and restored. A blocking flow that must be resolved rather than dismissed (server token) uses hideClose with closeOnOverlay/closeOnEsc off — never a hand-written overlay.

Anatomy A — padded (forms & confirmations)

The default: the body carries its own padding and the caller drops content straight in. Confirmations put their Buttons in the #foot slot (right-aligned, cancel → confirm). Used by: confirm, login, status panel, server token.

Anatomy B — flush (pickers & browsers)

:padded="false" with height="fixed"; the consumer owns the zone layout inside a full-height column. The zones below are the whole vocabulary — a picker dialog composes them and adds nothing else. Used by: model picker, session search, folder browser, provider manager.

ZoneContract
SearchThe boxed §03 Input, inset 22px so its edge aligns with the head title. Autofocus on open. No leading icon, no borderless variant.
Filter chipsOptional. 28px pill: transparent + muted text by default, --color-hover on hover, --color-selected + medium --color-text when active. Horizontally scrollable with the scrollbar hidden. Never a row of Buttons.
Listflex:1, owns the vertical scrolling, padded 4px 8px so rows bleed near the dialog edge. role="listbox"; rows carry role="option" + aria-selected.
Row8px 12px padding, --radius-md. Two quiet lines: name 14/20 (medium when current) and a meta line 12/18 in --color-text-faint — provider · context · capability labels, dot-separated. No badge rows, no raw-id line (search still matches them). Trailing slot: check icon (current row only), then the star IconButton.
Row statesHover / keyboard-selected → --color-hover; current → --color-selected — a neutral "where I am" fill, never an accent tint, never an inset stroke. The star stays hidden until row hover, keyboard selection, or starred; it is always visible on touch devices and colored --star when starred.
State rowsLoading / unavailable / empty: centered on both axes, muted 14px; warning color only for the unavailable case.
Shortcut barThe footer: full-bleed, padding 8px 16px, border-top --color-line, left-aligned. Keyboard hints are Kbd keycaps + 12px --color-text-faint labels, groups separated by "·", the whole bar aria-hidden. An instructional sentence (folder browser) reuses the same bar without keycaps.

Keyboard & behavior contract

Dialog map

DialogAnatomyComposition
Model pickerflush · lg · fixedsearch + provider chips + model rows + shortcut bar
Session searchflush · lg · fixedsearch + result rows + shortcut bar
Folder browserflush · lg · fixedbreadcrumb bar + filter bar + folder rows + actions + hint bar
Provider managerflush · xl · fixedmanagement rows with inset dividers (rows are not selectable) + add section + shortcut bar
Confirm / Login / Statuspadded · md · autotitle + message or form + right-aligned foot
App update (desktop)padded · lg · autoversion title + quiet meta line (release date · current version) + height-capped scrolling what's-new list / progress bar + right-aligned action row (skip → download, later → restart) with the auto-download checkbox right-aligned on its own foot row below (a pure preference for future checks)
Server tokenpadded · md · autohideClose, no Esc/overlay close — resolved only by a valid token
Settingsflush · xl · fixedpage-like exception: side-nav region, per §03
Onboarding wizardnot a Dialogfull-page takeover (not built on §03): one centered column (brand lockup → step content → ghost actions + centered primary CTA); selectable options share the option-card pattern — 0.5px --color-line hairline, --color-accent border + --color-accent-soft fill when selected
Design intent: a picker dialog should feel like a quiet command palette — one boxed search, calm rows, a neutral "you are here" fill, and a predictable shortcut bar. Anything noisier — badge clouds, accent-selected rows, per-dialog footer inventions — is a regression to weed out.
',5))])])])]))}}),Se=M(ke,[["__scopeId","data-v-be77961e"]]);export{Se as default}; diff --git a/apps/kimi-code/dist-web/assets/DesignSystemView-BOD_23qT.js b/apps/kimi-code/dist-web/assets/DesignSystemView-BOD_23qT.js new file mode 100644 index 0000000000..cc3248ddad --- /dev/null +++ b/apps/kimi-code/dist-web/assets/DesignSystemView-BOD_23qT.js @@ -0,0 +1,13 @@ +import{M as T,aD as z,aI as q,aL as o,u as i,v as t,G as d,H as e,F as p,aX as w,bb as y,I as c,bk as f,cx as h,cy as B,cz as k,cA as A,cB as M}from"./index-HRJ6xRtC.js";const I={class:"ds-page"},V={class:"layout"},H={class:"content"},L={class:"content-inner"},E={id:"tokens"},D={class:"icon-sizes"},O={class:"sz"},W={class:"p-ic",style:{width:"14px",height:"14px"},viewBox:"0 0 24 24",fill:"currentColor"},R={class:"sz"},N={class:"p-ic",style:{width:"16px",height:"16px"},viewBox:"0 0 24 24",fill:"currentColor"},U={class:"sz"},P={class:"p-ic",style:{width:"20px",height:"20px"},viewBox:"0 0 24 24",fill:"currentColor"},F={class:"icon-grid"},j={class:"icon-group-label"},K={class:"ic-name"},G={id:"primitives"},_={class:"stage-wrap"},J={class:"stage p"},Q={class:"p-pill",style:{color:"var(--p-warning)"}},Y={class:"stage-wrap"},Z={class:"stage p col"},X={class:"demo-row"},$={class:"p-btn primary disabled"},aa={class:"p-spinner sm",viewBox:"0 0 24 24",style:{"--p-accent":"#fff","--p-line":"rgba(255,255,255,.35)"}},ta={class:"stage-wrap"},da={class:"stage p col"},ea={class:"demo-row"},sa={class:"stage-wrap"},oa={class:"stage p col",style:{gap:"0",background:"var(--p-surface)",padding:"0","max-width":"300px","align-items":"stretch"}},ia={style:{display:"flex","align-items":"center",gap:"8px",padding:"7px 10px",margin:"1px 6px","border-radius":"8px",color:"var(--p-text)","font-size":"13px"}},na={style:{color:"var(--d-fg-faint)",flex:"none"},width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor"},la={style:{display:"flex","align-items":"center",gap:"8px",padding:"7px 10px",margin:"1px 6px","border-radius":"8px",color:"var(--p-text)","font-size":"13px"}},ra={style:{color:"var(--d-fg-faint)",flex:"none"},width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor"},ca={id:"chat"},va={class:"stage-wrap"},fa={class:"stage p col"},pa={style:{"max-width":"560px",width:"100%"}},ha={class:"stage-wrap"},ua={class:"stage p col",style:{"align-items":"center",background:"#fff"}},ga={class:"p-composer",style:{width:"100%","max-width":"620px"}},ba={class:"p-composer-bar"},ma={class:"p-composer-left"},wa={class:"p-pill",style:{color:"var(--p-warning)"}},ya="/repo",ka=T({__name:"DesignSystemView",emits:["close"],setup(xa,{emit:x}){const C=[{path:"/repo/apps/web/src/components/chat/TurnFilesSummary.vue",added:19,removed:4,hasWrite:!1,statsIncomplete:!1,diff:null},{path:"/repo/apps/web/src/composables/useFilePreview.ts",added:8,removed:1,hasWrite:!1,statsIncomplete:!1,diff:null},{path:"/repo/apps/web/src/components/chatTurnRendering.ts",added:0,removed:0,hasWrite:!0,statsIncomplete:!0,diff:null},{path:"/repo/apps/web/src/lib/toolDiff.ts",added:3,removed:2,hasWrite:!1,statsIncomplete:!1,diff:null}];function u(){}const S=x;function g(){S("close")}let v=null;function b(r){r.key==="Escape"&&g()}return z(()=>{document.addEventListener("keydown",b);const r=Array.prototype.slice.call(document.querySelectorAll('#nav a[href^="#"]')),a=new Map;r.forEach(l=>{const s=l.getAttribute("href");if(!s)return;const m=document.getElementById(s.slice(1));m&&a.set(m,l)});let n=null;v=new IntersectionObserver(l=>{l.forEach(s=>{s.isIntersecting&&(n&&n.classList.remove("active"),n=a.get(s.target)??null,n&&n.classList.add("active"))})},{rootMargin:"-20% 0px -70% 0px",threshold:0}),a.forEach((l,s)=>v.observe(s)),r.length&&r[0].classList.add("active")}),q(()=>{document.removeEventListener("keydown",b),v&&(v.disconnect(),v=null)}),(r,a)=>(o(),i("div",I,[t("div",{class:"ds-topbar"},[t("button",{class:"ds-back",type:"button",onClick:g},"← Back"),a[0]||(a[0]=t("span",{class:"ds-topbar-title"},"Design system",-1))]),t("div",V,[a[44]||(a[44]=d('',1)),t("main",H,[t("div",L,[a[42]||(a[42]=d('
● Design System · v1.0

Kimi Web Design System

This document defines the visual language and component specification for Kimi Web — design tokens, component primitives, the chat interface, theming, and style rules. All UI work is grounded in it: unified, restrained, token-driven, and themeable.

Scope apps/kimi-webComponent primitivesTheme 1 set · 4 customizable colorsLight / dark mode
i
This spec is the single reference when changing the web UI. Before adding or modifying a component, style, layout, or theme, read this document first; color, font, radius, spacing, shadow, z-index, and motion always use the §02 tokens, components reuse the §03 primitives, and the §06 style rules are followed.
01

Design Principles

Every UI decision traces back to the following principles. Kimi Web is a local Agent tool for developers: quick scanning, long stretches of staring, often in the dark — the design serves the task, and is restrained, clinical, and density-first.

Brand tone (the do-not list): calm, clinical, never exaggerated. Reject purple gradients, glassmorphism, glowing shadows, AI purple / blue glows, endlessly looping fussy micro-animations, "Boost your productivity"-style marketing copy, and using emoji as icons. These are all common tells of AI-generated interfaces (an "AI tell"), deliberately avoided.
i
Declare design intent first (Design Read): before adding a component / page, write one sentence describing its scenario, audience, and tone (for example, "a lightweight tool card embedded in a conversation, for developers, calm and restrained"), then build. If the intent isn't clear, ask one question first rather than defaulting to the nearest existing style.
',2)),t("section",E,[a[7]||(a[7]=d(`
02

Design Tokens

Collapse every visual decision into tokens. Color tokens keep the existing short names and fill out the semantics (lowering migration cost), while spacing, z-index, motion, and font-weight fill in the scales that are currently missing. Every token has: name, light value, dark value, and usage.

i
Naming convention: --<category>-<role>-<state>. For example --color-text-muted, --radius-md, --space-4. To reduce churn, the existing short names (--bg / --ink / --line / --blue …) are kept as compatibility aliases for one release cycle.

Color

Semantic-first, in three layers: background / text / border + accent + status colors. All colors are defined in light / dark pairs, with contrast ≥ 4.5:1.

i
The table below shows the semantic tokens. Each ships a light value in :root and a dark override in the data-color-scheme blocks — for example --color-bg is #ffffff in light and #121212 in dark; --color-accent is the brand blue (#1783ff light / #1a88ff dark). The semantic status colors (success / warning / danger / info) are independent palettes, one set each for light / dark.
bg
#ffffff / #121212
surface
#f5f5f5 / #1f1f1f
surface-sunken
#f5f5f5 / #121212
well
#f5f5f5 / #1f1f1f
surface-deep
#f5f5f5 / #0d0d0d
surface-overlay
#ffffff / rgba(255,255,255,.1)
selected
rgba(0,0,0,.05) / rgba(255,255,255,.1)
fg
rgba(0,0,0,.9) / rgba(255,255,255,.84)
fg-muted
rgba(0,0,0,.6) / rgba(255,255,255,.56)
line
rgba(0,0,0,.13) / rgba(255,255,255,.12)
subtle
rgba(0,0,0,.05) / rgba(255,255,255,.05)
accent (KMBlue)
#1783ff / #1a88ff
accent-soft
#e8f3ff / rgba(26,136,255,.1)
TokenLightDarkUsage
--color-bg#ffffff#121212Page background
--color-surface#f5f5f5#1f1f1fPanel / sidebar / card head
--color-surface-raised#ffffff#292929Raised card / dialog / input
--color-menu-bgrgba(255,255,255,.95)rgba(41,41,41,.95)Floating menu panel — frosted glass over --p-menu-backdrop blur
--color-surface-overlay#ffffffrgba(255,255,255,.1)Field-control fill on raised cards (selects, steppers) — top rung; light tops out at white (the level is carried by the border), dark steps one rung above raised. Floating layers stay at raised
--color-well#f5f5f5#1f1f1fContent well on the page (code blocks, tool-output panels, match/file lists, media thumbnails) — light reuses the sunken recess; dark lifts one rung ABOVE the page, because a true recess (#121212) vanishes into the page there
--color-surface-deep#f5f5f5#0d0d0dDeep chrome plane one step BELOW the page (panel headers, diff gutters) — dark drops under --color-bg so chrome framing stays darker than the content it frames
--color-textrgba(0,0,0,.9)rgba(255,255,255,.84)Body text / headings
--color-text-strong#000000#ffffffMax foreground emphasis — menu-row label & icon on hover
--color-text-mutedrgba(0,0,0,.6)rgba(255,255,255,.56)Secondary text / placeholder
--color-linergba(0,0,0,.13)rgba(255,255,255,.12)Divider / card border
--color-subtlergba(0,0,0,.05)rgba(255,255,255,.05)Subtle hairline — tertiary separators below --color-line (diff-gutter column rules, quiet dividers inside wells)
--color-selectedrgba(0,0,0,.05)rgba(255,255,255,.1)Neutral selected fill (sidebar rows, list pickers) — translucent, never accent-tinted
--color-hoverrgba(0,0,0,.03)rgba(255,255,255,.05)Row hover wash — lighter than the selected fill (hover < selected); translucent, sits on any surface. The global hover rule: transparent-base controls overlay this f1 wash (hover never darkens — never sunken); filled controls use their own hover token (accent-hover, send-bg-hover)
--color-inline-code-bgrgba(0,0,0,.03)rgba(255,255,255,.1)Inline-code chip fill — fills.f1 / fills.f2; dark lifts off any dark surface (sunken == bg there)
--color-media-alpha-bg-1≈#858585≈#76797eCheckerboard square A of the <img> alpha canvas — color-mix of --color-bg/--color-text (52/48); applied via --media-alpha-canvas (16px period)
--color-media-alpha-bg-2≈#6b6b6b≈#8c8f93Checkerboard square B (42/58) — both squares stay ≥3:1 against white and black; opaque images cover the canvas
--color-sidebar-bg#f9fbfc#0d0d0dSidebar surface — one step off --color-bg (just under white in light, one step BELOW the page in dark) so the session column reads as its own plane and never brighter than the reading surface
--color-scrimrgba(0,0,0,.4)rgba(0,0,0,.6)Modal scrim — the dark veil behind dialogs/lightboxes (mask.base; legacy hardcoded overlays can migrate here)
--color-scrim-strongrgba(0,0,0,.6)rgba(0,0,0,.75)Stronger scrim for full-screen media previews (mask.strong — the PhotoSwipe image preview backdrop)
--color-text-on-scrim#ffffffsameText drawn on the scrim (captions over the media lightbox)
--color-accent#1783ff#1a88ffPrimary action / link / focus
--color-success#0e7a38#3fb950Success / pass
--color-warning#a9610a#d29922Warning / pending
--color-danger#c0392b#f85149Danger / error / abort

Palette

The palette is the production kimi.com palette (design tokens tokens.json): neutral-gray surfaces, an alpha-based label / fill / separator ramp (labels.* / fills.* / separator.s1), the KMBlue accent, and a true neutral dark ladder (#121212 → #1f1f1f → #292929; the deep chrome plane and sidebar derive one step below at #0d0d0d — the palette has nothing darker than primary).

The ONE deliberate exception is the status hues: success / warning / danger / done keep the app's own WCAG-tuned ramp (≥4.5:1 on the neutral surfaces) — the production status colours (positiveGreen #16c456, orange #ff9500, danger red #ff3849) are too bright against it. Diff add/del bands happen to coincide (both use the production 25% fills in light, 14% in dark).

Surface usage

The surface layers each have a role — choose by "field overlay / raised layer / content well / default flat layer / sunken layer / page background / deep chrome", and avoid treating --p-surface-raised as a universal background. In dark, elevation = lighter: floating layers sit above the content, content wells sit above the page, and chrome planes (sidebar, panel headers) sit below it — never the reverse. One consequence: on the page itself, never use --color-surface-sunken for a content carrier — it equals --color-bg in dark and the fill vanishes; use --color-well. Sunken stays correct INSIDE surface / raised cards, where it is a genuine recess. Field controls (selects, steppers) on a raised card use --color-surface-overlay, the top fill rung; floating layers keep --color-surface-raised — their elevation is shadow + hairline, not a lighter fill.

TokenLightDarkUsage
--p-surface-overlay#ffffff#22272eField controls on raised cards — select, stepper (top fill rung; light = white)
--p-surface-raised#ffffff#1c2128Raised card / dialog / input (raised layer)
--p-well#f3f5f8#13181eCode block / tool output / list carrier directly on the page (content well — light: recessed, dark: one rung above the page)
--p-surface#fafbfc#13181ePanel / sidebar / card head (default flat layer)
--p-surface-sunken#f3f5f8#0d1117Recessed area INSIDE a surface / raised card — never a content carrier on the page (sunken layer)
--p-bg#ffffff#0d1117Page background
--p-surface-deep#fafbfc#0a0d12Panel header / diff gutter (deep chrome layer — below the page in dark)

Borders & hairlines

Three line tokens, three jobs: --color-line is the default structural separator, --color-subtle the tertiary separator that must stay quieter (diff-gutter column rules, quiet dividers inside wells), and --color-line-strong the edge of interactive controls (inputs, selects, secondary buttons). Width is one: 0.5px — every stroke is the same hairline, on static structural edges (card rims, plane seams, header dividers), interactive control rims and floating layers alike. Separation comes from luminance first — planes one rung apart already read as distinct in dark, so their shared edge stays a 0.5px hairline rather than a heavier border; same-rung neighbours (list rows, card head / body) are exactly where a hairline is required. In dark, drop shadows fade on near-black surfaces, so a floating layer's edge IS its hairline — never ship a shadow-only floating surface. (Legacy --line / --line2 alias --color-line / --color-subtle for one cycle; new work references the v2 names.)

Focus ring

All focusable controls (button, input, link, menu item, switch, checkbox) use the focus-ring token uniformly; do not hand-write a box-shadow focus ring.

TokenValueUsage
--p-focus-ring0 0 0 3px var(--p-accent-soft)Default focus ring (link, menu item, switch, checkbox)
--p-focus-ring-strong0 0 0 3px var(--p-accent-soft), 0 0 0 1px var(--p-accent)Strong focus ring (button, primary action)

Text selection

The text-selection color uses --p-selection uniformly (light rgba(23,131,255,.18) / dark rgba(88,166,255,.32)), applied by the global ::selection rule; do not set a separate highlight background.

Disabled state

All disabled controls use opacity:.5 + cursor:not-allowed uniformly; do not separately grey out or recolor.

Font families

Kimi Web uses two font tokens: --font-ui (UI and body, with Schibsted Grotesk for Latin and Noto Sans SC for Simplified Chinese) and --font-mono (code and monospace). Components always reference the variables; do not hard-code font names.

--font-ui · UI & body (Schibsted Grotesk + Noto Sans SC)

Body and UI use self-hosted Schibsted Grotesk for Latin text and self-hosted Noto Sans SC Variable for Simplified Chinese. Platform fonts remain as fallbacks:

--font-ui
--font-ui: "Schibsted Grotesk Variable", "Helvetica Neue", Arial,
+      "Noto Sans SC Variable", "Noto Sans SC", "PingFang SC",
+      "Microsoft YaHei",
+      -apple-system, BlinkMacSystemFont, "Segoe UI",
+      Roboto, Ubuntu, sans-serif,
+      "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji";

--font-mono · Code & monospace

Code, line numbers, diffs, and Bash commands use JetBrains Mono (a self-hosted variable font), falling back to the system monospace. Other tool labels and summaries use the UI font:

--font-mono
--font-mono: "JetBrains Mono Variable", "JetBrains Mono",
+      ui-monospace, "SF Mono", Menlo, Consolas, monospace;

Loading strategy

FontSourceBundledUsage
JetBrains Mono@fontsource-variable/jetbrains-mono✓ self-hostedmonospace / code (--font-mono)
Schibsted Groteskprepare-fonts → web-ui/assets/fonts✓ generated + bundledUI / body / display (--font-ui, --font-display), wght 400-900, normal + italic
Noto Sans SCprepare-fonts → web-ui/assets/fonts✓ generated + bundledSimplified Chinese UI / body, wght 100–900
System UI / CJK fontsoperating systemlate fallback for UI / body
Schibsted Grotesk, Noto Sans SC, and JetBrains Mono are self-hosted. They make no external network requests and work offline; platform fonts remain as fallbacks.

Usage rules

Type scale & weight

The user font-size preference is one of four named steps (small / medium / large / xlarge, Medium default) written to data-font-scale on <html>; the step name is persisted, never a px value. The step only moves --base-font; every size token derives additively (default + shift), and line heights are locked to integer px via round(size × ratio, 1px) — never a unitless ratio.

Two token groups share the shift but keep their own ratios: --ui-* for chrome (tight, 1.40–1.50) and --md-* for Markdown content + the composer (loose, 1.56–1.63; body is anchored to the UI body size — the spec's +2px offset was dropped as a product decision — while keeping its own looser line-height ratios). T0/T1 cap at 24/22px on the top steps (built into the tokens via min() — do not remove). Use the .text-ui-* / .text-md-* utility classes; legacy aliases --ui-font-size (→ --ui-b2), --content-font-size (→ --md-b1) and the whole 6-level --text-* ramp (xs→c1, sm→b2−1px, base→b2, lg→t2, xl→t1, 2xl→t0) keep older components on the ramp. Panel titles sit at the base step (--ui-b2); dropdown menu items sit one rung below (--text-sm = b2 − 1px) — both still follow the user's font scale.

Section Title
--ui-t1 · title (cap 22)
Card title
--ui-t2 · subtitle
UI emphasis
--ui-b1 · body strong
UI control / button / form
--ui-b2 · body
Helper text / table
--ui-c1 · caption
Badge / timestamp
--ui-c2 · non-critical only
Markdown H1
--md-h1
Chat body / message bubbles / composer
--md-b1 · prose body
Quote / table
--md-b2 · secondary
Code block / inline code
--md-b3 · weak / code

The fixed product type tokens still define scale-independent defaults: transcript prose enables text-autospace: normal for mixed CJK and Latin text. Drop stray font-weight: 650 / 750; converge on 400 / 500 (regular / emphasis), with a dedicated 600 weight for sidebar section labels.

TokenValueUsage
--font-ui"Schibsted Grotesk Variable", …, "Noto Sans SC Variable", …UI & body (Schibsted Grotesk + Noto Sans SC)
--font-kbd"Schibsted Grotesk Variable", system-ui, sans-serifkeyboard shortcut keycaps
--font-monoJetBrains Mono…code, Bash commands, line numbers, diffs
data-font-scalesmall / medium / large / xlargeuser preference on <html>; sets --base-font (12–18px), Medium = 14px default
--ui-t0…--ui-c2default + --ui-shift, t0/t1 capped via min()chrome type ramp (title / subtitle / body / caption); .text-ui-* classes
--md-h1…--md-b3default + --md-shiftMarkdown ramp (headings / body / secondary / code); .text-md-* classes
--ui-font-size / --content-font-sizevar(--ui-b2) / var(--md-b1)legacy aliases kept on the ramp
--code-font-sizecalc(var(--content-font-size) - 2px)standalone code surfaces (diff view, file preview, tool cards) — one step below body, 12px @ Medium; prose-embedded code stays on the --md-* ramp
--text-xs / sm / base / lg / xl / 2xlc1 / b2−1 / b2 / t2 / t1 / t0legacy ramp, aliased into the scale
--leading-tight/normal/prose/relaxed1.25 / 1.5 / 1.6 / 1.7headings / UI / chat prose / long text
--weight-regular/option-label/medium/ui-strong400 / 475 / 500 / 525body / settings labels / emphasis / compact UI emphasis
--weight-section-label600sidebar section labels

Icon size

Icons use three size tokens uniformly. The global .p-ic default is 16px (--p-ic-md); components pick as needed, and random pixel sizes are forbidden.

TokenValueUsage
--p-ic-sm14pxsmall button, badge, menu item, inline link icon
--p-ic-md16pxdefault (button, icon button, toolbar)
--p-ic-lg20pxToast status icon, empty-state illustration

Icon

Icons always come from the centralized registry lib/icons.ts: in templates use the <Icon name size /> component (components/ui/Icon.vue); for v-html contexts (such as a tool glyph) use iconSvg(name, size). Do not hand-write <svg> — the scripts/check-style.mjs icon-from-registry rule flags stray SVGs. Every glyph shares the 24×24 source grid and currentColor (colour follows text); size uses the three tokens below, and only icons imported in lib/icons.ts are bundled by unplugin-icons at build time. Three collections feed the registry, in this order of preference: ~icons/kimi/* — Kimi Design System icons (24×24 outlined, 1.8px stroke), local SVGs under src/icons/kimi/ registered as a custom collection in the Vite config, used whenever a Kimi glyph exists for the intent; ~icons/tabler/* — Tabler Icons (MIT), for the few gaps it uniquely covers (today: the right-panel toggle); and ~icons/ri/*Remix Icon (Apache-2.0), for the remaining intents the Kimi set does not cover yet. A few glyphs are filed under their intent rather than the upstream asset name (see the lib/icons.ts header). When an icon is missing, prefer a glyph from the Kimi icon set: copy the SVG into src/icons/kimi/ (kebab-case name, monochrome currentColor) and register it — two static imports (component + ?raw string) plus one entry in ICONS; reach for Remix only when no Kimi glyph fits, and never draw paths in a component.

Size scale

`,49)),t("div",D,[t("div",O,[(o(),i("svg",W,[...a[1]||(a[1]=[t("path",{fill:"currentColor",d:"M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"},null,-1)])])),a[2]||(a[2]=e("sm · 14",-1))]),t("div",R,[(o(),i("svg",N,[...a[3]||(a[3]=[t("path",{fill:"currentColor",d:"M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"},null,-1)])])),a[4]||(a[4]=e("md · 16",-1))]),t("div",U,[(o(),i("svg",P,[...a[5]||(a[5]=[t("path",{fill:"currentColor",d:"M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"},null,-1)])])),a[6]||(a[6]=e("lg · 20",-1))])]),a[8]||(a[8]=t("h4",{class:"mini"},"Icon library",-1)),a[9]||(a[9]=t("p",null,[e("Currently registered icons, grouped by purpose. The display order and grouping are defined by "),t("code",null,"ICON_GROUPS"),e(" in "),t("code",null,"lib/icons.ts"),e(" (a hand-maintained array covering the same icon names), and this catalog is rendered directly from that array so the registry and the document never drift.")],-1)),t("div",F,[(o(!0),i(p,null,w(f(B),([n,l])=>(o(),i(p,{key:n},[t("div",j,y(n),1),(o(!0),i(p,null,w(l,s=>(o(),i("div",{key:s,class:"icon-cell"},[c(f(h),{name:s},null,8,["name"]),t("span",K,y(s),1)]))),128))],64))),128))]),a[10]||(a[10]=d('

Do not use emoji as functional icons. The Kimi brand mark (the robot mascot logo) is a brand asset and is not part of this icon system.

A few special graphics are not in the registry; each has a dedicated component maintained in one place, and must not be copied by hand: <ContextRing :pct /> (the Composer context progress ring, data-driven), <AuthStateIcon kind /> (the success / expired / error colored illustrations in the login flow), <Spinner /> (loading state). Status dots (such as in the Provider list) always use CSS dots (border-radius:50%), not SVG. The scripts/check-style.mjs icon-from-registry rule exempts the above and the brand mark; all other hand-written <svg> is flagged.

Spacing

A 4px base grid. All spacing, gaps, and padding inside and outside components come from this scale — no arbitrary pixels.

--space-1 · 4
icon gap, badge padding
--space-2 · 8
control gap, small padding
--space-3 · 12
button padding, form-item gap
--space-4 · 16
card padding, grid gap
--space-5 · 20
dialog padding
--space-6 · 24
section gap
--space-8 · 32
large section gap

Dense list (sidebar / file tree)

High-density navigation lists like the sidebar share one rhythm, all on the 4px grid: in-row vertical padding --space-1 (4px), no margin between rows (the hover pill provides the separation); section gap (between logo / search / action buttons / group title / list) uniformly --space-2 (8px); between groups --space-2; the brand header is slightly looser at the top (--space-3). When building similar lists, reuse this scale — do not hand-write 1/6/7/10px.

Radius

Merge the existing 14 values into the nearest of 7 scale steps. Rule: the component type determines the radius, not the author's feel. The Composer shell is the sole product-specific exception: its 32px radius pairs with superellipse(1.5) so the flatter curve stays visually concentric with its controls.

xs · 4
sm · 6
md · 8
lg · 12
xl · 16
2xl · 20
composer · 32 / 1.5
full · 999
TokenValueUsageMerged from
--radius-xs4pxsmall badge, inline tag2/3/4px →
--radius-sm6pxsmall button, icon button, menu item5/6px →
--radius-md8pxbutton, input, badge, card7/8/9px →
--radius-lg12pxmenu, toast, bubble, floating card10/12px →
--radius-xl16pxcontainer baseline: dialogs, settings cards, sheets, work panel13/16px →
--radius-2xl20pxworkspace attachment card bottom (0 0 2xl 2xl) tucked under the composer18/20px →
--radius-composer32pxComposer shell, with --corner-shape-composerproduct-specific
--radius-full999pxpill badge, avatar, send button999px / 50%

Elevation & z-index

Shadows express only "elevation", never decoration (no colored glow). z-index is unified into a scale, eradicating 9999-style one-upping.

sm · dropdown menu / sticky
md · Toast
lg · overlay (reserved)
xl · dialog
Z-index TokenValueUsage
--z-base0normal flow
--z-sticky100sticky header / sidebar
--z-dropdown200dropdown menu / tooltip
--z-overlay300overlay / bottom Sheet
--z-modal400dialog — sibling overlays tie-break by DOM order, so the global confirm (ConfirmDialogHost) mounts on demand to always land last / on top
--z-modal-dropdown500menus / popovers that open above a modal dialog (teleported to <body>, e.g. the settings SecondaryModelPicker cascade)
--z-toast600toast
--z-max9999reserved: only this tier for extreme fallback

Motion

TokenValueUsage
--ease-outcubic-bezier(0.16, 1, 0.3, 1)enter, hover, expand
--ease-in-outcubic-bezier(0.4, 0, 0.2, 1)panel width, layout changes
--duration-fast120mspress, focus
--duration-base160mshover, show/hide
--duration-slow260msdialog, Sheet, layout
--duration-hover-intent250mshover-intent reveal gate (TOC rail)
--anim-rive-spin416.7msnew-chat / folder-plus icon: plus spin on hover
--anim-leftbar533.3mssidebar toggle icon: arrow fly-in on hover
--anim-leftbar-shrink200mssidebar toggle icon: divider shrink on hover

The --anim-* lengths are track timings ported verbatim from the designer's Rive exports, so they sit outside the --duration-* ramp on purpose — retiming the ramp must not distort them. Their interpolation stays linear because the easing is already baked into the dense keyframe stops; a token easing would double-apply. Three hover tracks use them today: the sidebar toggle shrinks its divider to half height while an arrow flies in and settles (the expand variant mirrors the track from the left), and the new-chat / folder-plus pluses do one bouncy spin. Each track is keyed to an id inside its own glyph (#bar-divider, #bar-arrow / #bar-arrow-expand, #p1, #af-p1) so every instance of the icon animates, and all revert on mouse-out. They still fall under the global reduced-motion switch below.

Reduced motion

i
Under @media (prefers-reduced-motion: reduce), all animation and transition durations drop to about 0.001ms (effectively off), and the chat working indicator's mascot renders its static fallback instead of the Rive loop. Components should not check this individually; it is handled uniformly in the global styles. The switch clears durations, not transition-delay: a hover-intent gate (the conversation TOC's 250ms reveal) decides whether hidden content appears, and clearing it would make pointer fly-bys strobe content for reduced-motion users.

Layout & breakpoints

Layout sizes and responsive breakpoints are tokenized too: sidebar width, content reading-column width, and two global breakpoints. Components should not hard-code pixels.

TokenValueUsage
--p-sidebar-w264pxleft session sidebar width
--p-content-max760pxchat reading-column max width (regular chat prose)
--p-content-wide920pxwide content (settings / panel)
--p-table-max1040pxdesktop wide-table max width (see §04)
--p-table-cell-max700pxmax width of a single table column; longer cell content wraps (see §04)
--p-bp-sm640pxmobile / desktop boundary
--p-bp-md980pxnarrow / wide screen boundary
i
At ≤640px: dialogs become bottom Sheets, the sidebar collapses into an expandable drawer, and Composer toolbar controls are allowed to wrap.
',24))]),t("section",G,[a[27]||(a[27]=d(`
03

Primitives

Component primitives are the "smallest correct units" of the site UI. Each primitive exposes variants along only two dimensions — variant / size — with appearance driven by tokens, so it naturally supports light / dark mode and customizable theme colors.

i
For every interactive primitive, the keyboard behavior, focus, and ARIA contract are in §08 Accessibility. New primitives must ship with a keyboard model — mouse-only interaction is not enough.

Component selection guide

ScenarioUse
Primary action (submit / confirm)Button variant=primary
Secondary action / cancelButton secondary / ghost
Destructive action (delete / abort)Button danger / danger-soft
Status markerBadge
Toolbar filter / model switchPill
2–5 mutually exclusive optionsSegmentedControl
Top tabsTabs
Switch / multi-selectSwitch / Checkbox
Scrollable regions with overlay controlsScrollArea
Floating content card / list action menuCard / Menu
Inline notice / global toastBanner / Toast
Dialog / confirmation · bottom panel (mobile)Dialog / Sheet

Button

4 semantic variants × 3 sizes. The primary action primary takes its color from the current theme color (§05 can switch between the blue and black families). Radius uses --radius-md uniformly (small size --radius-sm), weight 600, with a visible focus ring.

Variant matrix lightpreview
medium · default
small
With icon / state
Dark skin dark

API

Button.vue · usage
<Button variant="primary" size="md" :loading="submitting">Save</Button>
+    // variant: primary | secondary | ghost | danger | danger-soft
+    // size:    sm | md | lg
States

IconButton

Unified into three sizes — 26 / 32 / 44px — with the neutral --color-hover wash on hover and a visible focus ring. Replaces the ad-hoc icon + click areas scattered across components today.

IconButton
i
The desktop IconButton comes in sm 26 / md 32; on touch devices the tap target should be ≥ 44px, so use lg 44px, satisfying the §01 accessibility principle (the mobile three-piece set uses lg).

Badge · Chip · Pill

Collapsed into two kinds: Badge (status badge, with an optional status dot) and Pill (the clickable pill in the composer toolbar). Radius, font size, and padding are all unified.

Badge · status badge
Semantic variants
pendingrunningcompletedneeds confirmationfailedKIMI
With icon / small size
planpassedread-only
`,19)),t("div",_,[a[14]||(a[14]=t("div",{class:"stage-bar"},[t("span",{class:"st"},"Pill · toolbar pill (composer)")],-1)),t("div",J,[a[12]||(a[12]=d('kimi-k2· thinking',1)),t("span",Q,[c(f(h),{name:"shield-question",size:"sm"}),a[11]||(a[11]=e("yolo",-1))]),a[13]||(a[13]=t("span",{class:"p-pill"},[t("svg",{class:"p-ic",viewBox:"0 0 24 24",fill:"currentColor"},[t("path",{fill:"currentColor",d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10s-4.477 10-10 10m0-2a8 8 0 1 0 0-16a8 8 0 0 0 0 16m1-8h4v2h-6V7h2z"})]),e("12k / 200k")],-1))])]),a[28]||(a[28]=d(`

Kbd · keyboard shortcut

Kbd renders a shortcut as keycaps — one block per key, never inline text like (⌘K). Caps are 18px tall (Badge sm rhythm): transparent ground with a 0.5px hairline edge, 11px --font-kbd (Inter + system-ui), text colour inherited from the row that carries it — the cap has no fill or colour of its own, so it follows its context (bright inside the accent-ringed recording box, quiet in a hint row). Typical placement: pushed to the row's trailing edge, opposite the label (e.g. the sidebar search row), and inside dialog navigation hints.

Kbd · keycaps
KCtrlKP

Card / Surface

All cards across the site share one structurehead / body / foot — and come in two tiers by visual weight:

Operation card · compact mono head (no fill)
read_filesession.ts
The head uses mono + a neutral background to emphasize its "code / process" nature; the body uses sans for readability. Flat, radius-md, same shape as the Swarm composite card.
Attention card · floating neutral surface (no color band)
A decision needs your confirmation
A floating neutral card — no color band. The raised surface, large radius and soft shadow lift it above the transcript; the head is a plain dark title, and the hairline footer lines up quiet text buttons leading to one solid primary action.
Activity run · a summary row expands into the folded lines
Read 2 files
Readsession.tssrc/auth34 lines
Readmiddleware.tssrc/auth58 lines

Input / Select / Textarea

Unified 38px height (32px small), --radius-md radius, --color-surface-overlay background, and a unified blue focus ring (0 0 0 3px accent-soft). Select is a custom combobox and listbox, not a native <select>; opening it centres the selected option in the scrollable menu. Open Select roots enter the dropdown layer; containing settings groups temporarily release clipping and join that layer so later sections cannot cover the menu.

Form primitives
Only letters, numbers, and hyphens are allowed.
States
Please enter a valid workspace name
Normal state · validation passed

Code / Diff

Diff controls: The non-selectable branch summary starts with a 14px branch icon, aligns to the panel header's 12px inset, uses 12px labels, and ends with a 0.5px hairline. List and tree choices use the 14px list and tree-view registry icons. Flat-list and tree-view paths use the UI font at 12px. Tree roots share the flat list's 14px content inset, then each depth advances by 12px and adds a grey indentation rule.

Diff empty state: Centre the clean-workspace message in the available panel height and lead with a quiet 32px status icon.

Diff detail body: the right-side diff detail reuses HighlightedCode unframed (the panel owns the edge and scroll) — shiki highlighting with the language inferred from the file path, an old/new line-number gutter, hunk headers as a muted band, at the shared code size --code-font-size (12px at Medium, one step below body text). The file preview's code body (text / JSON / HTML and Markdown source) renders through the same component with a per-row number gutter plus search-hit / jump-target row states.

Inline code, code blocks, and diff contents use the monospace font (--p-font-mono); diff change counts and branch summaries use the UI font. Code blocks have a filename title bar and a copy button; the action edge uses a compact 6px inset. Diffs use + / - row colors to express additions and deletions — additions use a success light background, deletions use a danger light background, with no gradients.

Code / Diff
inline code
The server uses jwt.verify(token) to verify the signature, returning 401 on failure.
code block
session.ts
import { verify } from './jwt';
+
+    export function auth(token: string) {
+      return verify(token, process.env.JWT_SECRET!);
+    }
diff
session.ts · +3 -1
import { verify } from './jwt';
-const secret = 'dev-secret';
+const secret = process.env.JWT_SECRET!;
return verify(token, secret);

Dialog

One dialog primitive replaces 6 hand-written implementations: unified --radius-xl radius, --shadow-xl shadow, 20px head padding, right-aligned footer actions, and an IconButton close button.

Dialog primitive
New chat
Create an independent Agent chat in the current workspace.
i
Size & height: Dialog offers three widths — md 440 / lg 640 / xl 760 (--p-content-max) — chosen by content weight. Height comes in two kinds: auto (default, grows with content up to max-height) and fixed (constant height min(680px, 100vh - 64px), with overflow scrolled inside the body). Content / multi-tab dialogs (settings, model picker, provider manager, folder browser) always use fixed so the frame size stays constant and doesn't jump when switching tabs or content length; short confirmation dialogs keep auto. Selectable controls inside Settings use 0.5px hairlines. Its navigation stays transparent on the grouped canvas — separated from the content region by the 0.5px hairline (horizontal in the stacked mobile layout) — and uses 12px labels at weight 525 with 16px registry icons; the selected tab paints the same neutral --color-hover wash as hover, with the label simply brightening to --color-text — the Kimi app settings nav's recipe (.ss-nav-item--activeFills-F1, no accent tint, no weight change); section captions use 16px UI text in --color-text. Every setting row has a plain-language description; option labels use --color-text at weight 475 with a 1px gap before that description. Chinese descriptions use “思考” and “计划模式” rather than the English terms; “skills” stays lowercase when it appears within a sentence. Every settings section puts its rows inside one rounded group with 0.5px dividers; the content region paints the flat --color-surface so each group (--color-surface-raised) reads one rung above it — never a sunken pit, which would sink the dialog's content below its chrome in dark. The font-size stepper is a compact 32px UI-font control with 12px values and custom minus and plus buttons. Its 52px desktop row centres the control with equal space above and below. Archived workspace headings reuse the sidebar’s folder-closed registry icon, and Restore actions lead with the undo icon. Archive counts use weight 500; timestamps and workspace paths use the UI font.

Dialog backdrop: Use a restrained 28% neutral overlay so the workspace remains legible without competing with the modal.

Settings regions: The settings title and close action belong to the right content region. The navigation is a separate full-height region that starts at the dialog's top edge, not content beneath a dialog-wide header.

Archived sessions: Start with the localized page title. Do not add a repeated English kicker above it.

Settings interaction: Notification labels and descriptions are not selectable; their switches remain fully interactive.

Conversation chrome: Header labels are not selectable; the rename input remains selectable and editable. Branch names start with a 14px branch icon. The overflow trigger is a compact 24px control with a 14px icon. Below a 720px header container, hide the workspace prefix and give the conversation title the available width. On macOS desktop the header doubles as the window-drag region and interactive controls opt out with no-drag; while one of its menus or a dock work panel is open every window-drag strip (chat header, sidebar header, panel header) drops the drag region so an outside press anywhere reaches the page and dismisses the overlay (window dragging is simply paused).

Session search: follows the §09 flush picker anatomy — a boxed Input under the head, and a result list that fills the body's available height and owns vertical scrolling.

Model picker: follows the §09 flush picker anatomy; the provider filter remains horizontally scrollable without showing a persistent scrollbar. Only the model list scrolls; the shortcut bar remains pinned at the bottom.

Toast

Unified information architecture: status icon + title + description. The status color appears only on the icon, avoiding large colored areas that create visual noise. For an undoable action there is a second, lighter form — the Action toast (ActionToast.vue): a pill floating top-center just below the 48px header, carrying a one-line sentence whose actions are plain inline <button>s (styled accent by the component), plus close. Self-timed (default 8s, hover pauses); the parent re-keys to reset and wraps it in a <Transition>. First used by session archive (Undo / Settings); warnings keep the bottom-right Toast stack.

Toast
Connected to server
The local server is responding normally; you can start a new chat.
Context usage 82%
Consider running /compact to free up space.
Action toast
or view archived chats in

Spinner

Loaders fall into two categories by scenario — do not mix them:

Spinner · plain loader (default)

`,39)),t("div",Y,[a[18]||(a[18]=t("div",{class:"stage-bar"},[t("span",{class:"st"},"Spinner · common scenarios")],-1)),t("div",Z,[t("div",X,[a[17]||(a[17]=d('Loading…',2)),t("button",$,[(o(),i("svg",aa,[...a[15]||(a[15]=[t("circle",{class:"track",cx:"12",cy:"12",r:"9"},null,-1),t("circle",{class:"arc",cx:"12",cy:"12",r:"9"},null,-1)])])),a[16]||(a[16]=e("Submitting",-1))])])])]),a[29]||(a[29]=t("h4",{class:"mini"},"WorkingIndicator · 小蓝 mascot (only the chat working state)",-1)),t("div",ta,[a[20]||(a[20]=t("div",{class:"stage-bar"},[t("span",{class:"st"},[e("WorkingIndicator · chat working state only "),t("span",{class:"tag spec"},"signature")])],-1)),t("div",da,[a[19]||(a[19]=t("span",{class:"stage-label"},"Usage · only while the chat has an unfinished prompt",-1)),t("div",ea,[c(k,{label:"Requesting…"}),c(k,{label:"Working…"})])])]),a[30]||(a[30]=d('
i
The chat working state is rendered uniformly by WorkingIndicator — the 小蓝 mascot (KimiMascot, the kimi.com avatar Rive asset, with a static SVG fallback under reduced motion or when the runtime fails) plus a phase label. All other loading states use the plain Spinner.

Link

Inline text link: the default is the accent color with no underline; on hover it shows an underline and darkens. File links inside inline code use a 1.5px underline offset so the line stays clear of the chip background. The .muted variant uses the secondary text color. Used for in-text jumps, external links, "view all", and other lightweight actions.

Link · inline link
Read the full design token docs before building.View on GitHubView history

Menu / Dropdown

Desktop menus use a 3.5px panel inset. Standard items use 5px × 9px padding and a 7px icon gap. Their three-layer neutral shadow stays below 4% opacity.

Dropdown menu panel: frosted glass — the translucent --color-menu-bg fill over a blurred, saturated page backdrop (--p-menu-backdrop) — plus hairline + light shadow (--shadow-menu, a three-layer neutral ramp). This is the one place glassmorphism is the design language rather than an exception (§06); every floating menu surface (Menu.vue, the Select listbox, composer dropdowns, slash/mention popups) uses the token pair, never ad-hoc blur values. Menu items support icons, the current (active) state, the danger state, and the disabled state, with separators grouping items. All menu actions use 13px labels at weight 475 with 16px leading icons; both share a 16px line box for vertical alignment. Menu timestamps use the UI font. On touch / mobile, use lg (≥44px row height) while keeping the same type size. A dropdown menu pops in from its trigger corner — fade plus a slight 0.97 scale over --duration-base (exit --duration-fast), the composer model dropdown's motion language; the transform origin and the nudge direction follow the anchoring, including the upward flip near the viewport edge.

Row states: hover uses the mode-aware --color-hover wash (it lightens under dark, never darkens); a leading icon sits one rung below the label (--muted), and on hover both label and icon step up to --color-text-strong, the max foreground tier. Selection keeps the accent pair (--color-accent-soft / --color-accent-hover); danger keeps its own colour.

Menu · dropdown menu
Open file
Selected item
Disabled item
Delete chat

SegmentedControl

Mutually exclusive short option groups, commonly used for 2–5 option switches such as "light / dark / follow system" or the four font-scale steps. Options may include a 14px registry icon or a colour swatch. A single raised indicator with a soft shadow (no border — the edge stays clean) slides and resizes between options using the standard motion tokens. Three sizes: md (default, settings pages), sm (compact rows), and xs (dense menus such as the composer model dropdown — 20px items, 12px labels).

SegmentedControl
LightDarkFollow system

SecondaryModelPicker

Linked model + thinking-effort picker (settings → Agent → Subagents, experimental; components/settings/SecondaryModelPicker.vue, shared by both ends). Use it whenever two choices are only valid as a pair — here an effort is meaningless without its model, and every model declares a different supported set. It is a cascading variant of the §03 Select: the trigger is the Select trigger verbatim (value renders model · effort, the unset state uses the placeholder tint), and the dropdown opens as a SINGLE-LEVEL model list (grouped by provider) on the floating menu surface (--color-menu-bg / --p-menu-backdrop / --shadow-lg). The menu teleports to <body> with position: fixed — it opens on top of the settings modal (on the --z-modal-dropdown rung), and only a body-level surface escapes the dialog's scrolling-body clip; it re-anchors to the trigger on any outside scroll and closes on window resize (the UserMenu teleport's full recipe). Hovering or clicking a model row flies its effort submenu out to the RIGHT of the row — same menu surface, anchored to the row's live position, flipping to the left only near the viewport edge per the §03 anchoring rules — with a 250ms hover-intent grace (the UserMenu flyout's recipe) so the diagonal path into the submenu doesn't collapse it. Every model row carries a trailing chevron-right affordance; clicking an effort confirms the pair and closes — one atomic write, never two staggered patches. Flyout options follow the composer's thinking-level model (segmentsFor): effort models get off + their declared levels (always-thinking ones get no off), boolean-thinking models get on/off, unsupported models get off alone; while no effort is set at all, a "Model default" entry leads (it writes the model alone — POST /config merges and cannot clear a stored effort, so the entry disappears once one is set). A configured effort the model no longer declares is appended as an extra flyout option so the current pair stays visible and re-selectable. Keyboard mirrors the Select contract (focus stays on the trigger, Esc preventDefaults so the hosting dialog does not close): ↑/↓ move within the active level (the flyout follows model moves), → opens the flyout, ← collapses it, Enter confirms, Home/End jump. ARIA: combobox trigger → dialog menu holding a model listbox plus the effort listbox flyout with option rows. The menu itself flips upward when the trigger sits near the viewport bottom.

Tabs

Tabs with a bottom hairline, used for grouping and switching sibling content. The current tab is marked with accent text + an accent underline.

Tabs
GeneralAgentAdvanced

Switch

A two-state switch for settings that take effect immediately. The 36×20 track has a 0.5px hairline and full radius; its 16px knob uses 1.5px internal offsets so the visible inset remains 2px and symmetric after accounting for the border. On hover, the knob eases to an 18px rounded rectangle towards the track centre. When on, the track turns accent and the knob slides right.

Switch

Checkbox

A 17×17 checkbox. When checked it fills with the accent color and shows a white tick (inline SVG). Often paired with a text label.

Checkbox

Avatar

A 32px default avatar with md radius; .sm is 24px. Can hold an initial or an icon; falls back to this placeholder when there is no image.

Avatar
KK

EmptyState

A centered placeholder for empty lists / panels: a 48px faint icon + title + hint, avoiding blank pages.

EmptyState
No chats yet
Click "New chat" to start a conversation with Kimi

Divider

A 0.5px hairline divider (--p-line); .p-divider-v is the vertical divider, used between inline elements.

Divider
Content above

Content below
kimi-k2thinking

Tooltip

A CSS-only hover hint, wrapped in .p-tip. Inverted background (--p-text / --p-bg), single line, no wrapping — carries only short notes.

Tooltip (hover the button)
New chat

Banner

An inline notice bar placed at the top of a content area. Three states — .info / .warning / .danger — each with a matching 18px icon.

Banner
Connected to server
Currently in yolo mode; tool calls will run automatically

Sheet / BottomSheet

A mobile bottom slide-up panel: xl top radius + drag handle, xl shadow. At ≤640px, dialogs become bottom-anchored Sheets.

BottomSheet
Choose a model
kimi-k2 · thinking
kimi-k2 · instant

Skeleton

A placeholder for loading content, using a breathing opacity animation (no gradients), following the no-gradient-text rule. Composed into titles / text lines / avatars.

Skeleton

Command Bar

An inline combination of "primary action + command text + copy", sitting between a button and a code block — used for install / onboarding / one-click execution. The primary action reuses Button primary; the command area uses a mono light-grey background.

Command Bar
curl -fsSL https://code.kimi.com/install.sh | bash

TopBar

The application top bar. Solid by default; the .frost variant is translucent + background blur, used only for sticky navigation bars. Together with the floating menu surfaces (Menu / Dropdown), it is one of the two exceptions to the no-glassmorphism rule (see §06).

TopBar · solid / frosted glass
Solid TopBar
Frosted-glass TopBar · .frost

Find Bar · transcript search

The in-transcript find bar (Cmd/Ctrl+F), implemented by components/chat/TranscriptSearch.vue. A floating card pinned to the transcript's top-right (top: --panel-head-h + --space-3, right: --space-3 — equal inset on both axes), --z-sticky, raised surface + 0.5px hairline + --shadow-menu. One radius for both states: --radius-2xl is a full capsule at the collapsed height and a card once the footer expands — never animate between two radii.

PartRule
Input rowSearch icon (muted) + bare input — the list-style bare-input exception family (sidebar search row, inline rename), NOT the boxed Input primitive; the 38px bordered control would break the pill. Circular close IconButton sm (concentric with the capsule end); a 0.5px hairline separator before it. Height comes from the grid: 32px control (--space-8) + 2× --space-1 padding = 40px — at which --radius-2xl is exactly the half-height capsule.
Footer (results)Expands via the 0fr→1fr grid fold (--duration-slow), hairline top separator, prev/next IconButton sm left, right-aligned muted count (N/M results · --ui-font-size-sm). Only exists once a query has settled — while typing or empty, the bar stays a bare pill.
Statescollapsed (empty query) / searching (Spinner sm in the input row during the ~800ms debounce) / results / no-results (count reads "No results", nav disabled). Disabled is uniformly opacity:.5.
FocusComposer-style: a neutral hairline overlay (::after + --color-composer-focus-line) fading in on :focus-within. No accent ring.
Match inkCSS Custom Highlight API — the bar mutates no transcript DOM. All matches: --color-search-match (yellow); current: --color-search-match-current + a 2px --color-warning outline ring (a positioned overlay — highlight pseudos can't paint box outlines). Tokens live in web-ui/style.css with light/dark pairs.
KeyboardCmd/Ctrl+F opens + focuses (repeat = re-focus + select-all; hardcoded, reserved in the desktop keymap), Enter / Shift+Enter steps matches (wrapping), Esc closes from ANY control inside (container-level, so it never reaches the conversation's Esc-abort).
Matching semanticsRendered transcript DOM only (unloaded older pages are out of scope), capped at 1000 matches (count reads N/1000+). Matches span inline nodes within one block, never cross block breaks; inert and display:none content is excluded. Stepping scrolls the match's own rect into view, not its parent element.

SectionLabel

A small group title for sidebar lists, used to section the content below (such as Workspaces in the sidebar). Spec: 13px / 700 / uppercase / letter-spacing .08em, color --color-fg-faint; left-aligned to the row's starting padding (--sb-pad-x), keeping the same indent as the group rows below. For scripts without case (such as Chinese), text-transform:uppercase simply has no effect — no special handling needed.

',55)),t("div",sa,[a[26]||(a[26]=t("div",{class:"stage-bar"},[t("span",{class:"st"},"Sidebar · group title")],-1)),t("div",oa,[a[25]||(a[25]=t("div",{class:"p-section-label",style:{padding:"12px 16px 4px"}},"Workspaces",-1)),t("div",ia,[(o(),i("svg",na,[...a[21]||(a[21]=[t("path",{fill:"currentColor",d:"M4 5v14h16V7h-8.414l-2-2zm8.414 0H21a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h7.414z"},null,-1)])])),a[22]||(a[22]=e(" kimi-code-web ",-1))]),t("div",la,[(o(),i("svg",ra,[...a[23]||(a[23]=[t("path",{fill:"currentColor",d:"M4 5v14h16V7h-8.414l-2-2zm8.414 0H21a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h7.414z"},null,-1)])])),a[24]||(a[24]=e(" playground ",-1))])])])]),t("section",ca,[a[39]||(a[39]=d('
04

Chat Interface Overhaul

The message stream is the core of Kimi Web. Tool calls render as quiet activity lines — one borderless line per call, bespoke per tool kind, auto-grouped, expanding on demand — while Question / Approval elevate to a floating neutral surface because they need a decision, and the Swarm composite keeps a card; the Composer collapses into a single rounded container.

Unified message stream

User-message bubbles follow the kimiwork production recipe (MessageItem .user-bubble): a neutral --color-user-bubble-bg fill (BubbleGray — #f5f5f5 light / #292929 dark), uniform --radius-lg corners, no border, no shadow.

Message timestamps use 12px UI text at weight 500, matching the compact metadata scale without switching to a monospace face.

The user-message metadata row sits one 8px spacing step below the bubble, so its actions and timestamp read as supporting information rather than part of the bubble edge.

Overlong user messages clamp at 10 measured lines, the tail dissolving through an alpha mask rather than a tint overlay (the translucent accent fill would double-composite); a floating pill toggle centred on the fade expands in place and collapses back, and the collapse pins the toggle itself so the reading position survives. Skill / plugin command args clamp through the same wrapper, beside the card head. Like the transcript's other disclosure controls (thinking row, turn fold, tool lines), the toggle is a bare native button carrying aria-expanded — chat-surface disclosure controls do not use the §03 Button primitive.

The floating jump-to-latest control uses 12px UI text at weight 525, led by the full down-arrow icon rather than a disclosure caret.

Thinking is an inline, borderless disclosure row in the message stream — never a side panel. The k15 bulb (the thinking registry icon) leads the row in every state; while streaming the "Thinking…" label breathes (opacity only, never a gradient shimmer) and whole elapsed seconds tick beside it, afterwards the label settles to "Thinking process" with the final span as · Ns (renderer-measured, live sessions only — history shows no seconds). Collapsed by default, it expands in place with the standard grid-rows animation and a 90° chevron rotation, and it folds itself back once the stream moves past it, even if the user expanded mid-stream. The header only animates its text colour on hover (standard duration and easing tokens), no card shell.

Conversation · 760px reading column
Please change the login endpoint to JWT and add the corresponding unit tests.
🌔Analyzing the auth module…
Read 2 files
Readsession.tssrc/auth · :12-4534 lines
12 export function verify(token: string) {
13 return jwt.verify(token, getSecret());
14 }
Readmiddleware.tssrc/auth58 lines
Editmiddleware.tssrc/auth+12−4
Search"jwt.verify"src/auth4 results

I looked at the structure of src/auth; it is currently based on a session cookie. The scope of the change is below — once you confirm, I'll start.

A decision needs your confirmation
How long should the JWT expiry be? Default 7 days, refresh token 30 days.
Write permission required
About to modify src/auth/middleware.ts, 42 lines changed. Allow?
Replace session with JWT signing
Refactor the auth middleware
Add unit tests

Wide markdown tables (desktop): regular chat prose stays within the 760px reading column (--p-content-max), and tables stay there too by default — an overflowing table scrolls horizontally inside its own wrapper, so the page and the chat area never scroll sideways. A clipped table shows a gradient fade at its truncated right edge, and hovering the table reveals a small widen button at its top-right corner; clicking it lets the table grow naturally with its content up to 1040px (--p-table-max), centred within the conversation pane, and clicking again restores the default width. At the default width a single column is capped at 36% of the pane; once widened the cap relaxes to 700px (--p-table-cell-max), so long cell content wraps inside the cell instead of stretching the table. The conversation outline (TOC) keeps its usual position just outside the reading column; when a widened table grows past it and scrolls under the rail, the TOC is hidden temporarily and returns as soon as the table leaves, without touching the user's TOC setting. On mobile a table never breaks out of the reading column.

Tool calls: quiet activity lines, bespoke per tool

High-frequency calls like read / bash / grep are "operational noise" — boxed, collapsible cards quickly drown out the conversation. Tool calls therefore render as one quiet borderless line in the message stream — never a card — and each tool kind composes that line for its own content, so the stream reads like an activity log rather than a pile of widgets. The three visual-weight tiers:

Three visual-weight tiers
① Tool line · lightest (default) — bespoke content per tool, no card chrome
Runpnpm run build && pnpm lint0.8s
② Activity run · medium (consecutive quiet activity — thinking + tool lines — folds to one smart-summary row)
Read 3 files
③ Sub Agent identity card · one per delegation — task title + agent type; the whole card opens the side panel (no in-stream expansion, never grouped)
分析双引擎架构Explore
④ Decision card · heavy (only question / approval, needs user input)
Write permission required
About to modify src/auth/middleware.ts, 42 lines changed.
',15)),t("div",va,[a[31]||(a[31]=t("div",{class:"stage-bar"},[t("span",{class:"st"},"Turn files summary · a real TurnFilesSummary (fixed sample)")],-1)),t("div",fa,[t("div",pa,[c(A,{changes:C,cwd:ya,onOpenDiff:u,onOpenFile:u})])])]),a[40]||(a[40]=d('
Tool Call · quiet lines (expand on demand)
Read 2 files
Readsession.tssrc/auth · :12-4534 lines
12 export function verify(…
Readmiddleware.tssrc/auth58 lines
Editmiddleware.ts+12−4

Decision cards · Question / Approval

The two attention cards replace the composer in the dock and share one contract: a floating neutral shell (--color-surface-raised + hairline + --radius-lg + --shadow-menu), a plain dark 16px title head, and a hairline footer whose actions read in number-key order with exactly one accent primary. There is no semantic colour band — the floating card itself is the "needs a decision" signal.

Plan review · pinned option rows, second-line descriptions
按这份 plan 开始实现?
The plan markdown scrolls in a capped area; the approaches are pinned below it — label on the first line, full description always on the second. The number chip doubles as the keyboard hint.
1方案 A:静态徽章零依赖、渲染稳定,升级时需手动同步版本号。
2方案 B:动态徽章版本自动同步免维护,但要求仓库公开可访问。

Composer

Unified into a single raised container: --radius-composer (32px) with --corner-shape-composer: superellipse(1.5) and a stable 0.5px edge. Focus crossfades a low-chroma line-and-accent edge over --duration-slow with --ease-in-out, while the neutral shadow stays unchanged — there is no added halo and no layout shift. The textarea uses text-autospace: normal for mixed CJK and Latin input. Toolbar controls use a quiet 32px full-round geometry with 8px edge inset; the send button remains a standard 32px circle, with its glyph at 28px (--composer-send-icon-size, the production kimi.com size; it sits outside the --p-ic-* scale on purpose).

Fill and edge tokens: the card's fill and rest border are their own tokens — --color-composer-bg and --color-composer-line — running the kimiwork / kimi.com production input recipe (.chat-input__shell): fill = groupedBackground.secondary (#ffffff light / #1f1f1f dark), rest border = separator.s1 (13% black / 12% white), focus line = fills.f4 (25% in both schemes), and --shadow-input = effect.shadow.inputDefault (0 5px 16px -4px rgba(0,0,0,0.07), kept identical in dark — the hairline carries the edge there). Only colours sit in the tokens; the 32px superellipse shape and the focus-only edge overlay are unchanged.

Send button tokens: the send circle runs on --color-send-bg / --color-send-bg-hover / --color-send-icon (+ *-disabled, --opacity-send-disabled, --shadow-send[-hover]), following the production recipe (.chat-input__send): a neutral labels.primary fill (90% black light / 84% white dark, hover #252525 / 84.8%) with the production lift shadow (0 7px 16px -13px 38% + 0 1px 2px 7%, one step larger on hover), a groupedBackground.secondary glyph, and a disabled state of the same vocabulary — fills.f2 fill with a labels.quaternary glyph at full opacity. The button is disabled exactly when submit would no-op — an empty draft with no ready attachment (image-only sends stay enabled), an upload in flight, or the starting spinner — so disabled is a first-class persistent state, never a fade.

Layering, anchors, and motion: the dock normally stays at --z-sticky so the Latest Messages pill can remain visible above its veil. While any Composer popup is open, the dock temporarily joins --z-dropdown, ensuring permission, work-mode, and model menus always paint above that pill. The permission menu's left edge and the model menu's right edge each follow their own trigger pill. All three menus use --shadow-menu and the same trigger-corner pop motion as Session Row menus: 0.97 scale with a 2px shift toward the trigger, --duration-base on entry, and --duration-fast on exit.

Attachment strip: attachments hang inside the composer card above the textarea as two grouped rows — images/videos as shared MediaThumb rounded thumbnails, files as the shared AttachmentChip pill — the same pair the sent bubble renders, so a draft looks exactly like the sent message. File-store videos render a static play tile instead of fetching a first frame. The strip caps at two thumbnail rows and scrolls beyond that instead of pushing the input down; while overflowing, a quiet count badge pins to the bottom-left and new attachments auto-scroll into view (to the end of whichever group grew). With two or more attachments, a one-click clear-all pins to the strip's top-right corner as a quiet 22px badge (trash glyph, danger on hover). The composer's pending preview and the bubble's media clicks open the same MediaLightbox preview, which owns Escape via the shared dialog stack: images go through PhotoSwipe (lib/mediaPreview.ts) and zoom out of the clicked thumbnail (scrim = --color-scrim-strong, caption = --color-text-on-scrim), videos keep the custom modal.

',11)),t("div",ha,[a[38]||(a[38]=t("div",{class:"stage-bar"},[t("span",{class:"st"},"Composer")],-1)),t("div",ua,[t("div",ga,[a[36]||(a[36]=t("div",{class:"p-composer-ta ph"},"Message Kimi, / to run a command, @ to reference a file…",-1)),t("div",ba,[t("div",ma,[a[33]||(a[33]=t("button",{class:"p-icon-btn"},[t("svg",{class:"p-ic",viewBox:"0 0 24 24",fill:"currentColor"},[t("path",{fill:"currentColor",d:"M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"})])],-1)),t("span",wa,[c(f(h),{name:"shield-question",size:"sm"}),a[32]||(a[32]=e("yolo",-1))]),a[34]||(a[34]=t("span",{class:"p-pill"},[t("svg",{class:"p-ic",viewBox:"0 0 24 24",fill:"currentColor"},[t("path",{fill:"currentColor",d:"M8 4h13v2H8zM4.5 6.5a1.5 1.5 0 1 1 0-3a1.5 1.5 0 0 1 0 3m0 7a1.5 1.5 0 1 1 0-3a1.5 1.5 0 0 1 0 3m0 6.9a1.5 1.5 0 1 1 0-3a1.5 1.5 0 0 1 0 3M8 11h13v2H8zm0 7h13v2H8z"})]),e("plan")],-1))]),a[35]||(a[35]=d('
kimi-k2· thinking
',1))])]),a[37]||(a[37]=d('
kimi-code-web
',1))])]),a[41]||(a[41]=d('
i
Site-wide consistency: the composer uses one 32px superellipse shell and one 32px desktop control height. Attachment, permission, modes, compact, and model controls are all full-round and transparent at rest; hover reveals a neutral wash, open/active may use accent-soft, and Send remains the sole persistent filled control — an inverted --color-text fill with a --color-bg glyph (never the accent), disabled while the input is empty or an upload is in flight. The transparent dock floats over the transcript, while the scrolling content receives bottom padding equal to the live dock height so its final item can still clear the composer. Composer chrome is not selectable; only the message input permits text selection. Each permission mode has its own registry icon — manual hand, yolo shield-question, auto full-access — paired with the label in the pill (collapsing to the accessible icon below a 620px composer container) and leading its dropdown row in the mode's colour, with the current row's check trailing the row's end. The right toolbar is the flexible region: the model pill shrink-wraps its content, then shrinks and truncates internally only when the toolbar runs out of room. The dock's workbar above the composer carries one pill vocabulary — 32px high with --space-4 inline padding and stadium-shaped (--radius-full) corners, a --color-surface fill (one rung above the page in both schemes — sunken is degenerate in dark — the same material as the popover it opens), and the system hairline edge (0.5px at --color-line-strong, one rung up for presence; no shadow), icon + label + a count or status — for background bash tasks, background sub-agents, todos, and the goal alike; a pill toggles the shared work panel (itself at --radius-xl with the same 0.5px --color-line-strong edge outside — inner separators stay --color-line — and the menu panel's --shadow-menu), and the goal's detail (full objective, completion criterion) fills the panel body while its pause / resume / cancel controls ride the panel head (the decision cards' action vocabulary — exactly one accent primary, resume while paused; secondary pause while active; danger-soft cancel) and the meta counts (turns / tokens / time / budget) sit in a hairline footer — never a separate full-width strip.

Workspace attachment card: on the empty session, the workspace picker is a separate attachment card tucked under the composer — and the composer card itself stays complete (its own 0.5px border, --radius-composer corners with --corner-shape-composer, and shadow are never altered). The attachment lives inside the composer's padding box as the card's sibling, so its width always matches; its top --space-4 slides behind the card (the card is raised to --z-sticky), its square top edge stays hidden, and only the rounded bottom (0 0 --radius-xl --radius-xl) shows. Background --color-hover at 60% via color-mix (≈0.03 black in light, self-adapting in dark), no border, no shadow. Inside sits one quiet capsule trigger: transparent, --radius-full, 16px leading icon and 12px label at weight 475 in --color-text-muted; hover deepens to --color-selected and the label turns --color-text. The dropdown follows the §03 menu spec and is viewport-aware (flips above when more room, clamps max-height to the scrollport); at --z-dropdown it outranks both the card and the fixed click-outside backdrop (--z-sticky), which renders outside the composer because the card's container-type captures position: fixed descendants.

Responsive

See §02 --p-bp-sm for the breakpoint. This section only gives mobile-adaptation pointers for the chat interface; a full mobile mockup is out of scope for this spec.

i
At ≤640px: dialogs anchor to the bottom as Sheets (xl top radius, top drag handle), the sidebar collapses into an expandable drawer, the Composer toolbar is allowed to wrap, and the chat reading column drops its max-width to fill the screen.
',5))]),a[43]||(a[43]=d('
05

Theming

Kimi Web uses one unified theme: the same components, fonts, radii, shadows, and surfaces — theming only swaps color values. Every semantic color token ships a light value in :root and a dark override in the data-color-scheme blocks; the semantic status colors (success / warning / danger) are independent palettes, one set each for light / dark.

Accent

The app has one accent: the brand blue (--color-accent, #1783ff light / #58a6ff dark). Use it sparingly — the accent is reserved for the primary action, focus rings, links, and active marks (current tab, toggles); large fills always come from the neutral surface tokens. Selection that means "where I am" (sidebar rows, list pickers) is deliberately NOT accent-tinted — it uses --color-selected so it reads as location, not as an action.

Light / dark mode

Each semantic token ships a light value in :root and a dark override in the two data-color-scheme blocks (explicit choice, or following the OS preference via prefers-color-scheme). Switching light / dark simply swaps between these two sets of derived tokens, with zero structural change.

Benefits of one theme: components, fonts, radii, and surfaces are consistent site-wide; a single accent keeps the brand identity unambiguous; light / dark mode works out of the box; semantic status colors are independently tunable.
06

Style Rules

Anti-pattern rules that all UI code must follow. These rules are also the basis of the check-style detection script, one-to-one with a warning.

Rule IDWhat it detectsAction
no-gradient-textgradient text / gradient backgroundForbidden
no-glassmorphismbackdrop-filter: blur (TopBar sticky nav bar and menu surfaces via --p-menu-backdrop are the exceptions)TopBar + menus exempt
no-color-glowcolored / large-radius box-shadow glowForbidden
no-emoji-iconusing emoji as a functional icon (no exceptions). Emoji inside user content — session titles, messages — is not chrome and is out of scope (see §07 Session row's emoji icon)Forbidden
no-hardcoded-hexunregistered hex color inside a component <style>Warning
no-hardcoded-fonthard-coded font-family in a component (e.g. 'Inter') instead of var(--font-ui)Warning
radius-from-scaleradius value not in {4,6,8,12,16,20,999}Warning
z-from-scalez-index using an unregistered large numberWarning
weight-from-scalefont-weight not in {400,500}Warning

State matrix

Every interactive primitive should define the following states where applicable; missing ones are flagged by the style rules. focus-visible always uses --p-focus-ring (appears only on keyboard focus, see §08); disabled is uniformly opacity:.5.

StateButtonInputCardMenu itemSwitch
default
hover
active / pressed
focus-visible
disabled
loading
selected / active
error
readonly

Chat working indicator

The chat working state ("prompt sent, turn unfinished") is a brand signature of Kimi Web, rendered uniformly by the WorkingIndicator component: the 小蓝 mascot plus a phase label — "Requesting…" until the assistant's reply starts, "Working…" once it is streaming. All other loading states (including ActivityNotice) use the plain Spinner.

Glassmorphism exemption

backdrop-filter: blur is banned site-wide, with two exceptions: the .frost variant of TopBar — only in the one place of the "sticky navigation bar", used to stay readable over scrolling content — and the floating menu surfaces (Menu.vue, the Select listbox, composer dropdowns, slash/mention popups), which go through the --color-menu-bg / --p-menu-backdrop token pair so the recipe stays single-sourced. No other component (card, dialog, Toast, panel) may use glassmorphism; violations are flagged under no-glassmorphism, and menu blur with ad-hoc values (anything but the token) is flagged too. Persistent panels that stay open over scrolling content (the dock work panel) deliberately stay opaque — a live backdrop blur re-samples the scrolling page every frame and janks in Chromium.
07

App Shell & Sidebar

The structural spec for the app shell (three-column grid + right preview panel) and the left session sidebar. These are business-agnostic "skeletons" — components, fonts, radii, and surfaces are reused from §02 / §03, but layout and alignment have their own conventions.

Layout grid

On web it is a single-row 5-track grid: the sidebar and the right panel each occupy a permanent auto track, with the conversation column in the middle; two 0-width tracks are for the ResizeHandles. (The desktop app adds a second row for its terminal panel — desktop-only, see below.)

App.vue · .app
grid-template-columns: auto 0 minmax(0, 1fr) 0 auto;\n    /*         sidebar ↑    ↑handle  ↑conversation  ↑handle ↑right panel (auto) */
TokenValueUsage
sidebar width270px default (adjustable)expanded sidebar width, changed by dragging the ResizeHandle; should approach §02's --p-sidebar-w (264px)
--preview-w460pxwidth of the right preview panel when open
--panel-head-h48pxunified height for all right panel heads + the conversation column head; both use a 0.5px bottom hairline
--p-bp-sm640px≤640 switches to a mobile single column (top bar + conversation), no sidebar / handle / right panel

Sidebar alignment system (--sb-*)

All sidebar rows (group head, session row, New chat, search, and Settings buttons) share 4 custom properties. Their 16px icon slots and --sb-gap place every label on the same x-axis as the workspace name.

TokenValueUsage
--sb-inset12pxrow box (hover/selected pill) inset from the sidebar edges — matches the brand header's 12px padding
--sb-pad-x20pxcontent start x (= --sb-inset + 8px row padding)
--sb-gutter16pxleading icon slot width — matches the workspace folder icon so the session title aligns under the workspace name
--sb-gap8pxgap between the icon slot and the text
i
The session title's starting x = --sb-pad-x + --sb-gutter + --sb-gap. The group head has a folder icon and the session row has a status slot; both icons are the same width and position, so the titles align naturally.

Sidebar structure

The sidebar from top to bottom: brand header → action group → pinned head (pinned section + "Workspaces" label) → scrolling grouped list (workspace head + session rows) → user-menu footer. New chat and Search are direct sibling controls in the same grid container; the optional new-workspace action shares the first row, while Search spans the next row. A 4px gap keeps Search clear of the scroll boundary. The pinned head sits OUTSIDE the scroll container (the action-group / footer pattern — never position: sticky, which would need an opaque plate over the frosted tint), so the pinned sessions and the "Workspaces" label stay put while the workspace groups scroll beneath; the pinned section is collapsible (a chevron on its label, revealed on hover/focus and kept visible while folded; state persisted) so a long pinned set can't eat the sidebar, and it re-expands when a new session is pinned. Both pinned edges use three light near, middle and far fades across 18px, entering over 260ms only while more session content exists beyond that edge — the top seam lives at the pinned head's bottom border. The footer seam is a 0.5px hairline. Controls reuse the §03 primitives as much as possible. The sidebar sits on --color-sidebar-bg (one step off --color-bg: warm off-white just under white in light, one step BELOW the page in dark — the session column reads as its own plane, and with dark elevation = lighter the chrome never sits brighter than the conversation pane; the hairline still separates it from the pane). Vertical rhythm: the brand header keeps 12px padding (on macOS desktop the left padding grows to 80px to clear the traffic lights); rows inside the action group stack flush (0 gap, same rhythm as the list rows); adjacent groups are separated by 12px. The search glyph has a -0.5px optical correction to align its visual centre with the label. Row hover uses --sb-hover (= the global --color-hover wash); the selected row uses the lighter --sb-selected wash derived from --color-selected — On macOS desktop the sidebar is instead frosted: the window carries a native NSVisualEffectView ('menu' vibrancy, following the in-app scheme via the nativeTheme mirror, its state pinned to inactive so the material keeps its flat pressed-down colour — ≈ #282829 dark / #E7E7E7 light — with no active/inactive drift) and the sidebar column drops --color-sidebar-bg for a single translucent --color-sidebar-tint wash that presses the pinned material one step — ≈ #282829 → ≈ #1e1e1f in dark (rgba(0,0,0,0.25)), ≈ #E7E7E7 → ≈ #f1f1f1 in light (rgba(255,255,255,0.4)) — with header and footer staying transparent so the tint reads as one uniform pane; the root chain (html/body/#app/.app) stays unpainted only under the macos-desktop + vibrancy flags — the latter is the Settings → Appearance accessibility switch (default on; persisted main-side so the window is created with the right material, and live-applied on toggle): off repaints the root chain and the sidebar falls back to opaque --color-sidebar-bg, while the traffic-light layout keeps keying off macos-desktop alone — while the conversation pane, chat header and right preview keep their own opaque surfaces. The list's hover-icon clusters (session-row kebab, group-head actions) paint NOTHING there — no plate, no wash, no blur (real backdrop blur does not even render over this window: Chromium's backdrop sampler returns a flat wash above the transparent BrowserWindow + vibrancy view). Instead the row's title/name dissolves before it ever reaches the buttons: a two-stage mask-image fade — a subtle 16px dissolve at rest, extending over the cluster zone only while the actions are revealed (row hover / keyboard focus / menu open): 34px on session rows (the pin+kebab cluster overhangs the title by ≈25px), 68px on group heads (the floating cluster is ≈60px wide). The fade is zone-based, so short rows render untouched, and text-overflow becomes clip so a long tail dissolves instead of dotting.

BlockUseNote
Brand headerlogo + name + collapse IconButton (right-aligned)on Windows / web the brand is left and the collapse IconButton sm is right-aligned inside the header; the dev-only backend version/address pill uses the UI font, not monospace; the logo is animated (a blinking eye). On macOS desktop the header is a bare drag strip (brand hidden, traffic lights + resident floating toggle over it)
New chatfull-width left-aligned button (custom)500-weight label; same rhythm as the session rows in the list (left-aligned, hover = --sb-hover). Do not use Button (centered, breaks the rhythm)
Searchbare search row (custom)500-weight label; no border, hover/focus shows the faint --color-hover wash; icon + label, with the Kbd keycaps (⌘K / Ctrl K) pushed to the trailing edge — label and shortcut are justified apart. Do not use Input (the 38px bordered version is too heavy). It is a direct sibling of New chat in the action group
Section label.p-section-labeluppercase muted small titles like "Workspaces", using --weight-section-label (600)
Pinned headfixed block above the scroll container (.sessions-head): the pinned section (PinnedSessionList.vue) + the "Workspaces" section labelstays put while the workspace groups scroll; owns the top scroll-linked seam (hairline + fade, only while scrolled). The pinned section folds via its label chevron (persisted, kimi-web.pinned-collapsed) and re-expands only on an explicit pin (never on load backfill); the expanded rows are capped at 40vh with their own scroll so a long pinned set can't push the list or footer out of view
Workspace head / session rowsee next two sectionsshare --sb-* alignment
User-menu footeraccount area (components/UserMenu.vue) opening an upward §03 menupinned row under the session list, separated by a 0.5px --line hairline; trigger keeps the same list-style family as New chat (24px round avatar + nickname when signed in, user icon + sign-in hint otherwise). The menu box follows the trigger's left edge and width (ResizeObserver-tracked, so it survives a sidebar resize) and is teleported to body because the column's container-type would capture position:fixed. Rows: plan usage / theme / language are macOS-style hover flyout submenus — the parent row carries the module icon, a faint current value and a fixed chevron-right, and hovering (or moving focus to the parent row, or pressing Enter / Space / → on it) opens a teleported panel anchored to the parent menu's right edge (content-adaptive width floored by the menu's own min-width and capped at the parent menu's width; flips left near the viewport edge) with a 250ms hover-intent close grace; the usage panel shows weekly + 5h rows (percent values with severity colours), while the theme (three schemes) and language (two locales) panels move the check to the picked option without closing the menu — then the upgrade entry below the top plan level, settings (with an always-visible Kbd keycap shortcut hint on desktop) and a confirming sign-out; all menu icons come from the Kimi set
!
Why New chat / search / inline rename don't use Button / Input: they are "list-style" controls (full-width, left-aligned, compact, borderless), while Button is centered and Input is a 38px bordered control — forcing them in would break the sidebar's visual density and alignment. This is an intentional custom exception, not an oversight.

Session row

A session row is an inset rounded pill, structured as: status slot → title → time → attention Badge → hover actions (pin / archive).

PartRule
Containerpadding: 8px 8px inside the list's --sb-inset gutter, radius-sm; no fixed/min height — row height is font-driven (title line-height: --leading-tight, ≈16px) → ≈32px total, the sidebar-wide row rhythm. The hover actions are absolutely positioned so they never force the row taller (no hover jitter). hover = --sb-hover (the global --color-hover wash); active = --sb-selected (75% of the global selected wash) — neutral, no accent tint, no border, no weight change
Status slot (lead)fixed --sb-gutter width; running = Spinner sm, otherwise unread = 7px accent dot
Titleflex:1 with truncation and user-select:none; double-click enters inline rename (compact input, not Input), whose text remains selectable
Emoji iconthe session icon is the title's LEADING emoji cluster (web-core splitSessionEmoji — no icon field; every client renders the title as-is). The emoji is an ordinary title character — no decoration at rest or on hover (it stays a <button> for a11y), and clicking it opens SessionEmojiPicker — a Menu-shelled panel (bare list-style search row → scrollable sections: Recently used persisted in localStorage (cap 8) + the grouped emoji dataset, with remove/random as MenuItems in the footer; a query swaps the sections for keyword-search results), teleported + fixed + --z-dropdown, popping from the trigger corner like the right-click menu. The menu's "Set Emoji…" opens the same picker and is the discoverable path. Inline rename edits the whole title — the emoji is an ordinary character in the input
Timemono xs, fg-faint; yields to the hover actions on hover
Attention BadgeBadge sm: info (needs answer) / warning (needs approval) / danger (aborted)
Hover actionsIconButton sm × 2 — pin + archive — cross-faded over the time on row hover (no kebab button). Right-clicking the row opens the full menu (copy ID / rename / emoji / fork / export / pin / archive + timestamp) anchored to the cursor, except over the inline rename input, where the native text-editing menu stays
Flat-style variant (flat list + pinned section)the sidebar's flat list rows AND — always, regardless of view mode — the pinned section's rows differ from the grouped row in three ways (all keyed off the facade projecting cwdLabel): ① no leading status slot — the title is left-aligned at the row's content edge; ② a second line under the title: folder-closed icon sm + the cwd's final directory name (- when the session has no cwd), xs faint like the time — except the icon, which takes --color-text-muted (one rung stronger, the same optical compensation as the group head's folder; the open-folder glyph's thin back-flap washed out at 14px) — rest-width tail mask fade; when the session has an associated PR (v2 git domain), a quiet chip (git-pull-request icon + #number) sits at the line's right edge, state-colored the GitHub way (open = --color-success, merged = --color-done purple, closed = faint) and opens the PR on click; ③ the first line's right side shows status — attention Badges anchored to the row's right edge, running Spinner, unread dot — INSTEAD of the time, which only renders when there is nothing to report (the Spinner yields to the attention pills: a session waiting for approval/answer never shows both); on hover the actions cross-fade IN as the whole status cluster fades OUT — pills and pin/archive never co-exist (grouped rows keep pills visible on hover). Height stays font-driven — the pill just grows the line. Grouped rows never set cwdLabel and keep the classic structure. The flat ↔ grouped switch lives in a dropdown on the SESSIONS section label (fixed list-settings icon + hover tooltip; the menu opens with a muted group label, per-view icons, and the current view checked at the row's right edge; mode persisted per device)
Archiveno confirm — the hover archive button / menu item archives immediately, then App.vue shows the §03 ActionToast (top-center) with Undo (restores the session) and Settings (opens the archived list)

Workspace group

The group head and session rows share --sb-*: folder icon (open/closed) → name, with the kebab and "+" revealed on hover.

Show more & collapse

The "expand / collapse" controls at the bottom of each workspace group are compact list controls (same family as search, New chat, inline rename — not Buttons) sharing one row: expand (chevron-down) first, collapse (chevron-up) after a faint middot when both are present. Expanding reveals the next batch of sessions, fetching the next page from the server only when the locally loaded rows can't cover it — the control never exposes whether a reveal came from memory or the network.

PartRule
Rowa single flex row holding the controls, all content-width — hover washes just the button as a snug pill, never the full row. Font-driven height (≈32px like a session row), radius-sm; hover = --sb-hover (no text recolor); :focus-visible uses --p-focus-ring
Chevronsm (down = expand, up = collapse); the row indents by --sb-gutter + --sb-gap so the first button's chevron starts exactly at the session-title x, lining the control's leading edge up with the titles above
Labelfont-ui, text-xs, --color-text-muted; truncated
Separatorfaint middot (--color-text-faint) with --space-1 side margins, rendered only when both controls are present
Behavioreach group keeps a display cap starting at the first page; "Show more" steps it up by one batch (5) and fetches the next page only when the loaded rows fall short (busy = "Loading…", disabled); "Show less" resets the cap to the first page (view-layer trim — data is kept, no refetch). "Show more" exists while undisplayed loaded rows remain or the server has more; "Show less" appears once past the first page

ResizeHandle

A 4px grab strip layered over the 1px column border (margin: 0 -2px makes the whole 4px grabbable) with a centred 2px indicator bar. The bar stays transparent at rest and shows the neutral fills one step up the ramp — f2 on hover, f3 while the drag is live (the sidebar column is translucent on macOS, so f1 read too faint) — never the accent.

RuleValue
Width / cursor4px strip, 2px bar / col-resize mid-range; w-resize / e-resize at the drag limits (hints the direction that still resizes)
Normal / hover / dragtransparent / --color-selected (f2) / --color-line-strong (f3) — the neutral ramp one step up, never accent
Layer--z-dropdown, above pane-level sticky chrome (chat dock at --z-sticky) so the overhang stays visible and grabbable
Behaviorpanel width follows the pointer 1:1 while dragging (the parent disables transitions to avoid lag); on release it is persisted to localStorage

Right panel

The right panels (file preview / Diff / compaction summary / sub-agent / side chat) share one track and one head primitive.

Bottom terminal panel (desktop-only)

The native terminal (components/terminal/) sits in the conversation column's own bottom grid slot — the sidebar and the right panel span BOTH rows and keep full height (the VS Code layout: the panel belongs to the editor area, not to the whole window). Its height transitions 0 ↔ var(--terminal-h) (260px default, 120 min, 60% viewport max; persisted), squeezing the conversation column above instead of overlaying it. The panel mounts lazily on first open and then stays mounted so xterm scrollback survives a collapse.

i
One-sentence principle: the sidebar / shell is a "list + grid" skeleton that reuses the §02 tokens and §03 primitives (Button / IconButton / Badge / Kbd / Menu / Spinner / PanelHeader); compact list controls that don't fit a primitive (search, New chat, inline rename, show-more) keep their custom form, governed by this section.
08

Accessibility (pragmatic edition)

Kimi Web is a local developer tool; it does not target a specific WCAG conformance level, nor maintain a full screen-reader QA matrix. This section collects only the rules that are "low-cost, don't hurt the look, and directly benefit keyboard-heavy users", as the baseline contract for each primitive; the more expensive, lower-ROI parts (such as real-time announcement orchestration for streaming output) are not mandatory for now.

i
On the "ugly" focus ring: the focus visibility required below always uses :focus-visible (not :focus). It appears only on keyboard focus; mouse clicks don't trigger it, so it doesn't pollute the mouse-driven visual; the ring's strength is tuned uniformly with --p-focus-ring, not overridden per place.

1. Contrast & color

2. Keyboard operable

Anything doable with a mouse must also be doable with a keyboard; Tab order follows the DOM, with no invented skipping. Composite controls define their keyboard model per the table below; a missing model is treated as incomplete:

ControlKeyboard behavior
DialogTab cycles within the dialog (focus trap); Esc closes; focus returns to the trigger element after closing.
Menu / move the highlight, Enter selects, Esc closes.
Tabs / switch tabs (roving tabindex); only the current tab is in the Tab sequence.
Switch / Segmented / or Space / Enter to toggle.

3. Focus visibility

4. Labels & semantics

5. Target size

Desktop click targets ≥ 32px; touch devices ≥ 44px (consistent with the §01 principle and the IconButton lg tier).

6. Reduced motion

Handled uniformly in the global styles per §02's @media (prefers-reduced-motion: reduce); components do not check this individually. The chat working indicator's mascot renders its static fallback.

7. Live announcements (non-mandatory)

Screen-reader announcements are not a mandatory contract in this product. Short hints like Toast can use role="status" / aria-live; chat streaming output is currently not announced word-by-word, which is an acceptable trade-off, to be added later if a real need arises.

Explicitly not mandatory for now: a WCAG conformance-level claim, a complete ARIA pattern table, a per-screen-reader QA matrix, and real-time announcement orchestration for streaming output — these are not written into the primitive contract, to avoid becoming slogans no one maintains.
09

Dialogs

Every overlay in the app — pickers, browsers, managers, confirmations — is built on the single §03 Dialog primitive. This chapter fixes the two layout anatomies allowed inside that frame, plus the row and footer contracts that make all dialogs read as one family. Do not hand-roll a third anatomy.

The frame (recap)

All dialogs share the §03 primitive: --radius-xl radius, --shadow-xl shadow, a restrained 28% neutral backdrop, a head (title + IconButton close), a body, and a right-aligned foot. Widths md 440 / lg 640 / xl 760 and auto / fixed height are chosen per §03. One interruptive overlay at a time; Esc closes; focus is trapped and restored. A blocking flow that must be resolved rather than dismissed (server token) uses hideClose with closeOnOverlay/closeOnEsc off — never a hand-written overlay.

Anatomy A — padded (forms & confirmations)

The default: the body carries its own padding and the caller drops content straight in. Confirmations put their Buttons in the #foot slot (right-aligned, cancel → confirm). Used by: confirm, login, status panel, server token.

Anatomy B — flush (pickers & browsers)

:padded="false" with height="fixed"; the consumer owns the zone layout inside a full-height column. The zones below are the whole vocabulary — a picker dialog composes them and adds nothing else. Used by: model picker, session search, folder browser, provider manager.

ZoneContract
SearchThe boxed §03 Input, inset 22px so its edge aligns with the head title. Autofocus on open. No leading icon, no borderless variant.
Filter chipsOptional. 28px pill: transparent + muted text by default, --color-hover on hover, --color-selected + medium --color-text when active. Horizontally scrollable with the scrollbar hidden. Never a row of Buttons.
Listflex:1, owns the vertical scrolling, padded 4px 8px so rows bleed near the dialog edge. role="listbox"; rows carry role="option" + aria-selected.
Row8px 12px padding, --radius-md. Two quiet lines: name 14/20 (medium when current) and a meta line 12/18 in --color-text-faint — provider · context · capability labels, dot-separated. No badge rows, no raw-id line (search still matches them). Trailing slot: check icon (current row only), then the star IconButton.
Row statesHover / keyboard-selected → --color-hover; current → --color-selected — a neutral "where I am" fill, never an accent tint, never an inset stroke. The star stays hidden until row hover, keyboard selection, or starred; it is always visible on touch devices and colored --star when starred.
State rowsLoading / unavailable / empty: centered on both axes, muted 14px; warning color only for the unavailable case.
Shortcut barThe footer: full-bleed, padding 8px 16px, border-top --color-line, left-aligned. Keyboard hints are Kbd keycaps + 12px --color-text-faint labels, groups separated by "·", the whole bar aria-hidden. An instructional sentence (folder browser) reuses the same bar without keycaps.

Keyboard & behavior contract

Dialog map

DialogAnatomyComposition
Model pickerflush · lg · fixedsearch + provider chips + model rows + shortcut bar
Session searchflush · lg · fixedsearch + result rows + shortcut bar
Folder browserflush · lg · fixedbreadcrumb bar + filter bar + folder rows + actions + hint bar
Provider managerflush · xl · fixedmanagement rows with inset dividers (rows are not selectable) + add section + shortcut bar
Confirm / Login / Statuspadded · md · autotitle + message or form + right-aligned foot
App update (desktop)padded · lg · autoversion title + quiet meta line (release date · current version) + height-capped scrolling what's-new list / progress bar + right-aligned action row (skip → download, later → restart) with the auto-download checkbox right-aligned on its own foot row below (a pure preference for future checks)
Server tokenpadded · md · autohideClose, no Esc/overlay close — resolved only by a valid token
Settingsflush · xl · fixedpage-like exception: side-nav region, per §03
Onboarding wizardnot a Dialogfull-page takeover (not built on §03): one centered column (brand lockup → step content → ghost actions + centered primary CTA); selectable options share the option-card pattern — 0.5px --color-line hairline, --color-accent border + --color-accent-soft fill when selected
Design intent: a picker dialog should feel like a quiet command palette — one boxed search, calm rows, a neutral "you are here" fill, and a predictable shortcut bar. Anything noisier — badge clouds, accent-selected rows, per-dialog footer inventions — is a regression to weed out.
',5))])])])]))}}),Sa=M(ka,[["__scopeId","data-v-043da7f5"]]);export{Sa as default}; diff --git a/apps/kimi-code/dist-web/assets/DesignSystemView-BOdJHjg1.css b/apps/kimi-code/dist-web/assets/DesignSystemView-BOdJHjg1.css deleted file mode 100644 index 1a12c8304d..0000000000 --- a/apps/kimi-code/dist-web/assets/DesignSystemView-BOdJHjg1.css +++ /dev/null @@ -1 +0,0 @@ -.ds-page[data-v-be77961e]{--d-bg: var(--color-bg);--d-surface: var(--color-surface);--d-surface-2: var(--color-surface-sunken);--d-surface-3: var(--color-line);--d-fg: var(--color-text);--d-fg-soft: var(--color-text-muted);--d-fg-muted: var(--color-text-muted);--d-fg-faint: var(--color-text-faint);--d-line: var(--color-line);--d-line-2: var(--color-line);--d-accent: var(--color-accent);--d-accent-2: var(--color-accent-hover);--d-accent-soft: var(--color-accent-soft);--d-accent-bd: var(--color-accent-bd);--d-green: var(--color-success);--d-green-soft: var(--color-success-soft);--d-amber: var(--color-warning);--d-amber-soft: var(--color-warning-soft);--d-red: var(--color-danger);--d-red-soft: var(--color-danger-soft);--d-violet: var(--color-done);--d-code-bg: var(--color-surface-sunken);--d-sidebar: var(--color-surface);--d-shadow-sm: var(--shadow-sm);--d-shadow-md: var(--shadow-md);--d-shadow-lg: var(--shadow-lg);--sidebar-w: var(--p-sidebar-w);--content-max: var(--p-content-wide)}.ds-page[data-v-be77961e] *,.ds-page[data-v-be77961e] *:before,.ds-page[data-v-be77961e] *:after{box-sizing:border-box}.ds-page[data-v-be77961e]{scroll-behavior:smooth}.ds-page[data-v-be77961e]{margin:0;background:var(--d-bg);color:var(--color-text);font-family:var(--font-ui);font-size:var(--text-base);line-height:1.65;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}h1[data-v-be77961e],h2[data-v-be77961e],h3[data-v-be77961e],h4[data-v-be77961e]{color:var(--d-fg);letter-spacing:-.01em;line-height:1.25;margin:0}p[data-v-be77961e]{margin:0 0 14px;color:var(--d-fg-soft)}a[data-v-be77961e]{color:var(--d-accent-2);text-decoration:none}a[data-v-be77961e]:hover{text-decoration:underline}code[data-v-be77961e],pre[data-v-be77961e],.mono[data-v-be77961e]{font-family:JetBrains Mono,ui-monospace,SF Mono,Menlo,Consolas,monospace}code[data-v-be77961e]{background:var(--d-code-bg);border:.5px solid var(--d-line-2);border-radius:5px;padding:1px 6px;font-size:.88em;color:#1f2937;white-space:nowrap}.layout[data-v-be77961e]{display:grid;grid-template-columns:var(--sidebar-w) minmax(0,1fr);min-height:100vh}.sidebar[data-v-be77961e]{position:sticky;top:0;align-self:start;height:100vh;background:var(--d-sidebar);border-right:.5px solid var(--d-line);padding:26px 22px;overflow-y:auto}.brand[data-v-be77961e]{display:flex;align-items:center;gap:10px;margin-bottom:6px}.brand-mark[data-v-be77961e]{width:26px;height:26px;border-radius:7px;flex:none;background:var(--d-fg);color:#fff;display:grid;place-items:center;font-weight:800;font-size:14px;letter-spacing:-.04em}.brand-name[data-v-be77961e]{font-weight:700;font-size:15px;letter-spacing:-.01em}.brand-sub[data-v-be77961e]{font-size:12px;color:var(--d-fg-faint);margin-bottom:26px;padding-left:36px}.nav-group[data-v-be77961e]{margin:22px 0 8px;font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--d-fg-faint)}.p-section-label[data-v-be77961e]{font-size:12px;font-weight:600;text-transform:uppercase;color:var(--d-fg-faint)}.nav a[data-v-be77961e]{display:flex;align-items:center;gap:9px;padding:7px 10px;border-radius:7px;font-size:13.5px;font-weight:500;color:var(--d-fg-soft);margin:1px 0;transition:background .15s,color .15s}.nav a .num[data-v-be77961e]{font-family:JetBrains Mono,monospace;font-size:11px;color:var(--d-fg-faint);width:18px}.nav a[data-v-be77961e]:hover{background:var(--color-hover);color:var(--d-fg);text-decoration:none}.nav a.active[data-v-be77961e]{background:var(--color-hover);color:var(--d-fg)}.nav a.active .num[data-v-be77961e]{color:var(--d-fg-soft)}.content[data-v-be77961e]{min-width:0}.content-inner[data-v-be77961e]{max-width:var(--content-max);margin:0 auto;padding:64px 56px 120px}section[data-v-be77961e]{scroll-margin-top:32px;padding-top:8px}section+section[data-v-be77961e]{margin-top:72px}.hero[data-v-be77961e]{padding:8px 0 40px;border-bottom:.5px solid var(--d-line);margin-bottom:56px}.eyebrow[data-v-be77961e]{display:inline-flex;align-items:center;gap:8px;font-family:JetBrains Mono,monospace;font-size:12px;font-weight:600;letter-spacing:.04em;color:var(--d-fg);background:#1783ff1a;border:none;padding:6px 12px;border-radius:8px;margin-bottom:22px}.hero h1[data-v-be77961e]{font-size:48px;font-weight:600;line-height:1.08;letter-spacing:-.025em;margin-bottom:18px}.hero h1 .grad[data-v-be77961e]{color:var(--d-accent)}.hero p.lead[data-v-be77961e]{font-size:18px;line-height:1.6;color:var(--d-fg-soft);max-width:680px}.hero-meta[data-v-be77961e]{display:flex;flex-wrap:wrap;gap:10px;margin-top:28px}.meta-chip[data-v-be77961e]{display:inline-flex;align-items:center;gap:8px;font-size:12.5px;color:var(--d-fg-muted);background:var(--d-surface);border:.5px solid var(--d-line);border-radius:8px;padding:7px 12px}.meta-chip b[data-v-be77961e]{color:var(--d-fg);font-weight:600}.meta-chip .dot[data-v-be77961e]{width:7px;height:7px;border-radius:50%;background:var(--d-green)}.sec-head[data-v-be77961e]{display:flex;align-items:baseline;gap:14px;margin-bottom:8px}.sec-num[data-v-be77961e]{font-family:JetBrains Mono,monospace;font-size:13px;font-weight:600;color:var(--d-accent-2)}.sec-title[data-v-be77961e]{font-size:26px;letter-spacing:-.02em}.sec-desc[data-v-be77961e]{font-size:15.5px;color:var(--d-fg-muted);max-width:720px;margin-bottom:28px}h3.sub[data-v-be77961e]{font-size:17px;margin:40px 0 14px;display:flex;align-items:center;gap:10px}h3.sub[data-v-be77961e]:before{content:"";width:4px;height:16px;border-radius:2px;background:var(--d-accent)}h4.mini[data-v-be77961e]{font-size:13px;text-transform:uppercase;letter-spacing:.06em;color:var(--d-fg-muted);margin:24px 0 12px}.stat-grid[data-v-be77961e]{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:24px 0}.stat[data-v-be77961e]{background:var(--d-surface);border:.5px solid var(--d-line);border-radius:14px;padding:18px 18px 16px}.stat .v[data-v-be77961e]{font-size:34px;font-weight:800;letter-spacing:-.03em;line-height:1;color:var(--d-fg)}.stat .v small[data-v-be77961e]{font-size:16px;color:var(--d-fg-muted);font-weight:600}.stat .l[data-v-be77961e]{font-size:12.5px;color:var(--d-fg-muted);margin-top:8px;line-height:1.4}.stat.warn[data-v-be77961e]{background:var(--d-amber-soft);border-color:#f0d9b8}.stat.warn .v[data-v-be77961e]{color:var(--d-amber)}.stat.bad[data-v-be77961e]{background:var(--d-red-soft);border-color:#f0cccc}.stat.bad .v[data-v-be77961e]{color:var(--d-red)}.stat.good[data-v-be77961e]{background:var(--d-green-soft);border-color:#bfe3cc}.stat.good .v[data-v-be77961e]{color:var(--d-green)}.panel[data-v-be77961e]{background:var(--d-bg);border:.5px solid var(--d-line);border-radius:16px;box-shadow:var(--d-shadow-sm)}.panel-pad[data-v-be77961e]{padding:22px}.panel-soft[data-v-be77961e]{background:var(--d-surface);border:.5px solid var(--d-line);border-radius:14px}.callout[data-v-be77961e]{display:flex;gap:12px;padding:14px 16px;border-radius:12px;font-size:14px;line-height:1.55;background:var(--d-surface);border:.5px solid var(--d-line);color:var(--d-fg-soft);margin:18px 0}.callout .ico[data-v-be77961e]{flex:none;width:20px;height:20px;border-radius:6px;display:grid;place-items:center;font-size:12px;font-weight:800}.callout.info[data-v-be77961e]{background:var(--d-accent-soft);border-color:var(--d-accent-bd)}.callout.info .ico[data-v-be77961e]{background:var(--d-accent);color:#fff}.callout.warn[data-v-be77961e]{background:var(--d-amber-soft);border-color:#f0d9b8}.callout.warn .ico[data-v-be77961e]{background:var(--d-amber);color:#fff}.callout.good[data-v-be77961e]{background:var(--d-green-soft);border-color:#bfe3cc}.callout.good .ico[data-v-be77961e]{background:var(--d-green);color:#fff}table.dt[data-v-be77961e]{width:100%;border-collapse:collapse;font-size:13.5px;margin:16px 0}table.dt th[data-v-be77961e]{text-align:left;font-size:11.5px;text-transform:uppercase;letter-spacing:.05em;color:var(--d-fg-faint);font-weight:700;padding:10px 12px;border-bottom:.5px solid var(--d-line)}table.dt td[data-v-be77961e]{padding:11px 12px;border-bottom:.5px solid var(--d-line-2);color:var(--d-fg-soft);vertical-align:middle}table.dt tr:last-child td[data-v-be77961e]{border-bottom:none}table.dt td.tk[data-v-be77961e]{font-family:JetBrains Mono,monospace;font-size:12.5px;color:var(--d-fg);white-space:nowrap}table.dt td.val[data-v-be77961e]{font-family:JetBrains Mono,monospace;font-size:12px;color:var(--d-fg-muted)}.swatch[data-v-be77961e]{display:inline-block;width:16px;height:16px;border-radius:4px;border:.5px solid rgba(0,0,0,.08);vertical-align:-3px;margin-right:8px}.palette[data-v-be77961e]{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:16px 0}.color-card[data-v-be77961e]{border:.5px solid var(--d-line);border-radius:12px;overflow:hidden;background:var(--d-bg)}.color-chip[data-v-be77961e]{height:56px;border-bottom:.5px solid var(--d-line)}.color-meta[data-v-be77961e]{padding:10px 12px 12px}.color-meta .cn[data-v-be77961e]{font-size:13px;font-weight:600;color:var(--d-fg)}.color-meta .cv[data-v-be77961e]{font-family:JetBrains Mono,monospace;font-size:11.5px;color:var(--d-fg-muted);margin-top:2px}.type-row[data-v-be77961e]{display:flex;align-items:baseline;gap:18px;padding:13px 0;border-bottom:.5px solid var(--d-line-2)}.type-row[data-v-be77961e]:last-child{border-bottom:none}.type-sample[data-v-be77961e]{flex:1;color:var(--d-fg);line-height:1.2}.type-meta[data-v-be77961e]{width:190px;flex:none;text-align:right;font-family:JetBrains Mono,monospace;font-size:12px;color:var(--d-fg-muted)}.space-row[data-v-be77961e]{display:flex;align-items:center;gap:16px;padding:10px 0;border-bottom:.5px solid var(--d-line-2)}.space-row[data-v-be77961e]:last-child{border-bottom:none}.space-bar[data-v-be77961e]{height:18px;border-radius:4px;background:linear-gradient(90deg,var(--d-accent),var(--d-accent-2));flex:none}.space-meta[data-v-be77961e]{font-family:JetBrains Mono,monospace;font-size:12.5px;color:var(--d-fg-soft);width:150px}.space-use[data-v-be77961e]{font-size:12.5px;color:var(--d-fg-muted)}.radius-grid[data-v-be77961e]{display:flex;flex-wrap:wrap;gap:22px;align-items:flex-end;margin:16px 0}.radius-item[data-v-be77961e]{display:flex;flex-direction:column;align-items:center;gap:10px}.radius-box[data-v-be77961e]{width:64px;height:64px;border:.5px solid var(--d-accent);background:var(--d-accent-soft)}.radius-item .rl[data-v-be77961e]{font-family:JetBrains Mono,monospace;font-size:12px;color:var(--d-fg-soft)}.stage-wrap[data-v-be77961e]{border:.5px solid var(--d-line);border-radius:16px;overflow:hidden;margin:18px 0;background:var(--d-bg);box-shadow:var(--d-shadow-sm)}.stage-bar[data-v-be77961e]{display:flex;align-items:center;justify-content:space-between;padding:10px 14px;border-bottom:.5px solid var(--d-line);background:var(--d-surface)}.stage-bar .st[data-v-be77961e]{font-size:13px;font-weight:600;color:var(--d-fg);display:flex;align-items:center;gap:8px}.stage-bar .st .tag[data-v-be77961e]{font-size:10.5px;font-weight:700;letter-spacing:.04em;padding:2px 7px;border-radius:999px}.tag.after[data-v-be77961e]{background:var(--d-green-soft);color:var(--d-green)}.tag.before[data-v-be77961e]{background:var(--d-red-soft);color:var(--d-red)}.tag.spec[data-v-be77961e]{background:var(--d-accent-soft);color:var(--d-accent-2)}.stage-bar .sactions[data-v-be77961e]{display:flex;gap:6px}.tab[data-v-be77961e]{font-family:JetBrains Mono,monospace;font-size:11.5px;padding:4px 10px;border-radius:6px;color:var(--d-fg-muted);cursor:default}.tab.on[data-v-be77961e]{background:var(--d-bg);color:var(--d-fg);border:.5px solid var(--d-line)}.stage[data-v-be77961e]{padding:32px;display:flex;flex-wrap:wrap;align-items:center;gap:16px;background:radial-gradient(circle at 1px 1px,rgba(0,0,0,.045) 1px,transparent 0) 0 0 / 18px 18px,var(--d-surface)}.stage.col[data-v-be77961e]{flex-direction:column;align-items:stretch}.stage.dark[data-v-be77961e]{background:radial-gradient(circle at 1px 1px,rgba(255,255,255,.06) 1px,transparent 0) 0 0 / 18px 18px,#0d1117}.stage-label[data-v-be77961e]{width:100%;font-size:11.5px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--d-fg-faint);margin-bottom:-6px}.stage.dark .stage-label[data-v-be77961e]{color:#6b7280}.ba[data-v-be77961e]{display:grid;grid-template-columns:1fr 1fr;gap:0;border:.5px solid var(--d-line);border-radius:16px;overflow:hidden;margin:18px 0;box-shadow:var(--d-shadow-sm)}.ba-col[data-v-be77961e]{min-width:0}.ba-col+.ba-col[data-v-be77961e]{border-left:.5px solid var(--d-line)}.ba-head[data-v-be77961e]{display:flex;align-items:center;justify-content:space-between;padding:11px 16px;border-bottom:.5px solid var(--d-line)}.ba-head.before[data-v-be77961e]{background:var(--d-red-soft)}.ba-head.after[data-v-be77961e]{background:var(--d-green-soft)}.ba-head .bh[data-v-be77961e]{font-size:13px;font-weight:700}.ba-head.before .bh[data-v-be77961e]{color:var(--d-red)}.ba-head.after .bh[data-v-be77961e]{color:var(--d-green)}.ba-head .bh small[data-v-be77961e]{font-weight:500;opacity:.7;margin-left:6px}.ba-body[data-v-be77961e]{padding:24px;background:var(--d-surface);min-height:120px}.ba-col.after .ba-body[data-v-be77961e]{background:#fff}.code[data-v-be77961e]{background:#0d1117;border-radius:12px;overflow:hidden;margin:16px 0;border:.5px solid #1c2128}.code-bar[data-v-be77961e]{display:flex;align-items:center;gap:8px;padding:9px 14px;background:#13181e;border-bottom:.5px solid #1c2128}.code-bar .d[data-v-be77961e]{width:10px;height:10px;border-radius:50%;background:#30363d}.code-bar .fn[data-v-be77961e]{font-family:JetBrains Mono,monospace;font-size:11.5px;color:#8b949e;margin-left:4px}.code pre[data-v-be77961e]{margin:0;padding:18px;overflow-x:auto;font-size:12.5px;line-height:1.7;color:#c9d1d9}.code .c[data-v-be77961e]{color:#8b949e}.code .k[data-v-be77961e]{color:#ff7b72}.code .s[data-v-be77961e]{color:#a5d6ff}.code .p[data-v-be77961e]{color:#79c0ff}.code .n[data-v-be77961e]{color:#d2a8ff}.code .v[data-v-be77961e]{color:#ffa657}.pill[data-v-be77961e]{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:600;padding:3px 9px;border-radius:999px;border:.5px solid var(--d-line);background:var(--d-surface);color:var(--d-fg-soft)}.pill.blue[data-v-be77961e]{background:var(--d-accent-soft);border-color:var(--d-accent-bd);color:var(--d-accent-2)}.pill.green[data-v-be77961e]{background:var(--d-green-soft);border-color:#bfe3cc;color:var(--d-green)}.pill.amber[data-v-be77961e]{background:var(--d-amber-soft);border-color:#f0d9b8;color:var(--d-amber)}.pill.red[data-v-be77961e]{background:var(--d-red-soft);border-color:#f0cccc;color:var(--d-red)}.pill.mono[data-v-be77961e]{font-family:JetBrains Mono,monospace}ul.clean[data-v-be77961e]{list-style:none;padding:0;margin:14px 0}ul.clean li[data-v-be77961e]{position:relative;padding:8px 0 8px 26px;color:var(--d-fg-soft);border-bottom:.5px solid var(--d-line-2)}ul.clean li[data-v-be77961e]:last-child{border-bottom:none}ul.clean li[data-v-be77961e]:before{content:"";position:absolute;left:4px;top:17px;width:7px;height:7px;border-radius:50%;background:var(--d-accent)}ul.clean.check li[data-v-be77961e]:before{content:"✓";background:none;color:var(--d-green);font-weight:800;top:7px;left:0;font-size:14px}ul.clean.cross li[data-v-be77961e]:before{content:"✕";background:none;color:var(--d-red);font-weight:800;top:7px;left:0;font-size:13px}ul.clean li b[data-v-be77961e]{color:var(--d-fg)}ul.clean li .path[data-v-be77961e]{font-family:JetBrains Mono,monospace;font-size:12px;color:var(--d-fg-muted)}.roadmap[data-v-be77961e]{position:relative;margin:24px 0}.phase[data-v-be77961e]{position:relative;display:grid;grid-template-columns:120px 1fr;gap:24px;padding:0 0 32px}.phase[data-v-be77961e]:not(:last-child):after{content:"";position:absolute;left:59px;top:36px;bottom:0;width:2px;background:var(--d-line)}.phase-tag[data-v-be77961e]{text-align:right;padding-top:4px}.phase-tag .pt[data-v-be77961e]{display:inline-block;font-family:JetBrains Mono,monospace;font-size:12px;font-weight:700;color:var(--d-accent-2);background:var(--d-accent-soft);border:.5px solid var(--d-accent-bd);padding:5px 10px;border-radius:8px}.phase-tag .pe[data-v-be77961e]{font-size:11.5px;color:var(--d-fg-faint);margin-top:8px}.phase-body[data-v-be77961e]{background:var(--d-bg);border:.5px solid var(--d-line);border-radius:14px;padding:18px 20px;box-shadow:var(--d-shadow-sm)}.phase-body h4[data-v-be77961e]{font-size:16px;margin-bottom:8px}.phase-body p[data-v-be77961e]{font-size:14px;margin-bottom:12px}.phase-body ul[data-v-be77961e]{margin:0}.matrix[data-v-be77961e]{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:16px 0}.anti[data-v-be77961e]{border:.5px solid var(--d-line);border-radius:12px;padding:16px;background:var(--d-bg)}.anti .ah[data-v-be77961e]{display:flex;align-items:center;gap:9px;font-size:14px;font-weight:700;margin-bottom:8px}.anti .ah .verdict[data-v-be77961e]{margin-left:auto;font-size:11px;font-weight:800;padding:2px 8px;border-radius:999px}.verdict.pass[data-v-be77961e]{background:var(--d-green-soft);color:var(--d-green)}.verdict.fail[data-v-be77961e]{background:var(--d-red-soft);color:var(--d-red)}.verdict.warn[data-v-be77961e]{background:var(--d-amber-soft);color:var(--d-amber)}.anti p[data-v-be77961e]{font-size:13px;margin:0;color:var(--d-fg-muted)}.footer[data-v-be77961e]{margin-top:80px;padding-top:28px;border-top:.5px solid var(--d-line);font-size:13px;color:var(--d-fg-faint);display:flex;justify-content:space-between;flex-wrap:wrap;gap:12px}.kbd[data-v-be77961e]{font-family:JetBrains Mono,monospace;font-size:11px;background:var(--d-surface-2);border:.5px solid var(--d-line);border-radius:5px;padding:1px 6px}@media(max-width:980px){.layout[data-v-be77961e]{grid-template-columns:1fr}.sidebar[data-v-be77961e]{position:static;height:auto}.nav[data-v-be77961e]{display:flex;flex-wrap:wrap;gap:4px}.content-inner[data-v-be77961e]{padding:40px 22px 80px}.stat-grid[data-v-be77961e]{grid-template-columns:repeat(2,1fr)}.ba[data-v-be77961e]{grid-template-columns:1fr}.ba-col+.ba-col[data-v-be77961e]{border-left:none;border-top:.5px solid var(--d-line)}.palette[data-v-be77961e]{grid-template-columns:repeat(2,1fr)}.matrix[data-v-be77961e]{grid-template-columns:1fr}}.ds-page .p[data-v-be77961e],.ds-page .stage.p-skin[data-v-be77961e],.ds-page [data-p][data-v-be77961e]{--p-font-sans: var(--font-ui);--p-font-kbd: var(--font-kbd);--p-font-mono: var(--font-mono);--p-bg: var(--color-bg);--p-surface: var(--color-surface);--p-surface-raised: var(--color-surface-raised);--p-surface-overlay: var(--color-surface-overlay);--p-surface-sunken: var(--color-surface-sunken);--p-well: var(--color-well);--p-surface-deep: var(--color-surface-deep);--p-hover: var(--color-hover);--p-text: var(--color-text);--p-text-strong: var(--color-text-strong);--p-muted: var(--muted);--p-text-muted: var(--color-text-muted);--p-text-faint: var(--color-text-faint);--p-text-on-accent: var(--color-text-on-accent);--p-line: var(--color-line);--p-line-strong: var(--color-line-strong);--p-accent: var(--color-accent);--p-accent-hover: var(--color-accent-hover);--p-accent-soft: var(--color-accent-soft);--p-user-bubble-bg: var(--color-user-bubble-bg);--p-accent-bd: var(--color-accent-bd);--p-success: var(--color-success);--p-success-soft: var(--color-success-soft);--p-success-bd: var(--color-success-bd);--p-warning: var(--color-warning);--p-warning-soft: var(--color-warning-soft);--p-warning-bd: var(--color-warning-bd);--p-danger: var(--color-danger);--p-danger-soft: var(--color-danger-soft);--p-danger-bd: var(--color-danger-bd);--p-info: var(--color-info);--p-sp-1: var(--space-1);--p-sp-2: var(--space-2);--p-sp-3: var(--space-3);--p-sp-4: var(--space-4);--p-sp-5: var(--space-5);--p-sp-6: var(--space-6);--p-sp-8: var(--space-8);--p-r-xs: var(--radius-xs);--p-r-sm: var(--radius-sm);--p-r-md: var(--radius-md);--p-r-lg: var(--radius-lg);--p-r-xl: var(--radius-xl);--p-r-composer: var(--radius-composer);--p-r-full: var(--radius-full);--p-corner-composer: var(--corner-shape-composer);--p-sh-xs: var(--shadow-xs);--p-sh-sm: var(--shadow-sm);--p-sh-menu: var(--shadow-menu);--p-sh-md: var(--shadow-md);--p-sh-input: var(--shadow-input);--p-sh-lg: var(--shadow-lg);--p-sh-xl: var(--shadow-xl);--p-font-size-xs: var(--text-xs);--p-font-size-sm: var(--text-sm);--p-font-size-base: var(--text-base);--p-font-size-md: var(--text-base);--p-font-size-lg: var(--text-lg);--p-font-size-xl: var(--text-xl);--p-font-size-2xl: var(--text-2xl);--p-leading-tight: var(--leading-tight);--p-leading-normal: var(--leading-normal);--p-leading-relaxed: var(--leading-relaxed);--p-ease: var(--ease-out);--p-ease-inout: var(--ease-in-out);--p-dur-fast: var(--duration-fast);--p-dur: var(--duration-base);--p-dur-slow: var(--duration-slow);--p-composer-focus-line: var(--color-composer-focus-line);font-family:var(--font-ui);color:var(--color-text);font-size:var(--text-base)}[data-p=dark][data-v-be77961e]{--p-bg: #0d1117;--p-surface: #13181e;--p-surface-raised: #1c2128;--p-surface-sunken: #0d1117;--p-well: #13181e;--p-surface-deep: #0a0d12;--p-surface-overlay: #22272e;--p-hover: #ffffff0d;--p-text: #e8eaed;--p-text-strong: #ffffff;--p-muted: #727983;--p-text-muted: #9aa0a8;--p-text-faint: #6b7280;--p-line: #2d333b;--p-line-strong: #3d444d;--p-accent: #58a6ff;--p-accent-hover: #79b8ff;--p-accent-soft: rgba(88,166,255,.14);--p-accent-bd: rgba(88,166,255,.28);--p-success: #3fb950;--p-success-soft: rgba(63,185,80,.14);--p-success-bd: rgba(63,185,80,.28);--p-warning: #d29922;--p-warning-soft: rgba(210,153,34,.14);--p-warning-bd: rgba(210,153,34,.28);--p-danger: #f85149;--p-danger-soft: rgba(248,81,73,.14);--p-danger-bd: rgba(248,81,73,.28);--p-sh-sm: 0 1px 2px rgba(0,0,0,.4);--p-sh-md: 0 4px 12px rgba(0,0,0,.45);--p-sh-lg: 0 12px 32px rgba(0,0,0,.55);--p-sh-input: var(--shadow-input);--p-selection: rgba(88,166,255,.32)}.p-ic[data-v-be77961e]{width:16px;height:16px;flex:none;display:inline-block;vertical-align:middle}.p-btn[data-v-be77961e]{--_h: 36px;--_px: 16px;--_fs: var(--p-font-size-base);--_r: var(--p-r-md);display:inline-flex;align-items:center;justify-content:center;gap:8px;height:var(--_h);padding:0 var(--_px);border-radius:var(--_r);font-family:var(--p-font-sans);font-size:var(--_fs);font-weight:600;line-height:1;border:.5px solid transparent;cursor:pointer;white-space:nowrap;transition:background var(--p-dur) var(--p-ease),border-color var(--p-dur) var(--p-ease),color var(--p-dur) var(--p-ease),box-shadow var(--p-dur) var(--p-ease),transform var(--p-dur-fast) var(--p-ease)}.p-btn[data-v-be77961e]:active{transform:scale(.98)}.p-btn[data-v-be77961e]:focus-visible{outline:none;box-shadow:0 0 0 3px var(--p-accent-soft),0 0 0 1px var(--p-accent)}.p-btn .p-ic[data-v-be77961e]{width:16px;height:16px}.p-btn.sm[data-v-be77961e]{--_h: 30px;--_px: 12px;--_fs: var(--p-font-size-sm);--_r: var(--p-r-sm)}.p-btn.sm .p-ic[data-v-be77961e]{width:14px;height:14px}.p-btn.lg[data-v-be77961e]{--_h: 42px;--_px: 20px;--_fs: var(--p-font-size-md);--_r: var(--p-r-lg)}.p-btn.primary[data-v-be77961e]{background:var(--p-accent);color:var(--p-text-on-accent);border-color:var(--p-accent);box-shadow:var(--p-sh-xs)}.p-btn.primary[data-v-be77961e]:hover{background:var(--p-accent-hover);border-color:var(--p-accent-hover)}.p-btn.secondary[data-v-be77961e]{background:var(--p-surface-raised);color:var(--p-text);border-color:var(--p-line-strong);box-shadow:var(--p-sh-xs)}.p-btn.secondary[data-v-be77961e]:hover{background:var(--p-hover);border-color:var(--p-line-strong)}.p-btn.ghost[data-v-be77961e]{background:transparent;color:var(--p-text);border-color:transparent}.p-btn.ghost[data-v-be77961e]:hover{background:var(--p-hover);color:var(--p-text-strong)}.p-btn.danger[data-v-be77961e]{background:var(--p-danger);color:#fff;border-color:var(--p-danger);box-shadow:var(--p-sh-xs)}.p-btn.danger[data-v-be77961e]:hover{filter:brightness(.96)}.p-btn.danger-soft[data-v-be77961e]{background:var(--p-danger-soft);color:var(--p-danger);border-color:var(--p-danger-bd)}.p-btn.danger-soft[data-v-be77961e]:hover{background:var(--p-danger);color:#fff;border-color:var(--p-danger)}.p-btn[disabled][data-v-be77961e],.p-btn.disabled[data-v-be77961e]{opacity:.5;cursor:not-allowed;box-shadow:none;transform:none}.p-icon-btn[data-v-be77961e]{--_s: 32px;display:inline-grid;place-items:center;width:var(--_s);height:var(--_s);flex:none;border-radius:var(--p-r-md);border:.5px solid transparent;background:transparent;color:var(--p-text-muted);cursor:pointer;transition:background var(--p-dur) var(--p-ease),color var(--p-dur) var(--p-ease)}.p-icon-btn[data-v-be77961e]:hover{background:var(--p-hover);color:var(--p-text)}.p-icon-btn[data-v-be77961e]:focus-visible{outline:none;box-shadow:0 0 0 3px var(--p-accent-soft)}.p-icon-btn.sm[data-v-be77961e]{--_s: 26px;border-radius:var(--p-r-sm)}.p-icon-btn.lg[data-v-be77961e]{--_s: 44px}.p-icon-btn .p-ic[data-v-be77961e]{width:16px;height:16px}.p-icon-btn.lg .p-ic[data-v-be77961e]{width:20px;height:20px}.p-badge[data-v-be77961e]{display:inline-flex;align-items:center;gap:6px;height:22px;padding:0 9px;border-radius:var(--p-r-full);font-family:var(--p-font-sans);font-size:var(--p-font-size-xs);font-weight:600;line-height:1;border:.5px solid var(--p-line);background:var(--p-surface);color:var(--p-text);white-space:nowrap}.p-badge.sm[data-v-be77961e]{height:18px;padding:0 7px;font-size:11px}.p-badge .bd[data-v-be77961e]{width:7px;height:7px;border-radius:50%;background:currentColor}.p-badge.neutral[data-v-be77961e]{background:var(--p-surface-sunken);border-color:var(--p-line);color:var(--p-text-muted)}.p-badge.info[data-v-be77961e]{background:var(--p-accent-soft);border-color:var(--p-accent-bd);color:var(--p-accent-hover)}.p-badge.success[data-v-be77961e]{background:var(--p-success-soft);border-color:var(--p-success-bd);color:var(--p-success)}.p-badge.warning[data-v-be77961e]{background:var(--p-warning-soft);border-color:var(--p-warning-bd);color:var(--p-warning)}.p-badge.danger[data-v-be77961e]{background:var(--p-danger-soft);border-color:var(--p-danger-bd);color:var(--p-danger)}.p-badge.solid[data-v-be77961e]{background:var(--p-text);color:var(--p-bg);border-color:var(--p-text)}.p-badge .p-ic[data-v-be77961e]{width:12px;height:12px}.p-kbd[data-v-be77961e]{display:inline-flex;align-items:center;gap:3px}.p-kbd kbd[data-v-be77961e]{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 5px;border:.5px solid var(--p-line);border-radius:var(--p-r-xs);background:transparent;color:inherit;font-family:var(--p-font-kbd);font-size:11px;line-height:1}.p-pill[data-v-be77961e]{display:inline-flex;align-items:center;gap:4px;height:32px;padding:0 12px;border-radius:var(--p-r-full);border:.5px solid transparent;background:transparent;font-family:var(--p-font-sans);font-size:var(--p-font-size-sm);font-weight:500;color:var(--p-text);cursor:pointer;transition:background var(--p-dur) var(--p-ease),color var(--p-dur) var(--p-ease)}.p-pill[data-v-be77961e]:hover{background:var(--p-hover);color:var(--p-text-strong)}.p-pill .pp-strong[data-v-be77961e]{font-weight:700;color:var(--p-text)}.p-pill .pp-sub[data-v-be77961e]{color:var(--p-accent);font-weight:600}.p-pill .p-ic[data-v-be77961e]{width:14px;height:14px;color:var(--p-text-faint)}.p-card[data-v-be77961e]{background:var(--p-surface);border:.5px solid var(--p-line);border-radius:var(--p-r-md);overflow:hidden;color:var(--p-text)}.p-card.interactive[data-v-be77961e]{transition:background var(--p-dur) var(--p-ease),border-color var(--p-dur) var(--p-ease);cursor:pointer}.p-card.interactive[data-v-be77961e]:hover{background:var(--p-surface);border-color:var(--p-line-strong)}.p-card-head[data-v-be77961e]{display:flex;align-items:center;gap:9px;padding:10px 14px;border-bottom:.5px solid var(--p-line);background:var(--p-surface)}.p-card-title[data-v-be77961e]{font-size:var(--p-font-size-sm);font-weight:600;color:var(--p-text);font-family:var(--p-font-mono)}.p-card-body[data-v-be77961e]{padding:14px;font-size:var(--p-font-size-base);color:var(--p-text);line-height:var(--p-leading-normal)}.p-card-foot[data-v-be77961e]{display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:10px 14px;border-top:.5px solid var(--p-line);background:var(--p-surface)}.p-field[data-v-be77961e]{display:flex;flex-direction:column;gap:6px}.p-label[data-v-be77961e]{font-size:var(--p-font-size-sm);font-weight:600;color:var(--p-text)}.p-input[data-v-be77961e],.p-select[data-v-be77961e],.p-textarea[data-v-be77961e]{width:100%;height:38px;padding:0 12px;border-radius:var(--p-r-md);border:.5px solid var(--p-line-strong);background:var(--p-surface-raised);font-family:var(--p-font-sans);font-size:var(--p-font-size-base);color:var(--p-text);box-shadow:var(--p-sh-xs);transition:border-color var(--p-dur) var(--p-ease),box-shadow var(--p-dur) var(--p-ease)}.p-textarea[data-v-be77961e]{height:auto;min-height:84px;padding:10px 12px;resize:vertical;line-height:var(--p-leading-normal)}.p-select[data-v-be77961e]{display:flex;align-items:center;justify-content:space-between;text-align:left}.p-select[data-v-be77961e]:after{content:"⌄";color:var(--p-text-muted)}.p-input[data-v-be77961e]:hover,.p-select[data-v-be77961e]:hover,.p-textarea[data-v-be77961e]:hover{border-color:var(--p-line-strong)}.p-input[data-v-be77961e]:focus,.p-select[data-v-be77961e]:focus,.p-textarea[data-v-be77961e]:focus{outline:none;border-color:var(--p-accent);box-shadow:0 0 0 3px var(--p-accent-soft)}.p-input[data-v-be77961e]::placeholder,.p-textarea[data-v-be77961e]::placeholder{color:var(--p-text-faint)}.p-input.sm[data-v-be77961e]{height:32px;font-size:var(--p-font-size-sm);border-radius:var(--p-r-sm)}.p-hint[data-v-be77961e]{font-size:var(--p-font-size-xs);color:var(--p-text-faint)}.p-dialog[data-v-be77961e]{width:480px;max-width:calc(100vw - 48px);background:var(--p-surface-raised);border:.5px solid var(--p-line);border-radius:var(--p-r-xl);box-shadow:var(--p-sh-xl);overflow:hidden;color:var(--p-text)}.p-dialog-head[data-v-be77961e]{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:20px 22px 14px}.p-dialog-title[data-v-be77961e]{font-size:var(--p-font-size-lg);font-weight:700;letter-spacing:-.01em}.p-dialog-desc[data-v-be77961e]{font-size:var(--p-font-size-base);color:var(--p-text-muted);margin-top:4px;line-height:var(--p-leading-normal)}.p-dialog-body[data-v-be77961e]{padding:4px 22px 18px}.p-dialog-foot[data-v-be77961e]{display:flex;justify-content:flex-end;gap:10px;padding:14px 22px 20px}.p-toast[data-v-be77961e]{display:flex;align-items:flex-start;gap:11px;width:360px;padding:13px 14px;background:var(--p-surface-raised);border:.5px solid var(--p-line);border-radius:var(--p-r-lg);box-shadow:var(--p-sh-md)}.p-toast .ti[data-v-be77961e]{width:20px;height:20px;border-radius:50%;display:grid;place-items:center;flex:none;margin-top:1px}.p-toast.success .ti[data-v-be77961e]{background:var(--p-success-soft);color:var(--p-success)}.p-toast.warning .ti[data-v-be77961e]{background:var(--p-warning-soft);color:var(--p-warning)}.p-toast .tt[data-v-be77961e]{font-size:var(--p-font-size-base);font-weight:600;color:var(--p-text)}.p-toast .td[data-v-be77961e]{font-size:var(--p-font-size-sm);color:var(--p-text-muted);margin-top:2px;line-height:1.45}.p-action-toast[data-v-be77961e]{display:inline-flex;align-items:center;gap:8px;align-self:center;padding:4px 6px 4px 14px;background:var(--p-surface-raised);border:.5px solid var(--p-line);border-radius:var(--p-r-lg);box-shadow:var(--p-sh-sm);font-size:var(--p-font-size-base);color:var(--p-text);white-space:nowrap}.p-action-toast .lk[data-v-be77961e]{border:0;padding:0;background:none;color:var(--p-accent);cursor:pointer;font:inherit}.p-action-toast .x[data-v-be77961e]{color:var(--p-text-muted);width:14px;height:14px}.p-spinner[data-v-be77961e]{width:18px;height:18px;animation:p-spin-be77961e .85s linear infinite}.p-spinner.sm[data-v-be77961e]{width:14px;height:14px}.p-spinner circle[data-v-be77961e]{fill:none;stroke-width:2.2;stroke-linecap:round}.p-spinner .track[data-v-be77961e]{stroke:var(--p-line)}.p-spinner .arc[data-v-be77961e]{stroke:var(--p-accent);stroke-dasharray:56 56;stroke-dashoffset:38}@keyframes p-spin-be77961e{to{transform:rotate(360deg)}}.p-thinking[data-v-be77961e]{display:inline-flex;align-items:center;gap:9px;font-size:var(--p-font-size-sm);color:var(--p-text-muted);font-family:var(--p-font-sans)}.p-bubble-user[data-v-be77961e]{align-self:flex-end;max-width:78%;background:var(--p-user-bubble-bg);border:none;color:var(--p-text);border-radius:var(--p-r-lg);padding:10px 12px;font-size:var(--p-font-size-md);line-height:var(--p-leading-normal)}.p-msg[data-v-be77961e]{max-width:760px;font-size:var(--p-font-size-md);line-height:var(--p-leading-relaxed);color:var(--p-text)}.p-msg p[data-v-be77961e]{margin:0 0 10px;color:var(--p-text)}.p-msg code[data-v-be77961e]{font-family:var(--p-font-mono);background:var(--p-surface-sunken);border:0;color:var(--p-accent-hover);padding:1px 6px;border-radius:5px;font-size:.9em}.p-code[data-v-be77961e]{font-family:var(--p-font-mono);font-size:var(--p-font-size-sm);line-height:1.65;background:var(--p-surface-sunken);border:.5px solid var(--p-line);border-radius:var(--p-r-md);padding:11px 13px;color:var(--p-text);overflow-x:auto}.p-action[data-v-be77961e]{border-radius:var(--p-r-lg);overflow:hidden;border:.5px solid var(--p-line);background:var(--p-surface-raised);box-shadow:var(--p-sh-menu)}.p-action-head[data-v-be77961e]{display:flex;align-items:center;gap:9px;padding:14px 16px 0}.p-action-title[data-v-be77961e]{font-size:var(--p-font-size-base);font-weight:600;color:var(--p-text)}.p-action-body[data-v-be77961e]{padding:12px 16px 0;font-size:var(--p-font-size-base);color:var(--p-text);line-height:var(--p-leading-normal)}.p-action-foot[data-v-be77961e]{display:flex;gap:8px;margin-top:12px;padding:10px 16px;border-top:.5px solid var(--p-line)}.p-opts[data-v-be77961e]{display:flex;flex-direction:column;gap:2px;margin-top:12px;padding:12px 16px;border-top:.5px solid var(--p-line)}.p-opt[data-v-be77961e]{display:flex;align-items:flex-start;gap:10px;padding:8px 12px;border-radius:var(--p-r-md);color:var(--p-text);font-size:var(--p-font-size-base)}.p-opt .n[data-v-be77961e]{width:var(--p-chip-num);height:var(--p-chip-num);margin-top:calc((var(--p-font-size-base) * var(--p-leading-normal) - var(--p-chip-num)) / 2);border-radius:var(--p-r-sm);background:var(--p-surface-sunken);color:var(--p-text);font-size:var(--p-font-size-xs);font-weight:500;display:inline-flex;align-items:center;justify-content:center;flex:none}.p-opt-text[data-v-be77961e]{display:flex;flex-direction:column;gap:2px;min-width:0}.p-opt-text .l[data-v-be77961e]{font-weight:500}.p-opt-text .d[data-v-be77961e]{font-size:var(--p-font-size-xs);color:var(--p-text-muted);line-height:var(--p-leading-normal)}.p-todo[data-v-be77961e]{background:var(--p-surface-raised);border:.5px solid var(--p-line);border-radius:var(--p-r-md);padding:6px}.p-todo-row[data-v-be77961e]{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:var(--p-r-md);font-size:var(--p-font-size-base);color:var(--p-text)}.p-todo-row.done[data-v-be77961e]{color:var(--p-text-faint);text-decoration:line-through}.p-todo-row.active[data-v-be77961e]{background:var(--p-accent-soft);color:var(--p-text)}.p-todo-check[data-v-be77961e]{width:16px;flex:none;display:inline-flex;align-items:center;justify-content:center;user-select:none;color:var(--p-text-faint)}.p-todo-check svg[data-v-be77961e]{width:14px;height:14px}.p-todo-row.active .p-todo-check[data-v-be77961e]{color:var(--p-accent)}.p-todo-row.done .p-todo-check[data-v-be77961e]{color:var(--p-success)}.p-todo-row.active .p-todo-check[data-v-be77961e]{color:var(--p-accent);font-weight:500}.p-dot[data-v-be77961e]{width:7px;height:7px;border-radius:50%;flex:none;background:var(--p-text-faint)}.p-dot.done[data-v-be77961e]{background:var(--p-success)}.p-dot.error[data-v-be77961e]{background:var(--p-danger)}.p-dot.running[data-v-be77961e]{background:var(--p-accent);box-shadow:0 0 0 0 var(--p-accent-soft);animation:p-pulse-be77961e 1.4s ease-out infinite}@keyframes p-pulse-be77961e{0%{box-shadow:0 0 #1783ff66}to{box-shadow:0 0 0 6px #1783ff00}}.p-tool-group[data-v-be77961e]{overflow:hidden}.p-tool-group-head[data-v-be77961e]{display:flex;align-items:center;gap:4px;padding:4px 0;cursor:pointer;border-radius:6px;font-size:var(--p-font-size-sm);line-height:1;color:var(--p-text-faint);user-select:none;transition:color var(--p-dur) var(--p-ease)}.p-tool-group-head .tg-ic[data-v-be77961e]{width:14px;height:14px;color:var(--p-text-faint);flex:none}.p-tool-group-head[data-v-be77961e]:hover{color:var(--p-text)}.p-tool-group-head .tg-title[data-v-be77961e]{font-weight:500}.p-tool-group-head .tg-meta[data-v-be77961e]{color:var(--p-text-faint);font-weight:400}.p-tool-group-head .tg-car[data-v-be77961e]{width:14px;height:14px;color:var(--p-text-faint);transition:transform var(--p-dur) var(--p-ease)}.p-tool-group.open .p-tool-group-head .tg-car[data-v-be77961e]{transform:rotate(90deg)}.p-tool-row[data-v-be77961e]{position:relative;display:flex;align-items:center;gap:4px;padding:4px 0;border-radius:6px;cursor:pointer;font-family:var(--p-font-sans);font-size:var(--p-font-size-sm);line-height:1;color:var(--p-text)}.p-tool-row .tr-ic[data-v-be77961e]{width:14px;height:14px;color:var(--p-text-faint);flex:none}.p-tool-row .tr-name[data-v-be77961e]{font-weight:400;color:var(--p-text-muted);flex:none}.p-tool-row .tr-file[data-v-be77961e]{font-weight:400;color:var(--p-text);flex:none}.p-tool-row .tr-file[data-v-be77961e]:hover{color:var(--p-accent);text-decoration:underline;text-underline-offset:3px}.p-tool-row .tr-mono[data-v-be77961e]{font-family:var(--p-font-mono);font-size:var(--p-font-size-xs);line-height:normal;font-feature-settings:"liga" 0,"calt" 0;font-variant-ligatures:none;color:var(--p-text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.p-tool-row .tr-faint[data-v-be77961e]{color:var(--p-text-faint);line-height:var(--leading-tight);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.p-tool-row .tr-chip[data-v-be77961e]{margin-left:auto;color:var(--p-text-faint);font-size:var(--p-font-size-xs);flex:none}.p-tool-row .tr-add[data-v-be77961e]{margin-left:auto;color:var(--p-success);font-family:var(--p-font-mono);font-size:var(--p-font-size-xs);flex:none}.p-tool-row .tr-add~.tr-chip[data-v-be77961e],.p-tool-row .tr-add~.tr-add[data-v-be77961e]{margin-left:0}.p-tool-row .tr-del[data-v-be77961e]{color:var(--p-danger);font-family:var(--p-font-mono);font-size:var(--p-font-size-xs);flex:none}.p-tool-row .tr-bar[data-v-be77961e]{display:inline-flex;width:36px;height:3px;border-radius:999px;overflow:hidden;gap:1px;flex:none}.p-tool-row .tr-ok[data-v-be77961e]{color:var(--p-success);font-size:var(--p-font-size-xs);flex:none}.p-tool-row .tr-car[data-v-be77961e]{width:13px;height:13px;color:var(--p-text-faint);flex:none;transition:transform var(--p-dur) var(--p-ease)}.p-agent-card[data-v-be77961e]{display:flex;align-items:center;gap:8px;align-self:stretch;padding:8px 12px;background:var(--p-surface-raised);border:.5px solid var(--p-line);border-radius:var(--p-r-lg);cursor:pointer}.p-agent-card .pa-ic[data-v-be77961e]{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:8px;background:var(--p-surface-sunken);color:var(--p-text-muted);flex:none}.p-agent-card .pa-ic svg[data-v-be77961e]{width:14px;height:14px}.p-agent-card .pa-main[data-v-be77961e]{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}.p-agent-card .pa-task[data-v-be77961e]{font-size:var(--p-font-size-sm);line-height:1.4;color:var(--p-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.p-agent-card .pa-type[data-v-be77961e]{font-size:var(--p-font-size-xs);line-height:1.4;color:var(--p-text-faint);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.p-agent-card .pa-ok[data-v-be77961e]{color:var(--p-success);font-size:var(--p-font-size-xs);flex:none}.p-agent-card .pa-go[data-v-be77961e]{color:var(--p-text-faint);flex:none}.p-tool-row.expanded .tr-car[data-v-be77961e]{transform:rotate(90deg)}.p-tool-detail[data-v-be77961e]{padding:2px 8px 4px 0}.p-tool-detail .p-code[data-v-be77961e]{margin-top:4px}.p-composer[data-v-be77961e]{background:var(--p-surface-raised);border:.5px solid var(--p-line-strong);border-radius:var(--p-r-composer);corner-shape:var(--p-corner-composer);box-shadow:var(--p-sh-input);overflow:hidden;position:relative;z-index:1}.p-composer[data-v-be77961e]:after{content:"";position:absolute;inset:0;border:inherit;border-color:var(--p-composer-focus-line);border-radius:var(--p-r-composer);corner-shape:var(--p-corner-composer);opacity:0;pointer-events:none;transition:opacity var(--p-dur-slow) var(--p-ease-inout)}.p-composer[data-v-be77961e]:focus-within:after{opacity:1}.p-composer-ta[data-v-be77961e]{padding:14px 16px 8px;font-family:var(--p-font-sans);font-size:var(--p-font-size-md);color:var(--p-text);line-height:var(--p-leading-normal);text-autospace:normal}.p-composer-ta.ph[data-v-be77961e]{color:var(--p-text-faint)}.p-composer-bar[data-v-be77961e]{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:4px 8px 8px}.p-composer-strip[data-v-be77961e]{width:100%;max-width:620px;margin-top:calc(-1 * var(--space-4));display:flex;align-items:center;gap:var(--space-2);padding:calc(var(--space-4) + var(--space-2)) var(--space-2) var(--space-2);background:color-mix(in srgb,var(--color-hover) 60%,transparent);border-radius:0 0 var(--radius-2xl) var(--radius-2xl);font-family:var(--p-font-sans);font-size:var(--p-font-size-sm);color:var(--p-text-faint);cursor:pointer}.p-composer-strip .p-ic[data-v-be77961e]{width:16px;height:16px;color:var(--p-text-faint)}.p-composer-left[data-v-be77961e],.p-composer-right[data-v-be77961e]{display:flex;align-items:center;gap:4px}.p-composer .p-icon-btn[data-v-be77961e]{border-radius:var(--p-r-full)}.p-send[data-v-be77961e]{position:relative;width:32px;height:32px;border-radius:var(--p-r-full);display:grid;place-items:center;background:var(--p-text);color:var(--p-bg);border:none;cursor:pointer;box-shadow:var(--p-sh-xs);transition:transform var(--p-dur-fast) var(--p-ease)}.p-send[data-v-be77961e]:after{content:"";position:absolute;inset:0;border-radius:var(--p-r-full);background:var(--p-bg);opacity:0;transition:opacity var(--p-dur-slow) var(--p-ease);pointer-events:none}.p-send[data-v-be77961e]:hover:after{opacity:.28}.p-send[data-v-be77961e]:active{transform:scale(.92)}.p-send .p-ic[data-v-be77961e]{width:16px;height:16px}.p[data-v-be77961e] ::selection,[data-p][data-v-be77961e] ::selection{background:var(--p-selection)}.p-link[data-v-be77961e]{color:var(--p-accent);text-decoration:none;font-family:var(--p-font-sans);transition:color var(--p-dur) var(--p-ease)}.p-link[data-v-be77961e]:hover{color:var(--p-accent-hover);text-decoration:underline}.p-link[data-v-be77961e]:focus-visible{outline:none;box-shadow:var(--p-focus-ring);border-radius:var(--p-r-xs)}.p-link.muted[data-v-be77961e]{color:var(--p-text-muted)}.p-link.muted[data-v-be77961e]:hover{color:var(--p-text)}.p-link .p-ic[data-v-be77961e]{width:var(--p-ic-sm);height:var(--p-ic-sm);vertical-align:-2px}.p-menu[data-v-be77961e]{background:var(--color-menu-bg);border:.5px solid var(--p-line);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);border-radius:var(--p-r-lg);box-shadow:var(--p-sh-sm);padding:3.5px;min-width:180px;font-family:var(--p-font-sans);color:var(--p-text)}.p-menu-item[data-v-be77961e]{display:flex;align-items:center;gap:7px;padding:5px 9px;border-radius:var(--p-r-sm);font-size:var(--p-font-size-sm);color:var(--p-text);cursor:pointer;transition:background var(--p-dur) var(--p-ease),color var(--p-dur) var(--p-ease)}.p-menu-item[data-v-be77961e]:hover{background:var(--p-hover);color:var(--p-text-strong)}.p-menu-item.active[data-v-be77961e],.p-menu-item.active[data-v-be77961e]:hover{background:var(--p-hover);color:var(--p-text)}.p-menu-item.danger[data-v-be77961e]{color:var(--p-danger)}.p-menu-item.danger[data-v-be77961e]:hover{background:var(--p-danger-soft);color:var(--p-danger)}.p-menu-item.disabled[data-v-be77961e]{opacity:.5;cursor:not-allowed}.p-menu-item.disabled[data-v-be77961e]:hover{background:transparent;color:var(--p-text)}.p-menu-item .p-ic[data-v-be77961e]{width:var(--p-ic-sm);height:var(--p-ic-sm);color:var(--p-muted)}.p-menu-item:hover .p-ic[data-v-be77961e]{color:var(--p-text-strong)}.p-menu-item.active .p-ic[data-v-be77961e]{color:var(--p-accent-hover)}.p-menu-item.danger .p-ic[data-v-be77961e]{color:var(--p-danger)}.p-menu-item.lg[data-v-be77961e]{min-height:44px;padding:12px 14px;font-size:var(--p-font-size-sm)}.p-menu-sep[data-v-be77961e]{height:1px;background:var(--p-line);margin:4px 0}.p-seg[data-v-be77961e]{display:inline-flex;gap:2px;padding:2px;background:var(--p-surface-sunken);border:.5px solid var(--p-line);border-radius:var(--p-r-md);font-family:var(--p-font-sans)}.p-seg-item[data-v-be77961e]{display:inline-flex;align-items:center;gap:4px;padding:5px 12px;border-radius:var(--p-r-sm);font-size:var(--p-font-size-sm);font-weight:500;color:var(--p-text);cursor:pointer;white-space:nowrap;transition:background var(--p-dur) var(--p-ease),color var(--p-dur) var(--p-ease),box-shadow var(--p-dur) var(--p-ease)}.p-seg-item[data-v-be77961e]:hover{color:var(--p-text)}.p-seg-item.on[data-v-be77961e]{background:var(--p-surface-raised);color:var(--p-text);box-shadow:var(--p-sh-sm)}.p-tabs[data-v-be77961e]{display:flex;align-items:center;gap:0;border-bottom:.5px solid var(--p-line);font-family:var(--p-font-sans)}.p-tab[data-v-be77961e]{padding:8px 14px;font-size:var(--p-font-size-sm);font-weight:500;color:var(--p-text-muted);cursor:pointer;white-space:nowrap;border-bottom:.5px solid transparent;margin-bottom:-.5px;transition:color var(--p-dur) var(--p-ease),border-color var(--p-dur) var(--p-ease)}.p-tab[data-v-be77961e]:hover{color:var(--p-text)}.p-tab.on[data-v-be77961e]{color:var(--p-accent);border-bottom-color:var(--p-accent)}.p-switch[data-v-be77961e]{position:relative;display:inline-block;width:36px;height:20px;flex:none;border-radius:var(--p-r-full);background:var(--p-line-strong);cursor:pointer;transition:background var(--p-dur) var(--p-ease)}.p-switch[data-v-be77961e]:after{content:"";position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:var(--p-r-full);background:var(--p-surface-raised);box-shadow:var(--p-sh-xs);transform-origin:left center;transition:transform var(--p-dur) var(--p-ease)}.p-switch[data-v-be77961e]:hover:after{transform:scaleX(1.125)}.p-switch.on[data-v-be77961e]{background:var(--p-accent)}.p-switch.on[data-v-be77961e]:after{transform:translate(16px);transform-origin:right center}.p-switch.on[data-v-be77961e]:hover:after{transform:translate(16px) scaleX(1.125)}.p-switch[data-v-be77961e]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.p-check[data-v-be77961e]{width:17px;height:17px;flex:none;display:inline-grid;place-items:center;border:.5px solid var(--p-line-strong);border-radius:var(--p-r-sm);background:var(--p-surface-raised);color:var(--p-text-on-accent);cursor:pointer;transition:background var(--p-dur) var(--p-ease),border-color var(--p-dur) var(--p-ease)}.p-check.on[data-v-be77961e]{background:var(--p-accent);border-color:var(--p-accent)}.p-check[data-v-be77961e]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.p-check .p-ic[data-v-be77961e]{width:12px;height:12px}.p-avatar[data-v-be77961e]{width:32px;height:32px;flex:none;display:grid;place-items:center;border-radius:var(--p-r-md);background:var(--p-surface-sunken);border:.5px solid var(--p-line);color:var(--p-text-muted);font-size:var(--p-font-size-sm);font-weight:600}.p-avatar.sm[data-v-be77961e]{width:24px;height:24px;border-radius:var(--p-r-sm);font-size:var(--p-font-size-xs)}.p-avatar .p-ic[data-v-be77961e]{width:16px;height:16px}.p-avatar.sm .p-ic[data-v-be77961e]{width:13px;height:13px}.p-empty[data-v-be77961e]{display:flex;flex-direction:column;align-items:center;gap:8px;padding:32px 16px;color:var(--p-text-muted);text-align:center}.p-empty .em-ic[data-v-be77961e]{width:48px;height:48px;color:var(--p-text-faint)}.p-empty .em-title[data-v-be77961e]{font-size:var(--p-font-size-base);font-weight:600;color:var(--p-text)}.p-empty .em-hint[data-v-be77961e]{font-size:var(--p-font-size-sm);color:var(--p-text-muted)}.p-divider[data-v-be77961e]{width:100%;height:1px;background:var(--p-line);border:none}.p-divider-v[data-v-be77961e]{width:1px;align-self:stretch;background:var(--p-line);border:none}.p-tip[data-v-be77961e]{position:relative;display:inline-flex}.p-tip .p-tooltip[data-v-be77961e]{position:absolute;bottom:calc(100% + 6px);left:50%;transform:translate(-50%);background:var(--p-text);color:var(--p-bg);font-size:var(--p-font-size-xs);padding:4px 8px;border-radius:var(--p-r-sm);white-space:nowrap;opacity:0;pointer-events:none;transition:opacity var(--p-dur-fast) var(--p-ease)}.p-tip:hover .p-tooltip[data-v-be77961e]{opacity:1}.p-banner[data-v-be77961e]{display:flex;align-items:center;gap:10px;padding:10px 14px;border-radius:var(--p-r-md);border:.5px solid var(--p-line);background:var(--p-surface);font-size:var(--p-font-size-sm);color:var(--p-text)}.p-banner .bn-ic[data-v-be77961e]{width:18px;height:18px;flex:none}.p-banner.info[data-v-be77961e]{background:var(--p-accent-soft);border-color:var(--p-accent-bd)}.p-banner.info .bn-ic[data-v-be77961e]{color:var(--p-accent)}.p-banner.warning[data-v-be77961e]{background:var(--p-warning-soft);border-color:var(--p-warning-bd)}.p-banner.warning .bn-ic[data-v-be77961e]{color:var(--p-warning)}.p-banner.danger[data-v-be77961e]{background:var(--p-danger-soft);border-color:var(--p-danger-bd)}.p-banner.danger .bn-ic[data-v-be77961e]{color:var(--p-danger)}.p-sheet[data-v-be77961e]{background:var(--p-surface-raised);border:.5px solid var(--p-line);border-radius:var(--p-r-xl) var(--p-r-xl) 0 0;box-shadow:var(--p-sh-xl);padding:8px 16px 20px}.p-sheet-handle[data-v-be77961e]{width:36px;height:4px;border-radius:var(--p-r-full);background:var(--p-line-strong);margin:0 auto 8px}.p-skeleton[data-v-be77961e]{background:var(--p-surface-sunken);border-radius:var(--p-r-sm);animation:p-skel-be77961e 1.2s var(--p-ease-inout) infinite alternate}@keyframes p-skel-be77961e{0%{opacity:.5}to{opacity:1}}.p-cmdbar[data-v-be77961e]{display:flex;align-items:center;gap:8px;width:100%}.p-cmd[data-v-be77961e]{flex:1;min-width:0;height:38px;display:flex;align-items:center;gap:10px;padding:0 10px 0 14px;background:var(--p-surface-sunken);border:.5px solid var(--p-line);border-radius:var(--p-r-md);font-family:var(--p-font-mono);font-size:var(--p-font-size-sm);color:var(--p-text-muted)}.p-cmd .cmd-text[data-v-be77961e]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.p-cmd .cmd-copy[data-v-be77961e]{margin-left:auto;flex:none;display:grid;place-items:center;width:26px;height:26px;border:none;background:transparent;border-radius:var(--p-r-sm);color:var(--p-text-faint);cursor:pointer;transition:background var(--p-dur) var(--p-ease),color var(--p-dur) var(--p-ease)}.p-cmd .cmd-copy[data-v-be77961e]:hover{background:var(--p-surface-raised);color:var(--p-text)}.p-cmd .cmd-copy .p-ic[data-v-be77961e]{width:15px;height:15px}.p-topbar[data-v-be77961e]{display:flex;align-items:center;justify-content:space-between;gap:12px;height:48px;padding:0 16px;background:var(--p-surface-raised);border:.5px solid var(--p-line);border-radius:var(--p-r-lg)}.p-topbar .tb-title[data-v-be77961e]{font-size:var(--p-font-size-sm);font-weight:600;color:var(--p-text)}.p-topbar .tb-actions[data-v-be77961e]{display:flex;align-items:center;gap:4px}.p-topbar.frost[data-v-be77961e]{background:#ffffffb8;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border-color:#fff9}[data-p=dark] .p-topbar.frost[data-v-be77961e]{background:#161b22b8;border-color:#ffffff14}.demo-row[data-v-be77961e]{display:flex;flex-wrap:wrap;align-items:center;gap:10px}.demo-stack[data-v-be77961e]{display:flex;flex-direction:column;gap:12px;width:100%}.demo-col[data-v-be77961e]{display:flex;flex-direction:column;gap:10px}.demo-grow[data-v-be77961e]{flex:1;min-width:0}.demo-chat[data-v-be77961e]{display:flex;flex-direction:column;gap:14px;width:100%;max-width:560px}.icon-grid[data-v-be77961e]{display:grid;grid-template-columns:repeat(auto-fill,minmax(132px,1fr));gap:8px;margin:14px 0}.icon-group-label[data-v-be77961e]{grid-column:1 / -1;margin-top:10px;font-size:11px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--d-fg-muted)}.icon-cell[data-v-be77961e]{display:flex;align-items:center;gap:10px;padding:8px 10px;border:.5px solid var(--d-line);border-radius:8px;background:var(--d-surface)}.icon-cell .kw-icon[data-v-be77961e]{width:20px;height:20px;color:var(--d-fg-soft)}.icon-cell .ic-name[data-v-be77961e]{font-family:JetBrains Mono,ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:12px;color:var(--d-fg)}.icon-sizes[data-v-be77961e]{display:flex;align-items:end;gap:22px;flex-wrap:wrap}.icon-sizes .sz[data-v-be77961e]{display:flex;flex-direction:column;align-items:center;gap:8px;font-size:11px;color:var(--d-fg-muted);font-family:JetBrains Mono,ui-monospace,monospace}.p-code-inline[data-v-be77961e]{font-family:var(--p-font-mono);background:var(--p-surface-sunken);color:var(--p-text);padding:0 5px;border-radius:var(--p-r-sm);font-size:.9em}.p-code-block[data-v-be77961e]{border:.5px solid var(--p-line);border-radius:var(--p-r-md);overflow:hidden;background:var(--p-surface-sunken)}.p-code-block-head[data-v-be77961e]{display:flex;align-items:center;justify-content:space-between;padding:8px 12px;background:var(--p-surface);border-bottom:.5px solid var(--p-line);font-family:var(--p-font-mono);font-size:var(--p-font-size-xs);color:var(--p-text-muted)}.p-code-block pre[data-v-be77961e]{margin:0;padding:12px 14px;font-family:var(--p-font-mono);font-size:var(--p-font-size-sm);line-height:1.65;color:var(--p-text);overflow-x:auto}.p-diff[data-v-be77961e]{border:.5px solid var(--p-line);border-radius:var(--p-r-md);overflow:hidden;font-family:var(--p-font-mono);font-size:var(--p-font-size-sm)}.p-diff-head[data-v-be77961e]{padding:8px 12px;background:var(--p-surface);border-bottom:.5px solid var(--p-line);font-size:var(--p-font-size-xs);color:var(--p-text-muted)}.p-diff-row[data-v-be77961e]{display:flex;gap:10px;padding:2px 12px;line-height:1.6}.p-diff-row .pm[data-v-be77961e]{width:14px;flex:none;color:var(--p-text-faint)}.p-diff-row.add[data-v-be77961e]{background:var(--p-success-soft)}.p-diff-row.add .pm[data-v-be77961e]{color:var(--p-success)}.p-diff-row.del[data-v-be77961e]{background:var(--p-danger-soft)}.p-diff-row.del .pm[data-v-be77961e]{color:var(--p-danger)}.p-diff-row .p-diff-code[data-v-be77961e]{color:var(--p-text)}.p-field-error[data-v-be77961e]{color:var(--p-danger);font-size:var(--p-font-size-xs)}.p-btn .p-spinner[data-v-be77961e]{vertical-align:middle}.p-btn .p-spinner .track[data-v-be77961e]{stroke:currentColor;opacity:.35}.p-btn .p-spinner .arc[data-v-be77961e]{stroke:currentColor}.ds-page[data-v-be77961e]{position:fixed;inset:0;z-index:var(--z-max);overflow-y:auto}.ds-topbar[data-v-be77961e]{position:sticky;top:0;z-index:10;display:flex;align-items:center;gap:var(--space-3);padding:var(--space-2) var(--space-4);background:var(--color-surface);border-bottom:.5px solid var(--color-line)}.ds-back[data-v-be77961e]{display:inline-flex;align-items:center;gap:var(--space-1);padding:var(--space-1) var(--space-3);border:.5px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-surface-raised);color:var(--color-text);font-family:var(--font-ui);font-size:var(--text-sm);cursor:pointer}.ds-back[data-v-be77961e]:hover{background:var(--color-hover)}.ds-topbar-title[data-v-be77961e]{font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--color-text-muted)} diff --git a/apps/kimi-code/dist-web/assets/DesignSystemView-BnL2v2lB.css b/apps/kimi-code/dist-web/assets/DesignSystemView-BnL2v2lB.css new file mode 100644 index 0000000000..dd72d68998 --- /dev/null +++ b/apps/kimi-code/dist-web/assets/DesignSystemView-BnL2v2lB.css @@ -0,0 +1 @@ +.ds-page[data-v-043da7f5]{--d-bg: var(--color-bg);--d-surface: var(--color-surface);--d-surface-2: var(--color-surface-sunken);--d-surface-3: var(--color-line);--d-fg: var(--color-text);--d-fg-soft: var(--color-text-muted);--d-fg-muted: var(--color-text-muted);--d-fg-faint: var(--color-text-faint);--d-line: var(--color-line);--d-line-2: var(--color-line);--d-accent: var(--color-accent);--d-accent-2: var(--color-accent-hover);--d-accent-soft: var(--color-accent-soft);--d-accent-bd: var(--color-accent-bd);--d-green: var(--color-success);--d-green-soft: var(--color-success-soft);--d-amber: var(--color-warning);--d-amber-soft: var(--color-warning-soft);--d-red: var(--color-danger);--d-red-soft: var(--color-danger-soft);--d-violet: var(--color-done);--d-code-bg: var(--color-surface-sunken);--d-sidebar: var(--color-surface);--d-shadow-sm: var(--shadow-sm);--d-shadow-md: var(--shadow-md);--d-shadow-lg: var(--shadow-lg);--sidebar-w: var(--p-sidebar-w);--content-max: var(--p-content-wide)}.ds-page[data-v-043da7f5] *,.ds-page[data-v-043da7f5] *:before,.ds-page[data-v-043da7f5] *:after{box-sizing:border-box}.ds-page[data-v-043da7f5]{scroll-behavior:smooth}.ds-page[data-v-043da7f5]{margin:0;background:var(--d-bg);color:var(--color-text);font-family:var(--font-ui);font-size:var(--text-base);line-height:1.65;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}h1[data-v-043da7f5],h2[data-v-043da7f5],h3[data-v-043da7f5],h4[data-v-043da7f5]{color:var(--d-fg);letter-spacing:-.01em;line-height:1.25;margin:0}p[data-v-043da7f5]{margin:0 0 14px;color:var(--d-fg-soft)}a[data-v-043da7f5]{color:var(--d-accent-2);text-decoration:none}a[data-v-043da7f5]:hover{text-decoration:underline}code[data-v-043da7f5],pre[data-v-043da7f5],.mono[data-v-043da7f5]{font-family:JetBrains Mono,ui-monospace,SF Mono,Menlo,Consolas,monospace}code[data-v-043da7f5]{background:var(--d-code-bg);border:.5px solid var(--d-line-2);border-radius:5px;padding:1px 6px;font-size:.88em;color:#1f2937;white-space:nowrap}.layout[data-v-043da7f5]{display:grid;grid-template-columns:var(--sidebar-w) minmax(0,1fr);min-height:100vh}.sidebar[data-v-043da7f5]{position:sticky;top:0;align-self:start;height:100vh;background:var(--d-sidebar);border-right:.5px solid var(--d-line);padding:26px 22px;overflow-y:auto}.brand[data-v-043da7f5]{display:flex;align-items:center;gap:10px;margin-bottom:6px}.brand-mark[data-v-043da7f5]{width:26px;height:26px;border-radius:7px;flex:none;background:var(--d-fg);color:#fff;display:grid;place-items:center;font-weight:800;font-size:14px;letter-spacing:-.04em}.brand-name[data-v-043da7f5]{font-weight:700;font-size:15px;letter-spacing:-.01em}.brand-sub[data-v-043da7f5]{font-size:12px;color:var(--d-fg-faint);margin-bottom:26px;padding-left:36px}.nav-group[data-v-043da7f5]{margin:22px 0 8px;font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--d-fg-faint)}.p-section-label[data-v-043da7f5]{font-size:12px;font-weight:600;text-transform:uppercase;color:var(--d-fg-faint)}.nav a[data-v-043da7f5]{display:flex;align-items:center;gap:9px;padding:7px 10px;border-radius:7px;font-size:13.5px;font-weight:500;color:var(--d-fg-soft);margin:1px 0;transition:background .15s,color .15s}.nav a .num[data-v-043da7f5]{font-family:JetBrains Mono,monospace;font-size:11px;color:var(--d-fg-faint);width:18px}.nav a[data-v-043da7f5]:hover{background:var(--color-hover);color:var(--d-fg);text-decoration:none}.nav a.active[data-v-043da7f5]{background:var(--color-hover);color:var(--d-fg)}.nav a.active .num[data-v-043da7f5]{color:var(--d-fg-soft)}.content[data-v-043da7f5]{min-width:0}.content-inner[data-v-043da7f5]{max-width:var(--content-max);margin:0 auto;padding:64px 56px 120px}section[data-v-043da7f5]{scroll-margin-top:32px;padding-top:8px}section+section[data-v-043da7f5]{margin-top:72px}.hero[data-v-043da7f5]{padding:8px 0 40px;border-bottom:.5px solid var(--d-line);margin-bottom:56px}.eyebrow[data-v-043da7f5]{display:inline-flex;align-items:center;gap:8px;font-family:JetBrains Mono,monospace;font-size:12px;font-weight:600;letter-spacing:.04em;color:var(--d-fg);background:#1783ff1a;border:none;padding:6px 12px;border-radius:8px;margin-bottom:22px}.hero h1[data-v-043da7f5]{font-size:48px;font-weight:600;line-height:1.08;letter-spacing:-.025em;margin-bottom:18px}.hero h1 .grad[data-v-043da7f5]{color:var(--d-accent)}.hero p.lead[data-v-043da7f5]{font-size:18px;line-height:1.6;color:var(--d-fg-soft);max-width:680px}.hero-meta[data-v-043da7f5]{display:flex;flex-wrap:wrap;gap:10px;margin-top:28px}.meta-chip[data-v-043da7f5]{display:inline-flex;align-items:center;gap:8px;font-size:12.5px;color:var(--d-fg-muted);background:var(--d-surface);border:.5px solid var(--d-line);border-radius:8px;padding:7px 12px}.meta-chip b[data-v-043da7f5]{color:var(--d-fg);font-weight:600}.meta-chip .dot[data-v-043da7f5]{width:7px;height:7px;border-radius:50%;background:var(--d-green)}.sec-head[data-v-043da7f5]{display:flex;align-items:baseline;gap:14px;margin-bottom:8px}.sec-num[data-v-043da7f5]{font-family:JetBrains Mono,monospace;font-size:13px;font-weight:600;color:var(--d-accent-2)}.sec-title[data-v-043da7f5]{font-size:26px;letter-spacing:-.02em}.sec-desc[data-v-043da7f5]{font-size:15.5px;color:var(--d-fg-muted);max-width:720px;margin-bottom:28px}h3.sub[data-v-043da7f5]{font-size:17px;margin:40px 0 14px;display:flex;align-items:center;gap:10px}h3.sub[data-v-043da7f5]:before{content:"";width:4px;height:16px;border-radius:2px;background:var(--d-accent)}h4.mini[data-v-043da7f5]{font-size:13px;text-transform:uppercase;letter-spacing:.06em;color:var(--d-fg-muted);margin:24px 0 12px}.stat-grid[data-v-043da7f5]{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:24px 0}.stat[data-v-043da7f5]{background:var(--d-surface);border:.5px solid var(--d-line);border-radius:14px;padding:18px 18px 16px}.stat .v[data-v-043da7f5]{font-size:34px;font-weight:800;letter-spacing:-.03em;line-height:1;color:var(--d-fg)}.stat .v small[data-v-043da7f5]{font-size:16px;color:var(--d-fg-muted);font-weight:600}.stat .l[data-v-043da7f5]{font-size:12.5px;color:var(--d-fg-muted);margin-top:8px;line-height:1.4}.stat.warn[data-v-043da7f5]{background:var(--d-amber-soft);border-color:#f0d9b8}.stat.warn .v[data-v-043da7f5]{color:var(--d-amber)}.stat.bad[data-v-043da7f5]{background:var(--d-red-soft);border-color:#f0cccc}.stat.bad .v[data-v-043da7f5]{color:var(--d-red)}.stat.good[data-v-043da7f5]{background:var(--d-green-soft);border-color:#bfe3cc}.stat.good .v[data-v-043da7f5]{color:var(--d-green)}.panel[data-v-043da7f5]{background:var(--d-bg);border:.5px solid var(--d-line);border-radius:16px;box-shadow:var(--d-shadow-sm)}.panel-pad[data-v-043da7f5]{padding:22px}.panel-soft[data-v-043da7f5]{background:var(--d-surface);border:.5px solid var(--d-line);border-radius:14px}.callout[data-v-043da7f5]{display:flex;gap:12px;padding:14px 16px;border-radius:12px;font-size:14px;line-height:1.55;background:var(--d-surface);border:.5px solid var(--d-line);color:var(--d-fg-soft);margin:18px 0}.callout .ico[data-v-043da7f5]{flex:none;width:20px;height:20px;border-radius:6px;display:grid;place-items:center;font-size:12px;font-weight:800}.callout.info[data-v-043da7f5]{background:var(--d-accent-soft);border-color:var(--d-accent-bd)}.callout.info .ico[data-v-043da7f5]{background:var(--d-accent);color:#fff}.callout.warn[data-v-043da7f5]{background:var(--d-amber-soft);border-color:#f0d9b8}.callout.warn .ico[data-v-043da7f5]{background:var(--d-amber);color:#fff}.callout.good[data-v-043da7f5]{background:var(--d-green-soft);border-color:#bfe3cc}.callout.good .ico[data-v-043da7f5]{background:var(--d-green);color:#fff}table.dt[data-v-043da7f5]{width:100%;border-collapse:collapse;font-size:13.5px;margin:16px 0}table.dt th[data-v-043da7f5]{text-align:left;font-size:11.5px;text-transform:uppercase;letter-spacing:.05em;color:var(--d-fg-faint);font-weight:700;padding:10px 12px;border-bottom:.5px solid var(--d-line)}table.dt td[data-v-043da7f5]{padding:11px 12px;border-bottom:.5px solid var(--d-line-2);color:var(--d-fg-soft);vertical-align:middle}table.dt tr:last-child td[data-v-043da7f5]{border-bottom:none}table.dt td.tk[data-v-043da7f5]{font-family:JetBrains Mono,monospace;font-size:12.5px;color:var(--d-fg);white-space:nowrap}table.dt td.val[data-v-043da7f5]{font-family:JetBrains Mono,monospace;font-size:12px;color:var(--d-fg-muted)}.swatch[data-v-043da7f5]{display:inline-block;width:16px;height:16px;border-radius:4px;border:.5px solid rgba(0,0,0,.08);vertical-align:-3px;margin-right:8px}.palette[data-v-043da7f5]{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:16px 0}.color-card[data-v-043da7f5]{border:.5px solid var(--d-line);border-radius:12px;overflow:hidden;background:var(--d-bg)}.color-chip[data-v-043da7f5]{height:56px;border-bottom:.5px solid var(--d-line)}.color-meta[data-v-043da7f5]{padding:10px 12px 12px}.color-meta .cn[data-v-043da7f5]{font-size:13px;font-weight:600;color:var(--d-fg)}.color-meta .cv[data-v-043da7f5]{font-family:JetBrains Mono,monospace;font-size:11.5px;color:var(--d-fg-muted);margin-top:2px}.type-row[data-v-043da7f5]{display:flex;align-items:baseline;gap:18px;padding:13px 0;border-bottom:.5px solid var(--d-line-2)}.type-row[data-v-043da7f5]:last-child{border-bottom:none}.type-sample[data-v-043da7f5]{flex:1;color:var(--d-fg);line-height:1.2}.type-meta[data-v-043da7f5]{width:190px;flex:none;text-align:right;font-family:JetBrains Mono,monospace;font-size:12px;color:var(--d-fg-muted)}.space-row[data-v-043da7f5]{display:flex;align-items:center;gap:16px;padding:10px 0;border-bottom:.5px solid var(--d-line-2)}.space-row[data-v-043da7f5]:last-child{border-bottom:none}.space-bar[data-v-043da7f5]{height:18px;border-radius:4px;background:linear-gradient(90deg,var(--d-accent),var(--d-accent-2));flex:none}.space-meta[data-v-043da7f5]{font-family:JetBrains Mono,monospace;font-size:12.5px;color:var(--d-fg-soft);width:150px}.space-use[data-v-043da7f5]{font-size:12.5px;color:var(--d-fg-muted)}.radius-grid[data-v-043da7f5]{display:flex;flex-wrap:wrap;gap:22px;align-items:flex-end;margin:16px 0}.radius-item[data-v-043da7f5]{display:flex;flex-direction:column;align-items:center;gap:10px}.radius-box[data-v-043da7f5]{width:64px;height:64px;border:.5px solid var(--d-accent);background:var(--d-accent-soft)}.radius-item .rl[data-v-043da7f5]{font-family:JetBrains Mono,monospace;font-size:12px;color:var(--d-fg-soft)}.stage-wrap[data-v-043da7f5]{border:.5px solid var(--d-line);border-radius:16px;overflow:hidden;margin:18px 0;background:var(--d-bg);box-shadow:var(--d-shadow-sm)}.stage-bar[data-v-043da7f5]{display:flex;align-items:center;justify-content:space-between;padding:10px 14px;border-bottom:.5px solid var(--d-line);background:var(--d-surface)}.stage-bar .st[data-v-043da7f5]{font-size:13px;font-weight:600;color:var(--d-fg);display:flex;align-items:center;gap:8px}.stage-bar .st .tag[data-v-043da7f5]{font-size:10.5px;font-weight:700;letter-spacing:.04em;padding:2px 7px;border-radius:999px}.tag.after[data-v-043da7f5]{background:var(--d-green-soft);color:var(--d-green)}.tag.before[data-v-043da7f5]{background:var(--d-red-soft);color:var(--d-red)}.tag.spec[data-v-043da7f5]{background:var(--d-accent-soft);color:var(--d-accent-2)}.stage-bar .sactions[data-v-043da7f5]{display:flex;gap:6px}.tab[data-v-043da7f5]{font-family:JetBrains Mono,monospace;font-size:11.5px;padding:4px 10px;border-radius:6px;color:var(--d-fg-muted);cursor:default}.tab.on[data-v-043da7f5]{background:var(--d-bg);color:var(--d-fg);border:.5px solid var(--d-line)}.stage[data-v-043da7f5]{padding:32px;display:flex;flex-wrap:wrap;align-items:center;gap:16px;background:radial-gradient(circle at 1px 1px,rgba(0,0,0,.045) 1px,transparent 0) 0 0 / 18px 18px,var(--d-surface)}.stage.col[data-v-043da7f5]{flex-direction:column;align-items:stretch}.stage.dark[data-v-043da7f5]{background:radial-gradient(circle at 1px 1px,rgba(255,255,255,.06) 1px,transparent 0) 0 0 / 18px 18px,#0d1117}.stage-label[data-v-043da7f5]{width:100%;font-size:11.5px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--d-fg-faint);margin-bottom:-6px}.stage.dark .stage-label[data-v-043da7f5]{color:#6b7280}.ba[data-v-043da7f5]{display:grid;grid-template-columns:1fr 1fr;gap:0;border:.5px solid var(--d-line);border-radius:16px;overflow:hidden;margin:18px 0;box-shadow:var(--d-shadow-sm)}.ba-col[data-v-043da7f5]{min-width:0}.ba-col+.ba-col[data-v-043da7f5]{border-left:.5px solid var(--d-line)}.ba-head[data-v-043da7f5]{display:flex;align-items:center;justify-content:space-between;padding:11px 16px;border-bottom:.5px solid var(--d-line)}.ba-head.before[data-v-043da7f5]{background:var(--d-red-soft)}.ba-head.after[data-v-043da7f5]{background:var(--d-green-soft)}.ba-head .bh[data-v-043da7f5]{font-size:13px;font-weight:700}.ba-head.before .bh[data-v-043da7f5]{color:var(--d-red)}.ba-head.after .bh[data-v-043da7f5]{color:var(--d-green)}.ba-head .bh small[data-v-043da7f5]{font-weight:500;opacity:.7;margin-left:6px}.ba-body[data-v-043da7f5]{padding:24px;background:var(--d-surface);min-height:120px}.ba-col.after .ba-body[data-v-043da7f5]{background:#fff}.code[data-v-043da7f5]{background:#0d1117;border-radius:12px;overflow:hidden;margin:16px 0;border:.5px solid #1c2128}.code-bar[data-v-043da7f5]{display:flex;align-items:center;gap:8px;padding:9px 14px;background:#13181e;border-bottom:.5px solid #1c2128}.code-bar .d[data-v-043da7f5]{width:10px;height:10px;border-radius:50%;background:#30363d}.code-bar .fn[data-v-043da7f5]{font-family:JetBrains Mono,monospace;font-size:11.5px;color:#8b949e;margin-left:4px}.code pre[data-v-043da7f5]{margin:0;padding:18px;overflow-x:auto;font-size:12.5px;line-height:1.7;color:#c9d1d9}.code .c[data-v-043da7f5]{color:#8b949e}.code .k[data-v-043da7f5]{color:#ff7b72}.code .s[data-v-043da7f5]{color:#a5d6ff}.code .p[data-v-043da7f5]{color:#79c0ff}.code .n[data-v-043da7f5]{color:#d2a8ff}.code .v[data-v-043da7f5]{color:#ffa657}.pill[data-v-043da7f5]{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:600;padding:3px 9px;border-radius:999px;border:.5px solid var(--d-line);background:var(--d-surface);color:var(--d-fg-soft)}.pill.blue[data-v-043da7f5]{background:var(--d-accent-soft);border-color:var(--d-accent-bd);color:var(--d-accent-2)}.pill.green[data-v-043da7f5]{background:var(--d-green-soft);border-color:#bfe3cc;color:var(--d-green)}.pill.amber[data-v-043da7f5]{background:var(--d-amber-soft);border-color:#f0d9b8;color:var(--d-amber)}.pill.red[data-v-043da7f5]{background:var(--d-red-soft);border-color:#f0cccc;color:var(--d-red)}.pill.mono[data-v-043da7f5]{font-family:JetBrains Mono,monospace}ul.clean[data-v-043da7f5]{list-style:none;padding:0;margin:14px 0}ul.clean li[data-v-043da7f5]{position:relative;padding:8px 0 8px 26px;color:var(--d-fg-soft);border-bottom:.5px solid var(--d-line-2)}ul.clean li[data-v-043da7f5]:last-child{border-bottom:none}ul.clean li[data-v-043da7f5]:before{content:"";position:absolute;left:4px;top:17px;width:7px;height:7px;border-radius:50%;background:var(--d-accent)}ul.clean.check li[data-v-043da7f5]:before{content:"✓";background:none;color:var(--d-green);font-weight:800;top:7px;left:0;font-size:14px}ul.clean.cross li[data-v-043da7f5]:before{content:"✕";background:none;color:var(--d-red);font-weight:800;top:7px;left:0;font-size:13px}ul.clean li b[data-v-043da7f5]{color:var(--d-fg)}ul.clean li .path[data-v-043da7f5]{font-family:JetBrains Mono,monospace;font-size:12px;color:var(--d-fg-muted)}.roadmap[data-v-043da7f5]{position:relative;margin:24px 0}.phase[data-v-043da7f5]{position:relative;display:grid;grid-template-columns:120px 1fr;gap:24px;padding:0 0 32px}.phase[data-v-043da7f5]:not(:last-child):after{content:"";position:absolute;left:59px;top:36px;bottom:0;width:2px;background:var(--d-line)}.phase-tag[data-v-043da7f5]{text-align:right;padding-top:4px}.phase-tag .pt[data-v-043da7f5]{display:inline-block;font-family:JetBrains Mono,monospace;font-size:12px;font-weight:700;color:var(--d-accent-2);background:var(--d-accent-soft);border:.5px solid var(--d-accent-bd);padding:5px 10px;border-radius:8px}.phase-tag .pe[data-v-043da7f5]{font-size:11.5px;color:var(--d-fg-faint);margin-top:8px}.phase-body[data-v-043da7f5]{background:var(--d-bg);border:.5px solid var(--d-line);border-radius:14px;padding:18px 20px;box-shadow:var(--d-shadow-sm)}.phase-body h4[data-v-043da7f5]{font-size:16px;margin-bottom:8px}.phase-body p[data-v-043da7f5]{font-size:14px;margin-bottom:12px}.phase-body ul[data-v-043da7f5]{margin:0}.matrix[data-v-043da7f5]{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:16px 0}.anti[data-v-043da7f5]{border:.5px solid var(--d-line);border-radius:12px;padding:16px;background:var(--d-bg)}.anti .ah[data-v-043da7f5]{display:flex;align-items:center;gap:9px;font-size:14px;font-weight:700;margin-bottom:8px}.anti .ah .verdict[data-v-043da7f5]{margin-left:auto;font-size:11px;font-weight:800;padding:2px 8px;border-radius:999px}.verdict.pass[data-v-043da7f5]{background:var(--d-green-soft);color:var(--d-green)}.verdict.fail[data-v-043da7f5]{background:var(--d-red-soft);color:var(--d-red)}.verdict.warn[data-v-043da7f5]{background:var(--d-amber-soft);color:var(--d-amber)}.anti p[data-v-043da7f5]{font-size:13px;margin:0;color:var(--d-fg-muted)}.footer[data-v-043da7f5]{margin-top:80px;padding-top:28px;border-top:.5px solid var(--d-line);font-size:13px;color:var(--d-fg-faint);display:flex;justify-content:space-between;flex-wrap:wrap;gap:12px}.kbd[data-v-043da7f5]{font-family:JetBrains Mono,monospace;font-size:11px;background:var(--d-surface-2);border:.5px solid var(--d-line);border-radius:5px;padding:1px 6px}@media(max-width:980px){.layout[data-v-043da7f5]{grid-template-columns:1fr}.sidebar[data-v-043da7f5]{position:static;height:auto}.nav[data-v-043da7f5]{display:flex;flex-wrap:wrap;gap:4px}.content-inner[data-v-043da7f5]{padding:40px 22px 80px}.stat-grid[data-v-043da7f5]{grid-template-columns:repeat(2,1fr)}.ba[data-v-043da7f5]{grid-template-columns:1fr}.ba-col+.ba-col[data-v-043da7f5]{border-left:none;border-top:.5px solid var(--d-line)}.palette[data-v-043da7f5]{grid-template-columns:repeat(2,1fr)}.matrix[data-v-043da7f5]{grid-template-columns:1fr}}.ds-page .p[data-v-043da7f5],.ds-page .stage.p-skin[data-v-043da7f5],.ds-page [data-p][data-v-043da7f5]{--p-font-sans: var(--font-ui);--p-font-kbd: var(--font-kbd);--p-font-mono: var(--font-mono);--p-bg: var(--color-bg);--p-surface: var(--color-surface);--p-surface-raised: var(--color-surface-raised);--p-surface-overlay: var(--color-surface-overlay);--p-surface-sunken: var(--color-surface-sunken);--p-well: var(--color-well);--p-surface-deep: var(--color-surface-deep);--p-hover: var(--color-hover);--p-text: var(--color-text);--p-text-strong: var(--color-text-strong);--p-muted: var(--muted);--p-text-muted: var(--color-text-muted);--p-text-faint: var(--color-text-faint);--p-text-on-accent: var(--color-text-on-accent);--p-line: var(--color-line);--p-line-strong: var(--color-line-strong);--p-accent: var(--color-accent);--p-accent-hover: var(--color-accent-hover);--p-accent-soft: var(--color-accent-soft);--p-user-bubble-bg: var(--color-user-bubble-bg);--p-accent-bd: var(--color-accent-bd);--p-success: var(--color-success);--p-success-soft: var(--color-success-soft);--p-success-bd: var(--color-success-bd);--p-warning: var(--color-warning);--p-warning-soft: var(--color-warning-soft);--p-warning-bd: var(--color-warning-bd);--p-danger: var(--color-danger);--p-danger-soft: var(--color-danger-soft);--p-danger-bd: var(--color-danger-bd);--p-info: var(--color-info);--p-sp-1: var(--space-1);--p-sp-2: var(--space-2);--p-sp-3: var(--space-3);--p-sp-4: var(--space-4);--p-sp-5: var(--space-5);--p-sp-6: var(--space-6);--p-sp-8: var(--space-8);--p-r-xs: var(--radius-xs);--p-r-sm: var(--radius-sm);--p-r-md: var(--radius-md);--p-r-lg: var(--radius-lg);--p-r-xl: var(--radius-xl);--p-r-composer: var(--radius-composer);--p-r-full: var(--radius-full);--p-corner-composer: var(--corner-shape-composer);--p-sh-xs: var(--shadow-xs);--p-sh-sm: var(--shadow-sm);--p-sh-menu: var(--shadow-menu);--p-sh-md: var(--shadow-md);--p-sh-input: var(--shadow-input);--p-sh-lg: var(--shadow-lg);--p-sh-xl: var(--shadow-xl);--p-font-size-xs: var(--text-xs);--p-font-size-sm: var(--text-sm);--p-font-size-base: var(--text-base);--p-font-size-md: var(--text-base);--p-font-size-lg: var(--text-lg);--p-font-size-xl: var(--text-xl);--p-font-size-2xl: var(--text-2xl);--p-leading-tight: var(--leading-tight);--p-leading-normal: var(--leading-normal);--p-leading-relaxed: var(--leading-relaxed);--p-ease: var(--ease-out);--p-ease-inout: var(--ease-in-out);--p-dur-fast: var(--duration-fast);--p-dur: var(--duration-base);--p-dur-slow: var(--duration-slow);--p-composer-focus-line: var(--color-composer-focus-line);font-family:var(--font-ui);color:var(--color-text);font-size:var(--text-base)}[data-p=dark][data-v-043da7f5]{--p-bg: #0d1117;--p-surface: #13181e;--p-surface-raised: #1c2128;--p-surface-sunken: #0d1117;--p-well: #13181e;--p-surface-deep: #0a0d12;--p-surface-overlay: #22272e;--p-hover: #ffffff0d;--p-text: #e8eaed;--p-text-strong: #ffffff;--p-muted: #727983;--p-text-muted: #9aa0a8;--p-text-faint: #6b7280;--p-line: #2d333b;--p-line-strong: #3d444d;--p-accent: #58a6ff;--p-accent-hover: #79b8ff;--p-accent-soft: rgba(88,166,255,.14);--p-accent-bd: rgba(88,166,255,.28);--p-success: #3fb950;--p-success-soft: rgba(63,185,80,.14);--p-success-bd: rgba(63,185,80,.28);--p-warning: #d29922;--p-warning-soft: rgba(210,153,34,.14);--p-warning-bd: rgba(210,153,34,.28);--p-danger: #f85149;--p-danger-soft: rgba(248,81,73,.14);--p-danger-bd: rgba(248,81,73,.28);--p-sh-sm: 0 1px 2px rgba(0,0,0,.4);--p-sh-md: 0 4px 12px rgba(0,0,0,.45);--p-sh-lg: 0 12px 32px rgba(0,0,0,.55);--p-sh-input: var(--shadow-input);--p-selection: rgba(88,166,255,.32)}.p-ic[data-v-043da7f5]{width:16px;height:16px;flex:none;display:inline-block;vertical-align:middle}.p-btn[data-v-043da7f5]{--_h: 36px;--_px: 16px;--_fs: var(--p-font-size-base);--_r: var(--p-r-md);display:inline-flex;align-items:center;justify-content:center;gap:8px;height:var(--_h);padding:0 var(--_px);border-radius:var(--_r);font-family:var(--p-font-sans);font-size:var(--_fs);font-weight:600;line-height:1;border:.5px solid transparent;cursor:pointer;white-space:nowrap;transition:background var(--p-dur) var(--p-ease),border-color var(--p-dur) var(--p-ease),color var(--p-dur) var(--p-ease),box-shadow var(--p-dur) var(--p-ease),transform var(--p-dur-fast) var(--p-ease)}.p-btn[data-v-043da7f5]:active{transform:scale(.98)}.p-btn[data-v-043da7f5]:focus-visible{outline:none;box-shadow:0 0 0 3px var(--p-accent-soft),0 0 0 1px var(--p-accent)}.p-btn .p-ic[data-v-043da7f5]{width:16px;height:16px}.p-btn.sm[data-v-043da7f5]{--_h: 30px;--_px: 12px;--_fs: var(--p-font-size-sm);--_r: var(--p-r-sm)}.p-btn.sm .p-ic[data-v-043da7f5]{width:14px;height:14px}.p-btn.lg[data-v-043da7f5]{--_h: 42px;--_px: 20px;--_fs: var(--p-font-size-md);--_r: var(--p-r-lg)}.p-btn.primary[data-v-043da7f5]{background:var(--p-accent);color:var(--p-text-on-accent);border-color:var(--p-accent);box-shadow:var(--p-sh-xs)}.p-btn.primary[data-v-043da7f5]:hover{background:var(--p-accent-hover);border-color:var(--p-accent-hover)}.p-btn.secondary[data-v-043da7f5]{background:var(--p-surface-raised);color:var(--p-text);border-color:var(--p-line-strong);box-shadow:var(--p-sh-xs)}.p-btn.secondary[data-v-043da7f5]:hover{background:var(--p-hover);border-color:var(--p-line-strong)}.p-btn.ghost[data-v-043da7f5]{background:transparent;color:var(--p-text);border-color:transparent}.p-btn.ghost[data-v-043da7f5]:hover{background:var(--p-hover);color:var(--p-text-strong)}.p-btn.danger[data-v-043da7f5]{background:var(--p-danger);color:#fff;border-color:var(--p-danger);box-shadow:var(--p-sh-xs)}.p-btn.danger[data-v-043da7f5]:hover{filter:brightness(.96)}.p-btn.danger-soft[data-v-043da7f5]{background:var(--p-danger-soft);color:var(--p-danger);border-color:var(--p-danger-bd)}.p-btn.danger-soft[data-v-043da7f5]:hover{background:var(--p-danger);color:#fff;border-color:var(--p-danger)}.p-btn[disabled][data-v-043da7f5],.p-btn.disabled[data-v-043da7f5]{opacity:.5;cursor:not-allowed;box-shadow:none;transform:none}.p-icon-btn[data-v-043da7f5]{--_s: 32px;display:inline-grid;place-items:center;width:var(--_s);height:var(--_s);flex:none;border-radius:var(--p-r-md);border:.5px solid transparent;background:transparent;color:var(--p-text-muted);cursor:pointer;transition:background var(--p-dur) var(--p-ease),color var(--p-dur) var(--p-ease)}.p-icon-btn[data-v-043da7f5]:hover{background:var(--p-hover);color:var(--p-text)}.p-icon-btn[data-v-043da7f5]:focus-visible{outline:none;box-shadow:0 0 0 3px var(--p-accent-soft)}.p-icon-btn.sm[data-v-043da7f5]{--_s: 26px;border-radius:var(--p-r-sm)}.p-icon-btn.lg[data-v-043da7f5]{--_s: 44px}.p-icon-btn .p-ic[data-v-043da7f5]{width:16px;height:16px}.p-icon-btn.lg .p-ic[data-v-043da7f5]{width:20px;height:20px}.p-badge[data-v-043da7f5]{display:inline-flex;align-items:center;gap:6px;height:22px;padding:0 9px;border-radius:var(--p-r-full);font-family:var(--p-font-sans);font-size:var(--p-font-size-xs);font-weight:600;line-height:1;border:.5px solid var(--p-line);background:var(--p-surface);color:var(--p-text);white-space:nowrap}.p-badge.sm[data-v-043da7f5]{height:18px;padding:0 7px;font-size:11px}.p-badge .bd[data-v-043da7f5]{width:7px;height:7px;border-radius:50%;background:currentColor}.p-badge.neutral[data-v-043da7f5]{background:var(--p-surface-sunken);border-color:var(--p-line);color:var(--p-text-muted)}.p-badge.info[data-v-043da7f5]{background:var(--p-accent-soft);border-color:var(--p-accent-bd);color:var(--p-accent-hover)}.p-badge.success[data-v-043da7f5]{background:var(--p-success-soft);border-color:var(--p-success-bd);color:var(--p-success)}.p-badge.warning[data-v-043da7f5]{background:var(--p-warning-soft);border-color:var(--p-warning-bd);color:var(--p-warning)}.p-badge.danger[data-v-043da7f5]{background:var(--p-danger-soft);border-color:var(--p-danger-bd);color:var(--p-danger)}.p-badge.solid[data-v-043da7f5]{background:var(--p-text);color:var(--p-bg);border-color:var(--p-text)}.p-badge .p-ic[data-v-043da7f5]{width:12px;height:12px}.p-kbd[data-v-043da7f5]{display:inline-flex;align-items:center;gap:3px}.p-kbd kbd[data-v-043da7f5]{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 5px;border:.5px solid var(--p-line);border-radius:var(--p-r-xs);background:transparent;color:inherit;font-family:var(--p-font-kbd);font-size:11px;line-height:1}.p-pill[data-v-043da7f5]{display:inline-flex;align-items:center;gap:4px;height:32px;padding:0 12px;border-radius:var(--p-r-full);border:.5px solid transparent;background:transparent;font-family:var(--p-font-sans);font-size:var(--p-font-size-sm);font-weight:500;color:var(--p-text);cursor:pointer;transition:background var(--p-dur) var(--p-ease),color var(--p-dur) var(--p-ease)}.p-pill[data-v-043da7f5]:hover{background:var(--p-hover);color:var(--p-text-strong)}.p-pill .pp-strong[data-v-043da7f5]{font-weight:700;color:var(--p-text)}.p-pill .pp-sub[data-v-043da7f5]{color:var(--p-accent);font-weight:600}.p-pill .p-ic[data-v-043da7f5]{width:14px;height:14px;color:var(--p-text-faint)}.p-card[data-v-043da7f5]{background:var(--p-surface);border:.5px solid var(--p-line);border-radius:var(--p-r-md);overflow:hidden;color:var(--p-text)}.p-card.interactive[data-v-043da7f5]{transition:background var(--p-dur) var(--p-ease),border-color var(--p-dur) var(--p-ease);cursor:pointer}.p-card.interactive[data-v-043da7f5]:hover{background:var(--p-surface);border-color:var(--p-line-strong)}.p-card-head[data-v-043da7f5]{display:flex;align-items:center;gap:9px;padding:10px 14px;border-bottom:.5px solid var(--p-line);background:var(--p-surface)}.p-card-title[data-v-043da7f5]{font-size:var(--p-font-size-sm);font-weight:600;color:var(--p-text);font-family:var(--p-font-mono)}.p-card-body[data-v-043da7f5]{padding:14px;font-size:var(--p-font-size-base);color:var(--p-text);line-height:var(--p-leading-normal)}.p-card-foot[data-v-043da7f5]{display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:10px 14px;border-top:.5px solid var(--p-line);background:var(--p-surface)}.p-field[data-v-043da7f5]{display:flex;flex-direction:column;gap:6px}.p-label[data-v-043da7f5]{font-size:var(--p-font-size-sm);font-weight:600;color:var(--p-text)}.p-input[data-v-043da7f5],.p-select[data-v-043da7f5],.p-textarea[data-v-043da7f5]{width:100%;height:38px;padding:0 12px;border-radius:var(--p-r-md);border:.5px solid var(--p-line-strong);background:var(--p-surface-raised);font-family:var(--p-font-sans);font-size:var(--p-font-size-base);color:var(--p-text);box-shadow:var(--p-sh-xs);transition:border-color var(--p-dur) var(--p-ease),box-shadow var(--p-dur) var(--p-ease)}.p-textarea[data-v-043da7f5]{height:auto;min-height:84px;padding:10px 12px;resize:vertical;line-height:var(--p-leading-normal)}.p-select[data-v-043da7f5]{display:flex;align-items:center;justify-content:space-between;text-align:left}.p-select[data-v-043da7f5]:after{content:"⌄";color:var(--p-text-muted)}.p-input[data-v-043da7f5]:hover,.p-select[data-v-043da7f5]:hover,.p-textarea[data-v-043da7f5]:hover{border-color:var(--p-line-strong)}.p-input[data-v-043da7f5]:focus,.p-select[data-v-043da7f5]:focus,.p-textarea[data-v-043da7f5]:focus{outline:none;border-color:var(--p-accent);box-shadow:0 0 0 3px var(--p-accent-soft)}.p-input[data-v-043da7f5]::placeholder,.p-textarea[data-v-043da7f5]::placeholder{color:var(--p-text-faint)}.p-input.sm[data-v-043da7f5]{height:32px;font-size:var(--p-font-size-sm);border-radius:var(--p-r-sm)}.p-hint[data-v-043da7f5]{font-size:var(--p-font-size-xs);color:var(--p-text-faint)}.p-dialog[data-v-043da7f5]{width:480px;max-width:calc(100vw - 48px);background:var(--p-surface-raised);border:.5px solid var(--p-line);border-radius:var(--p-r-xl);box-shadow:var(--p-sh-xl);overflow:hidden;color:var(--p-text)}.p-dialog-head[data-v-043da7f5]{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:20px 22px 14px}.p-dialog-title[data-v-043da7f5]{font-size:var(--p-font-size-lg);font-weight:700;letter-spacing:-.01em}.p-dialog-desc[data-v-043da7f5]{font-size:var(--p-font-size-base);color:var(--p-text-muted);margin-top:4px;line-height:var(--p-leading-normal)}.p-dialog-body[data-v-043da7f5]{padding:4px 22px 18px}.p-dialog-foot[data-v-043da7f5]{display:flex;justify-content:flex-end;gap:10px;padding:14px 22px 20px}.p-toast[data-v-043da7f5]{display:flex;align-items:flex-start;gap:11px;width:360px;padding:13px 14px;background:var(--p-surface-raised);border:.5px solid var(--p-line);border-radius:var(--p-r-lg);box-shadow:var(--p-sh-md)}.p-toast .ti[data-v-043da7f5]{width:20px;height:20px;border-radius:50%;display:grid;place-items:center;flex:none;margin-top:1px}.p-toast.success .ti[data-v-043da7f5]{background:var(--p-success-soft);color:var(--p-success)}.p-toast.warning .ti[data-v-043da7f5]{background:var(--p-warning-soft);color:var(--p-warning)}.p-toast .tt[data-v-043da7f5]{font-size:var(--p-font-size-base);font-weight:600;color:var(--p-text)}.p-toast .td[data-v-043da7f5]{font-size:var(--p-font-size-sm);color:var(--p-text-muted);margin-top:2px;line-height:1.45}.p-action-toast[data-v-043da7f5]{display:inline-flex;align-items:center;gap:8px;align-self:center;padding:4px 6px 4px 14px;background:var(--p-surface-raised);border:.5px solid var(--p-line);border-radius:var(--p-r-lg);box-shadow:var(--p-sh-sm);font-size:var(--p-font-size-base);color:var(--p-text);white-space:nowrap}.p-action-toast .lk[data-v-043da7f5]{border:0;padding:0;background:none;color:var(--p-accent);cursor:pointer;font:inherit}.p-action-toast .x[data-v-043da7f5]{color:var(--p-text-muted);width:14px;height:14px}.p-spinner[data-v-043da7f5]{width:18px;height:18px;animation:p-spin-043da7f5 .85s linear infinite}.p-spinner.sm[data-v-043da7f5]{width:14px;height:14px}.p-spinner circle[data-v-043da7f5]{fill:none;stroke-width:2.2;stroke-linecap:round}.p-spinner .track[data-v-043da7f5]{stroke:var(--p-line)}.p-spinner .arc[data-v-043da7f5]{stroke:var(--p-accent);stroke-dasharray:56 56;stroke-dashoffset:38}@keyframes p-spin-043da7f5{to{transform:rotate(360deg)}}.p-thinking[data-v-043da7f5]{display:inline-flex;align-items:center;gap:9px;font-size:var(--p-font-size-sm);color:var(--p-text-muted);font-family:var(--p-font-sans)}.p-bubble-user[data-v-043da7f5]{align-self:flex-end;max-width:78%;background:var(--p-user-bubble-bg);border:none;color:var(--p-text);border-radius:var(--p-r-lg);padding:10px 12px;font-size:var(--p-font-size-md);line-height:var(--p-leading-normal)}.p-msg[data-v-043da7f5]{max-width:760px;font-size:var(--p-font-size-md);line-height:var(--p-leading-relaxed);color:var(--p-text)}.p-msg p[data-v-043da7f5]{margin:0 0 10px;color:var(--p-text)}.p-msg code[data-v-043da7f5]{font-family:var(--p-font-mono);background:var(--p-surface-sunken);border:0;color:var(--p-accent-hover);padding:1px 6px;border-radius:5px;font-size:.9em}.p-code[data-v-043da7f5]{font-family:var(--p-font-mono);font-size:var(--p-font-size-sm);line-height:1.65;background:var(--p-surface-sunken);border:.5px solid var(--p-line);border-radius:var(--p-r-md);padding:11px 13px;color:var(--p-text);overflow-x:auto}.p-action[data-v-043da7f5]{border-radius:var(--p-r-lg);overflow:hidden;border:.5px solid var(--p-line);background:var(--p-surface-raised);box-shadow:var(--p-sh-menu)}.p-action-head[data-v-043da7f5]{display:flex;align-items:center;gap:9px;padding:14px 16px 0}.p-action-title[data-v-043da7f5]{font-size:var(--p-font-size-base);font-weight:600;color:var(--p-text)}.p-action-body[data-v-043da7f5]{padding:12px 16px 0;font-size:var(--p-font-size-base);color:var(--p-text);line-height:var(--p-leading-normal)}.p-action-foot[data-v-043da7f5]{display:flex;gap:8px;margin-top:12px;padding:10px 16px;border-top:.5px solid var(--p-line)}.p-opts[data-v-043da7f5]{display:flex;flex-direction:column;gap:2px;margin-top:12px;padding:12px 16px;border-top:.5px solid var(--p-line)}.p-opt[data-v-043da7f5]{display:flex;align-items:flex-start;gap:10px;padding:8px 12px;border-radius:var(--p-r-md);color:var(--p-text);font-size:var(--p-font-size-base)}.p-opt .n[data-v-043da7f5]{width:var(--p-chip-num);height:var(--p-chip-num);margin-top:calc((var(--p-font-size-base) * var(--p-leading-normal) - var(--p-chip-num)) / 2);border-radius:var(--p-r-sm);background:var(--p-surface-sunken);color:var(--p-text);font-size:var(--p-font-size-xs);font-weight:500;display:inline-flex;align-items:center;justify-content:center;flex:none}.p-opt-text[data-v-043da7f5]{display:flex;flex-direction:column;gap:2px;min-width:0}.p-opt-text .l[data-v-043da7f5]{font-weight:500}.p-opt-text .d[data-v-043da7f5]{font-size:var(--p-font-size-xs);color:var(--p-text-muted);line-height:var(--p-leading-normal)}.p-todo[data-v-043da7f5]{background:var(--p-surface-raised);border:.5px solid var(--p-line);border-radius:var(--p-r-md);padding:6px}.p-todo-row[data-v-043da7f5]{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:var(--p-r-md);font-size:var(--p-font-size-base);color:var(--p-text)}.p-todo-row.done[data-v-043da7f5]{color:var(--p-text-faint);text-decoration:line-through}.p-todo-row.active[data-v-043da7f5]{background:var(--p-accent-soft);color:var(--p-text)}.p-todo-check[data-v-043da7f5]{width:16px;flex:none;display:inline-flex;align-items:center;justify-content:center;user-select:none;color:var(--p-text-faint)}.p-todo-check svg[data-v-043da7f5]{width:14px;height:14px}.p-todo-row.active .p-todo-check[data-v-043da7f5]{color:var(--p-accent)}.p-todo-row.done .p-todo-check[data-v-043da7f5]{color:var(--p-success)}.p-todo-row.active .p-todo-check[data-v-043da7f5]{color:var(--p-accent);font-weight:500}.p-dot[data-v-043da7f5]{width:7px;height:7px;border-radius:50%;flex:none;background:var(--p-text-faint)}.p-dot.done[data-v-043da7f5]{background:var(--p-success)}.p-dot.error[data-v-043da7f5]{background:var(--p-danger)}.p-dot.running[data-v-043da7f5]{background:var(--p-accent);box-shadow:0 0 0 0 var(--p-accent-soft);animation:p-pulse-043da7f5 1.4s ease-out infinite}@keyframes p-pulse-043da7f5{0%{box-shadow:0 0 #1783ff66}to{box-shadow:0 0 0 6px #1783ff00}}.p-tool-group[data-v-043da7f5]{overflow:hidden}.p-tool-group-head[data-v-043da7f5]{display:flex;align-items:center;gap:4px;padding:4px 0;cursor:pointer;border-radius:6px;font-size:var(--p-font-size-sm);line-height:1;color:var(--p-text-faint);user-select:none;transition:color var(--p-dur) var(--p-ease)}.p-tool-group-head .tg-ic[data-v-043da7f5]{width:14px;height:14px;color:var(--p-text-faint);flex:none}.p-tool-group-head[data-v-043da7f5]:hover{color:var(--p-text)}.p-tool-group-head .tg-title[data-v-043da7f5]{font-weight:500}.p-tool-group-head .tg-meta[data-v-043da7f5]{color:var(--p-text-faint);font-weight:400}.p-tool-group-head .tg-car[data-v-043da7f5]{width:14px;height:14px;color:var(--p-text-faint);transition:transform var(--p-dur) var(--p-ease)}.p-tool-group.open .p-tool-group-head .tg-car[data-v-043da7f5]{transform:rotate(90deg)}.p-tool-row[data-v-043da7f5]{position:relative;display:flex;align-items:center;gap:4px;padding:4px 0;border-radius:6px;cursor:pointer;font-family:var(--p-font-sans);font-size:var(--p-font-size-sm);line-height:1;color:var(--p-text)}.p-tool-row .tr-ic[data-v-043da7f5]{width:14px;height:14px;color:var(--p-text-faint);flex:none}.p-tool-row .tr-name[data-v-043da7f5]{font-weight:400;color:var(--p-text-muted);flex:none}.p-tool-row .tr-file[data-v-043da7f5]{font-weight:400;color:var(--p-text);flex:none}.p-tool-row .tr-file[data-v-043da7f5]:hover{color:var(--p-accent);text-decoration:underline;text-underline-offset:3px}.p-tool-row .tr-mono[data-v-043da7f5]{font-family:var(--p-font-mono);font-size:var(--p-font-size-xs);line-height:normal;font-feature-settings:"liga" 0,"calt" 0;font-variant-ligatures:none;color:var(--p-text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.p-tool-row .tr-faint[data-v-043da7f5]{color:var(--p-text-faint);line-height:var(--leading-tight);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.p-tool-row .tr-chip[data-v-043da7f5]{margin-left:auto;color:var(--p-text-faint);font-size:var(--p-font-size-xs);flex:none}.p-tool-row .tr-add[data-v-043da7f5]{margin-left:auto;color:var(--p-success);font-family:var(--p-font-mono);font-size:var(--p-font-size-xs);flex:none}.p-tool-row .tr-add~.tr-chip[data-v-043da7f5],.p-tool-row .tr-add~.tr-add[data-v-043da7f5]{margin-left:0}.p-tool-row .tr-del[data-v-043da7f5]{color:var(--p-danger);font-family:var(--p-font-mono);font-size:var(--p-font-size-xs);flex:none}.p-tool-row .tr-bar[data-v-043da7f5]{display:inline-flex;width:36px;height:3px;border-radius:999px;overflow:hidden;gap:1px;flex:none}.p-tool-row .tr-ok[data-v-043da7f5]{color:var(--p-success);font-size:var(--p-font-size-xs);flex:none}.p-tool-row .tr-car[data-v-043da7f5]{width:13px;height:13px;color:var(--p-text-faint);flex:none;transition:transform var(--p-dur) var(--p-ease)}.p-agent-card[data-v-043da7f5]{display:flex;align-items:center;gap:8px;align-self:stretch;padding:8px 12px;background:var(--p-surface-raised);border:.5px solid var(--p-line);border-radius:var(--p-r-lg);cursor:pointer}.p-agent-card .pa-ic[data-v-043da7f5]{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:8px;background:var(--p-surface-sunken);color:var(--p-text-muted);flex:none}.p-agent-card .pa-ic svg[data-v-043da7f5]{width:14px;height:14px}.p-agent-card .pa-main[data-v-043da7f5]{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}.p-agent-card .pa-task[data-v-043da7f5]{font-size:var(--p-font-size-sm);line-height:1.4;color:var(--p-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.p-agent-card .pa-type[data-v-043da7f5]{font-size:var(--p-font-size-xs);line-height:1.4;color:var(--p-text-faint);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.p-agent-card .pa-ok[data-v-043da7f5]{color:var(--p-success);font-size:var(--p-font-size-xs);flex:none}.p-agent-card .pa-go[data-v-043da7f5]{color:var(--p-text-faint);flex:none}.p-tool-row.expanded .tr-car[data-v-043da7f5]{transform:rotate(90deg)}.p-tool-detail[data-v-043da7f5]{padding:2px 8px 4px 0}.p-tool-detail .p-code[data-v-043da7f5]{margin-top:4px}.p-composer[data-v-043da7f5]{background:var(--p-surface-raised);border:.5px solid var(--p-line-strong);border-radius:var(--p-r-composer);corner-shape:var(--p-corner-composer);box-shadow:var(--p-sh-input);overflow:hidden;position:relative;z-index:1}.p-composer[data-v-043da7f5]:after{content:"";position:absolute;inset:0;border:inherit;border-color:var(--p-composer-focus-line);border-radius:var(--p-r-composer);corner-shape:var(--p-corner-composer);opacity:0;pointer-events:none;transition:opacity var(--p-dur-slow) var(--p-ease-inout)}.p-composer[data-v-043da7f5]:focus-within:after{opacity:1}.p-composer-ta[data-v-043da7f5]{padding:14px 16px 8px;font-family:var(--p-font-sans);font-size:var(--p-font-size-md);color:var(--p-text);line-height:var(--p-leading-normal);text-autospace:normal}.p-composer-ta.ph[data-v-043da7f5]{color:var(--p-text-faint)}.p-composer-bar[data-v-043da7f5]{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:4px 8px 8px}.p-composer-strip[data-v-043da7f5]{width:100%;max-width:620px;margin-top:calc(-1 * var(--space-4));display:flex;align-items:center;gap:var(--space-2);padding:calc(var(--space-4) + var(--space-2)) var(--space-2) var(--space-2);background:color-mix(in srgb,var(--color-hover) 60%,transparent);border-radius:0 0 var(--radius-2xl) var(--radius-2xl);font-family:var(--p-font-sans);font-size:var(--p-font-size-sm);color:var(--p-text-faint);cursor:pointer}.p-composer-strip .p-ic[data-v-043da7f5]{width:16px;height:16px;color:var(--p-text-faint)}.p-composer-left[data-v-043da7f5],.p-composer-right[data-v-043da7f5]{display:flex;align-items:center;gap:4px}.p-composer .p-icon-btn[data-v-043da7f5]{border-radius:var(--p-r-full)}.p-send[data-v-043da7f5]{position:relative;width:32px;height:32px;border-radius:var(--p-r-full);display:grid;place-items:center;background:var(--p-text);color:var(--p-bg);border:none;cursor:pointer;box-shadow:var(--p-sh-xs);transition:transform var(--p-dur-fast) var(--p-ease)}.p-send[data-v-043da7f5]:after{content:"";position:absolute;inset:0;border-radius:var(--p-r-full);background:var(--p-bg);opacity:0;transition:opacity var(--p-dur-slow) var(--p-ease);pointer-events:none}.p-send[data-v-043da7f5]:hover:after{opacity:.28}.p-send[data-v-043da7f5]:active{transform:scale(.92)}.p-send .p-ic[data-v-043da7f5]{width:16px;height:16px}.p[data-v-043da7f5] ::selection,[data-p][data-v-043da7f5] ::selection{background:var(--p-selection)}.p-link[data-v-043da7f5]{color:var(--p-accent);text-decoration:none;font-family:var(--p-font-sans);transition:color var(--p-dur) var(--p-ease)}.p-link[data-v-043da7f5]:hover{color:var(--p-accent-hover);text-decoration:underline}.p-link[data-v-043da7f5]:focus-visible{outline:none;box-shadow:var(--p-focus-ring);border-radius:var(--p-r-xs)}.p-link.muted[data-v-043da7f5]{color:var(--p-text-muted)}.p-link.muted[data-v-043da7f5]:hover{color:var(--p-text)}.p-link .p-ic[data-v-043da7f5]{width:var(--p-ic-sm);height:var(--p-ic-sm);vertical-align:-2px}.p-menu[data-v-043da7f5]{background:var(--color-menu-bg);border:.5px solid var(--p-line);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);border-radius:var(--p-r-lg);box-shadow:var(--p-sh-sm);padding:3.5px;min-width:180px;font-family:var(--p-font-sans);color:var(--p-text)}.p-menu-item[data-v-043da7f5]{display:flex;align-items:center;gap:7px;padding:5px 9px;border-radius:var(--p-r-sm);font-size:var(--p-font-size-sm);color:var(--p-text);cursor:pointer;transition:background var(--p-dur) var(--p-ease),color var(--p-dur) var(--p-ease)}.p-menu-item[data-v-043da7f5]:hover{background:var(--p-hover);color:var(--p-text-strong)}.p-menu-item.active[data-v-043da7f5],.p-menu-item.active[data-v-043da7f5]:hover{background:var(--p-hover);color:var(--p-text)}.p-menu-item.danger[data-v-043da7f5]{color:var(--p-danger)}.p-menu-item.danger[data-v-043da7f5]:hover{background:var(--p-danger-soft);color:var(--p-danger)}.p-menu-item.disabled[data-v-043da7f5]{opacity:.5;cursor:not-allowed}.p-menu-item.disabled[data-v-043da7f5]:hover{background:transparent;color:var(--p-text)}.p-menu-item .p-ic[data-v-043da7f5]{width:var(--p-ic-sm);height:var(--p-ic-sm);color:var(--p-muted)}.p-menu-item:hover .p-ic[data-v-043da7f5]{color:var(--p-text-strong)}.p-menu-item.active .p-ic[data-v-043da7f5]{color:var(--p-accent-hover)}.p-menu-item.danger .p-ic[data-v-043da7f5]{color:var(--p-danger)}.p-menu-item.lg[data-v-043da7f5]{min-height:44px;padding:12px 14px;font-size:var(--p-font-size-sm)}.p-menu-sep[data-v-043da7f5]{height:1px;background:var(--p-line);margin:4px 0}.p-seg[data-v-043da7f5]{display:inline-flex;gap:2px;padding:2px;background:var(--p-surface-sunken);border:.5px solid var(--p-line);border-radius:var(--p-r-md);font-family:var(--p-font-sans)}.p-seg-item[data-v-043da7f5]{display:inline-flex;align-items:center;gap:4px;padding:5px 12px;border-radius:var(--p-r-sm);font-size:var(--p-font-size-sm);font-weight:500;color:var(--p-text);cursor:pointer;white-space:nowrap;transition:background var(--p-dur) var(--p-ease),color var(--p-dur) var(--p-ease),box-shadow var(--p-dur) var(--p-ease)}.p-seg-item[data-v-043da7f5]:hover{color:var(--p-text)}.p-seg-item.on[data-v-043da7f5]{background:var(--p-surface-raised);color:var(--p-text);box-shadow:var(--p-sh-sm)}.p-tabs[data-v-043da7f5]{display:flex;align-items:center;gap:0;border-bottom:.5px solid var(--p-line);font-family:var(--p-font-sans)}.p-tab[data-v-043da7f5]{padding:8px 14px;font-size:var(--p-font-size-sm);font-weight:500;color:var(--p-text-muted);cursor:pointer;white-space:nowrap;border-bottom:.5px solid transparent;margin-bottom:-.5px;transition:color var(--p-dur) var(--p-ease),border-color var(--p-dur) var(--p-ease)}.p-tab[data-v-043da7f5]:hover{color:var(--p-text)}.p-tab.on[data-v-043da7f5]{color:var(--p-accent);border-bottom-color:var(--p-accent)}.p-switch[data-v-043da7f5]{position:relative;display:inline-block;width:36px;height:20px;flex:none;border-radius:var(--p-r-full);background:var(--p-line-strong);cursor:pointer;transition:background var(--p-dur) var(--p-ease)}.p-switch[data-v-043da7f5]:after{content:"";position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:var(--p-r-full);background:var(--p-surface-raised);box-shadow:var(--p-sh-xs);transform-origin:left center;transition:transform var(--p-dur) var(--p-ease)}.p-switch[data-v-043da7f5]:hover:after{transform:scaleX(1.125)}.p-switch.on[data-v-043da7f5]{background:var(--p-accent)}.p-switch.on[data-v-043da7f5]:after{transform:translate(16px);transform-origin:right center}.p-switch.on[data-v-043da7f5]:hover:after{transform:translate(16px) scaleX(1.125)}.p-switch[data-v-043da7f5]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.p-check[data-v-043da7f5]{width:17px;height:17px;flex:none;display:inline-grid;place-items:center;border:.5px solid var(--p-line-strong);border-radius:var(--p-r-sm);background:var(--p-surface-raised);color:var(--p-text-on-accent);cursor:pointer;transition:background var(--p-dur) var(--p-ease),border-color var(--p-dur) var(--p-ease)}.p-check.on[data-v-043da7f5]{background:var(--p-accent);border-color:var(--p-accent)}.p-check[data-v-043da7f5]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.p-check .p-ic[data-v-043da7f5]{width:12px;height:12px}.p-avatar[data-v-043da7f5]{width:32px;height:32px;flex:none;display:grid;place-items:center;border-radius:var(--p-r-md);background:var(--p-surface-sunken);border:.5px solid var(--p-line);color:var(--p-text-muted);font-size:var(--p-font-size-sm);font-weight:600}.p-avatar.sm[data-v-043da7f5]{width:24px;height:24px;border-radius:var(--p-r-sm);font-size:var(--p-font-size-xs)}.p-avatar .p-ic[data-v-043da7f5]{width:16px;height:16px}.p-avatar.sm .p-ic[data-v-043da7f5]{width:13px;height:13px}.p-empty[data-v-043da7f5]{display:flex;flex-direction:column;align-items:center;gap:8px;padding:32px 16px;color:var(--p-text-muted);text-align:center}.p-empty .em-ic[data-v-043da7f5]{width:48px;height:48px;color:var(--p-text-faint)}.p-empty .em-title[data-v-043da7f5]{font-size:var(--p-font-size-base);font-weight:600;color:var(--p-text)}.p-empty .em-hint[data-v-043da7f5]{font-size:var(--p-font-size-sm);color:var(--p-text-muted)}.p-divider[data-v-043da7f5]{width:100%;height:1px;background:var(--p-line);border:none}.p-divider-v[data-v-043da7f5]{width:1px;align-self:stretch;background:var(--p-line);border:none}.p-turn-failed[data-v-043da7f5]{display:flex;align-items:center;gap:var(--space-2);width:100%;max-width:560px;padding:var(--space-2) var(--space-3);border:var(--p-hairline) solid var(--color-danger-bd);border-radius:var(--radius-lg);background:var(--color-danger-soft);box-shadow:var(--shadow-xs)}.p-turn-failed .tf-chip[data-v-043da7f5]{display:inline-flex;align-items:center;justify-content:center;width:var(--space-6);height:var(--space-6);flex:none;border-radius:var(--radius-md);background:var(--color-surface-raised);box-shadow:var(--shadow-xs);color:var(--color-danger)}.p-turn-failed .tf-chip svg[data-v-043da7f5]{width:var(--p-ic-sm);height:var(--p-ic-sm)}.p-turn-failed .tf-main[data-v-043da7f5]{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}.p-turn-failed .tf-title[data-v-043da7f5]{font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--color-text);line-height:var(--leading-normal)}.p-turn-failed .tf-sub[data-v-043da7f5],.p-turn-failed .tf-meta[data-v-043da7f5]{font-size:var(--text-xs);color:var(--color-text-muted);line-height:var(--leading-normal);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.p-turn-failed .tf-meta[data-v-043da7f5]{font-family:var(--font-mono);color:var(--color-text-faint)}.p-tip[data-v-043da7f5]{position:relative;display:inline-flex}.p-tip .p-tooltip[data-v-043da7f5]{position:absolute;bottom:calc(100% + 6px);left:50%;transform:translate(-50%);background:var(--p-text);color:var(--p-bg);font-size:var(--p-font-size-xs);padding:4px 8px;border-radius:var(--p-r-sm);white-space:nowrap;opacity:0;pointer-events:none;transition:opacity var(--p-dur-fast) var(--p-ease)}.p-tip:hover .p-tooltip[data-v-043da7f5]{opacity:1}.p-banner[data-v-043da7f5]{display:flex;align-items:center;gap:10px;padding:10px 14px;border-radius:var(--p-r-md);border:.5px solid var(--p-line);background:var(--p-surface);font-size:var(--p-font-size-sm);color:var(--p-text)}.p-banner .bn-ic[data-v-043da7f5]{width:18px;height:18px;flex:none}.p-banner.info[data-v-043da7f5]{background:var(--p-accent-soft);border-color:var(--p-accent-bd)}.p-banner.info .bn-ic[data-v-043da7f5]{color:var(--p-accent)}.p-banner.warning[data-v-043da7f5]{background:var(--p-warning-soft);border-color:var(--p-warning-bd)}.p-banner.warning .bn-ic[data-v-043da7f5]{color:var(--p-warning)}.p-banner.danger[data-v-043da7f5]{background:var(--p-danger-soft);border-color:var(--p-danger-bd)}.p-banner.danger .bn-ic[data-v-043da7f5]{color:var(--p-danger)}.p-sheet[data-v-043da7f5]{background:var(--p-surface-raised);border:.5px solid var(--p-line);border-radius:var(--p-r-xl) var(--p-r-xl) 0 0;box-shadow:var(--p-sh-xl);padding:8px 16px 20px}.p-sheet-handle[data-v-043da7f5]{width:36px;height:4px;border-radius:var(--p-r-full);background:var(--p-line-strong);margin:0 auto 8px}.p-skeleton[data-v-043da7f5]{background:var(--p-surface-sunken);border-radius:var(--p-r-sm);animation:p-skel-043da7f5 1.2s var(--p-ease-inout) infinite alternate}@keyframes p-skel-043da7f5{0%{opacity:.5}to{opacity:1}}.p-cmdbar[data-v-043da7f5]{display:flex;align-items:center;gap:8px;width:100%}.p-cmd[data-v-043da7f5]{flex:1;min-width:0;height:38px;display:flex;align-items:center;gap:10px;padding:0 10px 0 14px;background:var(--p-surface-sunken);border:.5px solid var(--p-line);border-radius:var(--p-r-md);font-family:var(--p-font-mono);font-size:var(--p-font-size-sm);color:var(--p-text-muted)}.p-cmd .cmd-text[data-v-043da7f5]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.p-cmd .cmd-copy[data-v-043da7f5]{margin-left:auto;flex:none;display:grid;place-items:center;width:26px;height:26px;border:none;background:transparent;border-radius:var(--p-r-sm);color:var(--p-text-faint);cursor:pointer;transition:background var(--p-dur) var(--p-ease),color var(--p-dur) var(--p-ease)}.p-cmd .cmd-copy[data-v-043da7f5]:hover{background:var(--p-surface-raised);color:var(--p-text)}.p-cmd .cmd-copy .p-ic[data-v-043da7f5]{width:15px;height:15px}.p-topbar[data-v-043da7f5]{display:flex;align-items:center;justify-content:space-between;gap:12px;height:48px;padding:0 16px;background:var(--p-surface-raised);border:.5px solid var(--p-line);border-radius:var(--p-r-lg)}.p-topbar .tb-title[data-v-043da7f5]{font-size:var(--p-font-size-sm);font-weight:600;color:var(--p-text)}.p-topbar .tb-actions[data-v-043da7f5]{display:flex;align-items:center;gap:4px}.p-topbar.frost[data-v-043da7f5]{background:#ffffffb8;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border-color:#fff9}[data-p=dark] .p-topbar.frost[data-v-043da7f5]{background:#161b22b8;border-color:#ffffff14}.demo-row[data-v-043da7f5]{display:flex;flex-wrap:wrap;align-items:center;gap:10px}.demo-stack[data-v-043da7f5]{display:flex;flex-direction:column;gap:12px;width:100%}.demo-col[data-v-043da7f5]{display:flex;flex-direction:column;gap:10px}.demo-grow[data-v-043da7f5]{flex:1;min-width:0}.demo-chat[data-v-043da7f5]{display:flex;flex-direction:column;gap:14px;width:100%;max-width:560px}.icon-grid[data-v-043da7f5]{display:grid;grid-template-columns:repeat(auto-fill,minmax(132px,1fr));gap:8px;margin:14px 0}.icon-group-label[data-v-043da7f5]{grid-column:1 / -1;margin-top:10px;font-size:11px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--d-fg-muted)}.icon-cell[data-v-043da7f5]{display:flex;align-items:center;gap:10px;padding:8px 10px;border:.5px solid var(--d-line);border-radius:8px;background:var(--d-surface)}.icon-cell .kw-icon[data-v-043da7f5]{width:20px;height:20px;color:var(--d-fg-soft)}.icon-cell .ic-name[data-v-043da7f5]{font-family:JetBrains Mono,ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:12px;color:var(--d-fg)}.icon-sizes[data-v-043da7f5]{display:flex;align-items:end;gap:22px;flex-wrap:wrap}.icon-sizes .sz[data-v-043da7f5]{display:flex;flex-direction:column;align-items:center;gap:8px;font-size:11px;color:var(--d-fg-muted);font-family:JetBrains Mono,ui-monospace,monospace}.p-code-inline[data-v-043da7f5]{font-family:var(--p-font-mono);background:var(--p-surface-sunken);color:var(--p-text);padding:0 5px;border-radius:var(--p-r-sm);font-size:.9em}.p-code-block[data-v-043da7f5]{border:.5px solid var(--p-line);border-radius:var(--p-r-md);overflow:hidden;background:var(--p-surface-sunken)}.p-code-block-head[data-v-043da7f5]{display:flex;align-items:center;justify-content:space-between;padding:8px 12px;background:var(--p-surface);border-bottom:.5px solid var(--p-line);font-family:var(--p-font-mono);font-size:var(--p-font-size-xs);color:var(--p-text-muted)}.p-code-block pre[data-v-043da7f5]{margin:0;padding:12px 14px;font-family:var(--p-font-mono);font-size:var(--p-font-size-sm);line-height:1.65;color:var(--p-text);overflow-x:auto}.p-diff[data-v-043da7f5]{border:.5px solid var(--p-line);border-radius:var(--p-r-md);overflow:hidden;font-family:var(--p-font-mono);font-size:var(--p-font-size-sm)}.p-diff-head[data-v-043da7f5]{padding:8px 12px;background:var(--p-surface);border-bottom:.5px solid var(--p-line);font-size:var(--p-font-size-xs);color:var(--p-text-muted)}.p-diff-row[data-v-043da7f5]{display:flex;gap:10px;padding:2px 12px;line-height:1.6}.p-diff-row .pm[data-v-043da7f5]{width:14px;flex:none;color:var(--p-text-faint)}.p-diff-row.add[data-v-043da7f5]{background:var(--p-success-soft)}.p-diff-row.add .pm[data-v-043da7f5]{color:var(--p-success)}.p-diff-row.del[data-v-043da7f5]{background:var(--p-danger-soft)}.p-diff-row.del .pm[data-v-043da7f5]{color:var(--p-danger)}.p-diff-row .p-diff-code[data-v-043da7f5]{color:var(--p-text)}.p-field-error[data-v-043da7f5]{color:var(--p-danger);font-size:var(--p-font-size-xs)}.p-btn .p-spinner[data-v-043da7f5]{vertical-align:middle}.p-btn .p-spinner .track[data-v-043da7f5]{stroke:currentColor;opacity:.35}.p-btn .p-spinner .arc[data-v-043da7f5]{stroke:currentColor}.ds-page[data-v-043da7f5]{position:fixed;inset:0;z-index:var(--z-max);overflow-y:auto}.ds-topbar[data-v-043da7f5]{position:sticky;top:0;z-index:10;display:flex;align-items:center;gap:var(--space-3);padding:var(--space-2) var(--space-4);background:var(--color-surface);border-bottom:.5px solid var(--color-line)}.ds-back[data-v-043da7f5]{display:inline-flex;align-items:center;gap:var(--space-1);padding:var(--space-1) var(--space-3);border:.5px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-surface-raised);color:var(--color-text);font-family:var(--font-ui);font-size:var(--text-sm);cursor:pointer}.ds-back[data-v-043da7f5]:hover{background:var(--color-hover)}.ds-topbar-title[data-v-043da7f5]{font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--color-text-muted)} diff --git a/apps/kimi-code/dist-web/assets/Tooltip-DP9j1yrm.js b/apps/kimi-code/dist-web/assets/Tooltip-CPKMqLZA.js similarity index 98% rename from apps/kimi-code/dist-web/assets/Tooltip-DP9j1yrm.js rename to apps/kimi-code/dist-web/assets/Tooltip-CPKMqLZA.js index 2ed1efd11d..e6d65f8ebf 100644 --- a/apps/kimi-code/dist-web/assets/Tooltip-DP9j1yrm.js +++ b/apps/kimi-code/dist-web/assets/Tooltip-CPKMqLZA.js @@ -1 +1 @@ -import{bQ as A,M as H,aU as b,bE as V,az as J,aL as O,s as Q,v as R,I as F,bJ as G,bL as K,aw as L,H as W,bb as Z,bB as ee,g as te,au as le,T as ae,as as B,bR as ne}from"./index-B-HzRssS.js";var k=(h,E,e)=>new Promise((o,p)=>{var i=a=>{try{d(e.next(a))}catch(c){p(c)}},y=a=>{try{d(e.throw(a))}catch(c){p(c)}},d=a=>a.done?o(a.value):Promise.resolve(a.value).then(i,y);d((e=e.apply(h,E)).next())});const oe=["id"],ie=["data-placement"],ue=A(H({__name:"Tooltip",props:{visible:{type:Boolean},anchorEl:{},content:{},placement:{},offset:{},originX:{},originY:{},id:{},isDark:{type:[Boolean,null]}},setup(h){var E;const e=h,o=b(null),p=b(null),i=b({transform:"translate3d(0px, 0px, 0px)",left:"0px",top:"0px"}),y=b({}),d=b((E=e.placement)!=null?E:"top"),a=b(!1);let c=null,$=null,T=null,C=null,w=null,s=0;function X(){return C?Promise.resolve(C):(w||(w=ne(()=>import("./floating-ui.dom-xGUaHE3m.js"),[]).then(l=>(C=l,l)).catch(l=>{throw w=null,l})),w)}function D(){c&&(c(),c=null),$=null,T=null}function P(l){return k(this,null,function*(){const t=e.anchorEl,n=o.value;if(!e.visible||!t||!n||$===t&&T===n)return;const{autoUpdate:r}=yield X();l()&&e.visible&&e.anchorEl===t&&o.value===n&&(D(),$=t,T=n,c=r(t,n,()=>{N().catch(()=>{_()})}))})}function N(){return k(this,null,function*(){var l,t;const n=e.anchorEl,r=o.value;if(!e.visible||!n||!r)return!1;const{arrow:u,computePosition:m,flip:v,offset:f,shift:x}=yield X();if(!e.visible||e.anchorEl!==n||o.value!==r)return!1;const g=[f((l=e.offset)!=null?l:6),v(),x({padding:6}),...p.value?[u({element:p.value,padding:4})]:[]],{x:S,y:j,placement:Y,middlewareData:z}=yield m(n,r,{placement:(t=e.placement)!=null?t:"top",middleware:g,strategy:"fixed"});if(!e.visible||e.anchorEl!==n||o.value!==r)return!1;if(i.value.transform=`translate3d(${Math.round(S)}px, ${Math.round(j)}px, 0)`,i.value.left="0px",i.value.top="0px",d.value=Y,z.arrow&&p.value){const{x:I,y:U}=z.arrow,q={top:"bottom",bottom:"top",left:"right",right:"left"}[Y.split("-")[0]];y.value={left:I!=null?`${I}px`:"",top:U!=null?`${U}px`:"",[q]:"-3px"}}return!0})}function _(){var l,t;const n=e.anchorEl,r=o.value;if(!n||!r)return!1;const u=n.getBoundingClientRect(),m=r.getBoundingClientRect(),v=(l=e.offset)!=null?l:6,f=(t=e.placement)!=null?t:"top";let x=u.left,g=u.top;return f==="bottom"?g=u.bottom+v:f==="left"?x=u.left-m.width-v:f==="right"?x=u.right+v:g=u.top-m.height-v,i.value.transform=`translate3d(${Math.round(Math.max(0,x))}px, ${Math.round(Math.max(0,g))}px, 0)`,i.value.left="0px",i.value.top="0px",d.value=f,y.value={},!0}V(()=>e.visible,l=>k(null,null,function*(){const t=++s;if(l){if(a.value=!1,yield B(),t!==s||!e.visible)return;if(e.anchorEl&&o.value)try{const n=e.anchorEl,r=o.value,u=n.getBoundingClientRect();if(!(yield N())||t!==s||!e.visible||e.anchorEl!==n||o.value!==r)return;const m=i.value.transform;if(e.originX!=null&&e.originY!=null){const v=Math.abs(Number(e.originX)-u.left),f=Math.abs(Number(e.originY)-u.top);if(Math.hypot(v,f)>120){if(i.value.transform=`translate3d(${Math.round(e.originX)}px, ${Math.round(e.originY)}px, 0)`,yield B(),t!==s||!e.visible||(a.value=!0,yield B(),t!==s||!e.visible))return;i.value.transform=m}else a.value=!0}else a.value=!0;yield P(()=>t===s)}catch{if(t!==s||!e.visible)return;if(a.value=_(),e.anchorEl&&o.value)try{yield P(()=>t===s)}catch{}}else a.value=!0}else a.value=!1,D()}));let M=0;return V([()=>e.anchorEl,()=>e.placement,()=>e.content],()=>k(null,null,function*(){const l=++M;if(e.visible&&e.anchorEl&&o.value){if(yield B(),l!==M||!e.visible||!e.anchorEl||!o.value)return;try{const t=yield N();if(l!==M||!e.visible||!e.anchorEl||!o.value)return;t||_()}catch{_()}yield P(()=>l===M)}})),J(()=>{s+=1,D()}),(l,t)=>(O(),Q(ae,{to:"body"},[R("div",{class:le(["markstream-vue",{dark:h.isDark}])},[F(te,{name:"tooltip",appear:""},{default:G(()=>[K(R("div",{id:e.id,ref_key:"tooltip",ref:o,style:L({position:"fixed",left:i.value.left,top:i.value.top,transform:i.value.transform,visibility:a.value?"visible":"hidden",pointerEvents:a.value?void 0:"none"}),class:"tooltip-element",role:"tooltip"},[W(Z(h.content)+" ",1),R("div",{ref_key:"arrowEl",ref:p,class:"tooltip-arrow","data-placement":d.value,style:L(y.value)},null,12,ie)],12,oe),[[ee,h.visible]])]),_:1})],2)]))}}),[["__scopeId","data-v-c606ee4c"]]);export{ue as default}; +import{bQ as A,M as H,aU as b,bE as V,az as J,aL as O,s as Q,v as R,I as F,bJ as G,bL as K,aw as L,H as W,bb as Z,bB as ee,g as te,au as le,T as ae,as as B,bR as ne}from"./index-HRJ6xRtC.js";var k=(h,E,e)=>new Promise((o,p)=>{var i=a=>{try{d(e.next(a))}catch(c){p(c)}},y=a=>{try{d(e.throw(a))}catch(c){p(c)}},d=a=>a.done?o(a.value):Promise.resolve(a.value).then(i,y);d((e=e.apply(h,E)).next())});const oe=["id"],ie=["data-placement"],ue=A(H({__name:"Tooltip",props:{visible:{type:Boolean},anchorEl:{},content:{},placement:{},offset:{},originX:{},originY:{},id:{},isDark:{type:[Boolean,null]}},setup(h){var E;const e=h,o=b(null),p=b(null),i=b({transform:"translate3d(0px, 0px, 0px)",left:"0px",top:"0px"}),y=b({}),d=b((E=e.placement)!=null?E:"top"),a=b(!1);let c=null,$=null,T=null,C=null,w=null,s=0;function X(){return C?Promise.resolve(C):(w||(w=ne(()=>import("./floating-ui.dom-xGUaHE3m.js"),[]).then(l=>(C=l,l)).catch(l=>{throw w=null,l})),w)}function D(){c&&(c(),c=null),$=null,T=null}function P(l){return k(this,null,function*(){const t=e.anchorEl,n=o.value;if(!e.visible||!t||!n||$===t&&T===n)return;const{autoUpdate:r}=yield X();l()&&e.visible&&e.anchorEl===t&&o.value===n&&(D(),$=t,T=n,c=r(t,n,()=>{N().catch(()=>{_()})}))})}function N(){return k(this,null,function*(){var l,t;const n=e.anchorEl,r=o.value;if(!e.visible||!n||!r)return!1;const{arrow:u,computePosition:m,flip:v,offset:f,shift:x}=yield X();if(!e.visible||e.anchorEl!==n||o.value!==r)return!1;const g=[f((l=e.offset)!=null?l:6),v(),x({padding:6}),...p.value?[u({element:p.value,padding:4})]:[]],{x:S,y:j,placement:Y,middlewareData:z}=yield m(n,r,{placement:(t=e.placement)!=null?t:"top",middleware:g,strategy:"fixed"});if(!e.visible||e.anchorEl!==n||o.value!==r)return!1;if(i.value.transform=`translate3d(${Math.round(S)}px, ${Math.round(j)}px, 0)`,i.value.left="0px",i.value.top="0px",d.value=Y,z.arrow&&p.value){const{x:I,y:U}=z.arrow,q={top:"bottom",bottom:"top",left:"right",right:"left"}[Y.split("-")[0]];y.value={left:I!=null?`${I}px`:"",top:U!=null?`${U}px`:"",[q]:"-3px"}}return!0})}function _(){var l,t;const n=e.anchorEl,r=o.value;if(!n||!r)return!1;const u=n.getBoundingClientRect(),m=r.getBoundingClientRect(),v=(l=e.offset)!=null?l:6,f=(t=e.placement)!=null?t:"top";let x=u.left,g=u.top;return f==="bottom"?g=u.bottom+v:f==="left"?x=u.left-m.width-v:f==="right"?x=u.right+v:g=u.top-m.height-v,i.value.transform=`translate3d(${Math.round(Math.max(0,x))}px, ${Math.round(Math.max(0,g))}px, 0)`,i.value.left="0px",i.value.top="0px",d.value=f,y.value={},!0}V(()=>e.visible,l=>k(null,null,function*(){const t=++s;if(l){if(a.value=!1,yield B(),t!==s||!e.visible)return;if(e.anchorEl&&o.value)try{const n=e.anchorEl,r=o.value,u=n.getBoundingClientRect();if(!(yield N())||t!==s||!e.visible||e.anchorEl!==n||o.value!==r)return;const m=i.value.transform;if(e.originX!=null&&e.originY!=null){const v=Math.abs(Number(e.originX)-u.left),f=Math.abs(Number(e.originY)-u.top);if(Math.hypot(v,f)>120){if(i.value.transform=`translate3d(${Math.round(e.originX)}px, ${Math.round(e.originY)}px, 0)`,yield B(),t!==s||!e.visible||(a.value=!0,yield B(),t!==s||!e.visible))return;i.value.transform=m}else a.value=!0}else a.value=!0;yield P(()=>t===s)}catch{if(t!==s||!e.visible)return;if(a.value=_(),e.anchorEl&&o.value)try{yield P(()=>t===s)}catch{}}else a.value=!0}else a.value=!1,D()}));let M=0;return V([()=>e.anchorEl,()=>e.placement,()=>e.content],()=>k(null,null,function*(){const l=++M;if(e.visible&&e.anchorEl&&o.value){if(yield B(),l!==M||!e.visible||!e.anchorEl||!o.value)return;try{const t=yield N();if(l!==M||!e.visible||!e.anchorEl||!o.value)return;t||_()}catch{_()}yield P(()=>l===M)}})),J(()=>{s+=1,D()}),(l,t)=>(O(),Q(ae,{to:"body"},[R("div",{class:le(["markstream-vue",{dark:h.isDark}])},[F(te,{name:"tooltip",appear:""},{default:G(()=>[K(R("div",{id:e.id,ref_key:"tooltip",ref:o,style:L({position:"fixed",left:i.value.left,top:i.value.top,transform:i.value.transform,visibility:a.value?"visible":"hidden",pointerEvents:a.value?void 0:"none"}),class:"tooltip-element",role:"tooltip"},[W(Z(h.content)+" ",1),R("div",{ref_key:"arrowEl",ref:p,class:"tooltip-arrow","data-placement":d.value,style:L(y.value)},null,12,ie)],12,oe),[[ee,h.visible]])]),_:1})],2)]))}}),[["__scopeId","data-v-c606ee4c"]]);export{ue as default}; diff --git a/apps/kimi-code/dist-web/assets/abnfDiagram-VRR7QNED-BHRZ0kDP.js b/apps/kimi-code/dist-web/assets/abnfDiagram-VRR7QNED-D_3zPyPt.js similarity index 86% rename from apps/kimi-code/dist-web/assets/abnfDiagram-VRR7QNED-BHRZ0kDP.js rename to apps/kimi-code/dist-web/assets/abnfDiagram-VRR7QNED-D_3zPyPt.js index b93f799d14..f2f785dd20 100644 --- a/apps/kimi-code/dist-web/assets/abnfDiagram-VRR7QNED-BHRZ0kDP.js +++ b/apps/kimi-code/dist-web/assets/abnfDiagram-VRR7QNED-D_3zPyPt.js @@ -1 +1 @@ -import{g as p,r as u,d as a}from"./chunk-MOJQB5TN-CAYle-Q0.js";import{p as f}from"./chunk-JWPE2WC7-BiIZjhuH.js";import{_ as n,l as o}from"./mermaid.core-BMAf1qng.js";import{M as c,b as d}from"./cynefin-VYW2F7L2-B2u2H2Wf.js";import"./index-B-HzRssS.js";import"./_commonjsHelpers-CqkleIqs.js";var v=d().RailroadAbnf.parser.LangiumParser,i=n(e=>{const r=e.alternatives.map(g);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformAlternation"),g=n(e=>{const r=e.elements.map(y);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformConcatenation"),b=n(e=>{if(e.includes("*")){const[t,s]=e.split("*"),l=t?parseInt(t,10):0,m=s?parseInt(s,10):1/0;return{min:l,max:m}}const r=parseInt(e,10);return{min:r,max:r}},"parseRepeat"),y=n(e=>{const r=A(e.primary);if(!e.repeat)return r;const{min:t,max:s}=b(e.repeat);return t===0&&s===1?{type:"optional",element:r}:{type:"repetition",element:r,min:t,max:s}},"transformElement"),A=n(e=>{switch(e.$type){case"AbnfStringLiteral":return{type:"terminal",value:e.value};case"AbnfNumVal":return{type:"terminal",value:e.value};case"AbnfRuleName":return{type:"nonterminal",name:e.name};case"AbnfGroup":return i(e.element);case"AbnfOptionalGroup":return{type:"optional",element:i(e.element)};default:throw new Error(`Unsupported ABNF primary node: ${e.$type}`)}},"transformPrimary"),P=n(e=>({name:e.name,definition:i(e.definition)}),"transformRule"),h=n(e=>{f(e,a),e.title&&a.setTitle(e.title),e.rules.map(r=>a.addRule(P(r)))},"populateDb"),R={parse:n(e=>{a.clear(),o.debug("[ABNF Parser] Starting Langium parse");const r=v.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new c(r);const t=r.value;o.debug("[ABNF Parser] Parsed rules:",t.rules.length),h(t),o.debug("[ABNF Parser] Parse complete")},"parse"),parser:{yy:a}},F={parser:R,db:a,renderer:u,styles:p};export{F as diagram}; +import{g as p,r as u,d as a}from"./chunk-MOJQB5TN-hIDvr-8C.js";import{p as f}from"./chunk-JWPE2WC7-DTx-f56M.js";import{_ as n,l as o}from"./mermaid.core-Cahi9cr1.js";import{M as c,b as d}from"./cynefin-VYW2F7L2-C5gNr-Q4.js";import"./index-HRJ6xRtC.js";import"./_commonjsHelpers-CqkleIqs.js";var v=d().RailroadAbnf.parser.LangiumParser,i=n(e=>{const r=e.alternatives.map(g);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformAlternation"),g=n(e=>{const r=e.elements.map(y);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformConcatenation"),b=n(e=>{if(e.includes("*")){const[t,s]=e.split("*"),l=t?parseInt(t,10):0,m=s?parseInt(s,10):1/0;return{min:l,max:m}}const r=parseInt(e,10);return{min:r,max:r}},"parseRepeat"),y=n(e=>{const r=A(e.primary);if(!e.repeat)return r;const{min:t,max:s}=b(e.repeat);return t===0&&s===1?{type:"optional",element:r}:{type:"repetition",element:r,min:t,max:s}},"transformElement"),A=n(e=>{switch(e.$type){case"AbnfStringLiteral":return{type:"terminal",value:e.value};case"AbnfNumVal":return{type:"terminal",value:e.value};case"AbnfRuleName":return{type:"nonterminal",name:e.name};case"AbnfGroup":return i(e.element);case"AbnfOptionalGroup":return{type:"optional",element:i(e.element)};default:throw new Error(`Unsupported ABNF primary node: ${e.$type}`)}},"transformPrimary"),P=n(e=>({name:e.name,definition:i(e.definition)}),"transformRule"),h=n(e=>{f(e,a),e.title&&a.setTitle(e.title),e.rules.map(r=>a.addRule(P(r)))},"populateDb"),R={parse:n(e=>{a.clear(),o.debug("[ABNF Parser] Starting Langium parse");const r=v.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new c(r);const t=r.value;o.debug("[ABNF Parser] Parsed rules:",t.rules.length),h(t),o.debug("[ABNF Parser] Parse complete")},"parse"),parser:{yy:a}},F={parser:R,db:a,renderer:u,styles:p};export{F as diagram}; diff --git a/apps/kimi-code/dist-web/assets/arc-DC-qDOw3.js b/apps/kimi-code/dist-web/assets/arc-E_7M-TWh.js similarity index 98% rename from apps/kimi-code/dist-web/assets/arc-DC-qDOw3.js rename to apps/kimi-code/dist-web/assets/arc-E_7M-TWh.js index b141f61b31..0992f956d3 100644 --- a/apps/kimi-code/dist-web/assets/arc-DC-qDOw3.js +++ b/apps/kimi-code/dist-web/assets/arc-E_7M-TWh.js @@ -1 +1 @@ -import{G as ln,H as un,I as N,J as I,K as J,L as an,M as y,N as tn,O as j,P as _,Q as rn,R as o,S as on,T as sn,V as fn}from"./mermaid.core-BMAf1qng.js";function cn(l){return l.innerRadius}function yn(l){return l.outerRadius}function gn(l){return l.startAngle}function dn(l){return l.endAngle}function mn(l){return l&&l.padAngle}function pn(l,h,q,O,v,R,K,u){var D=q-l,i=O-h,n=K-v,d=u-R,a=d*D-n*i;if(!(a*ar*r+M*M&&(G=w,H=p),{cx:G,cy:H,x01:-n,y01:-d,x11:G*(v/T-1),y11:H*(v/T-1)}}function hn(){var l=cn,h=yn,q=J(0),O=null,v=gn,R=dn,K=mn,u=null,D=ln(i);function i(){var n,d,a=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-an,c=R.apply(this,arguments)-an,L=rn(c-f),t=c>f;if(u||(u=n=D()),sy))u.moveTo(0,0);else if(L>tn-y)u.moveTo(s*N(f),s*I(f)),u.arc(0,0,s,f,c,!t),a>y&&(u.moveTo(a*N(c),a*I(c)),u.arc(0,0,a,c,f,t));else{var m=f,g=c,A=f,T=c,P=L,E=L,G=K.apply(this,arguments)/2,H=G>y&&(O?+O.apply(this,arguments):j(a*a+s*s)),w=_(rn(s-a)/2,+q.apply(this,arguments)),p=w,x=w,e,r;if(H>y){var M=sn(H/a*I(G)),z=sn(H/s*I(G));(P-=M*2)>y?(M*=t?1:-1,A+=M,T-=M):(P=0,A=T=(f+c)/2),(E-=z*2)>y?(z*=t?1:-1,m+=z,g-=z):(E=0,m=g=(f+c)/2)}var Q=s*N(m),V=s*I(m),B=a*N(T),C=a*I(T);if(w>y){var F=s*N(g),U=s*I(g),X=a*N(A),Y=a*I(A),S;if(Ly?x>y?(e=W(X,Y,Q,V,s,x,t),r=W(F,U,B,C,s,x,t),u.moveTo(e.cx+e.x01,e.cy+e.y01),xy)||!(P>y)?u.lineTo(B,C):p>y?(e=W(B,C,F,U,a,-p,t),r=W(Q,V,X,Y,a,-p,t),u.lineTo(e.cx+e.x01,e.cy+e.y01),pr*r+M*M&&(G=w,H=p),{cx:G,cy:H,x01:-n,y01:-d,x11:G*(v/T-1),y11:H*(v/T-1)}}function hn(){var l=cn,h=yn,q=J(0),O=null,v=gn,R=dn,K=mn,u=null,D=ln(i);function i(){var n,d,a=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-an,c=R.apply(this,arguments)-an,L=rn(c-f),t=c>f;if(u||(u=n=D()),sy))u.moveTo(0,0);else if(L>tn-y)u.moveTo(s*N(f),s*I(f)),u.arc(0,0,s,f,c,!t),a>y&&(u.moveTo(a*N(c),a*I(c)),u.arc(0,0,a,c,f,t));else{var m=f,g=c,A=f,T=c,P=L,E=L,G=K.apply(this,arguments)/2,H=G>y&&(O?+O.apply(this,arguments):j(a*a+s*s)),w=_(rn(s-a)/2,+q.apply(this,arguments)),p=w,x=w,e,r;if(H>y){var M=sn(H/a*I(G)),z=sn(H/s*I(G));(P-=M*2)>y?(M*=t?1:-1,A+=M,T-=M):(P=0,A=T=(f+c)/2),(E-=z*2)>y?(z*=t?1:-1,m+=z,g-=z):(E=0,m=g=(f+c)/2)}var Q=s*N(m),V=s*I(m),B=a*N(T),C=a*I(T);if(w>y){var F=s*N(g),U=s*I(g),X=a*N(A),Y=a*I(A),S;if(Ly?x>y?(e=W(X,Y,Q,V,s,x,t),r=W(F,U,B,C,s,x,t),u.moveTo(e.cx+e.x01,e.cy+e.y01),xy)||!(P>y)?u.lineTo(B,C):p>y?(e=W(B,C,F,U,a,-p,t),r=W(Q,V,X,Y,a,-p,t),u.lineTo(e.cx+e.x01,e.cy+e.y01),ps?(this.rect.x-=(this.labelWidth-s)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(s+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(o+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>o?(this.rect.y-=(this.labelHeight-o)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(o+this.labelHeight))}}},e.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==h.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},e.prototype.transform=function(t){var s=this.rect.x;s>r.WORLD_BOUNDARY?s=r.WORLD_BOUNDARY:s<-r.WORLD_BOUNDARY&&(s=-r.WORLD_BOUNDARY);var o=this.rect.y;o>r.WORLD_BOUNDARY?o=r.WORLD_BOUNDARY:o<-r.WORLD_BOUNDARY&&(o=-r.WORLD_BOUNDARY);var c=new f(s,o),l=t.inverseTransformPoint(c);this.setLocation(l.x,l.y)},e.prototype.getLeft=function(){return this.rect.x},e.prototype.getRight=function(){return this.rect.x+this.rect.width},e.prototype.getTop=function(){return this.rect.y},e.prototype.getBottom=function(){return this.rect.y+this.rect.height},e.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},A.exports=e}),(function(A,G,N){var v=N(0);function h(){}for(var i in v)h[i]=v[i];h.MAX_ITERATIONS=2500,h.DEFAULT_EDGE_LENGTH=50,h.DEFAULT_SPRING_STRENGTH=.45,h.DEFAULT_REPULSION_STRENGTH=4500,h.DEFAULT_GRAVITY_STRENGTH=.4,h.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,h.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,h.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,h.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,h.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,h.COOLING_ADAPTATION_FACTOR=.33,h.ADAPTATION_LOWER_NODE_LIMIT=1e3,h.ADAPTATION_UPPER_NODE_LIMIT=5e3,h.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,h.MAX_NODE_DISPLACEMENT=h.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,h.MIN_REPULSION_DIST=h.DEFAULT_EDGE_LENGTH/10,h.CONVERGENCE_CHECK_PERIOD=100,h.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,h.MIN_EDGE_LENGTH=1,h.GRID_CALCULATION_CHECK_PERIOD=10,A.exports=h}),(function(A,G,N){function v(h,i){h==null&&i==null?(this.x=0,this.y=0):(this.x=h,this.y=i)}v.prototype.getX=function(){return this.x},v.prototype.getY=function(){return this.y},v.prototype.setX=function(h){this.x=h},v.prototype.setY=function(h){this.y=h},v.prototype.getDifference=function(h){return new DimensionD(this.x-h.x,this.y-h.y)},v.prototype.getCopy=function(){return new v(this.x,this.y)},v.prototype.translate=function(h){return this.x+=h.width,this.y+=h.height,this},A.exports=v}),(function(A,G,N){var v=N(2),h=N(10),i=N(0),r=N(7),a=N(3),f=N(1),e=N(13),u=N(12),t=N(11);function s(c,l,T){v.call(this,T),this.estimatedSize=h.MIN_VALUE,this.margin=i.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=c,l!=null&&l instanceof r?this.graphManager=l:l!=null&&l instanceof Layout&&(this.graphManager=l.graphManager)}s.prototype=Object.create(v.prototype);for(var o in v)s[o]=v[o];s.prototype.getNodes=function(){return this.nodes},s.prototype.getEdges=function(){return this.edges},s.prototype.getGraphManager=function(){return this.graphManager},s.prototype.getParent=function(){return this.parent},s.prototype.getLeft=function(){return this.left},s.prototype.getRight=function(){return this.right},s.prototype.getTop=function(){return this.top},s.prototype.getBottom=function(){return this.bottom},s.prototype.isConnected=function(){return this.isConnected},s.prototype.add=function(c,l,T){if(l==null&&T==null){var g=c;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(g)>-1)throw"Node already in graph!";return g.owner=this,this.getNodes().push(g),g}else{var d=c;if(!(this.getNodes().indexOf(l)>-1&&this.getNodes().indexOf(T)>-1))throw"Source or target not in graph!";if(!(l.owner==T.owner&&l.owner==this))throw"Both owners must be this graph!";return l.owner!=T.owner?null:(d.source=l,d.target=T,d.isInterGraph=!1,this.getEdges().push(d),l.edges.push(d),T!=l&&T.edges.push(d),d)}},s.prototype.remove=function(c){var l=c;if(c instanceof a){if(l==null)throw"Node is null!";if(!(l.owner!=null&&l.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var T=l.edges.slice(),g,d=T.length,C=0;C-1&&P>-1))throw"Source and/or target doesn't know this edge!";g.source.edges.splice(w,1),g.target!=g.source&&g.target.edges.splice(P,1);var S=g.source.owner.getEdges().indexOf(g);if(S==-1)throw"Not in owner's edge list!";g.source.owner.getEdges().splice(S,1)}},s.prototype.updateLeftTop=function(){for(var c=h.MAX_VALUE,l=h.MAX_VALUE,T,g,d,C=this.getNodes(),S=C.length,w=0;wT&&(c=T),l>g&&(l=g)}return c==h.MAX_VALUE?null:(C[0].getParent().paddingLeft!=null?d=C[0].getParent().paddingLeft:d=this.margin,this.left=l-d,this.top=c-d,new u(this.left,this.top))},s.prototype.updateBounds=function(c){for(var l=h.MAX_VALUE,T=-h.MAX_VALUE,g=h.MAX_VALUE,d=-h.MAX_VALUE,C,S,w,P,B,U=this.nodes,V=U.length,M=0;MC&&(l=C),Tw&&(g=w),dC&&(l=C),Tw&&(g=w),d=this.nodes.length){var V=0;T.forEach(function(M){M.owner==c&&V++}),V==this.nodes.length&&(this.isConnected=!0)}},A.exports=s}),(function(A,G,N){var v,h=N(1);function i(r){v=N(6),this.layout=r,this.graphs=[],this.edges=[]}i.prototype.addRoot=function(){var r=this.layout.newGraph(),a=this.layout.newNode(null),f=this.add(r,a);return this.setRootGraph(f),this.rootGraph},i.prototype.add=function(r,a,f,e,u){if(f==null&&e==null&&u==null){if(r==null)throw"Graph is null!";if(a==null)throw"Parent node is null!";if(this.graphs.indexOf(r)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(r),r.parent!=null)throw"Already has a parent!";if(a.child!=null)throw"Already has a child!";return r.parent=a,a.child=r,r}else{u=f,e=a,f=r;var t=e.getOwner(),s=u.getOwner();if(!(t!=null&&t.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(s!=null&&s.getGraphManager()==this))throw"Target not in this graph mgr!";if(t==s)return f.isInterGraph=!1,t.add(f,e,u);if(f.isInterGraph=!0,f.source=e,f.target=u,this.edges.indexOf(f)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(f),!(f.source!=null&&f.target!=null))throw"Edge source and/or target is null!";if(!(f.source.edges.indexOf(f)==-1&&f.target.edges.indexOf(f)==-1))throw"Edge already in source and/or target incidency list!";return f.source.edges.push(f),f.target.edges.push(f),f}},i.prototype.remove=function(r){if(r instanceof v){var a=r;if(a.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(a==this.rootGraph||a.parent!=null&&a.parent.graphManager==this))throw"Invalid parent node!";var f=[];f=f.concat(a.getEdges());for(var e,u=f.length,t=0;t=r.getRight()?a[0]+=Math.min(r.getX()-i.getX(),i.getRight()-r.getRight()):r.getX()<=i.getX()&&r.getRight()>=i.getRight()&&(a[0]+=Math.min(i.getX()-r.getX(),r.getRight()-i.getRight())),i.getY()<=r.getY()&&i.getBottom()>=r.getBottom()?a[1]+=Math.min(r.getY()-i.getY(),i.getBottom()-r.getBottom()):r.getY()<=i.getY()&&r.getBottom()>=i.getBottom()&&(a[1]+=Math.min(i.getY()-r.getY(),r.getBottom()-i.getBottom()));var u=Math.abs((r.getCenterY()-i.getCenterY())/(r.getCenterX()-i.getCenterX()));r.getCenterY()===i.getCenterY()&&r.getCenterX()===i.getCenterX()&&(u=1);var t=u*a[0],s=a[1]/u;a[0]t)return a[0]=f,a[1]=o,a[2]=u,a[3]=U,!1;if(eu)return a[0]=s,a[1]=e,a[2]=P,a[3]=t,!1;if(fu?(a[0]=l,a[1]=T,n=!0):(a[0]=c,a[1]=o,n=!0):p===y&&(f>u?(a[0]=s,a[1]=o,n=!0):(a[0]=g,a[1]=T,n=!0)),-m===y?u>f?(a[2]=B,a[3]=U,E=!0):(a[2]=P,a[3]=w,E=!0):m===y&&(u>f?(a[2]=S,a[3]=w,E=!0):(a[2]=V,a[3]=U,E=!0)),n&&E)return!1;if(f>u?e>t?(I=this.getCardinalDirection(p,y,4),O=this.getCardinalDirection(m,y,2)):(I=this.getCardinalDirection(-p,y,3),O=this.getCardinalDirection(-m,y,1)):e>t?(I=this.getCardinalDirection(-p,y,1),O=this.getCardinalDirection(-m,y,3)):(I=this.getCardinalDirection(p,y,2),O=this.getCardinalDirection(m,y,4)),!n)switch(I){case 1:W=o,R=f+-C/y,a[0]=R,a[1]=W;break;case 2:R=g,W=e+d*y,a[0]=R,a[1]=W;break;case 3:W=T,R=f+C/y,a[0]=R,a[1]=W;break;case 4:R=l,W=e+-d*y,a[0]=R,a[1]=W;break}if(!E)switch(O){case 1:Q=w,x=u+-_/y,a[2]=x,a[3]=Q;break;case 2:x=V,Q=t+M*y,a[2]=x,a[3]=Q;break;case 3:Q=U,x=u+_/y,a[2]=x,a[3]=Q;break;case 4:x=B,Q=t+-M*y,a[2]=x,a[3]=Q;break}}return!1},h.getCardinalDirection=function(i,r,a){return i>r?a:1+a%4},h.getIntersection=function(i,r,a,f){if(f==null)return this.getIntersection2(i,r,a);var e=i.x,u=i.y,t=r.x,s=r.y,o=a.x,c=a.y,l=f.x,T=f.y,g=void 0,d=void 0,C=void 0,S=void 0,w=void 0,P=void 0,B=void 0,U=void 0,V=void 0;return C=s-u,w=e-t,B=t*u-e*s,S=T-c,P=o-l,U=l*c-o*T,V=C*P-S*w,V===0?null:(g=(w*U-P*B)/V,d=(S*B-C*U)/V,new v(g,d))},h.angleOfVector=function(i,r,a,f){var e=void 0;return i!==a?(e=Math.atan((f-r)/(a-i)),a=0){var T=(-o+Math.sqrt(o*o-4*s*c))/(2*s),g=(-o-Math.sqrt(o*o-4*s*c))/(2*s),d=null;return T>=0&&T<=1?[T]:g>=0&&g<=1?[g]:d}else return null},h.HALF_PI=.5*Math.PI,h.ONE_AND_HALF_PI=1.5*Math.PI,h.TWO_PI=2*Math.PI,h.THREE_PI=3*Math.PI,A.exports=h}),(function(A,G,N){function v(){}v.sign=function(h){return h>0?1:h<0?-1:0},v.floor=function(h){return h<0?Math.ceil(h):Math.floor(h)},v.ceil=function(h){return h<0?Math.floor(h):Math.ceil(h)},A.exports=v}),(function(A,G,N){function v(){}v.MAX_VALUE=2147483647,v.MIN_VALUE=-2147483648,A.exports=v}),(function(A,G,N){var v=(function(){function e(u,t){for(var s=0;s"u"?"undefined":v(i);return i==null||r!="object"&&r!="function"},A.exports=h}),(function(A,G,N){function v(o){if(Array.isArray(o)){for(var c=0,l=Array(o.length);c0&&c;){for(C.push(w[0]);C.length>0&&c;){var P=C[0];C.splice(0,1),d.add(P);for(var B=P.getEdges(),g=0;g-1&&w.splice(_,1)}d=new Set,S=new Map}}return o},s.prototype.createDummyNodesForBendpoints=function(o){for(var c=[],l=o.source,T=this.graphManager.calcLowestCommonAncestor(o.source,o.target),g=0;g0){for(var T=this.edgeToDummyNodes.get(l),g=0;g=0&&c.splice(U,1);var V=S.getNeighborsList();V.forEach(function(n){if(l.indexOf(n)<0){var E=T.get(n),p=E-1;p==1&&P.push(n),T.set(n,p)}})}l=l.concat(P),(c.length==1||c.length==2)&&(g=!0,d=c[0])}return d},s.prototype.setGraphManager=function(o){this.graphManager=o},A.exports=s}),(function(A,G,N){function v(){}v.seed=1,v.x=0,v.nextDouble=function(){return v.x=Math.sin(v.seed++)*1e4,v.x-Math.floor(v.x)},A.exports=v}),(function(A,G,N){var v=N(5);function h(i,r){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}h.prototype.getWorldOrgX=function(){return this.lworldOrgX},h.prototype.setWorldOrgX=function(i){this.lworldOrgX=i},h.prototype.getWorldOrgY=function(){return this.lworldOrgY},h.prototype.setWorldOrgY=function(i){this.lworldOrgY=i},h.prototype.getWorldExtX=function(){return this.lworldExtX},h.prototype.setWorldExtX=function(i){this.lworldExtX=i},h.prototype.getWorldExtY=function(){return this.lworldExtY},h.prototype.setWorldExtY=function(i){this.lworldExtY=i},h.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},h.prototype.setDeviceOrgX=function(i){this.ldeviceOrgX=i},h.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},h.prototype.setDeviceOrgY=function(i){this.ldeviceOrgY=i},h.prototype.getDeviceExtX=function(){return this.ldeviceExtX},h.prototype.setDeviceExtX=function(i){this.ldeviceExtX=i},h.prototype.getDeviceExtY=function(){return this.ldeviceExtY},h.prototype.setDeviceExtY=function(i){this.ldeviceExtY=i},h.prototype.transformX=function(i){var r=0,a=this.lworldExtX;return a!=0&&(r=this.ldeviceOrgX+(i-this.lworldOrgX)*this.ldeviceExtX/a),r},h.prototype.transformY=function(i){var r=0,a=this.lworldExtY;return a!=0&&(r=this.ldeviceOrgY+(i-this.lworldOrgY)*this.ldeviceExtY/a),r},h.prototype.inverseTransformX=function(i){var r=0,a=this.ldeviceExtX;return a!=0&&(r=this.lworldOrgX+(i-this.ldeviceOrgX)*this.lworldExtX/a),r},h.prototype.inverseTransformY=function(i){var r=0,a=this.ldeviceExtY;return a!=0&&(r=this.lworldOrgY+(i-this.ldeviceOrgY)*this.lworldExtY/a),r},h.prototype.inverseTransformPoint=function(i){var r=new v(this.inverseTransformX(i.x),this.inverseTransformY(i.y));return r},A.exports=h}),(function(A,G,N){function v(t){if(Array.isArray(t)){for(var s=0,o=Array(t.length);si.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*i.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-i.ADAPTATION_LOWER_NODE_LIMIT)/(i.ADAPTATION_UPPER_NODE_LIMIT-i.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-i.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=i.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>i.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(i.COOLING_ADAPTATION_FACTOR,1-(t-i.ADAPTATION_LOWER_NODE_LIMIT)/(i.ADAPTATION_UPPER_NODE_LIMIT-i.ADAPTATION_LOWER_NODE_LIMIT)*(1-i.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=i.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*i.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},e.prototype.calcSpringForces=function(){for(var t=this.getAllEdges(),s,o=0;o0&&arguments[0]!==void 0?arguments[0]:!0,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,o,c,l,T,g=this.getAllNodes(),d;if(this.useFRGridVariant)for(this.totalIterations%i.GRID_CALCULATION_CHECK_PERIOD==1&&t&&this.updateGrid(),d=new Set,o=0;oC||d>C)&&(t.gravitationForceX=-this.gravityConstant*l,t.gravitationForceY=-this.gravityConstant*T)):(C=s.getEstimatedSize()*this.compoundGravityRangeFactor,(g>C||d>C)&&(t.gravitationForceX=-this.gravityConstant*l*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*T*this.compoundGravityConstant))},e.prototype.isConverged=function(){var t,s=!1;return this.totalIterations>this.maxIterations/3&&(s=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement=g.length||C>=g[0].length)){for(var S=0;Se}}]),a})();A.exports=r}),(function(A,G,N){function v(){}v.svd=function(h){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=h.length,this.n=h[0].length;var i=Math.min(this.m,this.n);this.s=(function(Tt){for(var Ct=[];Tt-- >0;)Ct.push(0);return Ct})(Math.min(this.m+1,this.n)),this.U=(function(Tt){var Ct=function Bt(bt){if(bt.length==0)return 0;for(var zt=[],St=0;St0;)Ct.push(0);return Ct})(this.n),a=(function(Tt){for(var Ct=[];Tt-- >0;)Ct.push(0);return Ct})(this.m),f=!0,e=Math.min(this.m-1,this.n),u=Math.max(0,Math.min(this.n-2,this.m)),t=0;t=0;m--)if(this.s[m]!==0){for(var y=m+1;y=0;z--){if((function(Tt,Ct){return Tt&&Ct})(z0;){var J=void 0,It=void 0;for(J=n-2;J>=-1&&J!==-1;J--)if(Math.abs(r[J])<=ht+tt*(Math.abs(this.s[J])+Math.abs(this.s[J+1]))){r[J]=0;break}if(J===n-2)It=4;else{var Nt=void 0;for(Nt=n-1;Nt>=J&&Nt!==J;Nt--){var vt=(Nt!==n?Math.abs(r[Nt]):0)+(Nt!==J+1?Math.abs(r[Nt-1]):0);if(Math.abs(this.s[Nt])<=ht+tt*vt){this.s[Nt]=0;break}}Nt===J?It=3:Nt===n-1?It=1:(It=2,J=Nt)}switch(J++,It){case 1:{var it=r[n-2];r[n-2]=0;for(var ut=n-2;ut>=J;ut--){var Et=v.hypot(this.s[ut],it),wt=this.s[ut]/Et,Ot=it/Et;this.s[ut]=Et,ut!==J&&(it=-Ot*r[ut-1],r[ut-1]=wt*r[ut-1]);for(var mt=0;mt=this.s[J+1]);){var Lt=this.s[J];if(this.s[J]=this.s[J+1],this.s[J+1]=Lt,JMath.abs(i)?(r=i/h,r=Math.abs(h)*Math.sqrt(1+r*r)):i!=0?(r=h/i,r=Math.abs(i)*Math.sqrt(1+r*r)):r=0,r},A.exports=v}),(function(A,G,N){var v=(function(){function r(a,f){for(var e=0;e2&&arguments[2]!==void 0?arguments[2]:1,u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,t=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;h(this,r),this.sequence1=a,this.sequence2=f,this.match_score=e,this.mismatch_penalty=u,this.gap_penalty=t,this.iMax=a.length+1,this.jMax=f.length+1,this.grid=new Array(this.iMax);for(var s=0;s=0;a--){var f=this.listeners[a];f.event===i&&f.callback===r&&this.listeners.splice(a,1)}},h.emit=function(i,r){for(var a=0;a{var G={45:((i,r,a)=>{var f={};f.layoutBase=a(551),f.CoSEConstants=a(806),f.CoSEEdge=a(767),f.CoSEGraph=a(880),f.CoSEGraphManager=a(578),f.CoSELayout=a(765),f.CoSENode=a(991),f.ConstraintHandler=a(902),i.exports=f}),806:((i,r,a)=>{var f=a(551).FDLayoutConstants;function e(){}for(var u in f)e[u]=f[u];e.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,e.DEFAULT_RADIAL_SEPARATION=f.DEFAULT_EDGE_LENGTH,e.DEFAULT_COMPONENT_SEPERATION=60,e.TILE=!0,e.TILING_PADDING_VERTICAL=10,e.TILING_PADDING_HORIZONTAL=10,e.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,e.ENFORCE_CONSTRAINTS=!0,e.APPLY_LAYOUT=!0,e.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,e.TREE_REDUCTION_ON_INCREMENTAL=!0,e.PURE_INCREMENTAL=e.DEFAULT_INCREMENTAL,i.exports=e}),767:((i,r,a)=>{var f=a(551).FDLayoutEdge;function e(t,s,o){f.call(this,t,s,o)}e.prototype=Object.create(f.prototype);for(var u in f)e[u]=f[u];i.exports=e}),880:((i,r,a)=>{var f=a(551).LGraph;function e(t,s,o){f.call(this,t,s,o)}e.prototype=Object.create(f.prototype);for(var u in f)e[u]=f[u];i.exports=e}),578:((i,r,a)=>{var f=a(551).LGraphManager;function e(t){f.call(this,t)}e.prototype=Object.create(f.prototype);for(var u in f)e[u]=f[u];i.exports=e}),765:((i,r,a)=>{var f=a(551).FDLayout,e=a(578),u=a(880),t=a(991),s=a(767),o=a(806),c=a(902),l=a(551).FDLayoutConstants,T=a(551).LayoutConstants,g=a(551).Point,d=a(551).PointD,C=a(551).DimensionD,S=a(551).Layout,w=a(551).Integer,P=a(551).IGeometry,B=a(551).LGraph,U=a(551).Transform,V=a(551).LinkedList;function M(){f.call(this),this.toBeTiled={},this.constraints={}}M.prototype=Object.create(f.prototype);for(var _ in f)M[_]=f[_];M.prototype.newGraphManager=function(){var n=new e(this);return this.graphManager=n,n},M.prototype.newGraph=function(n){return new u(null,this.graphManager,n)},M.prototype.newNode=function(n){return new t(this.graphManager,n)},M.prototype.newEdge=function(n){return new s(null,null,n)},M.prototype.initParameters=function(){f.prototype.initParameters.call(this,arguments),this.isSubLayout||(o.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=o.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=o.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=l.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=l.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=l.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},M.prototype.initSpringEmbedder=function(){f.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/l.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},M.prototype.layout=function(){var n=T.DEFAULT_CREATE_BENDS_AS_NEEDED;return n&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},M.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental){if(o.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var E=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(I){return E.has(I)});this.graphManager.setAllNodesToApplyGravitation(p)}}else{var n=this.getFlatForest();if(n.length>0)this.positionNodesRadially(n);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var E=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(m){return E.has(m)});this.graphManager.setAllNodesToApplyGravitation(p),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(c.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),o.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},M.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%l.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var n=new Set(this.getAllNodes()),E=this.nodesWithGravity.filter(function(y){return n.has(y)});this.graphManager.setAllNodesToApplyGravitation(E),this.graphManager.updateBounds(),this.updateGrid(),o.PURE_INCREMENTAL?this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),o.PURE_INCREMENTAL?this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var p=!this.isTreeGrowing&&!this.isGrowthFinished,m=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(p,m),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},M.prototype.getPositionsData=function(){for(var n=this.graphManager.getAllNodes(),E={},p=0;p0&&this.updateDisplacements();for(var p=0;p0&&(m.fixedNodeWeight=I)}}if(this.constraints.relativePlacementConstraint){var O=new Map,R=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(D){n.fixedNodesOnHorizontal.add(D),n.fixedNodesOnVertical.add(D)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var W=this.constraints.alignmentConstraint.vertical,p=0;p=2*D.length/3;tt--)H=Math.floor(Math.random()*(tt+1)),k=D[tt],D[tt]=D[H],D[H]=k;return D},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(D){if(D.left){var H=O.has(D.left)?O.get(D.left):D.left,k=O.has(D.right)?O.get(D.right):D.right;n.nodesInRelativeHorizontal.includes(H)||(n.nodesInRelativeHorizontal.push(H),n.nodeToRelativeConstraintMapHorizontal.set(H,[]),n.dummyToNodeForVerticalAlignment.has(H)?n.nodeToTempPositionMapHorizontal.set(H,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(H)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set(H,n.idToNodeMap.get(H).getCenterX())),n.nodesInRelativeHorizontal.includes(k)||(n.nodesInRelativeHorizontal.push(k),n.nodeToRelativeConstraintMapHorizontal.set(k,[]),n.dummyToNodeForVerticalAlignment.has(k)?n.nodeToTempPositionMapHorizontal.set(k,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(k)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set(k,n.idToNodeMap.get(k).getCenterX())),n.nodeToRelativeConstraintMapHorizontal.get(H).push({right:k,gap:D.gap}),n.nodeToRelativeConstraintMapHorizontal.get(k).push({left:H,gap:D.gap})}else{var tt=R.has(D.top)?R.get(D.top):D.top,ht=R.has(D.bottom)?R.get(D.bottom):D.bottom;n.nodesInRelativeVertical.includes(tt)||(n.nodesInRelativeVertical.push(tt),n.nodeToRelativeConstraintMapVertical.set(tt,[]),n.dummyToNodeForHorizontalAlignment.has(tt)?n.nodeToTempPositionMapVertical.set(tt,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(tt)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(tt,n.idToNodeMap.get(tt).getCenterY())),n.nodesInRelativeVertical.includes(ht)||(n.nodesInRelativeVertical.push(ht),n.nodeToRelativeConstraintMapVertical.set(ht,[]),n.dummyToNodeForHorizontalAlignment.has(ht)?n.nodeToTempPositionMapVertical.set(ht,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(ht)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(ht,n.idToNodeMap.get(ht).getCenterY())),n.nodeToRelativeConstraintMapVertical.get(tt).push({bottom:ht,gap:D.gap}),n.nodeToRelativeConstraintMapVertical.get(ht).push({top:tt,gap:D.gap})}});else{var Q=new Map,z=new Map;this.constraints.relativePlacementConstraint.forEach(function(D){if(D.left){var H=O.has(D.left)?O.get(D.left):D.left,k=O.has(D.right)?O.get(D.right):D.right;Q.has(H)?Q.get(H).push(k):Q.set(H,[k]),Q.has(k)?Q.get(k).push(H):Q.set(k,[H])}else{var tt=R.has(D.top)?R.get(D.top):D.top,ht=R.has(D.bottom)?R.get(D.bottom):D.bottom;z.has(tt)?z.get(tt).push(ht):z.set(tt,[ht]),z.has(ht)?z.get(ht).push(tt):z.set(ht,[tt])}});var X=function(H,k){var tt=[],ht=[],J=new V,It=new Set,Nt=0;return H.forEach(function(vt,it){if(!It.has(it)){tt[Nt]=[],ht[Nt]=!1;var ut=it;for(J.push(ut),It.add(ut),tt[Nt].push(ut);J.length!=0;){ut=J.shift(),k.has(ut)&&(ht[Nt]=!0);var Et=H.get(ut);Et.forEach(function(wt){It.has(wt)||(J.push(wt),It.add(wt),tt[Nt].push(wt))})}Nt++}}),{components:tt,isFixed:ht}},rt=X(Q,n.fixedNodesOnHorizontal);this.componentsOnHorizontal=rt.components,this.fixedComponentsOnHorizontal=rt.isFixed;var $=X(z,n.fixedNodesOnVertical);this.componentsOnVertical=$.components,this.fixedComponentsOnVertical=$.isFixed}}},M.prototype.updateDisplacements=function(){var n=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function($){var D=n.idToNodeMap.get($.nodeId);D.displacementX=0,D.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var E=this.constraints.alignmentConstraint.vertical,p=0;p1){var R;for(R=0;Rm&&(m=Math.floor(O.y)),I=Math.floor(O.x+o.DEFAULT_COMPONENT_SEPERATION)}this.transform(new d(T.WORLD_CENTER_X-O.x/2,T.WORLD_CENTER_Y-O.y/2))},M.radialLayout=function(n,E,p){var m=Math.max(this.maxDiagonalInTree(n),o.DEFAULT_RADIAL_SEPARATION);M.branchRadialLayout(E,null,0,359,0,m);var y=B.calculateBounds(n),I=new U;I.setDeviceOrgX(y.getMinX()),I.setDeviceOrgY(y.getMinY()),I.setWorldOrgX(p.x),I.setWorldOrgY(p.y);for(var O=0;O1;){var k=H[0];H.splice(0,1);var tt=z.indexOf(k);tt>=0&&z.splice(tt,1),$--,X--}E!=null?D=(z.indexOf(H[0])+1)%$:D=0;for(var ht=Math.abs(m-p)/X,J=D;rt!=X;J=++J%$){var It=z[J].getOtherEnd(n);if(It!=E){var Nt=(p+rt*ht)%360,vt=(Nt+ht)%360;M.branchRadialLayout(It,n,Nt,vt,y+I,I),rt++}}},M.maxDiagonalInTree=function(n){for(var E=w.MIN_VALUE,p=0;pE&&(E=y)}return E},M.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},M.prototype.groupZeroDegreeMembers=function(){var n=this,E={};this.memberGroups={},this.idToDummyNode={};for(var p=[],m=this.graphManager.getAllNodes(),y=0;y"u"&&(E[R]=[]),E[R]=E[R].concat(I)}Object.keys(E).forEach(function(W){if(E[W].length>1){var x="DummyCompound_"+W;n.memberGroups[x]=E[W];var Q=E[W][0].getParent(),z=new t(n.graphManager);z.id=x,z.paddingLeft=Q.paddingLeft||0,z.paddingRight=Q.paddingRight||0,z.paddingBottom=Q.paddingBottom||0,z.paddingTop=Q.paddingTop||0,n.idToDummyNode[x]=z;var X=n.getGraphManager().add(n.newGraph(),z),rt=Q.getChild();rt.add(z);for(var $=0;$y?(m.rect.x-=(m.labelWidth-y)/2,m.setWidth(m.labelWidth),m.labelMarginLeft=(m.labelWidth-y)/2):m.labelPosHorizontal=="right"&&m.setWidth(y+m.labelWidth)),m.labelHeight&&(m.labelPosVertical=="top"?(m.rect.y-=m.labelHeight,m.setHeight(I+m.labelHeight),m.labelMarginTop=m.labelHeight):m.labelPosVertical=="center"&&m.labelHeight>I?(m.rect.y-=(m.labelHeight-I)/2,m.setHeight(m.labelHeight),m.labelMarginTop=(m.labelHeight-I)/2):m.labelPosVertical=="bottom"&&m.setHeight(I+m.labelHeight))}})},M.prototype.repopulateCompounds=function(){for(var n=this.compoundOrder.length-1;n>=0;n--){var E=this.compoundOrder[n],p=E.id,m=E.paddingLeft,y=E.paddingTop,I=E.labelMarginLeft,O=E.labelMarginTop;this.adjustLocations(this.tiledMemberPack[p],E.rect.x,E.rect.y,m,y,I,O)}},M.prototype.repopulateZeroDegreeMembers=function(){var n=this,E=this.tiledZeroDegreePack;Object.keys(E).forEach(function(p){var m=n.idToDummyNode[p],y=m.paddingLeft,I=m.paddingTop,O=m.labelMarginLeft,R=m.labelMarginTop;n.adjustLocations(E[p],m.rect.x,m.rect.y,y,I,O,R)})},M.prototype.getToBeTiled=function(n){var E=n.id;if(this.toBeTiled[E]!=null)return this.toBeTiled[E];var p=n.getChild();if(p==null)return this.toBeTiled[E]=!1,!1;for(var m=p.getNodes(),y=0;y0)return this.toBeTiled[E]=!1,!1;if(I.getChild()==null){this.toBeTiled[I.id]=!1;continue}if(!this.getToBeTiled(I))return this.toBeTiled[E]=!1,!1}return this.toBeTiled[E]=!0,!0},M.prototype.getNodeDegree=function(n){n.id;for(var E=n.getEdges(),p=0,m=0;mQ&&(Q=X.rect.height)}p+=Q+n.verticalPadding}},M.prototype.tileCompoundMembers=function(n,E){var p=this;this.tiledMemberPack=[],Object.keys(n).forEach(function(m){var y=E[m];if(p.tiledMemberPack[m]=p.tileNodes(n[m],y.paddingLeft+y.paddingRight),y.rect.width=p.tiledMemberPack[m].width,y.rect.height=p.tiledMemberPack[m].height,y.setCenter(p.tiledMemberPack[m].centerX,p.tiledMemberPack[m].centerY),y.labelMarginLeft=0,y.labelMarginTop=0,o.NODE_DIMENSIONS_INCLUDE_LABELS){var I=y.rect.width,O=y.rect.height;y.labelWidth&&(y.labelPosHorizontal=="left"?(y.rect.x-=y.labelWidth,y.setWidth(I+y.labelWidth),y.labelMarginLeft=y.labelWidth):y.labelPosHorizontal=="center"&&y.labelWidth>I?(y.rect.x-=(y.labelWidth-I)/2,y.setWidth(y.labelWidth),y.labelMarginLeft=(y.labelWidth-I)/2):y.labelPosHorizontal=="right"&&y.setWidth(I+y.labelWidth)),y.labelHeight&&(y.labelPosVertical=="top"?(y.rect.y-=y.labelHeight,y.setHeight(O+y.labelHeight),y.labelMarginTop=y.labelHeight):y.labelPosVertical=="center"&&y.labelHeight>O?(y.rect.y-=(y.labelHeight-O)/2,y.setHeight(y.labelHeight),y.labelMarginTop=(y.labelHeight-O)/2):y.labelPosVertical=="bottom"&&y.setHeight(O+y.labelHeight))}})},M.prototype.tileNodes=function(n,E){var p=this.tileNodesByFavoringDim(n,E,!0),m=this.tileNodesByFavoringDim(n,E,!1),y=this.getOrgRatio(p),I=this.getOrgRatio(m),O;return IR&&(R=$.getWidth())});var W=I/y,x=O/y,Q=Math.pow(p-m,2)+4*(W+m)*(x+p)*y,z=(m-p+Math.sqrt(Q))/(2*(W+m)),X;E?(X=Math.ceil(z),X==z&&X++):X=Math.floor(z);var rt=X*(W+m)-m;return R>rt&&(rt=R),rt+=m*2,rt},M.prototype.tileNodesByFavoringDim=function(n,E,p){var m=o.TILING_PADDING_VERTICAL,y=o.TILING_PADDING_HORIZONTAL,I=o.TILING_COMPARE_BY,O={rows:[],rowWidth:[],rowHeight:[],width:0,height:E,verticalPadding:m,horizontalPadding:y,centerX:0,centerY:0};I&&(O.idealRowWidth=this.calcIdealRowWidth(n,p));var R=function(D){return D.rect.width*D.rect.height},W=function(D,H){return R(H)-R(D)};n.sort(function($,D){var H=W;return O.idealRowWidth?(H=I,H($.id,D.id)):H($,D)});for(var x=0,Q=0,z=0;z0&&(O+=n.horizontalPadding),n.rowWidth[p]=O,n.width0&&(R+=n.verticalPadding);var W=0;R>n.rowHeight[p]&&(W=n.rowHeight[p],n.rowHeight[p]=R,W=n.rowHeight[p]-W),n.height+=W,n.rows[p].push(E)},M.prototype.getShortestRowIndex=function(n){for(var E=-1,p=Number.MAX_VALUE,m=0;mp&&(E=m,p=n.rowWidth[m]);return E},M.prototype.canAddHorizontal=function(n,E,p){if(n.idealRowWidth){var m=n.rows.length-1,y=n.rowWidth[m];return y+E+n.horizontalPadding<=n.idealRowWidth}var I=this.getShortestRowIndex(n);if(I<0)return!0;var O=n.rowWidth[I];if(O+n.horizontalPadding+E<=n.width)return!0;var R=0;n.rowHeight[I]0&&(R=p+n.verticalPadding-n.rowHeight[I]);var W;n.width-O>=E+n.horizontalPadding?W=(n.height+R)/(O+E+n.horizontalPadding):W=(n.height+R)/n.width,R=p+n.verticalPadding;var x;return n.widthI&&E!=p){m.splice(-1,1),n.rows[p].push(y),n.rowWidth[E]=n.rowWidth[E]-I,n.rowWidth[p]=n.rowWidth[p]+I,n.width=n.rowWidth[instance.getLongestRowIndex(n)];for(var O=Number.MIN_VALUE,R=0;RO&&(O=m[R].height);E>0&&(O+=n.verticalPadding);var W=n.rowHeight[E]+n.rowHeight[p];n.rowHeight[E]=O,n.rowHeight[p]0)for(var rt=y;rt<=I;rt++)X[0]+=this.grid[rt][O-1].length+this.grid[rt][O].length-1;if(I0)for(var rt=O;rt<=R;rt++)X[3]+=this.grid[y-1][rt].length+this.grid[y][rt].length-1;for(var $=w.MAX_VALUE,D,H,k=0;k{var f=a(551).FDLayoutNode,e=a(551).IMath;function u(s,o,c,l){f.call(this,s,o,c,l)}u.prototype=Object.create(f.prototype);for(var t in f)u[t]=f[t];u.prototype.calculateDisplacement=function(){var s=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=s.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=s.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=s.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=s.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>s.coolingFactor*s.maxNodeDisplacement&&(this.displacementX=s.coolingFactor*s.maxNodeDisplacement*e.sign(this.displacementX)),Math.abs(this.displacementY)>s.coolingFactor*s.maxNodeDisplacement&&(this.displacementY=s.coolingFactor*s.maxNodeDisplacement*e.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},u.prototype.propogateDisplacementToChildren=function(s,o){for(var c=this.getChild().getNodes(),l,T=0;T{function f(c){if(Array.isArray(c)){for(var l=0,T=Array(c.length);l0){var Lt=0;ot.forEach(function(st){Z=="horizontal"?(et.set(st,g.has(st)?d[g.get(st)]:q.get(st)),Lt+=et.get(st)):(et.set(st,g.has(st)?C[g.get(st)]:q.get(st)),Lt+=et.get(st))}),Lt=Lt/ot.length,lt.forEach(function(st){K.has(st)||et.set(st,Lt)})}else{var ft=0;lt.forEach(function(st){Z=="horizontal"?ft+=g.has(st)?d[g.get(st)]:q.get(st):ft+=g.has(st)?C[g.get(st)]:q.get(st)}),ft=ft/lt.length,lt.forEach(function(st){et.set(st,ft)})}});for(var At=function(){var ot=dt.shift(),Lt=Y.get(ot);Lt.forEach(function(ft){if(et.get(ft.id)st&&(st=kt),KtXt&&(Xt=Kt)}}catch(ee){Ct=!0,Bt=ee}finally{try{!Tt&&bt.return&&bt.return()}finally{if(Ct)throw Bt}}var fe=(Lt+st)/2-(ft+Xt)/2,Qt=!0,jt=!1,_t=void 0;try{for(var Jt=lt[Symbol.iterator](),ne;!(Qt=(ne=Jt.next()).done);Qt=!0){var te=ne.value;et.set(te,et.get(te)+fe)}}catch(ee){jt=!0,_t=ee}finally{try{!Qt&&Jt.return&&Jt.return()}finally{if(jt)throw _t}}})}return et},_=function(Y){var Z=0,K=0,q=0,at=0;if(Y.forEach(function(j){j.left?d[g.get(j.left)]-d[g.get(j.right)]>=0?Z++:K++:C[g.get(j.top)]-C[g.get(j.bottom)]>=0?q++:at++}),Z>K&&q>at)for(var ct=0;ctK)for(var nt=0;ntat)for(var et=0;et1)l.fixedNodeConstraint.forEach(function(F,Y){m[Y]=[F.position.x,F.position.y],y[Y]=[d[g.get(F.nodeId)],C[g.get(F.nodeId)]]}),I=!0;else if(l.alignmentConstraint)(function(){var F=0;if(l.alignmentConstraint.vertical){for(var Y=l.alignmentConstraint.vertical,Z=function(et){var j=new Set;Y[et].forEach(function(pt){j.add(pt)});var dt=new Set([].concat(f(j)).filter(function(pt){return R.has(pt)})),At=void 0;dt.size>0?At=d[g.get(dt.values().next().value)]:At=V(j).x,Y[et].forEach(function(pt){m[F]=[At,C[g.get(pt)]],y[F]=[d[g.get(pt)],C[g.get(pt)]],F++})},K=0;K0?At=d[g.get(dt.values().next().value)]:At=V(j).y,q[et].forEach(function(pt){m[F]=[d[g.get(pt)],At],y[F]=[d[g.get(pt)],C[g.get(pt)]],F++})},ct=0;ctz&&(z=Q[rt].length,X=rt);if(z0){var mt={x:0,y:0};l.fixedNodeConstraint.forEach(function(F,Y){var Z={x:d[g.get(F.nodeId)],y:C[g.get(F.nodeId)]},K=F.position,q=U(K,Z);mt.x+=q.x,mt.y+=q.y}),mt.x/=l.fixedNodeConstraint.length,mt.y/=l.fixedNodeConstraint.length,d.forEach(function(F,Y){d[Y]+=mt.x}),C.forEach(function(F,Y){C[Y]+=mt.y}),l.fixedNodeConstraint.forEach(function(F){d[g.get(F.nodeId)]=F.position.x,C[g.get(F.nodeId)]=F.position.y})}if(l.alignmentConstraint){if(l.alignmentConstraint.vertical)for(var Dt=l.alignmentConstraint.vertical,Rt=function(Y){var Z=new Set;Dt[Y].forEach(function(at){Z.add(at)});var K=new Set([].concat(f(Z)).filter(function(at){return R.has(at)})),q=void 0;K.size>0?q=d[g.get(K.values().next().value)]:q=V(Z).x,Z.forEach(function(at){R.has(at)||(d[g.get(at)]=q)})},Ht=0;Ht0?q=C[g.get(K.values().next().value)]:q=V(Z).y,Z.forEach(function(at){R.has(at)||(C[g.get(at)]=q)})},Ft=0;Ft{i.exports=A})},N={};function v(i){var r=N[i];if(r!==void 0)return r.exports;var a=N[i]={exports:{}};return G[i](a,a.exports,v),a.exports}var h=v(45);return h})()})})(he)),he.exports}var pr=se.exports,De;function yr(){return De||(De=1,(function(L,b){(function(G,N){L.exports=N(vr())})(pr,function(A){return(()=>{var G={658:(i=>{i.exports=Object.assign!=null?Object.assign.bind(Object):function(r){for(var a=arguments.length,f=Array(a>1?a-1:0),e=1;e{var f=(function(){function t(s,o){var c=[],l=!0,T=!1,g=void 0;try{for(var d=s[Symbol.iterator](),C;!(l=(C=d.next()).done)&&(c.push(C.value),!(o&&c.length===o));l=!0);}catch(S){T=!0,g=S}finally{try{!l&&d.return&&d.return()}finally{if(T)throw g}}return c}return function(s,o){if(Array.isArray(s))return s;if(Symbol.iterator in Object(s))return t(s,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),e=a(140).layoutBase.LinkedList,u={};u.getTopMostNodes=function(t){for(var s={},o=0;o0&&I.merge(x)});for(var O=0;O1){C=g[0],S=C.connectedEdges().length,g.forEach(function(y){y.connectedEdges().length0&&c.set("dummy"+(c.size+1),B),U},u.relocateComponent=function(t,s,o){if(!o.fixedNodeConstraint){var c=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,T=Number.POSITIVE_INFINITY,g=Number.NEGATIVE_INFINITY;if(o.quality=="draft"){var d=!0,C=!1,S=void 0;try{for(var w=s.nodeIndexes[Symbol.iterator](),P;!(d=(P=w.next()).done);d=!0){var B=P.value,U=f(B,2),V=U[0],M=U[1],_=o.cy.getElementById(V);if(_){var n=_.boundingBox(),E=s.xCoords[M]-n.w/2,p=s.xCoords[M]+n.w/2,m=s.yCoords[M]-n.h/2,y=s.yCoords[M]+n.h/2;El&&(l=p),mg&&(g=y)}}}catch(x){C=!0,S=x}finally{try{!d&&w.return&&w.return()}finally{if(C)throw S}}var I=t.x-(l+c)/2,O=t.y-(g+T)/2;s.xCoords=s.xCoords.map(function(x){return x+I}),s.yCoords=s.yCoords.map(function(x){return x+O})}else{Object.keys(s).forEach(function(x){var Q=s[x],z=Q.getRect().x,X=Q.getRect().x+Q.getRect().width,rt=Q.getRect().y,$=Q.getRect().y+Q.getRect().height;zl&&(l=X),rtg&&(g=$)});var R=t.x-(l+c)/2,W=t.y-(g+T)/2;Object.keys(s).forEach(function(x){var Q=s[x];Q.setCenter(Q.getCenterX()+R,Q.getCenterY()+W)})}}},u.calcBoundingBox=function(t,s,o,c){for(var l=Number.MAX_SAFE_INTEGER,T=Number.MIN_SAFE_INTEGER,g=Number.MAX_SAFE_INTEGER,d=Number.MIN_SAFE_INTEGER,C=void 0,S=void 0,w=void 0,P=void 0,B=t.descendants().not(":parent"),U=B.length,V=0;VC&&(l=C),Tw&&(g=w),d{var f=a(548),e=a(140).CoSELayout,u=a(140).CoSENode,t=a(140).layoutBase.PointD,s=a(140).layoutBase.DimensionD,o=a(140).layoutBase.LayoutConstants,c=a(140).layoutBase.FDLayoutConstants,l=a(140).CoSEConstants,T=function(d,C){var S=d.cy,w=d.eles,P=w.nodes(),B=w.edges(),U=void 0,V=void 0,M=void 0,_={};d.randomize&&(U=C.nodeIndexes,V=C.xCoords,M=C.yCoords);var n=function(x){return typeof x=="function"},E=function(x,Q){return n(x)?x(Q):x},p=f.calcParentsWithoutChildren(S,w),m=function W(x,Q,z,X){for(var rt=Q.length,$=0;$0){var J=void 0;J=z.getGraphManager().add(z.newGraph(),k),W(J,H,z,X)}}},y=function(x,Q,z){for(var X=0,rt=0,$=0;$0?l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=X/rt:n(d.idealEdgeLength)?l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=50:l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=d.idealEdgeLength,l.MIN_REPULSION_DIST=c.MIN_REPULSION_DIST=c.DEFAULT_EDGE_LENGTH/10,l.DEFAULT_RADIAL_SEPARATION=c.DEFAULT_EDGE_LENGTH)},I=function(x,Q){Q.fixedNodeConstraint&&(x.constraints.fixedNodeConstraint=Q.fixedNodeConstraint),Q.alignmentConstraint&&(x.constraints.alignmentConstraint=Q.alignmentConstraint),Q.relativePlacementConstraint&&(x.constraints.relativePlacementConstraint=Q.relativePlacementConstraint)};d.nestingFactor!=null&&(l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=c.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=d.nestingFactor),d.gravity!=null&&(l.DEFAULT_GRAVITY_STRENGTH=c.DEFAULT_GRAVITY_STRENGTH=d.gravity),d.numIter!=null&&(l.MAX_ITERATIONS=c.MAX_ITERATIONS=d.numIter),d.gravityRange!=null&&(l.DEFAULT_GRAVITY_RANGE_FACTOR=c.DEFAULT_GRAVITY_RANGE_FACTOR=d.gravityRange),d.gravityCompound!=null&&(l.DEFAULT_COMPOUND_GRAVITY_STRENGTH=c.DEFAULT_COMPOUND_GRAVITY_STRENGTH=d.gravityCompound),d.gravityRangeCompound!=null&&(l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=c.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=d.gravityRangeCompound),d.initialEnergyOnIncremental!=null&&(l.DEFAULT_COOLING_FACTOR_INCREMENTAL=c.DEFAULT_COOLING_FACTOR_INCREMENTAL=d.initialEnergyOnIncremental),d.tilingCompareBy!=null&&(l.TILING_COMPARE_BY=d.tilingCompareBy),d.quality=="proof"?o.QUALITY=2:o.QUALITY=0,l.NODE_DIMENSIONS_INCLUDE_LABELS=c.NODE_DIMENSIONS_INCLUDE_LABELS=o.NODE_DIMENSIONS_INCLUDE_LABELS=d.nodeDimensionsIncludeLabels,l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!d.randomize,l.ANIMATE=c.ANIMATE=o.ANIMATE=d.animate,l.TILE=d.tile,l.TILING_PADDING_VERTICAL=typeof d.tilingPaddingVertical=="function"?d.tilingPaddingVertical.call():d.tilingPaddingVertical,l.TILING_PADDING_HORIZONTAL=typeof d.tilingPaddingHorizontal=="function"?d.tilingPaddingHorizontal.call():d.tilingPaddingHorizontal,l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!0,l.PURE_INCREMENTAL=!d.randomize,o.DEFAULT_UNIFORM_LEAF_NODE_SIZES=d.uniformNodeDimensions,d.step=="transformed"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,l.ENFORCE_CONSTRAINTS=!1,l.APPLY_LAYOUT=!1),d.step=="enforced"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!0,l.APPLY_LAYOUT=!1),d.step=="cose"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!1,l.APPLY_LAYOUT=!0),d.step=="all"&&(d.randomize?l.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!0,l.APPLY_LAYOUT=!0),d.fixedNodeConstraint||d.alignmentConstraint||d.relativePlacementConstraint?l.TREE_REDUCTION_ON_INCREMENTAL=!1:l.TREE_REDUCTION_ON_INCREMENTAL=!0;var O=new e,R=O.newGraphManager();return m(R.addRoot(),f.getTopMostNodes(P),O,d),y(O,R,B),I(O,d),O.runLayout(),_};i.exports={coseLayout:T}}),212:((i,r,a)=>{var f=(function(){function d(C,S){for(var w=0;w0)if(p){var I=t.getTopMostNodes(w.eles.nodes());if(M=t.connectComponents(P,w.eles,I),M.forEach(function(vt){var it=vt.boundingBox();_.push({x:it.x1+it.w/2,y:it.y1+it.h/2})}),w.randomize&&M.forEach(function(vt){w.eles=vt,U.push(o(w))}),w.quality=="default"||w.quality=="proof"){var O=P.collection();if(w.tile){var R=new Map,W=[],x=[],Q=0,z={nodeIndexes:R,xCoords:W,yCoords:x},X=[];if(M.forEach(function(vt,it){vt.edges().length==0&&(vt.nodes().forEach(function(ut,Et){O.merge(vt.nodes()[Et]),ut.isParent()||(z.nodeIndexes.set(vt.nodes()[Et].id(),Q++),z.xCoords.push(vt.nodes()[0].position().x),z.yCoords.push(vt.nodes()[0].position().y))}),X.push(it))}),O.length>1){var rt=O.boundingBox();_.push({x:rt.x1+rt.w/2,y:rt.y1+rt.h/2}),M.push(O),U.push(z);for(var $=X.length-1;$>=0;$--)M.splice(X[$],1),U.splice(X[$],1),_.splice(X[$],1)}}M.forEach(function(vt,it){w.eles=vt,V.push(l(w,U[it])),t.relocateComponent(_[it],V[it],w)})}else M.forEach(function(vt,it){t.relocateComponent(_[it],U[it],w)});var D=new Set;if(M.length>1){var H=[],k=B.filter(function(vt){return vt.css("display")=="none"});M.forEach(function(vt,it){var ut=void 0;if(w.quality=="draft"&&(ut=U[it].nodeIndexes),vt.nodes().not(k).length>0){var Et={};Et.edges=[],Et.nodes=[];var wt=void 0;vt.nodes().not(k).forEach(function(Ot){if(w.quality=="draft")if(!Ot.isParent())wt=ut.get(Ot.id()),Et.nodes.push({x:U[it].xCoords[wt]-Ot.boundingbox().w/2,y:U[it].yCoords[wt]-Ot.boundingbox().h/2,width:Ot.boundingbox().w,height:Ot.boundingbox().h});else{var mt=t.calcBoundingBox(Ot,U[it].xCoords,U[it].yCoords,ut);Et.nodes.push({x:mt.topLeftX,y:mt.topLeftY,width:mt.width,height:mt.height})}else V[it][Ot.id()]&&Et.nodes.push({x:V[it][Ot.id()].getLeft(),y:V[it][Ot.id()].getTop(),width:V[it][Ot.id()].getWidth(),height:V[it][Ot.id()].getHeight()})}),vt.edges().forEach(function(Ot){var mt=Ot.source(),Dt=Ot.target();if(mt.css("display")!="none"&&Dt.css("display")!="none")if(w.quality=="draft"){var Rt=ut.get(mt.id()),Ht=ut.get(Dt.id()),Ut=[],Pt=[];if(mt.isParent()){var Ft=t.calcBoundingBox(mt,U[it].xCoords,U[it].yCoords,ut);Ut.push(Ft.topLeftX+Ft.width/2),Ut.push(Ft.topLeftY+Ft.height/2)}else Ut.push(U[it].xCoords[Rt]),Ut.push(U[it].yCoords[Rt]);if(Dt.isParent()){var Yt=t.calcBoundingBox(Dt,U[it].xCoords,U[it].yCoords,ut);Pt.push(Yt.topLeftX+Yt.width/2),Pt.push(Yt.topLeftY+Yt.height/2)}else Pt.push(U[it].xCoords[Ht]),Pt.push(U[it].yCoords[Ht]);Et.edges.push({startX:Ut[0],startY:Ut[1],endX:Pt[0],endY:Pt[1]})}else V[it][mt.id()]&&V[it][Dt.id()]&&Et.edges.push({startX:V[it][mt.id()].getCenterX(),startY:V[it][mt.id()].getCenterY(),endX:V[it][Dt.id()].getCenterX(),endY:V[it][Dt.id()].getCenterY()})}),Et.nodes.length>0&&(H.push(Et),D.add(it))}});var tt=E.packComponents(H,w.randomize).shifts;if(w.quality=="draft")U.forEach(function(vt,it){var ut=vt.xCoords.map(function(wt){return wt+tt[it].dx}),Et=vt.yCoords.map(function(wt){return wt+tt[it].dy});vt.xCoords=ut,vt.yCoords=Et});else{var ht=0;D.forEach(function(vt){Object.keys(V[vt]).forEach(function(it){var ut=V[vt][it];ut.setCenter(ut.getCenterX()+tt[ht].dx,ut.getCenterY()+tt[ht].dy)}),ht++})}}}else{var m=w.eles.boundingBox();if(_.push({x:m.x1+m.w/2,y:m.y1+m.h/2}),w.randomize){var y=o(w);U.push(y)}w.quality=="default"||w.quality=="proof"?(V.push(l(w,U[0])),t.relocateComponent(_[0],V[0],w)):t.relocateComponent(_[0],U[0],w)}var J=function(it,ut){if(w.quality=="default"||w.quality=="proof"){typeof it=="number"&&(it=ut);var Et=void 0,wt=void 0,Ot=it.data("id");return V.forEach(function(Dt){Ot in Dt&&(Et={x:Dt[Ot].getRect().getCenterX(),y:Dt[Ot].getRect().getCenterY()},wt=Dt[Ot])}),w.nodeDimensionsIncludeLabels&&(wt.labelWidth&&(wt.labelPosHorizontal=="left"?Et.x+=wt.labelWidth/2:wt.labelPosHorizontal=="right"&&(Et.x-=wt.labelWidth/2)),wt.labelHeight&&(wt.labelPosVertical=="top"?Et.y+=wt.labelHeight/2:wt.labelPosVertical=="bottom"&&(Et.y-=wt.labelHeight/2))),Et==null&&(Et={x:it.position("x"),y:it.position("y")}),{x:Et.x,y:Et.y}}else{var mt=void 0;return U.forEach(function(Dt){var Rt=Dt.nodeIndexes.get(it.id());Rt!=null&&(mt={x:Dt.xCoords[Rt],y:Dt.yCoords[Rt]})}),mt==null&&(mt={x:it.position("x"),y:it.position("y")}),{x:mt.x,y:mt.y}}};if(w.quality=="default"||w.quality=="proof"||w.randomize){var It=t.calcParentsWithoutChildren(P,B),Nt=B.filter(function(vt){return vt.css("display")=="none"});w.eles=B.not(Nt),B.nodes().not(":parent").not(Nt).layoutPositions(S,w,J),It.length>0&&It.forEach(function(vt){vt.position(J(vt))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),d})();i.exports=g}),657:((i,r,a)=>{var f=a(548),e=a(140).layoutBase.Matrix,u=a(140).layoutBase.SVD,t=function(o){var c=o.cy,l=o.eles,T=l.nodes(),g=l.nodes(":parent"),d=new Map,C=new Map,S=new Map,w=[],P=[],B=[],U=[],V=[],M=[],_=[],n=[],E=void 0,p=1e8,m=1e-9,y=o.piTol,I=o.samplingType,O=o.nodeSeparation,R=void 0,W=function(){for(var Y=0,Z=0,K=!1;Z=at;){nt=q[at++];for(var xt=w[nt],lt=0;ltdt&&(dt=V[Lt],At=Lt)}return At},Q=function(Y){var Z=void 0;if(Y){Z=Math.floor(Math.random()*E);for(var q=0;q=1)break;j=et}for(var pt=0;pt=1)break;j=et}for(var lt=0;lt0&&(Z.isParent()?w[Y].push(S.get(Z.id())):w[Y].push(Z.id()))})});var Nt=function(Y){var Z=C.get(Y),K=void 0;d.get(Y).forEach(function(q){c.getElementById(q).isParent()?K=S.get(q):K=q,w[Z].push(K),w[C.get(K)].push(Y)})},vt=!0,it=!1,ut=void 0;try{for(var Et=d.keys()[Symbol.iterator](),wt;!(vt=(wt=Et.next()).done);vt=!0){var Ot=wt.value;Nt(Ot)}}catch(F){it=!0,ut=F}finally{try{!vt&&Et.return&&Et.return()}finally{if(it)throw ut}}E=C.size;var mt=void 0;if(E>2){R=E{var f=a(212),e=function(t){t&&t("layout","fcose",f)};typeof cytoscape<"u"&&e(cytoscape),i.exports=e}),140:(i=>{i.exports=A})},N={};function v(i){var r=N[i];if(r!==void 0)return r.exports;var a=N[i]={exports:{}};return G[i](a,a.exports,v),a.exports}var h=v(579);return h})()})})(se)),se.exports}var mr=yr();const Er=cr(mr);var xe={L:"left",R:"right",T:"top",B:"bottom"},Ie={L:gt(L=>`${L},${L/2} 0,${L} 0,0`,"L"),R:gt(L=>`0,${L/2} ${L},0 ${L},${L}`,"R"),T:gt(L=>`0,0 ${L},0 ${L/2},${L}`,"T"),B:gt(L=>`${L/2},0 ${L},${L} 0,${L}`,"B")},oe={L:gt((L,b)=>L-b+2,"L"),R:gt((L,b)=>L-2,"R"),T:gt((L,b)=>L-b+2,"T"),B:gt((L,b)=>L-2,"B")},Tr=gt(function(L){return Wt(L)?L==="L"?"R":"L":L==="T"?"B":"T"},"getOppositeArchitectureDirection"),Re=gt(function(L){const b=L;return b==="L"||b==="R"||b==="T"||b==="B"},"isArchitectureDirection"),Wt=gt(function(L){const b=L;return b==="L"||b==="R"},"isArchitectureDirectionX"),qt=gt(function(L){const b=L;return b==="T"||b==="B"},"isArchitectureDirectionY"),Te=gt(function(L,b){const A=Wt(L)&&qt(b),G=qt(L)&&Wt(b);return A||G},"isArchitectureDirectionXY"),Nr=gt(function(L){const b=L[0],A=L[1],G=Wt(b)&&qt(A),N=qt(b)&&Wt(A);return G||N},"isArchitecturePairXY"),Lr=gt(function(L){return L!=="LL"&&L!=="RR"&&L!=="TT"&&L!=="BB"},"isValidArchitectureDirectionPair"),pe=gt(function(L,b){const A=`${L}${b}`;return Lr(A)?A:void 0},"getArchitectureDirectionPair"),Cr=gt(function([L,b],A){const G=A[0],N=A[1];return Wt(G)?qt(N)?[L+(G==="L"?-1:1),b+(N==="T"?1:-1)]:[L+(G==="L"?-1:1),b]:Wt(N)?[L+(N==="L"?1:-1),b+(G==="T"?1:-1)]:[L,b+(G==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),wr=gt(function(L){return L==="LT"||L==="TL"?[1,1]:L==="BL"||L==="LB"?[1,-1]:L==="BR"||L==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),Ar=gt(function(L,b){return Te(L,b)?"bend":Wt(L)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),Mr=gt(function(L){return L.type==="service"},"isArchitectureService"),Or=gt(function(L){return L.type==="junction"},"isArchitectureJunction"),be=gt(L=>L.data(),"edgeData"),ie=gt(L=>L.data(),"nodeData"),Dr=ar.architecture,Pe=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.layoutHints=[],this.registeredIds={},this.elements={},this.diagramId="",this.setAccTitle=Qe,this.getAccTitle=Je,this.setDiagramTitle=Ke,this.getDiagramTitle=je,this.getAccDescription=_e,this.setAccDescription=tr,this.clear()}static{gt(this,"ArchitectureDB")}setDiagramId(L){this.diagramId=L}getDiagramId(){return this.diagramId}clear(){this.nodes={},this.groups={},this.edges=[],this.layoutHints=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},this.diagramId="",er()}addService({id:L,icon:b,in:A,title:G,iconText:N}){if(this.registeredIds[L]!==void 0)throw new Error(`The service id [${L}] is already in use by another ${this.registeredIds[L]}`);if(A!==void 0){if(L===A)throw new Error(`The service [${L}] cannot be placed within itself`);if(this.registeredIds[A]===void 0)throw new Error(`The service [${L}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds[A]==="node")throw new Error(`The service [${L}]'s parent is not a group`)}this.registeredIds[L]="node",this.nodes[L]={id:L,type:"service",icon:b,iconText:N,title:G,edges:[],in:A}}getServices(){return Object.values(this.nodes).filter(Mr)}addJunction({id:L,in:b}){if(this.registeredIds[L]!==void 0)throw new Error(`The junction id [${L}] is already in use by another ${this.registeredIds[L]}`);if(b!==void 0){if(L===b)throw new Error(`The junction [${L}] cannot be placed within itself`);if(this.registeredIds[b]===void 0)throw new Error(`The junction [${L}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds[b]==="node")throw new Error(`The junction [${L}]'s parent is not a group`)}this.registeredIds[L]="node",this.nodes[L]={id:L,type:"junction",edges:[],in:b}}getJunctions(){return Object.values(this.nodes).filter(Or)}getNodes(){return Object.values(this.nodes)}getNode(L){return this.nodes[L]??null}addGroup({id:L,icon:b,in:A,title:G}){if(this.registeredIds?.[L]!==void 0)throw new Error(`The group id [${L}] is already in use by another ${this.registeredIds[L]}`);if(A!==void 0){if(L===A)throw new Error(`The group [${L}] cannot be placed within itself`);if(this.registeredIds?.[A]===void 0)throw new Error(`The group [${L}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds?.[A]==="node")throw new Error(`The group [${L}]'s parent is not a group`)}this.registeredIds[L]="group",this.groups[L]={id:L,icon:b,title:G,in:A}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:L,rhsId:b,lhsDir:A,rhsDir:G,lhsInto:N,rhsInto:v,lhsGroup:h,rhsGroup:i,title:r}){if(!Re(A))throw new Error(`Invalid direction given for left hand side of edge ${L}--${b}. Expected (L,R,T,B) got ${String(A)}`);if(!Re(G))throw new Error(`Invalid direction given for right hand side of edge ${L}--${b}. Expected (L,R,T,B) got ${String(G)}`);if(this.nodes[L]===void 0&&this.groups[L]===void 0)throw new Error(`The left-hand id [${L}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(this.nodes[b]===void 0&&this.groups[b]===void 0)throw new Error(`The right-hand id [${b}] does not yet exist. Please create the service/group before declaring an edge to it.`);const a=this.nodes[L].in,f=this.nodes[b].in;if(h&&a&&f&&a==f)throw new Error(`The left-hand id [${L}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(i&&a&&f&&a==f)throw new Error(`The right-hand id [${b}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const e={lhsId:L,lhsDir:A,lhsInto:N,lhsGroup:h,rhsId:b,rhsDir:G,rhsInto:v,rhsGroup:i,title:r};this.edges.push(e),this.nodes[L]&&this.nodes[b]&&(this.nodes[L].edges.push(this.edges[this.edges.length-1]),this.nodes[b].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}addLayoutHint(L){if(L.members.length<2)throw new Error(`An align directive requires at least two members; got ${L.members.length}`);const b=new Set;L.members.forEach(A=>{if(this.registeredIds[A]!=="node")throw new Error(`align ${L.direction} references [${A}], which is not a service or junction`);if(b.has(A))throw new Error(`align ${L.direction} lists [${A}] more than once`);b.add(A)}),this.layoutHints.push(L)}getLayoutHints(){return this.layoutHints}getDataStructures(){if(this.dataStructures===void 0){const L={},b=Object.entries(this.nodes).reduce((i,[r,a])=>(i[r]=a.edges.reduce((f,e)=>{const u=this.getNode(e.lhsId)?.in,t=this.getNode(e.rhsId)?.in;if(u&&t&&u!==t){const s=Ar(e.lhsDir,e.rhsDir);s!=="bend"&&(L[u]??={},L[u][t]=s,L[t]??={},L[t][u]=s)}if(e.lhsId===r){const s=pe(e.lhsDir,e.rhsDir);s&&(f[s]=e.rhsId)}else{const s=pe(e.rhsDir,e.lhsDir);s&&(f[s]=e.lhsId)}return f},{}),i),{}),A=Object.keys(b)[0],G={[A]:1},N=Object.keys(b).reduce((i,r)=>r===A?i:{...i,[r]:1},{}),v=gt(i=>{const r={[i]:[0,0]},a=[i];for(;a.length>0;){const f=a.shift();if(f){G[f]=1,delete N[f];const e=b[f],[u,t]=r[f];Object.entries(e).forEach(([s,o])=>{G[o]||(r[o]=Cr([u,t],s),a.push(o))})}}return r},"BFS"),h=[v(A)];for(;Object.keys(N).length>0;)h.push(v(Object.keys(N)[0]));this.dataStructures={adjList:b,spatialMaps:h,groupAlignments:L}}return this.dataStructures}setElementForId(L,b){this.elements[L]=b}getElementById(L){return this.elements[L]}getConfig(){return rr({...Dr,...ir().architecture})}getConfigField(L){return this.getConfig()[L]}},xr=gt((L,b)=>{ke(L,b),L.groups.map(A=>b.addGroup(A)),L.services.map(A=>b.addService({...A,type:"service"})),L.junctions.map(A=>b.addJunction({...A,type:"junction"})),L.edges.map(A=>b.addEdge(A)),L.alignments?.map(A=>b.addLayoutHint({direction:A.direction,members:[...A.members]}))},"populateDb"),Ge={parser:{yy:void 0},parse:gt(async L=>{const b=await fr("architecture",L);Se.debug(b);const A=Ge.parser?.yy;if(!(A instanceof Pe))throw new Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");xr(b,A)},"parse")},Ir=gt(L=>` +import{p as ke}from"./chunk-JWPE2WC7-DTx-f56M.js";import{_ as gt,F as Ze,ad as qe,l as Se,b as Qe,a as Je,o as Ke,p as je,g as _e,s as tr,q as er,B as rr,z as ir,D as ar,c as me,a$ as Ee,ai as ve,i as nr,d as or,r as sr,aj as hr,b7 as lr}from"./mermaid.core-Cahi9cr1.js";import{p as fr}from"./cynefin-VYW2F7L2-C5gNr-Q4.js";import{c as Fe}from"./cytoscape.esm-OyMbaexL.js";import{g as cr}from"./_commonjsHelpers-CqkleIqs.js";import"./index-HRJ6xRtC.js";var se={exports:{}},he={exports:{}},le={exports:{}},gr=le.exports,Me;function ur(){return Me||(Me=1,(function(L,b){(function(G,N){L.exports=N()})(gr,function(){return(function(A){var G={};function N(v){if(G[v])return G[v].exports;var h=G[v]={i:v,l:!1,exports:{}};return A[v].call(h.exports,h,h.exports,N),h.l=!0,h.exports}return N.m=A,N.c=G,N.i=function(v){return v},N.d=function(v,h,i){N.o(v,h)||Object.defineProperty(v,h,{configurable:!1,enumerable:!0,get:i})},N.n=function(v){var h=v&&v.__esModule?function(){return v.default}:function(){return v};return N.d(h,"a",h),h},N.o=function(v,h){return Object.prototype.hasOwnProperty.call(v,h)},N.p="",N(N.s=28)})([(function(A,G,N){function v(){}v.QUALITY=1,v.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,v.DEFAULT_INCREMENTAL=!1,v.DEFAULT_ANIMATION_ON_LAYOUT=!0,v.DEFAULT_ANIMATION_DURING_LAYOUT=!1,v.DEFAULT_ANIMATION_PERIOD=50,v.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,v.DEFAULT_GRAPH_MARGIN=15,v.NODE_DIMENSIONS_INCLUDE_LABELS=!1,v.SIMPLE_NODE_SIZE=40,v.SIMPLE_NODE_HALF_SIZE=v.SIMPLE_NODE_SIZE/2,v.EMPTY_COMPOUND_NODE_SIZE=40,v.MIN_EDGE_LENGTH=1,v.WORLD_BOUNDARY=1e6,v.INITIAL_WORLD_BOUNDARY=v.WORLD_BOUNDARY/1e3,v.WORLD_CENTER_X=1200,v.WORLD_CENTER_Y=900,A.exports=v}),(function(A,G,N){var v=N(2),h=N(8),i=N(9);function r(f,e,u){v.call(this,u),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=u,this.bendpoints=[],this.source=f,this.target=e}r.prototype=Object.create(v.prototype);for(var a in v)r[a]=v[a];r.prototype.getSource=function(){return this.source},r.prototype.getTarget=function(){return this.target},r.prototype.isInterGraph=function(){return this.isInterGraph},r.prototype.getLength=function(){return this.length},r.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},r.prototype.getBendpoints=function(){return this.bendpoints},r.prototype.getLca=function(){return this.lca},r.prototype.getSourceInLca=function(){return this.sourceInLca},r.prototype.getTargetInLca=function(){return this.targetInLca},r.prototype.getOtherEnd=function(f){if(this.source===f)return this.target;if(this.target===f)return this.source;throw"Node is not incident with this edge"},r.prototype.getOtherEndInGraph=function(f,e){for(var u=this.getOtherEnd(f),t=e.getGraphManager().getRoot();;){if(u.getOwner()==e)return u;if(u.getOwner()==t)break;u=u.getOwner().getParent()}return null},r.prototype.updateLength=function(){var f=new Array(4);this.isOverlapingSourceAndTarget=h.getIntersection(this.target.getRect(),this.source.getRect(),f),this.isOverlapingSourceAndTarget||(this.lengthX=f[0]-f[2],this.lengthY=f[1]-f[3],Math.abs(this.lengthX)<1&&(this.lengthX=i.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=i.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},r.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=i.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=i.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},A.exports=r}),(function(A,G,N){function v(h){this.vGraphObject=h}A.exports=v}),(function(A,G,N){var v=N(2),h=N(10),i=N(13),r=N(0),a=N(16),f=N(5);function e(t,s,o,c){o==null&&c==null&&(c=s),v.call(this,c),t.graphManager!=null&&(t=t.graphManager),this.estimatedSize=h.MIN_VALUE,this.inclusionTreeDepth=h.MAX_VALUE,this.vGraphObject=c,this.edges=[],this.graphManager=t,o!=null&&s!=null?this.rect=new i(s.x,s.y,o.width,o.height):this.rect=new i}e.prototype=Object.create(v.prototype);for(var u in v)e[u]=v[u];e.prototype.getEdges=function(){return this.edges},e.prototype.getChild=function(){return this.child},e.prototype.getOwner=function(){return this.owner},e.prototype.getWidth=function(){return this.rect.width},e.prototype.setWidth=function(t){this.rect.width=t},e.prototype.getHeight=function(){return this.rect.height},e.prototype.setHeight=function(t){this.rect.height=t},e.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},e.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},e.prototype.getCenter=function(){return new f(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},e.prototype.getLocation=function(){return new f(this.rect.x,this.rect.y)},e.prototype.getRect=function(){return this.rect},e.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},e.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},e.prototype.setRect=function(t,s){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=s.width,this.rect.height=s.height},e.prototype.setCenter=function(t,s){this.rect.x=t-this.rect.width/2,this.rect.y=s-this.rect.height/2},e.prototype.setLocation=function(t,s){this.rect.x=t,this.rect.y=s},e.prototype.moveBy=function(t,s){this.rect.x+=t,this.rect.y+=s},e.prototype.getEdgeListToNode=function(t){var s=[],o=this;return o.edges.forEach(function(c){if(c.target==t){if(c.source!=o)throw"Incorrect edge source!";s.push(c)}}),s},e.prototype.getEdgesBetween=function(t){var s=[],o=this;return o.edges.forEach(function(c){if(!(c.source==o||c.target==o))throw"Incorrect edge source and/or target";(c.target==t||c.source==t)&&s.push(c)}),s},e.prototype.getNeighborsList=function(){var t=new Set,s=this;return s.edges.forEach(function(o){if(o.source==s)t.add(o.target);else{if(o.target!=s)throw"Incorrect incidency!";t.add(o.source)}}),t},e.prototype.withChildren=function(){var t=new Set,s,o;if(t.add(this),this.child!=null)for(var c=this.child.getNodes(),l=0;ls?(this.rect.x-=(this.labelWidth-s)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(s+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(o+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>o?(this.rect.y-=(this.labelHeight-o)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(o+this.labelHeight))}}},e.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==h.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},e.prototype.transform=function(t){var s=this.rect.x;s>r.WORLD_BOUNDARY?s=r.WORLD_BOUNDARY:s<-r.WORLD_BOUNDARY&&(s=-r.WORLD_BOUNDARY);var o=this.rect.y;o>r.WORLD_BOUNDARY?o=r.WORLD_BOUNDARY:o<-r.WORLD_BOUNDARY&&(o=-r.WORLD_BOUNDARY);var c=new f(s,o),l=t.inverseTransformPoint(c);this.setLocation(l.x,l.y)},e.prototype.getLeft=function(){return this.rect.x},e.prototype.getRight=function(){return this.rect.x+this.rect.width},e.prototype.getTop=function(){return this.rect.y},e.prototype.getBottom=function(){return this.rect.y+this.rect.height},e.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},A.exports=e}),(function(A,G,N){var v=N(0);function h(){}for(var i in v)h[i]=v[i];h.MAX_ITERATIONS=2500,h.DEFAULT_EDGE_LENGTH=50,h.DEFAULT_SPRING_STRENGTH=.45,h.DEFAULT_REPULSION_STRENGTH=4500,h.DEFAULT_GRAVITY_STRENGTH=.4,h.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,h.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,h.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,h.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,h.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,h.COOLING_ADAPTATION_FACTOR=.33,h.ADAPTATION_LOWER_NODE_LIMIT=1e3,h.ADAPTATION_UPPER_NODE_LIMIT=5e3,h.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,h.MAX_NODE_DISPLACEMENT=h.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,h.MIN_REPULSION_DIST=h.DEFAULT_EDGE_LENGTH/10,h.CONVERGENCE_CHECK_PERIOD=100,h.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,h.MIN_EDGE_LENGTH=1,h.GRID_CALCULATION_CHECK_PERIOD=10,A.exports=h}),(function(A,G,N){function v(h,i){h==null&&i==null?(this.x=0,this.y=0):(this.x=h,this.y=i)}v.prototype.getX=function(){return this.x},v.prototype.getY=function(){return this.y},v.prototype.setX=function(h){this.x=h},v.prototype.setY=function(h){this.y=h},v.prototype.getDifference=function(h){return new DimensionD(this.x-h.x,this.y-h.y)},v.prototype.getCopy=function(){return new v(this.x,this.y)},v.prototype.translate=function(h){return this.x+=h.width,this.y+=h.height,this},A.exports=v}),(function(A,G,N){var v=N(2),h=N(10),i=N(0),r=N(7),a=N(3),f=N(1),e=N(13),u=N(12),t=N(11);function s(c,l,T){v.call(this,T),this.estimatedSize=h.MIN_VALUE,this.margin=i.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=c,l!=null&&l instanceof r?this.graphManager=l:l!=null&&l instanceof Layout&&(this.graphManager=l.graphManager)}s.prototype=Object.create(v.prototype);for(var o in v)s[o]=v[o];s.prototype.getNodes=function(){return this.nodes},s.prototype.getEdges=function(){return this.edges},s.prototype.getGraphManager=function(){return this.graphManager},s.prototype.getParent=function(){return this.parent},s.prototype.getLeft=function(){return this.left},s.prototype.getRight=function(){return this.right},s.prototype.getTop=function(){return this.top},s.prototype.getBottom=function(){return this.bottom},s.prototype.isConnected=function(){return this.isConnected},s.prototype.add=function(c,l,T){if(l==null&&T==null){var g=c;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(g)>-1)throw"Node already in graph!";return g.owner=this,this.getNodes().push(g),g}else{var d=c;if(!(this.getNodes().indexOf(l)>-1&&this.getNodes().indexOf(T)>-1))throw"Source or target not in graph!";if(!(l.owner==T.owner&&l.owner==this))throw"Both owners must be this graph!";return l.owner!=T.owner?null:(d.source=l,d.target=T,d.isInterGraph=!1,this.getEdges().push(d),l.edges.push(d),T!=l&&T.edges.push(d),d)}},s.prototype.remove=function(c){var l=c;if(c instanceof a){if(l==null)throw"Node is null!";if(!(l.owner!=null&&l.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var T=l.edges.slice(),g,d=T.length,C=0;C-1&&P>-1))throw"Source and/or target doesn't know this edge!";g.source.edges.splice(w,1),g.target!=g.source&&g.target.edges.splice(P,1);var S=g.source.owner.getEdges().indexOf(g);if(S==-1)throw"Not in owner's edge list!";g.source.owner.getEdges().splice(S,1)}},s.prototype.updateLeftTop=function(){for(var c=h.MAX_VALUE,l=h.MAX_VALUE,T,g,d,C=this.getNodes(),S=C.length,w=0;wT&&(c=T),l>g&&(l=g)}return c==h.MAX_VALUE?null:(C[0].getParent().paddingLeft!=null?d=C[0].getParent().paddingLeft:d=this.margin,this.left=l-d,this.top=c-d,new u(this.left,this.top))},s.prototype.updateBounds=function(c){for(var l=h.MAX_VALUE,T=-h.MAX_VALUE,g=h.MAX_VALUE,d=-h.MAX_VALUE,C,S,w,P,B,U=this.nodes,V=U.length,M=0;MC&&(l=C),Tw&&(g=w),dC&&(l=C),Tw&&(g=w),d=this.nodes.length){var V=0;T.forEach(function(M){M.owner==c&&V++}),V==this.nodes.length&&(this.isConnected=!0)}},A.exports=s}),(function(A,G,N){var v,h=N(1);function i(r){v=N(6),this.layout=r,this.graphs=[],this.edges=[]}i.prototype.addRoot=function(){var r=this.layout.newGraph(),a=this.layout.newNode(null),f=this.add(r,a);return this.setRootGraph(f),this.rootGraph},i.prototype.add=function(r,a,f,e,u){if(f==null&&e==null&&u==null){if(r==null)throw"Graph is null!";if(a==null)throw"Parent node is null!";if(this.graphs.indexOf(r)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(r),r.parent!=null)throw"Already has a parent!";if(a.child!=null)throw"Already has a child!";return r.parent=a,a.child=r,r}else{u=f,e=a,f=r;var t=e.getOwner(),s=u.getOwner();if(!(t!=null&&t.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(s!=null&&s.getGraphManager()==this))throw"Target not in this graph mgr!";if(t==s)return f.isInterGraph=!1,t.add(f,e,u);if(f.isInterGraph=!0,f.source=e,f.target=u,this.edges.indexOf(f)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(f),!(f.source!=null&&f.target!=null))throw"Edge source and/or target is null!";if(!(f.source.edges.indexOf(f)==-1&&f.target.edges.indexOf(f)==-1))throw"Edge already in source and/or target incidency list!";return f.source.edges.push(f),f.target.edges.push(f),f}},i.prototype.remove=function(r){if(r instanceof v){var a=r;if(a.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(a==this.rootGraph||a.parent!=null&&a.parent.graphManager==this))throw"Invalid parent node!";var f=[];f=f.concat(a.getEdges());for(var e,u=f.length,t=0;t=r.getRight()?a[0]+=Math.min(r.getX()-i.getX(),i.getRight()-r.getRight()):r.getX()<=i.getX()&&r.getRight()>=i.getRight()&&(a[0]+=Math.min(i.getX()-r.getX(),r.getRight()-i.getRight())),i.getY()<=r.getY()&&i.getBottom()>=r.getBottom()?a[1]+=Math.min(r.getY()-i.getY(),i.getBottom()-r.getBottom()):r.getY()<=i.getY()&&r.getBottom()>=i.getBottom()&&(a[1]+=Math.min(i.getY()-r.getY(),r.getBottom()-i.getBottom()));var u=Math.abs((r.getCenterY()-i.getCenterY())/(r.getCenterX()-i.getCenterX()));r.getCenterY()===i.getCenterY()&&r.getCenterX()===i.getCenterX()&&(u=1);var t=u*a[0],s=a[1]/u;a[0]t)return a[0]=f,a[1]=o,a[2]=u,a[3]=U,!1;if(eu)return a[0]=s,a[1]=e,a[2]=P,a[3]=t,!1;if(fu?(a[0]=l,a[1]=T,n=!0):(a[0]=c,a[1]=o,n=!0):p===y&&(f>u?(a[0]=s,a[1]=o,n=!0):(a[0]=g,a[1]=T,n=!0)),-m===y?u>f?(a[2]=B,a[3]=U,E=!0):(a[2]=P,a[3]=w,E=!0):m===y&&(u>f?(a[2]=S,a[3]=w,E=!0):(a[2]=V,a[3]=U,E=!0)),n&&E)return!1;if(f>u?e>t?(I=this.getCardinalDirection(p,y,4),O=this.getCardinalDirection(m,y,2)):(I=this.getCardinalDirection(-p,y,3),O=this.getCardinalDirection(-m,y,1)):e>t?(I=this.getCardinalDirection(-p,y,1),O=this.getCardinalDirection(-m,y,3)):(I=this.getCardinalDirection(p,y,2),O=this.getCardinalDirection(m,y,4)),!n)switch(I){case 1:W=o,R=f+-C/y,a[0]=R,a[1]=W;break;case 2:R=g,W=e+d*y,a[0]=R,a[1]=W;break;case 3:W=T,R=f+C/y,a[0]=R,a[1]=W;break;case 4:R=l,W=e+-d*y,a[0]=R,a[1]=W;break}if(!E)switch(O){case 1:Q=w,x=u+-_/y,a[2]=x,a[3]=Q;break;case 2:x=V,Q=t+M*y,a[2]=x,a[3]=Q;break;case 3:Q=U,x=u+_/y,a[2]=x,a[3]=Q;break;case 4:x=B,Q=t+-M*y,a[2]=x,a[3]=Q;break}}return!1},h.getCardinalDirection=function(i,r,a){return i>r?a:1+a%4},h.getIntersection=function(i,r,a,f){if(f==null)return this.getIntersection2(i,r,a);var e=i.x,u=i.y,t=r.x,s=r.y,o=a.x,c=a.y,l=f.x,T=f.y,g=void 0,d=void 0,C=void 0,S=void 0,w=void 0,P=void 0,B=void 0,U=void 0,V=void 0;return C=s-u,w=e-t,B=t*u-e*s,S=T-c,P=o-l,U=l*c-o*T,V=C*P-S*w,V===0?null:(g=(w*U-P*B)/V,d=(S*B-C*U)/V,new v(g,d))},h.angleOfVector=function(i,r,a,f){var e=void 0;return i!==a?(e=Math.atan((f-r)/(a-i)),a=0){var T=(-o+Math.sqrt(o*o-4*s*c))/(2*s),g=(-o-Math.sqrt(o*o-4*s*c))/(2*s),d=null;return T>=0&&T<=1?[T]:g>=0&&g<=1?[g]:d}else return null},h.HALF_PI=.5*Math.PI,h.ONE_AND_HALF_PI=1.5*Math.PI,h.TWO_PI=2*Math.PI,h.THREE_PI=3*Math.PI,A.exports=h}),(function(A,G,N){function v(){}v.sign=function(h){return h>0?1:h<0?-1:0},v.floor=function(h){return h<0?Math.ceil(h):Math.floor(h)},v.ceil=function(h){return h<0?Math.floor(h):Math.ceil(h)},A.exports=v}),(function(A,G,N){function v(){}v.MAX_VALUE=2147483647,v.MIN_VALUE=-2147483648,A.exports=v}),(function(A,G,N){var v=(function(){function e(u,t){for(var s=0;s"u"?"undefined":v(i);return i==null||r!="object"&&r!="function"},A.exports=h}),(function(A,G,N){function v(o){if(Array.isArray(o)){for(var c=0,l=Array(o.length);c0&&c;){for(C.push(w[0]);C.length>0&&c;){var P=C[0];C.splice(0,1),d.add(P);for(var B=P.getEdges(),g=0;g-1&&w.splice(_,1)}d=new Set,S=new Map}}return o},s.prototype.createDummyNodesForBendpoints=function(o){for(var c=[],l=o.source,T=this.graphManager.calcLowestCommonAncestor(o.source,o.target),g=0;g0){for(var T=this.edgeToDummyNodes.get(l),g=0;g=0&&c.splice(U,1);var V=S.getNeighborsList();V.forEach(function(n){if(l.indexOf(n)<0){var E=T.get(n),p=E-1;p==1&&P.push(n),T.set(n,p)}})}l=l.concat(P),(c.length==1||c.length==2)&&(g=!0,d=c[0])}return d},s.prototype.setGraphManager=function(o){this.graphManager=o},A.exports=s}),(function(A,G,N){function v(){}v.seed=1,v.x=0,v.nextDouble=function(){return v.x=Math.sin(v.seed++)*1e4,v.x-Math.floor(v.x)},A.exports=v}),(function(A,G,N){var v=N(5);function h(i,r){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}h.prototype.getWorldOrgX=function(){return this.lworldOrgX},h.prototype.setWorldOrgX=function(i){this.lworldOrgX=i},h.prototype.getWorldOrgY=function(){return this.lworldOrgY},h.prototype.setWorldOrgY=function(i){this.lworldOrgY=i},h.prototype.getWorldExtX=function(){return this.lworldExtX},h.prototype.setWorldExtX=function(i){this.lworldExtX=i},h.prototype.getWorldExtY=function(){return this.lworldExtY},h.prototype.setWorldExtY=function(i){this.lworldExtY=i},h.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},h.prototype.setDeviceOrgX=function(i){this.ldeviceOrgX=i},h.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},h.prototype.setDeviceOrgY=function(i){this.ldeviceOrgY=i},h.prototype.getDeviceExtX=function(){return this.ldeviceExtX},h.prototype.setDeviceExtX=function(i){this.ldeviceExtX=i},h.prototype.getDeviceExtY=function(){return this.ldeviceExtY},h.prototype.setDeviceExtY=function(i){this.ldeviceExtY=i},h.prototype.transformX=function(i){var r=0,a=this.lworldExtX;return a!=0&&(r=this.ldeviceOrgX+(i-this.lworldOrgX)*this.ldeviceExtX/a),r},h.prototype.transformY=function(i){var r=0,a=this.lworldExtY;return a!=0&&(r=this.ldeviceOrgY+(i-this.lworldOrgY)*this.ldeviceExtY/a),r},h.prototype.inverseTransformX=function(i){var r=0,a=this.ldeviceExtX;return a!=0&&(r=this.lworldOrgX+(i-this.ldeviceOrgX)*this.lworldExtX/a),r},h.prototype.inverseTransformY=function(i){var r=0,a=this.ldeviceExtY;return a!=0&&(r=this.lworldOrgY+(i-this.ldeviceOrgY)*this.lworldExtY/a),r},h.prototype.inverseTransformPoint=function(i){var r=new v(this.inverseTransformX(i.x),this.inverseTransformY(i.y));return r},A.exports=h}),(function(A,G,N){function v(t){if(Array.isArray(t)){for(var s=0,o=Array(t.length);si.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*i.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-i.ADAPTATION_LOWER_NODE_LIMIT)/(i.ADAPTATION_UPPER_NODE_LIMIT-i.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-i.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=i.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>i.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(i.COOLING_ADAPTATION_FACTOR,1-(t-i.ADAPTATION_LOWER_NODE_LIMIT)/(i.ADAPTATION_UPPER_NODE_LIMIT-i.ADAPTATION_LOWER_NODE_LIMIT)*(1-i.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=i.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*i.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},e.prototype.calcSpringForces=function(){for(var t=this.getAllEdges(),s,o=0;o0&&arguments[0]!==void 0?arguments[0]:!0,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,o,c,l,T,g=this.getAllNodes(),d;if(this.useFRGridVariant)for(this.totalIterations%i.GRID_CALCULATION_CHECK_PERIOD==1&&t&&this.updateGrid(),d=new Set,o=0;oC||d>C)&&(t.gravitationForceX=-this.gravityConstant*l,t.gravitationForceY=-this.gravityConstant*T)):(C=s.getEstimatedSize()*this.compoundGravityRangeFactor,(g>C||d>C)&&(t.gravitationForceX=-this.gravityConstant*l*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*T*this.compoundGravityConstant))},e.prototype.isConverged=function(){var t,s=!1;return this.totalIterations>this.maxIterations/3&&(s=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement=g.length||C>=g[0].length)){for(var S=0;Se}}]),a})();A.exports=r}),(function(A,G,N){function v(){}v.svd=function(h){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=h.length,this.n=h[0].length;var i=Math.min(this.m,this.n);this.s=(function(Tt){for(var Ct=[];Tt-- >0;)Ct.push(0);return Ct})(Math.min(this.m+1,this.n)),this.U=(function(Tt){var Ct=function Bt(bt){if(bt.length==0)return 0;for(var zt=[],St=0;St0;)Ct.push(0);return Ct})(this.n),a=(function(Tt){for(var Ct=[];Tt-- >0;)Ct.push(0);return Ct})(this.m),f=!0,e=Math.min(this.m-1,this.n),u=Math.max(0,Math.min(this.n-2,this.m)),t=0;t=0;m--)if(this.s[m]!==0){for(var y=m+1;y=0;z--){if((function(Tt,Ct){return Tt&&Ct})(z0;){var J=void 0,It=void 0;for(J=n-2;J>=-1&&J!==-1;J--)if(Math.abs(r[J])<=ht+tt*(Math.abs(this.s[J])+Math.abs(this.s[J+1]))){r[J]=0;break}if(J===n-2)It=4;else{var Nt=void 0;for(Nt=n-1;Nt>=J&&Nt!==J;Nt--){var vt=(Nt!==n?Math.abs(r[Nt]):0)+(Nt!==J+1?Math.abs(r[Nt-1]):0);if(Math.abs(this.s[Nt])<=ht+tt*vt){this.s[Nt]=0;break}}Nt===J?It=3:Nt===n-1?It=1:(It=2,J=Nt)}switch(J++,It){case 1:{var it=r[n-2];r[n-2]=0;for(var ut=n-2;ut>=J;ut--){var Et=v.hypot(this.s[ut],it),wt=this.s[ut]/Et,Ot=it/Et;this.s[ut]=Et,ut!==J&&(it=-Ot*r[ut-1],r[ut-1]=wt*r[ut-1]);for(var mt=0;mt=this.s[J+1]);){var Lt=this.s[J];if(this.s[J]=this.s[J+1],this.s[J+1]=Lt,JMath.abs(i)?(r=i/h,r=Math.abs(h)*Math.sqrt(1+r*r)):i!=0?(r=h/i,r=Math.abs(i)*Math.sqrt(1+r*r)):r=0,r},A.exports=v}),(function(A,G,N){var v=(function(){function r(a,f){for(var e=0;e2&&arguments[2]!==void 0?arguments[2]:1,u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,t=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;h(this,r),this.sequence1=a,this.sequence2=f,this.match_score=e,this.mismatch_penalty=u,this.gap_penalty=t,this.iMax=a.length+1,this.jMax=f.length+1,this.grid=new Array(this.iMax);for(var s=0;s=0;a--){var f=this.listeners[a];f.event===i&&f.callback===r&&this.listeners.splice(a,1)}},h.emit=function(i,r){for(var a=0;a{var G={45:((i,r,a)=>{var f={};f.layoutBase=a(551),f.CoSEConstants=a(806),f.CoSEEdge=a(767),f.CoSEGraph=a(880),f.CoSEGraphManager=a(578),f.CoSELayout=a(765),f.CoSENode=a(991),f.ConstraintHandler=a(902),i.exports=f}),806:((i,r,a)=>{var f=a(551).FDLayoutConstants;function e(){}for(var u in f)e[u]=f[u];e.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,e.DEFAULT_RADIAL_SEPARATION=f.DEFAULT_EDGE_LENGTH,e.DEFAULT_COMPONENT_SEPERATION=60,e.TILE=!0,e.TILING_PADDING_VERTICAL=10,e.TILING_PADDING_HORIZONTAL=10,e.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,e.ENFORCE_CONSTRAINTS=!0,e.APPLY_LAYOUT=!0,e.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,e.TREE_REDUCTION_ON_INCREMENTAL=!0,e.PURE_INCREMENTAL=e.DEFAULT_INCREMENTAL,i.exports=e}),767:((i,r,a)=>{var f=a(551).FDLayoutEdge;function e(t,s,o){f.call(this,t,s,o)}e.prototype=Object.create(f.prototype);for(var u in f)e[u]=f[u];i.exports=e}),880:((i,r,a)=>{var f=a(551).LGraph;function e(t,s,o){f.call(this,t,s,o)}e.prototype=Object.create(f.prototype);for(var u in f)e[u]=f[u];i.exports=e}),578:((i,r,a)=>{var f=a(551).LGraphManager;function e(t){f.call(this,t)}e.prototype=Object.create(f.prototype);for(var u in f)e[u]=f[u];i.exports=e}),765:((i,r,a)=>{var f=a(551).FDLayout,e=a(578),u=a(880),t=a(991),s=a(767),o=a(806),c=a(902),l=a(551).FDLayoutConstants,T=a(551).LayoutConstants,g=a(551).Point,d=a(551).PointD,C=a(551).DimensionD,S=a(551).Layout,w=a(551).Integer,P=a(551).IGeometry,B=a(551).LGraph,U=a(551).Transform,V=a(551).LinkedList;function M(){f.call(this),this.toBeTiled={},this.constraints={}}M.prototype=Object.create(f.prototype);for(var _ in f)M[_]=f[_];M.prototype.newGraphManager=function(){var n=new e(this);return this.graphManager=n,n},M.prototype.newGraph=function(n){return new u(null,this.graphManager,n)},M.prototype.newNode=function(n){return new t(this.graphManager,n)},M.prototype.newEdge=function(n){return new s(null,null,n)},M.prototype.initParameters=function(){f.prototype.initParameters.call(this,arguments),this.isSubLayout||(o.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=o.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=o.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=l.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=l.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=l.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},M.prototype.initSpringEmbedder=function(){f.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/l.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},M.prototype.layout=function(){var n=T.DEFAULT_CREATE_BENDS_AS_NEEDED;return n&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},M.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental){if(o.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var E=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(I){return E.has(I)});this.graphManager.setAllNodesToApplyGravitation(p)}}else{var n=this.getFlatForest();if(n.length>0)this.positionNodesRadially(n);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var E=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(m){return E.has(m)});this.graphManager.setAllNodesToApplyGravitation(p),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(c.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),o.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},M.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%l.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var n=new Set(this.getAllNodes()),E=this.nodesWithGravity.filter(function(y){return n.has(y)});this.graphManager.setAllNodesToApplyGravitation(E),this.graphManager.updateBounds(),this.updateGrid(),o.PURE_INCREMENTAL?this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),o.PURE_INCREMENTAL?this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var p=!this.isTreeGrowing&&!this.isGrowthFinished,m=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(p,m),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},M.prototype.getPositionsData=function(){for(var n=this.graphManager.getAllNodes(),E={},p=0;p0&&this.updateDisplacements();for(var p=0;p0&&(m.fixedNodeWeight=I)}}if(this.constraints.relativePlacementConstraint){var O=new Map,R=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(D){n.fixedNodesOnHorizontal.add(D),n.fixedNodesOnVertical.add(D)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var W=this.constraints.alignmentConstraint.vertical,p=0;p=2*D.length/3;tt--)H=Math.floor(Math.random()*(tt+1)),k=D[tt],D[tt]=D[H],D[H]=k;return D},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(D){if(D.left){var H=O.has(D.left)?O.get(D.left):D.left,k=O.has(D.right)?O.get(D.right):D.right;n.nodesInRelativeHorizontal.includes(H)||(n.nodesInRelativeHorizontal.push(H),n.nodeToRelativeConstraintMapHorizontal.set(H,[]),n.dummyToNodeForVerticalAlignment.has(H)?n.nodeToTempPositionMapHorizontal.set(H,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(H)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set(H,n.idToNodeMap.get(H).getCenterX())),n.nodesInRelativeHorizontal.includes(k)||(n.nodesInRelativeHorizontal.push(k),n.nodeToRelativeConstraintMapHorizontal.set(k,[]),n.dummyToNodeForVerticalAlignment.has(k)?n.nodeToTempPositionMapHorizontal.set(k,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(k)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set(k,n.idToNodeMap.get(k).getCenterX())),n.nodeToRelativeConstraintMapHorizontal.get(H).push({right:k,gap:D.gap}),n.nodeToRelativeConstraintMapHorizontal.get(k).push({left:H,gap:D.gap})}else{var tt=R.has(D.top)?R.get(D.top):D.top,ht=R.has(D.bottom)?R.get(D.bottom):D.bottom;n.nodesInRelativeVertical.includes(tt)||(n.nodesInRelativeVertical.push(tt),n.nodeToRelativeConstraintMapVertical.set(tt,[]),n.dummyToNodeForHorizontalAlignment.has(tt)?n.nodeToTempPositionMapVertical.set(tt,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(tt)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(tt,n.idToNodeMap.get(tt).getCenterY())),n.nodesInRelativeVertical.includes(ht)||(n.nodesInRelativeVertical.push(ht),n.nodeToRelativeConstraintMapVertical.set(ht,[]),n.dummyToNodeForHorizontalAlignment.has(ht)?n.nodeToTempPositionMapVertical.set(ht,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(ht)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(ht,n.idToNodeMap.get(ht).getCenterY())),n.nodeToRelativeConstraintMapVertical.get(tt).push({bottom:ht,gap:D.gap}),n.nodeToRelativeConstraintMapVertical.get(ht).push({top:tt,gap:D.gap})}});else{var Q=new Map,z=new Map;this.constraints.relativePlacementConstraint.forEach(function(D){if(D.left){var H=O.has(D.left)?O.get(D.left):D.left,k=O.has(D.right)?O.get(D.right):D.right;Q.has(H)?Q.get(H).push(k):Q.set(H,[k]),Q.has(k)?Q.get(k).push(H):Q.set(k,[H])}else{var tt=R.has(D.top)?R.get(D.top):D.top,ht=R.has(D.bottom)?R.get(D.bottom):D.bottom;z.has(tt)?z.get(tt).push(ht):z.set(tt,[ht]),z.has(ht)?z.get(ht).push(tt):z.set(ht,[tt])}});var X=function(H,k){var tt=[],ht=[],J=new V,It=new Set,Nt=0;return H.forEach(function(vt,it){if(!It.has(it)){tt[Nt]=[],ht[Nt]=!1;var ut=it;for(J.push(ut),It.add(ut),tt[Nt].push(ut);J.length!=0;){ut=J.shift(),k.has(ut)&&(ht[Nt]=!0);var Et=H.get(ut);Et.forEach(function(wt){It.has(wt)||(J.push(wt),It.add(wt),tt[Nt].push(wt))})}Nt++}}),{components:tt,isFixed:ht}},rt=X(Q,n.fixedNodesOnHorizontal);this.componentsOnHorizontal=rt.components,this.fixedComponentsOnHorizontal=rt.isFixed;var $=X(z,n.fixedNodesOnVertical);this.componentsOnVertical=$.components,this.fixedComponentsOnVertical=$.isFixed}}},M.prototype.updateDisplacements=function(){var n=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function($){var D=n.idToNodeMap.get($.nodeId);D.displacementX=0,D.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var E=this.constraints.alignmentConstraint.vertical,p=0;p1){var R;for(R=0;Rm&&(m=Math.floor(O.y)),I=Math.floor(O.x+o.DEFAULT_COMPONENT_SEPERATION)}this.transform(new d(T.WORLD_CENTER_X-O.x/2,T.WORLD_CENTER_Y-O.y/2))},M.radialLayout=function(n,E,p){var m=Math.max(this.maxDiagonalInTree(n),o.DEFAULT_RADIAL_SEPARATION);M.branchRadialLayout(E,null,0,359,0,m);var y=B.calculateBounds(n),I=new U;I.setDeviceOrgX(y.getMinX()),I.setDeviceOrgY(y.getMinY()),I.setWorldOrgX(p.x),I.setWorldOrgY(p.y);for(var O=0;O1;){var k=H[0];H.splice(0,1);var tt=z.indexOf(k);tt>=0&&z.splice(tt,1),$--,X--}E!=null?D=(z.indexOf(H[0])+1)%$:D=0;for(var ht=Math.abs(m-p)/X,J=D;rt!=X;J=++J%$){var It=z[J].getOtherEnd(n);if(It!=E){var Nt=(p+rt*ht)%360,vt=(Nt+ht)%360;M.branchRadialLayout(It,n,Nt,vt,y+I,I),rt++}}},M.maxDiagonalInTree=function(n){for(var E=w.MIN_VALUE,p=0;pE&&(E=y)}return E},M.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},M.prototype.groupZeroDegreeMembers=function(){var n=this,E={};this.memberGroups={},this.idToDummyNode={};for(var p=[],m=this.graphManager.getAllNodes(),y=0;y"u"&&(E[R]=[]),E[R]=E[R].concat(I)}Object.keys(E).forEach(function(W){if(E[W].length>1){var x="DummyCompound_"+W;n.memberGroups[x]=E[W];var Q=E[W][0].getParent(),z=new t(n.graphManager);z.id=x,z.paddingLeft=Q.paddingLeft||0,z.paddingRight=Q.paddingRight||0,z.paddingBottom=Q.paddingBottom||0,z.paddingTop=Q.paddingTop||0,n.idToDummyNode[x]=z;var X=n.getGraphManager().add(n.newGraph(),z),rt=Q.getChild();rt.add(z);for(var $=0;$y?(m.rect.x-=(m.labelWidth-y)/2,m.setWidth(m.labelWidth),m.labelMarginLeft=(m.labelWidth-y)/2):m.labelPosHorizontal=="right"&&m.setWidth(y+m.labelWidth)),m.labelHeight&&(m.labelPosVertical=="top"?(m.rect.y-=m.labelHeight,m.setHeight(I+m.labelHeight),m.labelMarginTop=m.labelHeight):m.labelPosVertical=="center"&&m.labelHeight>I?(m.rect.y-=(m.labelHeight-I)/2,m.setHeight(m.labelHeight),m.labelMarginTop=(m.labelHeight-I)/2):m.labelPosVertical=="bottom"&&m.setHeight(I+m.labelHeight))}})},M.prototype.repopulateCompounds=function(){for(var n=this.compoundOrder.length-1;n>=0;n--){var E=this.compoundOrder[n],p=E.id,m=E.paddingLeft,y=E.paddingTop,I=E.labelMarginLeft,O=E.labelMarginTop;this.adjustLocations(this.tiledMemberPack[p],E.rect.x,E.rect.y,m,y,I,O)}},M.prototype.repopulateZeroDegreeMembers=function(){var n=this,E=this.tiledZeroDegreePack;Object.keys(E).forEach(function(p){var m=n.idToDummyNode[p],y=m.paddingLeft,I=m.paddingTop,O=m.labelMarginLeft,R=m.labelMarginTop;n.adjustLocations(E[p],m.rect.x,m.rect.y,y,I,O,R)})},M.prototype.getToBeTiled=function(n){var E=n.id;if(this.toBeTiled[E]!=null)return this.toBeTiled[E];var p=n.getChild();if(p==null)return this.toBeTiled[E]=!1,!1;for(var m=p.getNodes(),y=0;y0)return this.toBeTiled[E]=!1,!1;if(I.getChild()==null){this.toBeTiled[I.id]=!1;continue}if(!this.getToBeTiled(I))return this.toBeTiled[E]=!1,!1}return this.toBeTiled[E]=!0,!0},M.prototype.getNodeDegree=function(n){n.id;for(var E=n.getEdges(),p=0,m=0;mQ&&(Q=X.rect.height)}p+=Q+n.verticalPadding}},M.prototype.tileCompoundMembers=function(n,E){var p=this;this.tiledMemberPack=[],Object.keys(n).forEach(function(m){var y=E[m];if(p.tiledMemberPack[m]=p.tileNodes(n[m],y.paddingLeft+y.paddingRight),y.rect.width=p.tiledMemberPack[m].width,y.rect.height=p.tiledMemberPack[m].height,y.setCenter(p.tiledMemberPack[m].centerX,p.tiledMemberPack[m].centerY),y.labelMarginLeft=0,y.labelMarginTop=0,o.NODE_DIMENSIONS_INCLUDE_LABELS){var I=y.rect.width,O=y.rect.height;y.labelWidth&&(y.labelPosHorizontal=="left"?(y.rect.x-=y.labelWidth,y.setWidth(I+y.labelWidth),y.labelMarginLeft=y.labelWidth):y.labelPosHorizontal=="center"&&y.labelWidth>I?(y.rect.x-=(y.labelWidth-I)/2,y.setWidth(y.labelWidth),y.labelMarginLeft=(y.labelWidth-I)/2):y.labelPosHorizontal=="right"&&y.setWidth(I+y.labelWidth)),y.labelHeight&&(y.labelPosVertical=="top"?(y.rect.y-=y.labelHeight,y.setHeight(O+y.labelHeight),y.labelMarginTop=y.labelHeight):y.labelPosVertical=="center"&&y.labelHeight>O?(y.rect.y-=(y.labelHeight-O)/2,y.setHeight(y.labelHeight),y.labelMarginTop=(y.labelHeight-O)/2):y.labelPosVertical=="bottom"&&y.setHeight(O+y.labelHeight))}})},M.prototype.tileNodes=function(n,E){var p=this.tileNodesByFavoringDim(n,E,!0),m=this.tileNodesByFavoringDim(n,E,!1),y=this.getOrgRatio(p),I=this.getOrgRatio(m),O;return IR&&(R=$.getWidth())});var W=I/y,x=O/y,Q=Math.pow(p-m,2)+4*(W+m)*(x+p)*y,z=(m-p+Math.sqrt(Q))/(2*(W+m)),X;E?(X=Math.ceil(z),X==z&&X++):X=Math.floor(z);var rt=X*(W+m)-m;return R>rt&&(rt=R),rt+=m*2,rt},M.prototype.tileNodesByFavoringDim=function(n,E,p){var m=o.TILING_PADDING_VERTICAL,y=o.TILING_PADDING_HORIZONTAL,I=o.TILING_COMPARE_BY,O={rows:[],rowWidth:[],rowHeight:[],width:0,height:E,verticalPadding:m,horizontalPadding:y,centerX:0,centerY:0};I&&(O.idealRowWidth=this.calcIdealRowWidth(n,p));var R=function(D){return D.rect.width*D.rect.height},W=function(D,H){return R(H)-R(D)};n.sort(function($,D){var H=W;return O.idealRowWidth?(H=I,H($.id,D.id)):H($,D)});for(var x=0,Q=0,z=0;z0&&(O+=n.horizontalPadding),n.rowWidth[p]=O,n.width0&&(R+=n.verticalPadding);var W=0;R>n.rowHeight[p]&&(W=n.rowHeight[p],n.rowHeight[p]=R,W=n.rowHeight[p]-W),n.height+=W,n.rows[p].push(E)},M.prototype.getShortestRowIndex=function(n){for(var E=-1,p=Number.MAX_VALUE,m=0;mp&&(E=m,p=n.rowWidth[m]);return E},M.prototype.canAddHorizontal=function(n,E,p){if(n.idealRowWidth){var m=n.rows.length-1,y=n.rowWidth[m];return y+E+n.horizontalPadding<=n.idealRowWidth}var I=this.getShortestRowIndex(n);if(I<0)return!0;var O=n.rowWidth[I];if(O+n.horizontalPadding+E<=n.width)return!0;var R=0;n.rowHeight[I]0&&(R=p+n.verticalPadding-n.rowHeight[I]);var W;n.width-O>=E+n.horizontalPadding?W=(n.height+R)/(O+E+n.horizontalPadding):W=(n.height+R)/n.width,R=p+n.verticalPadding;var x;return n.widthI&&E!=p){m.splice(-1,1),n.rows[p].push(y),n.rowWidth[E]=n.rowWidth[E]-I,n.rowWidth[p]=n.rowWidth[p]+I,n.width=n.rowWidth[instance.getLongestRowIndex(n)];for(var O=Number.MIN_VALUE,R=0;RO&&(O=m[R].height);E>0&&(O+=n.verticalPadding);var W=n.rowHeight[E]+n.rowHeight[p];n.rowHeight[E]=O,n.rowHeight[p]0)for(var rt=y;rt<=I;rt++)X[0]+=this.grid[rt][O-1].length+this.grid[rt][O].length-1;if(I0)for(var rt=O;rt<=R;rt++)X[3]+=this.grid[y-1][rt].length+this.grid[y][rt].length-1;for(var $=w.MAX_VALUE,D,H,k=0;k{var f=a(551).FDLayoutNode,e=a(551).IMath;function u(s,o,c,l){f.call(this,s,o,c,l)}u.prototype=Object.create(f.prototype);for(var t in f)u[t]=f[t];u.prototype.calculateDisplacement=function(){var s=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=s.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=s.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=s.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=s.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>s.coolingFactor*s.maxNodeDisplacement&&(this.displacementX=s.coolingFactor*s.maxNodeDisplacement*e.sign(this.displacementX)),Math.abs(this.displacementY)>s.coolingFactor*s.maxNodeDisplacement&&(this.displacementY=s.coolingFactor*s.maxNodeDisplacement*e.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},u.prototype.propogateDisplacementToChildren=function(s,o){for(var c=this.getChild().getNodes(),l,T=0;T{function f(c){if(Array.isArray(c)){for(var l=0,T=Array(c.length);l0){var Lt=0;ot.forEach(function(st){Z=="horizontal"?(et.set(st,g.has(st)?d[g.get(st)]:q.get(st)),Lt+=et.get(st)):(et.set(st,g.has(st)?C[g.get(st)]:q.get(st)),Lt+=et.get(st))}),Lt=Lt/ot.length,lt.forEach(function(st){K.has(st)||et.set(st,Lt)})}else{var ft=0;lt.forEach(function(st){Z=="horizontal"?ft+=g.has(st)?d[g.get(st)]:q.get(st):ft+=g.has(st)?C[g.get(st)]:q.get(st)}),ft=ft/lt.length,lt.forEach(function(st){et.set(st,ft)})}});for(var At=function(){var ot=dt.shift(),Lt=Y.get(ot);Lt.forEach(function(ft){if(et.get(ft.id)st&&(st=kt),KtXt&&(Xt=Kt)}}catch(ee){Ct=!0,Bt=ee}finally{try{!Tt&&bt.return&&bt.return()}finally{if(Ct)throw Bt}}var fe=(Lt+st)/2-(ft+Xt)/2,Qt=!0,jt=!1,_t=void 0;try{for(var Jt=lt[Symbol.iterator](),ne;!(Qt=(ne=Jt.next()).done);Qt=!0){var te=ne.value;et.set(te,et.get(te)+fe)}}catch(ee){jt=!0,_t=ee}finally{try{!Qt&&Jt.return&&Jt.return()}finally{if(jt)throw _t}}})}return et},_=function(Y){var Z=0,K=0,q=0,at=0;if(Y.forEach(function(j){j.left?d[g.get(j.left)]-d[g.get(j.right)]>=0?Z++:K++:C[g.get(j.top)]-C[g.get(j.bottom)]>=0?q++:at++}),Z>K&&q>at)for(var ct=0;ctK)for(var nt=0;ntat)for(var et=0;et1)l.fixedNodeConstraint.forEach(function(F,Y){m[Y]=[F.position.x,F.position.y],y[Y]=[d[g.get(F.nodeId)],C[g.get(F.nodeId)]]}),I=!0;else if(l.alignmentConstraint)(function(){var F=0;if(l.alignmentConstraint.vertical){for(var Y=l.alignmentConstraint.vertical,Z=function(et){var j=new Set;Y[et].forEach(function(pt){j.add(pt)});var dt=new Set([].concat(f(j)).filter(function(pt){return R.has(pt)})),At=void 0;dt.size>0?At=d[g.get(dt.values().next().value)]:At=V(j).x,Y[et].forEach(function(pt){m[F]=[At,C[g.get(pt)]],y[F]=[d[g.get(pt)],C[g.get(pt)]],F++})},K=0;K0?At=d[g.get(dt.values().next().value)]:At=V(j).y,q[et].forEach(function(pt){m[F]=[d[g.get(pt)],At],y[F]=[d[g.get(pt)],C[g.get(pt)]],F++})},ct=0;ctz&&(z=Q[rt].length,X=rt);if(z0){var mt={x:0,y:0};l.fixedNodeConstraint.forEach(function(F,Y){var Z={x:d[g.get(F.nodeId)],y:C[g.get(F.nodeId)]},K=F.position,q=U(K,Z);mt.x+=q.x,mt.y+=q.y}),mt.x/=l.fixedNodeConstraint.length,mt.y/=l.fixedNodeConstraint.length,d.forEach(function(F,Y){d[Y]+=mt.x}),C.forEach(function(F,Y){C[Y]+=mt.y}),l.fixedNodeConstraint.forEach(function(F){d[g.get(F.nodeId)]=F.position.x,C[g.get(F.nodeId)]=F.position.y})}if(l.alignmentConstraint){if(l.alignmentConstraint.vertical)for(var Dt=l.alignmentConstraint.vertical,Rt=function(Y){var Z=new Set;Dt[Y].forEach(function(at){Z.add(at)});var K=new Set([].concat(f(Z)).filter(function(at){return R.has(at)})),q=void 0;K.size>0?q=d[g.get(K.values().next().value)]:q=V(Z).x,Z.forEach(function(at){R.has(at)||(d[g.get(at)]=q)})},Ht=0;Ht0?q=C[g.get(K.values().next().value)]:q=V(Z).y,Z.forEach(function(at){R.has(at)||(C[g.get(at)]=q)})},Ft=0;Ft{i.exports=A})},N={};function v(i){var r=N[i];if(r!==void 0)return r.exports;var a=N[i]={exports:{}};return G[i](a,a.exports,v),a.exports}var h=v(45);return h})()})})(he)),he.exports}var pr=se.exports,De;function yr(){return De||(De=1,(function(L,b){(function(G,N){L.exports=N(vr())})(pr,function(A){return(()=>{var G={658:(i=>{i.exports=Object.assign!=null?Object.assign.bind(Object):function(r){for(var a=arguments.length,f=Array(a>1?a-1:0),e=1;e{var f=(function(){function t(s,o){var c=[],l=!0,T=!1,g=void 0;try{for(var d=s[Symbol.iterator](),C;!(l=(C=d.next()).done)&&(c.push(C.value),!(o&&c.length===o));l=!0);}catch(S){T=!0,g=S}finally{try{!l&&d.return&&d.return()}finally{if(T)throw g}}return c}return function(s,o){if(Array.isArray(s))return s;if(Symbol.iterator in Object(s))return t(s,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),e=a(140).layoutBase.LinkedList,u={};u.getTopMostNodes=function(t){for(var s={},o=0;o0&&I.merge(x)});for(var O=0;O1){C=g[0],S=C.connectedEdges().length,g.forEach(function(y){y.connectedEdges().length0&&c.set("dummy"+(c.size+1),B),U},u.relocateComponent=function(t,s,o){if(!o.fixedNodeConstraint){var c=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,T=Number.POSITIVE_INFINITY,g=Number.NEGATIVE_INFINITY;if(o.quality=="draft"){var d=!0,C=!1,S=void 0;try{for(var w=s.nodeIndexes[Symbol.iterator](),P;!(d=(P=w.next()).done);d=!0){var B=P.value,U=f(B,2),V=U[0],M=U[1],_=o.cy.getElementById(V);if(_){var n=_.boundingBox(),E=s.xCoords[M]-n.w/2,p=s.xCoords[M]+n.w/2,m=s.yCoords[M]-n.h/2,y=s.yCoords[M]+n.h/2;El&&(l=p),mg&&(g=y)}}}catch(x){C=!0,S=x}finally{try{!d&&w.return&&w.return()}finally{if(C)throw S}}var I=t.x-(l+c)/2,O=t.y-(g+T)/2;s.xCoords=s.xCoords.map(function(x){return x+I}),s.yCoords=s.yCoords.map(function(x){return x+O})}else{Object.keys(s).forEach(function(x){var Q=s[x],z=Q.getRect().x,X=Q.getRect().x+Q.getRect().width,rt=Q.getRect().y,$=Q.getRect().y+Q.getRect().height;zl&&(l=X),rtg&&(g=$)});var R=t.x-(l+c)/2,W=t.y-(g+T)/2;Object.keys(s).forEach(function(x){var Q=s[x];Q.setCenter(Q.getCenterX()+R,Q.getCenterY()+W)})}}},u.calcBoundingBox=function(t,s,o,c){for(var l=Number.MAX_SAFE_INTEGER,T=Number.MIN_SAFE_INTEGER,g=Number.MAX_SAFE_INTEGER,d=Number.MIN_SAFE_INTEGER,C=void 0,S=void 0,w=void 0,P=void 0,B=t.descendants().not(":parent"),U=B.length,V=0;VC&&(l=C),Tw&&(g=w),d{var f=a(548),e=a(140).CoSELayout,u=a(140).CoSENode,t=a(140).layoutBase.PointD,s=a(140).layoutBase.DimensionD,o=a(140).layoutBase.LayoutConstants,c=a(140).layoutBase.FDLayoutConstants,l=a(140).CoSEConstants,T=function(d,C){var S=d.cy,w=d.eles,P=w.nodes(),B=w.edges(),U=void 0,V=void 0,M=void 0,_={};d.randomize&&(U=C.nodeIndexes,V=C.xCoords,M=C.yCoords);var n=function(x){return typeof x=="function"},E=function(x,Q){return n(x)?x(Q):x},p=f.calcParentsWithoutChildren(S,w),m=function W(x,Q,z,X){for(var rt=Q.length,$=0;$0){var J=void 0;J=z.getGraphManager().add(z.newGraph(),k),W(J,H,z,X)}}},y=function(x,Q,z){for(var X=0,rt=0,$=0;$0?l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=X/rt:n(d.idealEdgeLength)?l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=50:l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=d.idealEdgeLength,l.MIN_REPULSION_DIST=c.MIN_REPULSION_DIST=c.DEFAULT_EDGE_LENGTH/10,l.DEFAULT_RADIAL_SEPARATION=c.DEFAULT_EDGE_LENGTH)},I=function(x,Q){Q.fixedNodeConstraint&&(x.constraints.fixedNodeConstraint=Q.fixedNodeConstraint),Q.alignmentConstraint&&(x.constraints.alignmentConstraint=Q.alignmentConstraint),Q.relativePlacementConstraint&&(x.constraints.relativePlacementConstraint=Q.relativePlacementConstraint)};d.nestingFactor!=null&&(l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=c.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=d.nestingFactor),d.gravity!=null&&(l.DEFAULT_GRAVITY_STRENGTH=c.DEFAULT_GRAVITY_STRENGTH=d.gravity),d.numIter!=null&&(l.MAX_ITERATIONS=c.MAX_ITERATIONS=d.numIter),d.gravityRange!=null&&(l.DEFAULT_GRAVITY_RANGE_FACTOR=c.DEFAULT_GRAVITY_RANGE_FACTOR=d.gravityRange),d.gravityCompound!=null&&(l.DEFAULT_COMPOUND_GRAVITY_STRENGTH=c.DEFAULT_COMPOUND_GRAVITY_STRENGTH=d.gravityCompound),d.gravityRangeCompound!=null&&(l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=c.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=d.gravityRangeCompound),d.initialEnergyOnIncremental!=null&&(l.DEFAULT_COOLING_FACTOR_INCREMENTAL=c.DEFAULT_COOLING_FACTOR_INCREMENTAL=d.initialEnergyOnIncremental),d.tilingCompareBy!=null&&(l.TILING_COMPARE_BY=d.tilingCompareBy),d.quality=="proof"?o.QUALITY=2:o.QUALITY=0,l.NODE_DIMENSIONS_INCLUDE_LABELS=c.NODE_DIMENSIONS_INCLUDE_LABELS=o.NODE_DIMENSIONS_INCLUDE_LABELS=d.nodeDimensionsIncludeLabels,l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!d.randomize,l.ANIMATE=c.ANIMATE=o.ANIMATE=d.animate,l.TILE=d.tile,l.TILING_PADDING_VERTICAL=typeof d.tilingPaddingVertical=="function"?d.tilingPaddingVertical.call():d.tilingPaddingVertical,l.TILING_PADDING_HORIZONTAL=typeof d.tilingPaddingHorizontal=="function"?d.tilingPaddingHorizontal.call():d.tilingPaddingHorizontal,l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!0,l.PURE_INCREMENTAL=!d.randomize,o.DEFAULT_UNIFORM_LEAF_NODE_SIZES=d.uniformNodeDimensions,d.step=="transformed"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,l.ENFORCE_CONSTRAINTS=!1,l.APPLY_LAYOUT=!1),d.step=="enforced"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!0,l.APPLY_LAYOUT=!1),d.step=="cose"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!1,l.APPLY_LAYOUT=!0),d.step=="all"&&(d.randomize?l.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!0,l.APPLY_LAYOUT=!0),d.fixedNodeConstraint||d.alignmentConstraint||d.relativePlacementConstraint?l.TREE_REDUCTION_ON_INCREMENTAL=!1:l.TREE_REDUCTION_ON_INCREMENTAL=!0;var O=new e,R=O.newGraphManager();return m(R.addRoot(),f.getTopMostNodes(P),O,d),y(O,R,B),I(O,d),O.runLayout(),_};i.exports={coseLayout:T}}),212:((i,r,a)=>{var f=(function(){function d(C,S){for(var w=0;w0)if(p){var I=t.getTopMostNodes(w.eles.nodes());if(M=t.connectComponents(P,w.eles,I),M.forEach(function(vt){var it=vt.boundingBox();_.push({x:it.x1+it.w/2,y:it.y1+it.h/2})}),w.randomize&&M.forEach(function(vt){w.eles=vt,U.push(o(w))}),w.quality=="default"||w.quality=="proof"){var O=P.collection();if(w.tile){var R=new Map,W=[],x=[],Q=0,z={nodeIndexes:R,xCoords:W,yCoords:x},X=[];if(M.forEach(function(vt,it){vt.edges().length==0&&(vt.nodes().forEach(function(ut,Et){O.merge(vt.nodes()[Et]),ut.isParent()||(z.nodeIndexes.set(vt.nodes()[Et].id(),Q++),z.xCoords.push(vt.nodes()[0].position().x),z.yCoords.push(vt.nodes()[0].position().y))}),X.push(it))}),O.length>1){var rt=O.boundingBox();_.push({x:rt.x1+rt.w/2,y:rt.y1+rt.h/2}),M.push(O),U.push(z);for(var $=X.length-1;$>=0;$--)M.splice(X[$],1),U.splice(X[$],1),_.splice(X[$],1)}}M.forEach(function(vt,it){w.eles=vt,V.push(l(w,U[it])),t.relocateComponent(_[it],V[it],w)})}else M.forEach(function(vt,it){t.relocateComponent(_[it],U[it],w)});var D=new Set;if(M.length>1){var H=[],k=B.filter(function(vt){return vt.css("display")=="none"});M.forEach(function(vt,it){var ut=void 0;if(w.quality=="draft"&&(ut=U[it].nodeIndexes),vt.nodes().not(k).length>0){var Et={};Et.edges=[],Et.nodes=[];var wt=void 0;vt.nodes().not(k).forEach(function(Ot){if(w.quality=="draft")if(!Ot.isParent())wt=ut.get(Ot.id()),Et.nodes.push({x:U[it].xCoords[wt]-Ot.boundingbox().w/2,y:U[it].yCoords[wt]-Ot.boundingbox().h/2,width:Ot.boundingbox().w,height:Ot.boundingbox().h});else{var mt=t.calcBoundingBox(Ot,U[it].xCoords,U[it].yCoords,ut);Et.nodes.push({x:mt.topLeftX,y:mt.topLeftY,width:mt.width,height:mt.height})}else V[it][Ot.id()]&&Et.nodes.push({x:V[it][Ot.id()].getLeft(),y:V[it][Ot.id()].getTop(),width:V[it][Ot.id()].getWidth(),height:V[it][Ot.id()].getHeight()})}),vt.edges().forEach(function(Ot){var mt=Ot.source(),Dt=Ot.target();if(mt.css("display")!="none"&&Dt.css("display")!="none")if(w.quality=="draft"){var Rt=ut.get(mt.id()),Ht=ut.get(Dt.id()),Ut=[],Pt=[];if(mt.isParent()){var Ft=t.calcBoundingBox(mt,U[it].xCoords,U[it].yCoords,ut);Ut.push(Ft.topLeftX+Ft.width/2),Ut.push(Ft.topLeftY+Ft.height/2)}else Ut.push(U[it].xCoords[Rt]),Ut.push(U[it].yCoords[Rt]);if(Dt.isParent()){var Yt=t.calcBoundingBox(Dt,U[it].xCoords,U[it].yCoords,ut);Pt.push(Yt.topLeftX+Yt.width/2),Pt.push(Yt.topLeftY+Yt.height/2)}else Pt.push(U[it].xCoords[Ht]),Pt.push(U[it].yCoords[Ht]);Et.edges.push({startX:Ut[0],startY:Ut[1],endX:Pt[0],endY:Pt[1]})}else V[it][mt.id()]&&V[it][Dt.id()]&&Et.edges.push({startX:V[it][mt.id()].getCenterX(),startY:V[it][mt.id()].getCenterY(),endX:V[it][Dt.id()].getCenterX(),endY:V[it][Dt.id()].getCenterY()})}),Et.nodes.length>0&&(H.push(Et),D.add(it))}});var tt=E.packComponents(H,w.randomize).shifts;if(w.quality=="draft")U.forEach(function(vt,it){var ut=vt.xCoords.map(function(wt){return wt+tt[it].dx}),Et=vt.yCoords.map(function(wt){return wt+tt[it].dy});vt.xCoords=ut,vt.yCoords=Et});else{var ht=0;D.forEach(function(vt){Object.keys(V[vt]).forEach(function(it){var ut=V[vt][it];ut.setCenter(ut.getCenterX()+tt[ht].dx,ut.getCenterY()+tt[ht].dy)}),ht++})}}}else{var m=w.eles.boundingBox();if(_.push({x:m.x1+m.w/2,y:m.y1+m.h/2}),w.randomize){var y=o(w);U.push(y)}w.quality=="default"||w.quality=="proof"?(V.push(l(w,U[0])),t.relocateComponent(_[0],V[0],w)):t.relocateComponent(_[0],U[0],w)}var J=function(it,ut){if(w.quality=="default"||w.quality=="proof"){typeof it=="number"&&(it=ut);var Et=void 0,wt=void 0,Ot=it.data("id");return V.forEach(function(Dt){Ot in Dt&&(Et={x:Dt[Ot].getRect().getCenterX(),y:Dt[Ot].getRect().getCenterY()},wt=Dt[Ot])}),w.nodeDimensionsIncludeLabels&&(wt.labelWidth&&(wt.labelPosHorizontal=="left"?Et.x+=wt.labelWidth/2:wt.labelPosHorizontal=="right"&&(Et.x-=wt.labelWidth/2)),wt.labelHeight&&(wt.labelPosVertical=="top"?Et.y+=wt.labelHeight/2:wt.labelPosVertical=="bottom"&&(Et.y-=wt.labelHeight/2))),Et==null&&(Et={x:it.position("x"),y:it.position("y")}),{x:Et.x,y:Et.y}}else{var mt=void 0;return U.forEach(function(Dt){var Rt=Dt.nodeIndexes.get(it.id());Rt!=null&&(mt={x:Dt.xCoords[Rt],y:Dt.yCoords[Rt]})}),mt==null&&(mt={x:it.position("x"),y:it.position("y")}),{x:mt.x,y:mt.y}}};if(w.quality=="default"||w.quality=="proof"||w.randomize){var It=t.calcParentsWithoutChildren(P,B),Nt=B.filter(function(vt){return vt.css("display")=="none"});w.eles=B.not(Nt),B.nodes().not(":parent").not(Nt).layoutPositions(S,w,J),It.length>0&&It.forEach(function(vt){vt.position(J(vt))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),d})();i.exports=g}),657:((i,r,a)=>{var f=a(548),e=a(140).layoutBase.Matrix,u=a(140).layoutBase.SVD,t=function(o){var c=o.cy,l=o.eles,T=l.nodes(),g=l.nodes(":parent"),d=new Map,C=new Map,S=new Map,w=[],P=[],B=[],U=[],V=[],M=[],_=[],n=[],E=void 0,p=1e8,m=1e-9,y=o.piTol,I=o.samplingType,O=o.nodeSeparation,R=void 0,W=function(){for(var Y=0,Z=0,K=!1;Z=at;){nt=q[at++];for(var xt=w[nt],lt=0;ltdt&&(dt=V[Lt],At=Lt)}return At},Q=function(Y){var Z=void 0;if(Y){Z=Math.floor(Math.random()*E);for(var q=0;q=1)break;j=et}for(var pt=0;pt=1)break;j=et}for(var lt=0;lt0&&(Z.isParent()?w[Y].push(S.get(Z.id())):w[Y].push(Z.id()))})});var Nt=function(Y){var Z=C.get(Y),K=void 0;d.get(Y).forEach(function(q){c.getElementById(q).isParent()?K=S.get(q):K=q,w[Z].push(K),w[C.get(K)].push(Y)})},vt=!0,it=!1,ut=void 0;try{for(var Et=d.keys()[Symbol.iterator](),wt;!(vt=(wt=Et.next()).done);vt=!0){var Ot=wt.value;Nt(Ot)}}catch(F){it=!0,ut=F}finally{try{!vt&&Et.return&&Et.return()}finally{if(it)throw ut}}E=C.size;var mt=void 0;if(E>2){R=E{var f=a(212),e=function(t){t&&t("layout","fcose",f)};typeof cytoscape<"u"&&e(cytoscape),i.exports=e}),140:(i=>{i.exports=A})},N={};function v(i){var r=N[i];if(r!==void 0)return r.exports;var a=N[i]={exports:{}};return G[i](a,a.exports,v),a.exports}var h=v(579);return h})()})})(se)),se.exports}var mr=yr();const Er=cr(mr);var xe={L:"left",R:"right",T:"top",B:"bottom"},Ie={L:gt(L=>`${L},${L/2} 0,${L} 0,0`,"L"),R:gt(L=>`0,${L/2} ${L},0 ${L},${L}`,"R"),T:gt(L=>`0,0 ${L},0 ${L/2},${L}`,"T"),B:gt(L=>`${L/2},0 ${L},${L} 0,${L}`,"B")},oe={L:gt((L,b)=>L-b+2,"L"),R:gt((L,b)=>L-2,"R"),T:gt((L,b)=>L-b+2,"T"),B:gt((L,b)=>L-2,"B")},Tr=gt(function(L){return Wt(L)?L==="L"?"R":"L":L==="T"?"B":"T"},"getOppositeArchitectureDirection"),Re=gt(function(L){const b=L;return b==="L"||b==="R"||b==="T"||b==="B"},"isArchitectureDirection"),Wt=gt(function(L){const b=L;return b==="L"||b==="R"},"isArchitectureDirectionX"),qt=gt(function(L){const b=L;return b==="T"||b==="B"},"isArchitectureDirectionY"),Te=gt(function(L,b){const A=Wt(L)&&qt(b),G=qt(L)&&Wt(b);return A||G},"isArchitectureDirectionXY"),Nr=gt(function(L){const b=L[0],A=L[1],G=Wt(b)&&qt(A),N=qt(b)&&Wt(A);return G||N},"isArchitecturePairXY"),Lr=gt(function(L){return L!=="LL"&&L!=="RR"&&L!=="TT"&&L!=="BB"},"isValidArchitectureDirectionPair"),pe=gt(function(L,b){const A=`${L}${b}`;return Lr(A)?A:void 0},"getArchitectureDirectionPair"),Cr=gt(function([L,b],A){const G=A[0],N=A[1];return Wt(G)?qt(N)?[L+(G==="L"?-1:1),b+(N==="T"?1:-1)]:[L+(G==="L"?-1:1),b]:Wt(N)?[L+(N==="L"?1:-1),b+(G==="T"?1:-1)]:[L,b+(G==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),wr=gt(function(L){return L==="LT"||L==="TL"?[1,1]:L==="BL"||L==="LB"?[1,-1]:L==="BR"||L==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),Ar=gt(function(L,b){return Te(L,b)?"bend":Wt(L)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),Mr=gt(function(L){return L.type==="service"},"isArchitectureService"),Or=gt(function(L){return L.type==="junction"},"isArchitectureJunction"),be=gt(L=>L.data(),"edgeData"),ie=gt(L=>L.data(),"nodeData"),Dr=ar.architecture,Pe=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.layoutHints=[],this.registeredIds={},this.elements={},this.diagramId="",this.setAccTitle=Qe,this.getAccTitle=Je,this.setDiagramTitle=Ke,this.getDiagramTitle=je,this.getAccDescription=_e,this.setAccDescription=tr,this.clear()}static{gt(this,"ArchitectureDB")}setDiagramId(L){this.diagramId=L}getDiagramId(){return this.diagramId}clear(){this.nodes={},this.groups={},this.edges=[],this.layoutHints=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},this.diagramId="",er()}addService({id:L,icon:b,in:A,title:G,iconText:N}){if(this.registeredIds[L]!==void 0)throw new Error(`The service id [${L}] is already in use by another ${this.registeredIds[L]}`);if(A!==void 0){if(L===A)throw new Error(`The service [${L}] cannot be placed within itself`);if(this.registeredIds[A]===void 0)throw new Error(`The service [${L}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds[A]==="node")throw new Error(`The service [${L}]'s parent is not a group`)}this.registeredIds[L]="node",this.nodes[L]={id:L,type:"service",icon:b,iconText:N,title:G,edges:[],in:A}}getServices(){return Object.values(this.nodes).filter(Mr)}addJunction({id:L,in:b}){if(this.registeredIds[L]!==void 0)throw new Error(`The junction id [${L}] is already in use by another ${this.registeredIds[L]}`);if(b!==void 0){if(L===b)throw new Error(`The junction [${L}] cannot be placed within itself`);if(this.registeredIds[b]===void 0)throw new Error(`The junction [${L}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds[b]==="node")throw new Error(`The junction [${L}]'s parent is not a group`)}this.registeredIds[L]="node",this.nodes[L]={id:L,type:"junction",edges:[],in:b}}getJunctions(){return Object.values(this.nodes).filter(Or)}getNodes(){return Object.values(this.nodes)}getNode(L){return this.nodes[L]??null}addGroup({id:L,icon:b,in:A,title:G}){if(this.registeredIds?.[L]!==void 0)throw new Error(`The group id [${L}] is already in use by another ${this.registeredIds[L]}`);if(A!==void 0){if(L===A)throw new Error(`The group [${L}] cannot be placed within itself`);if(this.registeredIds?.[A]===void 0)throw new Error(`The group [${L}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds?.[A]==="node")throw new Error(`The group [${L}]'s parent is not a group`)}this.registeredIds[L]="group",this.groups[L]={id:L,icon:b,title:G,in:A}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:L,rhsId:b,lhsDir:A,rhsDir:G,lhsInto:N,rhsInto:v,lhsGroup:h,rhsGroup:i,title:r}){if(!Re(A))throw new Error(`Invalid direction given for left hand side of edge ${L}--${b}. Expected (L,R,T,B) got ${String(A)}`);if(!Re(G))throw new Error(`Invalid direction given for right hand side of edge ${L}--${b}. Expected (L,R,T,B) got ${String(G)}`);if(this.nodes[L]===void 0&&this.groups[L]===void 0)throw new Error(`The left-hand id [${L}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(this.nodes[b]===void 0&&this.groups[b]===void 0)throw new Error(`The right-hand id [${b}] does not yet exist. Please create the service/group before declaring an edge to it.`);const a=this.nodes[L].in,f=this.nodes[b].in;if(h&&a&&f&&a==f)throw new Error(`The left-hand id [${L}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(i&&a&&f&&a==f)throw new Error(`The right-hand id [${b}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const e={lhsId:L,lhsDir:A,lhsInto:N,lhsGroup:h,rhsId:b,rhsDir:G,rhsInto:v,rhsGroup:i,title:r};this.edges.push(e),this.nodes[L]&&this.nodes[b]&&(this.nodes[L].edges.push(this.edges[this.edges.length-1]),this.nodes[b].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}addLayoutHint(L){if(L.members.length<2)throw new Error(`An align directive requires at least two members; got ${L.members.length}`);const b=new Set;L.members.forEach(A=>{if(this.registeredIds[A]!=="node")throw new Error(`align ${L.direction} references [${A}], which is not a service or junction`);if(b.has(A))throw new Error(`align ${L.direction} lists [${A}] more than once`);b.add(A)}),this.layoutHints.push(L)}getLayoutHints(){return this.layoutHints}getDataStructures(){if(this.dataStructures===void 0){const L={},b=Object.entries(this.nodes).reduce((i,[r,a])=>(i[r]=a.edges.reduce((f,e)=>{const u=this.getNode(e.lhsId)?.in,t=this.getNode(e.rhsId)?.in;if(u&&t&&u!==t){const s=Ar(e.lhsDir,e.rhsDir);s!=="bend"&&(L[u]??={},L[u][t]=s,L[t]??={},L[t][u]=s)}if(e.lhsId===r){const s=pe(e.lhsDir,e.rhsDir);s&&(f[s]=e.rhsId)}else{const s=pe(e.rhsDir,e.lhsDir);s&&(f[s]=e.lhsId)}return f},{}),i),{}),A=Object.keys(b)[0],G={[A]:1},N=Object.keys(b).reduce((i,r)=>r===A?i:{...i,[r]:1},{}),v=gt(i=>{const r={[i]:[0,0]},a=[i];for(;a.length>0;){const f=a.shift();if(f){G[f]=1,delete N[f];const e=b[f],[u,t]=r[f];Object.entries(e).forEach(([s,o])=>{G[o]||(r[o]=Cr([u,t],s),a.push(o))})}}return r},"BFS"),h=[v(A)];for(;Object.keys(N).length>0;)h.push(v(Object.keys(N)[0]));this.dataStructures={adjList:b,spatialMaps:h,groupAlignments:L}}return this.dataStructures}setElementForId(L,b){this.elements[L]=b}getElementById(L){return this.elements[L]}getConfig(){return rr({...Dr,...ir().architecture})}getConfigField(L){return this.getConfig()[L]}},xr=gt((L,b)=>{ke(L,b),L.groups.map(A=>b.addGroup(A)),L.services.map(A=>b.addService({...A,type:"service"})),L.junctions.map(A=>b.addJunction({...A,type:"junction"})),L.edges.map(A=>b.addEdge(A)),L.alignments?.map(A=>b.addLayoutHint({direction:A.direction,members:[...A.members]}))},"populateDb"),Ge={parser:{yy:void 0},parse:gt(async L=>{const b=await fr("architecture",L);Se.debug(b);const A=Ge.parser?.yy;if(!(A instanceof Pe))throw new Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");xr(b,A)},"parse")},Ir=gt(L=>` .edge { stroke-width: ${L.archEdgeWidth}; stroke: ${L.archEdgeColor}; diff --git a/apps/kimi-code/dist-web/assets/blockDiagram-677ZJIJ3-BB6RrvwG.js b/apps/kimi-code/dist-web/assets/blockDiagram-677ZJIJ3-CpvS2-LC.js similarity index 99% rename from apps/kimi-code/dist-web/assets/blockDiagram-677ZJIJ3-BB6RrvwG.js rename to apps/kimi-code/dist-web/assets/blockDiagram-677ZJIJ3-CpvS2-LC.js index c54a4b91df..76eb15c0b3 100644 --- a/apps/kimi-code/dist-web/assets/blockDiagram-677ZJIJ3-BB6RrvwG.js +++ b/apps/kimi-code/dist-web/assets/blockDiagram-677ZJIJ3-CpvS2-LC.js @@ -1,4 +1,4 @@ -import{g as de}from"./chunk-5VM5RSS4-DNp0lB9r.js";import{aA as pe,aB as Kt,aC as fe,aD as xe,aE as ye,aF as be,aG as we,aH as me,aI as Se,aJ as Le,aK as ke,aL as ve,aM as Ee,aN as _e,aO as Te,aP as De,aQ as Be,aR as Ne,aS as Ie,aT as Ce,aU as Oe,aV as Re,aW as Ae,aX as ze,aY as Me,_ as g,z as rt,d as D,e as Pe,l as k,q as Fe,t as We,c as R,aZ as Ye,a7 as He,a8 as Ke,a3 as Ue,a_ as M,a$ as kt,b0 as Q,as as Xe,y as $,k as Ve,b1 as je,i as Ct,b2 as Ot,b3 as Ge}from"./mermaid.core-BMAf1qng.js";import{G as Ze}from"./graph-DOmOIIwC.js";import{c as qe}from"./channel-DV0CaBk6.js";import"./index-B-HzRssS.js";import"./_commonjsHelpers-CqkleIqs.js";function Je(e){return Array.isArray(e)}function Qe(e){if(pe(e))return e;const t=Kt(e);if(!$e(e))return{};if(Je(e)){const s=Array.from(e);return e.length>0&&typeof e[0]=="string"&&Object.hasOwn(e,"index")&&(s.index=e.index,s.input=e.input),s}if(fe(e)){const s=e,i=s.constructor;return new i(s.buffer,s.byteOffset,s.length)}if(t==="[object ArrayBuffer]")return new ArrayBuffer(e.byteLength);if(t==="[object DataView]"){const s=e,i=s.buffer,c=s.byteOffset,r=s.byteLength,n=new ArrayBuffer(r),l=new Uint8Array(i,c,r);return new Uint8Array(n).set(l),new DataView(n)}if(t==="[object Boolean]"||t==="[object Number]"||t==="[object String]"){const s=e.constructor,i=new s(e.valueOf());return t==="[object String]"?er(i,e):xt(i,e),i}if(t==="[object Date]")return new Date(Number(e));if(t==="[object RegExp]"){const s=e,i=new RegExp(s.source,s.flags);return i.lastIndex=s.lastIndex,i}if(t==="[object Symbol]")return Object(Symbol.prototype.valueOf.call(e));if(t==="[object Map]"){const s=e,i=new Map;return s.forEach((c,r)=>{i.set(r,c)}),i}if(t==="[object Set]"){const s=e,i=new Set;return s.forEach(c=>{i.add(c)}),i}if(t==="[object Arguments]"){const s=e,i={};return xt(i,s),i.length=s.length,i[Symbol.iterator]=s[Symbol.iterator],i}const a={};return rr(a,e),xt(a,e),tr(a,e),a}function $e(e){switch(Kt(e)){case Me:case ze:case Ae:case Re:case Oe:case Ce:case Ie:case Ne:case Be:case De:case Te:case _e:case Ee:case ve:case ke:case Le:case Se:case me:case we:case be:case ye:case xe:return!0;default:return!1}}function xt(e,t){for(const a in t)Object.hasOwn(t,a)&&(e[a]=t[a])}function tr(e,t){const a=Object.getOwnPropertySymbols(t);for(let s=0;s=a)&&(e[s]=t[s])}function rr(e,t){const a=Object.getPrototypeOf(t);a!==null&&typeof t.constructor=="function"&&Object.setPrototypeOf(e,a)}var bt=(function(){var e=g(function(T,m,p,x){for(p=p||{},x=T.length;x--;p[T[x]]=m);return p},"o"),t=[1,15],a=[1,7],s=[1,13],i=[1,14],c=[1,19],r=[1,16],n=[1,17],l=[1,18],u=[8,30],h=[8,10,21,28,29,30,31,39,43,46],d=[1,23],b=[1,24],w=[8,10,15,16,21,28,29,30,31,39,43,46],y=[8,10,15,16,21,27,28,29,30,31,39,43,46],v=[1,49],S={trace:g(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"NODE_ID",34:"DIR",35:"NODE_DSTART",36:"NODE_DEND",37:"BLOCK_ARROW_START",38:"BLOCK_ARROW_END",39:"classDef",40:"CLASSDEF_ID",41:"CLASSDEF_STYLEOPTS",42:"DEFAULT",43:"class",44:"CLASSENTITY_IDS",45:"STYLECLASS",46:"style",47:"STYLE_ENTITY_IDS",48:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:g(function(m,p,x,L,E,o,F){var f=o.length-1;switch(E){case 4:L.getLogger().debug("Rule: separator (NL) ");break;case 5:L.getLogger().debug("Rule: separator (Space) ");break;case 6:L.getLogger().debug("Rule: separator (EOF) ");break;case 7:L.getLogger().debug("Rule: hierarchy: ",o[f-1]),L.setHierarchy(o[f-1]);break;case 8:L.getLogger().debug("Stop NL ");break;case 9:L.getLogger().debug("Stop EOF ");break;case 10:L.getLogger().debug("Stop NL2 ");break;case 11:L.getLogger().debug("Stop EOF2 ");break;case 12:L.getLogger().debug("Rule: statement: ",o[f]),typeof o[f].length=="number"?this.$=o[f]:this.$=[o[f]];break;case 13:L.getLogger().debug("Rule: statement #2: ",o[f-1]),this.$=[o[f-1]].concat(o[f]);break;case 14:L.getLogger().debug("Rule: link: ",o[f],m),this.$={edgeTypeStr:o[f],label:""};break;case 15:L.getLogger().debug("Rule: LABEL link: ",o[f-3],o[f-1],o[f]),this.$={edgeTypeStr:o[f],label:o[f-1]};break;case 18:const C=parseInt(o[f]),Z=L.generateId();this.$={id:Z,type:"space",label:"",width:C,children:[]};break;case 23:L.getLogger().debug("Rule: (nodeStatement link node) ",o[f-2],o[f-1],o[f]," typestr: ",o[f-1].edgeTypeStr);const V=L.edgeStrToEdgeData(o[f-1].edgeTypeStr),at=L.edgeStrToEdgeStartData(o[f-1].edgeTypeStr),gt=L.edgeStrToThickness(o[f-1].edgeTypeStr),O=L.edgeStrToPattern(o[f-1].edgeTypeStr);this.$=[{id:o[f-2].id,label:o[f-2].label,type:o[f-2].type,directions:o[f-2].directions},{id:o[f-2].id+"-"+o[f].id,start:o[f-2].id,end:o[f].id,label:o[f-1].label,type:"edge",thickness:gt,pattern:O,directions:o[f].directions,arrowTypeEnd:V,arrowTypeStart:at},{id:o[f].id,label:o[f].label,type:L.typeStr2Type(o[f].typeStr),directions:o[f].directions}];break;case 24:L.getLogger().debug("Rule: nodeStatement (abc88 node size) ",o[f-1],o[f]),this.$={id:o[f-1].id,label:o[f-1].label,type:L.typeStr2Type(o[f-1].typeStr),directions:o[f-1].directions,widthInColumns:parseInt(o[f],10)};break;case 25:L.getLogger().debug("Rule: nodeStatement (node) ",o[f]),this.$={id:o[f].id,label:o[f].label,type:L.typeStr2Type(o[f].typeStr),directions:o[f].directions,widthInColumns:1};break;case 26:L.getLogger().debug("APA123",this?this:"na"),L.getLogger().debug("COLUMNS: ",o[f]),this.$={type:"column-setting",columns:o[f]==="auto"?-1:parseInt(o[f])};break;case 27:L.getLogger().debug("Rule: id-block statement : ",o[f-2],o[f-1]),L.generateId(),this.$={...o[f-2],type:"composite",children:o[f-1]};break;case 28:L.getLogger().debug("Rule: blockStatement : ",o[f-2],o[f-1],o[f]);const j=L.generateId();this.$={id:j,type:"composite",label:"",children:o[f-1]};break;case 29:L.getLogger().debug("Rule: node (NODE_ID separator): ",o[f]),this.$={id:o[f]};break;case 30:L.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",o[f-1],o[f]),this.$={id:o[f-1],label:o[f].label,typeStr:o[f].typeStr,directions:o[f].directions};break;case 31:L.getLogger().debug("Rule: dirList: ",o[f]),this.$=[o[f]];break;case 32:L.getLogger().debug("Rule: dirList: ",o[f-1],o[f]),this.$=[o[f-1]].concat(o[f]);break;case 33:L.getLogger().debug("Rule: nodeShapeNLabel: ",o[f-2],o[f-1],o[f]),this.$={typeStr:o[f-2]+o[f],label:o[f-1]};break;case 34:L.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",o[f-3],o[f-2]," #3:",o[f-1],o[f]),this.$={typeStr:o[f-3]+o[f],label:o[f-2],directions:o[f-1]};break;case 35:case 36:this.$={type:"classDef",id:o[f-1].trim(),css:o[f].trim()};break;case 37:this.$={type:"applyClass",id:o[f-1].trim(),styleClass:o[f].trim()};break;case 38:this.$={type:"applyStyles",id:o[f-1].trim(),stylesStr:o[f].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:t,11:3,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:s,29:i,31:c,39:r,43:n,46:l},{8:[1,20]},e(u,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:t,21:a,28:s,29:i,31:c,39:r,43:n,46:l}),e(h,[2,16],{14:22,15:d,16:b}),e(h,[2,17]),e(h,[2,18]),e(h,[2,19]),e(h,[2,20]),e(h,[2,21]),e(h,[2,22]),e(w,[2,25],{27:[1,25]}),e(h,[2,26]),{19:26,26:12,31:c},{10:t,11:27,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:s,29:i,31:c,39:r,43:n,46:l},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(y,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(u,[2,13]),{26:35,31:c},{31:[2,14]},{17:[1,36]},e(w,[2,24]),{10:t,11:37,13:4,14:22,15:d,16:b,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:s,29:i,31:c,39:r,43:n,46:l},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(y,[2,30]),{18:[1,43]},{18:[1,44]},e(w,[2,23]),{18:[1,45]},{30:[1,46]},e(h,[2,28]),e(h,[2,35]),e(h,[2,36]),e(h,[2,37]),e(h,[2,38]),{36:[1,47]},{33:48,34:v},{15:[1,50]},e(h,[2,27]),e(y,[2,33]),{38:[1,51]},{33:52,34:v,38:[2,31]},{31:[2,15]},e(y,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:g(function(m,p){if(p.recoverable)this.trace(m);else{var x=new Error(m);throw x.hash=p,x}},"parseError"),parse:g(function(m){var p=this,x=[0],L=[],E=[null],o=[],F=this.table,f="",C=0,Z=0,V=2,at=1,gt=o.slice.call(arguments,1),O=Object.create(this.lexer),j={yy:{}};for(var ut in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ut)&&(j.yy[ut]=this.yy[ut]);O.setInput(m,j.yy),j.yy.lexer=O,j.yy.parser=this,typeof O.yylloc>"u"&&(O.yylloc={});var dt=O.yylloc;o.push(dt);var ge=O.options&&O.options.ranges;typeof j.yy.parseError=="function"?this.parseError=j.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ue(W){x.length=x.length-2*W,E.length=E.length-W,o.length=o.length-W}g(ue,"popStack");function Nt(){var W;return W=L.pop()||O.lex()||at,typeof W!="number"&&(W instanceof Array&&(L=W,W=L.pop()),W=p.symbols_[W]||W),W}g(Nt,"lex");for(var P,q,H,pt,J={},st,G,It,it;;){if(q=x[x.length-1],this.defaultActions[q]?H=this.defaultActions[q]:((P===null||typeof P>"u")&&(P=Nt()),H=F[q]&&F[q][P]),typeof H>"u"||!H.length||!H[0]){var ft="";it=[];for(st in F[q])this.terminals_[st]&&st>V&&it.push("'"+this.terminals_[st]+"'");O.showPosition?ft="Parse error on line "+(C+1)+`: +import{g as de}from"./chunk-5VM5RSS4-CfD0Yt-O.js";import{aA as pe,aB as Kt,aC as fe,aD as xe,aE as ye,aF as be,aG as we,aH as me,aI as Se,aJ as Le,aK as ke,aL as ve,aM as Ee,aN as _e,aO as Te,aP as De,aQ as Be,aR as Ne,aS as Ie,aT as Ce,aU as Oe,aV as Re,aW as Ae,aX as ze,aY as Me,_ as g,z as rt,d as D,e as Pe,l as k,q as Fe,t as We,c as R,aZ as Ye,a7 as He,a8 as Ke,a3 as Ue,a_ as M,a$ as kt,b0 as Q,as as Xe,y as $,k as Ve,b1 as je,i as Ct,b2 as Ot,b3 as Ge}from"./mermaid.core-Cahi9cr1.js";import{G as Ze}from"./graph-DOmOIIwC.js";import{c as qe}from"./channel-Bob_1R_C.js";import"./index-HRJ6xRtC.js";import"./_commonjsHelpers-CqkleIqs.js";function Je(e){return Array.isArray(e)}function Qe(e){if(pe(e))return e;const t=Kt(e);if(!$e(e))return{};if(Je(e)){const s=Array.from(e);return e.length>0&&typeof e[0]=="string"&&Object.hasOwn(e,"index")&&(s.index=e.index,s.input=e.input),s}if(fe(e)){const s=e,i=s.constructor;return new i(s.buffer,s.byteOffset,s.length)}if(t==="[object ArrayBuffer]")return new ArrayBuffer(e.byteLength);if(t==="[object DataView]"){const s=e,i=s.buffer,c=s.byteOffset,r=s.byteLength,n=new ArrayBuffer(r),l=new Uint8Array(i,c,r);return new Uint8Array(n).set(l),new DataView(n)}if(t==="[object Boolean]"||t==="[object Number]"||t==="[object String]"){const s=e.constructor,i=new s(e.valueOf());return t==="[object String]"?er(i,e):xt(i,e),i}if(t==="[object Date]")return new Date(Number(e));if(t==="[object RegExp]"){const s=e,i=new RegExp(s.source,s.flags);return i.lastIndex=s.lastIndex,i}if(t==="[object Symbol]")return Object(Symbol.prototype.valueOf.call(e));if(t==="[object Map]"){const s=e,i=new Map;return s.forEach((c,r)=>{i.set(r,c)}),i}if(t==="[object Set]"){const s=e,i=new Set;return s.forEach(c=>{i.add(c)}),i}if(t==="[object Arguments]"){const s=e,i={};return xt(i,s),i.length=s.length,i[Symbol.iterator]=s[Symbol.iterator],i}const a={};return rr(a,e),xt(a,e),tr(a,e),a}function $e(e){switch(Kt(e)){case Me:case ze:case Ae:case Re:case Oe:case Ce:case Ie:case Ne:case Be:case De:case Te:case _e:case Ee:case ve:case ke:case Le:case Se:case me:case we:case be:case ye:case xe:return!0;default:return!1}}function xt(e,t){for(const a in t)Object.hasOwn(t,a)&&(e[a]=t[a])}function tr(e,t){const a=Object.getOwnPropertySymbols(t);for(let s=0;s=a)&&(e[s]=t[s])}function rr(e,t){const a=Object.getPrototypeOf(t);a!==null&&typeof t.constructor=="function"&&Object.setPrototypeOf(e,a)}var bt=(function(){var e=g(function(T,m,p,x){for(p=p||{},x=T.length;x--;p[T[x]]=m);return p},"o"),t=[1,15],a=[1,7],s=[1,13],i=[1,14],c=[1,19],r=[1,16],n=[1,17],l=[1,18],u=[8,30],h=[8,10,21,28,29,30,31,39,43,46],d=[1,23],b=[1,24],w=[8,10,15,16,21,28,29,30,31,39,43,46],y=[8,10,15,16,21,27,28,29,30,31,39,43,46],v=[1,49],S={trace:g(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"NODE_ID",34:"DIR",35:"NODE_DSTART",36:"NODE_DEND",37:"BLOCK_ARROW_START",38:"BLOCK_ARROW_END",39:"classDef",40:"CLASSDEF_ID",41:"CLASSDEF_STYLEOPTS",42:"DEFAULT",43:"class",44:"CLASSENTITY_IDS",45:"STYLECLASS",46:"style",47:"STYLE_ENTITY_IDS",48:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:g(function(m,p,x,L,E,o,F){var f=o.length-1;switch(E){case 4:L.getLogger().debug("Rule: separator (NL) ");break;case 5:L.getLogger().debug("Rule: separator (Space) ");break;case 6:L.getLogger().debug("Rule: separator (EOF) ");break;case 7:L.getLogger().debug("Rule: hierarchy: ",o[f-1]),L.setHierarchy(o[f-1]);break;case 8:L.getLogger().debug("Stop NL ");break;case 9:L.getLogger().debug("Stop EOF ");break;case 10:L.getLogger().debug("Stop NL2 ");break;case 11:L.getLogger().debug("Stop EOF2 ");break;case 12:L.getLogger().debug("Rule: statement: ",o[f]),typeof o[f].length=="number"?this.$=o[f]:this.$=[o[f]];break;case 13:L.getLogger().debug("Rule: statement #2: ",o[f-1]),this.$=[o[f-1]].concat(o[f]);break;case 14:L.getLogger().debug("Rule: link: ",o[f],m),this.$={edgeTypeStr:o[f],label:""};break;case 15:L.getLogger().debug("Rule: LABEL link: ",o[f-3],o[f-1],o[f]),this.$={edgeTypeStr:o[f],label:o[f-1]};break;case 18:const C=parseInt(o[f]),Z=L.generateId();this.$={id:Z,type:"space",label:"",width:C,children:[]};break;case 23:L.getLogger().debug("Rule: (nodeStatement link node) ",o[f-2],o[f-1],o[f]," typestr: ",o[f-1].edgeTypeStr);const V=L.edgeStrToEdgeData(o[f-1].edgeTypeStr),at=L.edgeStrToEdgeStartData(o[f-1].edgeTypeStr),gt=L.edgeStrToThickness(o[f-1].edgeTypeStr),O=L.edgeStrToPattern(o[f-1].edgeTypeStr);this.$=[{id:o[f-2].id,label:o[f-2].label,type:o[f-2].type,directions:o[f-2].directions},{id:o[f-2].id+"-"+o[f].id,start:o[f-2].id,end:o[f].id,label:o[f-1].label,type:"edge",thickness:gt,pattern:O,directions:o[f].directions,arrowTypeEnd:V,arrowTypeStart:at},{id:o[f].id,label:o[f].label,type:L.typeStr2Type(o[f].typeStr),directions:o[f].directions}];break;case 24:L.getLogger().debug("Rule: nodeStatement (abc88 node size) ",o[f-1],o[f]),this.$={id:o[f-1].id,label:o[f-1].label,type:L.typeStr2Type(o[f-1].typeStr),directions:o[f-1].directions,widthInColumns:parseInt(o[f],10)};break;case 25:L.getLogger().debug("Rule: nodeStatement (node) ",o[f]),this.$={id:o[f].id,label:o[f].label,type:L.typeStr2Type(o[f].typeStr),directions:o[f].directions,widthInColumns:1};break;case 26:L.getLogger().debug("APA123",this?this:"na"),L.getLogger().debug("COLUMNS: ",o[f]),this.$={type:"column-setting",columns:o[f]==="auto"?-1:parseInt(o[f])};break;case 27:L.getLogger().debug("Rule: id-block statement : ",o[f-2],o[f-1]),L.generateId(),this.$={...o[f-2],type:"composite",children:o[f-1]};break;case 28:L.getLogger().debug("Rule: blockStatement : ",o[f-2],o[f-1],o[f]);const j=L.generateId();this.$={id:j,type:"composite",label:"",children:o[f-1]};break;case 29:L.getLogger().debug("Rule: node (NODE_ID separator): ",o[f]),this.$={id:o[f]};break;case 30:L.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",o[f-1],o[f]),this.$={id:o[f-1],label:o[f].label,typeStr:o[f].typeStr,directions:o[f].directions};break;case 31:L.getLogger().debug("Rule: dirList: ",o[f]),this.$=[o[f]];break;case 32:L.getLogger().debug("Rule: dirList: ",o[f-1],o[f]),this.$=[o[f-1]].concat(o[f]);break;case 33:L.getLogger().debug("Rule: nodeShapeNLabel: ",o[f-2],o[f-1],o[f]),this.$={typeStr:o[f-2]+o[f],label:o[f-1]};break;case 34:L.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",o[f-3],o[f-2]," #3:",o[f-1],o[f]),this.$={typeStr:o[f-3]+o[f],label:o[f-2],directions:o[f-1]};break;case 35:case 36:this.$={type:"classDef",id:o[f-1].trim(),css:o[f].trim()};break;case 37:this.$={type:"applyClass",id:o[f-1].trim(),styleClass:o[f].trim()};break;case 38:this.$={type:"applyStyles",id:o[f-1].trim(),stylesStr:o[f].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:t,11:3,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:s,29:i,31:c,39:r,43:n,46:l},{8:[1,20]},e(u,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:t,21:a,28:s,29:i,31:c,39:r,43:n,46:l}),e(h,[2,16],{14:22,15:d,16:b}),e(h,[2,17]),e(h,[2,18]),e(h,[2,19]),e(h,[2,20]),e(h,[2,21]),e(h,[2,22]),e(w,[2,25],{27:[1,25]}),e(h,[2,26]),{19:26,26:12,31:c},{10:t,11:27,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:s,29:i,31:c,39:r,43:n,46:l},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(y,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(u,[2,13]),{26:35,31:c},{31:[2,14]},{17:[1,36]},e(w,[2,24]),{10:t,11:37,13:4,14:22,15:d,16:b,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:s,29:i,31:c,39:r,43:n,46:l},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(y,[2,30]),{18:[1,43]},{18:[1,44]},e(w,[2,23]),{18:[1,45]},{30:[1,46]},e(h,[2,28]),e(h,[2,35]),e(h,[2,36]),e(h,[2,37]),e(h,[2,38]),{36:[1,47]},{33:48,34:v},{15:[1,50]},e(h,[2,27]),e(y,[2,33]),{38:[1,51]},{33:52,34:v,38:[2,31]},{31:[2,15]},e(y,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:g(function(m,p){if(p.recoverable)this.trace(m);else{var x=new Error(m);throw x.hash=p,x}},"parseError"),parse:g(function(m){var p=this,x=[0],L=[],E=[null],o=[],F=this.table,f="",C=0,Z=0,V=2,at=1,gt=o.slice.call(arguments,1),O=Object.create(this.lexer),j={yy:{}};for(var ut in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ut)&&(j.yy[ut]=this.yy[ut]);O.setInput(m,j.yy),j.yy.lexer=O,j.yy.parser=this,typeof O.yylloc>"u"&&(O.yylloc={});var dt=O.yylloc;o.push(dt);var ge=O.options&&O.options.ranges;typeof j.yy.parseError=="function"?this.parseError=j.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ue(W){x.length=x.length-2*W,E.length=E.length-W,o.length=o.length-W}g(ue,"popStack");function Nt(){var W;return W=L.pop()||O.lex()||at,typeof W!="number"&&(W instanceof Array&&(L=W,W=L.pop()),W=p.symbols_[W]||W),W}g(Nt,"lex");for(var P,q,H,pt,J={},st,G,It,it;;){if(q=x[x.length-1],this.defaultActions[q]?H=this.defaultActions[q]:((P===null||typeof P>"u")&&(P=Nt()),H=F[q]&&F[q][P]),typeof H>"u"||!H.length||!H[0]){var ft="";it=[];for(st in F[q])this.terminals_[st]&&st>V&&it.push("'"+this.terminals_[st]+"'");O.showPosition?ft="Parse error on line "+(C+1)+`: `+O.showPosition()+` Expecting `+it.join(", ")+", got '"+(this.terminals_[P]||P)+"'":ft="Parse error on line "+(C+1)+": Unexpected "+(P==at?"end of input":"'"+(this.terminals_[P]||P)+"'"),this.parseError(ft,{text:O.match,token:this.terminals_[P]||P,line:O.yylineno,loc:dt,expected:it})}if(H[0]instanceof Array&&H.length>1)throw new Error("Parse Error: multiple actions possible at state: "+q+", token: "+P);switch(H[0]){case 1:x.push(P),E.push(O.yytext),o.push(O.yylloc),x.push(H[1]),P=null,Z=O.yyleng,f=O.yytext,C=O.yylineno,dt=O.yylloc;break;case 2:if(G=this.productions_[H[1]][1],J.$=E[E.length-G],J._$={first_line:o[o.length-(G||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(G||1)].first_column,last_column:o[o.length-1].last_column},ge&&(J._$.range=[o[o.length-(G||1)].range[0],o[o.length-1].range[1]]),pt=this.performAction.apply(J,[f,Z,C,j.yy,H[1],E,o].concat(gt)),typeof pt<"u")return pt;G&&(x=x.slice(0,-1*G*2),E=E.slice(0,-1*G),o=o.slice(0,-1*G)),x.push(this.productions_[H[1]][0]),E.push(J.$),o.push(J._$),It=F[x[x.length-2]][x[x.length-1]],x.push(It);break;case 3:return!0}}return!0},"parse")},N=(function(){var T={EOF:1,parseError:g(function(p,x){if(this.yy.parser)this.yy.parser.parseError(p,x);else throw new Error(p)},"parseError"),setInput:g(function(m,p){return this.yy=p||this.yy||{},this._input=m,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:g(function(){var m=this._input[0];this.yytext+=m,this.yyleng++,this.offset++,this.match+=m,this.matched+=m;var p=m.match(/(?:\r\n?|\n).*/g);return p?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),m},"input"),unput:g(function(m){var p=m.length,x=m.split(/(?:\r\n?|\n)/g);this._input=m+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-p),this.offset-=p;var L=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),x.length-1&&(this.yylineno-=x.length-1);var E=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:x?(x.length===L.length?this.yylloc.first_column:0)+L[L.length-x.length].length-x[0].length:this.yylloc.first_column-p},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-p]),this.yyleng=this.yytext.length,this},"unput"),more:g(function(){return this._more=!0,this},"more"),reject:g(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). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:g(function(m){this.unput(this.match.slice(m))},"less"),pastInput:g(function(){var m=this.matched.substr(0,this.matched.length-this.match.length);return(m.length>20?"...":"")+m.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:g(function(){var m=this.match;return m.length<20&&(m+=this._input.substr(0,20-m.length)),(m.substr(0,20)+(m.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:g(function(){var m=this.pastInput(),p=new Array(m.length+1).join("-");return m+this.upcomingInput()+` diff --git a/apps/kimi-code/dist-web/assets/c4Diagram-LMCZKHZV-CTIN-u6u.js b/apps/kimi-code/dist-web/assets/c4Diagram-LMCZKHZV-BvJQmgsI.js similarity index 99% rename from apps/kimi-code/dist-web/assets/c4Diagram-LMCZKHZV-CTIN-u6u.js rename to apps/kimi-code/dist-web/assets/c4Diagram-LMCZKHZV-BvJQmgsI.js index df6bb4ce6b..1603c8fa7f 100644 --- a/apps/kimi-code/dist-web/assets/c4Diagram-LMCZKHZV-CTIN-u6u.js +++ b/apps/kimi-code/dist-web/assets/c4Diagram-LMCZKHZV-BvJQmgsI.js @@ -1,4 +1,4 @@ -import{g as Oe,d as Re}from"./chunk-32BRIVSS-D2R4swWR.js";import{s as Se,g as De,a as Pe,b as Be,_ as y,c as Dt,d as Nt,l as he,e as Ie,f as Me,h as Tt,i as pe,j as Le,w as Ne,k as Jt,m as ue}from"./mermaid.core-BMAf1qng.js";import"./index-B-HzRssS.js";import"./_commonjsHelpers-CqkleIqs.js";var jt=(function(){var e=y(function(_t,x,v,E){for(v=v||{},E=_t.length;E--;v[_t[E]]=x);return v},"o"),t=[1,24],s=[1,25],o=[1,26],l=[1,27],r=[1,28],a=[1,63],n=[1,64],i=[1,65],u=[1,66],d=[1,67],p=[1,68],g=[1,69],m=[1,29],O=[1,30],S=[1,31],P=[1,32],M=[1,33],U=[1,34],H=[1,35],q=[1,36],G=[1,37],K=[1,38],J=[1,39],Z=[1,40],$=[1,41],tt=[1,42],et=[1,43],at=[1,44],it=[1,45],nt=[1,46],st=[1,47],rt=[1,48],lt=[1,50],ot=[1,51],ct=[1,52],ht=[1,53],ut=[1,54],dt=[1,55],ft=[1,56],pt=[1,57],yt=[1,58],gt=[1,59],bt=[1,60],Ct=[14,42],Xt=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Ot=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],A=[1,82],k=[1,83],C=[1,84],w=[1,85],T=[12,14,42],se=[12,14,33,42],Bt=[12,14,33,42,76,77,79,80],vt=[12,33],Wt=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Qt={trace:y(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:y(function(x,v,E,b,R,h,Rt){var f=h.length-1;switch(R){case 3:b.setDirection("TB");break;case 4:b.setDirection("BT");break;case 5:b.setDirection("RL");break;case 6:b.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:b.setC4Type(h[f-3]);break;case 19:b.setTitle(h[f].substring(6)),this.$=h[f].substring(6);break;case 20:b.setAccDescription(h[f].substring(15)),this.$=h[f].substring(15);break;case 21:this.$=h[f].trim(),b.setTitle(this.$);break;case 22:case 23:this.$=h[f].trim(),b.setAccDescription(this.$);break;case 28:h[f].splice(2,0,"ENTERPRISE"),b.addPersonOrSystemBoundary(...h[f]),this.$=h[f];break;case 29:h[f].splice(2,0,"SYSTEM"),b.addPersonOrSystemBoundary(...h[f]),this.$=h[f];break;case 30:b.addPersonOrSystemBoundary(...h[f]),this.$=h[f];break;case 31:h[f].splice(2,0,"CONTAINER"),b.addContainerBoundary(...h[f]),this.$=h[f];break;case 32:b.addDeploymentNode("node",...h[f]),this.$=h[f];break;case 33:b.addDeploymentNode("nodeL",...h[f]),this.$=h[f];break;case 34:b.addDeploymentNode("nodeR",...h[f]),this.$=h[f];break;case 35:b.popBoundaryParseStack();break;case 39:b.addPersonOrSystem("person",...h[f]),this.$=h[f];break;case 40:b.addPersonOrSystem("external_person",...h[f]),this.$=h[f];break;case 41:b.addPersonOrSystem("system",...h[f]),this.$=h[f];break;case 42:b.addPersonOrSystem("system_db",...h[f]),this.$=h[f];break;case 43:b.addPersonOrSystem("system_queue",...h[f]),this.$=h[f];break;case 44:b.addPersonOrSystem("external_system",...h[f]),this.$=h[f];break;case 45:b.addPersonOrSystem("external_system_db",...h[f]),this.$=h[f];break;case 46:b.addPersonOrSystem("external_system_queue",...h[f]),this.$=h[f];break;case 47:b.addContainer("container",...h[f]),this.$=h[f];break;case 48:b.addContainer("container_db",...h[f]),this.$=h[f];break;case 49:b.addContainer("container_queue",...h[f]),this.$=h[f];break;case 50:b.addContainer("external_container",...h[f]),this.$=h[f];break;case 51:b.addContainer("external_container_db",...h[f]),this.$=h[f];break;case 52:b.addContainer("external_container_queue",...h[f]),this.$=h[f];break;case 53:b.addComponent("component",...h[f]),this.$=h[f];break;case 54:b.addComponent("component_db",...h[f]),this.$=h[f];break;case 55:b.addComponent("component_queue",...h[f]),this.$=h[f];break;case 56:b.addComponent("external_component",...h[f]),this.$=h[f];break;case 57:b.addComponent("external_component_db",...h[f]),this.$=h[f];break;case 58:b.addComponent("external_component_queue",...h[f]),this.$=h[f];break;case 60:b.addRel("rel",...h[f]),this.$=h[f];break;case 61:b.addRel("birel",...h[f]),this.$=h[f];break;case 62:b.addRel("rel_u",...h[f]),this.$=h[f];break;case 63:b.addRel("rel_d",...h[f]),this.$=h[f];break;case 64:b.addRel("rel_l",...h[f]),this.$=h[f];break;case 65:b.addRel("rel_r",...h[f]),this.$=h[f];break;case 66:b.addRel("rel_b",...h[f]),this.$=h[f];break;case 67:h[f].splice(0,1),b.addRel("rel",...h[f]),this.$=h[f];break;case 68:b.updateElStyle("update_el_style",...h[f]),this.$=h[f];break;case 69:b.updateRelStyle("update_rel_style",...h[f]),this.$=h[f];break;case 70:b.updateLayoutConfig("update_layout_config",...h[f]),this.$=h[f];break;case 71:this.$=[h[f]];break;case 72:h[f].unshift(h[f-1]),this.$=h[f];break;case 73:case 75:this.$=h[f].trim();break;case 74:let Et={};Et[h[f-1].trim()]=h[f].trim(),this.$=Et;break;case 76:this.$="";break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:r,29:49,30:61,32:62,34:a,36:n,37:i,38:u,39:d,40:p,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:70,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:r,29:49,30:61,32:62,34:a,36:n,37:i,38:u,39:d,40:p,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:71,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:r,29:49,30:61,32:62,34:a,36:n,37:i,38:u,39:d,40:p,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:72,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:r,29:49,30:61,32:62,34:a,36:n,37:i,38:u,39:d,40:p,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:73,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:r,29:49,30:61,32:62,34:a,36:n,37:i,38:u,39:d,40:p,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{14:[1,74]},e(Ct,[2,13],{43:23,29:49,30:61,32:62,20:75,34:a,36:n,37:i,38:u,39:d,40:p,41:g,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt}),e(Ct,[2,14]),e(Xt,[2,16],{12:[1,76]}),e(Ct,[2,36],{12:[1,77]}),e(Ot,[2,19]),e(Ot,[2,20]),{25:[1,78]},{27:[1,79]},e(Ot,[2,23]),{35:80,75:81,76:A,77:k,79:C,80:w},{35:86,75:81,76:A,77:k,79:C,80:w},{35:87,75:81,76:A,77:k,79:C,80:w},{35:88,75:81,76:A,77:k,79:C,80:w},{35:89,75:81,76:A,77:k,79:C,80:w},{35:90,75:81,76:A,77:k,79:C,80:w},{35:91,75:81,76:A,77:k,79:C,80:w},{35:92,75:81,76:A,77:k,79:C,80:w},{35:93,75:81,76:A,77:k,79:C,80:w},{35:94,75:81,76:A,77:k,79:C,80:w},{35:95,75:81,76:A,77:k,79:C,80:w},{35:96,75:81,76:A,77:k,79:C,80:w},{35:97,75:81,76:A,77:k,79:C,80:w},{35:98,75:81,76:A,77:k,79:C,80:w},{35:99,75:81,76:A,77:k,79:C,80:w},{35:100,75:81,76:A,77:k,79:C,80:w},{35:101,75:81,76:A,77:k,79:C,80:w},{35:102,75:81,76:A,77:k,79:C,80:w},{35:103,75:81,76:A,77:k,79:C,80:w},{35:104,75:81,76:A,77:k,79:C,80:w},e(T,[2,59]),{35:105,75:81,76:A,77:k,79:C,80:w},{35:106,75:81,76:A,77:k,79:C,80:w},{35:107,75:81,76:A,77:k,79:C,80:w},{35:108,75:81,76:A,77:k,79:C,80:w},{35:109,75:81,76:A,77:k,79:C,80:w},{35:110,75:81,76:A,77:k,79:C,80:w},{35:111,75:81,76:A,77:k,79:C,80:w},{35:112,75:81,76:A,77:k,79:C,80:w},{35:113,75:81,76:A,77:k,79:C,80:w},{35:114,75:81,76:A,77:k,79:C,80:w},{35:115,75:81,76:A,77:k,79:C,80:w},{20:116,29:49,30:61,32:62,34:a,36:n,37:i,38:u,39:d,40:p,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{12:[1,118],33:[1,117]},{35:119,75:81,76:A,77:k,79:C,80:w},{35:120,75:81,76:A,77:k,79:C,80:w},{35:121,75:81,76:A,77:k,79:C,80:w},{35:122,75:81,76:A,77:k,79:C,80:w},{35:123,75:81,76:A,77:k,79:C,80:w},{35:124,75:81,76:A,77:k,79:C,80:w},{35:125,75:81,76:A,77:k,79:C,80:w},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},e(Ct,[2,15]),e(Xt,[2,17],{21:22,19:130,22:t,23:s,24:o,26:l,28:r}),e(Ct,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:t,23:s,24:o,26:l,28:r,34:a,36:n,37:i,38:u,39:d,40:p,41:g,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt}),e(Ot,[2,21]),e(Ot,[2,22]),e(T,[2,39]),e(se,[2,71],{75:81,35:132,76:A,77:k,79:C,80:w}),e(Bt,[2,73]),{78:[1,133]},e(Bt,[2,75]),e(Bt,[2,76]),e(T,[2,40]),e(T,[2,41]),e(T,[2,42]),e(T,[2,43]),e(T,[2,44]),e(T,[2,45]),e(T,[2,46]),e(T,[2,47]),e(T,[2,48]),e(T,[2,49]),e(T,[2,50]),e(T,[2,51]),e(T,[2,52]),e(T,[2,53]),e(T,[2,54]),e(T,[2,55]),e(T,[2,56]),e(T,[2,57]),e(T,[2,58]),e(T,[2,60]),e(T,[2,61]),e(T,[2,62]),e(T,[2,63]),e(T,[2,64]),e(T,[2,65]),e(T,[2,66]),e(T,[2,67]),e(T,[2,68]),e(T,[2,69]),e(T,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},e(vt,[2,28]),e(vt,[2,29]),e(vt,[2,30]),e(vt,[2,31]),e(vt,[2,32]),e(vt,[2,33]),e(vt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},e(Xt,[2,18]),e(Ct,[2,38]),e(se,[2,72]),e(Bt,[2,74]),e(T,[2,24]),e(T,[2,35]),e(Wt,[2,25]),e(Wt,[2,26],{12:[1,138]}),e(Wt,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:y(function(x,v){if(v.recoverable)this.trace(x);else{var E=new Error(x);throw E.hash=v,E}},"parseError"),parse:y(function(x){var v=this,E=[0],b=[],R=[null],h=[],Rt=this.table,f="",Et=0,re=0,ke=2,le=1,Ce=h.slice.call(arguments,1),D=Object.create(this.lexer),At={yy:{}};for(var Ht in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ht)&&(At.yy[Ht]=this.yy[Ht]);D.setInput(x,At.yy),At.yy.lexer=D,At.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var qt=D.yylloc;h.push(qt);var we=D.options&&D.options.ranges;typeof At.yy.parseError=="function"?this.parseError=At.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Te(L){E.length=E.length-2*L,R.length=R.length-L,h.length=h.length-L}y(Te,"popStack");function oe(){var L;return L=b.pop()||D.lex()||le,typeof L!="number"&&(L instanceof Array&&(b=L,L=b.pop()),L=v.symbols_[L]||L),L}y(oe,"lex");for(var I,kt,N,Gt,wt={},Mt,W,ce,Lt;;){if(kt=E[E.length-1],this.defaultActions[kt]?N=this.defaultActions[kt]:((I===null||typeof I>"u")&&(I=oe()),N=Rt[kt]&&Rt[kt][I]),typeof N>"u"||!N.length||!N[0]){var Kt="";Lt=[];for(Mt in Rt[kt])this.terminals_[Mt]&&Mt>ke&&Lt.push("'"+this.terminals_[Mt]+"'");D.showPosition?Kt="Parse error on line "+(Et+1)+`: +import{g as Oe,d as Re}from"./chunk-32BRIVSS-DAsxL712.js";import{s as Se,g as De,a as Pe,b as Be,_ as y,c as Dt,d as Nt,l as he,e as Ie,f as Me,h as Tt,i as pe,j as Le,w as Ne,k as Jt,m as ue}from"./mermaid.core-Cahi9cr1.js";import"./index-HRJ6xRtC.js";import"./_commonjsHelpers-CqkleIqs.js";var jt=(function(){var e=y(function(_t,x,v,E){for(v=v||{},E=_t.length;E--;v[_t[E]]=x);return v},"o"),t=[1,24],s=[1,25],o=[1,26],l=[1,27],r=[1,28],a=[1,63],n=[1,64],i=[1,65],u=[1,66],d=[1,67],p=[1,68],g=[1,69],m=[1,29],O=[1,30],S=[1,31],P=[1,32],M=[1,33],U=[1,34],H=[1,35],q=[1,36],G=[1,37],K=[1,38],J=[1,39],Z=[1,40],$=[1,41],tt=[1,42],et=[1,43],at=[1,44],it=[1,45],nt=[1,46],st=[1,47],rt=[1,48],lt=[1,50],ot=[1,51],ct=[1,52],ht=[1,53],ut=[1,54],dt=[1,55],ft=[1,56],pt=[1,57],yt=[1,58],gt=[1,59],bt=[1,60],Ct=[14,42],Xt=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Ot=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],A=[1,82],k=[1,83],C=[1,84],w=[1,85],T=[12,14,42],se=[12,14,33,42],Bt=[12,14,33,42,76,77,79,80],vt=[12,33],Wt=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Qt={trace:y(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:y(function(x,v,E,b,R,h,Rt){var f=h.length-1;switch(R){case 3:b.setDirection("TB");break;case 4:b.setDirection("BT");break;case 5:b.setDirection("RL");break;case 6:b.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:b.setC4Type(h[f-3]);break;case 19:b.setTitle(h[f].substring(6)),this.$=h[f].substring(6);break;case 20:b.setAccDescription(h[f].substring(15)),this.$=h[f].substring(15);break;case 21:this.$=h[f].trim(),b.setTitle(this.$);break;case 22:case 23:this.$=h[f].trim(),b.setAccDescription(this.$);break;case 28:h[f].splice(2,0,"ENTERPRISE"),b.addPersonOrSystemBoundary(...h[f]),this.$=h[f];break;case 29:h[f].splice(2,0,"SYSTEM"),b.addPersonOrSystemBoundary(...h[f]),this.$=h[f];break;case 30:b.addPersonOrSystemBoundary(...h[f]),this.$=h[f];break;case 31:h[f].splice(2,0,"CONTAINER"),b.addContainerBoundary(...h[f]),this.$=h[f];break;case 32:b.addDeploymentNode("node",...h[f]),this.$=h[f];break;case 33:b.addDeploymentNode("nodeL",...h[f]),this.$=h[f];break;case 34:b.addDeploymentNode("nodeR",...h[f]),this.$=h[f];break;case 35:b.popBoundaryParseStack();break;case 39:b.addPersonOrSystem("person",...h[f]),this.$=h[f];break;case 40:b.addPersonOrSystem("external_person",...h[f]),this.$=h[f];break;case 41:b.addPersonOrSystem("system",...h[f]),this.$=h[f];break;case 42:b.addPersonOrSystem("system_db",...h[f]),this.$=h[f];break;case 43:b.addPersonOrSystem("system_queue",...h[f]),this.$=h[f];break;case 44:b.addPersonOrSystem("external_system",...h[f]),this.$=h[f];break;case 45:b.addPersonOrSystem("external_system_db",...h[f]),this.$=h[f];break;case 46:b.addPersonOrSystem("external_system_queue",...h[f]),this.$=h[f];break;case 47:b.addContainer("container",...h[f]),this.$=h[f];break;case 48:b.addContainer("container_db",...h[f]),this.$=h[f];break;case 49:b.addContainer("container_queue",...h[f]),this.$=h[f];break;case 50:b.addContainer("external_container",...h[f]),this.$=h[f];break;case 51:b.addContainer("external_container_db",...h[f]),this.$=h[f];break;case 52:b.addContainer("external_container_queue",...h[f]),this.$=h[f];break;case 53:b.addComponent("component",...h[f]),this.$=h[f];break;case 54:b.addComponent("component_db",...h[f]),this.$=h[f];break;case 55:b.addComponent("component_queue",...h[f]),this.$=h[f];break;case 56:b.addComponent("external_component",...h[f]),this.$=h[f];break;case 57:b.addComponent("external_component_db",...h[f]),this.$=h[f];break;case 58:b.addComponent("external_component_queue",...h[f]),this.$=h[f];break;case 60:b.addRel("rel",...h[f]),this.$=h[f];break;case 61:b.addRel("birel",...h[f]),this.$=h[f];break;case 62:b.addRel("rel_u",...h[f]),this.$=h[f];break;case 63:b.addRel("rel_d",...h[f]),this.$=h[f];break;case 64:b.addRel("rel_l",...h[f]),this.$=h[f];break;case 65:b.addRel("rel_r",...h[f]),this.$=h[f];break;case 66:b.addRel("rel_b",...h[f]),this.$=h[f];break;case 67:h[f].splice(0,1),b.addRel("rel",...h[f]),this.$=h[f];break;case 68:b.updateElStyle("update_el_style",...h[f]),this.$=h[f];break;case 69:b.updateRelStyle("update_rel_style",...h[f]),this.$=h[f];break;case 70:b.updateLayoutConfig("update_layout_config",...h[f]),this.$=h[f];break;case 71:this.$=[h[f]];break;case 72:h[f].unshift(h[f-1]),this.$=h[f];break;case 73:case 75:this.$=h[f].trim();break;case 74:let Et={};Et[h[f-1].trim()]=h[f].trim(),this.$=Et;break;case 76:this.$="";break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:r,29:49,30:61,32:62,34:a,36:n,37:i,38:u,39:d,40:p,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:70,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:r,29:49,30:61,32:62,34:a,36:n,37:i,38:u,39:d,40:p,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:71,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:r,29:49,30:61,32:62,34:a,36:n,37:i,38:u,39:d,40:p,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:72,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:r,29:49,30:61,32:62,34:a,36:n,37:i,38:u,39:d,40:p,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:73,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:r,29:49,30:61,32:62,34:a,36:n,37:i,38:u,39:d,40:p,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{14:[1,74]},e(Ct,[2,13],{43:23,29:49,30:61,32:62,20:75,34:a,36:n,37:i,38:u,39:d,40:p,41:g,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt}),e(Ct,[2,14]),e(Xt,[2,16],{12:[1,76]}),e(Ct,[2,36],{12:[1,77]}),e(Ot,[2,19]),e(Ot,[2,20]),{25:[1,78]},{27:[1,79]},e(Ot,[2,23]),{35:80,75:81,76:A,77:k,79:C,80:w},{35:86,75:81,76:A,77:k,79:C,80:w},{35:87,75:81,76:A,77:k,79:C,80:w},{35:88,75:81,76:A,77:k,79:C,80:w},{35:89,75:81,76:A,77:k,79:C,80:w},{35:90,75:81,76:A,77:k,79:C,80:w},{35:91,75:81,76:A,77:k,79:C,80:w},{35:92,75:81,76:A,77:k,79:C,80:w},{35:93,75:81,76:A,77:k,79:C,80:w},{35:94,75:81,76:A,77:k,79:C,80:w},{35:95,75:81,76:A,77:k,79:C,80:w},{35:96,75:81,76:A,77:k,79:C,80:w},{35:97,75:81,76:A,77:k,79:C,80:w},{35:98,75:81,76:A,77:k,79:C,80:w},{35:99,75:81,76:A,77:k,79:C,80:w},{35:100,75:81,76:A,77:k,79:C,80:w},{35:101,75:81,76:A,77:k,79:C,80:w},{35:102,75:81,76:A,77:k,79:C,80:w},{35:103,75:81,76:A,77:k,79:C,80:w},{35:104,75:81,76:A,77:k,79:C,80:w},e(T,[2,59]),{35:105,75:81,76:A,77:k,79:C,80:w},{35:106,75:81,76:A,77:k,79:C,80:w},{35:107,75:81,76:A,77:k,79:C,80:w},{35:108,75:81,76:A,77:k,79:C,80:w},{35:109,75:81,76:A,77:k,79:C,80:w},{35:110,75:81,76:A,77:k,79:C,80:w},{35:111,75:81,76:A,77:k,79:C,80:w},{35:112,75:81,76:A,77:k,79:C,80:w},{35:113,75:81,76:A,77:k,79:C,80:w},{35:114,75:81,76:A,77:k,79:C,80:w},{35:115,75:81,76:A,77:k,79:C,80:w},{20:116,29:49,30:61,32:62,34:a,36:n,37:i,38:u,39:d,40:p,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{12:[1,118],33:[1,117]},{35:119,75:81,76:A,77:k,79:C,80:w},{35:120,75:81,76:A,77:k,79:C,80:w},{35:121,75:81,76:A,77:k,79:C,80:w},{35:122,75:81,76:A,77:k,79:C,80:w},{35:123,75:81,76:A,77:k,79:C,80:w},{35:124,75:81,76:A,77:k,79:C,80:w},{35:125,75:81,76:A,77:k,79:C,80:w},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},e(Ct,[2,15]),e(Xt,[2,17],{21:22,19:130,22:t,23:s,24:o,26:l,28:r}),e(Ct,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:t,23:s,24:o,26:l,28:r,34:a,36:n,37:i,38:u,39:d,40:p,41:g,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt}),e(Ot,[2,21]),e(Ot,[2,22]),e(T,[2,39]),e(se,[2,71],{75:81,35:132,76:A,77:k,79:C,80:w}),e(Bt,[2,73]),{78:[1,133]},e(Bt,[2,75]),e(Bt,[2,76]),e(T,[2,40]),e(T,[2,41]),e(T,[2,42]),e(T,[2,43]),e(T,[2,44]),e(T,[2,45]),e(T,[2,46]),e(T,[2,47]),e(T,[2,48]),e(T,[2,49]),e(T,[2,50]),e(T,[2,51]),e(T,[2,52]),e(T,[2,53]),e(T,[2,54]),e(T,[2,55]),e(T,[2,56]),e(T,[2,57]),e(T,[2,58]),e(T,[2,60]),e(T,[2,61]),e(T,[2,62]),e(T,[2,63]),e(T,[2,64]),e(T,[2,65]),e(T,[2,66]),e(T,[2,67]),e(T,[2,68]),e(T,[2,69]),e(T,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},e(vt,[2,28]),e(vt,[2,29]),e(vt,[2,30]),e(vt,[2,31]),e(vt,[2,32]),e(vt,[2,33]),e(vt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},e(Xt,[2,18]),e(Ct,[2,38]),e(se,[2,72]),e(Bt,[2,74]),e(T,[2,24]),e(T,[2,35]),e(Wt,[2,25]),e(Wt,[2,26],{12:[1,138]}),e(Wt,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:y(function(x,v){if(v.recoverable)this.trace(x);else{var E=new Error(x);throw E.hash=v,E}},"parseError"),parse:y(function(x){var v=this,E=[0],b=[],R=[null],h=[],Rt=this.table,f="",Et=0,re=0,ke=2,le=1,Ce=h.slice.call(arguments,1),D=Object.create(this.lexer),At={yy:{}};for(var Ht in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ht)&&(At.yy[Ht]=this.yy[Ht]);D.setInput(x,At.yy),At.yy.lexer=D,At.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var qt=D.yylloc;h.push(qt);var we=D.options&&D.options.ranges;typeof At.yy.parseError=="function"?this.parseError=At.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Te(L){E.length=E.length-2*L,R.length=R.length-L,h.length=h.length-L}y(Te,"popStack");function oe(){var L;return L=b.pop()||D.lex()||le,typeof L!="number"&&(L instanceof Array&&(b=L,L=b.pop()),L=v.symbols_[L]||L),L}y(oe,"lex");for(var I,kt,N,Gt,wt={},Mt,W,ce,Lt;;){if(kt=E[E.length-1],this.defaultActions[kt]?N=this.defaultActions[kt]:((I===null||typeof I>"u")&&(I=oe()),N=Rt[kt]&&Rt[kt][I]),typeof N>"u"||!N.length||!N[0]){var Kt="";Lt=[];for(Mt in Rt[kt])this.terminals_[Mt]&&Mt>ke&&Lt.push("'"+this.terminals_[Mt]+"'");D.showPosition?Kt="Parse error on line "+(Et+1)+`: `+D.showPosition()+` Expecting `+Lt.join(", ")+", got '"+(this.terminals_[I]||I)+"'":Kt="Parse error on line "+(Et+1)+": Unexpected "+(I==le?"end of input":"'"+(this.terminals_[I]||I)+"'"),this.parseError(Kt,{text:D.match,token:this.terminals_[I]||I,line:D.yylineno,loc:qt,expected:Lt})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+kt+", token: "+I);switch(N[0]){case 1:E.push(I),R.push(D.yytext),h.push(D.yylloc),E.push(N[1]),I=null,re=D.yyleng,f=D.yytext,Et=D.yylineno,qt=D.yylloc;break;case 2:if(W=this.productions_[N[1]][1],wt.$=R[R.length-W],wt._$={first_line:h[h.length-(W||1)].first_line,last_line:h[h.length-1].last_line,first_column:h[h.length-(W||1)].first_column,last_column:h[h.length-1].last_column},we&&(wt._$.range=[h[h.length-(W||1)].range[0],h[h.length-1].range[1]]),Gt=this.performAction.apply(wt,[f,re,Et,At.yy,N[1],R,h].concat(Ce)),typeof Gt<"u")return Gt;W&&(E=E.slice(0,-1*W*2),R=R.slice(0,-1*W),h=h.slice(0,-1*W)),E.push(this.productions_[N[1]][0]),R.push(wt.$),h.push(wt._$),ce=Rt[E[E.length-2]][E[E.length-1]],E.push(ce);break;case 3:return!0}}return!0},"parse")},Ae=(function(){var _t={EOF:1,parseError:y(function(v,E){if(this.yy.parser)this.yy.parser.parseError(v,E);else throw new Error(v)},"parseError"),setInput:y(function(x,v){return this.yy=v||this.yy||{},this._input=x,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:y(function(){var x=this._input[0];this.yytext+=x,this.yyleng++,this.offset++,this.match+=x,this.matched+=x;var v=x.match(/(?:\r\n?|\n).*/g);return v?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),x},"input"),unput:y(function(x){var v=x.length,E=x.split(/(?:\r\n?|\n)/g);this._input=x+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-v),this.offset-=v;var b=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),E.length-1&&(this.yylineno-=E.length-1);var R=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:E?(E.length===b.length?this.yylloc.first_column:0)+b[b.length-E.length].length-E[0].length:this.yylloc.first_column-v},this.options.ranges&&(this.yylloc.range=[R[0],R[0]+this.yyleng-v]),this.yyleng=this.yytext.length,this},"unput"),more:y(function(){return this._more=!0,this},"more"),reject:y(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). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:y(function(x){this.unput(this.match.slice(x))},"less"),pastInput:y(function(){var x=this.matched.substr(0,this.matched.length-this.match.length);return(x.length>20?"...":"")+x.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:y(function(){var x=this.match;return x.length<20&&(x+=this._input.substr(0,20-x.length)),(x.substr(0,20)+(x.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:y(function(){var x=this.pastInput(),v=new Array(x.length+1).join("-");return x+this.upcomingInput()+` diff --git a/apps/kimi-code/dist-web/assets/channel-Bob_1R_C.js b/apps/kimi-code/dist-web/assets/channel-Bob_1R_C.js new file mode 100644 index 0000000000..58164daddc --- /dev/null +++ b/apps/kimi-code/dist-web/assets/channel-Bob_1R_C.js @@ -0,0 +1 @@ +import{U as a,C as n}from"./mermaid.core-Cahi9cr1.js";const t=(r,o)=>a.lang.round(n.parse(r)[o]);export{t as c}; diff --git a/apps/kimi-code/dist-web/assets/channel-DV0CaBk6.js b/apps/kimi-code/dist-web/assets/channel-DV0CaBk6.js deleted file mode 100644 index e0a61a7fb6..0000000000 --- a/apps/kimi-code/dist-web/assets/channel-DV0CaBk6.js +++ /dev/null @@ -1 +0,0 @@ -import{U as a,C as n}from"./mermaid.core-BMAf1qng.js";const t=(r,o)=>a.lang.round(n.parse(r)[o]);export{t as c}; diff --git a/apps/kimi-code/dist-web/assets/chunk-2Q5K7J3B-BJB08iqf.js b/apps/kimi-code/dist-web/assets/chunk-2Q5K7J3B-B47YykJY.js similarity index 67% rename from apps/kimi-code/dist-web/assets/chunk-2Q5K7J3B-BJB08iqf.js rename to apps/kimi-code/dist-web/assets/chunk-2Q5K7J3B-B47YykJY.js index 540995855e..6bf4b6afd7 100644 --- a/apps/kimi-code/dist-web/assets/chunk-2Q5K7J3B-BJB08iqf.js +++ b/apps/kimi-code/dist-web/assets/chunk-2Q5K7J3B-B47YykJY.js @@ -1 +1 @@ -import{_ as i}from"./mermaid.core-BMAf1qng.js";var r=class{constructor(t){this.init=t,this.records=this.init()}static{i(this,"ImperativeState")}reset(){this.records=this.init()}};export{r as I}; +import{_ as i}from"./mermaid.core-Cahi9cr1.js";var r=class{constructor(t){this.init=t,this.records=this.init()}static{i(this,"ImperativeState")}reset(){this.records=this.init()}};export{r as I}; diff --git a/apps/kimi-code/dist-web/assets/chunk-32BRIVSS-D2R4swWR.js b/apps/kimi-code/dist-web/assets/chunk-32BRIVSS-DAsxL712.js similarity index 96% rename from apps/kimi-code/dist-web/assets/chunk-32BRIVSS-D2R4swWR.js rename to apps/kimi-code/dist-web/assets/chunk-32BRIVSS-DAsxL712.js index ebc62cddf2..6d983def1a 100644 --- a/apps/kimi-code/dist-web/assets/chunk-32BRIVSS-D2R4swWR.js +++ b/apps/kimi-code/dist-web/assets/chunk-32BRIVSS-DAsxL712.js @@ -1 +1 @@ -import{_ as i,d as l,n as d,j as o}from"./mermaid.core-BMAf1qng.js";var x=i((r,t)=>{const e=r.append("rect");if(e.attr("x",t.x),e.attr("y",t.y),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("width",t.width),e.attr("height",t.height),t.name&&e.attr("name",t.name),t.rx&&e.attr("rx",t.rx),t.ry&&e.attr("ry",t.ry),t.attrs!==void 0)for(const s in t.attrs)e.attr(s,t.attrs[s]);return t.class&&e.attr("class",t.class),e},"drawRect"),p=i((r,t)=>{const e={x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,stroke:t.stroke,class:"rect"};x(r,e).lower()},"drawBackgroundRect"),y=i((r,t)=>{const e=t.text.replace(d," "),s=r.append("text");s.attr("x",t.x),s.attr("y",t.y),s.attr("class","legend"),s.style("text-anchor",t.anchor),t.class&&s.attr("class",t.class);const a=s.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.text(e),s},"drawText"),m=i((r,t,e,s)=>{const a=r.append("image");a.attr("x",t),a.attr("y",e);const n=o.sanitizeUrl(s);a.attr("xlink:href",n)},"drawImage"),g=i((r,t,e,s)=>{const a=r.append("use");a.attr("x",t),a.attr("y",e);const n=o.sanitizeUrl(s);a.attr("xlink:href",`#${n}`)},"drawEmbeddedImage"),h=i(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),f=i(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),w=i(()=>{let r=l(".mermaidTooltip");return r.empty()&&(r=l("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),r},"createTooltip");export{p as a,f as b,g as c,x as d,m as e,w as f,h as g,y as h}; +import{_ as i,d as l,n as d,j as o}from"./mermaid.core-Cahi9cr1.js";var x=i((r,t)=>{const e=r.append("rect");if(e.attr("x",t.x),e.attr("y",t.y),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("width",t.width),e.attr("height",t.height),t.name&&e.attr("name",t.name),t.rx&&e.attr("rx",t.rx),t.ry&&e.attr("ry",t.ry),t.attrs!==void 0)for(const s in t.attrs)e.attr(s,t.attrs[s]);return t.class&&e.attr("class",t.class),e},"drawRect"),p=i((r,t)=>{const e={x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,stroke:t.stroke,class:"rect"};x(r,e).lower()},"drawBackgroundRect"),y=i((r,t)=>{const e=t.text.replace(d," "),s=r.append("text");s.attr("x",t.x),s.attr("y",t.y),s.attr("class","legend"),s.style("text-anchor",t.anchor),t.class&&s.attr("class",t.class);const a=s.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.text(e),s},"drawText"),m=i((r,t,e,s)=>{const a=r.append("image");a.attr("x",t),a.attr("y",e);const n=o.sanitizeUrl(s);a.attr("xlink:href",n)},"drawImage"),g=i((r,t,e,s)=>{const a=r.append("use");a.attr("x",t),a.attr("y",e);const n=o.sanitizeUrl(s);a.attr("xlink:href",`#${n}`)},"drawEmbeddedImage"),h=i(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),f=i(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),w=i(()=>{let r=l(".mermaidTooltip");return r.empty()&&(r=l("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),r},"createTooltip");export{p as a,f as b,g as c,x as d,m as e,w as f,h as g,y as h}; diff --git a/apps/kimi-code/dist-web/assets/chunk-5VM5RSS4-DNp0lB9r.js b/apps/kimi-code/dist-web/assets/chunk-5VM5RSS4-CfD0Yt-O.js similarity index 83% rename from apps/kimi-code/dist-web/assets/chunk-5VM5RSS4-DNp0lB9r.js rename to apps/kimi-code/dist-web/assets/chunk-5VM5RSS4-CfD0Yt-O.js index 59ff875bb5..6cf4f3ebbc 100644 --- a/apps/kimi-code/dist-web/assets/chunk-5VM5RSS4-DNp0lB9r.js +++ b/apps/kimi-code/dist-web/assets/chunk-5VM5RSS4-CfD0Yt-O.js @@ -1,4 +1,4 @@ -import{_ as e}from"./mermaid.core-BMAf1qng.js";var l=e(()=>` +import{_ as e}from"./mermaid.core-Cahi9cr1.js";var l=e(()=>` /* Font Awesome icon styling - consolidated */ .label-icon { display: inline-block; diff --git a/apps/kimi-code/dist-web/assets/chunk-EX3LRPZG-DTDAbra3.js b/apps/kimi-code/dist-web/assets/chunk-EX3LRPZG-DGM3fHaz.js similarity index 99% rename from apps/kimi-code/dist-web/assets/chunk-EX3LRPZG-DTDAbra3.js rename to apps/kimi-code/dist-web/assets/chunk-EX3LRPZG-DGM3fHaz.js index b097d3ce8d..011f432c9d 100644 --- a/apps/kimi-code/dist-web/assets/chunk-EX3LRPZG-DTDAbra3.js +++ b/apps/kimi-code/dist-web/assets/chunk-EX3LRPZG-DGM3fHaz.js @@ -1,4 +1,4 @@ -import{g as te}from"./chunk-XXDRQBXY-CcyRETTg.js";import{s as ee}from"./chunk-VR4S4FIN-Cveor6Gg.js";import{_ as f,l as _,c as $,x as se,y as ie,a as re,b as ae,g as ne,s as oe,o as le,p as ce,a9 as he,k as j,q as ue,d as bt,a5 as de}from"./mermaid.core-BMAf1qng.js";import{f as fe}from"./chunk-32BRIVSS-D2R4swWR.js";var vt=(function(){var t=f(function(V,a,d,r){for(d=d||{},r=V.length;r--;d[V[r]]=a);return d},"o"),e=[1,2],o=[1,3],s=[1,4],c=[2,4],h=[1,9],p=[1,11],y=[1,16],n=[1,17],T=[1,18],m=[1,19],O=[1,33],x=[1,20],k=[1,21],u=[1,22],L=[1,23],I=[1,24],v=[1,26],F=[1,27],C=[1,28],P=[1,29],w=[1,30],H=[1,31],it=[1,32],rt=[1,35],at=[1,36],nt=[1,37],ot=[1,38],z=[1,34],S=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],lt=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],xt=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],yt={trace:f(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"CLICK",39:"STRING",40:"HREF",41:"classDef",42:"CLASSDEF_ID",43:"CLASSDEF_STYLEOPTS",44:"DEFAULT",45:"style",46:"STYLE_IDS",47:"STYLEDEF_STYLEOPTS",48:"class",49:"CLASSENTITY_IDS",50:"STYLECLASS",51:"direction_tb",52:"direction_bt",53:"direction_rl",54:"direction_lr",56:";",57:"EDGE_STATE",58:"STYLE_SEPARATOR",59:"left_of",60:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:f(function(a,d,r,g,E,i,B){var l=i.length-1;switch(E){case 3:return g.setRootDoc(i[l]),i[l];case 4:this.$=[];break;case 5:i[l]!="nl"&&(i[l-1].push(i[l]),this.$=i[l-1]);break;case 6:case 7:this.$=i[l];break;case 8:this.$="nl";break;case 12:this.$=i[l];break;case 13:const Q=i[l-1];Q.description=g.trimColon(i[l]),this.$=Q;break;case 14:this.$={stmt:"relation",state1:i[l-2],state2:i[l]};break;case 15:const gt=g.trimColon(i[l]);this.$={stmt:"relation",state1:i[l-3],state2:i[l-1],description:gt};break;case 19:this.$={stmt:"state",id:i[l-3],type:"default",description:"",doc:i[l-1]};break;case 20:var Y=i[l],K=i[l-2].trim();if(i[l].match(":")){var ht=i[l].split(":");Y=ht[0],K=[K,ht[1]]}this.$={stmt:"state",id:Y,type:"default",description:K};break;case 21:this.$={stmt:"state",id:i[l-3],type:"default",description:i[l-5],doc:i[l-1]};break;case 22:this.$={stmt:"state",id:i[l],type:"fork"};break;case 23:this.$={stmt:"state",id:i[l],type:"join"};break;case 24:this.$={stmt:"state",id:i[l],type:"choice"};break;case 25:this.$={stmt:"state",id:g.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:i[l-1].trim(),note:{position:i[l-2].trim(),text:i[l].trim()}};break;case 29:this.$=i[l].trim(),g.setAccTitle(this.$);break;case 30:case 31:this.$=i[l].trim(),g.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:i[l-3],url:i[l-2],tooltip:i[l-1]};break;case 33:this.$={stmt:"click",id:i[l-3],url:i[l-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:i[l-1].trim(),classes:i[l].trim()};break;case 36:this.$={stmt:"style",id:i[l-1].trim(),styleClass:i[l].trim()};break;case 37:this.$={stmt:"applyClass",id:i[l-1].trim(),styleClass:i[l].trim()};break;case 38:g.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:g.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:g.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:g.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:i[l].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:i[l-2].trim(),classes:[i[l].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:i[l-2].trim(),classes:[i[l].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:e,5:o,6:s},{1:[3]},{3:5,4:e,5:o,6:s},{3:6,4:e,5:o,6:s},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],c,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:h,5:p,8:8,9:10,10:12,11:13,12:14,13:15,16:y,17:n,19:T,22:m,24:O,25:x,26:k,27:u,28:L,29:I,32:25,33:v,35:F,37:C,38:P,41:w,45:H,48:it,51:rt,52:at,53:nt,54:ot,57:z},t(S,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:y,17:n,19:T,22:m,24:O,25:x,26:k,27:u,28:L,29:I,32:25,33:v,35:F,37:C,38:P,41:w,45:H,48:it,51:rt,52:at,53:nt,54:ot,57:z},t(S,[2,7]),t(S,[2,8]),t(S,[2,9]),t(S,[2,10]),t(S,[2,11]),t(S,[2,12],{14:[1,40],15:[1,41]}),t(S,[2,16]),{18:[1,42]},t(S,[2,18],{20:[1,43]}),{23:[1,44]},t(S,[2,22]),t(S,[2,23]),t(S,[2,24]),t(S,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(S,[2,28]),{34:[1,49]},{36:[1,50]},t(S,[2,31]),{13:51,24:O,57:z},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(lt,[2,44],{58:[1,56]}),t(lt,[2,45],{58:[1,57]}),t(S,[2,38]),t(S,[2,39]),t(S,[2,40]),t(S,[2,41]),t(S,[2,6]),t(S,[2,13]),{13:58,24:O,57:z},t(S,[2,17]),t(xt,c,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(S,[2,29]),t(S,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},t(S,[2,14],{14:[1,71]}),{4:h,5:p,8:8,9:10,10:12,11:13,12:14,13:15,16:y,17:n,19:T,21:[1,72],22:m,24:O,25:x,26:k,27:u,28:L,29:I,32:25,33:v,35:F,37:C,38:P,41:w,45:H,48:it,51:rt,52:at,53:nt,54:ot,57:z},t(S,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(S,[2,34]),t(S,[2,35]),t(S,[2,36]),t(S,[2,37]),t(lt,[2,46]),t(lt,[2,47]),t(S,[2,15]),t(S,[2,19]),t(xt,c,{7:78}),t(S,[2,26]),t(S,[2,27]),{5:[1,79]},{5:[1,80]},{4:h,5:p,8:8,9:10,10:12,11:13,12:14,13:15,16:y,17:n,19:T,21:[1,81],22:m,24:O,25:x,26:k,27:u,28:L,29:I,32:25,33:v,35:F,37:C,38:P,41:w,45:H,48:it,51:rt,52:at,53:nt,54:ot,57:z},t(S,[2,32]),t(S,[2,33]),t(S,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:f(function(a,d){if(d.recoverable)this.trace(a);else{var r=new Error(a);throw r.hash=d,r}},"parseError"),parse:f(function(a){var d=this,r=[0],g=[],E=[null],i=[],B=this.table,l="",Y=0,K=0,ht=2,Q=1,gt=i.slice.call(arguments,1),b=Object.create(this.lexer),U={yy:{}};for(var Tt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Tt)&&(U.yy[Tt]=this.yy[Tt]);b.setInput(a,U.yy),U.yy.lexer=b,U.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var Et=b.yylloc;i.push(Et);var Qt=b.options&&b.options.ranges;typeof U.yy.parseError=="function"?this.parseError=U.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Zt(N){r.length=r.length-2*N,E.length=E.length-N,i.length=i.length-N}f(Zt,"popStack");function Lt(){var N;return N=g.pop()||b.lex()||Q,typeof N!="number"&&(N instanceof Array&&(g=N,N=g.pop()),N=d.symbols_[N]||N),N}f(Lt,"lex");for(var A,W,R,_t,X={},ut,G,It,dt;;){if(W=r[r.length-1],this.defaultActions[W]?R=this.defaultActions[W]:((A===null||typeof A>"u")&&(A=Lt()),R=B[W]&&B[W][A]),typeof R>"u"||!R.length||!R[0]){var mt="";dt=[];for(ut in B[W])this.terminals_[ut]&&ut>ht&&dt.push("'"+this.terminals_[ut]+"'");b.showPosition?mt="Parse error on line "+(Y+1)+`: +import{g as te}from"./chunk-XXDRQBXY-BmzWd-kT.js";import{s as ee}from"./chunk-VR4S4FIN-he8WxbY-.js";import{_ as f,l as _,c as $,x as se,y as ie,a as re,b as ae,g as ne,s as oe,o as le,p as ce,a9 as he,k as j,q as ue,d as bt,a5 as de}from"./mermaid.core-Cahi9cr1.js";import{f as fe}from"./chunk-32BRIVSS-DAsxL712.js";var vt=(function(){var t=f(function(V,a,d,r){for(d=d||{},r=V.length;r--;d[V[r]]=a);return d},"o"),e=[1,2],o=[1,3],s=[1,4],c=[2,4],h=[1,9],p=[1,11],y=[1,16],n=[1,17],T=[1,18],m=[1,19],O=[1,33],x=[1,20],k=[1,21],u=[1,22],L=[1,23],I=[1,24],v=[1,26],F=[1,27],C=[1,28],P=[1,29],w=[1,30],H=[1,31],it=[1,32],rt=[1,35],at=[1,36],nt=[1,37],ot=[1,38],z=[1,34],S=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],lt=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],xt=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],yt={trace:f(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"CLICK",39:"STRING",40:"HREF",41:"classDef",42:"CLASSDEF_ID",43:"CLASSDEF_STYLEOPTS",44:"DEFAULT",45:"style",46:"STYLE_IDS",47:"STYLEDEF_STYLEOPTS",48:"class",49:"CLASSENTITY_IDS",50:"STYLECLASS",51:"direction_tb",52:"direction_bt",53:"direction_rl",54:"direction_lr",56:";",57:"EDGE_STATE",58:"STYLE_SEPARATOR",59:"left_of",60:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:f(function(a,d,r,g,E,i,B){var l=i.length-1;switch(E){case 3:return g.setRootDoc(i[l]),i[l];case 4:this.$=[];break;case 5:i[l]!="nl"&&(i[l-1].push(i[l]),this.$=i[l-1]);break;case 6:case 7:this.$=i[l];break;case 8:this.$="nl";break;case 12:this.$=i[l];break;case 13:const Q=i[l-1];Q.description=g.trimColon(i[l]),this.$=Q;break;case 14:this.$={stmt:"relation",state1:i[l-2],state2:i[l]};break;case 15:const gt=g.trimColon(i[l]);this.$={stmt:"relation",state1:i[l-3],state2:i[l-1],description:gt};break;case 19:this.$={stmt:"state",id:i[l-3],type:"default",description:"",doc:i[l-1]};break;case 20:var Y=i[l],K=i[l-2].trim();if(i[l].match(":")){var ht=i[l].split(":");Y=ht[0],K=[K,ht[1]]}this.$={stmt:"state",id:Y,type:"default",description:K};break;case 21:this.$={stmt:"state",id:i[l-3],type:"default",description:i[l-5],doc:i[l-1]};break;case 22:this.$={stmt:"state",id:i[l],type:"fork"};break;case 23:this.$={stmt:"state",id:i[l],type:"join"};break;case 24:this.$={stmt:"state",id:i[l],type:"choice"};break;case 25:this.$={stmt:"state",id:g.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:i[l-1].trim(),note:{position:i[l-2].trim(),text:i[l].trim()}};break;case 29:this.$=i[l].trim(),g.setAccTitle(this.$);break;case 30:case 31:this.$=i[l].trim(),g.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:i[l-3],url:i[l-2],tooltip:i[l-1]};break;case 33:this.$={stmt:"click",id:i[l-3],url:i[l-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:i[l-1].trim(),classes:i[l].trim()};break;case 36:this.$={stmt:"style",id:i[l-1].trim(),styleClass:i[l].trim()};break;case 37:this.$={stmt:"applyClass",id:i[l-1].trim(),styleClass:i[l].trim()};break;case 38:g.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:g.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:g.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:g.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:i[l].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:i[l-2].trim(),classes:[i[l].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:i[l-2].trim(),classes:[i[l].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:e,5:o,6:s},{1:[3]},{3:5,4:e,5:o,6:s},{3:6,4:e,5:o,6:s},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],c,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:h,5:p,8:8,9:10,10:12,11:13,12:14,13:15,16:y,17:n,19:T,22:m,24:O,25:x,26:k,27:u,28:L,29:I,32:25,33:v,35:F,37:C,38:P,41:w,45:H,48:it,51:rt,52:at,53:nt,54:ot,57:z},t(S,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:y,17:n,19:T,22:m,24:O,25:x,26:k,27:u,28:L,29:I,32:25,33:v,35:F,37:C,38:P,41:w,45:H,48:it,51:rt,52:at,53:nt,54:ot,57:z},t(S,[2,7]),t(S,[2,8]),t(S,[2,9]),t(S,[2,10]),t(S,[2,11]),t(S,[2,12],{14:[1,40],15:[1,41]}),t(S,[2,16]),{18:[1,42]},t(S,[2,18],{20:[1,43]}),{23:[1,44]},t(S,[2,22]),t(S,[2,23]),t(S,[2,24]),t(S,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(S,[2,28]),{34:[1,49]},{36:[1,50]},t(S,[2,31]),{13:51,24:O,57:z},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(lt,[2,44],{58:[1,56]}),t(lt,[2,45],{58:[1,57]}),t(S,[2,38]),t(S,[2,39]),t(S,[2,40]),t(S,[2,41]),t(S,[2,6]),t(S,[2,13]),{13:58,24:O,57:z},t(S,[2,17]),t(xt,c,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(S,[2,29]),t(S,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},t(S,[2,14],{14:[1,71]}),{4:h,5:p,8:8,9:10,10:12,11:13,12:14,13:15,16:y,17:n,19:T,21:[1,72],22:m,24:O,25:x,26:k,27:u,28:L,29:I,32:25,33:v,35:F,37:C,38:P,41:w,45:H,48:it,51:rt,52:at,53:nt,54:ot,57:z},t(S,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(S,[2,34]),t(S,[2,35]),t(S,[2,36]),t(S,[2,37]),t(lt,[2,46]),t(lt,[2,47]),t(S,[2,15]),t(S,[2,19]),t(xt,c,{7:78}),t(S,[2,26]),t(S,[2,27]),{5:[1,79]},{5:[1,80]},{4:h,5:p,8:8,9:10,10:12,11:13,12:14,13:15,16:y,17:n,19:T,21:[1,81],22:m,24:O,25:x,26:k,27:u,28:L,29:I,32:25,33:v,35:F,37:C,38:P,41:w,45:H,48:it,51:rt,52:at,53:nt,54:ot,57:z},t(S,[2,32]),t(S,[2,33]),t(S,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:f(function(a,d){if(d.recoverable)this.trace(a);else{var r=new Error(a);throw r.hash=d,r}},"parseError"),parse:f(function(a){var d=this,r=[0],g=[],E=[null],i=[],B=this.table,l="",Y=0,K=0,ht=2,Q=1,gt=i.slice.call(arguments,1),b=Object.create(this.lexer),U={yy:{}};for(var Tt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Tt)&&(U.yy[Tt]=this.yy[Tt]);b.setInput(a,U.yy),U.yy.lexer=b,U.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var Et=b.yylloc;i.push(Et);var Qt=b.options&&b.options.ranges;typeof U.yy.parseError=="function"?this.parseError=U.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Zt(N){r.length=r.length-2*N,E.length=E.length-N,i.length=i.length-N}f(Zt,"popStack");function Lt(){var N;return N=g.pop()||b.lex()||Q,typeof N!="number"&&(N instanceof Array&&(g=N,N=g.pop()),N=d.symbols_[N]||N),N}f(Lt,"lex");for(var A,W,R,_t,X={},ut,G,It,dt;;){if(W=r[r.length-1],this.defaultActions[W]?R=this.defaultActions[W]:((A===null||typeof A>"u")&&(A=Lt()),R=B[W]&&B[W][A]),typeof R>"u"||!R.length||!R[0]){var mt="";dt=[];for(ut in B[W])this.terminals_[ut]&&ut>ht&&dt.push("'"+this.terminals_[ut]+"'");b.showPosition?mt="Parse error on line "+(Y+1)+`: `+b.showPosition()+` Expecting `+dt.join(", ")+", got '"+(this.terminals_[A]||A)+"'":mt="Parse error on line "+(Y+1)+": Unexpected "+(A==Q?"end of input":"'"+(this.terminals_[A]||A)+"'"),this.parseError(mt,{text:b.match,token:this.terminals_[A]||A,line:b.yylineno,loc:Et,expected:dt})}if(R[0]instanceof Array&&R.length>1)throw new Error("Parse Error: multiple actions possible at state: "+W+", token: "+A);switch(R[0]){case 1:r.push(A),E.push(b.yytext),i.push(b.yylloc),r.push(R[1]),A=null,K=b.yyleng,l=b.yytext,Y=b.yylineno,Et=b.yylloc;break;case 2:if(G=this.productions_[R[1]][1],X.$=E[E.length-G],X._$={first_line:i[i.length-(G||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(G||1)].first_column,last_column:i[i.length-1].last_column},Qt&&(X._$.range=[i[i.length-(G||1)].range[0],i[i.length-1].range[1]]),_t=this.performAction.apply(X,[l,K,Y,U.yy,R[1],E,i].concat(gt)),typeof _t<"u")return _t;G&&(r=r.slice(0,-1*G*2),E=E.slice(0,-1*G),i=i.slice(0,-1*G)),r.push(this.productions_[R[1]][0]),E.push(X.$),i.push(X._$),It=B[r[r.length-2]][r[r.length-1]],r.push(It);break;case 3:return!0}}return!0},"parse")},qt=(function(){var V={EOF:1,parseError:f(function(d,r){if(this.yy.parser)this.yy.parser.parseError(d,r);else throw new Error(d)},"parseError"),setInput:f(function(a,d){return this.yy=d||this.yy||{},this._input=a,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:f(function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var d=a.match(/(?:\r\n?|\n).*/g);return d?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},"input"),unput:f(function(a){var d=a.length,r=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-d),this.offset-=d;var g=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),r.length-1&&(this.yylineno-=r.length-1);var E=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:r?(r.length===g.length?this.yylloc.first_column:0)+g[g.length-r.length].length-r[0].length:this.yylloc.first_column-d},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-d]),this.yyleng=this.yytext.length,this},"unput"),more:f(function(){return this._more=!0,this},"more"),reject:f(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). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:f(function(a){this.unput(this.match.slice(a))},"less"),pastInput:f(function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:f(function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:f(function(){var a=this.pastInput(),d=new Array(a.length+1).join("-");return a+this.upcomingInput()+` diff --git a/apps/kimi-code/dist-web/assets/chunk-JWPE2WC7-BiIZjhuH.js b/apps/kimi-code/dist-web/assets/chunk-JWPE2WC7-DTx-f56M.js similarity index 71% rename from apps/kimi-code/dist-web/assets/chunk-JWPE2WC7-BiIZjhuH.js rename to apps/kimi-code/dist-web/assets/chunk-JWPE2WC7-DTx-f56M.js index 5a3c9d63cb..fe5afe2afe 100644 --- a/apps/kimi-code/dist-web/assets/chunk-JWPE2WC7-BiIZjhuH.js +++ b/apps/kimi-code/dist-web/assets/chunk-JWPE2WC7-DTx-f56M.js @@ -1 +1 @@ -import{_ as i}from"./mermaid.core-BMAf1qng.js";function t(c,e){c.accDescr&&e.setAccDescription?.(c.accDescr),c.accTitle&&e.setAccTitle?.(c.accTitle),c.title&&e.setDiagramTitle?.(c.title)}i(t,"populateCommonDb");export{t as p}; +import{_ as i}from"./mermaid.core-Cahi9cr1.js";function t(c,e){c.accDescr&&e.setAccDescription?.(c.accDescr),c.accTitle&&e.setAccTitle?.(c.accTitle),c.title&&e.setDiagramTitle?.(c.title)}i(t,"populateCommonDb");export{t as p}; diff --git a/apps/kimi-code/dist-web/assets/chunk-MOJQB5TN-CAYle-Q0.js b/apps/kimi-code/dist-web/assets/chunk-MOJQB5TN-hIDvr-8C.js similarity index 99% rename from apps/kimi-code/dist-web/assets/chunk-MOJQB5TN-CAYle-Q0.js rename to apps/kimi-code/dist-web/assets/chunk-MOJQB5TN-hIDvr-8C.js index 06f767988c..c181e41d28 100644 --- a/apps/kimi-code/dist-web/assets/chunk-MOJQB5TN-CAYle-Q0.js +++ b/apps/kimi-code/dist-web/assets/chunk-MOJQB5TN-hIDvr-8C.js @@ -1,4 +1,4 @@ -import{_ as p,l as w,F as L,z as E,q as I,W as X,e as q,i as H,c as G}from"./mermaid.core-BMAf1qng.js";var z="",b="",N="",A=[],R=new Map,k=p(e=>H(e,G()),"sanitizeText"),F=p(e=>{switch(e.type){case"terminal":return{...e,value:k(e.value)};case"nonterminal":return{...e,name:k(e.name)};case"sequence":return{...e,elements:e.elements.map(F)};case"choice":return{...e,alternatives:e.alternatives.map(F)};case"optional":return{...e,element:F(e.element)};case"repetition":return{...e,element:F(e.element),separator:e.separator?F(e.separator):void 0};case"special":return{...e,text:k(e.text)}}},"sanitizeAstNode"),U=p(()=>{z="",b="",N="",A.length=0,R.clear(),I(),w.debug("[Railroad] Database cleared")},"clear"),W=p(e=>{z=k(e),w.debug("[Railroad] Title set:",e)},"setTitle"),_=p(()=>z,"getTitle"),j=p(e=>{const i={...e,name:k(e.name),definition:F(e.definition),comment:e.comment?k(e.comment):void 0};w.debug("[Railroad] Adding rule:",i.name),R.has(i.name)&&w.warn(`[Railroad] Rule '${i.name}' is already defined. Overwriting.`),A.push(i),R.set(i.name,i)},"addRule"),K=p(()=>A,"getRules"),J=p(e=>R.get(e),"getRule"),Q=p(e=>{b=k(e).replace(/^\s+/g,""),w.debug("[Railroad] Accessibility title set:",e)},"setAccTitle"),Z=p(()=>b,"getAccTitle"),V=p(e=>{N=k(e).replace(/\n\s+/g,` +import{_ as p,l as w,F as L,z as E,q as I,W as X,e as q,i as H,c as G}from"./mermaid.core-Cahi9cr1.js";var z="",b="",N="",A=[],R=new Map,k=p(e=>H(e,G()),"sanitizeText"),F=p(e=>{switch(e.type){case"terminal":return{...e,value:k(e.value)};case"nonterminal":return{...e,name:k(e.name)};case"sequence":return{...e,elements:e.elements.map(F)};case"choice":return{...e,alternatives:e.alternatives.map(F)};case"optional":return{...e,element:F(e.element)};case"repetition":return{...e,element:F(e.element),separator:e.separator?F(e.separator):void 0};case"special":return{...e,text:k(e.text)}}},"sanitizeAstNode"),U=p(()=>{z="",b="",N="",A.length=0,R.clear(),I(),w.debug("[Railroad] Database cleared")},"clear"),W=p(e=>{z=k(e),w.debug("[Railroad] Title set:",e)},"setTitle"),_=p(()=>z,"getTitle"),j=p(e=>{const i={...e,name:k(e.name),definition:F(e.definition),comment:e.comment?k(e.comment):void 0};w.debug("[Railroad] Adding rule:",i.name),R.has(i.name)&&w.warn(`[Railroad] Rule '${i.name}' is already defined. Overwriting.`),A.push(i),R.set(i.name,i)},"addRule"),K=p(()=>A,"getRules"),J=p(e=>R.get(e),"getRule"),Q=p(e=>{b=k(e).replace(/^\s+/g,""),w.debug("[Railroad] Accessibility title set:",e)},"setAccTitle"),Z=p(()=>b,"getAccTitle"),V=p(e=>{N=k(e).replace(/\n\s+/g,` `),w.debug("[Railroad] Accessibility description set:",e)},"setAccDescription"),ee=p(()=>N,"getAccDescription"),te=W,re=_,ie={clear:U,setTitle:W,getTitle:_,addRule:j,getRules:K,getRule:J,setAccTitle:Q,getAccTitle:Z,setAccDescription:V,getAccDescription:ee,setDiagramTitle:te,getDiagramTitle:re},g={compactMode:!1,padding:10,verticalSeparation:8,horizontalSeparation:10,arcRadius:10,fontSize:14,fontFamily:"monospace",terminalFill:"#FFFFC0",terminalStroke:"#000000",terminalTextColor:"#000000",nonTerminalFill:"#FFFFFF",nonTerminalStroke:"#000000",nonTerminalTextColor:"#000000",lineColor:"#000000",strokeWidth:2,markerFill:"#000000",commentFill:"#E8E8E8",commentStroke:"#888888",commentTextColor:"#666666",specialFill:"#F0E0FF",specialStroke:"#8800CC",ruleNameColor:"#000066",showMarkers:!0,markerRadius:5},ne=/^#(?:[\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$|^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch)\([\d\s%+,./-]+\)$|^[a-z]+$/i,ae=/^[\w "',.-]+$/,oe=new Set(["compactMode","padding","verticalSeparation","horizontalSeparation","arcRadius","fontSize","fontFamily","terminalFill","terminalStroke","terminalTextColor","nonTerminalFill","nonTerminalStroke","nonTerminalTextColor","lineColor","strokeWidth","markerFill","commentFill","commentStroke","commentTextColor","specialFill","specialStroke","ruleNameColor","showMarkers","markerRadius"]),B=p(e=>e?Object.keys(e).every(i=>i==="railroad"||oe.has(i)):!1,"isRailroadStyleOptions"),le=p(e=>e?"railroad"in e&&e.railroad?e.railroad:B(e)?e:{}:{},"extractRailroadOverrides"),se=p(e=>{if(!e||B(e))return{};const{railroad:i,svgId:a,theme:r,look:t,...n}=e;return n},"extractThemeOverrides"),m=p((e,i)=>{if(typeof e!="string")return i;const a=e.trim();return ne.test(a)?a:i},"sanitizeColorValue"),Y=p((e,i)=>{if(typeof e!="string")return i;const a=e.trim();return ae.test(a)?a:i},"sanitizeFontFamilyValue"),S=p((e,i)=>{const a=typeof e=="number"?e:typeof e=="string"?Number.parseFloat(e):Number.NaN;return Number.isFinite(a)&&a>=0?a:i},"sanitizeNumberValue"),de=p(e=>{const i=typeof e=="number"?e:typeof e=="string"?Number.parseFloat(e):Number.NaN;return Number.isFinite(i)&&i>0?i:void 0},"parseThemeFontSize"),ce=p(e=>{const i=Y(e.fontFamily,g.fontFamily),a=de(e.fontSize)??g.fontSize;return{...g,fontFamily:i,fontSize:a,terminalFill:m(e.secondBkg??e.secondaryColor,g.terminalFill),terminalStroke:m(e.secondaryBorderColor??e.lineColor,g.terminalStroke),terminalTextColor:m(e.secondaryTextColor??e.textColor,g.terminalTextColor),nonTerminalFill:m(e.mainBkg??e.background,g.nonTerminalFill),nonTerminalStroke:m(e.primaryBorderColor??e.lineColor,g.nonTerminalStroke),nonTerminalTextColor:m(e.primaryTextColor??e.textColor,g.nonTerminalTextColor),lineColor:m(e.lineColor,g.lineColor),markerFill:m(e.lineColor,g.markerFill),commentFill:m(e.labelBackground??e.tertiaryColor,g.commentFill),commentStroke:m(e.tertiaryBorderColor??e.lineColor,g.commentStroke),commentTextColor:m(e.tertiaryTextColor??e.textColor,g.commentTextColor),specialFill:m(e.tertiaryColor??e.secondaryColor,g.specialFill),specialStroke:m(e.tertiaryBorderColor??e.secondaryBorderColor,g.specialStroke),ruleNameColor:m(e.titleColor??e.textColor,g.ruleNameColor)}},"buildThemeDefaults"),M=p(e=>{const i=E(),a={...X(),...i.themeVariables??{},...se(e)},r=ce(a),t={...i.railroad??{},...le(e)};return{compactMode:t.compactMode??r.compactMode,padding:S(t.padding,r.padding),verticalSeparation:S(t.verticalSeparation,r.verticalSeparation),horizontalSeparation:S(t.horizontalSeparation,r.horizontalSeparation),arcRadius:S(t.arcRadius,r.arcRadius),fontSize:S(t.fontSize,r.fontSize),fontFamily:Y(t.fontFamily,r.fontFamily),terminalFill:m(t.terminalFill,r.terminalFill),terminalStroke:m(t.terminalStroke,r.terminalStroke),terminalTextColor:m(t.terminalTextColor,r.terminalTextColor),nonTerminalFill:m(t.nonTerminalFill,r.nonTerminalFill),nonTerminalStroke:m(t.nonTerminalStroke,r.nonTerminalStroke),nonTerminalTextColor:m(t.nonTerminalTextColor,r.nonTerminalTextColor),lineColor:m(t.lineColor,r.lineColor),strokeWidth:S(t.strokeWidth,r.strokeWidth),markerFill:m(t.markerFill,r.markerFill),commentFill:m(t.commentFill,r.commentFill),commentStroke:m(t.commentStroke,r.commentStroke),commentTextColor:m(t.commentTextColor,r.commentTextColor),specialFill:m(t.specialFill,r.specialFill),specialStroke:m(t.specialStroke,r.specialStroke),ruleNameColor:m(t.ruleNameColor,r.ruleNameColor),showMarkers:t.showMarkers??r.showMarkers,markerRadius:S(t.markerRadius,r.markerRadius)}},"buildRailroadStyleOptions"),ue=p(e=>{const{fontFamily:i,fontSize:a,terminalFill:r,terminalStroke:t,terminalTextColor:n,nonTerminalFill:h,nonTerminalStroke:s,nonTerminalTextColor:o,lineColor:u,strokeWidth:c,markerFill:d,commentFill:x,commentStroke:l,commentTextColor:f,specialFill:y,specialStroke:v,ruleNameColor:C}=M(e);return` .railroad-diagram { font-family: ${i}; diff --git a/apps/kimi-code/dist-web/assets/chunk-RYQCIY6F-nfBZcgde.js b/apps/kimi-code/dist-web/assets/chunk-RYQCIY6F-BHZEnq1y.js similarity index 99% rename from apps/kimi-code/dist-web/assets/chunk-RYQCIY6F-nfBZcgde.js rename to apps/kimi-code/dist-web/assets/chunk-RYQCIY6F-BHZEnq1y.js index c273c1b949..d7e08f4d7f 100644 --- a/apps/kimi-code/dist-web/assets/chunk-RYQCIY6F-nfBZcgde.js +++ b/apps/kimi-code/dist-web/assets/chunk-RYQCIY6F-BHZEnq1y.js @@ -1 +1 @@ -import{_ as u,l as i}from"./mermaid.core-BMAf1qng.js";import{i as m,G as y}from"./graph-DOmOIIwC.js";import{b as _,m as X}from"./map-DxJ2ADlA.js";var j=4;function p(e){return _(e,j)}function C(e){var r={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:F(e),edges:M(e)};return m(e.graph())||(r.value=p(e.graph())),r}function F(e){return X(e.nodes(),function(r){var n=e.node(r),s=e.parent(r),t={v:r};return m(n)||(t.value=n),m(s)||(t.parent=s),t})}function M(e){return X(e.edges(),function(r){var n=e.edge(r),s={v:r.v,w:r.w};return m(r.name)||(s.name=r.name),m(n)||(s.value=n),s})}var c=new Map,w=new Map,A=new Map,J=u(()=>{w.clear(),A.clear(),c.clear()},"clear"),v=u((e,r)=>{const n=w.get(r)||[];return i.trace("In isDescendant",r," ",e," = ",n.includes(e)),n.includes(e)},"isDescendant"),R=u((e,r)=>{const n=w.get(r)||[];return i.info("Descendants of ",r," is ",n),i.info("Edge is ",e),e.v===r||e.w===r?!1:n?n.includes(e.v)||v(e.v,r)||v(e.w,r)||n.includes(e.w):(i.debug("Tilt, ",r,",not in descendants"),!1)},"edgeInCluster"),b=u((e,r,n,s)=>{i.warn("Copying children of ",e,"root",s,"data",r.node(e),s);const t=r.children(e)||[];e!==s&&t.push(e),i.warn("Copying (nodes) clusterId",e,"nodes",t),t.forEach(o=>{if(r.children(o).length>0)b(o,r,n,s);else{const l=r.node(o);i.info("cp ",o," to ",s," with parent ",e),n.setNode(o,l),s!==r.parent(o)&&(i.warn("Setting parent",o,r.parent(o)),n.setParent(o,r.parent(o))),e!==s&&o!==e?(i.debug("Setting parent",o,e),n.setParent(o,e)):(i.info("In copy ",e,"root",s,"data",r.node(e),s),i.debug("Not Setting parent for node=",o,"cluster!==rootId",e!==s,"node!==clusterId",o!==e));const f=r.edges(o);i.debug("Copying Edges",f),f.forEach(a=>{i.info("Edge",a);const d=r.edge(a.v,a.w,a.name);i.info("Edge data",d,s);try{if(R(a,s)){const g=w.get(s)||[],E=g.includes(a.v)||v(a.v,s)||a.v===s,x=g.includes(a.w)||v(a.w,s)||a.w===s;if(E&&x)i.info("Copying as ",a.v,a.w,d,a.name),n.setEdge(a.v,a.w,d,a.name),i.info("newGraph edges ",n.edges(),n.edge(n.edges()[0]));else{const N=E?s:a.v,h=x?s:a.w;i.info("Rebinding cross-boundary edge as ",N,h,d,a.name),r.setEdge(N,h,d,a.name)}}else i.info("Skipping copy of edge ",a.v,"-->",a.w," rootId: ",s," clusterId:",e)}catch(g){i.error(g)}})}i.debug("Removing node",o),r.removeNode(o)})},"copy"),O=u((e,r)=>{const n=r.children(e);let s=[...n];for(const t of n)A.set(t,e),s=[...s,...O(t,r)];return s},"extractDescendants"),P=u((e,r,n)=>{const s=e.edges().filter(a=>a.v===r||a.w===r),t=e.edges().filter(a=>a.v===n||a.w===n),o=s.map(a=>({v:a.v===r?n:a.v,w:a.w===r?r:a.w})),l=t.map(a=>({v:a.v,w:a.w}));return o.filter(a=>l.some(d=>a.v===d.v&&a.w===d.w))},"findCommonEdges"),D=u((e,r,n)=>{const s=r.children(e);if(i.trace("Searching children of id ",e,s),s.length<1)return e;let t;for(const o of s){const l=D(o,r,n),f=P(r,n,l);if(l)if(f.length>0)t=l;else return l}return t},"findNonClusterChild"),S=u(e=>!c.has(e)||!c.get(e).externalConnections?e:c.has(e)?c.get(e).id:e,"getAnchorId"),U=u((e,r)=>{if(!e||r>10){i.debug("Opting out, no graph ");return}else i.debug("Opting in, graph ");e.nodes().forEach(function(n){e.children(n).length>0&&(i.warn("Cluster identified",n," Replacement id in edges: ",D(n,e,n)),w.set(n,O(n,e)),c.set(n,{id:D(n,e,n),clusterData:e.node(n)}))}),e.nodes().forEach(function(n){const s=e.children(n),t=e.edges();s.length>0?(i.debug("Cluster identified",n,w),t.forEach(o=>{const l=v(o.v,n),f=v(o.w,n);l^f&&(i.warn("Edge: ",o," leaves cluster ",n),i.warn("Descendants of XXX ",n,": ",w.get(n)),c.get(n).externalConnections=!0)})):i.debug("Not a cluster ",n,w)});for(let n of c.keys()){const s=c.get(n).id,t=e.parent(s);t!==n&&c.has(t)&&!c.get(t).externalConnections&&(c.get(n).id=t);const o=e.edges().some(l=>l.v===n);if(s&&c.get(n)?.externalConnections&&o&&L(e,s,n)){const l=T(e,n,e.parent(s));l&&(c.get(n).id=l)}}e.edges().forEach(function(n){const s=e.edge(n);i.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(n)),i.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(e.edge(n)));let t=n.v,o=n.w;if(i.warn("Fix XXX",c,"ids:",n.v,n.w,"Translating: ",c.get(n.v)," --- ",c.get(n.w)),c.get(n.v)||c.get(n.w)){if(i.warn("Fixing and trying - removing XXX",n.v,n.w,n.name),t=S(n.v),o=S(n.w),e.removeEdge(n.v,n.w,n.name),t!==n.v){const l=e.parent(t);c.get(l).externalConnections=!0,s.fromCluster=n.v}if(o!==n.w){const l=e.parent(o);c.get(l).externalConnections=!0,s.toCluster=n.w}i.warn("Fix Replacing with XXX",t,o,n.name),e.setEdge(t,o,s,n.name)}}),i.warn("Adjusted Graph",C(e)),k(e,0),i.trace(c)},"adjustClustersAndEdges"),k=u((e,r)=>{if(i.warn("extractor - ",r,C(e),e.children("D")),r>10){i.error("Bailing out");return}let n=e.nodes(),s=!1;for(const t of n){const o=e.children(t);s=s||o.length>0}if(!s){i.debug("Done, no node has children",e.nodes());return}i.debug("Nodes = ",n,r);for(const t of n)if(i.debug("Extracting node",t,c,c.has(t)&&!c.get(t).externalConnections,!e.parent(t),e.node(t),e.children("D")," Depth ",r),!c.has(t))i.debug("Not a cluster",t,r);else if(c.get(t)?.clusterData?.explicitDir&&e.children(t)&&e.children(t).length>0){i.warn("Cluster with explicit dir, creating subgraph for children",t,r);const o=c.get(t).clusterData.dir,l=new y({multigraph:!0,compound:!0}).setGraph({rankdir:o,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});b(t,e,l,t);const f=e.node(t)||{};e.setNode(t,{...f,clusterNode:!0,id:t,clusterData:c.get(t).clusterData,label:c.get(t).label,graph:l}),i.warn("Subgraph for cluster with explicit dir created:",t,C(l))}else if(!c.get(t).externalConnections&&e.children(t)&&e.children(t).length>0){i.warn("Cluster without external connections, without a parent and with children",t,r);let l=e.graph().rankdir==="TB"?"LR":"TB";c.get(t)?.clusterData?.dir&&(l=c.get(t).clusterData.dir,i.warn("Fixing dir",c.get(t).clusterData.dir,l));const f=new y({multigraph:!0,compound:!0}).setGraph({rankdir:l,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});b(t,e,f,t);const a=e.node(t)||{};e.setNode(t,{...a,clusterNode:!0,id:t,clusterData:c.get(t).clusterData,label:c.get(t).label,graph:f}),i.debug("Old graph after copy",C(e))}else i.warn("Cluster ** ",t," **not meeting the criteria !externalConnections:",!c.get(t).externalConnections," no parent: ",!e.parent(t)," children ",e.children(t)&&e.children(t).length>0,e.children("D"),r),i.debug(c);n=e.nodes(),i.warn("New list of nodes",n);for(const t of n){const o=e.node(t);i.warn(" Now next level",t,o),o?.clusterNode&&k(o.graph,r+1)}},"extractor"),B=u((e,r)=>{if(r.length===0)return[];let n=Object.assign([],r);return r.forEach(s=>{const t=e.children(s),o=B(e,t);n=[...n,...o]}),n},"sorter"),W=u(e=>B(e,e.children()),"sortNodesByHierarchy"),L=u((e,r,n)=>{let s=e.parent(r);for(;s&&s!==n;){const t=c.get(s);if(t&&!t.externalConnections)return!0;s=e.parent(s)}return!1},"isNodeInExtractableCluster"),T=u((e,r,n)=>{const s=e.children(r)??[];for(const t of s){if(t===n||v(t,n))continue;const o=D(t,e,r);if(o&&!L(e,o,r))return o}return null},"findSafeAnchorNode");export{U as a,c as b,J as c,D as f,W as s,C as w}; +import{_ as u,l as i}from"./mermaid.core-Cahi9cr1.js";import{i as m,G as y}from"./graph-DOmOIIwC.js";import{b as _,m as X}from"./map-DxJ2ADlA.js";var j=4;function p(e){return _(e,j)}function C(e){var r={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:F(e),edges:M(e)};return m(e.graph())||(r.value=p(e.graph())),r}function F(e){return X(e.nodes(),function(r){var n=e.node(r),s=e.parent(r),t={v:r};return m(n)||(t.value=n),m(s)||(t.parent=s),t})}function M(e){return X(e.edges(),function(r){var n=e.edge(r),s={v:r.v,w:r.w};return m(r.name)||(s.name=r.name),m(n)||(s.value=n),s})}var c=new Map,w=new Map,A=new Map,J=u(()=>{w.clear(),A.clear(),c.clear()},"clear"),v=u((e,r)=>{const n=w.get(r)||[];return i.trace("In isDescendant",r," ",e," = ",n.includes(e)),n.includes(e)},"isDescendant"),R=u((e,r)=>{const n=w.get(r)||[];return i.info("Descendants of ",r," is ",n),i.info("Edge is ",e),e.v===r||e.w===r?!1:n?n.includes(e.v)||v(e.v,r)||v(e.w,r)||n.includes(e.w):(i.debug("Tilt, ",r,",not in descendants"),!1)},"edgeInCluster"),b=u((e,r,n,s)=>{i.warn("Copying children of ",e,"root",s,"data",r.node(e),s);const t=r.children(e)||[];e!==s&&t.push(e),i.warn("Copying (nodes) clusterId",e,"nodes",t),t.forEach(o=>{if(r.children(o).length>0)b(o,r,n,s);else{const l=r.node(o);i.info("cp ",o," to ",s," with parent ",e),n.setNode(o,l),s!==r.parent(o)&&(i.warn("Setting parent",o,r.parent(o)),n.setParent(o,r.parent(o))),e!==s&&o!==e?(i.debug("Setting parent",o,e),n.setParent(o,e)):(i.info("In copy ",e,"root",s,"data",r.node(e),s),i.debug("Not Setting parent for node=",o,"cluster!==rootId",e!==s,"node!==clusterId",o!==e));const f=r.edges(o);i.debug("Copying Edges",f),f.forEach(a=>{i.info("Edge",a);const d=r.edge(a.v,a.w,a.name);i.info("Edge data",d,s);try{if(R(a,s)){const g=w.get(s)||[],E=g.includes(a.v)||v(a.v,s)||a.v===s,x=g.includes(a.w)||v(a.w,s)||a.w===s;if(E&&x)i.info("Copying as ",a.v,a.w,d,a.name),n.setEdge(a.v,a.w,d,a.name),i.info("newGraph edges ",n.edges(),n.edge(n.edges()[0]));else{const N=E?s:a.v,h=x?s:a.w;i.info("Rebinding cross-boundary edge as ",N,h,d,a.name),r.setEdge(N,h,d,a.name)}}else i.info("Skipping copy of edge ",a.v,"-->",a.w," rootId: ",s," clusterId:",e)}catch(g){i.error(g)}})}i.debug("Removing node",o),r.removeNode(o)})},"copy"),O=u((e,r)=>{const n=r.children(e);let s=[...n];for(const t of n)A.set(t,e),s=[...s,...O(t,r)];return s},"extractDescendants"),P=u((e,r,n)=>{const s=e.edges().filter(a=>a.v===r||a.w===r),t=e.edges().filter(a=>a.v===n||a.w===n),o=s.map(a=>({v:a.v===r?n:a.v,w:a.w===r?r:a.w})),l=t.map(a=>({v:a.v,w:a.w}));return o.filter(a=>l.some(d=>a.v===d.v&&a.w===d.w))},"findCommonEdges"),D=u((e,r,n)=>{const s=r.children(e);if(i.trace("Searching children of id ",e,s),s.length<1)return e;let t;for(const o of s){const l=D(o,r,n),f=P(r,n,l);if(l)if(f.length>0)t=l;else return l}return t},"findNonClusterChild"),S=u(e=>!c.has(e)||!c.get(e).externalConnections?e:c.has(e)?c.get(e).id:e,"getAnchorId"),U=u((e,r)=>{if(!e||r>10){i.debug("Opting out, no graph ");return}else i.debug("Opting in, graph ");e.nodes().forEach(function(n){e.children(n).length>0&&(i.warn("Cluster identified",n," Replacement id in edges: ",D(n,e,n)),w.set(n,O(n,e)),c.set(n,{id:D(n,e,n),clusterData:e.node(n)}))}),e.nodes().forEach(function(n){const s=e.children(n),t=e.edges();s.length>0?(i.debug("Cluster identified",n,w),t.forEach(o=>{const l=v(o.v,n),f=v(o.w,n);l^f&&(i.warn("Edge: ",o," leaves cluster ",n),i.warn("Descendants of XXX ",n,": ",w.get(n)),c.get(n).externalConnections=!0)})):i.debug("Not a cluster ",n,w)});for(let n of c.keys()){const s=c.get(n).id,t=e.parent(s);t!==n&&c.has(t)&&!c.get(t).externalConnections&&(c.get(n).id=t);const o=e.edges().some(l=>l.v===n);if(s&&c.get(n)?.externalConnections&&o&&L(e,s,n)){const l=T(e,n,e.parent(s));l&&(c.get(n).id=l)}}e.edges().forEach(function(n){const s=e.edge(n);i.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(n)),i.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(e.edge(n)));let t=n.v,o=n.w;if(i.warn("Fix XXX",c,"ids:",n.v,n.w,"Translating: ",c.get(n.v)," --- ",c.get(n.w)),c.get(n.v)||c.get(n.w)){if(i.warn("Fixing and trying - removing XXX",n.v,n.w,n.name),t=S(n.v),o=S(n.w),e.removeEdge(n.v,n.w,n.name),t!==n.v){const l=e.parent(t);c.get(l).externalConnections=!0,s.fromCluster=n.v}if(o!==n.w){const l=e.parent(o);c.get(l).externalConnections=!0,s.toCluster=n.w}i.warn("Fix Replacing with XXX",t,o,n.name),e.setEdge(t,o,s,n.name)}}),i.warn("Adjusted Graph",C(e)),k(e,0),i.trace(c)},"adjustClustersAndEdges"),k=u((e,r)=>{if(i.warn("extractor - ",r,C(e),e.children("D")),r>10){i.error("Bailing out");return}let n=e.nodes(),s=!1;for(const t of n){const o=e.children(t);s=s||o.length>0}if(!s){i.debug("Done, no node has children",e.nodes());return}i.debug("Nodes = ",n,r);for(const t of n)if(i.debug("Extracting node",t,c,c.has(t)&&!c.get(t).externalConnections,!e.parent(t),e.node(t),e.children("D")," Depth ",r),!c.has(t))i.debug("Not a cluster",t,r);else if(c.get(t)?.clusterData?.explicitDir&&e.children(t)&&e.children(t).length>0){i.warn("Cluster with explicit dir, creating subgraph for children",t,r);const o=c.get(t).clusterData.dir,l=new y({multigraph:!0,compound:!0}).setGraph({rankdir:o,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});b(t,e,l,t);const f=e.node(t)||{};e.setNode(t,{...f,clusterNode:!0,id:t,clusterData:c.get(t).clusterData,label:c.get(t).label,graph:l}),i.warn("Subgraph for cluster with explicit dir created:",t,C(l))}else if(!c.get(t).externalConnections&&e.children(t)&&e.children(t).length>0){i.warn("Cluster without external connections, without a parent and with children",t,r);let l=e.graph().rankdir==="TB"?"LR":"TB";c.get(t)?.clusterData?.dir&&(l=c.get(t).clusterData.dir,i.warn("Fixing dir",c.get(t).clusterData.dir,l));const f=new y({multigraph:!0,compound:!0}).setGraph({rankdir:l,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});b(t,e,f,t);const a=e.node(t)||{};e.setNode(t,{...a,clusterNode:!0,id:t,clusterData:c.get(t).clusterData,label:c.get(t).label,graph:f}),i.debug("Old graph after copy",C(e))}else i.warn("Cluster ** ",t," **not meeting the criteria !externalConnections:",!c.get(t).externalConnections," no parent: ",!e.parent(t)," children ",e.children(t)&&e.children(t).length>0,e.children("D"),r),i.debug(c);n=e.nodes(),i.warn("New list of nodes",n);for(const t of n){const o=e.node(t);i.warn(" Now next level",t,o),o?.clusterNode&&k(o.graph,r+1)}},"extractor"),B=u((e,r)=>{if(r.length===0)return[];let n=Object.assign([],r);return r.forEach(s=>{const t=e.children(s),o=B(e,t);n=[...n,...o]}),n},"sorter"),W=u(e=>B(e,e.children()),"sortNodesByHierarchy"),L=u((e,r,n)=>{let s=e.parent(r);for(;s&&s!==n;){const t=c.get(s);if(t&&!t.externalConnections)return!0;s=e.parent(s)}return!1},"isNodeInExtractableCluster"),T=u((e,r,n)=>{const s=e.children(r)??[];for(const t of s){if(t===n||v(t,n))continue;const o=D(t,e,r);if(o&&!L(e,o,r))return o}return null},"findSafeAnchorNode");export{U as a,c as b,J as c,D as f,W as s,C as w}; diff --git a/apps/kimi-code/dist-web/assets/chunk-V7JOEXUC-DIDk-4Yh.js b/apps/kimi-code/dist-web/assets/chunk-V7JOEXUC-DjiRieSh.js similarity index 99% rename from apps/kimi-code/dist-web/assets/chunk-V7JOEXUC-DIDk-4Yh.js rename to apps/kimi-code/dist-web/assets/chunk-V7JOEXUC-DjiRieSh.js index 5488e1cd83..e4a150ebe9 100644 --- a/apps/kimi-code/dist-web/assets/chunk-V7JOEXUC-DIDk-4Yh.js +++ b/apps/kimi-code/dist-web/assets/chunk-V7JOEXUC-DjiRieSh.js @@ -1,4 +1,4 @@ -import{g as tt}from"./chunk-5VM5RSS4-DNp0lB9r.js";import{g as st}from"./chunk-XXDRQBXY-CcyRETTg.js";import{s as it}from"./chunk-VR4S4FIN-Cveor6Gg.js";import{_ as f,l as Ie,c as F,v as at,x as nt,y as Oe,d as de,a5 as rt,b as ut,a as lt,s as ct,g as ot,o as ht,p as dt,k as I,q as pt,r as At,i as ft,a6 as G}from"./mermaid.core-BMAf1qng.js";import{f as gt}from"./chunk-32BRIVSS-D2R4swWR.js";var we=(function(){var t=f(function(O,o,h,p){for(h=h||{},p=O.length;p--;h[O[p]]=o);return h},"o"),i=[1,18],a=[1,19],n=[1,20],r=[1,41],c=[1,26],u=[1,42],d=[1,24],m=[1,25],g=[1,32],N=[1,33],Ae=[1,34],b=[1,45],fe=[1,35],ge=[1,36],me=[1,37],Ce=[1,38],be=[1,27],ke=[1,28],Ee=[1,29],Te=[1,30],ye=[1,31],k=[1,44],E=[1,46],T=[1,43],y=[1,47],De=[1,9],A=[1,8,9],Z=[1,58],$=[1,59],ee=[1,60],te=[1,61],se=[1,62],Fe=[1,63],Be=[1,64],_=[1,8,9,41],Pe=[1,77],M=[1,8,9,12,13,22,39,41,44,46,68,69,70,71,72,73,74,79,81],ie=[1,8,9,12,13,18,20,22,39,41,44,46,47,60,68,69,70,71,72,73,74,79,81,86,100,102,103],ae=[13,60,86,100,102,103],U=[13,60,73,74,86,100,102,103],Me=[13,60,68,69,70,71,72,86,100,102,103],ne=[1,103],z=[1,121],Y=[1,117],K=[1,113],W=[1,119],Q=[1,114],j=[1,115],X=[1,116],q=[1,118],H=[1,120],Re=[22,50,60,61,82,86,87,88,89,90],Ge=[1,128],re=[12,39],_e=[1,8,9,39,41,44,46],ue=[1,8,9,22],Ue=[1,153],ze=[1,8,9,61],x=[1,8,9,22,50,60,61,82,86,87,88,89,90],Se={trace:f(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,classLiteralName:17,DOT:18,className:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,ANNOTATION_START:46,ANNOTATION_END:47,CLASS:48,emptyBody:49,SPACE:50,MEMBER:51,SEPARATOR:52,relation:53,NOTE_FOR:54,noteText:55,NOTE:56,CLASSDEF:57,classList:58,stylesOpt:59,ALPHA:60,COMMA:61,direction_tb:62,direction_bt:63,direction_rl:64,direction_lr:65,relationType:66,lineType:67,AGGREGATION:68,EXTENSION:69,COMPOSITION:70,DEPENDENCY:71,LOLLIPOP:72,LINE:73,DOTTED_LINE:74,CALLBACK:75,LINK:76,LINK_TARGET:77,CLICK:78,CALLBACK_NAME:79,CALLBACK_ARGS:80,HREF:81,STYLE:82,CSSCLASS:83,style:84,styleComponent:85,NUM:86,COLON:87,UNIT:88,BRKT:89,PCT:90,commentToken:91,textToken:92,graphCodeTokens:93,textNoTagsToken:94,TAGSTART:95,TAGEND:96,"==":97,"--":98,DEFAULT:99,MINUS:100,keywords:101,UNICODE_TEXT:102,BQUOTE_STR:103,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",18:"DOT",20:"GENERICTYPE",22:"LABEL",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",39:"STRUCT_START",41:"STRUCT_STOP",42:"NAMESPACE",44:"STYLE_SEPARATOR",46:"ANNOTATION_START",47:"ANNOTATION_END",48:"CLASS",50:"SPACE",51:"MEMBER",52:"SEPARATOR",54:"NOTE_FOR",56:"NOTE",57:"CLASSDEF",60:"ALPHA",61:"COMMA",62:"direction_tb",63:"direction_bt",64:"direction_rl",65:"direction_lr",68:"AGGREGATION",69:"EXTENSION",70:"COMPOSITION",71:"DEPENDENCY",72:"LOLLIPOP",73:"LINE",74:"DOTTED_LINE",75:"CALLBACK",76:"LINK",77:"LINK_TARGET",78:"CLICK",79:"CALLBACK_NAME",80:"CALLBACK_ARGS",81:"HREF",82:"STYLE",83:"CSSCLASS",86:"NUM",87:"COLON",88:"UNIT",89:"BRKT",90:"PCT",93:"graphCodeTokens",95:"TAGSTART",96:"TAGEND",97:"==",98:"--",99:"DEFAULT",100:"MINUS",101:"keywords",102:"UNICODE_TEXT",103:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,1],[15,3],[15,2],[19,1],[19,3],[19,1],[19,2],[19,2],[19,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[38,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,3],[24,6],[24,4],[24,7],[24,6],[43,2],[43,3],[49,0],[49,2],[49,2],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[58,1],[58,3],[32,1],[32,1],[32,1],[32,1],[53,3],[53,2],[53,2],[53,1],[66,1],[66,1],[66,1],[66,1],[66,1],[67,1],[67,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[59,1],[59,3],[84,1],[84,2],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[91,1],[91,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[94,1],[94,1],[94,1],[94,1],[16,1],[16,1],[16,1],[16,1],[17,1],[55,1]],performAction:f(function(o,h,p,l,C,e,J){var s=e.length-1;switch(C){case 8:this.$=e[s-1];break;case 9:case 10:case 13:case 15:this.$=e[s];break;case 11:case 14:this.$=e[s-2]+"."+e[s];break;case 12:case 16:this.$=e[s-1]+e[s];break;case 17:case 18:this.$=e[s-1]+"~"+e[s]+"~";break;case 19:l.addRelation(e[s]);break;case 20:e[s-1].title=l.cleanupLabel(e[s]),l.addRelation(e[s-1]);break;case 31:this.$=e[s].trim(),l.setAccTitle(this.$);break;case 32:case 33:this.$=e[s].trim(),l.setAccDescription(this.$);break;case 34:l.addClassesToNamespace(e[s-3],e[s-1][0],e[s-1][1]),l.popNamespace();break;case 35:l.addClassesToNamespace(e[s-4],e[s-1][0],e[s-1][1]),l.popNamespace();break;case 36:this.$=l.addNamespace(e[s]);break;case 37:this.$=l.addNamespace(e[s-1],e[s]);break;case 38:this.$=[[e[s]],[]];break;case 39:this.$=[[e[s-1]],[]];break;case 40:e[s][0].unshift(e[s-2]),this.$=e[s];break;case 41:this.$=[[],[e[s]]];break;case 42:this.$=[[],[e[s-1]]];break;case 43:e[s][1].unshift(e[s-2]),this.$=e[s];break;case 44:case 45:this.$=[[],[]];break;case 46:this.$=e[s];break;case 48:l.setCssClass(e[s-2],e[s]);break;case 49:l.addMembers(e[s-3],e[s-1]);break;case 51:l.setCssClass(e[s-5],e[s-3]),l.addMembers(e[s-5],e[s-1]);break;case 52:l.addAnnotation(e[s-3],e[s-1]);break;case 53:l.addAnnotation(e[s-6],e[s-4]),l.addMembers(e[s-6],e[s-1]);break;case 54:l.addAnnotation(e[s-5],e[s-3]);break;case 55:this.$=e[s],l.addClass(e[s]);break;case 56:this.$=e[s-1],l.addClass(e[s-1]),l.setClassLabel(e[s-1],e[s]);break;case 60:l.addAnnotation(e[s],e[s-2]);break;case 61:case 74:this.$=[e[s]];break;case 62:e[s].push(e[s-1]),this.$=e[s];break;case 63:break;case 64:l.addMember(e[s-1],l.cleanupLabel(e[s]));break;case 65:break;case 66:break;case 67:this.$={id1:e[s-2],id2:e[s],relation:e[s-1],relationTitle1:"none",relationTitle2:"none"};break;case 68:this.$={id1:e[s-3],id2:e[s],relation:e[s-1],relationTitle1:e[s-2],relationTitle2:"none"};break;case 69:this.$={id1:e[s-3],id2:e[s],relation:e[s-2],relationTitle1:"none",relationTitle2:e[s-1]};break;case 70:this.$={id1:e[s-4],id2:e[s],relation:e[s-2],relationTitle1:e[s-3],relationTitle2:e[s-1]};break;case 71:this.$=l.addNote(e[s],e[s-1]);break;case 72:this.$=l.addNote(e[s]);break;case 73:this.$=e[s-2],l.defineClass(e[s-1],e[s]);break;case 75:this.$=e[s-2].concat([e[s]]);break;case 76:l.setDirection("TB");break;case 77:l.setDirection("BT");break;case 78:l.setDirection("RL");break;case 79:l.setDirection("LR");break;case 80:this.$={type1:e[s-2],type2:e[s],lineType:e[s-1]};break;case 81:this.$={type1:"none",type2:e[s],lineType:e[s-1]};break;case 82:this.$={type1:e[s-1],type2:"none",lineType:e[s]};break;case 83:this.$={type1:"none",type2:"none",lineType:e[s]};break;case 84:this.$=l.relationType.AGGREGATION;break;case 85:this.$=l.relationType.EXTENSION;break;case 86:this.$=l.relationType.COMPOSITION;break;case 87:this.$=l.relationType.DEPENDENCY;break;case 88:this.$=l.relationType.LOLLIPOP;break;case 89:this.$=l.lineType.LINE;break;case 90:this.$=l.lineType.DOTTED_LINE;break;case 91:case 97:this.$=e[s-2],l.setClickEvent(e[s-1],e[s]);break;case 92:case 98:this.$=e[s-3],l.setClickEvent(e[s-2],e[s-1]),l.setTooltip(e[s-2],e[s]);break;case 93:this.$=e[s-2],l.setLink(e[s-1],e[s]);break;case 94:this.$=e[s-3],l.setLink(e[s-2],e[s-1],e[s]);break;case 95:this.$=e[s-3],l.setLink(e[s-2],e[s-1]),l.setTooltip(e[s-2],e[s]);break;case 96:this.$=e[s-4],l.setLink(e[s-3],e[s-2],e[s]),l.setTooltip(e[s-3],e[s-1]);break;case 99:this.$=e[s-3],l.setClickEvent(e[s-2],e[s-1],e[s]);break;case 100:this.$=e[s-4],l.setClickEvent(e[s-3],e[s-2],e[s-1]),l.setTooltip(e[s-3],e[s]);break;case 101:this.$=e[s-3],l.setLink(e[s-2],e[s]);break;case 102:this.$=e[s-4],l.setLink(e[s-3],e[s-1],e[s]);break;case 103:this.$=e[s-4],l.setLink(e[s-3],e[s-1]),l.setTooltip(e[s-3],e[s]);break;case 104:this.$=e[s-5],l.setLink(e[s-4],e[s-2],e[s]),l.setTooltip(e[s-4],e[s-1]);break;case 105:this.$=e[s-2],l.setCssStyle(e[s-1],e[s]);break;case 106:l.setCssClass(e[s-1],e[s]);break;case 107:this.$=[e[s]];break;case 108:e[s-2].push(e[s]),this.$=e[s-2];break;case 110:this.$=e[s-1]+e[s];break}},"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:i,35:a,37:n,38:22,42:r,43:23,46:c,48:u,51:d,52:m,54:g,56:N,57:Ae,60:b,62:fe,63:ge,64:me,65:Ce,75:be,76:ke,78:Ee,82:Te,83:ye,86:k,100:E,102:T,103:y},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},t(De,[2,5],{8:[1,48]}),{8:[1,49]},t(A,[2,19],{22:[1,50]}),t(A,[2,21]),t(A,[2,22]),t(A,[2,23]),t(A,[2,24]),t(A,[2,25]),t(A,[2,26]),t(A,[2,27]),t(A,[2,28]),t(A,[2,29]),t(A,[2,30]),{34:[1,51]},{36:[1,52]},t(A,[2,33]),t(A,[2,63],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:Z,69:$,70:ee,71:te,72:se,73:Fe,74:Be}),{39:[1,65]},t(_,[2,47],{39:[1,67],44:[1,66],46:[1,68]}),t(A,[2,65]),t(A,[2,66]),{16:69,60:b,86:k,100:E,102:T},{16:39,17:40,19:70,60:b,86:k,100:E,102:T,103:y},{16:39,17:40,19:71,60:b,86:k,100:E,102:T,103:y},{16:39,17:40,19:72,60:b,86:k,100:E,102:T,103:y},{60:[1,73]},{13:[1,74]},{16:39,17:40,19:75,60:b,86:k,100:E,102:T,103:y},{13:Pe,55:76},{58:78,60:[1,79]},t(A,[2,76]),t(A,[2,77]),t(A,[2,78]),t(A,[2,79]),t(M,[2,13],{16:39,17:40,19:81,18:[1,80],20:[1,82],60:b,86:k,100:E,102:T,103:y}),t(M,[2,15],{20:[1,83]}),{15:84,16:85,17:86,60:b,86:k,100:E,102:T,103:y},{16:39,17:40,19:87,60:b,86:k,100:E,102:T,103:y},t(ie,[2,133]),t(ie,[2,134]),t(ie,[2,135]),t(ie,[2,136]),t([1,8,9,12,13,20,22,39,41,44,46,68,69,70,71,72,73,74,79,81],[2,137]),t(De,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,19:21,38:22,43:23,16:39,17:40,5:88,33:i,35:a,37:n,42:r,46:c,48:u,51:d,52:m,54:g,56:N,57:Ae,60:b,62:fe,63:ge,64:me,65:Ce,75:be,76:ke,78:Ee,82:Te,83:ye,86:k,100:E,102:T,103:y}),{5:89,10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:i,35:a,37:n,38:22,42:r,43:23,46:c,48:u,51:d,52:m,54:g,56:N,57:Ae,60:b,62:fe,63:ge,64:me,65:Ce,75:be,76:ke,78:Ee,82:Te,83:ye,86:k,100:E,102:T,103:y},t(A,[2,20]),t(A,[2,31]),t(A,[2,32]),{13:[1,91],16:39,17:40,19:90,60:b,86:k,100:E,102:T,103:y},{53:92,66:56,67:57,68:Z,69:$,70:ee,71:te,72:se,73:Fe,74:Be},t(A,[2,64]),{67:93,73:Fe,74:Be},t(ae,[2,83],{66:94,68:Z,69:$,70:ee,71:te,72:se}),t(U,[2,84]),t(U,[2,85]),t(U,[2,86]),t(U,[2,87]),t(U,[2,88]),t(Me,[2,89]),t(Me,[2,90]),{8:[1,96],23:99,24:97,30:98,38:22,40:95,42:r,43:23,48:u,54:g,56:N},{16:100,60:b,86:k,100:E,102:T},{41:[1,102],45:101,51:ne},{16:104,60:b,86:k,100:E,102:T},{47:[1,105]},{13:[1,106]},{13:[1,107]},{79:[1,108],81:[1,109]},{22:z,50:Y,59:110,60:K,82:W,84:111,85:112,86:Q,87:j,88:X,89:q,90:H},{60:[1,122]},{13:Pe,55:123},t(_,[2,72]),t(_,[2,138]),{22:z,50:Y,59:124,60:K,61:[1,125],82:W,84:111,85:112,86:Q,87:j,88:X,89:q,90:H},t(Re,[2,74]),{16:39,17:40,19:126,60:b,86:k,100:E,102:T,103:y},t(M,[2,16]),t(M,[2,17]),t(M,[2,18]),{11:127,12:Ge,39:[2,36]},t(re,[2,9],{16:85,17:86,15:130,18:[1,129],60:b,86:k,100:E,102:T,103:y}),t(re,[2,10]),t(_e,[2,55],{11:131,12:Ge}),t(De,[2,7]),{9:[1,132]},t(ue,[2,67]),{16:39,17:40,19:133,60:b,86:k,100:E,102:T,103:y},{13:[1,135],16:39,17:40,19:134,60:b,86:k,100:E,102:T,103:y},t(ae,[2,82],{66:136,68:Z,69:$,70:ee,71:te,72:se}),t(ae,[2,81]),{41:[1,137]},{23:99,24:97,30:98,38:22,40:138,42:r,43:23,48:u,54:g,56:N},{8:[1,139],41:[2,38]},{8:[1,140],41:[2,41]},{8:[1,141],41:[2,44]},t(_,[2,48],{39:[1,142]}),{41:[1,143]},t(_,[2,50]),{41:[2,61],45:144,51:ne},{47:[1,145]},{16:39,17:40,19:146,60:b,86:k,100:E,102:T,103:y},t(A,[2,91],{13:[1,147]}),t(A,[2,93],{13:[1,149],77:[1,148]}),t(A,[2,97],{13:[1,150],80:[1,151]}),{13:[1,152]},t(A,[2,105],{61:Ue}),t(ze,[2,107],{85:154,22:z,50:Y,60:K,82:W,86:Q,87:j,88:X,89:q,90:H}),t(x,[2,109]),t(x,[2,111]),t(x,[2,112]),t(x,[2,113]),t(x,[2,114]),t(x,[2,115]),t(x,[2,116]),t(x,[2,117]),t(x,[2,118]),t(x,[2,119]),t(A,[2,106]),t(_,[2,71]),t(A,[2,73],{61:Ue}),{60:[1,155]},t(M,[2,14]),{39:[2,37]},{13:[1,156]},{15:157,16:85,17:86,60:b,86:k,100:E,102:T,103:y},t(re,[2,12]),t(_e,[2,56]),{1:[2,4]},t(ue,[2,69]),t(ue,[2,68]),{16:39,17:40,19:158,60:b,86:k,100:E,102:T,103:y},t(ae,[2,80]),t(_,[2,34]),{41:[1,159]},{23:99,24:97,30:98,38:22,40:160,41:[2,39],42:r,43:23,48:u,54:g,56:N},{23:99,24:97,30:98,38:22,40:161,41:[2,42],42:r,43:23,48:u,54:g,56:N},{23:99,24:97,30:98,38:22,40:162,41:[2,45],42:r,43:23,48:u,54:g,56:N},{45:163,51:ne},t(_,[2,49]),{41:[2,62]},t(_,[2,52],{39:[1,164]}),t(A,[2,60]),t(A,[2,92]),t(A,[2,94]),t(A,[2,95],{77:[1,165]}),t(A,[2,98]),t(A,[2,99],{13:[1,166]}),t(A,[2,101],{13:[1,168],77:[1,167]}),{22:z,50:Y,60:K,82:W,84:169,85:112,86:Q,87:j,88:X,89:q,90:H},t(x,[2,110]),t(Re,[2,75]),{14:[1,170]},t(re,[2,11]),t(ue,[2,70]),t(_,[2,35]),{41:[2,40]},{41:[2,43]},{41:[2,46]},{41:[1,171]},{41:[1,173],45:172,51:ne},t(A,[2,96]),t(A,[2,100]),t(A,[2,102]),t(A,[2,103],{77:[1,174]}),t(ze,[2,108],{85:154,22:z,50:Y,60:K,82:W,86:Q,87:j,88:X,89:q,90:H}),t(_e,[2,8]),t(_,[2,51]),{41:[1,175]},t(_,[2,54]),t(A,[2,104]),t(_,[2,53])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],127:[2,37],132:[2,4],144:[2,62],160:[2,40],161:[2,43],162:[2,46]},parseError:f(function(o,h){if(h.recoverable)this.trace(o);else{var p=new Error(o);throw p.hash=h,p}},"parseError"),parse:f(function(o){var h=this,p=[0],l=[],C=[null],e=[],J=this.table,s="",ce=0,Ye=0,Je=2,Ke=1,Ze=e.slice.call(arguments,1),D=Object.create(this.lexer),w={yy:{}};for(var Ne in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ne)&&(w.yy[Ne]=this.yy[Ne]);D.setInput(o,w.yy),w.yy.lexer=D,w.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var Le=D.yylloc;e.push(Le);var $e=D.options&&D.options.ranges;typeof w.yy.parseError=="function"?this.parseError=w.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function et(S){p.length=p.length-2*S,C.length=C.length-S,e.length=e.length-S}f(et,"popStack");function We(){var S;return S=l.pop()||D.lex()||Ke,typeof S!="number"&&(S instanceof Array&&(l=S,S=l.pop()),S=h.symbols_[S]||S),S}f(We,"lex");for(var B,V,L,xe,R={},oe,v,Qe,he;;){if(V=p[p.length-1],this.defaultActions[V]?L=this.defaultActions[V]:((B===null||typeof B>"u")&&(B=We()),L=J[V]&&J[V][B]),typeof L>"u"||!L.length||!L[0]){var ve="";he=[];for(oe in J[V])this.terminals_[oe]&&oe>Je&&he.push("'"+this.terminals_[oe]+"'");D.showPosition?ve="Parse error on line "+(ce+1)+`: +import{g as tt}from"./chunk-5VM5RSS4-CfD0Yt-O.js";import{g as st}from"./chunk-XXDRQBXY-BmzWd-kT.js";import{s as it}from"./chunk-VR4S4FIN-he8WxbY-.js";import{_ as f,l as Ie,c as F,v as at,x as nt,y as Oe,d as de,a5 as rt,b as ut,a as lt,s as ct,g as ot,o as ht,p as dt,k as I,q as pt,r as At,i as ft,a6 as G}from"./mermaid.core-Cahi9cr1.js";import{f as gt}from"./chunk-32BRIVSS-DAsxL712.js";var we=(function(){var t=f(function(O,o,h,p){for(h=h||{},p=O.length;p--;h[O[p]]=o);return h},"o"),i=[1,18],a=[1,19],n=[1,20],r=[1,41],c=[1,26],u=[1,42],d=[1,24],m=[1,25],g=[1,32],N=[1,33],Ae=[1,34],b=[1,45],fe=[1,35],ge=[1,36],me=[1,37],Ce=[1,38],be=[1,27],ke=[1,28],Ee=[1,29],Te=[1,30],ye=[1,31],k=[1,44],E=[1,46],T=[1,43],y=[1,47],De=[1,9],A=[1,8,9],Z=[1,58],$=[1,59],ee=[1,60],te=[1,61],se=[1,62],Fe=[1,63],Be=[1,64],_=[1,8,9,41],Pe=[1,77],M=[1,8,9,12,13,22,39,41,44,46,68,69,70,71,72,73,74,79,81],ie=[1,8,9,12,13,18,20,22,39,41,44,46,47,60,68,69,70,71,72,73,74,79,81,86,100,102,103],ae=[13,60,86,100,102,103],U=[13,60,73,74,86,100,102,103],Me=[13,60,68,69,70,71,72,86,100,102,103],ne=[1,103],z=[1,121],Y=[1,117],K=[1,113],W=[1,119],Q=[1,114],j=[1,115],X=[1,116],q=[1,118],H=[1,120],Re=[22,50,60,61,82,86,87,88,89,90],Ge=[1,128],re=[12,39],_e=[1,8,9,39,41,44,46],ue=[1,8,9,22],Ue=[1,153],ze=[1,8,9,61],x=[1,8,9,22,50,60,61,82,86,87,88,89,90],Se={trace:f(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,classLiteralName:17,DOT:18,className:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,ANNOTATION_START:46,ANNOTATION_END:47,CLASS:48,emptyBody:49,SPACE:50,MEMBER:51,SEPARATOR:52,relation:53,NOTE_FOR:54,noteText:55,NOTE:56,CLASSDEF:57,classList:58,stylesOpt:59,ALPHA:60,COMMA:61,direction_tb:62,direction_bt:63,direction_rl:64,direction_lr:65,relationType:66,lineType:67,AGGREGATION:68,EXTENSION:69,COMPOSITION:70,DEPENDENCY:71,LOLLIPOP:72,LINE:73,DOTTED_LINE:74,CALLBACK:75,LINK:76,LINK_TARGET:77,CLICK:78,CALLBACK_NAME:79,CALLBACK_ARGS:80,HREF:81,STYLE:82,CSSCLASS:83,style:84,styleComponent:85,NUM:86,COLON:87,UNIT:88,BRKT:89,PCT:90,commentToken:91,textToken:92,graphCodeTokens:93,textNoTagsToken:94,TAGSTART:95,TAGEND:96,"==":97,"--":98,DEFAULT:99,MINUS:100,keywords:101,UNICODE_TEXT:102,BQUOTE_STR:103,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",18:"DOT",20:"GENERICTYPE",22:"LABEL",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",39:"STRUCT_START",41:"STRUCT_STOP",42:"NAMESPACE",44:"STYLE_SEPARATOR",46:"ANNOTATION_START",47:"ANNOTATION_END",48:"CLASS",50:"SPACE",51:"MEMBER",52:"SEPARATOR",54:"NOTE_FOR",56:"NOTE",57:"CLASSDEF",60:"ALPHA",61:"COMMA",62:"direction_tb",63:"direction_bt",64:"direction_rl",65:"direction_lr",68:"AGGREGATION",69:"EXTENSION",70:"COMPOSITION",71:"DEPENDENCY",72:"LOLLIPOP",73:"LINE",74:"DOTTED_LINE",75:"CALLBACK",76:"LINK",77:"LINK_TARGET",78:"CLICK",79:"CALLBACK_NAME",80:"CALLBACK_ARGS",81:"HREF",82:"STYLE",83:"CSSCLASS",86:"NUM",87:"COLON",88:"UNIT",89:"BRKT",90:"PCT",93:"graphCodeTokens",95:"TAGSTART",96:"TAGEND",97:"==",98:"--",99:"DEFAULT",100:"MINUS",101:"keywords",102:"UNICODE_TEXT",103:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,1],[15,3],[15,2],[19,1],[19,3],[19,1],[19,2],[19,2],[19,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[38,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,3],[24,6],[24,4],[24,7],[24,6],[43,2],[43,3],[49,0],[49,2],[49,2],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[58,1],[58,3],[32,1],[32,1],[32,1],[32,1],[53,3],[53,2],[53,2],[53,1],[66,1],[66,1],[66,1],[66,1],[66,1],[67,1],[67,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[59,1],[59,3],[84,1],[84,2],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[91,1],[91,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[94,1],[94,1],[94,1],[94,1],[16,1],[16,1],[16,1],[16,1],[17,1],[55,1]],performAction:f(function(o,h,p,l,C,e,J){var s=e.length-1;switch(C){case 8:this.$=e[s-1];break;case 9:case 10:case 13:case 15:this.$=e[s];break;case 11:case 14:this.$=e[s-2]+"."+e[s];break;case 12:case 16:this.$=e[s-1]+e[s];break;case 17:case 18:this.$=e[s-1]+"~"+e[s]+"~";break;case 19:l.addRelation(e[s]);break;case 20:e[s-1].title=l.cleanupLabel(e[s]),l.addRelation(e[s-1]);break;case 31:this.$=e[s].trim(),l.setAccTitle(this.$);break;case 32:case 33:this.$=e[s].trim(),l.setAccDescription(this.$);break;case 34:l.addClassesToNamespace(e[s-3],e[s-1][0],e[s-1][1]),l.popNamespace();break;case 35:l.addClassesToNamespace(e[s-4],e[s-1][0],e[s-1][1]),l.popNamespace();break;case 36:this.$=l.addNamespace(e[s]);break;case 37:this.$=l.addNamespace(e[s-1],e[s]);break;case 38:this.$=[[e[s]],[]];break;case 39:this.$=[[e[s-1]],[]];break;case 40:e[s][0].unshift(e[s-2]),this.$=e[s];break;case 41:this.$=[[],[e[s]]];break;case 42:this.$=[[],[e[s-1]]];break;case 43:e[s][1].unshift(e[s-2]),this.$=e[s];break;case 44:case 45:this.$=[[],[]];break;case 46:this.$=e[s];break;case 48:l.setCssClass(e[s-2],e[s]);break;case 49:l.addMembers(e[s-3],e[s-1]);break;case 51:l.setCssClass(e[s-5],e[s-3]),l.addMembers(e[s-5],e[s-1]);break;case 52:l.addAnnotation(e[s-3],e[s-1]);break;case 53:l.addAnnotation(e[s-6],e[s-4]),l.addMembers(e[s-6],e[s-1]);break;case 54:l.addAnnotation(e[s-5],e[s-3]);break;case 55:this.$=e[s],l.addClass(e[s]);break;case 56:this.$=e[s-1],l.addClass(e[s-1]),l.setClassLabel(e[s-1],e[s]);break;case 60:l.addAnnotation(e[s],e[s-2]);break;case 61:case 74:this.$=[e[s]];break;case 62:e[s].push(e[s-1]),this.$=e[s];break;case 63:break;case 64:l.addMember(e[s-1],l.cleanupLabel(e[s]));break;case 65:break;case 66:break;case 67:this.$={id1:e[s-2],id2:e[s],relation:e[s-1],relationTitle1:"none",relationTitle2:"none"};break;case 68:this.$={id1:e[s-3],id2:e[s],relation:e[s-1],relationTitle1:e[s-2],relationTitle2:"none"};break;case 69:this.$={id1:e[s-3],id2:e[s],relation:e[s-2],relationTitle1:"none",relationTitle2:e[s-1]};break;case 70:this.$={id1:e[s-4],id2:e[s],relation:e[s-2],relationTitle1:e[s-3],relationTitle2:e[s-1]};break;case 71:this.$=l.addNote(e[s],e[s-1]);break;case 72:this.$=l.addNote(e[s]);break;case 73:this.$=e[s-2],l.defineClass(e[s-1],e[s]);break;case 75:this.$=e[s-2].concat([e[s]]);break;case 76:l.setDirection("TB");break;case 77:l.setDirection("BT");break;case 78:l.setDirection("RL");break;case 79:l.setDirection("LR");break;case 80:this.$={type1:e[s-2],type2:e[s],lineType:e[s-1]};break;case 81:this.$={type1:"none",type2:e[s],lineType:e[s-1]};break;case 82:this.$={type1:e[s-1],type2:"none",lineType:e[s]};break;case 83:this.$={type1:"none",type2:"none",lineType:e[s]};break;case 84:this.$=l.relationType.AGGREGATION;break;case 85:this.$=l.relationType.EXTENSION;break;case 86:this.$=l.relationType.COMPOSITION;break;case 87:this.$=l.relationType.DEPENDENCY;break;case 88:this.$=l.relationType.LOLLIPOP;break;case 89:this.$=l.lineType.LINE;break;case 90:this.$=l.lineType.DOTTED_LINE;break;case 91:case 97:this.$=e[s-2],l.setClickEvent(e[s-1],e[s]);break;case 92:case 98:this.$=e[s-3],l.setClickEvent(e[s-2],e[s-1]),l.setTooltip(e[s-2],e[s]);break;case 93:this.$=e[s-2],l.setLink(e[s-1],e[s]);break;case 94:this.$=e[s-3],l.setLink(e[s-2],e[s-1],e[s]);break;case 95:this.$=e[s-3],l.setLink(e[s-2],e[s-1]),l.setTooltip(e[s-2],e[s]);break;case 96:this.$=e[s-4],l.setLink(e[s-3],e[s-2],e[s]),l.setTooltip(e[s-3],e[s-1]);break;case 99:this.$=e[s-3],l.setClickEvent(e[s-2],e[s-1],e[s]);break;case 100:this.$=e[s-4],l.setClickEvent(e[s-3],e[s-2],e[s-1]),l.setTooltip(e[s-3],e[s]);break;case 101:this.$=e[s-3],l.setLink(e[s-2],e[s]);break;case 102:this.$=e[s-4],l.setLink(e[s-3],e[s-1],e[s]);break;case 103:this.$=e[s-4],l.setLink(e[s-3],e[s-1]),l.setTooltip(e[s-3],e[s]);break;case 104:this.$=e[s-5],l.setLink(e[s-4],e[s-2],e[s]),l.setTooltip(e[s-4],e[s-1]);break;case 105:this.$=e[s-2],l.setCssStyle(e[s-1],e[s]);break;case 106:l.setCssClass(e[s-1],e[s]);break;case 107:this.$=[e[s]];break;case 108:e[s-2].push(e[s]),this.$=e[s-2];break;case 110:this.$=e[s-1]+e[s];break}},"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:i,35:a,37:n,38:22,42:r,43:23,46:c,48:u,51:d,52:m,54:g,56:N,57:Ae,60:b,62:fe,63:ge,64:me,65:Ce,75:be,76:ke,78:Ee,82:Te,83:ye,86:k,100:E,102:T,103:y},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},t(De,[2,5],{8:[1,48]}),{8:[1,49]},t(A,[2,19],{22:[1,50]}),t(A,[2,21]),t(A,[2,22]),t(A,[2,23]),t(A,[2,24]),t(A,[2,25]),t(A,[2,26]),t(A,[2,27]),t(A,[2,28]),t(A,[2,29]),t(A,[2,30]),{34:[1,51]},{36:[1,52]},t(A,[2,33]),t(A,[2,63],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:Z,69:$,70:ee,71:te,72:se,73:Fe,74:Be}),{39:[1,65]},t(_,[2,47],{39:[1,67],44:[1,66],46:[1,68]}),t(A,[2,65]),t(A,[2,66]),{16:69,60:b,86:k,100:E,102:T},{16:39,17:40,19:70,60:b,86:k,100:E,102:T,103:y},{16:39,17:40,19:71,60:b,86:k,100:E,102:T,103:y},{16:39,17:40,19:72,60:b,86:k,100:E,102:T,103:y},{60:[1,73]},{13:[1,74]},{16:39,17:40,19:75,60:b,86:k,100:E,102:T,103:y},{13:Pe,55:76},{58:78,60:[1,79]},t(A,[2,76]),t(A,[2,77]),t(A,[2,78]),t(A,[2,79]),t(M,[2,13],{16:39,17:40,19:81,18:[1,80],20:[1,82],60:b,86:k,100:E,102:T,103:y}),t(M,[2,15],{20:[1,83]}),{15:84,16:85,17:86,60:b,86:k,100:E,102:T,103:y},{16:39,17:40,19:87,60:b,86:k,100:E,102:T,103:y},t(ie,[2,133]),t(ie,[2,134]),t(ie,[2,135]),t(ie,[2,136]),t([1,8,9,12,13,20,22,39,41,44,46,68,69,70,71,72,73,74,79,81],[2,137]),t(De,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,19:21,38:22,43:23,16:39,17:40,5:88,33:i,35:a,37:n,42:r,46:c,48:u,51:d,52:m,54:g,56:N,57:Ae,60:b,62:fe,63:ge,64:me,65:Ce,75:be,76:ke,78:Ee,82:Te,83:ye,86:k,100:E,102:T,103:y}),{5:89,10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:i,35:a,37:n,38:22,42:r,43:23,46:c,48:u,51:d,52:m,54:g,56:N,57:Ae,60:b,62:fe,63:ge,64:me,65:Ce,75:be,76:ke,78:Ee,82:Te,83:ye,86:k,100:E,102:T,103:y},t(A,[2,20]),t(A,[2,31]),t(A,[2,32]),{13:[1,91],16:39,17:40,19:90,60:b,86:k,100:E,102:T,103:y},{53:92,66:56,67:57,68:Z,69:$,70:ee,71:te,72:se,73:Fe,74:Be},t(A,[2,64]),{67:93,73:Fe,74:Be},t(ae,[2,83],{66:94,68:Z,69:$,70:ee,71:te,72:se}),t(U,[2,84]),t(U,[2,85]),t(U,[2,86]),t(U,[2,87]),t(U,[2,88]),t(Me,[2,89]),t(Me,[2,90]),{8:[1,96],23:99,24:97,30:98,38:22,40:95,42:r,43:23,48:u,54:g,56:N},{16:100,60:b,86:k,100:E,102:T},{41:[1,102],45:101,51:ne},{16:104,60:b,86:k,100:E,102:T},{47:[1,105]},{13:[1,106]},{13:[1,107]},{79:[1,108],81:[1,109]},{22:z,50:Y,59:110,60:K,82:W,84:111,85:112,86:Q,87:j,88:X,89:q,90:H},{60:[1,122]},{13:Pe,55:123},t(_,[2,72]),t(_,[2,138]),{22:z,50:Y,59:124,60:K,61:[1,125],82:W,84:111,85:112,86:Q,87:j,88:X,89:q,90:H},t(Re,[2,74]),{16:39,17:40,19:126,60:b,86:k,100:E,102:T,103:y},t(M,[2,16]),t(M,[2,17]),t(M,[2,18]),{11:127,12:Ge,39:[2,36]},t(re,[2,9],{16:85,17:86,15:130,18:[1,129],60:b,86:k,100:E,102:T,103:y}),t(re,[2,10]),t(_e,[2,55],{11:131,12:Ge}),t(De,[2,7]),{9:[1,132]},t(ue,[2,67]),{16:39,17:40,19:133,60:b,86:k,100:E,102:T,103:y},{13:[1,135],16:39,17:40,19:134,60:b,86:k,100:E,102:T,103:y},t(ae,[2,82],{66:136,68:Z,69:$,70:ee,71:te,72:se}),t(ae,[2,81]),{41:[1,137]},{23:99,24:97,30:98,38:22,40:138,42:r,43:23,48:u,54:g,56:N},{8:[1,139],41:[2,38]},{8:[1,140],41:[2,41]},{8:[1,141],41:[2,44]},t(_,[2,48],{39:[1,142]}),{41:[1,143]},t(_,[2,50]),{41:[2,61],45:144,51:ne},{47:[1,145]},{16:39,17:40,19:146,60:b,86:k,100:E,102:T,103:y},t(A,[2,91],{13:[1,147]}),t(A,[2,93],{13:[1,149],77:[1,148]}),t(A,[2,97],{13:[1,150],80:[1,151]}),{13:[1,152]},t(A,[2,105],{61:Ue}),t(ze,[2,107],{85:154,22:z,50:Y,60:K,82:W,86:Q,87:j,88:X,89:q,90:H}),t(x,[2,109]),t(x,[2,111]),t(x,[2,112]),t(x,[2,113]),t(x,[2,114]),t(x,[2,115]),t(x,[2,116]),t(x,[2,117]),t(x,[2,118]),t(x,[2,119]),t(A,[2,106]),t(_,[2,71]),t(A,[2,73],{61:Ue}),{60:[1,155]},t(M,[2,14]),{39:[2,37]},{13:[1,156]},{15:157,16:85,17:86,60:b,86:k,100:E,102:T,103:y},t(re,[2,12]),t(_e,[2,56]),{1:[2,4]},t(ue,[2,69]),t(ue,[2,68]),{16:39,17:40,19:158,60:b,86:k,100:E,102:T,103:y},t(ae,[2,80]),t(_,[2,34]),{41:[1,159]},{23:99,24:97,30:98,38:22,40:160,41:[2,39],42:r,43:23,48:u,54:g,56:N},{23:99,24:97,30:98,38:22,40:161,41:[2,42],42:r,43:23,48:u,54:g,56:N},{23:99,24:97,30:98,38:22,40:162,41:[2,45],42:r,43:23,48:u,54:g,56:N},{45:163,51:ne},t(_,[2,49]),{41:[2,62]},t(_,[2,52],{39:[1,164]}),t(A,[2,60]),t(A,[2,92]),t(A,[2,94]),t(A,[2,95],{77:[1,165]}),t(A,[2,98]),t(A,[2,99],{13:[1,166]}),t(A,[2,101],{13:[1,168],77:[1,167]}),{22:z,50:Y,60:K,82:W,84:169,85:112,86:Q,87:j,88:X,89:q,90:H},t(x,[2,110]),t(Re,[2,75]),{14:[1,170]},t(re,[2,11]),t(ue,[2,70]),t(_,[2,35]),{41:[2,40]},{41:[2,43]},{41:[2,46]},{41:[1,171]},{41:[1,173],45:172,51:ne},t(A,[2,96]),t(A,[2,100]),t(A,[2,102]),t(A,[2,103],{77:[1,174]}),t(ze,[2,108],{85:154,22:z,50:Y,60:K,82:W,86:Q,87:j,88:X,89:q,90:H}),t(_e,[2,8]),t(_,[2,51]),{41:[1,175]},t(_,[2,54]),t(A,[2,104]),t(_,[2,53])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],127:[2,37],132:[2,4],144:[2,62],160:[2,40],161:[2,43],162:[2,46]},parseError:f(function(o,h){if(h.recoverable)this.trace(o);else{var p=new Error(o);throw p.hash=h,p}},"parseError"),parse:f(function(o){var h=this,p=[0],l=[],C=[null],e=[],J=this.table,s="",ce=0,Ye=0,Je=2,Ke=1,Ze=e.slice.call(arguments,1),D=Object.create(this.lexer),w={yy:{}};for(var Ne in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ne)&&(w.yy[Ne]=this.yy[Ne]);D.setInput(o,w.yy),w.yy.lexer=D,w.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var Le=D.yylloc;e.push(Le);var $e=D.options&&D.options.ranges;typeof w.yy.parseError=="function"?this.parseError=w.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function et(S){p.length=p.length-2*S,C.length=C.length-S,e.length=e.length-S}f(et,"popStack");function We(){var S;return S=l.pop()||D.lex()||Ke,typeof S!="number"&&(S instanceof Array&&(l=S,S=l.pop()),S=h.symbols_[S]||S),S}f(We,"lex");for(var B,V,L,xe,R={},oe,v,Qe,he;;){if(V=p[p.length-1],this.defaultActions[V]?L=this.defaultActions[V]:((B===null||typeof B>"u")&&(B=We()),L=J[V]&&J[V][B]),typeof L>"u"||!L.length||!L[0]){var ve="";he=[];for(oe in J[V])this.terminals_[oe]&&oe>Je&&he.push("'"+this.terminals_[oe]+"'");D.showPosition?ve="Parse error on line "+(ce+1)+`: `+D.showPosition()+` Expecting `+he.join(", ")+", got '"+(this.terminals_[B]||B)+"'":ve="Parse error on line "+(ce+1)+": Unexpected "+(B==Ke?"end of input":"'"+(this.terminals_[B]||B)+"'"),this.parseError(ve,{text:D.match,token:this.terminals_[B]||B,line:D.yylineno,loc:Le,expected:he})}if(L[0]instanceof Array&&L.length>1)throw new Error("Parse Error: multiple actions possible at state: "+V+", token: "+B);switch(L[0]){case 1:p.push(B),C.push(D.yytext),e.push(D.yylloc),p.push(L[1]),B=null,Ye=D.yyleng,s=D.yytext,ce=D.yylineno,Le=D.yylloc;break;case 2:if(v=this.productions_[L[1]][1],R.$=C[C.length-v],R._$={first_line:e[e.length-(v||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(v||1)].first_column,last_column:e[e.length-1].last_column},$e&&(R._$.range=[e[e.length-(v||1)].range[0],e[e.length-1].range[1]]),xe=this.performAction.apply(R,[s,Ye,ce,w.yy,L[1],C,e].concat(Ze)),typeof xe<"u")return xe;v&&(p=p.slice(0,-1*v*2),C=C.slice(0,-1*v),e=e.slice(0,-1*v)),p.push(this.productions_[L[1]][0]),C.push(R.$),e.push(R._$),Qe=J[p[p.length-2]][p[p.length-1]],p.push(Qe);break;case 3:return!0}}return!0},"parse")},He=(function(){var O={EOF:1,parseError:f(function(h,p){if(this.yy.parser)this.yy.parser.parseError(h,p);else throw new Error(h)},"parseError"),setInput:f(function(o,h){return this.yy=h||this.yy||{},this._input=o,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:f(function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var h=o.match(/(?:\r\n?|\n).*/g);return h?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},"input"),unput:f(function(o){var h=o.length,p=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-h),this.offset-=h;var l=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),p.length-1&&(this.yylineno-=p.length-1);var C=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:p?(p.length===l.length?this.yylloc.first_column:0)+l[l.length-p.length].length-p[0].length:this.yylloc.first_column-h},this.options.ranges&&(this.yylloc.range=[C[0],C[0]+this.yyleng-h]),this.yyleng=this.yytext.length,this},"unput"),more:f(function(){return this._more=!0,this},"more"),reject:f(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). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:f(function(o){this.unput(this.match.slice(o))},"less"),pastInput:f(function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:f(function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:f(function(){var o=this.pastInput(),h=new Array(o.length+1).join("-");return o+this.upcomingInput()+` diff --git a/apps/kimi-code/dist-web/assets/chunk-VR4S4FIN-Cveor6Gg.js b/apps/kimi-code/dist-web/assets/chunk-VR4S4FIN-he8WxbY-.js similarity index 87% rename from apps/kimi-code/dist-web/assets/chunk-VR4S4FIN-Cveor6Gg.js rename to apps/kimi-code/dist-web/assets/chunk-VR4S4FIN-he8WxbY-.js index ed66f2d90f..0fd0e5f398 100644 --- a/apps/kimi-code/dist-web/assets/chunk-VR4S4FIN-Cveor6Gg.js +++ b/apps/kimi-code/dist-web/assets/chunk-VR4S4FIN-he8WxbY-.js @@ -1 +1 @@ -import{_ as a,e as w,l as x}from"./mermaid.core-BMAf1qng.js";var d=a((e,t,i,r)=>{e.attr("class",i);const{width:o,height:h,x:n,y:c}=u(e,t);w(e,h,o,r);const s=l(n,c,o,h,t);e.attr("viewBox",s),x.debug(`viewBox configured: ${s} with padding: ${t}`)},"setupViewPortForSVG"),u=a((e,t)=>{const i=e.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:i.width+t*2,height:i.height+t*2,x:i.x,y:i.y}},"calculateDimensionsWithPadding"),l=a((e,t,i,r,o)=>`${e-o} ${t-o} ${i} ${r}`,"createViewBox");export{d as s}; +import{_ as a,e as w,l as x}from"./mermaid.core-Cahi9cr1.js";var d=a((e,t,i,r)=>{e.attr("class",i);const{width:o,height:h,x:n,y:c}=u(e,t);w(e,h,o,r);const s=l(n,c,o,h,t);e.attr("viewBox",s),x.debug(`viewBox configured: ${s} with padding: ${t}`)},"setupViewPortForSVG"),u=a((e,t)=>{const i=e.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:i.width+t*2,height:i.height+t*2,x:i.x,y:i.y}},"calculateDimensionsWithPadding"),l=a((e,t,i,r,o)=>`${e-o} ${t-o} ${i} ${r}`,"createViewBox");export{d as s}; diff --git a/apps/kimi-code/dist-web/assets/chunk-XXDRQBXY-CcyRETTg.js b/apps/kimi-code/dist-web/assets/chunk-XXDRQBXY-BmzWd-kT.js similarity index 72% rename from apps/kimi-code/dist-web/assets/chunk-XXDRQBXY-CcyRETTg.js rename to apps/kimi-code/dist-web/assets/chunk-XXDRQBXY-BmzWd-kT.js index e719db4927..d22960aaf6 100644 --- a/apps/kimi-code/dist-web/assets/chunk-XXDRQBXY-CcyRETTg.js +++ b/apps/kimi-code/dist-web/assets/chunk-XXDRQBXY-BmzWd-kT.js @@ -1 +1 @@ -import{_ as a,d as o}from"./mermaid.core-BMAf1qng.js";var d=a((t,e)=>{let n;return e==="sandbox"&&(n=o("#i"+t)),(e==="sandbox"?o(n.nodes()[0].contentDocument.body):o("body")).select(`[id="${t}"]`)},"getDiagramElement");export{d as g}; +import{_ as a,d as o}from"./mermaid.core-Cahi9cr1.js";var d=a((t,e)=>{let n;return e==="sandbox"&&(n=o("#i"+t)),(e==="sandbox"?o(n.nodes()[0].contentDocument.body):o("body")).select(`[id="${t}"]`)},"getDiagramElement");export{d as g}; diff --git a/apps/kimi-code/dist-web/assets/classDiagram-OUVF2IWQ-DSlPMBy0.js b/apps/kimi-code/dist-web/assets/classDiagram-OUVF2IWQ-DSlPMBy0.js deleted file mode 100644 index 299250628d..0000000000 --- a/apps/kimi-code/dist-web/assets/classDiagram-OUVF2IWQ-DSlPMBy0.js +++ /dev/null @@ -1 +0,0 @@ -import{s as a,c as s,a as e,C as t}from"./chunk-V7JOEXUC-DIDk-4Yh.js";import{_ as i}from"./mermaid.core-BMAf1qng.js";import"./chunk-5VM5RSS4-DNp0lB9r.js";import"./chunk-XXDRQBXY-CcyRETTg.js";import"./chunk-VR4S4FIN-Cveor6Gg.js";import"./chunk-32BRIVSS-D2R4swWR.js";import"./index-B-HzRssS.js";import"./_commonjsHelpers-CqkleIqs.js";var f={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{f as diagram}; diff --git a/apps/kimi-code/dist-web/assets/classDiagram-OUVF2IWQ-FzVd5qC_.js b/apps/kimi-code/dist-web/assets/classDiagram-OUVF2IWQ-FzVd5qC_.js new file mode 100644 index 0000000000..51d71a408e --- /dev/null +++ b/apps/kimi-code/dist-web/assets/classDiagram-OUVF2IWQ-FzVd5qC_.js @@ -0,0 +1 @@ +import{s as a,c as s,a as e,C as t}from"./chunk-V7JOEXUC-DjiRieSh.js";import{_ as i}from"./mermaid.core-Cahi9cr1.js";import"./chunk-5VM5RSS4-CfD0Yt-O.js";import"./chunk-XXDRQBXY-BmzWd-kT.js";import"./chunk-VR4S4FIN-he8WxbY-.js";import"./chunk-32BRIVSS-DAsxL712.js";import"./index-HRJ6xRtC.js";import"./_commonjsHelpers-CqkleIqs.js";var f={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{f as diagram}; diff --git a/apps/kimi-code/dist-web/assets/classDiagram-v2-EOCWNBFH-DSlPMBy0.js b/apps/kimi-code/dist-web/assets/classDiagram-v2-EOCWNBFH-DSlPMBy0.js deleted file mode 100644 index 299250628d..0000000000 --- a/apps/kimi-code/dist-web/assets/classDiagram-v2-EOCWNBFH-DSlPMBy0.js +++ /dev/null @@ -1 +0,0 @@ -import{s as a,c as s,a as e,C as t}from"./chunk-V7JOEXUC-DIDk-4Yh.js";import{_ as i}from"./mermaid.core-BMAf1qng.js";import"./chunk-5VM5RSS4-DNp0lB9r.js";import"./chunk-XXDRQBXY-CcyRETTg.js";import"./chunk-VR4S4FIN-Cveor6Gg.js";import"./chunk-32BRIVSS-D2R4swWR.js";import"./index-B-HzRssS.js";import"./_commonjsHelpers-CqkleIqs.js";var f={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{f as diagram}; diff --git a/apps/kimi-code/dist-web/assets/classDiagram-v2-EOCWNBFH-FzVd5qC_.js b/apps/kimi-code/dist-web/assets/classDiagram-v2-EOCWNBFH-FzVd5qC_.js new file mode 100644 index 0000000000..51d71a408e --- /dev/null +++ b/apps/kimi-code/dist-web/assets/classDiagram-v2-EOCWNBFH-FzVd5qC_.js @@ -0,0 +1 @@ +import{s as a,c as s,a as e,C as t}from"./chunk-V7JOEXUC-DjiRieSh.js";import{_ as i}from"./mermaid.core-Cahi9cr1.js";import"./chunk-5VM5RSS4-CfD0Yt-O.js";import"./chunk-XXDRQBXY-BmzWd-kT.js";import"./chunk-VR4S4FIN-he8WxbY-.js";import"./chunk-32BRIVSS-DAsxL712.js";import"./index-HRJ6xRtC.js";import"./_commonjsHelpers-CqkleIqs.js";var f={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{f as diagram}; diff --git a/apps/kimi-code/dist-web/assets/cose-bilkent-JH36ORCC-QGxEehq4.js b/apps/kimi-code/dist-web/assets/cose-bilkent-JH36ORCC-B4N3AGR7.js similarity index 99% rename from apps/kimi-code/dist-web/assets/cose-bilkent-JH36ORCC-QGxEehq4.js rename to apps/kimi-code/dist-web/assets/cose-bilkent-JH36ORCC-B4N3AGR7.js index 664d010f7f..e161ae8ee8 100644 --- a/apps/kimi-code/dist-web/assets/cose-bilkent-JH36ORCC-QGxEehq4.js +++ b/apps/kimi-code/dist-web/assets/cose-bilkent-JH36ORCC-B4N3AGR7.js @@ -1 +1 @@ -import{_ as V,l as k,d as lt}from"./mermaid.core-BMAf1qng.js";import{c as tt}from"./cytoscape.esm-OyMbaexL.js";import{g as gt}from"./_commonjsHelpers-CqkleIqs.js";import"./index-B-HzRssS.js";var Z={exports:{}},$={exports:{}},Q={exports:{}},ut=Q.exports,j;function ft(){return j||(j=1,(function(G,b){(function(I,L){G.exports=L()})(ut,function(){return(function(N){var I={};function L(o){if(I[o])return I[o].exports;var e=I[o]={i:o,l:!1,exports:{}};return N[o].call(e.exports,e,e.exports,L),e.l=!0,e.exports}return L.m=N,L.c=I,L.i=function(o){return o},L.d=function(o,e,t){L.o(o,e)||Object.defineProperty(o,e,{configurable:!1,enumerable:!0,get:t})},L.n=function(o){var e=o&&o.__esModule?function(){return o.default}:function(){return o};return L.d(e,"a",e),e},L.o=function(o,e){return Object.prototype.hasOwnProperty.call(o,e)},L.p="",L(L.s=26)})([(function(N,I,L){function o(){}o.QUALITY=1,o.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,o.DEFAULT_INCREMENTAL=!1,o.DEFAULT_ANIMATION_ON_LAYOUT=!0,o.DEFAULT_ANIMATION_DURING_LAYOUT=!1,o.DEFAULT_ANIMATION_PERIOD=50,o.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,o.DEFAULT_GRAPH_MARGIN=15,o.NODE_DIMENSIONS_INCLUDE_LABELS=!1,o.SIMPLE_NODE_SIZE=40,o.SIMPLE_NODE_HALF_SIZE=o.SIMPLE_NODE_SIZE/2,o.EMPTY_COMPOUND_NODE_SIZE=40,o.MIN_EDGE_LENGTH=1,o.WORLD_BOUNDARY=1e6,o.INITIAL_WORLD_BOUNDARY=o.WORLD_BOUNDARY/1e3,o.WORLD_CENTER_X=1200,o.WORLD_CENTER_Y=900,N.exports=o}),(function(N,I,L){var o=L(2),e=L(8),t=L(9);function i(g,n,d){o.call(this,d),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=d,this.bendpoints=[],this.source=g,this.target=n}i.prototype=Object.create(o.prototype);for(var l in o)i[l]=o[l];i.prototype.getSource=function(){return this.source},i.prototype.getTarget=function(){return this.target},i.prototype.isInterGraph=function(){return this.isInterGraph},i.prototype.getLength=function(){return this.length},i.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},i.prototype.getBendpoints=function(){return this.bendpoints},i.prototype.getLca=function(){return this.lca},i.prototype.getSourceInLca=function(){return this.sourceInLca},i.prototype.getTargetInLca=function(){return this.targetInLca},i.prototype.getOtherEnd=function(g){if(this.source===g)return this.target;if(this.target===g)return this.source;throw"Node is not incident with this edge"},i.prototype.getOtherEndInGraph=function(g,n){for(var d=this.getOtherEnd(g),r=n.getGraphManager().getRoot();;){if(d.getOwner()==n)return d;if(d.getOwner()==r)break;d=d.getOwner().getParent()}return null},i.prototype.updateLength=function(){var g=new Array(4);this.isOverlapingSourceAndTarget=e.getIntersection(this.target.getRect(),this.source.getRect(),g),this.isOverlapingSourceAndTarget||(this.lengthX=g[0]-g[2],this.lengthY=g[1]-g[3],Math.abs(this.lengthX)<1&&(this.lengthX=t.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=t.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},i.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=t.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=t.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},N.exports=i}),(function(N,I,L){function o(e){this.vGraphObject=e}N.exports=o}),(function(N,I,L){var o=L(2),e=L(10),t=L(13),i=L(0),l=L(16),g=L(4);function n(r,h,a,p){a==null&&p==null&&(p=h),o.call(this,p),r.graphManager!=null&&(r=r.graphManager),this.estimatedSize=e.MIN_VALUE,this.inclusionTreeDepth=e.MAX_VALUE,this.vGraphObject=p,this.edges=[],this.graphManager=r,a!=null&&h!=null?this.rect=new t(h.x,h.y,a.width,a.height):this.rect=new t}n.prototype=Object.create(o.prototype);for(var d in o)n[d]=o[d];n.prototype.getEdges=function(){return this.edges},n.prototype.getChild=function(){return this.child},n.prototype.getOwner=function(){return this.owner},n.prototype.getWidth=function(){return this.rect.width},n.prototype.setWidth=function(r){this.rect.width=r},n.prototype.getHeight=function(){return this.rect.height},n.prototype.setHeight=function(r){this.rect.height=r},n.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},n.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},n.prototype.getCenter=function(){return new g(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},n.prototype.getLocation=function(){return new g(this.rect.x,this.rect.y)},n.prototype.getRect=function(){return this.rect},n.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},n.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},n.prototype.setRect=function(r,h){this.rect.x=r.x,this.rect.y=r.y,this.rect.width=h.width,this.rect.height=h.height},n.prototype.setCenter=function(r,h){this.rect.x=r-this.rect.width/2,this.rect.y=h-this.rect.height/2},n.prototype.setLocation=function(r,h){this.rect.x=r,this.rect.y=h},n.prototype.moveBy=function(r,h){this.rect.x+=r,this.rect.y+=h},n.prototype.getEdgeListToNode=function(r){var h=[],a=this;return a.edges.forEach(function(p){if(p.target==r){if(p.source!=a)throw"Incorrect edge source!";h.push(p)}}),h},n.prototype.getEdgesBetween=function(r){var h=[],a=this;return a.edges.forEach(function(p){if(!(p.source==a||p.target==a))throw"Incorrect edge source and/or target";(p.target==r||p.source==r)&&h.push(p)}),h},n.prototype.getNeighborsList=function(){var r=new Set,h=this;return h.edges.forEach(function(a){if(a.source==h)r.add(a.target);else{if(a.target!=h)throw"Incorrect incidency!";r.add(a.source)}}),r},n.prototype.withChildren=function(){var r=new Set,h,a;if(r.add(this),this.child!=null)for(var p=this.child.getNodes(),v=0;vh&&(this.rect.x-=(this.labelWidth-h)/2,this.setWidth(this.labelWidth)),this.labelHeight>a&&(this.labelPos=="center"?this.rect.y-=(this.labelHeight-a)/2:this.labelPos=="top"&&(this.rect.y-=this.labelHeight-a),this.setHeight(this.labelHeight))}}},n.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==e.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},n.prototype.transform=function(r){var h=this.rect.x;h>i.WORLD_BOUNDARY?h=i.WORLD_BOUNDARY:h<-i.WORLD_BOUNDARY&&(h=-i.WORLD_BOUNDARY);var a=this.rect.y;a>i.WORLD_BOUNDARY?a=i.WORLD_BOUNDARY:a<-i.WORLD_BOUNDARY&&(a=-i.WORLD_BOUNDARY);var p=new g(h,a),v=r.inverseTransformPoint(p);this.setLocation(v.x,v.y)},n.prototype.getLeft=function(){return this.rect.x},n.prototype.getRight=function(){return this.rect.x+this.rect.width},n.prototype.getTop=function(){return this.rect.y},n.prototype.getBottom=function(){return this.rect.y+this.rect.height},n.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},N.exports=n}),(function(N,I,L){function o(e,t){e==null&&t==null?(this.x=0,this.y=0):(this.x=e,this.y=t)}o.prototype.getX=function(){return this.x},o.prototype.getY=function(){return this.y},o.prototype.setX=function(e){this.x=e},o.prototype.setY=function(e){this.y=e},o.prototype.getDifference=function(e){return new DimensionD(this.x-e.x,this.y-e.y)},o.prototype.getCopy=function(){return new o(this.x,this.y)},o.prototype.translate=function(e){return this.x+=e.width,this.y+=e.height,this},N.exports=o}),(function(N,I,L){var o=L(2),e=L(10),t=L(0),i=L(6),l=L(3),g=L(1),n=L(13),d=L(12),r=L(11);function h(p,v,D){o.call(this,D),this.estimatedSize=e.MIN_VALUE,this.margin=t.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=p,v!=null&&v instanceof i?this.graphManager=v:v!=null&&v instanceof Layout&&(this.graphManager=v.graphManager)}h.prototype=Object.create(o.prototype);for(var a in o)h[a]=o[a];h.prototype.getNodes=function(){return this.nodes},h.prototype.getEdges=function(){return this.edges},h.prototype.getGraphManager=function(){return this.graphManager},h.prototype.getParent=function(){return this.parent},h.prototype.getLeft=function(){return this.left},h.prototype.getRight=function(){return this.right},h.prototype.getTop=function(){return this.top},h.prototype.getBottom=function(){return this.bottom},h.prototype.isConnected=function(){return this.isConnected},h.prototype.add=function(p,v,D){if(v==null&&D==null){var u=p;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(u)>-1)throw"Node already in graph!";return u.owner=this,this.getNodes().push(u),u}else{var T=p;if(!(this.getNodes().indexOf(v)>-1&&this.getNodes().indexOf(D)>-1))throw"Source or target not in graph!";if(!(v.owner==D.owner&&v.owner==this))throw"Both owners must be this graph!";return v.owner!=D.owner?null:(T.source=v,T.target=D,T.isInterGraph=!1,this.getEdges().push(T),v.edges.push(T),D!=v&&D.edges.push(T),T)}},h.prototype.remove=function(p){var v=p;if(p instanceof l){if(v==null)throw"Node is null!";if(!(v.owner!=null&&v.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var D=v.edges.slice(),u,T=D.length,y=0;y-1&&f>-1))throw"Source and/or target doesn't know this edge!";u.source.edges.splice(s,1),u.target!=u.source&&u.target.edges.splice(f,1);var O=u.source.owner.getEdges().indexOf(u);if(O==-1)throw"Not in owner's edge list!";u.source.owner.getEdges().splice(O,1)}},h.prototype.updateLeftTop=function(){for(var p=e.MAX_VALUE,v=e.MAX_VALUE,D,u,T,y=this.getNodes(),O=y.length,s=0;sD&&(p=D),v>u&&(v=u)}return p==e.MAX_VALUE?null:(y[0].getParent().paddingLeft!=null?T=y[0].getParent().paddingLeft:T=this.margin,this.left=v-T,this.top=p-T,new d(this.left,this.top))},h.prototype.updateBounds=function(p){for(var v=e.MAX_VALUE,D=-e.MAX_VALUE,u=e.MAX_VALUE,T=-e.MAX_VALUE,y,O,s,f,c,E=this.nodes,A=E.length,m=0;my&&(v=y),Ds&&(u=s),Ty&&(v=y),Ds&&(u=s),T=this.nodes.length){var A=0;D.forEach(function(m){m.owner==p&&A++}),A==this.nodes.length&&(this.isConnected=!0)}},N.exports=h}),(function(N,I,L){var o,e=L(1);function t(i){o=L(5),this.layout=i,this.graphs=[],this.edges=[]}t.prototype.addRoot=function(){var i=this.layout.newGraph(),l=this.layout.newNode(null),g=this.add(i,l);return this.setRootGraph(g),this.rootGraph},t.prototype.add=function(i,l,g,n,d){if(g==null&&n==null&&d==null){if(i==null)throw"Graph is null!";if(l==null)throw"Parent node is null!";if(this.graphs.indexOf(i)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(i),i.parent!=null)throw"Already has a parent!";if(l.child!=null)throw"Already has a child!";return i.parent=l,l.child=i,i}else{d=g,n=l,g=i;var r=n.getOwner(),h=d.getOwner();if(!(r!=null&&r.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(h!=null&&h.getGraphManager()==this))throw"Target not in this graph mgr!";if(r==h)return g.isInterGraph=!1,r.add(g,n,d);if(g.isInterGraph=!0,g.source=n,g.target=d,this.edges.indexOf(g)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(g),!(g.source!=null&&g.target!=null))throw"Edge source and/or target is null!";if(!(g.source.edges.indexOf(g)==-1&&g.target.edges.indexOf(g)==-1))throw"Edge already in source and/or target incidency list!";return g.source.edges.push(g),g.target.edges.push(g),g}},t.prototype.remove=function(i){if(i instanceof o){var l=i;if(l.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(l==this.rootGraph||l.parent!=null&&l.parent.graphManager==this))throw"Invalid parent node!";var g=[];g=g.concat(l.getEdges());for(var n,d=g.length,r=0;r=i.getRight()?l[0]+=Math.min(i.getX()-t.getX(),t.getRight()-i.getRight()):i.getX()<=t.getX()&&i.getRight()>=t.getRight()&&(l[0]+=Math.min(t.getX()-i.getX(),i.getRight()-t.getRight())),t.getY()<=i.getY()&&t.getBottom()>=i.getBottom()?l[1]+=Math.min(i.getY()-t.getY(),t.getBottom()-i.getBottom()):i.getY()<=t.getY()&&i.getBottom()>=t.getBottom()&&(l[1]+=Math.min(t.getY()-i.getY(),i.getBottom()-t.getBottom()));var d=Math.abs((i.getCenterY()-t.getCenterY())/(i.getCenterX()-t.getCenterX()));i.getCenterY()===t.getCenterY()&&i.getCenterX()===t.getCenterX()&&(d=1);var r=d*l[0],h=l[1]/d;l[0]r)return l[0]=g,l[1]=a,l[2]=d,l[3]=E,!1;if(nd)return l[0]=h,l[1]=n,l[2]=f,l[3]=r,!1;if(gd?(l[0]=v,l[1]=D,R=!0):(l[0]=p,l[1]=a,R=!0):S===w&&(g>d?(l[0]=h,l[1]=a,R=!0):(l[0]=u,l[1]=D,R=!0)),-Y===w?d>g?(l[2]=c,l[3]=E,M=!0):(l[2]=f,l[3]=s,M=!0):Y===w&&(d>g?(l[2]=O,l[3]=s,M=!0):(l[2]=A,l[3]=E,M=!0)),R&&M)return!1;if(g>d?n>r?(x=this.getCardinalDirection(S,w,4),F=this.getCardinalDirection(Y,w,2)):(x=this.getCardinalDirection(-S,w,3),F=this.getCardinalDirection(-Y,w,1)):n>r?(x=this.getCardinalDirection(-S,w,1),F=this.getCardinalDirection(-Y,w,3)):(x=this.getCardinalDirection(S,w,2),F=this.getCardinalDirection(Y,w,4)),!R)switch(x){case 1:P=a,U=g+-y/w,l[0]=U,l[1]=P;break;case 2:U=u,P=n+T*w,l[0]=U,l[1]=P;break;case 3:P=D,U=g+y/w,l[0]=U,l[1]=P;break;case 4:U=v,P=n+-T*w,l[0]=U,l[1]=P;break}if(!M)switch(F){case 1:X=s,_=d+-C/w,l[2]=_,l[3]=X;break;case 2:_=A,X=r+m*w,l[2]=_,l[3]=X;break;case 3:X=E,_=d+C/w,l[2]=_,l[3]=X;break;case 4:_=c,X=r+-m*w,l[2]=_,l[3]=X;break}}return!1},e.getCardinalDirection=function(t,i,l){return t>i?l:1+l%4},e.getIntersection=function(t,i,l,g){if(g==null)return this.getIntersection2(t,i,l);var n=t.x,d=t.y,r=i.x,h=i.y,a=l.x,p=l.y,v=g.x,D=g.y,u=void 0,T=void 0,y=void 0,O=void 0,s=void 0,f=void 0,c=void 0,E=void 0,A=void 0;return y=h-d,s=n-r,c=r*d-n*h,O=D-p,f=a-v,E=v*p-a*D,A=y*f-O*s,A===0?null:(u=(s*E-f*c)/A,T=(O*c-y*E)/A,new o(u,T))},e.angleOfVector=function(t,i,l,g){var n=void 0;return t!==l?(n=Math.atan((g-i)/(l-t)),l0?1:e<0?-1:0},o.floor=function(e){return e<0?Math.ceil(e):Math.floor(e)},o.ceil=function(e){return e<0?Math.floor(e):Math.ceil(e)},N.exports=o}),(function(N,I,L){function o(){}o.MAX_VALUE=2147483647,o.MIN_VALUE=-2147483648,N.exports=o}),(function(N,I,L){var o=(function(){function n(d,r){for(var h=0;h"u"?"undefined":o(t);return t==null||i!="object"&&i!="function"},N.exports=e}),(function(N,I,L){function o(a){if(Array.isArray(a)){for(var p=0,v=Array(a.length);p0&&p;){for(y.push(s[0]);y.length>0&&p;){var f=y[0];y.splice(0,1),T.add(f);for(var c=f.getEdges(),u=0;u-1&&s.splice(C,1)}T=new Set,O=new Map}}return a},h.prototype.createDummyNodesForBendpoints=function(a){for(var p=[],v=a.source,D=this.graphManager.calcLowestCommonAncestor(a.source,a.target),u=0;u0){for(var D=this.edgeToDummyNodes.get(v),u=0;u=0&&p.splice(E,1);var A=O.getNeighborsList();A.forEach(function(R){if(v.indexOf(R)<0){var M=D.get(R),S=M-1;S==1&&f.push(R),D.set(R,S)}})}v=v.concat(f),(p.length==1||p.length==2)&&(u=!0,T=p[0])}return T},h.prototype.setGraphManager=function(a){this.graphManager=a},N.exports=h}),(function(N,I,L){function o(){}o.seed=1,o.x=0,o.nextDouble=function(){return o.x=Math.sin(o.seed++)*1e4,o.x-Math.floor(o.x)},N.exports=o}),(function(N,I,L){var o=L(4);function e(t,i){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}e.prototype.getWorldOrgX=function(){return this.lworldOrgX},e.prototype.setWorldOrgX=function(t){this.lworldOrgX=t},e.prototype.getWorldOrgY=function(){return this.lworldOrgY},e.prototype.setWorldOrgY=function(t){this.lworldOrgY=t},e.prototype.getWorldExtX=function(){return this.lworldExtX},e.prototype.setWorldExtX=function(t){this.lworldExtX=t},e.prototype.getWorldExtY=function(){return this.lworldExtY},e.prototype.setWorldExtY=function(t){this.lworldExtY=t},e.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},e.prototype.setDeviceOrgX=function(t){this.ldeviceOrgX=t},e.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},e.prototype.setDeviceOrgY=function(t){this.ldeviceOrgY=t},e.prototype.getDeviceExtX=function(){return this.ldeviceExtX},e.prototype.setDeviceExtX=function(t){this.ldeviceExtX=t},e.prototype.getDeviceExtY=function(){return this.ldeviceExtY},e.prototype.setDeviceExtY=function(t){this.ldeviceExtY=t},e.prototype.transformX=function(t){var i=0,l=this.lworldExtX;return l!=0&&(i=this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/l),i},e.prototype.transformY=function(t){var i=0,l=this.lworldExtY;return l!=0&&(i=this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/l),i},e.prototype.inverseTransformX=function(t){var i=0,l=this.ldeviceExtX;return l!=0&&(i=this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/l),i},e.prototype.inverseTransformY=function(t){var i=0,l=this.ldeviceExtY;return l!=0&&(i=this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/l),i},e.prototype.inverseTransformPoint=function(t){var i=new o(this.inverseTransformX(t.x),this.inverseTransformY(t.y));return i},N.exports=e}),(function(N,I,L){function o(r){if(Array.isArray(r)){for(var h=0,a=Array(r.length);ht.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*t.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(r-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-t.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT_INCREMENTAL):(r>t.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(t.COOLING_ADAPTATION_FACTOR,1-(r-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*(1-t.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},n.prototype.calcSpringForces=function(){for(var r=this.getAllEdges(),h,a=0;a0&&arguments[0]!==void 0?arguments[0]:!0,h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a,p,v,D,u=this.getAllNodes(),T;if(this.useFRGridVariant)for(this.totalIterations%t.GRID_CALCULATION_CHECK_PERIOD==1&&r&&this.updateGrid(),T=new Set,a=0;ay||T>y)&&(r.gravitationForceX=-this.gravityConstant*v,r.gravitationForceY=-this.gravityConstant*D)):(y=h.getEstimatedSize()*this.compoundGravityRangeFactor,(u>y||T>y)&&(r.gravitationForceX=-this.gravityConstant*v*this.compoundGravityConstant,r.gravitationForceY=-this.gravityConstant*D*this.compoundGravityConstant))},n.prototype.isConverged=function(){var r,h=!1;return this.totalIterations>this.maxIterations/3&&(h=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),r=this.totalDisplacement=u.length||y>=u[0].length)){for(var O=0;On}}]),l})();N.exports=i}),(function(N,I,L){var o=(function(){function i(l,g){for(var n=0;n2&&arguments[2]!==void 0?arguments[2]:1,d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;e(this,i),this.sequence1=l,this.sequence2=g,this.match_score=n,this.mismatch_penalty=d,this.gap_penalty=r,this.iMax=l.length+1,this.jMax=g.length+1,this.grid=new Array(this.iMax);for(var h=0;h=0;l--){var g=this.listeners[l];g.event===t&&g.callback===i&&this.listeners.splice(l,1)}},e.emit=function(t,i){for(var l=0;lg.coolingFactor*g.maxNodeDisplacement&&(this.displacementX=g.coolingFactor*g.maxNodeDisplacement*t.sign(this.displacementX)),Math.abs(this.displacementY)>g.coolingFactor*g.maxNodeDisplacement&&(this.displacementY=g.coolingFactor*g.maxNodeDisplacement*t.sign(this.displacementY)),this.child==null?this.moveBy(this.displacementX,this.displacementY):this.child.getNodes().length==0?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),g.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},i.prototype.propogateDisplacementToChildren=function(g,n){for(var d=this.getChild().getNodes(),r,h=0;h0)this.positionNodesRadially(s);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var f=new Set(this.getAllNodes()),c=this.nodesWithGravity.filter(function(E){return f.has(E)});this.graphManager.setAllNodesToApplyGravitation(c),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},y.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%d.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var s=new Set(this.getAllNodes()),f=this.nodesWithGravity.filter(function(A){return s.has(A)});this.graphManager.setAllNodesToApplyGravitation(f),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var c=!this.isTreeGrowing&&!this.isGrowthFinished,E=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(c,E),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},y.prototype.getPositionsData=function(){for(var s=this.graphManager.getAllNodes(),f={},c=0;c1){var R;for(R=0;RE&&(E=Math.floor(C.y)),m=Math.floor(C.x+n.DEFAULT_COMPONENT_SEPERATION)}this.transform(new a(r.WORLD_CENTER_X-C.x/2,r.WORLD_CENTER_Y-C.y/2))},y.radialLayout=function(s,f,c){var E=Math.max(this.maxDiagonalInTree(s),n.DEFAULT_RADIAL_SEPARATION);y.branchRadialLayout(f,null,0,359,0,E);var A=u.calculateBounds(s),m=new T;m.setDeviceOrgX(A.getMinX()),m.setDeviceOrgY(A.getMinY()),m.setWorldOrgX(c.x),m.setWorldOrgY(c.y);for(var C=0;C1;){var X=_[0];_.splice(0,1);var H=w.indexOf(X);H>=0&&w.splice(H,1),U--,x--}f!=null?P=(w.indexOf(_[0])+1)%U:P=0;for(var W=Math.abs(E-c)/x,B=P;F!=x;B=++B%U){var K=w[B].getOtherEnd(s);if(K!=f){var q=(c+F*W)%360,ht=(q+W)%360;y.branchRadialLayout(K,s,q,ht,A+m,m),F++}}},y.maxDiagonalInTree=function(s){for(var f=v.MIN_VALUE,c=0;cf&&(f=A)}return f},y.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},y.prototype.groupZeroDegreeMembers=function(){var s=this,f={};this.memberGroups={},this.idToDummyNode={};for(var c=[],E=this.graphManager.getAllNodes(),A=0;A"u"&&(f[R]=[]),f[R]=f[R].concat(m)}Object.keys(f).forEach(function(M){if(f[M].length>1){var S="DummyCompound_"+M;s.memberGroups[S]=f[M];var Y=f[M][0].getParent(),w=new l(s.graphManager);w.id=S,w.paddingLeft=Y.paddingLeft||0,w.paddingRight=Y.paddingRight||0,w.paddingBottom=Y.paddingBottom||0,w.paddingTop=Y.paddingTop||0,s.idToDummyNode[S]=w;var x=s.getGraphManager().add(s.newGraph(),w),F=Y.getChild();F.add(w);for(var U=0;U=0;s--){var f=this.compoundOrder[s],c=f.id,E=f.paddingLeft,A=f.paddingTop;this.adjustLocations(this.tiledMemberPack[c],f.rect.x,f.rect.y,E,A)}},y.prototype.repopulateZeroDegreeMembers=function(){var s=this,f=this.tiledZeroDegreePack;Object.keys(f).forEach(function(c){var E=s.idToDummyNode[c],A=E.paddingLeft,m=E.paddingTop;s.adjustLocations(f[c],E.rect.x,E.rect.y,A,m)})},y.prototype.getToBeTiled=function(s){var f=s.id;if(this.toBeTiled[f]!=null)return this.toBeTiled[f];var c=s.getChild();if(c==null)return this.toBeTiled[f]=!1,!1;for(var E=c.getNodes(),A=0;A0)return this.toBeTiled[f]=!1,!1;if(m.getChild()==null){this.toBeTiled[m.id]=!1;continue}if(!this.getToBeTiled(m))return this.toBeTiled[f]=!1,!1}return this.toBeTiled[f]=!0,!0},y.prototype.getNodeDegree=function(s){s.id;for(var f=s.getEdges(),c=0,E=0;EM&&(M=Y.rect.height)}c+=M+s.verticalPadding}},y.prototype.tileCompoundMembers=function(s,f){var c=this;this.tiledMemberPack=[],Object.keys(s).forEach(function(E){var A=f[E];c.tiledMemberPack[E]=c.tileNodes(s[E],A.paddingLeft+A.paddingRight),A.rect.width=c.tiledMemberPack[E].width,A.rect.height=c.tiledMemberPack[E].height})},y.prototype.tileNodes=function(s,f){var c=n.TILING_PADDING_VERTICAL,E=n.TILING_PADDING_HORIZONTAL,A={rows:[],rowWidth:[],rowHeight:[],width:0,height:f,verticalPadding:c,horizontalPadding:E};s.sort(function(R,M){return R.rect.width*R.rect.height>M.rect.width*M.rect.height?-1:R.rect.width*R.rect.height0&&(C+=s.horizontalPadding),s.rowWidth[c]=C,s.width0&&(R+=s.verticalPadding);var M=0;R>s.rowHeight[c]&&(M=s.rowHeight[c],s.rowHeight[c]=R,M=s.rowHeight[c]-M),s.height+=M,s.rows[c].push(f)},y.prototype.getShortestRowIndex=function(s){for(var f=-1,c=Number.MAX_VALUE,E=0;Ec&&(f=E,c=s.rowWidth[E]);return f},y.prototype.canAddHorizontal=function(s,f,c){var E=this.getShortestRowIndex(s);if(E<0)return!0;var A=s.rowWidth[E];if(A+s.horizontalPadding+f<=s.width)return!0;var m=0;s.rowHeight[E]0&&(m=c+s.verticalPadding-s.rowHeight[E]);var C;s.width-A>=f+s.horizontalPadding?C=(s.height+m)/(A+f+s.horizontalPadding):C=(s.height+m)/s.width,m=c+s.verticalPadding;var R;return s.widthm&&f!=c){E.splice(-1,1),s.rows[c].push(A),s.rowWidth[f]=s.rowWidth[f]-m,s.rowWidth[c]=s.rowWidth[c]+m,s.width=s.rowWidth[instance.getLongestRowIndex(s)];for(var C=Number.MIN_VALUE,R=0;RC&&(C=E[R].height);f>0&&(C+=s.verticalPadding);var M=s.rowHeight[f]+s.rowHeight[c];s.rowHeight[f]=C,s.rowHeight[c]0)for(var F=A;F<=m;F++)x[0]+=this.grid[F][C-1].length+this.grid[F][C].length-1;if(m0)for(var F=C;F<=R;F++)x[3]+=this.grid[A-1][F].length+this.grid[A][F].length-1;for(var U=v.MAX_VALUE,P,_,X=0;X0){var R;R=T.getGraphManager().add(T.newGraph(),c),this.processChildrenList(R,f,T)}}},a.prototype.stop=function(){return this.stopped=!0,this};var v=function(u){u("layout","cose-bilkent",a)};typeof cytoscape<"u"&&v(cytoscape),I.exports=v})])})})(Z)),Z.exports}var yt=vt();const Et=gt(yt);tt.use(Et);function et(G,b){G.forEach(N=>{const I={id:N.id,labelText:N.label,height:N.height,width:N.width,padding:N.padding??0};Object.keys(N).forEach(L=>{["id","label","height","width","padding","x","y"].includes(L)||(I[L]=N[L])}),b.add({group:"nodes",data:I,position:{x:N.x??0,y:N.y??0}})})}V(et,"addNodes");function rt(G,b){G.forEach(N=>{const I={id:N.id,source:N.start,target:N.end};Object.keys(N).forEach(L=>{["id","start","end"].includes(L)||(I[L]=N[L])}),b.add({group:"edges",data:I})})}V(rt,"addEdges");function it(G){return new Promise(b=>{const N=lt("body").append("div").attr("id","cy").attr("style","display:none"),I=tt({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});N.remove(),et(G.nodes,I),rt(G.edges,I),I.nodes().forEach(function(o){o.layoutDimensions=()=>{const e=o.data();return{w:e.width,h:e.height}}});const L={name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1};I.layout(L).run(),I.ready(o=>{k.info("Cytoscape ready",o),b(I)})})}V(it,"createCytoscapeInstance");function nt(G){return G.nodes().map(b=>{const N=b.data(),I=b.position(),L={id:N.id,x:I.x,y:I.y};return Object.keys(N).forEach(o=>{o!=="id"&&(L[o]=N[o])}),L})}V(nt,"extractPositionedNodes");function ot(G){return G.edges().map(b=>{const N=b.data(),I=b._private.rscratch,L={id:N.id,source:N.source,target:N.target,startX:I.startX,startY:I.startY,midX:I.midX,midY:I.midY,endX:I.endX,endY:I.endY};return Object.keys(N).forEach(o=>{["id","source","target"].includes(o)||(L[o]=N[o])}),L})}V(ot,"extractPositionedEdges");async function st(G,b){k.debug("Starting cose-bilkent layout algorithm");try{at(G);const N=await it(G),I=nt(N),L=ot(N);return k.debug(`Layout completed: ${I.length} nodes, ${L.length} edges`),{nodes:I,edges:L}}catch(N){throw k.error("Error in cose-bilkent layout algorithm:",N),N}}V(st,"executeCoseBilkentLayout");function at(G){if(!G)throw new Error("Layout data is required");if(!G.config)throw new Error("Configuration is required in layout data");if(!G.rootNode)throw new Error("Root node is required");if(!G.nodes||!Array.isArray(G.nodes))throw new Error("No nodes found in layout data");if(!Array.isArray(G.edges))throw new Error("Edges array is required in layout data");return!0}V(at,"validateLayoutData");var Lt=V(async(G,b,{insertCluster:N,insertEdge:I,insertEdgeLabel:L,insertMarkers:o,insertNode:e,log:t,positionEdgeLabel:i},{algorithm:l})=>{const g={},n={},d=b.select("g");o(d,G.markers,G.type,G.diagramId);const r=d.insert("g").attr("class","subgraphs"),h=d.insert("g").attr("class","edgePaths"),a=d.insert("g").attr("class","edgeLabels"),p=d.insert("g").attr("class","nodes");t.debug("Inserting nodes into DOM for dimension calculation"),await Promise.all(G.nodes.map(async u=>{if(u.isGroup){const T={...u};n[u.id]=T,g[u.id]=T,await N(r,u)}else{const T={...u};g[u.id]=T;const y=await e(p,u,{config:G.config,dir:G.direction||"TB"}),O=y.node().getBBox();T.width=O.width,T.height=O.height,T.domId=y,t.debug(`Node ${u.id} dimensions: ${O.width}x${O.height}`)}})),t.debug("Running cose-bilkent layout algorithm");const v={...G,nodes:G.nodes.map(u=>{const T=g[u.id];return{...u,width:T.width,height:T.height}})},D=await st(v,G.config);t.debug("Positioning nodes based on layout results"),D.nodes.forEach(u=>{const T=g[u.id];T?.domId&&(T.domId.attr("transform",`translate(${u.x}, ${u.y})`),T.x=u.x,T.y=u.y,t.debug(`Positioned node ${T.id} at center (${u.x}, ${u.y})`))}),D.edges.forEach(u=>{const T=G.edges.find(y=>y.id===u.id);T&&(T.points=[{x:u.startX,y:u.startY},{x:u.midX,y:u.midY},{x:u.endX,y:u.endY}])}),t.debug("Inserting and positioning edges"),await Promise.all(G.edges.map(async u=>{await L(a,u);const T=g[u.start??""],y=g[u.end??""];if(T&&y){const O=D.edges.find(s=>s.id===u.id);if(O){t.debug("APA01 positionedEdge",O);const s={...u},f=I(h,s,n,G.type,T,y,G.diagramId);i(s,f)}else{const s={...u,points:[{x:T.x||0,y:T.y||0},{x:y.x||0,y:y.y||0}]},f=I(h,s,n,G.type,T,y,G.diagramId);i(s,f)}}})),t.debug("Cose-bilkent rendering completed")},"render"),Ot=Lt;export{Ot as render}; +import{_ as V,l as k,d as lt}from"./mermaid.core-Cahi9cr1.js";import{c as tt}from"./cytoscape.esm-OyMbaexL.js";import{g as gt}from"./_commonjsHelpers-CqkleIqs.js";import"./index-HRJ6xRtC.js";var Z={exports:{}},$={exports:{}},Q={exports:{}},ut=Q.exports,j;function ft(){return j||(j=1,(function(G,b){(function(I,L){G.exports=L()})(ut,function(){return(function(N){var I={};function L(o){if(I[o])return I[o].exports;var e=I[o]={i:o,l:!1,exports:{}};return N[o].call(e.exports,e,e.exports,L),e.l=!0,e.exports}return L.m=N,L.c=I,L.i=function(o){return o},L.d=function(o,e,t){L.o(o,e)||Object.defineProperty(o,e,{configurable:!1,enumerable:!0,get:t})},L.n=function(o){var e=o&&o.__esModule?function(){return o.default}:function(){return o};return L.d(e,"a",e),e},L.o=function(o,e){return Object.prototype.hasOwnProperty.call(o,e)},L.p="",L(L.s=26)})([(function(N,I,L){function o(){}o.QUALITY=1,o.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,o.DEFAULT_INCREMENTAL=!1,o.DEFAULT_ANIMATION_ON_LAYOUT=!0,o.DEFAULT_ANIMATION_DURING_LAYOUT=!1,o.DEFAULT_ANIMATION_PERIOD=50,o.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,o.DEFAULT_GRAPH_MARGIN=15,o.NODE_DIMENSIONS_INCLUDE_LABELS=!1,o.SIMPLE_NODE_SIZE=40,o.SIMPLE_NODE_HALF_SIZE=o.SIMPLE_NODE_SIZE/2,o.EMPTY_COMPOUND_NODE_SIZE=40,o.MIN_EDGE_LENGTH=1,o.WORLD_BOUNDARY=1e6,o.INITIAL_WORLD_BOUNDARY=o.WORLD_BOUNDARY/1e3,o.WORLD_CENTER_X=1200,o.WORLD_CENTER_Y=900,N.exports=o}),(function(N,I,L){var o=L(2),e=L(8),t=L(9);function i(g,n,d){o.call(this,d),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=d,this.bendpoints=[],this.source=g,this.target=n}i.prototype=Object.create(o.prototype);for(var l in o)i[l]=o[l];i.prototype.getSource=function(){return this.source},i.prototype.getTarget=function(){return this.target},i.prototype.isInterGraph=function(){return this.isInterGraph},i.prototype.getLength=function(){return this.length},i.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},i.prototype.getBendpoints=function(){return this.bendpoints},i.prototype.getLca=function(){return this.lca},i.prototype.getSourceInLca=function(){return this.sourceInLca},i.prototype.getTargetInLca=function(){return this.targetInLca},i.prototype.getOtherEnd=function(g){if(this.source===g)return this.target;if(this.target===g)return this.source;throw"Node is not incident with this edge"},i.prototype.getOtherEndInGraph=function(g,n){for(var d=this.getOtherEnd(g),r=n.getGraphManager().getRoot();;){if(d.getOwner()==n)return d;if(d.getOwner()==r)break;d=d.getOwner().getParent()}return null},i.prototype.updateLength=function(){var g=new Array(4);this.isOverlapingSourceAndTarget=e.getIntersection(this.target.getRect(),this.source.getRect(),g),this.isOverlapingSourceAndTarget||(this.lengthX=g[0]-g[2],this.lengthY=g[1]-g[3],Math.abs(this.lengthX)<1&&(this.lengthX=t.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=t.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},i.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=t.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=t.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},N.exports=i}),(function(N,I,L){function o(e){this.vGraphObject=e}N.exports=o}),(function(N,I,L){var o=L(2),e=L(10),t=L(13),i=L(0),l=L(16),g=L(4);function n(r,h,a,p){a==null&&p==null&&(p=h),o.call(this,p),r.graphManager!=null&&(r=r.graphManager),this.estimatedSize=e.MIN_VALUE,this.inclusionTreeDepth=e.MAX_VALUE,this.vGraphObject=p,this.edges=[],this.graphManager=r,a!=null&&h!=null?this.rect=new t(h.x,h.y,a.width,a.height):this.rect=new t}n.prototype=Object.create(o.prototype);for(var d in o)n[d]=o[d];n.prototype.getEdges=function(){return this.edges},n.prototype.getChild=function(){return this.child},n.prototype.getOwner=function(){return this.owner},n.prototype.getWidth=function(){return this.rect.width},n.prototype.setWidth=function(r){this.rect.width=r},n.prototype.getHeight=function(){return this.rect.height},n.prototype.setHeight=function(r){this.rect.height=r},n.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},n.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},n.prototype.getCenter=function(){return new g(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},n.prototype.getLocation=function(){return new g(this.rect.x,this.rect.y)},n.prototype.getRect=function(){return this.rect},n.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},n.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},n.prototype.setRect=function(r,h){this.rect.x=r.x,this.rect.y=r.y,this.rect.width=h.width,this.rect.height=h.height},n.prototype.setCenter=function(r,h){this.rect.x=r-this.rect.width/2,this.rect.y=h-this.rect.height/2},n.prototype.setLocation=function(r,h){this.rect.x=r,this.rect.y=h},n.prototype.moveBy=function(r,h){this.rect.x+=r,this.rect.y+=h},n.prototype.getEdgeListToNode=function(r){var h=[],a=this;return a.edges.forEach(function(p){if(p.target==r){if(p.source!=a)throw"Incorrect edge source!";h.push(p)}}),h},n.prototype.getEdgesBetween=function(r){var h=[],a=this;return a.edges.forEach(function(p){if(!(p.source==a||p.target==a))throw"Incorrect edge source and/or target";(p.target==r||p.source==r)&&h.push(p)}),h},n.prototype.getNeighborsList=function(){var r=new Set,h=this;return h.edges.forEach(function(a){if(a.source==h)r.add(a.target);else{if(a.target!=h)throw"Incorrect incidency!";r.add(a.source)}}),r},n.prototype.withChildren=function(){var r=new Set,h,a;if(r.add(this),this.child!=null)for(var p=this.child.getNodes(),v=0;vh&&(this.rect.x-=(this.labelWidth-h)/2,this.setWidth(this.labelWidth)),this.labelHeight>a&&(this.labelPos=="center"?this.rect.y-=(this.labelHeight-a)/2:this.labelPos=="top"&&(this.rect.y-=this.labelHeight-a),this.setHeight(this.labelHeight))}}},n.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==e.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},n.prototype.transform=function(r){var h=this.rect.x;h>i.WORLD_BOUNDARY?h=i.WORLD_BOUNDARY:h<-i.WORLD_BOUNDARY&&(h=-i.WORLD_BOUNDARY);var a=this.rect.y;a>i.WORLD_BOUNDARY?a=i.WORLD_BOUNDARY:a<-i.WORLD_BOUNDARY&&(a=-i.WORLD_BOUNDARY);var p=new g(h,a),v=r.inverseTransformPoint(p);this.setLocation(v.x,v.y)},n.prototype.getLeft=function(){return this.rect.x},n.prototype.getRight=function(){return this.rect.x+this.rect.width},n.prototype.getTop=function(){return this.rect.y},n.prototype.getBottom=function(){return this.rect.y+this.rect.height},n.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},N.exports=n}),(function(N,I,L){function o(e,t){e==null&&t==null?(this.x=0,this.y=0):(this.x=e,this.y=t)}o.prototype.getX=function(){return this.x},o.prototype.getY=function(){return this.y},o.prototype.setX=function(e){this.x=e},o.prototype.setY=function(e){this.y=e},o.prototype.getDifference=function(e){return new DimensionD(this.x-e.x,this.y-e.y)},o.prototype.getCopy=function(){return new o(this.x,this.y)},o.prototype.translate=function(e){return this.x+=e.width,this.y+=e.height,this},N.exports=o}),(function(N,I,L){var o=L(2),e=L(10),t=L(0),i=L(6),l=L(3),g=L(1),n=L(13),d=L(12),r=L(11);function h(p,v,D){o.call(this,D),this.estimatedSize=e.MIN_VALUE,this.margin=t.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=p,v!=null&&v instanceof i?this.graphManager=v:v!=null&&v instanceof Layout&&(this.graphManager=v.graphManager)}h.prototype=Object.create(o.prototype);for(var a in o)h[a]=o[a];h.prototype.getNodes=function(){return this.nodes},h.prototype.getEdges=function(){return this.edges},h.prototype.getGraphManager=function(){return this.graphManager},h.prototype.getParent=function(){return this.parent},h.prototype.getLeft=function(){return this.left},h.prototype.getRight=function(){return this.right},h.prototype.getTop=function(){return this.top},h.prototype.getBottom=function(){return this.bottom},h.prototype.isConnected=function(){return this.isConnected},h.prototype.add=function(p,v,D){if(v==null&&D==null){var u=p;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(u)>-1)throw"Node already in graph!";return u.owner=this,this.getNodes().push(u),u}else{var T=p;if(!(this.getNodes().indexOf(v)>-1&&this.getNodes().indexOf(D)>-1))throw"Source or target not in graph!";if(!(v.owner==D.owner&&v.owner==this))throw"Both owners must be this graph!";return v.owner!=D.owner?null:(T.source=v,T.target=D,T.isInterGraph=!1,this.getEdges().push(T),v.edges.push(T),D!=v&&D.edges.push(T),T)}},h.prototype.remove=function(p){var v=p;if(p instanceof l){if(v==null)throw"Node is null!";if(!(v.owner!=null&&v.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var D=v.edges.slice(),u,T=D.length,y=0;y-1&&f>-1))throw"Source and/or target doesn't know this edge!";u.source.edges.splice(s,1),u.target!=u.source&&u.target.edges.splice(f,1);var O=u.source.owner.getEdges().indexOf(u);if(O==-1)throw"Not in owner's edge list!";u.source.owner.getEdges().splice(O,1)}},h.prototype.updateLeftTop=function(){for(var p=e.MAX_VALUE,v=e.MAX_VALUE,D,u,T,y=this.getNodes(),O=y.length,s=0;sD&&(p=D),v>u&&(v=u)}return p==e.MAX_VALUE?null:(y[0].getParent().paddingLeft!=null?T=y[0].getParent().paddingLeft:T=this.margin,this.left=v-T,this.top=p-T,new d(this.left,this.top))},h.prototype.updateBounds=function(p){for(var v=e.MAX_VALUE,D=-e.MAX_VALUE,u=e.MAX_VALUE,T=-e.MAX_VALUE,y,O,s,f,c,E=this.nodes,A=E.length,m=0;my&&(v=y),Ds&&(u=s),Ty&&(v=y),Ds&&(u=s),T=this.nodes.length){var A=0;D.forEach(function(m){m.owner==p&&A++}),A==this.nodes.length&&(this.isConnected=!0)}},N.exports=h}),(function(N,I,L){var o,e=L(1);function t(i){o=L(5),this.layout=i,this.graphs=[],this.edges=[]}t.prototype.addRoot=function(){var i=this.layout.newGraph(),l=this.layout.newNode(null),g=this.add(i,l);return this.setRootGraph(g),this.rootGraph},t.prototype.add=function(i,l,g,n,d){if(g==null&&n==null&&d==null){if(i==null)throw"Graph is null!";if(l==null)throw"Parent node is null!";if(this.graphs.indexOf(i)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(i),i.parent!=null)throw"Already has a parent!";if(l.child!=null)throw"Already has a child!";return i.parent=l,l.child=i,i}else{d=g,n=l,g=i;var r=n.getOwner(),h=d.getOwner();if(!(r!=null&&r.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(h!=null&&h.getGraphManager()==this))throw"Target not in this graph mgr!";if(r==h)return g.isInterGraph=!1,r.add(g,n,d);if(g.isInterGraph=!0,g.source=n,g.target=d,this.edges.indexOf(g)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(g),!(g.source!=null&&g.target!=null))throw"Edge source and/or target is null!";if(!(g.source.edges.indexOf(g)==-1&&g.target.edges.indexOf(g)==-1))throw"Edge already in source and/or target incidency list!";return g.source.edges.push(g),g.target.edges.push(g),g}},t.prototype.remove=function(i){if(i instanceof o){var l=i;if(l.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(l==this.rootGraph||l.parent!=null&&l.parent.graphManager==this))throw"Invalid parent node!";var g=[];g=g.concat(l.getEdges());for(var n,d=g.length,r=0;r=i.getRight()?l[0]+=Math.min(i.getX()-t.getX(),t.getRight()-i.getRight()):i.getX()<=t.getX()&&i.getRight()>=t.getRight()&&(l[0]+=Math.min(t.getX()-i.getX(),i.getRight()-t.getRight())),t.getY()<=i.getY()&&t.getBottom()>=i.getBottom()?l[1]+=Math.min(i.getY()-t.getY(),t.getBottom()-i.getBottom()):i.getY()<=t.getY()&&i.getBottom()>=t.getBottom()&&(l[1]+=Math.min(t.getY()-i.getY(),i.getBottom()-t.getBottom()));var d=Math.abs((i.getCenterY()-t.getCenterY())/(i.getCenterX()-t.getCenterX()));i.getCenterY()===t.getCenterY()&&i.getCenterX()===t.getCenterX()&&(d=1);var r=d*l[0],h=l[1]/d;l[0]r)return l[0]=g,l[1]=a,l[2]=d,l[3]=E,!1;if(nd)return l[0]=h,l[1]=n,l[2]=f,l[3]=r,!1;if(gd?(l[0]=v,l[1]=D,R=!0):(l[0]=p,l[1]=a,R=!0):S===w&&(g>d?(l[0]=h,l[1]=a,R=!0):(l[0]=u,l[1]=D,R=!0)),-Y===w?d>g?(l[2]=c,l[3]=E,M=!0):(l[2]=f,l[3]=s,M=!0):Y===w&&(d>g?(l[2]=O,l[3]=s,M=!0):(l[2]=A,l[3]=E,M=!0)),R&&M)return!1;if(g>d?n>r?(x=this.getCardinalDirection(S,w,4),F=this.getCardinalDirection(Y,w,2)):(x=this.getCardinalDirection(-S,w,3),F=this.getCardinalDirection(-Y,w,1)):n>r?(x=this.getCardinalDirection(-S,w,1),F=this.getCardinalDirection(-Y,w,3)):(x=this.getCardinalDirection(S,w,2),F=this.getCardinalDirection(Y,w,4)),!R)switch(x){case 1:P=a,U=g+-y/w,l[0]=U,l[1]=P;break;case 2:U=u,P=n+T*w,l[0]=U,l[1]=P;break;case 3:P=D,U=g+y/w,l[0]=U,l[1]=P;break;case 4:U=v,P=n+-T*w,l[0]=U,l[1]=P;break}if(!M)switch(F){case 1:X=s,_=d+-C/w,l[2]=_,l[3]=X;break;case 2:_=A,X=r+m*w,l[2]=_,l[3]=X;break;case 3:X=E,_=d+C/w,l[2]=_,l[3]=X;break;case 4:_=c,X=r+-m*w,l[2]=_,l[3]=X;break}}return!1},e.getCardinalDirection=function(t,i,l){return t>i?l:1+l%4},e.getIntersection=function(t,i,l,g){if(g==null)return this.getIntersection2(t,i,l);var n=t.x,d=t.y,r=i.x,h=i.y,a=l.x,p=l.y,v=g.x,D=g.y,u=void 0,T=void 0,y=void 0,O=void 0,s=void 0,f=void 0,c=void 0,E=void 0,A=void 0;return y=h-d,s=n-r,c=r*d-n*h,O=D-p,f=a-v,E=v*p-a*D,A=y*f-O*s,A===0?null:(u=(s*E-f*c)/A,T=(O*c-y*E)/A,new o(u,T))},e.angleOfVector=function(t,i,l,g){var n=void 0;return t!==l?(n=Math.atan((g-i)/(l-t)),l0?1:e<0?-1:0},o.floor=function(e){return e<0?Math.ceil(e):Math.floor(e)},o.ceil=function(e){return e<0?Math.floor(e):Math.ceil(e)},N.exports=o}),(function(N,I,L){function o(){}o.MAX_VALUE=2147483647,o.MIN_VALUE=-2147483648,N.exports=o}),(function(N,I,L){var o=(function(){function n(d,r){for(var h=0;h"u"?"undefined":o(t);return t==null||i!="object"&&i!="function"},N.exports=e}),(function(N,I,L){function o(a){if(Array.isArray(a)){for(var p=0,v=Array(a.length);p0&&p;){for(y.push(s[0]);y.length>0&&p;){var f=y[0];y.splice(0,1),T.add(f);for(var c=f.getEdges(),u=0;u-1&&s.splice(C,1)}T=new Set,O=new Map}}return a},h.prototype.createDummyNodesForBendpoints=function(a){for(var p=[],v=a.source,D=this.graphManager.calcLowestCommonAncestor(a.source,a.target),u=0;u0){for(var D=this.edgeToDummyNodes.get(v),u=0;u=0&&p.splice(E,1);var A=O.getNeighborsList();A.forEach(function(R){if(v.indexOf(R)<0){var M=D.get(R),S=M-1;S==1&&f.push(R),D.set(R,S)}})}v=v.concat(f),(p.length==1||p.length==2)&&(u=!0,T=p[0])}return T},h.prototype.setGraphManager=function(a){this.graphManager=a},N.exports=h}),(function(N,I,L){function o(){}o.seed=1,o.x=0,o.nextDouble=function(){return o.x=Math.sin(o.seed++)*1e4,o.x-Math.floor(o.x)},N.exports=o}),(function(N,I,L){var o=L(4);function e(t,i){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}e.prototype.getWorldOrgX=function(){return this.lworldOrgX},e.prototype.setWorldOrgX=function(t){this.lworldOrgX=t},e.prototype.getWorldOrgY=function(){return this.lworldOrgY},e.prototype.setWorldOrgY=function(t){this.lworldOrgY=t},e.prototype.getWorldExtX=function(){return this.lworldExtX},e.prototype.setWorldExtX=function(t){this.lworldExtX=t},e.prototype.getWorldExtY=function(){return this.lworldExtY},e.prototype.setWorldExtY=function(t){this.lworldExtY=t},e.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},e.prototype.setDeviceOrgX=function(t){this.ldeviceOrgX=t},e.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},e.prototype.setDeviceOrgY=function(t){this.ldeviceOrgY=t},e.prototype.getDeviceExtX=function(){return this.ldeviceExtX},e.prototype.setDeviceExtX=function(t){this.ldeviceExtX=t},e.prototype.getDeviceExtY=function(){return this.ldeviceExtY},e.prototype.setDeviceExtY=function(t){this.ldeviceExtY=t},e.prototype.transformX=function(t){var i=0,l=this.lworldExtX;return l!=0&&(i=this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/l),i},e.prototype.transformY=function(t){var i=0,l=this.lworldExtY;return l!=0&&(i=this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/l),i},e.prototype.inverseTransformX=function(t){var i=0,l=this.ldeviceExtX;return l!=0&&(i=this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/l),i},e.prototype.inverseTransformY=function(t){var i=0,l=this.ldeviceExtY;return l!=0&&(i=this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/l),i},e.prototype.inverseTransformPoint=function(t){var i=new o(this.inverseTransformX(t.x),this.inverseTransformY(t.y));return i},N.exports=e}),(function(N,I,L){function o(r){if(Array.isArray(r)){for(var h=0,a=Array(r.length);ht.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*t.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(r-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-t.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT_INCREMENTAL):(r>t.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(t.COOLING_ADAPTATION_FACTOR,1-(r-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*(1-t.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},n.prototype.calcSpringForces=function(){for(var r=this.getAllEdges(),h,a=0;a0&&arguments[0]!==void 0?arguments[0]:!0,h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a,p,v,D,u=this.getAllNodes(),T;if(this.useFRGridVariant)for(this.totalIterations%t.GRID_CALCULATION_CHECK_PERIOD==1&&r&&this.updateGrid(),T=new Set,a=0;ay||T>y)&&(r.gravitationForceX=-this.gravityConstant*v,r.gravitationForceY=-this.gravityConstant*D)):(y=h.getEstimatedSize()*this.compoundGravityRangeFactor,(u>y||T>y)&&(r.gravitationForceX=-this.gravityConstant*v*this.compoundGravityConstant,r.gravitationForceY=-this.gravityConstant*D*this.compoundGravityConstant))},n.prototype.isConverged=function(){var r,h=!1;return this.totalIterations>this.maxIterations/3&&(h=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),r=this.totalDisplacement=u.length||y>=u[0].length)){for(var O=0;On}}]),l})();N.exports=i}),(function(N,I,L){var o=(function(){function i(l,g){for(var n=0;n2&&arguments[2]!==void 0?arguments[2]:1,d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;e(this,i),this.sequence1=l,this.sequence2=g,this.match_score=n,this.mismatch_penalty=d,this.gap_penalty=r,this.iMax=l.length+1,this.jMax=g.length+1,this.grid=new Array(this.iMax);for(var h=0;h=0;l--){var g=this.listeners[l];g.event===t&&g.callback===i&&this.listeners.splice(l,1)}},e.emit=function(t,i){for(var l=0;lg.coolingFactor*g.maxNodeDisplacement&&(this.displacementX=g.coolingFactor*g.maxNodeDisplacement*t.sign(this.displacementX)),Math.abs(this.displacementY)>g.coolingFactor*g.maxNodeDisplacement&&(this.displacementY=g.coolingFactor*g.maxNodeDisplacement*t.sign(this.displacementY)),this.child==null?this.moveBy(this.displacementX,this.displacementY):this.child.getNodes().length==0?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),g.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},i.prototype.propogateDisplacementToChildren=function(g,n){for(var d=this.getChild().getNodes(),r,h=0;h0)this.positionNodesRadially(s);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var f=new Set(this.getAllNodes()),c=this.nodesWithGravity.filter(function(E){return f.has(E)});this.graphManager.setAllNodesToApplyGravitation(c),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},y.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%d.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var s=new Set(this.getAllNodes()),f=this.nodesWithGravity.filter(function(A){return s.has(A)});this.graphManager.setAllNodesToApplyGravitation(f),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var c=!this.isTreeGrowing&&!this.isGrowthFinished,E=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(c,E),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},y.prototype.getPositionsData=function(){for(var s=this.graphManager.getAllNodes(),f={},c=0;c1){var R;for(R=0;RE&&(E=Math.floor(C.y)),m=Math.floor(C.x+n.DEFAULT_COMPONENT_SEPERATION)}this.transform(new a(r.WORLD_CENTER_X-C.x/2,r.WORLD_CENTER_Y-C.y/2))},y.radialLayout=function(s,f,c){var E=Math.max(this.maxDiagonalInTree(s),n.DEFAULT_RADIAL_SEPARATION);y.branchRadialLayout(f,null,0,359,0,E);var A=u.calculateBounds(s),m=new T;m.setDeviceOrgX(A.getMinX()),m.setDeviceOrgY(A.getMinY()),m.setWorldOrgX(c.x),m.setWorldOrgY(c.y);for(var C=0;C1;){var X=_[0];_.splice(0,1);var H=w.indexOf(X);H>=0&&w.splice(H,1),U--,x--}f!=null?P=(w.indexOf(_[0])+1)%U:P=0;for(var W=Math.abs(E-c)/x,B=P;F!=x;B=++B%U){var K=w[B].getOtherEnd(s);if(K!=f){var q=(c+F*W)%360,ht=(q+W)%360;y.branchRadialLayout(K,s,q,ht,A+m,m),F++}}},y.maxDiagonalInTree=function(s){for(var f=v.MIN_VALUE,c=0;cf&&(f=A)}return f},y.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},y.prototype.groupZeroDegreeMembers=function(){var s=this,f={};this.memberGroups={},this.idToDummyNode={};for(var c=[],E=this.graphManager.getAllNodes(),A=0;A"u"&&(f[R]=[]),f[R]=f[R].concat(m)}Object.keys(f).forEach(function(M){if(f[M].length>1){var S="DummyCompound_"+M;s.memberGroups[S]=f[M];var Y=f[M][0].getParent(),w=new l(s.graphManager);w.id=S,w.paddingLeft=Y.paddingLeft||0,w.paddingRight=Y.paddingRight||0,w.paddingBottom=Y.paddingBottom||0,w.paddingTop=Y.paddingTop||0,s.idToDummyNode[S]=w;var x=s.getGraphManager().add(s.newGraph(),w),F=Y.getChild();F.add(w);for(var U=0;U=0;s--){var f=this.compoundOrder[s],c=f.id,E=f.paddingLeft,A=f.paddingTop;this.adjustLocations(this.tiledMemberPack[c],f.rect.x,f.rect.y,E,A)}},y.prototype.repopulateZeroDegreeMembers=function(){var s=this,f=this.tiledZeroDegreePack;Object.keys(f).forEach(function(c){var E=s.idToDummyNode[c],A=E.paddingLeft,m=E.paddingTop;s.adjustLocations(f[c],E.rect.x,E.rect.y,A,m)})},y.prototype.getToBeTiled=function(s){var f=s.id;if(this.toBeTiled[f]!=null)return this.toBeTiled[f];var c=s.getChild();if(c==null)return this.toBeTiled[f]=!1,!1;for(var E=c.getNodes(),A=0;A0)return this.toBeTiled[f]=!1,!1;if(m.getChild()==null){this.toBeTiled[m.id]=!1;continue}if(!this.getToBeTiled(m))return this.toBeTiled[f]=!1,!1}return this.toBeTiled[f]=!0,!0},y.prototype.getNodeDegree=function(s){s.id;for(var f=s.getEdges(),c=0,E=0;EM&&(M=Y.rect.height)}c+=M+s.verticalPadding}},y.prototype.tileCompoundMembers=function(s,f){var c=this;this.tiledMemberPack=[],Object.keys(s).forEach(function(E){var A=f[E];c.tiledMemberPack[E]=c.tileNodes(s[E],A.paddingLeft+A.paddingRight),A.rect.width=c.tiledMemberPack[E].width,A.rect.height=c.tiledMemberPack[E].height})},y.prototype.tileNodes=function(s,f){var c=n.TILING_PADDING_VERTICAL,E=n.TILING_PADDING_HORIZONTAL,A={rows:[],rowWidth:[],rowHeight:[],width:0,height:f,verticalPadding:c,horizontalPadding:E};s.sort(function(R,M){return R.rect.width*R.rect.height>M.rect.width*M.rect.height?-1:R.rect.width*R.rect.height0&&(C+=s.horizontalPadding),s.rowWidth[c]=C,s.width0&&(R+=s.verticalPadding);var M=0;R>s.rowHeight[c]&&(M=s.rowHeight[c],s.rowHeight[c]=R,M=s.rowHeight[c]-M),s.height+=M,s.rows[c].push(f)},y.prototype.getShortestRowIndex=function(s){for(var f=-1,c=Number.MAX_VALUE,E=0;Ec&&(f=E,c=s.rowWidth[E]);return f},y.prototype.canAddHorizontal=function(s,f,c){var E=this.getShortestRowIndex(s);if(E<0)return!0;var A=s.rowWidth[E];if(A+s.horizontalPadding+f<=s.width)return!0;var m=0;s.rowHeight[E]0&&(m=c+s.verticalPadding-s.rowHeight[E]);var C;s.width-A>=f+s.horizontalPadding?C=(s.height+m)/(A+f+s.horizontalPadding):C=(s.height+m)/s.width,m=c+s.verticalPadding;var R;return s.widthm&&f!=c){E.splice(-1,1),s.rows[c].push(A),s.rowWidth[f]=s.rowWidth[f]-m,s.rowWidth[c]=s.rowWidth[c]+m,s.width=s.rowWidth[instance.getLongestRowIndex(s)];for(var C=Number.MIN_VALUE,R=0;RC&&(C=E[R].height);f>0&&(C+=s.verticalPadding);var M=s.rowHeight[f]+s.rowHeight[c];s.rowHeight[f]=C,s.rowHeight[c]0)for(var F=A;F<=m;F++)x[0]+=this.grid[F][C-1].length+this.grid[F][C].length-1;if(m0)for(var F=C;F<=R;F++)x[3]+=this.grid[A-1][F].length+this.grid[A][F].length-1;for(var U=v.MAX_VALUE,P,_,X=0;X0){var R;R=T.getGraphManager().add(T.newGraph(),c),this.processChildrenList(R,f,T)}}},a.prototype.stop=function(){return this.stopped=!0,this};var v=function(u){u("layout","cose-bilkent",a)};typeof cytoscape<"u"&&v(cytoscape),I.exports=v})])})})(Z)),Z.exports}var yt=vt();const Et=gt(yt);tt.use(Et);function et(G,b){G.forEach(N=>{const I={id:N.id,labelText:N.label,height:N.height,width:N.width,padding:N.padding??0};Object.keys(N).forEach(L=>{["id","label","height","width","padding","x","y"].includes(L)||(I[L]=N[L])}),b.add({group:"nodes",data:I,position:{x:N.x??0,y:N.y??0}})})}V(et,"addNodes");function rt(G,b){G.forEach(N=>{const I={id:N.id,source:N.start,target:N.end};Object.keys(N).forEach(L=>{["id","start","end"].includes(L)||(I[L]=N[L])}),b.add({group:"edges",data:I})})}V(rt,"addEdges");function it(G){return new Promise(b=>{const N=lt("body").append("div").attr("id","cy").attr("style","display:none"),I=tt({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});N.remove(),et(G.nodes,I),rt(G.edges,I),I.nodes().forEach(function(o){o.layoutDimensions=()=>{const e=o.data();return{w:e.width,h:e.height}}});const L={name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1};I.layout(L).run(),I.ready(o=>{k.info("Cytoscape ready",o),b(I)})})}V(it,"createCytoscapeInstance");function nt(G){return G.nodes().map(b=>{const N=b.data(),I=b.position(),L={id:N.id,x:I.x,y:I.y};return Object.keys(N).forEach(o=>{o!=="id"&&(L[o]=N[o])}),L})}V(nt,"extractPositionedNodes");function ot(G){return G.edges().map(b=>{const N=b.data(),I=b._private.rscratch,L={id:N.id,source:N.source,target:N.target,startX:I.startX,startY:I.startY,midX:I.midX,midY:I.midY,endX:I.endX,endY:I.endY};return Object.keys(N).forEach(o=>{["id","source","target"].includes(o)||(L[o]=N[o])}),L})}V(ot,"extractPositionedEdges");async function st(G,b){k.debug("Starting cose-bilkent layout algorithm");try{at(G);const N=await it(G),I=nt(N),L=ot(N);return k.debug(`Layout completed: ${I.length} nodes, ${L.length} edges`),{nodes:I,edges:L}}catch(N){throw k.error("Error in cose-bilkent layout algorithm:",N),N}}V(st,"executeCoseBilkentLayout");function at(G){if(!G)throw new Error("Layout data is required");if(!G.config)throw new Error("Configuration is required in layout data");if(!G.rootNode)throw new Error("Root node is required");if(!G.nodes||!Array.isArray(G.nodes))throw new Error("No nodes found in layout data");if(!Array.isArray(G.edges))throw new Error("Edges array is required in layout data");return!0}V(at,"validateLayoutData");var Lt=V(async(G,b,{insertCluster:N,insertEdge:I,insertEdgeLabel:L,insertMarkers:o,insertNode:e,log:t,positionEdgeLabel:i},{algorithm:l})=>{const g={},n={},d=b.select("g");o(d,G.markers,G.type,G.diagramId);const r=d.insert("g").attr("class","subgraphs"),h=d.insert("g").attr("class","edgePaths"),a=d.insert("g").attr("class","edgeLabels"),p=d.insert("g").attr("class","nodes");t.debug("Inserting nodes into DOM for dimension calculation"),await Promise.all(G.nodes.map(async u=>{if(u.isGroup){const T={...u};n[u.id]=T,g[u.id]=T,await N(r,u)}else{const T={...u};g[u.id]=T;const y=await e(p,u,{config:G.config,dir:G.direction||"TB"}),O=y.node().getBBox();T.width=O.width,T.height=O.height,T.domId=y,t.debug(`Node ${u.id} dimensions: ${O.width}x${O.height}`)}})),t.debug("Running cose-bilkent layout algorithm");const v={...G,nodes:G.nodes.map(u=>{const T=g[u.id];return{...u,width:T.width,height:T.height}})},D=await st(v,G.config);t.debug("Positioning nodes based on layout results"),D.nodes.forEach(u=>{const T=g[u.id];T?.domId&&(T.domId.attr("transform",`translate(${u.x}, ${u.y})`),T.x=u.x,T.y=u.y,t.debug(`Positioned node ${T.id} at center (${u.x}, ${u.y})`))}),D.edges.forEach(u=>{const T=G.edges.find(y=>y.id===u.id);T&&(T.points=[{x:u.startX,y:u.startY},{x:u.midX,y:u.midY},{x:u.endX,y:u.endY}])}),t.debug("Inserting and positioning edges"),await Promise.all(G.edges.map(async u=>{await L(a,u);const T=g[u.start??""],y=g[u.end??""];if(T&&y){const O=D.edges.find(s=>s.id===u.id);if(O){t.debug("APA01 positionedEdge",O);const s={...u},f=I(h,s,n,G.type,T,y,G.diagramId);i(s,f)}else{const s={...u,points:[{x:T.x||0,y:T.y||0},{x:y.x||0,y:y.y||0}]},f=I(h,s,n,G.type,T,y,G.diagramId);i(s,f)}}})),t.debug("Cose-bilkent rendering completed")},"render"),Ot=Lt;export{Ot as render}; diff --git a/apps/kimi-code/dist-web/assets/cynefin-VYW2F7L2-B2u2H2Wf.js b/apps/kimi-code/dist-web/assets/cynefin-VYW2F7L2-C5gNr-Q4.js similarity index 99% rename from apps/kimi-code/dist-web/assets/cynefin-VYW2F7L2-B2u2H2Wf.js rename to apps/kimi-code/dist-web/assets/cynefin-VYW2F7L2-C5gNr-Q4.js index 3a41e07d20..c74a442ccc 100644 --- a/apps/kimi-code/dist-web/assets/cynefin-VYW2F7L2-B2u2H2Wf.js +++ b/apps/kimi-code/dist-web/assets/cynefin-VYW2F7L2-C5gNr-Q4.js @@ -1,4 +1,4 @@ -import{bR as et}from"./index-B-HzRssS.js";var RI=Object.create,Ds=Object.defineProperty,AI=Object.getOwnPropertyDescriptor,Ad=Object.getOwnPropertyNames,EI=Object.getPrototypeOf,CI=Object.prototype.hasOwnProperty,i=(e,t)=>Ds(e,"name",{value:t,configurable:!0}),bI=(e,t)=>function(){return e&&(t=(0,e[Ad(e)[0]])(e=0)),t},H=(e,t)=>function(){return t||(0,e[Ad(e)[0]])((t={exports:{}}).exports,t),t.exports},Vr=(e,t)=>{for(var r in t)Ds(e,r,{get:t[r],enumerable:!0})},Ed=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Ad(t))!CI.call(e,a)&&a!==r&&Ds(e,a,{get:()=>t[a],enumerable:!(n=AI(t,a))||n.enumerable});return e},Ll=(e,t,r)=>(Ed(e,t,"default"),r),Cd=(e,t,r)=>(r=e!=null?RI(EI(e)):{},Ed(Ds(r,"default",{value:e,enumerable:!0}),e)),bd=e=>Ed(Ds({},"__esModule",{value:!0}),e),Dl={};Vr(Dl,{AnnotatedTextEdit:()=>mr,ChangeAnnotation:()=>an,ChangeAnnotationIdentifier:()=>Ke,CodeAction:()=>ef,CodeActionContext:()=>Qc,CodeActionKind:()=>Zc,CodeActionTriggerKind:()=>Xi,CodeDescription:()=>Nc,CodeLens:()=>tf,Color:()=>Co,ColorInformation:()=>Cc,ColorPresentation:()=>bc,Command:()=>nn,CompletionItem:()=>zc,CompletionItemKind:()=>Lc,CompletionItemLabelDetails:()=>Fc,CompletionItemTag:()=>xc,CompletionList:()=>jc,CreateFile:()=>ya,DeleteFile:()=>va,Diagnostic:()=>Vi,DiagnosticRelatedInformation:()=>bo,DiagnosticSeverity:()=>wc,DiagnosticTag:()=>Ic,DocumentHighlight:()=>Vc,DocumentHighlightKind:()=>Wc,DocumentLink:()=>nf,DocumentSymbol:()=>Jc,DocumentUri:()=>Rc,EOL:()=>zg,FoldingRange:()=>Sc,FoldingRangeKind:()=>_c,FormattingOptions:()=>rf,Hover:()=>Bc,InlayHint:()=>pf,InlayHintKind:()=>wo,InlayHintLabelPart:()=>Io,InlineCompletionContext:()=>Tf,InlineCompletionItem:()=>hf,InlineCompletionList:()=>yf,InlineCompletionTriggerKind:()=>gf,InlineValueContext:()=>df,InlineValueEvaluatableExpression:()=>ff,InlineValueText:()=>uf,InlineValueVariableLookup:()=>cf,InsertReplaceEdit:()=>Mc,InsertTextFormat:()=>Dc,InsertTextMode:()=>Gc,Location:()=>Wi,LocationLink:()=>Ec,MarkedString:()=>Yi,MarkupContent:()=>Ta,MarkupKind:()=>So,OptionalVersionedTextDocumentIdentifier:()=>Hi,ParameterInformation:()=>Uc,Position:()=>ie,Range:()=>Q,RenameFile:()=>ga,SelectedCompletionInfo:()=>vf,SelectionRange:()=>af,SemanticTokenModifiers:()=>of,SemanticTokenTypes:()=>sf,SemanticTokens:()=>lf,SignatureInformation:()=>Kc,StringValue:()=>mf,SymbolInformation:()=>Yc,SymbolKind:()=>qc,SymbolTag:()=>Hc,TextDocument:()=>Rf,TextDocumentEdit:()=>qi,TextDocumentIdentifier:()=>Pc,TextDocumentItem:()=>Oc,TextEdit:()=>Yt,URI:()=>Eo,VersionedTextDocumentIdentifier:()=>kc,WorkspaceChange:()=>Fg,WorkspaceEdit:()=>_o,WorkspaceFolder:()=>$f,WorkspaceSymbol:()=>Xc,integer:()=>Ac,uinteger:()=>Ki});var Rc,Eo,Ac,Ki,ie,Q,Wi,Ec,Co,Cc,bc,_c,Sc,bo,wc,Ic,Nc,Vi,nn,Yt,an,Ke,mr,qi,ya,ga,va,_o,ki,Ku,Fg,Pc,kc,Hi,Oc,So,Ta,Lc,Dc,xc,Mc,Gc,Fc,zc,jc,Yi,Bc,Uc,Kc,Wc,Vc,qc,Hc,Yc,Xc,Jc,Zc,Xi,Qc,ef,tf,rf,nf,af,sf,of,lf,uf,cf,ff,df,wo,Io,pf,mf,hf,yf,gf,vf,Tf,$f,zg,Rf,lh,A,xs=bI({"../../node_modules/.pnpm/vscode-languageserver-types@3.17.5/node_modules/vscode-languageserver-types/lib/esm/main.js"(){(function(e){function t(r){return typeof r=="string"}i(t,"is"),e.is=t})(Rc||(Rc={})),(function(e){function t(r){return typeof r=="string"}i(t,"is"),e.is=t})(Eo||(Eo={})),(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function t(r){return typeof r=="number"&&e.MIN_VALUE<=r&&r<=e.MAX_VALUE}i(t,"is"),e.is=t})(Ac||(Ac={})),(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function t(r){return typeof r=="number"&&e.MIN_VALUE<=r&&r<=e.MAX_VALUE}i(t,"is"),e.is=t})(Ki||(Ki={})),(function(e){function t(n,a){return n===Number.MAX_VALUE&&(n=Ki.MAX_VALUE),a===Number.MAX_VALUE&&(a=Ki.MAX_VALUE),{line:n,character:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&A.uinteger(a.line)&&A.uinteger(a.character)}i(r,"is"),e.is=r})(ie||(ie={})),(function(e){function t(n,a,s,o){if(A.uinteger(n)&&A.uinteger(a)&&A.uinteger(s)&&A.uinteger(o))return{start:ie.create(n,a),end:ie.create(s,o)};if(ie.is(n)&&ie.is(a))return{start:n,end:a};throw new Error(`Range#create called with invalid arguments[${n}, ${a}, ${s}, ${o}]`)}i(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&ie.is(a.start)&&ie.is(a.end)}i(r,"is"),e.is=r})(Q||(Q={})),(function(e){function t(n,a){return{uri:n,range:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&Q.is(a.range)&&(A.string(a.uri)||A.undefined(a.uri))}i(r,"is"),e.is=r})(Wi||(Wi={})),(function(e){function t(n,a,s,o){return{targetUri:n,targetRange:a,targetSelectionRange:s,originSelectionRange:o}}i(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&Q.is(a.targetRange)&&A.string(a.targetUri)&&Q.is(a.targetSelectionRange)&&(Q.is(a.originSelectionRange)||A.undefined(a.originSelectionRange))}i(r,"is"),e.is=r})(Ec||(Ec={})),(function(e){function t(n,a,s,o){return{red:n,green:a,blue:s,alpha:o}}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&A.numberRange(a.red,0,1)&&A.numberRange(a.green,0,1)&&A.numberRange(a.blue,0,1)&&A.numberRange(a.alpha,0,1)}i(r,"is"),e.is=r})(Co||(Co={})),(function(e){function t(n,a){return{range:n,color:a}}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&Q.is(a.range)&&Co.is(a.color)}i(r,"is"),e.is=r})(Cc||(Cc={})),(function(e){function t(n,a,s){return{label:n,textEdit:a,additionalTextEdits:s}}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&A.string(a.label)&&(A.undefined(a.textEdit)||Yt.is(a))&&(A.undefined(a.additionalTextEdits)||A.typedArray(a.additionalTextEdits,Yt.is))}i(r,"is"),e.is=r})(bc||(bc={})),(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(_c||(_c={})),(function(e){function t(n,a,s,o,l,u){const c={startLine:n,endLine:a};return A.defined(s)&&(c.startCharacter=s),A.defined(o)&&(c.endCharacter=o),A.defined(l)&&(c.kind=l),A.defined(u)&&(c.collapsedText=u),c}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&A.uinteger(a.startLine)&&A.uinteger(a.startLine)&&(A.undefined(a.startCharacter)||A.uinteger(a.startCharacter))&&(A.undefined(a.endCharacter)||A.uinteger(a.endCharacter))&&(A.undefined(a.kind)||A.string(a.kind))}i(r,"is"),e.is=r})(Sc||(Sc={})),(function(e){function t(n,a){return{location:n,message:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&Wi.is(a.location)&&A.string(a.message)}i(r,"is"),e.is=r})(bo||(bo={})),(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(wc||(wc={})),(function(e){e.Unnecessary=1,e.Deprecated=2})(Ic||(Ic={})),(function(e){function t(r){const n=r;return A.objectLiteral(n)&&A.string(n.href)}i(t,"is"),e.is=t})(Nc||(Nc={})),(function(e){function t(n,a,s,o,l,u){let c={range:n,message:a};return A.defined(s)&&(c.severity=s),A.defined(o)&&(c.code=o),A.defined(l)&&(c.source=l),A.defined(u)&&(c.relatedInformation=u),c}i(t,"create"),e.create=t;function r(n){var a;let s=n;return A.defined(s)&&Q.is(s.range)&&A.string(s.message)&&(A.number(s.severity)||A.undefined(s.severity))&&(A.integer(s.code)||A.string(s.code)||A.undefined(s.code))&&(A.undefined(s.codeDescription)||A.string((a=s.codeDescription)===null||a===void 0?void 0:a.href))&&(A.string(s.source)||A.undefined(s.source))&&(A.undefined(s.relatedInformation)||A.typedArray(s.relatedInformation,bo.is))}i(r,"is"),e.is=r})(Vi||(Vi={})),(function(e){function t(n,a,...s){let o={title:n,command:a};return A.defined(s)&&s.length>0&&(o.arguments=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.title)&&A.string(a.command)}i(r,"is"),e.is=r})(nn||(nn={})),(function(e){function t(s,o){return{range:s,newText:o}}i(t,"replace"),e.replace=t;function r(s,o){return{range:{start:s,end:s},newText:o}}i(r,"insert"),e.insert=r;function n(s){return{range:s,newText:""}}i(n,"del"),e.del=n;function a(s){const o=s;return A.objectLiteral(o)&&A.string(o.newText)&&Q.is(o.range)}i(a,"is"),e.is=a})(Yt||(Yt={})),(function(e){function t(n,a,s){const o={label:n};return a!==void 0&&(o.needsConfirmation=a),s!==void 0&&(o.description=s),o}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&A.string(a.label)&&(A.boolean(a.needsConfirmation)||a.needsConfirmation===void 0)&&(A.string(a.description)||a.description===void 0)}i(r,"is"),e.is=r})(an||(an={})),(function(e){function t(r){const n=r;return A.string(n)}i(t,"is"),e.is=t})(Ke||(Ke={})),(function(e){function t(s,o,l){return{range:s,newText:o,annotationId:l}}i(t,"replace"),e.replace=t;function r(s,o,l){return{range:{start:s,end:s},newText:o,annotationId:l}}i(r,"insert"),e.insert=r;function n(s,o){return{range:s,newText:"",annotationId:o}}i(n,"del"),e.del=n;function a(s){const o=s;return Yt.is(o)&&(an.is(o.annotationId)||Ke.is(o.annotationId))}i(a,"is"),e.is=a})(mr||(mr={})),(function(e){function t(n,a){return{textDocument:n,edits:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&Hi.is(a.textDocument)&&Array.isArray(a.edits)}i(r,"is"),e.is=r})(qi||(qi={})),(function(e){function t(n,a,s){let o={kind:"create",uri:n};return a!==void 0&&(a.overwrite!==void 0||a.ignoreIfExists!==void 0)&&(o.options=a),s!==void 0&&(o.annotationId=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return a&&a.kind==="create"&&A.string(a.uri)&&(a.options===void 0||(a.options.overwrite===void 0||A.boolean(a.options.overwrite))&&(a.options.ignoreIfExists===void 0||A.boolean(a.options.ignoreIfExists)))&&(a.annotationId===void 0||Ke.is(a.annotationId))}i(r,"is"),e.is=r})(ya||(ya={})),(function(e){function t(n,a,s,o){let l={kind:"rename",oldUri:n,newUri:a};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(l.options=s),o!==void 0&&(l.annotationId=o),l}i(t,"create"),e.create=t;function r(n){let a=n;return a&&a.kind==="rename"&&A.string(a.oldUri)&&A.string(a.newUri)&&(a.options===void 0||(a.options.overwrite===void 0||A.boolean(a.options.overwrite))&&(a.options.ignoreIfExists===void 0||A.boolean(a.options.ignoreIfExists)))&&(a.annotationId===void 0||Ke.is(a.annotationId))}i(r,"is"),e.is=r})(ga||(ga={})),(function(e){function t(n,a,s){let o={kind:"delete",uri:n};return a!==void 0&&(a.recursive!==void 0||a.ignoreIfNotExists!==void 0)&&(o.options=a),s!==void 0&&(o.annotationId=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return a&&a.kind==="delete"&&A.string(a.uri)&&(a.options===void 0||(a.options.recursive===void 0||A.boolean(a.options.recursive))&&(a.options.ignoreIfNotExists===void 0||A.boolean(a.options.ignoreIfNotExists)))&&(a.annotationId===void 0||Ke.is(a.annotationId))}i(r,"is"),e.is=r})(va||(va={})),(function(e){function t(r){let n=r;return n&&(n.changes!==void 0||n.documentChanges!==void 0)&&(n.documentChanges===void 0||n.documentChanges.every(a=>A.string(a.kind)?ya.is(a)||ga.is(a)||va.is(a):qi.is(a)))}i(t,"is"),e.is=t})(_o||(_o={})),ki=class{static{i(this,"TextEditChangeImpl")}constructor(e,t){this.edits=e,this.changeAnnotations=t}insert(e,t,r){let n,a;if(r===void 0?n=Yt.insert(e,t):Ke.is(r)?(a=r,n=mr.insert(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(r),n=mr.insert(e,t,a)),this.edits.push(n),a!==void 0)return a}replace(e,t,r){let n,a;if(r===void 0?n=Yt.replace(e,t):Ke.is(r)?(a=r,n=mr.replace(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(r),n=mr.replace(e,t,a)),this.edits.push(n),a!==void 0)return a}delete(e,t){let r,n;if(t===void 0?r=Yt.del(e):Ke.is(t)?(n=t,r=mr.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),n=this.changeAnnotations.manage(t),r=mr.del(e,n)),this.edits.push(r),n!==void 0)return n}add(e){this.edits.push(e)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(e){if(e===void 0)throw new Error("Text edit change is not configured to manage change annotations.")}},Ku=class{static{i(this,"ChangeAnnotations")}constructor(e){this._annotations=e===void 0?Object.create(null):e,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(e,t){let r;if(Ke.is(e)?r=e:(r=this.nextId(),t=e),this._annotations[r]!==void 0)throw new Error(`Id ${r} is already in use.`);if(t===void 0)throw new Error(`No annotation provided for id ${r}`);return this._annotations[r]=t,this._size++,r}nextId(){return this._counter++,this._counter.toString()}},Fg=class{static{i(this,"WorkspaceChange")}constructor(e){this._textEditChanges=Object.create(null),e!==void 0?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new Ku(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(t=>{if(qi.is(t)){const r=new ki(t.edits,this._changeAnnotations);this._textEditChanges[t.textDocument.uri]=r}})):e.changes&&Object.keys(e.changes).forEach(t=>{const r=new ki(e.changes[t]);this._textEditChanges[t]=r})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(e){if(Hi.is(e)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");const t={uri:e.uri,version:e.version};let r=this._textEditChanges[t.uri];if(!r){const n=[],a={textDocument:t,edits:n};this._workspaceEdit.documentChanges.push(a),r=new ki(n,this._changeAnnotations),this._textEditChanges[t.uri]=r}return r}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");let t=this._textEditChanges[e];if(!t){let r=[];this._workspaceEdit.changes[e]=r,t=new ki(r),this._textEditChanges[e]=t}return t}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new Ku,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))}createFile(e,t,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let n;an.is(t)||Ke.is(t)?n=t:r=t;let a,s;if(n===void 0?a=ya.create(e,r):(s=Ke.is(n)?n:this._changeAnnotations.manage(n),a=ya.create(e,r,s)),this._workspaceEdit.documentChanges.push(a),s!==void 0)return s}renameFile(e,t,r,n){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let a;an.is(r)||Ke.is(r)?a=r:n=r;let s,o;if(a===void 0?s=ga.create(e,t,n):(o=Ke.is(a)?a:this._changeAnnotations.manage(a),s=ga.create(e,t,n,o)),this._workspaceEdit.documentChanges.push(s),o!==void 0)return o}deleteFile(e,t,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let n;an.is(t)||Ke.is(t)?n=t:r=t;let a,s;if(n===void 0?a=va.create(e,r):(s=Ke.is(n)?n:this._changeAnnotations.manage(n),a=va.create(e,r,s)),this._workspaceEdit.documentChanges.push(a),s!==void 0)return s}},(function(e){function t(n){return{uri:n}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.uri)}i(r,"is"),e.is=r})(Pc||(Pc={})),(function(e){function t(n,a){return{uri:n,version:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.uri)&&A.integer(a.version)}i(r,"is"),e.is=r})(kc||(kc={})),(function(e){function t(n,a){return{uri:n,version:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.uri)&&(a.version===null||A.integer(a.version))}i(r,"is"),e.is=r})(Hi||(Hi={})),(function(e){function t(n,a,s,o){return{uri:n,languageId:a,version:s,text:o}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.uri)&&A.string(a.languageId)&&A.integer(a.version)&&A.string(a.text)}i(r,"is"),e.is=r})(Oc||(Oc={})),(function(e){e.PlainText="plaintext",e.Markdown="markdown";function t(r){const n=r;return n===e.PlainText||n===e.Markdown}i(t,"is"),e.is=t})(So||(So={})),(function(e){function t(r){const n=r;return A.objectLiteral(r)&&So.is(n.kind)&&A.string(n.value)}i(t,"is"),e.is=t})(Ta||(Ta={})),(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(Lc||(Lc={})),(function(e){e.PlainText=1,e.Snippet=2})(Dc||(Dc={})),(function(e){e.Deprecated=1})(xc||(xc={})),(function(e){function t(n,a,s){return{newText:n,insert:a,replace:s}}i(t,"create"),e.create=t;function r(n){const a=n;return a&&A.string(a.newText)&&Q.is(a.insert)&&Q.is(a.replace)}i(r,"is"),e.is=r})(Mc||(Mc={})),(function(e){e.asIs=1,e.adjustIndentation=2})(Gc||(Gc={})),(function(e){function t(r){const n=r;return n&&(A.string(n.detail)||n.detail===void 0)&&(A.string(n.description)||n.description===void 0)}i(t,"is"),e.is=t})(Fc||(Fc={})),(function(e){function t(r){return{label:r}}i(t,"create"),e.create=t})(zc||(zc={})),(function(e){function t(r,n){return{items:r||[],isIncomplete:!!n}}i(t,"create"),e.create=t})(jc||(jc={})),(function(e){function t(n){return n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}i(t,"fromPlainText"),e.fromPlainText=t;function r(n){const a=n;return A.string(a)||A.objectLiteral(a)&&A.string(a.language)&&A.string(a.value)}i(r,"is"),e.is=r})(Yi||(Yi={})),(function(e){function t(r){let n=r;return!!n&&A.objectLiteral(n)&&(Ta.is(n.contents)||Yi.is(n.contents)||A.typedArray(n.contents,Yi.is))&&(r.range===void 0||Q.is(r.range))}i(t,"is"),e.is=t})(Bc||(Bc={})),(function(e){function t(r,n){return n?{label:r,documentation:n}:{label:r}}i(t,"create"),e.create=t})(Uc||(Uc={})),(function(e){function t(r,n,...a){let s={label:r};return A.defined(n)&&(s.documentation=n),A.defined(a)?s.parameters=a:s.parameters=[],s}i(t,"create"),e.create=t})(Kc||(Kc={})),(function(e){e.Text=1,e.Read=2,e.Write=3})(Wc||(Wc={})),(function(e){function t(r,n){let a={range:r};return A.number(n)&&(a.kind=n),a}i(t,"create"),e.create=t})(Vc||(Vc={})),(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(qc||(qc={})),(function(e){e.Deprecated=1})(Hc||(Hc={})),(function(e){function t(r,n,a,s,o){let l={name:r,kind:n,location:{uri:s,range:a}};return o&&(l.containerName=o),l}i(t,"create"),e.create=t})(Yc||(Yc={})),(function(e){function t(r,n,a,s){return s!==void 0?{name:r,kind:n,location:{uri:a,range:s}}:{name:r,kind:n,location:{uri:a}}}i(t,"create"),e.create=t})(Xc||(Xc={})),(function(e){function t(n,a,s,o,l,u){let c={name:n,detail:a,kind:s,range:o,selectionRange:l};return u!==void 0&&(c.children=u),c}i(t,"create"),e.create=t;function r(n){let a=n;return a&&A.string(a.name)&&A.number(a.kind)&&Q.is(a.range)&&Q.is(a.selectionRange)&&(a.detail===void 0||A.string(a.detail))&&(a.deprecated===void 0||A.boolean(a.deprecated))&&(a.children===void 0||Array.isArray(a.children))&&(a.tags===void 0||Array.isArray(a.tags))}i(r,"is"),e.is=r})(Jc||(Jc={})),(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"})(Zc||(Zc={})),(function(e){e.Invoked=1,e.Automatic=2})(Xi||(Xi={})),(function(e){function t(n,a,s){let o={diagnostics:n};return a!=null&&(o.only=a),s!=null&&(o.triggerKind=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.typedArray(a.diagnostics,Vi.is)&&(a.only===void 0||A.typedArray(a.only,A.string))&&(a.triggerKind===void 0||a.triggerKind===Xi.Invoked||a.triggerKind===Xi.Automatic)}i(r,"is"),e.is=r})(Qc||(Qc={})),(function(e){function t(n,a,s){let o={title:n},l=!0;return typeof a=="string"?(l=!1,o.kind=a):nn.is(a)?o.command=a:o.edit=a,l&&s!==void 0&&(o.kind=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return a&&A.string(a.title)&&(a.diagnostics===void 0||A.typedArray(a.diagnostics,Vi.is))&&(a.kind===void 0||A.string(a.kind))&&(a.edit!==void 0||a.command!==void 0)&&(a.command===void 0||nn.is(a.command))&&(a.isPreferred===void 0||A.boolean(a.isPreferred))&&(a.edit===void 0||_o.is(a.edit))}i(r,"is"),e.is=r})(ef||(ef={})),(function(e){function t(n,a){let s={range:n};return A.defined(a)&&(s.data=a),s}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&Q.is(a.range)&&(A.undefined(a.command)||nn.is(a.command))}i(r,"is"),e.is=r})(tf||(tf={})),(function(e){function t(n,a){return{tabSize:n,insertSpaces:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.uinteger(a.tabSize)&&A.boolean(a.insertSpaces)}i(r,"is"),e.is=r})(rf||(rf={})),(function(e){function t(n,a,s){return{range:n,target:a,data:s}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&Q.is(a.range)&&(A.undefined(a.target)||A.string(a.target))}i(r,"is"),e.is=r})(nf||(nf={})),(function(e){function t(n,a){return{range:n,parent:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&Q.is(a.range)&&(a.parent===void 0||e.is(a.parent))}i(r,"is"),e.is=r})(af||(af={})),(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"})(sf||(sf={})),(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"})(of||(of={})),(function(e){function t(r){const n=r;return A.objectLiteral(n)&&(n.resultId===void 0||typeof n.resultId=="string")&&Array.isArray(n.data)&&(n.data.length===0||typeof n.data[0]=="number")}i(t,"is"),e.is=t})(lf||(lf={})),(function(e){function t(n,a){return{range:n,text:a}}i(t,"create"),e.create=t;function r(n){const a=n;return a!=null&&Q.is(a.range)&&A.string(a.text)}i(r,"is"),e.is=r})(uf||(uf={})),(function(e){function t(n,a,s){return{range:n,variableName:a,caseSensitiveLookup:s}}i(t,"create"),e.create=t;function r(n){const a=n;return a!=null&&Q.is(a.range)&&A.boolean(a.caseSensitiveLookup)&&(A.string(a.variableName)||a.variableName===void 0)}i(r,"is"),e.is=r})(cf||(cf={})),(function(e){function t(n,a){return{range:n,expression:a}}i(t,"create"),e.create=t;function r(n){const a=n;return a!=null&&Q.is(a.range)&&(A.string(a.expression)||a.expression===void 0)}i(r,"is"),e.is=r})(ff||(ff={})),(function(e){function t(n,a){return{frameId:n,stoppedLocation:a}}i(t,"create"),e.create=t;function r(n){const a=n;return A.defined(a)&&Q.is(n.stoppedLocation)}i(r,"is"),e.is=r})(df||(df={})),(function(e){e.Type=1,e.Parameter=2;function t(r){return r===1||r===2}i(t,"is"),e.is=t})(wo||(wo={})),(function(e){function t(n){return{value:n}}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&(a.tooltip===void 0||A.string(a.tooltip)||Ta.is(a.tooltip))&&(a.location===void 0||Wi.is(a.location))&&(a.command===void 0||nn.is(a.command))}i(r,"is"),e.is=r})(Io||(Io={})),(function(e){function t(n,a,s){const o={position:n,label:a};return s!==void 0&&(o.kind=s),o}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&ie.is(a.position)&&(A.string(a.label)||A.typedArray(a.label,Io.is))&&(a.kind===void 0||wo.is(a.kind))&&a.textEdits===void 0||A.typedArray(a.textEdits,Yt.is)&&(a.tooltip===void 0||A.string(a.tooltip)||Ta.is(a.tooltip))&&(a.paddingLeft===void 0||A.boolean(a.paddingLeft))&&(a.paddingRight===void 0||A.boolean(a.paddingRight))}i(r,"is"),e.is=r})(pf||(pf={})),(function(e){function t(r){return{kind:"snippet",value:r}}i(t,"createSnippet"),e.createSnippet=t})(mf||(mf={})),(function(e){function t(r,n,a,s){return{insertText:r,filterText:n,range:a,command:s}}i(t,"create"),e.create=t})(hf||(hf={})),(function(e){function t(r){return{items:r}}i(t,"create"),e.create=t})(yf||(yf={})),(function(e){e.Invoked=0,e.Automatic=1})(gf||(gf={})),(function(e){function t(r,n){return{range:r,text:n}}i(t,"create"),e.create=t})(vf||(vf={})),(function(e){function t(r,n){return{triggerKind:r,selectedCompletionInfo:n}}i(t,"create"),e.create=t})(Tf||(Tf={})),(function(e){function t(r){const n=r;return A.objectLiteral(n)&&Eo.is(n.uri)&&A.string(n.name)}i(t,"is"),e.is=t})($f||($f={})),zg=[` +import{bR as et}from"./index-HRJ6xRtC.js";var RI=Object.create,Ds=Object.defineProperty,AI=Object.getOwnPropertyDescriptor,Ad=Object.getOwnPropertyNames,EI=Object.getPrototypeOf,CI=Object.prototype.hasOwnProperty,i=(e,t)=>Ds(e,"name",{value:t,configurable:!0}),bI=(e,t)=>function(){return e&&(t=(0,e[Ad(e)[0]])(e=0)),t},H=(e,t)=>function(){return t||(0,e[Ad(e)[0]])((t={exports:{}}).exports,t),t.exports},Vr=(e,t)=>{for(var r in t)Ds(e,r,{get:t[r],enumerable:!0})},Ed=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Ad(t))!CI.call(e,a)&&a!==r&&Ds(e,a,{get:()=>t[a],enumerable:!(n=AI(t,a))||n.enumerable});return e},Ll=(e,t,r)=>(Ed(e,t,"default"),r),Cd=(e,t,r)=>(r=e!=null?RI(EI(e)):{},Ed(Ds(r,"default",{value:e,enumerable:!0}),e)),bd=e=>Ed(Ds({},"__esModule",{value:!0}),e),Dl={};Vr(Dl,{AnnotatedTextEdit:()=>mr,ChangeAnnotation:()=>an,ChangeAnnotationIdentifier:()=>Ke,CodeAction:()=>ef,CodeActionContext:()=>Qc,CodeActionKind:()=>Zc,CodeActionTriggerKind:()=>Xi,CodeDescription:()=>Nc,CodeLens:()=>tf,Color:()=>Co,ColorInformation:()=>Cc,ColorPresentation:()=>bc,Command:()=>nn,CompletionItem:()=>zc,CompletionItemKind:()=>Lc,CompletionItemLabelDetails:()=>Fc,CompletionItemTag:()=>xc,CompletionList:()=>jc,CreateFile:()=>ya,DeleteFile:()=>va,Diagnostic:()=>Vi,DiagnosticRelatedInformation:()=>bo,DiagnosticSeverity:()=>wc,DiagnosticTag:()=>Ic,DocumentHighlight:()=>Vc,DocumentHighlightKind:()=>Wc,DocumentLink:()=>nf,DocumentSymbol:()=>Jc,DocumentUri:()=>Rc,EOL:()=>zg,FoldingRange:()=>Sc,FoldingRangeKind:()=>_c,FormattingOptions:()=>rf,Hover:()=>Bc,InlayHint:()=>pf,InlayHintKind:()=>wo,InlayHintLabelPart:()=>Io,InlineCompletionContext:()=>Tf,InlineCompletionItem:()=>hf,InlineCompletionList:()=>yf,InlineCompletionTriggerKind:()=>gf,InlineValueContext:()=>df,InlineValueEvaluatableExpression:()=>ff,InlineValueText:()=>uf,InlineValueVariableLookup:()=>cf,InsertReplaceEdit:()=>Mc,InsertTextFormat:()=>Dc,InsertTextMode:()=>Gc,Location:()=>Wi,LocationLink:()=>Ec,MarkedString:()=>Yi,MarkupContent:()=>Ta,MarkupKind:()=>So,OptionalVersionedTextDocumentIdentifier:()=>Hi,ParameterInformation:()=>Uc,Position:()=>ie,Range:()=>Q,RenameFile:()=>ga,SelectedCompletionInfo:()=>vf,SelectionRange:()=>af,SemanticTokenModifiers:()=>of,SemanticTokenTypes:()=>sf,SemanticTokens:()=>lf,SignatureInformation:()=>Kc,StringValue:()=>mf,SymbolInformation:()=>Yc,SymbolKind:()=>qc,SymbolTag:()=>Hc,TextDocument:()=>Rf,TextDocumentEdit:()=>qi,TextDocumentIdentifier:()=>Pc,TextDocumentItem:()=>Oc,TextEdit:()=>Yt,URI:()=>Eo,VersionedTextDocumentIdentifier:()=>kc,WorkspaceChange:()=>Fg,WorkspaceEdit:()=>_o,WorkspaceFolder:()=>$f,WorkspaceSymbol:()=>Xc,integer:()=>Ac,uinteger:()=>Ki});var Rc,Eo,Ac,Ki,ie,Q,Wi,Ec,Co,Cc,bc,_c,Sc,bo,wc,Ic,Nc,Vi,nn,Yt,an,Ke,mr,qi,ya,ga,va,_o,ki,Ku,Fg,Pc,kc,Hi,Oc,So,Ta,Lc,Dc,xc,Mc,Gc,Fc,zc,jc,Yi,Bc,Uc,Kc,Wc,Vc,qc,Hc,Yc,Xc,Jc,Zc,Xi,Qc,ef,tf,rf,nf,af,sf,of,lf,uf,cf,ff,df,wo,Io,pf,mf,hf,yf,gf,vf,Tf,$f,zg,Rf,lh,A,xs=bI({"../../node_modules/.pnpm/vscode-languageserver-types@3.17.5/node_modules/vscode-languageserver-types/lib/esm/main.js"(){(function(e){function t(r){return typeof r=="string"}i(t,"is"),e.is=t})(Rc||(Rc={})),(function(e){function t(r){return typeof r=="string"}i(t,"is"),e.is=t})(Eo||(Eo={})),(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function t(r){return typeof r=="number"&&e.MIN_VALUE<=r&&r<=e.MAX_VALUE}i(t,"is"),e.is=t})(Ac||(Ac={})),(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function t(r){return typeof r=="number"&&e.MIN_VALUE<=r&&r<=e.MAX_VALUE}i(t,"is"),e.is=t})(Ki||(Ki={})),(function(e){function t(n,a){return n===Number.MAX_VALUE&&(n=Ki.MAX_VALUE),a===Number.MAX_VALUE&&(a=Ki.MAX_VALUE),{line:n,character:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&A.uinteger(a.line)&&A.uinteger(a.character)}i(r,"is"),e.is=r})(ie||(ie={})),(function(e){function t(n,a,s,o){if(A.uinteger(n)&&A.uinteger(a)&&A.uinteger(s)&&A.uinteger(o))return{start:ie.create(n,a),end:ie.create(s,o)};if(ie.is(n)&&ie.is(a))return{start:n,end:a};throw new Error(`Range#create called with invalid arguments[${n}, ${a}, ${s}, ${o}]`)}i(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&ie.is(a.start)&&ie.is(a.end)}i(r,"is"),e.is=r})(Q||(Q={})),(function(e){function t(n,a){return{uri:n,range:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&Q.is(a.range)&&(A.string(a.uri)||A.undefined(a.uri))}i(r,"is"),e.is=r})(Wi||(Wi={})),(function(e){function t(n,a,s,o){return{targetUri:n,targetRange:a,targetSelectionRange:s,originSelectionRange:o}}i(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&Q.is(a.targetRange)&&A.string(a.targetUri)&&Q.is(a.targetSelectionRange)&&(Q.is(a.originSelectionRange)||A.undefined(a.originSelectionRange))}i(r,"is"),e.is=r})(Ec||(Ec={})),(function(e){function t(n,a,s,o){return{red:n,green:a,blue:s,alpha:o}}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&A.numberRange(a.red,0,1)&&A.numberRange(a.green,0,1)&&A.numberRange(a.blue,0,1)&&A.numberRange(a.alpha,0,1)}i(r,"is"),e.is=r})(Co||(Co={})),(function(e){function t(n,a){return{range:n,color:a}}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&Q.is(a.range)&&Co.is(a.color)}i(r,"is"),e.is=r})(Cc||(Cc={})),(function(e){function t(n,a,s){return{label:n,textEdit:a,additionalTextEdits:s}}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&A.string(a.label)&&(A.undefined(a.textEdit)||Yt.is(a))&&(A.undefined(a.additionalTextEdits)||A.typedArray(a.additionalTextEdits,Yt.is))}i(r,"is"),e.is=r})(bc||(bc={})),(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(_c||(_c={})),(function(e){function t(n,a,s,o,l,u){const c={startLine:n,endLine:a};return A.defined(s)&&(c.startCharacter=s),A.defined(o)&&(c.endCharacter=o),A.defined(l)&&(c.kind=l),A.defined(u)&&(c.collapsedText=u),c}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&A.uinteger(a.startLine)&&A.uinteger(a.startLine)&&(A.undefined(a.startCharacter)||A.uinteger(a.startCharacter))&&(A.undefined(a.endCharacter)||A.uinteger(a.endCharacter))&&(A.undefined(a.kind)||A.string(a.kind))}i(r,"is"),e.is=r})(Sc||(Sc={})),(function(e){function t(n,a){return{location:n,message:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&Wi.is(a.location)&&A.string(a.message)}i(r,"is"),e.is=r})(bo||(bo={})),(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(wc||(wc={})),(function(e){e.Unnecessary=1,e.Deprecated=2})(Ic||(Ic={})),(function(e){function t(r){const n=r;return A.objectLiteral(n)&&A.string(n.href)}i(t,"is"),e.is=t})(Nc||(Nc={})),(function(e){function t(n,a,s,o,l,u){let c={range:n,message:a};return A.defined(s)&&(c.severity=s),A.defined(o)&&(c.code=o),A.defined(l)&&(c.source=l),A.defined(u)&&(c.relatedInformation=u),c}i(t,"create"),e.create=t;function r(n){var a;let s=n;return A.defined(s)&&Q.is(s.range)&&A.string(s.message)&&(A.number(s.severity)||A.undefined(s.severity))&&(A.integer(s.code)||A.string(s.code)||A.undefined(s.code))&&(A.undefined(s.codeDescription)||A.string((a=s.codeDescription)===null||a===void 0?void 0:a.href))&&(A.string(s.source)||A.undefined(s.source))&&(A.undefined(s.relatedInformation)||A.typedArray(s.relatedInformation,bo.is))}i(r,"is"),e.is=r})(Vi||(Vi={})),(function(e){function t(n,a,...s){let o={title:n,command:a};return A.defined(s)&&s.length>0&&(o.arguments=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.title)&&A.string(a.command)}i(r,"is"),e.is=r})(nn||(nn={})),(function(e){function t(s,o){return{range:s,newText:o}}i(t,"replace"),e.replace=t;function r(s,o){return{range:{start:s,end:s},newText:o}}i(r,"insert"),e.insert=r;function n(s){return{range:s,newText:""}}i(n,"del"),e.del=n;function a(s){const o=s;return A.objectLiteral(o)&&A.string(o.newText)&&Q.is(o.range)}i(a,"is"),e.is=a})(Yt||(Yt={})),(function(e){function t(n,a,s){const o={label:n};return a!==void 0&&(o.needsConfirmation=a),s!==void 0&&(o.description=s),o}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&A.string(a.label)&&(A.boolean(a.needsConfirmation)||a.needsConfirmation===void 0)&&(A.string(a.description)||a.description===void 0)}i(r,"is"),e.is=r})(an||(an={})),(function(e){function t(r){const n=r;return A.string(n)}i(t,"is"),e.is=t})(Ke||(Ke={})),(function(e){function t(s,o,l){return{range:s,newText:o,annotationId:l}}i(t,"replace"),e.replace=t;function r(s,o,l){return{range:{start:s,end:s},newText:o,annotationId:l}}i(r,"insert"),e.insert=r;function n(s,o){return{range:s,newText:"",annotationId:o}}i(n,"del"),e.del=n;function a(s){const o=s;return Yt.is(o)&&(an.is(o.annotationId)||Ke.is(o.annotationId))}i(a,"is"),e.is=a})(mr||(mr={})),(function(e){function t(n,a){return{textDocument:n,edits:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&Hi.is(a.textDocument)&&Array.isArray(a.edits)}i(r,"is"),e.is=r})(qi||(qi={})),(function(e){function t(n,a,s){let o={kind:"create",uri:n};return a!==void 0&&(a.overwrite!==void 0||a.ignoreIfExists!==void 0)&&(o.options=a),s!==void 0&&(o.annotationId=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return a&&a.kind==="create"&&A.string(a.uri)&&(a.options===void 0||(a.options.overwrite===void 0||A.boolean(a.options.overwrite))&&(a.options.ignoreIfExists===void 0||A.boolean(a.options.ignoreIfExists)))&&(a.annotationId===void 0||Ke.is(a.annotationId))}i(r,"is"),e.is=r})(ya||(ya={})),(function(e){function t(n,a,s,o){let l={kind:"rename",oldUri:n,newUri:a};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(l.options=s),o!==void 0&&(l.annotationId=o),l}i(t,"create"),e.create=t;function r(n){let a=n;return a&&a.kind==="rename"&&A.string(a.oldUri)&&A.string(a.newUri)&&(a.options===void 0||(a.options.overwrite===void 0||A.boolean(a.options.overwrite))&&(a.options.ignoreIfExists===void 0||A.boolean(a.options.ignoreIfExists)))&&(a.annotationId===void 0||Ke.is(a.annotationId))}i(r,"is"),e.is=r})(ga||(ga={})),(function(e){function t(n,a,s){let o={kind:"delete",uri:n};return a!==void 0&&(a.recursive!==void 0||a.ignoreIfNotExists!==void 0)&&(o.options=a),s!==void 0&&(o.annotationId=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return a&&a.kind==="delete"&&A.string(a.uri)&&(a.options===void 0||(a.options.recursive===void 0||A.boolean(a.options.recursive))&&(a.options.ignoreIfNotExists===void 0||A.boolean(a.options.ignoreIfNotExists)))&&(a.annotationId===void 0||Ke.is(a.annotationId))}i(r,"is"),e.is=r})(va||(va={})),(function(e){function t(r){let n=r;return n&&(n.changes!==void 0||n.documentChanges!==void 0)&&(n.documentChanges===void 0||n.documentChanges.every(a=>A.string(a.kind)?ya.is(a)||ga.is(a)||va.is(a):qi.is(a)))}i(t,"is"),e.is=t})(_o||(_o={})),ki=class{static{i(this,"TextEditChangeImpl")}constructor(e,t){this.edits=e,this.changeAnnotations=t}insert(e,t,r){let n,a;if(r===void 0?n=Yt.insert(e,t):Ke.is(r)?(a=r,n=mr.insert(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(r),n=mr.insert(e,t,a)),this.edits.push(n),a!==void 0)return a}replace(e,t,r){let n,a;if(r===void 0?n=Yt.replace(e,t):Ke.is(r)?(a=r,n=mr.replace(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(r),n=mr.replace(e,t,a)),this.edits.push(n),a!==void 0)return a}delete(e,t){let r,n;if(t===void 0?r=Yt.del(e):Ke.is(t)?(n=t,r=mr.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),n=this.changeAnnotations.manage(t),r=mr.del(e,n)),this.edits.push(r),n!==void 0)return n}add(e){this.edits.push(e)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(e){if(e===void 0)throw new Error("Text edit change is not configured to manage change annotations.")}},Ku=class{static{i(this,"ChangeAnnotations")}constructor(e){this._annotations=e===void 0?Object.create(null):e,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(e,t){let r;if(Ke.is(e)?r=e:(r=this.nextId(),t=e),this._annotations[r]!==void 0)throw new Error(`Id ${r} is already in use.`);if(t===void 0)throw new Error(`No annotation provided for id ${r}`);return this._annotations[r]=t,this._size++,r}nextId(){return this._counter++,this._counter.toString()}},Fg=class{static{i(this,"WorkspaceChange")}constructor(e){this._textEditChanges=Object.create(null),e!==void 0?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new Ku(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(t=>{if(qi.is(t)){const r=new ki(t.edits,this._changeAnnotations);this._textEditChanges[t.textDocument.uri]=r}})):e.changes&&Object.keys(e.changes).forEach(t=>{const r=new ki(e.changes[t]);this._textEditChanges[t]=r})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(e){if(Hi.is(e)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");const t={uri:e.uri,version:e.version};let r=this._textEditChanges[t.uri];if(!r){const n=[],a={textDocument:t,edits:n};this._workspaceEdit.documentChanges.push(a),r=new ki(n,this._changeAnnotations),this._textEditChanges[t.uri]=r}return r}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");let t=this._textEditChanges[e];if(!t){let r=[];this._workspaceEdit.changes[e]=r,t=new ki(r),this._textEditChanges[e]=t}return t}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new Ku,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))}createFile(e,t,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let n;an.is(t)||Ke.is(t)?n=t:r=t;let a,s;if(n===void 0?a=ya.create(e,r):(s=Ke.is(n)?n:this._changeAnnotations.manage(n),a=ya.create(e,r,s)),this._workspaceEdit.documentChanges.push(a),s!==void 0)return s}renameFile(e,t,r,n){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let a;an.is(r)||Ke.is(r)?a=r:n=r;let s,o;if(a===void 0?s=ga.create(e,t,n):(o=Ke.is(a)?a:this._changeAnnotations.manage(a),s=ga.create(e,t,n,o)),this._workspaceEdit.documentChanges.push(s),o!==void 0)return o}deleteFile(e,t,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let n;an.is(t)||Ke.is(t)?n=t:r=t;let a,s;if(n===void 0?a=va.create(e,r):(s=Ke.is(n)?n:this._changeAnnotations.manage(n),a=va.create(e,r,s)),this._workspaceEdit.documentChanges.push(a),s!==void 0)return s}},(function(e){function t(n){return{uri:n}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.uri)}i(r,"is"),e.is=r})(Pc||(Pc={})),(function(e){function t(n,a){return{uri:n,version:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.uri)&&A.integer(a.version)}i(r,"is"),e.is=r})(kc||(kc={})),(function(e){function t(n,a){return{uri:n,version:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.uri)&&(a.version===null||A.integer(a.version))}i(r,"is"),e.is=r})(Hi||(Hi={})),(function(e){function t(n,a,s,o){return{uri:n,languageId:a,version:s,text:o}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.uri)&&A.string(a.languageId)&&A.integer(a.version)&&A.string(a.text)}i(r,"is"),e.is=r})(Oc||(Oc={})),(function(e){e.PlainText="plaintext",e.Markdown="markdown";function t(r){const n=r;return n===e.PlainText||n===e.Markdown}i(t,"is"),e.is=t})(So||(So={})),(function(e){function t(r){const n=r;return A.objectLiteral(r)&&So.is(n.kind)&&A.string(n.value)}i(t,"is"),e.is=t})(Ta||(Ta={})),(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(Lc||(Lc={})),(function(e){e.PlainText=1,e.Snippet=2})(Dc||(Dc={})),(function(e){e.Deprecated=1})(xc||(xc={})),(function(e){function t(n,a,s){return{newText:n,insert:a,replace:s}}i(t,"create"),e.create=t;function r(n){const a=n;return a&&A.string(a.newText)&&Q.is(a.insert)&&Q.is(a.replace)}i(r,"is"),e.is=r})(Mc||(Mc={})),(function(e){e.asIs=1,e.adjustIndentation=2})(Gc||(Gc={})),(function(e){function t(r){const n=r;return n&&(A.string(n.detail)||n.detail===void 0)&&(A.string(n.description)||n.description===void 0)}i(t,"is"),e.is=t})(Fc||(Fc={})),(function(e){function t(r){return{label:r}}i(t,"create"),e.create=t})(zc||(zc={})),(function(e){function t(r,n){return{items:r||[],isIncomplete:!!n}}i(t,"create"),e.create=t})(jc||(jc={})),(function(e){function t(n){return n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}i(t,"fromPlainText"),e.fromPlainText=t;function r(n){const a=n;return A.string(a)||A.objectLiteral(a)&&A.string(a.language)&&A.string(a.value)}i(r,"is"),e.is=r})(Yi||(Yi={})),(function(e){function t(r){let n=r;return!!n&&A.objectLiteral(n)&&(Ta.is(n.contents)||Yi.is(n.contents)||A.typedArray(n.contents,Yi.is))&&(r.range===void 0||Q.is(r.range))}i(t,"is"),e.is=t})(Bc||(Bc={})),(function(e){function t(r,n){return n?{label:r,documentation:n}:{label:r}}i(t,"create"),e.create=t})(Uc||(Uc={})),(function(e){function t(r,n,...a){let s={label:r};return A.defined(n)&&(s.documentation=n),A.defined(a)?s.parameters=a:s.parameters=[],s}i(t,"create"),e.create=t})(Kc||(Kc={})),(function(e){e.Text=1,e.Read=2,e.Write=3})(Wc||(Wc={})),(function(e){function t(r,n){let a={range:r};return A.number(n)&&(a.kind=n),a}i(t,"create"),e.create=t})(Vc||(Vc={})),(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(qc||(qc={})),(function(e){e.Deprecated=1})(Hc||(Hc={})),(function(e){function t(r,n,a,s,o){let l={name:r,kind:n,location:{uri:s,range:a}};return o&&(l.containerName=o),l}i(t,"create"),e.create=t})(Yc||(Yc={})),(function(e){function t(r,n,a,s){return s!==void 0?{name:r,kind:n,location:{uri:a,range:s}}:{name:r,kind:n,location:{uri:a}}}i(t,"create"),e.create=t})(Xc||(Xc={})),(function(e){function t(n,a,s,o,l,u){let c={name:n,detail:a,kind:s,range:o,selectionRange:l};return u!==void 0&&(c.children=u),c}i(t,"create"),e.create=t;function r(n){let a=n;return a&&A.string(a.name)&&A.number(a.kind)&&Q.is(a.range)&&Q.is(a.selectionRange)&&(a.detail===void 0||A.string(a.detail))&&(a.deprecated===void 0||A.boolean(a.deprecated))&&(a.children===void 0||Array.isArray(a.children))&&(a.tags===void 0||Array.isArray(a.tags))}i(r,"is"),e.is=r})(Jc||(Jc={})),(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"})(Zc||(Zc={})),(function(e){e.Invoked=1,e.Automatic=2})(Xi||(Xi={})),(function(e){function t(n,a,s){let o={diagnostics:n};return a!=null&&(o.only=a),s!=null&&(o.triggerKind=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.typedArray(a.diagnostics,Vi.is)&&(a.only===void 0||A.typedArray(a.only,A.string))&&(a.triggerKind===void 0||a.triggerKind===Xi.Invoked||a.triggerKind===Xi.Automatic)}i(r,"is"),e.is=r})(Qc||(Qc={})),(function(e){function t(n,a,s){let o={title:n},l=!0;return typeof a=="string"?(l=!1,o.kind=a):nn.is(a)?o.command=a:o.edit=a,l&&s!==void 0&&(o.kind=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return a&&A.string(a.title)&&(a.diagnostics===void 0||A.typedArray(a.diagnostics,Vi.is))&&(a.kind===void 0||A.string(a.kind))&&(a.edit!==void 0||a.command!==void 0)&&(a.command===void 0||nn.is(a.command))&&(a.isPreferred===void 0||A.boolean(a.isPreferred))&&(a.edit===void 0||_o.is(a.edit))}i(r,"is"),e.is=r})(ef||(ef={})),(function(e){function t(n,a){let s={range:n};return A.defined(a)&&(s.data=a),s}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&Q.is(a.range)&&(A.undefined(a.command)||nn.is(a.command))}i(r,"is"),e.is=r})(tf||(tf={})),(function(e){function t(n,a){return{tabSize:n,insertSpaces:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.uinteger(a.tabSize)&&A.boolean(a.insertSpaces)}i(r,"is"),e.is=r})(rf||(rf={})),(function(e){function t(n,a,s){return{range:n,target:a,data:s}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&Q.is(a.range)&&(A.undefined(a.target)||A.string(a.target))}i(r,"is"),e.is=r})(nf||(nf={})),(function(e){function t(n,a){return{range:n,parent:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&Q.is(a.range)&&(a.parent===void 0||e.is(a.parent))}i(r,"is"),e.is=r})(af||(af={})),(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"})(sf||(sf={})),(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"})(of||(of={})),(function(e){function t(r){const n=r;return A.objectLiteral(n)&&(n.resultId===void 0||typeof n.resultId=="string")&&Array.isArray(n.data)&&(n.data.length===0||typeof n.data[0]=="number")}i(t,"is"),e.is=t})(lf||(lf={})),(function(e){function t(n,a){return{range:n,text:a}}i(t,"create"),e.create=t;function r(n){const a=n;return a!=null&&Q.is(a.range)&&A.string(a.text)}i(r,"is"),e.is=r})(uf||(uf={})),(function(e){function t(n,a,s){return{range:n,variableName:a,caseSensitiveLookup:s}}i(t,"create"),e.create=t;function r(n){const a=n;return a!=null&&Q.is(a.range)&&A.boolean(a.caseSensitiveLookup)&&(A.string(a.variableName)||a.variableName===void 0)}i(r,"is"),e.is=r})(cf||(cf={})),(function(e){function t(n,a){return{range:n,expression:a}}i(t,"create"),e.create=t;function r(n){const a=n;return a!=null&&Q.is(a.range)&&(A.string(a.expression)||a.expression===void 0)}i(r,"is"),e.is=r})(ff||(ff={})),(function(e){function t(n,a){return{frameId:n,stoppedLocation:a}}i(t,"create"),e.create=t;function r(n){const a=n;return A.defined(a)&&Q.is(n.stoppedLocation)}i(r,"is"),e.is=r})(df||(df={})),(function(e){e.Type=1,e.Parameter=2;function t(r){return r===1||r===2}i(t,"is"),e.is=t})(wo||(wo={})),(function(e){function t(n){return{value:n}}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&(a.tooltip===void 0||A.string(a.tooltip)||Ta.is(a.tooltip))&&(a.location===void 0||Wi.is(a.location))&&(a.command===void 0||nn.is(a.command))}i(r,"is"),e.is=r})(Io||(Io={})),(function(e){function t(n,a,s){const o={position:n,label:a};return s!==void 0&&(o.kind=s),o}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&ie.is(a.position)&&(A.string(a.label)||A.typedArray(a.label,Io.is))&&(a.kind===void 0||wo.is(a.kind))&&a.textEdits===void 0||A.typedArray(a.textEdits,Yt.is)&&(a.tooltip===void 0||A.string(a.tooltip)||Ta.is(a.tooltip))&&(a.paddingLeft===void 0||A.boolean(a.paddingLeft))&&(a.paddingRight===void 0||A.boolean(a.paddingRight))}i(r,"is"),e.is=r})(pf||(pf={})),(function(e){function t(r){return{kind:"snippet",value:r}}i(t,"createSnippet"),e.createSnippet=t})(mf||(mf={})),(function(e){function t(r,n,a,s){return{insertText:r,filterText:n,range:a,command:s}}i(t,"create"),e.create=t})(hf||(hf={})),(function(e){function t(r){return{items:r}}i(t,"create"),e.create=t})(yf||(yf={})),(function(e){e.Invoked=0,e.Automatic=1})(gf||(gf={})),(function(e){function t(r,n){return{range:r,text:n}}i(t,"create"),e.create=t})(vf||(vf={})),(function(e){function t(r,n){return{triggerKind:r,selectedCompletionInfo:n}}i(t,"create"),e.create=t})(Tf||(Tf={})),(function(e){function t(r){const n=r;return A.objectLiteral(n)&&Eo.is(n.uri)&&A.string(n.name)}i(t,"is"),e.is=t})($f||($f={})),zg=[` `,`\r `,"\r"],(function(e){function t(s,o,l,u){return new lh(s,o,l,u)}i(t,"create"),e.create=t;function r(s){let o=s;return!!(A.defined(o)&&A.string(o.uri)&&(A.undefined(o.languageId)||A.string(o.languageId))&&A.uinteger(o.lineCount)&&A.func(o.getText)&&A.func(o.positionAt)&&A.func(o.offsetAt))}i(r,"is"),e.is=r;function n(s,o){let l=s.getText(),u=a(o,(f,d)=>{let m=f.range.start.line-d.range.start.line;return m===0?f.range.start.character-d.range.start.character:m}),c=l.length;for(let f=u.length-1;f>=0;f--){let d=u[f],m=s.offsetAt(d.range.start),g=s.offsetAt(d.range.end);if(g<=c)l=l.substring(0,m)+d.newText+l.substring(g,l.length);else throw new Error("Overlapping edit");c=m}return l}i(n,"applyEdits"),e.applyEdits=n;function a(s,o){if(s.length<=1)return s;const l=s.length/2|0,u=s.slice(0,l),c=s.slice(l);a(u,o),a(c,o);let f=0,d=0,m=0;for(;f({domains:new Map,transitions:[]}),"createDefaultData"),H=rt(),St=s(()=>H.domains,"getDomains"),Mt=s(()=>H.transitions,"getTransitions"),zt=s(t=>{if(t)for(const e of t){const n=e.domain,a=(e.items??[]).map(c=>({label:c.label}));H.domains.set(n,{name:n,items:a})}},"setDomains"),Lt=s(t=>{t&&(H.transitions=t.filter(e=>e.from===e.to?(O.warn(`Cynefin: self-loop transition on domain "${e.from}" is not meaningful and will be skipped.`),!1):!0).map(e=>({from:e.from,to:e.to,label:e.label||void 0})))},"setTransitions"),Nt=s(()=>U({...At.cynefin,...Q().cynefin}),"getConfig"),Pt=s(()=>{Tt(),H=rt()},"clear"),Y={getDomains:St,getTransitions:Mt,setDomains:zt,setTransitions:Lt,getConfig:Nt,clear:Pt,setAccTitle:vt,getAccTitle:Ct,setDiagramTitle:wt,getDiagramTitle:bt,getAccDescription:$t,setAccDescription:gt},Wt=s(t=>{xt(t,Y),Y.setDomains(t.domains),Y.setTransitions(t.transitions)},"populate"),It={parse:s(async t=>{const e=await Bt("cynefin",t);O.debug(e),Wt(e)},"parse")};function E(t){let e=t+1831565813|0;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}s(E,"seededRandom");function st(t){let e=0;for(let n=0;n{const n=t/2,a=e/2;return{complex:{cx:n/2,cy:a/2,x:0,y:0,w:n,h:a},complicated:{cx:n+n/2,cy:a/2,x:n,y:0,w:n,h:a},chaotic:{cx:n/2,cy:a+a/2,x:0,y:a,w:n,h:a},clear:{cx:n+n/2,cy:a+a/2,x:n,y:a,w:n,h:a},confusion:{cx:n,cy:a,x:n*.7,y:a*.7,w:n*.6,h:a*.6}}},"getDomainLayouts"),Rt=s(()=>{const t=ot(),e=Q();return U(t,e.themeVariables).cynefin},"getCynefinDomainColors"),q=3,_t=s((t,e,n,a)=>{const c=a.db,m=c.getDomains(),v=c.getTransitions(),I=c.getDiagramTitle(),d=c.getAccTitle(),D=c.getAccDescription(),o=c.getConfig(),p=Rt();O.debug("Rendering Cynefin diagram");const i=o.width,f=o.height,b=o.padding,h=o.showDomainDescriptions,F=o.boundaryAmplitude,R=i+b*2,_=f+b*2,z={complex:p.complexBg,complicated:p.complicatedBg,clear:p.clearBg,chaotic:p.chaoticBg,confusion:p.confusionBg},k=Dt(e);kt(k,_,R,o.useMaxWidth??!0),k.attr("viewBox",`0 0 ${R} ${_}`),d&&k.append("title").text(d),D&&k.append("desc").text(D);const T=k.append("g").attr("transform",`translate(${b}, ${b})`),V=Ft(i,f),Z=it(o.seed,e),mt=T.append("g").attr("class","cynefin-backgrounds"),X=["complex","complicated","chaotic","clear"];for(const l of X){const r=V[l];mt.append("rect").attr("class","cynefinDomain").attr("x",r.x).attr("y",r.y).attr("width",r.w).attr("height",r.h).attr("fill",z[l]).attr("fill-opacity",.4).attr("stroke","none")}const j=T.append("g").attr("class","cynefin-boundaries");j.append("path").attr("class","cynefinBoundary").attr("d",ct(i,f,Z,F)).attr("fill","none"),j.append("path").attr("class","cynefinBoundary").attr("d",lt(i,f,Z+100,F)).attr("fill","none"),j.append("path").attr("class","cynefinCliff").attr("d",dt(i,f)).attr("fill","none");const pt=i*.15,yt=f*.15;T.append("path").attr("class","cynefinConfusion").attr("d",ft(i/2,f/2,pt,yt)).attr("fill",z.confusion).attr("fill-opacity",.5);const J=T.append("g").attr("class","cynefin-labels");for(const l of X){const r=V[l];J.append("text").attr("class","cynefinDomainLabel").attr("x",r.cx).attr("y",h?r.cy-30:r.cy).attr("text-anchor","middle").attr("dominant-baseline","middle").text(l.charAt(0).toUpperCase()+l.slice(1))}if(J.append("text").attr("class","cynefinDomainLabel").attr("x",i/2).attr("y",h?f/2-10:f/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text("Confusion"),h){const l=T.append("g").attr("class","cynefin-subtitles");for(const r of X){const u=V[r],y=at[r];l.append("text").attr("class","cynefinSubtitle").attr("x",u.cx).attr("y",u.cy-10).attr("text-anchor","middle").attr("dominant-baseline","middle").text(y.model),l.append("text").attr("class","cynefinSubtitle").attr("x",u.cx).attr("y",u.cy+5).attr("text-anchor","middle").attr("dominant-baseline","middle").text(y.practice)}l.append("text").attr("class","cynefinSubtitle").attr("x",i/2).attr("y",f/2+8).attr("text-anchor","middle").attr("dominant-baseline","middle").text(at.confusion.practice)}const K=T.append("g").attr("class","cynefin-items"),A=26,tt=10,ut=["complex","complicated","chaotic","clear","confusion"];for(const l of ut){const r=m.get(l);if(!r||r.items.length===0)continue;const u=V[l],y=l==="confusion";let L=r.items,N=0;y&&r.items.length>q&&(N=r.items.length-q,L=r.items.slice(0,q));let B;if(y){const g=h?22:14;B=u.cy+g}else B=u.cy+(h?25:15);if([...L].forEach((g,S)=>{const w=B+S*(A+4),M=K.append("g"),P=M.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",A/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(g.label);let $=g.label.length*7;const x=P.node();if(x&&typeof x.getBBox=="function"){const G=x.getBBox();G.width>0&&($=G.width)}const C=$+tt*2,W=u.cx-C/2;M.attr("transform",`translate(${W}, ${w})`),M.insert("rect","text").attr("class","cynefinItem").attr("x",0).attr("y",0).attr("width",C).attr("height",A).attr("rx",4).attr("ry",4).attr("fill",z[l]).attr("fill-opacity",.95),P.attr("x",C/2).attr("y",A/2)}),N>0){const g=B+L.length*(A+4),S=`+${N} more`,w=K.append("g"),M=w.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",A/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(S);let P=S.length*7;const $=M.node();if($&&typeof $.getBBox=="function"){const W=$.getBBox();W.width>0&&(P=W.width)}const x=P+tt*2,C=u.cx-x/2;w.attr("transform",`translate(${C}, ${g})`),w.insert("rect","text").attr("class","cynefinItemOverflow").attr("x",0).attr("y",0).attr("width",x).attr("height",A).attr("rx",4).attr("ry",4).attr("fill",z[l]).attr("fill-opacity",.6),M.attr("x",x/2).attr("y",A/2)}}if(v.length>0){const l=k.select("defs").empty()?k.append("defs"):k.select("defs"),r=`cynefin-arrow-${e}`;l.append("marker").attr("id",r).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","cynefinArrowHead");const u=T.append("g").attr("class","cynefin-arrows");v.forEach(y=>{const L=V[y.from],N=V[y.to];if(!L||!N)return;if(y.from===y.to){O.warn(`Cynefin renderer: skipping self-loop on domain "${y.from}"`);return}const B=L.cx,g=L.cy,S=N.cx,w=N.cy,M=(B+S)/2,P=(g+w)/2,$=S-B,x=w-g,C=Math.sqrt($*$+x*x),W=C*.15,G=-x/C,ht=$/C,et=M+G*W,nt=P+ht*W;u.append("path").attr("class","cynefinArrowLine").attr("d",`M${B},${g} Q${et},${nt} ${S},${w}`).attr("fill","none").attr("marker-end",`url(#${r})`),y.label&&u.append("text").attr("class","cynefinArrowLabel").attr("x",et).attr("y",nt-6).attr("text-anchor","middle").attr("dominant-baseline","auto").text(y.label)})}I&&T.append("text").attr("class","cynefinTitle").attr("x",i/2).attr("y",-b/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text(I)},"draw"),Vt={draw:_t},Et=s(()=>{const t=ot(),e=Q();return U(t,e.themeVariables).cynefin},"getCynefinTheme"),Ht=s(()=>{const t=Et();return` +import{p as xt}from"./chunk-JWPE2WC7-DTx-f56M.js";import{s as gt,g as $t,p as bt,o as wt,a as Ct,b as vt,_ as s,l as O,F as Dt,e as kt,q as Tt,B as U,z as Q,D as At,W as ot}from"./mermaid.core-Cahi9cr1.js";import{p as Bt}from"./cynefin-VYW2F7L2-C5gNr-Q4.js";import"./index-HRJ6xRtC.js";import"./_commonjsHelpers-CqkleIqs.js";var rt=s(()=>({domains:new Map,transitions:[]}),"createDefaultData"),H=rt(),St=s(()=>H.domains,"getDomains"),Mt=s(()=>H.transitions,"getTransitions"),zt=s(t=>{if(t)for(const e of t){const n=e.domain,a=(e.items??[]).map(c=>({label:c.label}));H.domains.set(n,{name:n,items:a})}},"setDomains"),Lt=s(t=>{t&&(H.transitions=t.filter(e=>e.from===e.to?(O.warn(`Cynefin: self-loop transition on domain "${e.from}" is not meaningful and will be skipped.`),!1):!0).map(e=>({from:e.from,to:e.to,label:e.label||void 0})))},"setTransitions"),Nt=s(()=>U({...At.cynefin,...Q().cynefin}),"getConfig"),Pt=s(()=>{Tt(),H=rt()},"clear"),Y={getDomains:St,getTransitions:Mt,setDomains:zt,setTransitions:Lt,getConfig:Nt,clear:Pt,setAccTitle:vt,getAccTitle:Ct,setDiagramTitle:wt,getDiagramTitle:bt,getAccDescription:$t,setAccDescription:gt},Wt=s(t=>{xt(t,Y),Y.setDomains(t.domains),Y.setTransitions(t.transitions)},"populate"),It={parse:s(async t=>{const e=await Bt("cynefin",t);O.debug(e),Wt(e)},"parse")};function E(t){let e=t+1831565813|0;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}s(E,"seededRandom");function st(t){let e=0;for(let n=0;n{const n=t/2,a=e/2;return{complex:{cx:n/2,cy:a/2,x:0,y:0,w:n,h:a},complicated:{cx:n+n/2,cy:a/2,x:n,y:0,w:n,h:a},chaotic:{cx:n/2,cy:a+a/2,x:0,y:a,w:n,h:a},clear:{cx:n+n/2,cy:a+a/2,x:n,y:a,w:n,h:a},confusion:{cx:n,cy:a,x:n*.7,y:a*.7,w:n*.6,h:a*.6}}},"getDomainLayouts"),Rt=s(()=>{const t=ot(),e=Q();return U(t,e.themeVariables).cynefin},"getCynefinDomainColors"),q=3,_t=s((t,e,n,a)=>{const c=a.db,m=c.getDomains(),v=c.getTransitions(),I=c.getDiagramTitle(),d=c.getAccTitle(),D=c.getAccDescription(),o=c.getConfig(),p=Rt();O.debug("Rendering Cynefin diagram");const i=o.width,f=o.height,b=o.padding,h=o.showDomainDescriptions,F=o.boundaryAmplitude,R=i+b*2,_=f+b*2,z={complex:p.complexBg,complicated:p.complicatedBg,clear:p.clearBg,chaotic:p.chaoticBg,confusion:p.confusionBg},k=Dt(e);kt(k,_,R,o.useMaxWidth??!0),k.attr("viewBox",`0 0 ${R} ${_}`),d&&k.append("title").text(d),D&&k.append("desc").text(D);const T=k.append("g").attr("transform",`translate(${b}, ${b})`),V=Ft(i,f),Z=it(o.seed,e),mt=T.append("g").attr("class","cynefin-backgrounds"),X=["complex","complicated","chaotic","clear"];for(const l of X){const r=V[l];mt.append("rect").attr("class","cynefinDomain").attr("x",r.x).attr("y",r.y).attr("width",r.w).attr("height",r.h).attr("fill",z[l]).attr("fill-opacity",.4).attr("stroke","none")}const j=T.append("g").attr("class","cynefin-boundaries");j.append("path").attr("class","cynefinBoundary").attr("d",ct(i,f,Z,F)).attr("fill","none"),j.append("path").attr("class","cynefinBoundary").attr("d",lt(i,f,Z+100,F)).attr("fill","none"),j.append("path").attr("class","cynefinCliff").attr("d",dt(i,f)).attr("fill","none");const pt=i*.15,yt=f*.15;T.append("path").attr("class","cynefinConfusion").attr("d",ft(i/2,f/2,pt,yt)).attr("fill",z.confusion).attr("fill-opacity",.5);const J=T.append("g").attr("class","cynefin-labels");for(const l of X){const r=V[l];J.append("text").attr("class","cynefinDomainLabel").attr("x",r.cx).attr("y",h?r.cy-30:r.cy).attr("text-anchor","middle").attr("dominant-baseline","middle").text(l.charAt(0).toUpperCase()+l.slice(1))}if(J.append("text").attr("class","cynefinDomainLabel").attr("x",i/2).attr("y",h?f/2-10:f/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text("Confusion"),h){const l=T.append("g").attr("class","cynefin-subtitles");for(const r of X){const u=V[r],y=at[r];l.append("text").attr("class","cynefinSubtitle").attr("x",u.cx).attr("y",u.cy-10).attr("text-anchor","middle").attr("dominant-baseline","middle").text(y.model),l.append("text").attr("class","cynefinSubtitle").attr("x",u.cx).attr("y",u.cy+5).attr("text-anchor","middle").attr("dominant-baseline","middle").text(y.practice)}l.append("text").attr("class","cynefinSubtitle").attr("x",i/2).attr("y",f/2+8).attr("text-anchor","middle").attr("dominant-baseline","middle").text(at.confusion.practice)}const K=T.append("g").attr("class","cynefin-items"),A=26,tt=10,ut=["complex","complicated","chaotic","clear","confusion"];for(const l of ut){const r=m.get(l);if(!r||r.items.length===0)continue;const u=V[l],y=l==="confusion";let L=r.items,N=0;y&&r.items.length>q&&(N=r.items.length-q,L=r.items.slice(0,q));let B;if(y){const g=h?22:14;B=u.cy+g}else B=u.cy+(h?25:15);if([...L].forEach((g,S)=>{const w=B+S*(A+4),M=K.append("g"),P=M.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",A/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(g.label);let $=g.label.length*7;const x=P.node();if(x&&typeof x.getBBox=="function"){const G=x.getBBox();G.width>0&&($=G.width)}const C=$+tt*2,W=u.cx-C/2;M.attr("transform",`translate(${W}, ${w})`),M.insert("rect","text").attr("class","cynefinItem").attr("x",0).attr("y",0).attr("width",C).attr("height",A).attr("rx",4).attr("ry",4).attr("fill",z[l]).attr("fill-opacity",.95),P.attr("x",C/2).attr("y",A/2)}),N>0){const g=B+L.length*(A+4),S=`+${N} more`,w=K.append("g"),M=w.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",A/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(S);let P=S.length*7;const $=M.node();if($&&typeof $.getBBox=="function"){const W=$.getBBox();W.width>0&&(P=W.width)}const x=P+tt*2,C=u.cx-x/2;w.attr("transform",`translate(${C}, ${g})`),w.insert("rect","text").attr("class","cynefinItemOverflow").attr("x",0).attr("y",0).attr("width",x).attr("height",A).attr("rx",4).attr("ry",4).attr("fill",z[l]).attr("fill-opacity",.6),M.attr("x",x/2).attr("y",A/2)}}if(v.length>0){const l=k.select("defs").empty()?k.append("defs"):k.select("defs"),r=`cynefin-arrow-${e}`;l.append("marker").attr("id",r).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","cynefinArrowHead");const u=T.append("g").attr("class","cynefin-arrows");v.forEach(y=>{const L=V[y.from],N=V[y.to];if(!L||!N)return;if(y.from===y.to){O.warn(`Cynefin renderer: skipping self-loop on domain "${y.from}"`);return}const B=L.cx,g=L.cy,S=N.cx,w=N.cy,M=(B+S)/2,P=(g+w)/2,$=S-B,x=w-g,C=Math.sqrt($*$+x*x),W=C*.15,G=-x/C,ht=$/C,et=M+G*W,nt=P+ht*W;u.append("path").attr("class","cynefinArrowLine").attr("d",`M${B},${g} Q${et},${nt} ${S},${w}`).attr("fill","none").attr("marker-end",`url(#${r})`),y.label&&u.append("text").attr("class","cynefinArrowLabel").attr("x",et).attr("y",nt-6).attr("text-anchor","middle").attr("dominant-baseline","auto").text(y.label)})}I&&T.append("text").attr("class","cynefinTitle").attr("x",i/2).attr("y",-b/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text(I)},"draw"),Vt={draw:_t},Et=s(()=>{const t=ot(),e=Q();return U(t,e.themeVariables).cynefin},"getCynefinTheme"),Ht=s(()=>{const t=Et();return` .cynefinDomain { stroke: none; } diff --git a/apps/kimi-code/dist-web/assets/dagre-VKFMJZFB-BbS-B0nZ.js b/apps/kimi-code/dist-web/assets/dagre-VKFMJZFB-CDFnWuZ_.js similarity index 97% rename from apps/kimi-code/dist-web/assets/dagre-VKFMJZFB-BbS-B0nZ.js rename to apps/kimi-code/dist-web/assets/dagre-VKFMJZFB-CDFnWuZ_.js index 108e19c16b..f6280a8f8a 100644 --- a/apps/kimi-code/dist-web/assets/dagre-VKFMJZFB-BbS-B0nZ.js +++ b/apps/kimi-code/dist-web/assets/dagre-VKFMJZFB-CDFnWuZ_.js @@ -1,4 +1,4 @@ -import{c as O,w as I,a as J,f as P,b as E,s as A}from"./chunk-RYQCIY6F-nfBZcgde.js";import{_ as w,am as v,an as D,ao as H,ap as Y,l,c as _,aq as W,ar as $,ag as j,as as q,ah as R,af as F,at as z,au as K,av as G}from"./mermaid.core-BMAf1qng.js";import{G as Q}from"./graph-DOmOIIwC.js";import{l as U}from"./layout-D-LzfAck.js";import"./map-DxJ2ADlA.js";import"./index-B-HzRssS.js";import"./_commonjsHelpers-CqkleIqs.js";var C=w((s,t,g)=>Math.max(t,Math.min(g,s)),"clamp"),B=w((s="TB")=>{switch(s){case"BT":return"bottom";case"LR":return"right";case"RL":return"left";case"TB":default:return"top"}},"getDefaultSelfLoopSide"),V=w(s=>s==="flowchart"||s==="flowchart-v2"||s==="stateDiagram","shouldMergeSelfLoopSegments"),Z=w((s,t,g,m,c)=>{const o=[],r=new Set;if(g.forEach(({start:i,end:n})=>{i!==m&&r.add(i),n!==m&&r.add(n)}),r.forEach(i=>{const n=s.node(i);typeof n?.x=="number"&&typeof n?.y=="number"&&o.push(n)}),o.length===0&&g.forEach(({edge:i})=>{(i.points??[]).forEach(n=>{typeof n?.x=="number"&&typeof n?.y=="number"&&o.push(n)})}),o.length===0)return B(c);const f=o.reduce((i,n)=>({x:i.x+n.x/o.length,y:i.y+n.y/o.length}),{x:0,y:0}),h=f.x-t.x,a=f.y-t.y;return Math.abs(h)>Math.abs(a)?h>0?"right":"left":Math.abs(a)>0?a>0?"bottom":"top":B(c)},"getSelfLoopSide"),ee=w((s,t="top",g=0,m=0)=>{const c=s.x,o=s.y-g,r=s.width/2,f=s.height/2,h=Math.max(36,Math.min(100,s.width*.8)),a=C(Math.max(m,s.width*.35),36,h),i=C(Math.min(s.width,s.height)*.45,24,48);switch(t){case"bottom":{const n=o+f;return[{x:c-a/2,y:n},{x:c-a/2,y:n+i},{x:c+a/2,y:n+i},{x:c+a/2,y:n}]}case"right":{const n=c+r;return[{x:n,y:o-a/2},{x:n+i,y:o-a/2},{x:n+i,y:o+a/2},{x:n,y:o+a/2}]}case"left":{const n=c-r;return[{x:n,y:o-a/2},{x:n-i,y:o-a/2},{x:n-i,y:o+a/2},{x:n,y:o+a/2}]}case"top":default:{const n=o-f;return[{x:c-a/2,y:n},{x:c-a/2,y:n-i},{x:c+a/2,y:n-i},{x:c+a/2,y:n}]}}},"getSelfLoopPoints"),te=w((s,t,g="top",m=0,c={})=>{const r=s.x,f=s.y-m,h=c.width??0,a=c.height??0;switch(g){case"bottom":return{x:r,y:Math.max(...t.map(i=>i.y))+a/2+4};case"right":return{x:Math.max(...t.map(i=>i.x))+h/2+4,y:f};case"left":return{x:Math.min(...t.map(i=>i.x))-h/2-4,y:f};case"top":default:return{x:r,y:Math.min(...t.map(i=>i.y))-a/2-4}}},"getSelfLoopLabelPosition"),ne=w((s,t=0,{mergeSelfLoops:g=!0}={})=>{const m=new Map,c=[],o=s.graph()?.rankdir;return s.edges().forEach(r=>{const f=s.edge(r);if(g&&f.selfLoop){const h=f.selfLoop.id;m.has(h)||m.set(h,[]),m.get(h).push({edge:f,start:r.v,end:r.w})}else c.push({edge:f,start:r.v,end:r.w})}),m.forEach(r=>{if(r.length!==3){r.forEach(L=>c.push(L));return}r.sort((L,d)=>L.edge.selfLoop.order-d.edge.selfLoop.order);const[f,h,a]=r,i=f.edge.originalEdge??h.edge.originalEdge??a.edge.originalEdge??h.edge,n=s.node(i.start);if(!n){r.forEach(L=>c.push(L));return}const p={width:h.edge.width,height:h.edge.height},y=Z(s,n,r,i.start,o),X=ee(n,y,t,p.width??0),S=te(n,X,y,t,p),b={...h.edge,...i,id:i.id,points:X,start:i.start,end:i.end,x:S.x,y:S.y,width:p.width,height:p.height,labelStyle:h.edge.labelStyle,fromCluster:f.edge.fromCluster??h.edge.fromCluster??a.edge.fromCluster,toCluster:f.edge.toCluster??h.edge.toCluster??a.edge.toCluster};delete b.selfLoop,delete b.originalEdge,c.push({edge:b,start:b.start,end:b.end})}),c},"getEdgesToRender"),T=w(async(s,t,g,m,c,o)=>{l.warn("Graph in recursive render:XAX",I(t),c);const r=t.graph().rankdir;l.trace("Dir in recursive render - dir:",r);const f=s.insert("g").attr("class","root");t.nodes()?l.info("Recursive render XXX",t.nodes()):l.info("No nodes found for",t),t.edges().length>0&&l.info("Recursive edges",t.edge(t.edges()[0]));const h=f.insert("g").attr("class","clusters"),a=f.insert("g").attr("class","edgePaths"),i=f.insert("g").attr("class","edgeLabels"),n=f.insert("g").attr("class","nodes"),p=V(g);await Promise.all(t.nodes().map(async function(d){const e=t.node(d);if(c!==void 0){const u=JSON.parse(JSON.stringify(c.clusterData));l.trace(`Setting data for parent cluster XXX +import{c as O,w as I,a as J,f as P,b as E,s as A}from"./chunk-RYQCIY6F-BHZEnq1y.js";import{_ as w,am as v,an as D,ao as H,ap as Y,l,c as _,aq as W,ar as $,ag as j,as as q,ah as R,af as F,at as z,au as K,av as G}from"./mermaid.core-Cahi9cr1.js";import{G as Q}from"./graph-DOmOIIwC.js";import{l as U}from"./layout-D-LzfAck.js";import"./map-DxJ2ADlA.js";import"./index-HRJ6xRtC.js";import"./_commonjsHelpers-CqkleIqs.js";var C=w((s,t,g)=>Math.max(t,Math.min(g,s)),"clamp"),B=w((s="TB")=>{switch(s){case"BT":return"bottom";case"LR":return"right";case"RL":return"left";case"TB":default:return"top"}},"getDefaultSelfLoopSide"),V=w(s=>s==="flowchart"||s==="flowchart-v2"||s==="stateDiagram","shouldMergeSelfLoopSegments"),Z=w((s,t,g,m,c)=>{const o=[],r=new Set;if(g.forEach(({start:i,end:n})=>{i!==m&&r.add(i),n!==m&&r.add(n)}),r.forEach(i=>{const n=s.node(i);typeof n?.x=="number"&&typeof n?.y=="number"&&o.push(n)}),o.length===0&&g.forEach(({edge:i})=>{(i.points??[]).forEach(n=>{typeof n?.x=="number"&&typeof n?.y=="number"&&o.push(n)})}),o.length===0)return B(c);const f=o.reduce((i,n)=>({x:i.x+n.x/o.length,y:i.y+n.y/o.length}),{x:0,y:0}),h=f.x-t.x,a=f.y-t.y;return Math.abs(h)>Math.abs(a)?h>0?"right":"left":Math.abs(a)>0?a>0?"bottom":"top":B(c)},"getSelfLoopSide"),ee=w((s,t="top",g=0,m=0)=>{const c=s.x,o=s.y-g,r=s.width/2,f=s.height/2,h=Math.max(36,Math.min(100,s.width*.8)),a=C(Math.max(m,s.width*.35),36,h),i=C(Math.min(s.width,s.height)*.45,24,48);switch(t){case"bottom":{const n=o+f;return[{x:c-a/2,y:n},{x:c-a/2,y:n+i},{x:c+a/2,y:n+i},{x:c+a/2,y:n}]}case"right":{const n=c+r;return[{x:n,y:o-a/2},{x:n+i,y:o-a/2},{x:n+i,y:o+a/2},{x:n,y:o+a/2}]}case"left":{const n=c-r;return[{x:n,y:o-a/2},{x:n-i,y:o-a/2},{x:n-i,y:o+a/2},{x:n,y:o+a/2}]}case"top":default:{const n=o-f;return[{x:c-a/2,y:n},{x:c-a/2,y:n-i},{x:c+a/2,y:n-i},{x:c+a/2,y:n}]}}},"getSelfLoopPoints"),te=w((s,t,g="top",m=0,c={})=>{const r=s.x,f=s.y-m,h=c.width??0,a=c.height??0;switch(g){case"bottom":return{x:r,y:Math.max(...t.map(i=>i.y))+a/2+4};case"right":return{x:Math.max(...t.map(i=>i.x))+h/2+4,y:f};case"left":return{x:Math.min(...t.map(i=>i.x))-h/2-4,y:f};case"top":default:return{x:r,y:Math.min(...t.map(i=>i.y))-a/2-4}}},"getSelfLoopLabelPosition"),ne=w((s,t=0,{mergeSelfLoops:g=!0}={})=>{const m=new Map,c=[],o=s.graph()?.rankdir;return s.edges().forEach(r=>{const f=s.edge(r);if(g&&f.selfLoop){const h=f.selfLoop.id;m.has(h)||m.set(h,[]),m.get(h).push({edge:f,start:r.v,end:r.w})}else c.push({edge:f,start:r.v,end:r.w})}),m.forEach(r=>{if(r.length!==3){r.forEach(L=>c.push(L));return}r.sort((L,d)=>L.edge.selfLoop.order-d.edge.selfLoop.order);const[f,h,a]=r,i=f.edge.originalEdge??h.edge.originalEdge??a.edge.originalEdge??h.edge,n=s.node(i.start);if(!n){r.forEach(L=>c.push(L));return}const p={width:h.edge.width,height:h.edge.height},y=Z(s,n,r,i.start,o),X=ee(n,y,t,p.width??0),S=te(n,X,y,t,p),b={...h.edge,...i,id:i.id,points:X,start:i.start,end:i.end,x:S.x,y:S.y,width:p.width,height:p.height,labelStyle:h.edge.labelStyle,fromCluster:f.edge.fromCluster??h.edge.fromCluster??a.edge.fromCluster,toCluster:f.edge.toCluster??h.edge.toCluster??a.edge.toCluster};delete b.selfLoop,delete b.originalEdge,c.push({edge:b,start:b.start,end:b.end})}),c},"getEdgesToRender"),T=w(async(s,t,g,m,c,o)=>{l.warn("Graph in recursive render:XAX",I(t),c);const r=t.graph().rankdir;l.trace("Dir in recursive render - dir:",r);const f=s.insert("g").attr("class","root");t.nodes()?l.info("Recursive render XXX",t.nodes()):l.info("No nodes found for",t),t.edges().length>0&&l.info("Recursive edges",t.edge(t.edges()[0]));const h=f.insert("g").attr("class","clusters"),a=f.insert("g").attr("class","edgePaths"),i=f.insert("g").attr("class","edgeLabels"),n=f.insert("g").attr("class","nodes"),p=V(g);await Promise.all(t.nodes().map(async function(d){const e=t.node(d);if(c!==void 0){const u=JSON.parse(JSON.stringify(c.clusterData));l.trace(`Setting data for parent cluster XXX Node.id = `,d,` data=`,u.height,` Parent cluster`,c.height),t.setNode(c.id,u),t.parent(d)||(l.trace("Setting parent",d,c.id),t.setParent(d,c.id,u))}if(l.info("(Insert) Node XXX"+d+": "+JSON.stringify(t.node(d))),e?.clusterNode){l.info("Cluster identified XBX",d,e.width,t.node(d));const{ranksep:u,nodesep:x}=t.graph();e.graph.setGraph({...e.graph.graph(),ranksep:u+25,nodesep:x});const N=await T(n,e.graph,g,m,t.node(d),o),M=N.elem;W(e,M),e.diff=N.diff||0,l.info("New compound node after recursive render XAX",d,"width",e.width,"height",e.height),$(M,e)}else t.children(d).length>0?(l.trace("Cluster - the non recursive path XBX",d,e.id,e,e.width,"Graph:",t),l.trace(P(e.id,t)),E.set(e.id,{id:P(e.id,t),node:e})):(l.trace("Node - the non recursive path XAX",d,n,t.node(d),r),await j(n,t.node(d),{config:o,dir:r}))})),await w(async()=>{const d=t.edges().map(async function(e){const u=t.edge(e.v,e.w,e.name);if(l.info("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e)),l.info("Edge "+e.v+" -> "+e.w+": ",e," ",JSON.stringify(t.edge(e))),l.info("Fix",E,"ids:",e.v,e.w,"Translating: ",E.get(e.v),E.get(e.w)),p&&u.selfLoop){if(u.selfLoop.order!==1)return;const x=u.id;u.id=u.selfLoop.id,await G(i,u),u.id=x;return}await G(i,u)});await Promise.all(d)},"processEdges")(),l.info("Graph before layout:",JSON.stringify(I(t))),l.info("############################################# XXX"),l.info("### Layout ### XXX"),l.info("############################################# XXX"),U(t),l.info("Graph after layout:",JSON.stringify(I(t)));let X=0,{subGraphTitleTotalMargin:S}=q(o);await Promise.all(A(t).map(async function(d){const e=t.node(d);if(l.info("Position XBX => "+d+": ("+e.x,","+e.y,") width: ",e.width," height: ",e.height),e?.clusterNode)e.y+=S,l.info("A tainted cluster node XBX1",d,e.id,e.width,e.height,e.x,e.y,t.parent(d)),E.get(e.id).node=e,R(e);else if(t.children(d).length>0){l.info("A pure cluster node XBX1",d,e.id,e.x,e.y,e.width,e.height,t.parent(d)),e.height+=S,t.node(e.parentId);const u=e?.padding/2||0,x=e?.labelBBox?.height||0,N=x-u||0;l.debug("OffsetY",N,"labelHeight",x,"halfPadding",u),await F(h,e),E.get(e.id).node=e}else{const u=t.node(e.parentId);e.y+=S/2,l.info("A regular node XBX1 - using the padding",e.id,"parent",e.parentId,e.width,e.height,e.x,e.y,"offsetY",e.offsetY,"parent",u,u?.offsetY,e),R(e)}}));const b=S/2;return ne(t,b,{mergeSelfLoops:p}).forEach(function({edge:d,start:e,end:u}){l.info("Edge "+e+" -> "+u+": "+JSON.stringify(d),d),d.points.forEach(k=>k.y+=b);const x=t.node(e),N=t.node(u),M=z(a,d,E,g,x,N,m);K(d,M)}),t.nodes().forEach(function(d){const e=t.node(d);l.info(d,e.type,e.diff),e.isGroup&&(X=e.diff)}),l.warn("Returning from recursive render XAX",f,X),{elem:f,diff:X}},"recursiveRender"),le=w(async(s,t)=>{const g=new Q({multigraph:!0,compound:!0}).setGraph({rankdir:s.direction,nodesep:s.config?.nodeSpacing||s.config?.flowchart?.nodeSpacing||s.nodeSpacing,ranksep:s.config?.rankSpacing||s.config?.flowchart?.rankSpacing||s.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),m=t.select("g");v(m,s.markers,s.type,s.diagramId),D(),H(),Y(),O(),s.nodes.forEach(o=>{g.setNode(o.id,{...o}),o.parentId&&g.setParent(o.id,o.parentId)}),l.debug("Edges:",s.edges),s.edges.forEach(o=>{if(o.start===o.end){const r=o.start,f=r+"---"+r+"---1",h=r+"---"+r+"---2",a=g.node(r);g.setNode(f,{domId:f,id:f,parentId:a.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),g.setParent(f,a.parentId),g.setNode(h,{domId:h,id:h,parentId:a.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),g.setParent(h,a.parentId);const i=structuredClone(o),n=structuredClone(o),p=structuredClone(o),y=structuredClone(o);n.originalEdge=i,n.selfLoop={id:i.id,order:0},p.originalEdge=i,p.selfLoop={id:i.id,order:1},y.originalEdge=i,y.selfLoop={id:i.id,order:2},n.label="",n.arrowTypeEnd="none",n.endLabelLeft="",n.endLabelRight="",n.startLabelLeft="",n.id=r+"-cyclic-special-1",p.startLabelRight="",p.startLabelLeft="",p.endLabelLeft="",p.endLabelRight="",p.arrowTypeStart="none",p.arrowTypeEnd="none",p.id=r+"-cyclic-special-mid",y.label="",y.startLabelRight="",y.startLabelLeft="",y.arrowTypeStart="none",a.isGroup&&(n.fromCluster=r,y.toCluster=r),y.id=r+"-cyclic-special-2",y.arrowTypeStart="none",g.setEdge(r,f,n,r+"-cyclic-special-0"),g.setEdge(f,h,p,r+"-cyclic-special-1"),g.setEdge(h,r,y,r+"-cyclic-special-2")}else g.setEdge(o.start,o.end,{...o},o.id)}),l.warn("Graph at first:",JSON.stringify(I(g))),J(g),l.warn("Graph after XAX:",JSON.stringify(I(g)));const c=_();await T(m,g,s.type,s.diagramId,void 0,c)},"render");export{ne as getEdgesToRender,le as render}; diff --git a/apps/kimi-code/dist-web/assets/diagram-FQU43EPY-BgGpYQg7.js b/apps/kimi-code/dist-web/assets/diagram-FQU43EPY-Cqley8W-.js similarity index 98% rename from apps/kimi-code/dist-web/assets/diagram-FQU43EPY-BgGpYQg7.js rename to apps/kimi-code/dist-web/assets/diagram-FQU43EPY-Cqley8W-.js index e408b1c801..8c54a47a89 100644 --- a/apps/kimi-code/dist-web/assets/diagram-FQU43EPY-BgGpYQg7.js +++ b/apps/kimi-code/dist-web/assets/diagram-FQU43EPY-Cqley8W-.js @@ -1,3 +1,3 @@ -import{p as re}from"./chunk-JWPE2WC7-BiIZjhuH.js";import{p as oe,o as se,s as de,g as le,a as ce,b as me,_ as o,l as g,c as D,d as ue,A as xe,q as fe,B as ge,z as M,D as he,i as y,w as P,ak as pe}from"./mermaid.core-BMAf1qng.js";import{p as be,i as ve}from"./cynefin-VYW2F7L2-B2u2H2Wf.js";import"./index-B-HzRssS.js";import"./_commonjsHelpers-CqkleIqs.js";var T="position frame",$="frame positioned",S="position relation",N="relation positioned",we=o(function(e){g.debug("options str",e)},"setOptions"),ye=o(function(){return{}},"getOptions"),Pe=o(function(){C(),fe()},"clear");function C(){B={}}o(C,"reset");var Se=he.eventmodeling,ke=o(()=>ge({...Se,...M().eventmodeling}),"getConfig"),B={};function O(){let e=Fe;const{ast:n}=B,t=E();if(!n)throw new Error("No data for EventModel");return n.frames.forEach((i,a)=>{const r=G(i,n.dataEntities,t);e=v(e,{$kind:T,index:a,frame:i,textProps:r});let d;K(i)?(g.debug("source frame",i.sourceFrames),d=n.frames.filter(l=>i.sourceFrames.some(c=>c.$refText===l.name)),d.forEach(l=>{e=v(e,{$kind:S,index:a,frame:i,sourceFrame:l})})):e=v(e,{$kind:S,index:a,frame:i})}),e={...e,sortedSwimlanesArray:A(e.swimlanes)},e}o(O,"getState");function I(e){B.ast=e}o(I,"setAst");var s={swimlaneMinHeight:70,swimlanePadding:15,swimlaneGap:10,boxPadding:10,boxOverlap:90,boxDefaultY:0,boxMinWidth:80,boxMaxWidth:450,boxMinHeight:80,boxMaxHeight:750,contentStartX:250,textMaxWidth:430,boxTextFontWeight:"bold",boxTextPadding:10,swimlaneTextFontWeight:"bold",labelUiAutomation:"UI/Automation",labelUiAutomationPrefix:"UI/A: ",labelCommandReadModel:"Command/Read Model",labelCommandReadModelPrefix:"C/RM: ",labelEvents:"Events",labelEventsPrefix:"Stream: "};function E(){return s}o(E,"getDiagramProps");var Fe={boxes:[],swimlanes:{},relations:[],maxR:0,sortedSwimlanesArray:[]};function W(e){const n=e.split(".");if(n.length===2)return n[0]}o(W,"extractNamespace");function H(e){const n=e.split(".");return n.length===2?n[1]:e}o(H,"extractName");function U(e,n){if(!(!n||n.length===0))return Object.values(e).find(t=>t.namespace===n)}o(U,"findSwimlaneByNamespace");function b(e,n,t){return Math.max(n,...Object.keys(e).filter(i=>{const a=Number.parseInt(i);return a>n&&aNumber.parseInt(i)))+1}o(b,"findNextAvailableIndex");function _(e,n){const t=W(e.entityIdentifier),i=U(n,t);switch(e.modelEntityType){case"ui":case"pcr":case"processor":return i?{index:i.index,label:i.namespace||s.labelUiAutomation}:t?{index:b(n,0,100),label:s.labelUiAutomationPrefix+t}:{index:0,label:s.labelUiAutomation};case"rmo":case"readmodel":case"cmd":case"command":return i?{index:i.index,label:i.namespace||s.labelCommandReadModel}:t?{index:b(n,100,200),label:s.labelCommandReadModelPrefix+t}:{index:100,label:s.labelCommandReadModel};case"evt":case"event":default:return i?{index:i.index,label:i.namespace||s.labelEvents}:t?{index:b(n,200,300),label:s.labelEventsPrefix+t}:{index:200,label:s.labelEvents}}}o(_,"calculateSwimlaneProps");function L(e){const{themeVariables:n}=M();switch(e.modelEntityType){case"ui":return{fill:n.emUiFill??"white",stroke:n.emUiStroke??"#dbdada"};case"pcr":case"processor":return{fill:n.emProcessorFill??"#edb3f6",stroke:n.emProcessorStroke??"#b88cbf"};case"rmo":case"readmodel":return{fill:n.emReadModelFill??"#d3f1a2",stroke:n.emReadModelStroke??"#a3b732"};case"cmd":case"command":return{fill:n.emCommandFill??"#bcd6fe",stroke:n.emCommandStroke??"#679ac3"};case"evt":case"event":return{fill:n.emEventFill??"#ffb778",stroke:n.emEventStroke??"#c19a0f"};default:return{fill:"red",stroke:"black"}}}o(L,"calculateEntityVisualProps");function G(e,n,t){const i=M(),a=y(H(e.entityIdentifier)??"",i);let r;const d={fontSize:16,fontWeight:700,fontFamily:'"trebuchet ms", verdana, arial, sans-serif',joinWith:"
"};let c=`${P(a,t.textMaxWidth,d)}`;if(e.dataInlineValue&&(r=e.dataInlineValue,r=r.substring(r.indexOf("{")+1),r=r.substring(0,r.lastIndexOf("}")-1),r=y(r,i),r=P(r,t.textMaxWidth,d),r=r.replaceAll(" "," ")),e.dataReference){const p=n.find(w=>w.name===e.dataReference?.$refText);p&&(r=p.dataBlockValue,r=r.substring(r.indexOf(`{ +import{p as re}from"./chunk-JWPE2WC7-DTx-f56M.js";import{p as oe,o as se,s as de,g as le,a as ce,b as me,_ as o,l as g,c as D,d as ue,A as xe,q as fe,B as ge,z as M,D as he,i as y,w as P,ak as pe}from"./mermaid.core-Cahi9cr1.js";import{p as be,i as ve}from"./cynefin-VYW2F7L2-C5gNr-Q4.js";import"./index-HRJ6xRtC.js";import"./_commonjsHelpers-CqkleIqs.js";var T="position frame",$="frame positioned",S="position relation",N="relation positioned",we=o(function(e){g.debug("options str",e)},"setOptions"),ye=o(function(){return{}},"getOptions"),Pe=o(function(){C(),fe()},"clear");function C(){B={}}o(C,"reset");var Se=he.eventmodeling,ke=o(()=>ge({...Se,...M().eventmodeling}),"getConfig"),B={};function O(){let e=Fe;const{ast:n}=B,t=E();if(!n)throw new Error("No data for EventModel");return n.frames.forEach((i,a)=>{const r=G(i,n.dataEntities,t);e=v(e,{$kind:T,index:a,frame:i,textProps:r});let d;K(i)?(g.debug("source frame",i.sourceFrames),d=n.frames.filter(l=>i.sourceFrames.some(c=>c.$refText===l.name)),d.forEach(l=>{e=v(e,{$kind:S,index:a,frame:i,sourceFrame:l})})):e=v(e,{$kind:S,index:a,frame:i})}),e={...e,sortedSwimlanesArray:A(e.swimlanes)},e}o(O,"getState");function I(e){B.ast=e}o(I,"setAst");var s={swimlaneMinHeight:70,swimlanePadding:15,swimlaneGap:10,boxPadding:10,boxOverlap:90,boxDefaultY:0,boxMinWidth:80,boxMaxWidth:450,boxMinHeight:80,boxMaxHeight:750,contentStartX:250,textMaxWidth:430,boxTextFontWeight:"bold",boxTextPadding:10,swimlaneTextFontWeight:"bold",labelUiAutomation:"UI/Automation",labelUiAutomationPrefix:"UI/A: ",labelCommandReadModel:"Command/Read Model",labelCommandReadModelPrefix:"C/RM: ",labelEvents:"Events",labelEventsPrefix:"Stream: "};function E(){return s}o(E,"getDiagramProps");var Fe={boxes:[],swimlanes:{},relations:[],maxR:0,sortedSwimlanesArray:[]};function W(e){const n=e.split(".");if(n.length===2)return n[0]}o(W,"extractNamespace");function H(e){const n=e.split(".");return n.length===2?n[1]:e}o(H,"extractName");function U(e,n){if(!(!n||n.length===0))return Object.values(e).find(t=>t.namespace===n)}o(U,"findSwimlaneByNamespace");function b(e,n,t){return Math.max(n,...Object.keys(e).filter(i=>{const a=Number.parseInt(i);return a>n&&aNumber.parseInt(i)))+1}o(b,"findNextAvailableIndex");function _(e,n){const t=W(e.entityIdentifier),i=U(n,t);switch(e.modelEntityType){case"ui":case"pcr":case"processor":return i?{index:i.index,label:i.namespace||s.labelUiAutomation}:t?{index:b(n,0,100),label:s.labelUiAutomationPrefix+t}:{index:0,label:s.labelUiAutomation};case"rmo":case"readmodel":case"cmd":case"command":return i?{index:i.index,label:i.namespace||s.labelCommandReadModel}:t?{index:b(n,100,200),label:s.labelCommandReadModelPrefix+t}:{index:100,label:s.labelCommandReadModel};case"evt":case"event":default:return i?{index:i.index,label:i.namespace||s.labelEvents}:t?{index:b(n,200,300),label:s.labelEventsPrefix+t}:{index:200,label:s.labelEvents}}}o(_,"calculateSwimlaneProps");function L(e){const{themeVariables:n}=M();switch(e.modelEntityType){case"ui":return{fill:n.emUiFill??"white",stroke:n.emUiStroke??"#dbdada"};case"pcr":case"processor":return{fill:n.emProcessorFill??"#edb3f6",stroke:n.emProcessorStroke??"#b88cbf"};case"rmo":case"readmodel":return{fill:n.emReadModelFill??"#d3f1a2",stroke:n.emReadModelStroke??"#a3b732"};case"cmd":case"command":return{fill:n.emCommandFill??"#bcd6fe",stroke:n.emCommandStroke??"#679ac3"};case"evt":case"event":return{fill:n.emEventFill??"#ffb778",stroke:n.emEventStroke??"#c19a0f"};default:return{fill:"red",stroke:"black"}}}o(L,"calculateEntityVisualProps");function G(e,n,t){const i=M(),a=y(H(e.entityIdentifier)??"",i);let r;const d={fontSize:16,fontWeight:700,fontFamily:'"trebuchet ms", verdana, arial, sans-serif',joinWith:"
"};let c=`${P(a,t.textMaxWidth,d)}`;if(e.dataInlineValue&&(r=e.dataInlineValue,r=r.substring(r.indexOf("{")+1),r=r.substring(0,r.lastIndexOf("}")-1),r=y(r,i),r=P(r,t.textMaxWidth,d),r=r.replaceAll(" "," ")),e.dataReference){const p=n.find(w=>w.name===e.dataReference?.$refText);p&&(r=p.dataBlockValue,r=r.substring(r.indexOf(`{ `)+2),r=r.substring(0,r.lastIndexOf("}")-1),r=y(r,i),r=P(r,t.textMaxWidth,d),r=r.replaceAll(" "," "),r+="
")}const m=r!==void 0;m&&(c+=`

${r}`);const x={fontSize:d.fontSize,fontWeight:d.fontWeight,fontFamily:d.fontFamily},u=pe(c,x),h=m?u.width/3:u.width,f={content:c,width:h,height:u.height};return g.debug(`[${e.name}] ${e.entityIdentifier} text`,f),f}o(G,"calculateTextProps");function V(e,n){const t=n,i=L(t.frame),a={width:t.textProps.width+2*s.boxTextPadding,height:t.textProps.height+2*s.boxTextPadding};return[{$kind:$,frame:t.frame,index:t.index,visual:i,dimension:a,textProps:t.textProps}]}o(V,"decidePositionFrame");function X(e,n,t){return n===void 0?s.contentStartX:n.index===e.index&&e.r?e.r+s.boxPadding:t===void 0?s.contentStartX:t.r-s.boxOverlap+s.boxPadding}o(X,"calculateX");function j(e,n){const t=[...e.map(i=>i.r),n];return Math.max(...t)}o(j,"calculateMaxRight");function A(e){return Object.values(e).sort((n,t)=>n.index-t.index)}o(A,"sortedSwimlanesArray");function Y(e,n){const t=n,i=_(t.frame,e.swimlanes);let a;i.index in e.swimlanes?a=e.swimlanes[i.index]:a={index:i.index,label:i.label,r:0,y:i.index*s.swimlaneMinHeight+s.swimlaneGap,height:s.swimlaneMinHeight,maxHeight:s.swimlaneMinHeight};const r=e.boxes.length>0?e.boxes[e.boxes.length-1]:void 0,d=e.previousSwimlaneNumber!==void 0?e.swimlanes[e.previousSwimlaneNumber]:void 0,l={width:Math.max(s.boxMinWidth,Math.min(s.boxMaxWidth,t.dimension.width))+2*s.boxPadding,height:Math.max(s.boxMinHeight,Math.min(s.boxMaxHeight,t.dimension.height))+2*s.boxPadding},c=X(a,d,r),m=c+l.width+s.boxPadding,x=j(Object.values(e.swimlanes),m);a.r=c+l.width,a.maxHeight=Math.max(a.maxHeight,l.height),a.height=Math.max(s.swimlaneMinHeight,a.maxHeight)+2*s.swimlanePadding;const u={x:c,y:s.swimlanePadding+a.y,r:m,dimension:l,leftSibling:!1,swimlane:a,visual:t.visual,text:t.textProps.content,frame:t.frame,index:t.index},h={...e,boxes:[...e.boxes,u],swimlanes:{...e.swimlanes,[`${a.index}`]:a},previousSwimlaneNumber:i.index,previousFrame:t.frame,maxR:x},f=A(h.swimlanes);f.length>0&&(f[0].y=0);for(let p=1;p0}o(K,"hasSourceFrame");function k(e,n){if(n!=null)return e.find(t=>t.frame.name===n.name)}o(k,"findBoxByFrame");function q(e,n,t){if(!(t<0))for(let i=t;i>=0;i--){const a=e[i];if(a.swimlane.index!==n)return a}}o(q,"findBoxByLineIndex");function J(e,n){const t=n;if(ve(t.frame)||z(t.index,t.frame))return[];const i=k(e.boxes,t.frame);if(i===void 0)throw new Error(`Target box not found for frame ${t.frame.name}`);let a;return t.sourceFrame?a=k(e.boxes,t.sourceFrame):a=q(e.boxes,i.swimlane.index,t.index-1),a===void 0?[]:[{$kind:N,frame:t.frame,index:t.index,sourceBox:a,targetBox:i}]}o(J,"decidePositionRelation");function Q(e,n){const t=n,i={visual:{fill:"none",stroke:"#000"},source:{x:t.sourceBox.x,y:t.sourceBox.y},target:{x:t.targetBox.x,y:t.targetBox.y},sourceBox:t.sourceBox,targetBox:t.targetBox};return{...e,relations:[...e.relations,i]}}o(Q,"evolveRelationPositioned");var Me={[T]:V,[S]:J},Be={[$]:Y,[N]:Q};function Z(e,n){const t=Me[n.$kind];if(t==null)return[];const i=t(e,n);return g.debug("decided events",i),i}o(Z,"decide");function ee(e,n){const t=n.reduce((i,a)=>{const r=Be[a.$kind];return r==null?i:r(i,a)},e);return g.debug("evolve events",{state:e,newState:t,events:n}),t}o(ee,"evolve");function v(e,n){const t=Z(e,n);return ee(e,t)}o(v,"dispatch");var F={getConfig:ke,setOptions:we,getOptions:ye,clear:Pe,setAccTitle:me,getAccTitle:ce,getAccDescription:le,setAccDescription:de,setDiagramTitle:se,getDiagramTitle:oe,setAst:I,getDiagramProps:E,getState:O},Ee={parse:o(async e=>{const n=await be("eventmodeling",e);g.debug(n),F.setAst(n),re(n,F)},"parse")},Ae=D(),Re=Ae?.eventmodeling;function te(e,n){return t=>{const i=t.swimlane.y+n.swimlanePadding,a=e.append("g").attr("class","em-box");a.append("rect").attr("x",t.x).attr("y",i).attr("rx","3").attr("width",t.dimension.width).attr("height",t.dimension.height).attr("stroke",t.visual.stroke).attr("fill",t.visual.fill),a.append("foreignObject").attr("x",t.x+n.boxPadding).attr("y",i+10).attr("width",t.dimension.width-2*n.boxPadding).attr("height",t.dimension.height-2*n.boxPadding).append("xhtml:div").style("display","table").style("height","100%").style("width","100%").append("span").style("display","table-cell").style("text-align","center").style("vertical-align","middle").html(t.text)}}o(te,"renderD3Box");function ne(e,n){return e>n}o(ne,"dirUpwards");function ie(e,n,t,i){return a=>{const r=a.sourceBox.swimlane.y+n.swimlanePadding,d=a.targetBox.swimlane.y+n.swimlanePadding,l=ne(r,d),c=a.sourceBox.x+a.sourceBox.dimension.width*2/3,m=a.targetBox.x+a.targetBox.dimension.width/3;let x,u;g.debug(`rendering relation up=${l} for `,{sourceBox:a.sourceBox,targetBox:a.targetBox}),l?(x=r,u=d+a.targetBox.dimension.height):(x=r+a.sourceBox.dimension.height,u=d);const h=i.emRelationStroke??a.visual.stroke;e.append("path").attr("class","em-relation").attr("fill",a.visual.fill).attr("stroke",h).attr("stroke-width","1").attr("marker-end",`url(#${t})`).attr("d",`M${c} ${x} L${m} ${u}`)}}o(ie,"renderD3Relation");function ae(e,n,t,i){return a=>{const r=e.append("g").attr("class","em-swimlane"),d=i.emSwimlaneBackgroundOdd??"rgb(250,250,250)",l=i.emSwimlaneBackgroundStroke??"rgb(240,240,240)";r.append("rect").attr("x",0).attr("y",a.y).attr("rx","3").attr("width",n+t.swimlanePadding).attr("height",a.height).attr("fill",d).attr("stroke",l),r.append("text").attr("font-weight",t.swimlaneTextFontWeight).attr("x",30).attr("y",a.y+30).text(a.label)}}o(ae,"renderD3Swimlane");var De=o(function(e,n,t,i){if(g.debug("in eventmodeling renderer",e+` `,"id:",n,t),!Re)throw new Error("EventModeling config not found");const a=i.db,{themeVariables:r,eventmodeling:d}=D(),l=ue(`[id="${n}"]`),c=a.getDiagramProps(),m=a.getState(),x=`em-arrowhead-${n}`,u=r.emArrowhead??"#000000";m.sortedSwimlanesArray.forEach(ae(l,m.maxR,c,r)),m.boxes.forEach(te(l,c)),m.relations.forEach(ie(l,c,x,r)),l.append("defs").append("marker").attr("id",x).attr("markerWidth","10").attr("markerHeight","7").attr("refX","10").attr("refY","3.5").attr("orient","auto").append("polygon").attr("points","0 0, 10 3.5, 0 7").attr("fill",u),xe(void 0,l,d?.padding??30,d?.useMaxWidth)},"draw"),Te={draw:De},$e=o(e=>"","getStyles"),Ne=$e,Ue={parser:Ee,db:F,renderer:Te,styles:Ne};export{Ue as diagram}; diff --git a/apps/kimi-code/dist-web/assets/diagram-G47NLZAW-DLPxt9_R.js b/apps/kimi-code/dist-web/assets/diagram-G47NLZAW-jJWknpV7.js similarity index 97% rename from apps/kimi-code/dist-web/assets/diagram-G47NLZAW-DLPxt9_R.js rename to apps/kimi-code/dist-web/assets/diagram-G47NLZAW-jJWknpV7.js index f27fdc4dac..4cfba9e28b 100644 --- a/apps/kimi-code/dist-web/assets/diagram-G47NLZAW-DLPxt9_R.js +++ b/apps/kimi-code/dist-web/assets/diagram-G47NLZAW-jJWknpV7.js @@ -1,4 +1,4 @@ -import{p as me}from"./chunk-JWPE2WC7-BiIZjhuH.js";import{_ as w,W as ge,z as te,B as Q,F as ye,e as Se,l as ee,be as B,d as j,b as ve,a as xe,o as be,p as we,g as Ce,s as Te,D as Le,bf as $e,q as Ae}from"./mermaid.core-BMAf1qng.js";import{s as Fe}from"./chunk-VR4S4FIN-Cveor6Gg.js";import{p as Ne}from"./cynefin-VYW2F7L2-B2u2H2Wf.js";import{b as I}from"./defaultLocale-DX6XiGOO.js";import{o as K}from"./ordinal-Cboi1Yqb.js";import"./index-B-HzRssS.js";import"./_commonjsHelpers-CqkleIqs.js";import"./init-Gi6I4Gst.js";function Me(e){var a=0,n=e.children,l=n&&n.length;if(!l)a=1;else for(;--l>=0;)a+=n[l].value;e.value=a}function _e(){return this.eachAfter(Me)}function ke(e,a){let n=-1;for(const l of this)e.call(a,l,++n,this);return this}function ze(e,a){for(var n=this,l=[n],r,o,h=-1;n=l.pop();)if(e.call(a,n,++h,this),r=n.children)for(o=r.length-1;o>=0;--o)l.push(r[o]);return this}function Ve(e,a){for(var n=this,l=[n],r=[],o,h,d,g=-1;n=l.pop();)if(r.push(n),o=n.children)for(h=0,d=o.length;h=0;)n+=l[r].value;a.value=n})}function Be(e){return this.eachBefore(function(a){a.children&&a.children.sort(e)})}function We(e){for(var a=this,n=Ee(a,e),l=[a];a!==n;)a=a.parent,l.push(a);for(var r=l.length;e!==n;)l.splice(r,0,e),e=e.parent;return l}function Ee(e,a){if(e===a)return e;var n=e.ancestors(),l=a.ancestors(),r=null;for(e=n.pop(),a=l.pop();e===a;)r=e,e=n.pop(),a=l.pop();return r}function Re(){for(var e=this,a=[e];e=e.parent;)a.push(e);return a}function He(){return Array.from(this)}function Ie(){var e=[];return this.eachBefore(function(a){a.children||e.push(a)}),e}function Oe(){var e=this,a=[];return e.each(function(n){n!==e&&a.push({source:n.parent,target:n})}),a}function*qe(){var e=this,a,n=[e],l,r,o;do for(a=n.reverse(),n=[];e=a.pop();)if(yield e,l=e.children)for(r=0,o=l.length;r=0;--d)r.push(o=h[d]=new U(h[d])),o.parent=l,o.depth=l.depth+1;return n.eachBefore(Ue)}function Ge(){return ae(this).eachBefore(je)}function Xe(e){return e.children}function Ye(e){return Array.isArray(e)?e[1]:null}function je(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function Ue(e){var a=0;do e.height=a;while((e=e.parent)&&e.height<++a)}function U(e){this.data=e,this.depth=this.height=0,this.parent=null}U.prototype=ae.prototype={constructor:U,count:_e,each:ke,eachAfter:Ve,eachBefore:ze,find:De,sum:Pe,sort:Be,path:We,ancestors:Re,descendants:He,leaves:Ie,links:Oe,copy:Ge,[Symbol.iterator]:qe};function Ze(e){if(typeof e!="function")throw new Error;return e}function O(){return 0}function q(e){return function(){return e}}function Je(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function Ke(e,a,n,l,r){for(var o=e.children,h,d=-1,g=o.length,c=e.value&&(l-a)/e.value;++dN&&(N=c),M=u*u*E,$=Math.max(N/M,M/y),$>V){u-=c;break}V=$}h.push(g={value:u,dice:x1?l:1)},n})(et);function nt(){var e=at,a=!1,n=1,l=1,r=[0],o=O,h=O,d=O,g=O,c=O;function p(s){return s.x0=s.y0=0,s.x1=n,s.y1=l,s.eachBefore(b),r=[0],a&&s.eachBefore(Je),s}function b(s){var x=r[s.depth],S=s.x0+x,v=s.y0+x,u=s.x1-x,y=s.y1-x;u{$e(r)&&(n?.textStyles?n.textStyles.push(r):n.textStyles=[r]),n?.styles?n.styles.push(r):n.styles=[r]}),this.classes.set(e,n)}getClasses(){return this.classes}getStylesForClass(e){return this.classes.get(e)?.styles??[]}clear(){Ae(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function oe(e){if(!e.length)return[];const a=[],n=[];return e.forEach(l=>{const r={name:l.name,children:l.type==="Leaf"?void 0:[]};for(r.classSelector=l?.classSelector,l?.cssCompiledStyles&&(r.cssCompiledStyles=l.cssCompiledStyles),l.type==="Leaf"&&l.value!==void 0&&(r.value=l.value);n.length>0&&n[n.length-1].level>=l.level;)n.pop();if(n.length===0)a.push(r);else{const o=n[n.length-1].node;o.children?o.children.push(r):o.children=[r]}l.type!=="Leaf"&&n.push({node:r,level:l.level})}),a}w(oe,"buildHierarchy");var lt=w((e,a)=>{me(e,a);const n=[];for(const o of e.TreemapRows??[])o.$type==="ClassDefStatement"&&a.addClass(o.className??"",o.styleText??"");for(const o of e.TreemapRows??[]){const h=o.item;if(!h)continue;const d=o.indent?parseInt(o.indent):0,g=rt(h),c=h.classSelector?a.getStylesForClass(h.classSelector):[],p=c.length>0?c:void 0,b={level:d,name:g,type:h.$type,value:h.value,classSelector:h.classSelector,cssCompiledStyles:p};n.push(b)}const l=oe(n),r=w((o,h)=>{for(const d of o)a.addNode(d,h),d.children&&d.children.length>0&&r(d.children,h+1)},"addNodesRecursively");r(l,0)},"populate"),rt=w(e=>e.name?String(e.name):"","getItemName"),ce={parser:{yy:void 0},parse:w(async e=>{try{const n=await Ne("treemap",e);ee.debug("Treemap AST:",n);const l=ce.parser?.yy;if(!(l instanceof ie))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");lt(n,l)}catch(a){throw ee.error("Error parsing treemap:",a),a}},"parse")},st=10,W=10,G=25,it=w((e,a,n,l)=>{const r=l.db,o=r.getConfig(),h=o.padding??st,d=r.getDiagramTitle(),g=r.getRoot(),{themeVariables:c}=te();if(!g)return;const p=d?30:0,b=ye(a),s=o.nodeWidth?o.nodeWidth*W:960,x=o.nodeHeight?o.nodeHeight*W:500,S=s,v=x+p;b.attr("viewBox",`0 0 ${S} ${v}`),Se(b,v,S,o.useMaxWidth);let u;try{const t=o.valueFormat||",";if(t==="$0,0")u=w(i=>"$"+I(",")(i),"valueFormat");else if(t.startsWith("$")&&t.includes(",")){const i=/\.\d+/.exec(t),f=i?i[0]:"";u=w(C=>"$"+I(","+f)(C),"valueFormat")}else if(t.startsWith("$")){const i=t.substring(1);u=w(f=>"$"+I(i||"")(f),"valueFormat")}else u=I(t)}catch(t){ee.error("Error creating format function:",t),u=I(",")}const y=K().range(["transparent",c.cScale0,c.cScale1,c.cScale2,c.cScale3,c.cScale4,c.cScale5,c.cScale6,c.cScale7,c.cScale8,c.cScale9,c.cScale10,c.cScale11]),N=K().range(["transparent",c.cScalePeer0,c.cScalePeer1,c.cScalePeer2,c.cScalePeer3,c.cScalePeer4,c.cScalePeer5,c.cScalePeer6,c.cScalePeer7,c.cScalePeer8,c.cScalePeer9,c.cScalePeer10,c.cScalePeer11]),$=K().range([c.cScaleLabel0,c.cScaleLabel1,c.cScaleLabel2,c.cScaleLabel3,c.cScaleLabel4,c.cScaleLabel5,c.cScaleLabel6,c.cScaleLabel7,c.cScaleLabel8,c.cScaleLabel9,c.cScaleLabel10,c.cScaleLabel11]);d&&b.append("text").attr("x",S/2).attr("y",p/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(d);const V=b.append("g").attr("transform",`translate(0, ${p})`).attr("class","treemapContainer"),E=ae(g).sum(t=>t.value??0).sort((t,i)=>(i.value??0)-(t.value??0)),ne=nt().size([s,x]).paddingTop(t=>t.children&&t.children.length>0?G+W:0).paddingInner(h).paddingLeft(t=>t.children&&t.children.length>0?W:0).paddingRight(t=>t.children&&t.children.length>0?W:0).paddingBottom(t=>t.children&&t.children.length>0?W:0).round(!0)(E),he=ne.descendants().filter(t=>t.children&&t.children.length>0),R=V.selectAll(".treemapSection").data(he).enter().append("g").attr("class","treemapSection").attr("transform",t=>`translate(${t.x0},${t.y0})`);R.append("rect").attr("width",t=>t.x1-t.x0).attr("height",G).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",t=>t.depth===0?"display: none;":""),R.append("clipPath").attr("id",(t,i)=>`clip-section-${a}-${i}`).append("rect").attr("width",t=>Math.max(0,t.x1-t.x0-12)).attr("height",G),R.append("rect").attr("width",t=>t.x1-t.x0).attr("height",t=>t.y1-t.y0).attr("class",(t,i)=>`treemapSection section${i}`).attr("fill",t=>y(t.data.name)).attr("fill-opacity",.6).attr("stroke",t=>N(t.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",t=>{if(t.depth===0)return"display: none;";const i=B({cssCompiledStyles:t.data.cssCompiledStyles});return i.nodeStyles+";"+i.borderStyles.join(";")}),R.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",G/2).attr("dominant-baseline","middle").text(t=>t.depth===0?"":t.data.name).attr("font-weight","bold").attr("clip-path",(t,i)=>`url(#clip-section-${a}-${i})`).attr("style",t=>{if(t.depth===0)return"display: none;";const i="dominant-baseline: middle; font-size: 12px; fill:"+$(t.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=B({cssCompiledStyles:t.data.cssCompiledStyles});return i+f.labelStyles.replace("color:","fill:")}).each(function(t){if(t.depth===0)return;const i=j(this),f=t.data.name;i.text(f);const C=t.x1-t.x0,L=6;let T;o.showValues!==!1&&t.value?T=C-10-30-10-L:T=C-L-6;const m=Math.max(15,T),_=i.node();if(_.getComputedTextLength()>m){let z=f;for(;z.length>0;){if(z=f.substring(0,z.length-1),z.length===0){i.text("..."),_.getComputedTextLength()>m&&i.text("");break}if(i.text(z+"..."),_.getComputedTextLength()<=m)break}}}),o.showValues!==!1&&R.append("text").attr("class","treemapSectionValue").attr("x",t=>t.x1-t.x0-10).attr("y",G/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(t=>t.value?u(t.value):"").attr("font-style","italic").attr("style",t=>{if(t.depth===0)return"display: none;";const i="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+$(t.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=B({cssCompiledStyles:t.data.cssCompiledStyles});return i+f.labelStyles.replace("color:","fill:")});const le=ne.leaves(),A=le.length>20,de=A?16:38,X=A?14:28,D=A?4:8,H=A?4:6,Z=A?2:4,re=A?8:10,J=A?1:2,Y=V.selectAll(".treemapLeafGroup").data(le).enter().append("g").attr("class",(t,i)=>`treemapNode treemapLeafGroup leaf${i}${t.data.classSelector?` ${t.data.classSelector}`:""}x`).attr("transform",t=>`translate(${t.x0},${t.y0})`);Y.append("rect").attr("width",t=>t.x1-t.x0).attr("height",t=>t.y1-t.y0).attr("class","treemapLeaf").attr("fill",t=>t.parent?y(t.parent.data.name):y(t.data.name)).attr("style",t=>B({cssCompiledStyles:t.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",t=>t.parent?y(t.parent.data.name):y(t.data.name)).attr("stroke-width",3),Y.append("clipPath").attr("id",(t,i)=>`clip-${a}-${i}`).append("rect").attr("width",t=>Math.max(0,t.x1-t.x0-4)).attr("height",t=>Math.max(0,t.y1-t.y0-4)),Y.append("text").attr("class","treemapLabel").attr("x",t=>(t.x1-t.x0)/2).attr("y",t=>(t.y1-t.y0)/2).attr("style",t=>{const i=`text-anchor: middle; dominant-baseline: middle; font-size: ${de}px;fill:`+$(t.data.name)+";",f=B({cssCompiledStyles:t.data.cssCompiledStyles});return i+f.labelStyles.replace("color:","fill:")}).attr("clip-path",(t,i)=>`url(#clip-${a}-${i})`).text(t=>t.data.name).each(function(t){const i=j(this),f=t.x1-t.x0,C=t.y1-t.y0,L=i.node(),T=f-2*Z,P=C-2*Z;if(TT&&m>D;)m--,i.style("font-size",`${m}px`);let F=Math.max(H,Math.min(X,Math.round(m*_))),k=m+J+F;for(;k>P&&m>D&&(m--,F=Math.max(H,Math.min(X,Math.round(m*_))),!(FT||m(i.x1-i.x0)/2).attr("y",function(i){return(i.y1-i.y0)/2}).attr("style",i=>{const f=`text-anchor: middle; dominant-baseline: hanging; font-size: ${X}px;fill:`+$(i.data.name)+";",C=B({cssCompiledStyles:i.data.cssCompiledStyles});return f+C.labelStyles.replace("color:","fill:")}).attr("clip-path",(i,f)=>`url(#clip-${a}-${f})`).text(i=>i.value?u(i.value):"").each(function(i){const f=j(this),C=this.parentNode;if(!C){f.style("display","none");return}const L=j(C).select(".treemapLabel");if(L.empty()||L.style("display")==="none"){f.style("display","none");return}const T=parseFloat(L.style("font-size")),m=Math.max(H,Math.min(X,Math.round(T*.6)));f.style("font-size",`${m}px`);const F=(i.y1-i.y0)/2+T/2+J;f.attr("y",F);const k=i.x1-i.x0,se=i.y1-i.y0-4,fe=k-2*Z;f.node().getComputedTextLength()>fe||F+m>se||m{const a=ge(),n=te(),l=Q(a,n.themeVariables),r=Q(ht,e),o=r.titleColor??l.titleColor,h=r.labelColor??l.textColor,d=r.valueColor??l.textColor;return` +import{p as me}from"./chunk-JWPE2WC7-DTx-f56M.js";import{_ as w,W as ge,z as te,B as Q,F as ye,e as Se,l as ee,be as B,d as j,b as ve,a as xe,o as be,p as we,g as Ce,s as Te,D as Le,bf as $e,q as Ae}from"./mermaid.core-Cahi9cr1.js";import{s as Fe}from"./chunk-VR4S4FIN-he8WxbY-.js";import{p as Ne}from"./cynefin-VYW2F7L2-C5gNr-Q4.js";import{b as I}from"./defaultLocale-DX6XiGOO.js";import{o as K}from"./ordinal-Cboi1Yqb.js";import"./index-HRJ6xRtC.js";import"./_commonjsHelpers-CqkleIqs.js";import"./init-Gi6I4Gst.js";function Me(e){var a=0,n=e.children,l=n&&n.length;if(!l)a=1;else for(;--l>=0;)a+=n[l].value;e.value=a}function _e(){return this.eachAfter(Me)}function ke(e,a){let n=-1;for(const l of this)e.call(a,l,++n,this);return this}function ze(e,a){for(var n=this,l=[n],r,o,h=-1;n=l.pop();)if(e.call(a,n,++h,this),r=n.children)for(o=r.length-1;o>=0;--o)l.push(r[o]);return this}function Ve(e,a){for(var n=this,l=[n],r=[],o,h,d,g=-1;n=l.pop();)if(r.push(n),o=n.children)for(h=0,d=o.length;h=0;)n+=l[r].value;a.value=n})}function Be(e){return this.eachBefore(function(a){a.children&&a.children.sort(e)})}function We(e){for(var a=this,n=Ee(a,e),l=[a];a!==n;)a=a.parent,l.push(a);for(var r=l.length;e!==n;)l.splice(r,0,e),e=e.parent;return l}function Ee(e,a){if(e===a)return e;var n=e.ancestors(),l=a.ancestors(),r=null;for(e=n.pop(),a=l.pop();e===a;)r=e,e=n.pop(),a=l.pop();return r}function Re(){for(var e=this,a=[e];e=e.parent;)a.push(e);return a}function He(){return Array.from(this)}function Ie(){var e=[];return this.eachBefore(function(a){a.children||e.push(a)}),e}function Oe(){var e=this,a=[];return e.each(function(n){n!==e&&a.push({source:n.parent,target:n})}),a}function*qe(){var e=this,a,n=[e],l,r,o;do for(a=n.reverse(),n=[];e=a.pop();)if(yield e,l=e.children)for(r=0,o=l.length;r=0;--d)r.push(o=h[d]=new U(h[d])),o.parent=l,o.depth=l.depth+1;return n.eachBefore(Ue)}function Ge(){return ae(this).eachBefore(je)}function Xe(e){return e.children}function Ye(e){return Array.isArray(e)?e[1]:null}function je(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function Ue(e){var a=0;do e.height=a;while((e=e.parent)&&e.height<++a)}function U(e){this.data=e,this.depth=this.height=0,this.parent=null}U.prototype=ae.prototype={constructor:U,count:_e,each:ke,eachAfter:Ve,eachBefore:ze,find:De,sum:Pe,sort:Be,path:We,ancestors:Re,descendants:He,leaves:Ie,links:Oe,copy:Ge,[Symbol.iterator]:qe};function Ze(e){if(typeof e!="function")throw new Error;return e}function O(){return 0}function q(e){return function(){return e}}function Je(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function Ke(e,a,n,l,r){for(var o=e.children,h,d=-1,g=o.length,c=e.value&&(l-a)/e.value;++dN&&(N=c),M=u*u*E,$=Math.max(N/M,M/y),$>V){u-=c;break}V=$}h.push(g={value:u,dice:x1?l:1)},n})(et);function nt(){var e=at,a=!1,n=1,l=1,r=[0],o=O,h=O,d=O,g=O,c=O;function p(s){return s.x0=s.y0=0,s.x1=n,s.y1=l,s.eachBefore(b),r=[0],a&&s.eachBefore(Je),s}function b(s){var x=r[s.depth],S=s.x0+x,v=s.y0+x,u=s.x1-x,y=s.y1-x;u{$e(r)&&(n?.textStyles?n.textStyles.push(r):n.textStyles=[r]),n?.styles?n.styles.push(r):n.styles=[r]}),this.classes.set(e,n)}getClasses(){return this.classes}getStylesForClass(e){return this.classes.get(e)?.styles??[]}clear(){Ae(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function oe(e){if(!e.length)return[];const a=[],n=[];return e.forEach(l=>{const r={name:l.name,children:l.type==="Leaf"?void 0:[]};for(r.classSelector=l?.classSelector,l?.cssCompiledStyles&&(r.cssCompiledStyles=l.cssCompiledStyles),l.type==="Leaf"&&l.value!==void 0&&(r.value=l.value);n.length>0&&n[n.length-1].level>=l.level;)n.pop();if(n.length===0)a.push(r);else{const o=n[n.length-1].node;o.children?o.children.push(r):o.children=[r]}l.type!=="Leaf"&&n.push({node:r,level:l.level})}),a}w(oe,"buildHierarchy");var lt=w((e,a)=>{me(e,a);const n=[];for(const o of e.TreemapRows??[])o.$type==="ClassDefStatement"&&a.addClass(o.className??"",o.styleText??"");for(const o of e.TreemapRows??[]){const h=o.item;if(!h)continue;const d=o.indent?parseInt(o.indent):0,g=rt(h),c=h.classSelector?a.getStylesForClass(h.classSelector):[],p=c.length>0?c:void 0,b={level:d,name:g,type:h.$type,value:h.value,classSelector:h.classSelector,cssCompiledStyles:p};n.push(b)}const l=oe(n),r=w((o,h)=>{for(const d of o)a.addNode(d,h),d.children&&d.children.length>0&&r(d.children,h+1)},"addNodesRecursively");r(l,0)},"populate"),rt=w(e=>e.name?String(e.name):"","getItemName"),ce={parser:{yy:void 0},parse:w(async e=>{try{const n=await Ne("treemap",e);ee.debug("Treemap AST:",n);const l=ce.parser?.yy;if(!(l instanceof ie))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");lt(n,l)}catch(a){throw ee.error("Error parsing treemap:",a),a}},"parse")},st=10,W=10,G=25,it=w((e,a,n,l)=>{const r=l.db,o=r.getConfig(),h=o.padding??st,d=r.getDiagramTitle(),g=r.getRoot(),{themeVariables:c}=te();if(!g)return;const p=d?30:0,b=ye(a),s=o.nodeWidth?o.nodeWidth*W:960,x=o.nodeHeight?o.nodeHeight*W:500,S=s,v=x+p;b.attr("viewBox",`0 0 ${S} ${v}`),Se(b,v,S,o.useMaxWidth);let u;try{const t=o.valueFormat||",";if(t==="$0,0")u=w(i=>"$"+I(",")(i),"valueFormat");else if(t.startsWith("$")&&t.includes(",")){const i=/\.\d+/.exec(t),f=i?i[0]:"";u=w(C=>"$"+I(","+f)(C),"valueFormat")}else if(t.startsWith("$")){const i=t.substring(1);u=w(f=>"$"+I(i||"")(f),"valueFormat")}else u=I(t)}catch(t){ee.error("Error creating format function:",t),u=I(",")}const y=K().range(["transparent",c.cScale0,c.cScale1,c.cScale2,c.cScale3,c.cScale4,c.cScale5,c.cScale6,c.cScale7,c.cScale8,c.cScale9,c.cScale10,c.cScale11]),N=K().range(["transparent",c.cScalePeer0,c.cScalePeer1,c.cScalePeer2,c.cScalePeer3,c.cScalePeer4,c.cScalePeer5,c.cScalePeer6,c.cScalePeer7,c.cScalePeer8,c.cScalePeer9,c.cScalePeer10,c.cScalePeer11]),$=K().range([c.cScaleLabel0,c.cScaleLabel1,c.cScaleLabel2,c.cScaleLabel3,c.cScaleLabel4,c.cScaleLabel5,c.cScaleLabel6,c.cScaleLabel7,c.cScaleLabel8,c.cScaleLabel9,c.cScaleLabel10,c.cScaleLabel11]);d&&b.append("text").attr("x",S/2).attr("y",p/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(d);const V=b.append("g").attr("transform",`translate(0, ${p})`).attr("class","treemapContainer"),E=ae(g).sum(t=>t.value??0).sort((t,i)=>(i.value??0)-(t.value??0)),ne=nt().size([s,x]).paddingTop(t=>t.children&&t.children.length>0?G+W:0).paddingInner(h).paddingLeft(t=>t.children&&t.children.length>0?W:0).paddingRight(t=>t.children&&t.children.length>0?W:0).paddingBottom(t=>t.children&&t.children.length>0?W:0).round(!0)(E),he=ne.descendants().filter(t=>t.children&&t.children.length>0),R=V.selectAll(".treemapSection").data(he).enter().append("g").attr("class","treemapSection").attr("transform",t=>`translate(${t.x0},${t.y0})`);R.append("rect").attr("width",t=>t.x1-t.x0).attr("height",G).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",t=>t.depth===0?"display: none;":""),R.append("clipPath").attr("id",(t,i)=>`clip-section-${a}-${i}`).append("rect").attr("width",t=>Math.max(0,t.x1-t.x0-12)).attr("height",G),R.append("rect").attr("width",t=>t.x1-t.x0).attr("height",t=>t.y1-t.y0).attr("class",(t,i)=>`treemapSection section${i}`).attr("fill",t=>y(t.data.name)).attr("fill-opacity",.6).attr("stroke",t=>N(t.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",t=>{if(t.depth===0)return"display: none;";const i=B({cssCompiledStyles:t.data.cssCompiledStyles});return i.nodeStyles+";"+i.borderStyles.join(";")}),R.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",G/2).attr("dominant-baseline","middle").text(t=>t.depth===0?"":t.data.name).attr("font-weight","bold").attr("clip-path",(t,i)=>`url(#clip-section-${a}-${i})`).attr("style",t=>{if(t.depth===0)return"display: none;";const i="dominant-baseline: middle; font-size: 12px; fill:"+$(t.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=B({cssCompiledStyles:t.data.cssCompiledStyles});return i+f.labelStyles.replace("color:","fill:")}).each(function(t){if(t.depth===0)return;const i=j(this),f=t.data.name;i.text(f);const C=t.x1-t.x0,L=6;let T;o.showValues!==!1&&t.value?T=C-10-30-10-L:T=C-L-6;const m=Math.max(15,T),_=i.node();if(_.getComputedTextLength()>m){let z=f;for(;z.length>0;){if(z=f.substring(0,z.length-1),z.length===0){i.text("..."),_.getComputedTextLength()>m&&i.text("");break}if(i.text(z+"..."),_.getComputedTextLength()<=m)break}}}),o.showValues!==!1&&R.append("text").attr("class","treemapSectionValue").attr("x",t=>t.x1-t.x0-10).attr("y",G/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(t=>t.value?u(t.value):"").attr("font-style","italic").attr("style",t=>{if(t.depth===0)return"display: none;";const i="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+$(t.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=B({cssCompiledStyles:t.data.cssCompiledStyles});return i+f.labelStyles.replace("color:","fill:")});const le=ne.leaves(),A=le.length>20,de=A?16:38,X=A?14:28,D=A?4:8,H=A?4:6,Z=A?2:4,re=A?8:10,J=A?1:2,Y=V.selectAll(".treemapLeafGroup").data(le).enter().append("g").attr("class",(t,i)=>`treemapNode treemapLeafGroup leaf${i}${t.data.classSelector?` ${t.data.classSelector}`:""}x`).attr("transform",t=>`translate(${t.x0},${t.y0})`);Y.append("rect").attr("width",t=>t.x1-t.x0).attr("height",t=>t.y1-t.y0).attr("class","treemapLeaf").attr("fill",t=>t.parent?y(t.parent.data.name):y(t.data.name)).attr("style",t=>B({cssCompiledStyles:t.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",t=>t.parent?y(t.parent.data.name):y(t.data.name)).attr("stroke-width",3),Y.append("clipPath").attr("id",(t,i)=>`clip-${a}-${i}`).append("rect").attr("width",t=>Math.max(0,t.x1-t.x0-4)).attr("height",t=>Math.max(0,t.y1-t.y0-4)),Y.append("text").attr("class","treemapLabel").attr("x",t=>(t.x1-t.x0)/2).attr("y",t=>(t.y1-t.y0)/2).attr("style",t=>{const i=`text-anchor: middle; dominant-baseline: middle; font-size: ${de}px;fill:`+$(t.data.name)+";",f=B({cssCompiledStyles:t.data.cssCompiledStyles});return i+f.labelStyles.replace("color:","fill:")}).attr("clip-path",(t,i)=>`url(#clip-${a}-${i})`).text(t=>t.data.name).each(function(t){const i=j(this),f=t.x1-t.x0,C=t.y1-t.y0,L=i.node(),T=f-2*Z,P=C-2*Z;if(TT&&m>D;)m--,i.style("font-size",`${m}px`);let F=Math.max(H,Math.min(X,Math.round(m*_))),k=m+J+F;for(;k>P&&m>D&&(m--,F=Math.max(H,Math.min(X,Math.round(m*_))),!(FT||m(i.x1-i.x0)/2).attr("y",function(i){return(i.y1-i.y0)/2}).attr("style",i=>{const f=`text-anchor: middle; dominant-baseline: hanging; font-size: ${X}px;fill:`+$(i.data.name)+";",C=B({cssCompiledStyles:i.data.cssCompiledStyles});return f+C.labelStyles.replace("color:","fill:")}).attr("clip-path",(i,f)=>`url(#clip-${a}-${f})`).text(i=>i.value?u(i.value):"").each(function(i){const f=j(this),C=this.parentNode;if(!C){f.style("display","none");return}const L=j(C).select(".treemapLabel");if(L.empty()||L.style("display")==="none"){f.style("display","none");return}const T=parseFloat(L.style("font-size")),m=Math.max(H,Math.min(X,Math.round(T*.6)));f.style("font-size",`${m}px`);const F=(i.y1-i.y0)/2+T/2+J;f.attr("y",F);const k=i.x1-i.x0,se=i.y1-i.y0-4,fe=k-2*Z;f.node().getComputedTextLength()>fe||F+m>se||m{const a=ge(),n=te(),l=Q(a,n.themeVariables),r=Q(ht,e),o=r.titleColor??l.titleColor,h=r.labelColor??l.textColor,d=r.valueColor??l.textColor;return` .treemapNode.section { stroke: ${r.sectionStrokeColor}; stroke-width: ${r.sectionStrokeWidth}; diff --git a/apps/kimi-code/dist-web/assets/diagram-NH7WQ7WH-CkFCAjqP.js b/apps/kimi-code/dist-web/assets/diagram-NH7WQ7WH-iqDRMohg.js similarity index 93% rename from apps/kimi-code/dist-web/assets/diagram-NH7WQ7WH-CkFCAjqP.js rename to apps/kimi-code/dist-web/assets/diagram-NH7WQ7WH-iqDRMohg.js index e585cacf3d..fc3f9fa4bf 100644 --- a/apps/kimi-code/dist-web/assets/diagram-NH7WQ7WH-CkFCAjqP.js +++ b/apps/kimi-code/dist-web/assets/diagram-NH7WQ7WH-iqDRMohg.js @@ -1,4 +1,4 @@ -import{p as B}from"./chunk-JWPE2WC7-BiIZjhuH.js";import{_ as b,B as u,F as $,e as C,l as m,b as S,a as D,o as T,p as z,g as F,s as P,z as E,D as A,q as W}from"./mermaid.core-BMAf1qng.js";import{p as _}from"./cynefin-VYW2F7L2-B2u2H2Wf.js";import"./index-B-HzRssS.js";import"./_commonjsHelpers-CqkleIqs.js";var N=A.packet,w=class{constructor(){this.packet=[],this.setAccTitle=S,this.getAccTitle=D,this.setDiagramTitle=T,this.getDiagramTitle=z,this.getAccDescription=F,this.setAccDescription=P}static{b(this,"PacketDB")}getConfig(){const t=u({...N,...E().packet});return t.showBits&&(t.paddingY+=10),t}getPacket(){return this.packet}pushWord(t){t.length>0&&this.packet.push(t)}clear(){W(),this.packet=[]}},L=1e4,M=b((t,e)=>{B(t,e);let r=-1,o=[],n=1;const{bitsPerRow:l}=e.getConfig();for(let{start:a,end:i,bits:d,label:c}of t.blocks){if(a!==void 0&&i!==void 0&&i{if(t.start===void 0)throw new Error("start should have been set during first phase");if(t.end===void 0)throw new Error("end should have been set during first phase");if(t.start>t.end)throw new Error(`Block start ${t.start} is greater than block end ${t.end}.`);if(t.end+1<=e*r)return[t,void 0];const o=e*r-1,n=e*r;return[{start:t.start,end:o,label:t.label,bits:o-t.start},{start:n,end:t.end,label:t.label,bits:t.end-n}]},"getNextFittingBlock"),v={parser:{yy:void 0},parse:b(async t=>{const e=await _("packet",t),r=v.parser?.yy;if(!(r instanceof w))throw new Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");m.debug(e),M(e,r)},"parse")},I=b((t,e,r,o)=>{const n=o.db,l=n.getConfig(),{rowHeight:a,paddingY:i,bitWidth:d,bitsPerRow:c}=l,p=n.getPacket(),s=n.getDiagramTitle(),h=a+i,g=h*(p.length+1)-(s?0:a),k=d*c+2,f=$(e);f.attr("viewBox",`0 0 ${k} ${g}`),C(f,g,k,l.useMaxWidth);for(const[x,y]of p.entries())O(f,y,x,l);f.append("text").text(s).attr("x",k/2).attr("y",g-h/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),O=b((t,e,r,{rowHeight:o,paddingX:n,paddingY:l,bitWidth:a,bitsPerRow:i,showBits:d})=>{const c=t.append("g"),p=r*(o+l)+l;for(const s of e){const h=s.start%i*a+1,g=(s.end-s.start+1)*a-n;if(c.append("rect").attr("x",h).attr("y",p).attr("width",g).attr("height",o).attr("class","packetBlock"),c.append("text").attr("x",h+g/2).attr("y",p+o/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(s.label),!d)continue;const k=s.end===s.start,f=p-2;c.append("text").attr("x",h+(k?g/2:0)).attr("y",f).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",k?"middle":"start").text(s.start),k||c.append("text").attr("x",h+g).attr("y",f).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(s.end)}},"drawWord"),j={draw:I},q={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},G=b(({packet:t}={})=>{const e=u(q,t);return` +import{p as B}from"./chunk-JWPE2WC7-DTx-f56M.js";import{_ as b,B as u,F as $,e as C,l as m,b as S,a as D,o as T,p as z,g as F,s as P,z as E,D as A,q as W}from"./mermaid.core-Cahi9cr1.js";import{p as _}from"./cynefin-VYW2F7L2-C5gNr-Q4.js";import"./index-HRJ6xRtC.js";import"./_commonjsHelpers-CqkleIqs.js";var N=A.packet,w=class{constructor(){this.packet=[],this.setAccTitle=S,this.getAccTitle=D,this.setDiagramTitle=T,this.getDiagramTitle=z,this.getAccDescription=F,this.setAccDescription=P}static{b(this,"PacketDB")}getConfig(){const t=u({...N,...E().packet});return t.showBits&&(t.paddingY+=10),t}getPacket(){return this.packet}pushWord(t){t.length>0&&this.packet.push(t)}clear(){W(),this.packet=[]}},L=1e4,M=b((t,e)=>{B(t,e);let r=-1,o=[],n=1;const{bitsPerRow:l}=e.getConfig();for(let{start:a,end:i,bits:d,label:c}of t.blocks){if(a!==void 0&&i!==void 0&&i{if(t.start===void 0)throw new Error("start should have been set during first phase");if(t.end===void 0)throw new Error("end should have been set during first phase");if(t.start>t.end)throw new Error(`Block start ${t.start} is greater than block end ${t.end}.`);if(t.end+1<=e*r)return[t,void 0];const o=e*r-1,n=e*r;return[{start:t.start,end:o,label:t.label,bits:o-t.start},{start:n,end:t.end,label:t.label,bits:t.end-n}]},"getNextFittingBlock"),v={parser:{yy:void 0},parse:b(async t=>{const e=await _("packet",t),r=v.parser?.yy;if(!(r instanceof w))throw new Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");m.debug(e),M(e,r)},"parse")},I=b((t,e,r,o)=>{const n=o.db,l=n.getConfig(),{rowHeight:a,paddingY:i,bitWidth:d,bitsPerRow:c}=l,p=n.getPacket(),s=n.getDiagramTitle(),h=a+i,g=h*(p.length+1)-(s?0:a),k=d*c+2,f=$(e);f.attr("viewBox",`0 0 ${k} ${g}`),C(f,g,k,l.useMaxWidth);for(const[x,y]of p.entries())O(f,y,x,l);f.append("text").text(s).attr("x",k/2).attr("y",g-h/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),O=b((t,e,r,{rowHeight:o,paddingX:n,paddingY:l,bitWidth:a,bitsPerRow:i,showBits:d})=>{const c=t.append("g"),p=r*(o+l)+l;for(const s of e){const h=s.start%i*a+1,g=(s.end-s.start+1)*a-n;if(c.append("rect").attr("x",h).attr("y",p).attr("width",g).attr("height",o).attr("class","packetBlock"),c.append("text").attr("x",h+g/2).attr("y",p+o/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(s.label),!d)continue;const k=s.end===s.start,f=p-2;c.append("text").attr("x",h+(k?g/2:0)).attr("y",f).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",k?"middle":"start").text(s.start),k||c.append("text").attr("x",h+g).attr("y",f).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(s.end)}},"drawWord"),j={draw:I},q={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},G=b(({packet:t}={})=>{const e=u(q,t);return` .packetByte { font-size: ${e.byteFontSize}; } diff --git a/apps/kimi-code/dist-web/assets/diagram-OA4YK3LP-XuNp_Rrf.js b/apps/kimi-code/dist-web/assets/diagram-OA4YK3LP-DSnuTLFG.js similarity index 96% rename from apps/kimi-code/dist-web/assets/diagram-OA4YK3LP-XuNp_Rrf.js rename to apps/kimi-code/dist-web/assets/diagram-OA4YK3LP-DSnuTLFG.js index 43777b78b1..7a0f11d802 100644 --- a/apps/kimi-code/dist-web/assets/diagram-OA4YK3LP-XuNp_Rrf.js +++ b/apps/kimi-code/dist-web/assets/diagram-OA4YK3LP-DSnuTLFG.js @@ -1,4 +1,4 @@ -import{I as X}from"./chunk-2Q5K7J3B-BJB08iqf.js";import{p as O}from"./chunk-JWPE2WC7-BiIZjhuH.js";import{o as G,b as Y,s as F,p as P,g as j,a as q,_ as f,B as A,l as D,F as Z,e as U,z as N,q as J,i as K,ai as Q,D as ee,aj as te}from"./mermaid.core-BMAf1qng.js";import{p as ne}from"./cynefin-VYW2F7L2-B2u2H2Wf.js";import"./index-B-HzRssS.js";import"./_commonjsHelpers-CqkleIqs.js";var E=/[─━│┃└┗├┣]/,S=/[└┗├┣]/,re=/[─━]/,V=/^[\s│┃]+$/,$=/^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/,k=/^\s*%%/,ie=" ";function L(n){return n.some(e=>E.test(e))}f(L,"isBoxDrawingFormat");function _(n){for(const e of n){const t=S.exec(e);if(t?.index&&t.index>0)return t.index}return 4}f(_,"inferSegmentWidth");function M(n,e){return n.replace(/\bline\s+(\d+)\b/gi,(t,r)=>{const i=parseInt(r,10),a=e.get(i);return a?`line ${a}`:t})}f(M,"remapErrorLines");function R(n){const e=n.split(` +import{I as X}from"./chunk-2Q5K7J3B-B47YykJY.js";import{p as O}from"./chunk-JWPE2WC7-DTx-f56M.js";import{o as G,b as Y,s as F,p as P,g as j,a as q,_ as f,B as A,l as D,F as Z,e as U,z as N,q as J,i as K,ai as Q,D as ee,aj as te}from"./mermaid.core-Cahi9cr1.js";import{p as ne}from"./cynefin-VYW2F7L2-C5gNr-Q4.js";import"./index-HRJ6xRtC.js";import"./_commonjsHelpers-CqkleIqs.js";var E=/[─━│┃└┗├┣]/,S=/[└┗├┣]/,re=/[─━]/,V=/^[\s│┃]+$/,$=/^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/,k=/^\s*%%/,ie=" ";function L(n){return n.some(e=>E.test(e))}f(L,"isBoxDrawingFormat");function _(n){for(const e of n){const t=S.exec(e);if(t?.index&&t.index>0)return t.index}return 4}f(_,"inferSegmentWidth");function M(n,e){return n.replace(/\bline\s+(\d+)\b/gi,(t,r)=>{const i=parseInt(r,10),a=e.get(i);return a?`line ${a}`:t})}f(M,"remapErrorLines");function R(n){const e=n.split(` `),t=new Map;let r=-1;for(const[s,o]of e.entries())if(o.trim()==="treeView-beta"){r=s;break}if(r===-1)return{text:n,lineMap:t};const i=[];for(let s=r+1;s({cnt:1,stack:[{id:0,level:-1,name:"/",nodeType:"directory",children:[]}]})),oe=f(()=>{x.reset(),J()},"clear"),se=f(()=>x.records.stack[0],"getRoot"),ae=f(()=>x.records.cnt,"getCount"),ce=ee.treeView,le=f(()=>A(ce,N().treeView),"getConfig"),de=f((n,e,t,r,i,a)=>{for(;n<=x.records.stack[x.records.stack.length-1].level;)x.records.stack.pop();const c={id:x.records.cnt++,level:n,name:e,nodeType:t,icon:i,cssClass:r,description:a,children:[]};x.records.stack[x.records.stack.length-1].children.push(c),x.records.stack.push(c)},"addNode"),he={clear:oe,addNode:de,getRoot:se,getCount:ae,getConfig:le,getAccTitle:q,getAccDescription:j,getDiagramTitle:P,setAccDescription:F,setAccTitle:Y,setDiagramTitle:G},I=he,pe=f(n=>{O(n,I);for(const e of n.nodes){const t=typeof e.indent=="number"?e.indent:0;let r=e.name;const i=r.endsWith("/");i&&(r=r.slice(0,-1));const a=i?"directory":"file",c=e.classAnnotation||void 0,l=e.iconAnnotation,s=l!==void 0?l||"none":void 0,o=e.descAnnotation||void 0,h=o?K(o,N()):void 0;I.addNode(t,r,a,c,s,h)}},"populate"),fe={parse:f(async n=>{const{text:e,lineMap:t}=R(n);try{const r=await ne("treeView",e);D.debug(r),pe(r)}catch(r){throw t.size>0&&r instanceof Error&&(r.message=M(r.message,t)),r}},"parse")},b={prefix:"mermaid-treeview",height:24,width:24,icons:{folder:{body:''},file:{body:''}}};function z(n,e){const t=e?.filenameIcons?.[n];if(t)return t;const r=n.lastIndexOf(".");if(r>0){const i=n.substring(r).toLowerCase(),a=e?.extensionIcons;return a?.[i]??a?.[i.slice(1)]}}f(z,"detectIcon");function C(n,e){return n.includes(":")?n:n in b.icons||!e?`${b.prefix}:${n}`:`${e}:${n}`}f(C,"qualifyIcon");function B(n,e){if(n.icon!=="none"){if(n.icon)return C(n.icon,e.defaultIconPack);if(e.showIcons){if(n.nodeType==="file"){const t=z(n.name,e);if(t==="none")return;if(t)return C(t,e.defaultIconPack)}return`${b.prefix}:${n.nodeType==="directory"?"folder":"file"}`}}}f(B,"getNodeIcon");te([{name:b.prefix,icons:b}]);var y=14,ge=4,ue=16,H=f((n,e)=>`tv-icon-${n}-${e.replace(/[^\w-]/g,"-")}`,"iconSymbolId"),we=f(async(n,e,t,r)=>{const i=new Set,a=f(s=>{const o=B(s,t);o&&i.add(o),s.children.forEach(a)},"collect");if(a(e),i.size===0)return;const c=await Promise.all([...i].map(async s=>({icon:s,svg:await Q(s,{height:y,width:y})}))),l=n.append("defs");for(const{icon:s,svg:o}of c)l.append("g").attr("id",H(r,s)).html(o)},"injectIconDefs"),me=f((n,e,t,r,i,a)=>{const c=r.append("g");let l="treeView-node-label";t.nodeType==="directory"&&(l+=" treeView-node-dir"),t.cssClass&&(l+=` ${t.cssClass}`);const s=y+ge,o=B(t,i),h=o!==void 0;o&&c.append("use").attr("xlink:href",`#${H(a,o)}`).attr("x",n+i.paddingX).attr("y",e+i.paddingY).attr("class","treeView-node-icon");const p=c.append("text").text(t.name).attr("dominant-baseline","middle").attr("class",l),{height:d,width:w}=p.node().getBBox(),g=d+i.paddingY*2,m=n+i.paddingX+(h?s:0);p.attr("x",m),p.attr("y",e+g/2);const u=m+w,v=w+i.paddingX*2+(h?s:0);return t.BBox={x:n,y:e,width:v,height:g},t.cssClass?.split(/\s+/).includes("highlight")&&c.insert("rect",":first-child").attr("x",n).attr("y",e+1).attr("width",0).attr("height",g-2).attr("rx",3).attr("class","treeView-highlight-bg"),{node:t,nodeGroup:c,labelRightEdge:u,centerY:e+g/2}},"positionLabel"),T=f((n,e,t,r,i,a)=>n.append("line").attr("x1",e).attr("y1",t).attr("x2",r).attr("y2",i).attr("stroke-width",a).attr("class","treeView-node-line"),"positionLine"),xe=f((n,e,t,r)=>{let i=0,a=0;const c=[],l=f((h,p,d,w)=>{const g=w*(d.rowIndent+d.paddingX),m=me(g,i,p,h,d,r);c.push(m);const{height:u,width:v}=p.BBox;T(h,g-d.rowIndent,i+u/2,g,i+u/2,d.lineThickness),a=Math.max(a,g+v),i+=u},"drawNode"),s=f((h,p=0)=>{l(n,h,t,p),h.children.forEach(m=>{s(m,p+1)});const{x:d,y:w,height:g}=h.BBox;if(h.children.length){const{y:m,height:u}=h.children[h.children.length-1].BBox;T(n,d+t.paddingX,w+g,d+t.paddingX,m+u/2+t.lineThickness/2,t.lineThickness)}},"processNode");s(e);const o=c.filter(h=>h.node.description);if(o.length>0){const p=Math.max(...c.map(d=>d.labelRightEdge))+ue;for(const d of o){const g=d.nodeGroup.append("text").text(d.node.description).attr("dominant-baseline","middle").attr("class","treeView-node-description").attr("x",p).attr("y",d.centerY).node().getBBox();a=Math.max(a,p+g.width+t.paddingX)}}for(const h of c)if(h.node.cssClass?.split(/\s+/).includes("highlight")){const p=h.nodeGroup.select(".treeView-highlight-bg");if(!p.empty()){const d=a-h.node.BBox.x+8;p.attr("width",d),a=Math.max(a,h.node.BBox.x+d+2)}}return{totalHeight:i,totalWidth:a}},"drawTree"),ve=f(async(n,e,t,r)=>{D.debug(`Rendering treeView diagram `+n);const i=r.db,a=i.getRoot(),c=i.getConfig(),l=Z(e);await we(l,a,c,e);const s=l.append("g");s.attr("class","tree-view");const{totalHeight:o,totalWidth:h}=xe(s,a,c,e);l.attr("viewBox",`-${c.lineThickness/2} 0 ${h} ${o}`),U(l,o,h,c.useMaxWidth)},"draw"),be={draw:ve},Ie=be,Ce={labelFontSize:"16px",labelColor:"black",lineColor:"black",iconColor:"#546e7a",descriptionColor:"#6a9955",highlightBg:"rgba(255, 193, 7, 0.15)",highlightStroke:"#ffc107"},ye=f(({treeView:n})=>{const{labelFontSize:e,labelColor:t,lineColor:r,iconColor:i,descriptionColor:a,highlightBg:c,highlightStroke:l}=A(Ce,n);return` diff --git a/apps/kimi-code/dist-web/assets/diagram-WEI45ONY-BxyPHaUz.js b/apps/kimi-code/dist-web/assets/diagram-WEI45ONY-lGPhYqjp.js similarity index 95% rename from apps/kimi-code/dist-web/assets/diagram-WEI45ONY-BxyPHaUz.js rename to apps/kimi-code/dist-web/assets/diagram-WEI45ONY-lGPhYqjp.js index e686747fdb..9b7db5b49e 100644 --- a/apps/kimi-code/dist-web/assets/diagram-WEI45ONY-BxyPHaUz.js +++ b/apps/kimi-code/dist-web/assets/diagram-WEI45ONY-lGPhYqjp.js @@ -1,4 +1,4 @@ -import{p as k}from"./chunk-JWPE2WC7-BiIZjhuH.js";import{s as R,g as F,p as I,o as _,a as D,b as E,_ as c,F as z,q as P,B as y,z as C,D as G,l as B,W,e as V}from"./mermaid.core-BMAf1qng.js";import{p as H}from"./cynefin-VYW2F7L2-B2u2H2Wf.js";import"./index-B-HzRssS.js";import"./_commonjsHelpers-CqkleIqs.js";var m={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"},w={axes:[],curves:[],options:m},x=structuredClone(w),j=G.radar,q=c(()=>y({...j,...C().radar}),"getConfig"),b=c(()=>x.axes,"getAxes"),N=c(()=>x.curves,"getCurves"),U=c(()=>x.options,"getOptions"),X=c(a=>{x.axes=a.map(t=>({name:t.name,label:t.label??t.name}))},"setAxes"),Y=c(a=>{x.curves=a.map(t=>({name:t.name,label:t.label??t.name,entries:Z(t.entries)}))},"setCurves"),Z=c(a=>{if(a[0].axis==null)return a.map(e=>e.value);const t=b();if(t.length===0)throw new Error("Axes must be populated before curves for reference entries");return t.map(e=>{const r=a.find(s=>s.axis?.$refText===e.name);if(r===void 0)throw new Error("Missing entry for axis "+e.label);return r.value})},"computeCurveEntries"),J=c(a=>{const t=a.reduce((e,r)=>(e[r.name]=r,e),{});x.options={showLegend:t.showLegend?.value??m.showLegend,ticks:t.ticks?.value??m.ticks,max:t.max?.value??m.max,min:t.min?.value??m.min,graticule:t.graticule?.value??m.graticule}},"setOptions"),K=c(()=>{P(),x=structuredClone(w)},"clear"),$={getAxes:b,getCurves:N,getOptions:U,setAxes:X,setCurves:Y,setOptions:J,getConfig:q,clear:K,setAccTitle:E,getAccTitle:D,setDiagramTitle:_,getDiagramTitle:I,getAccDescription:F,setAccDescription:R},Q=c(a=>{k(a,$);const{axes:t,curves:e,options:r}=a;$.setAxes(t),$.setCurves(e),$.setOptions(r)},"populate"),tt={parse:c(async a=>{const t=await H("radar",a);B.debug(t),Q(t)},"parse")},et=c((a,t,e,r)=>{const s=r.db,i=s.getAxes(),l=s.getCurves(),n=s.getOptions(),o=s.getConfig(),d=s.getDiagramTitle(),p=z(t),u=at(p,o),g=n.max??Math.max(...l.map(f=>Math.max(...f.entries))),h=n.min,v=Math.min(o.width,o.height)/2;rt(u,i,v,n.ticks,n.graticule),st(u,i,v,o),A(u,i,l,h,g,n.graticule,o),T(u,l,n.showLegend,o),u.append("text").attr("class","radarTitle").text(d).attr("x",0).attr("y",-o.height/2-o.marginTop)},"draw"),at=c((a,t)=>{const e=t.width+t.marginLeft+t.marginRight,r=t.height+t.marginTop+t.marginBottom,s={x:t.marginLeft+t.width/2,y:t.marginTop+t.height/2};return V(a,r,e,t.useMaxWidth??!0),a.attr("viewBox",`0 0 ${e} ${r}`).attr("overflow","visible"),a.append("g").attr("transform",`translate(${s.x}, ${s.y})`)},"drawFrame"),rt=c((a,t,e,r,s)=>{if(s==="circle")for(let i=0;i{const u=2*p*Math.PI/i-Math.PI/2,g=n*Math.cos(u),h=n*Math.sin(u);return`${g},${h}`}).join(" ");a.append("polygon").attr("points",o).attr("class","radarGraticule")}}},"drawGraticule"),st=c((a,t,e,r)=>{const s=t.length;for(let i=0;i.01?"start":o<-.01?"end":"middle",u=d>.01?"hanging":d<-.01?"auto":"central",g=4;a.append("text").text(l).attr("x",e*r.axisLabelFactor*o+g*o).attr("y",e*r.axisLabelFactor*d+g*d).attr("text-anchor",p).attr("dominant-baseline",u).attr("class","radarAxisLabel")}},"drawAxes");function A(a,t,e,r,s,i,l){const n=t.length,o=Math.min(l.width,l.height)/2;e.forEach((d,p)=>{if(d.entries.length!==n)return;const u=d.entries.map((g,h)=>{const v=2*Math.PI*h/n-Math.PI/2,f=M(g,r,s,o),S=f*Math.cos(v),O=f*Math.sin(v);return{x:S,y:O}});i==="circle"?a.append("path").attr("d",L(u,l.curveTension)).attr("class",`radarCurve-${p}`):i==="polygon"&&a.append("polygon").attr("points",u.map(g=>`${g.x},${g.y}`).join(" ")).attr("class",`radarCurve-${p}`)})}c(A,"drawCurves");function M(a,t,e,r){const s=Math.min(Math.max(a,t),e);return r*(s-t)/(e-t)}c(M,"relativeRadius");function L(a,t){const e=a.length;let r=`M${a[0].x},${a[0].y}`;for(let s=0;s{const d=a.append("g").attr("transform",`translate(${s}, ${i+o*l})`);d.append("rect").attr("width",12).attr("height",12).attr("class",`radarLegendBox-${o}`),d.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(n.label)})}c(T,"drawLegend");var nt={draw:et},ot=c((a,t)=>{let e="";for(let r=0;ry({...j,...C().radar}),"getConfig"),b=c(()=>x.axes,"getAxes"),N=c(()=>x.curves,"getCurves"),U=c(()=>x.options,"getOptions"),X=c(a=>{x.axes=a.map(t=>({name:t.name,label:t.label??t.name}))},"setAxes"),Y=c(a=>{x.curves=a.map(t=>({name:t.name,label:t.label??t.name,entries:Z(t.entries)}))},"setCurves"),Z=c(a=>{if(a[0].axis==null)return a.map(e=>e.value);const t=b();if(t.length===0)throw new Error("Axes must be populated before curves for reference entries");return t.map(e=>{const r=a.find(s=>s.axis?.$refText===e.name);if(r===void 0)throw new Error("Missing entry for axis "+e.label);return r.value})},"computeCurveEntries"),J=c(a=>{const t=a.reduce((e,r)=>(e[r.name]=r,e),{});x.options={showLegend:t.showLegend?.value??m.showLegend,ticks:t.ticks?.value??m.ticks,max:t.max?.value??m.max,min:t.min?.value??m.min,graticule:t.graticule?.value??m.graticule}},"setOptions"),K=c(()=>{P(),x=structuredClone(w)},"clear"),$={getAxes:b,getCurves:N,getOptions:U,setAxes:X,setCurves:Y,setOptions:J,getConfig:q,clear:K,setAccTitle:E,getAccTitle:D,setDiagramTitle:_,getDiagramTitle:I,getAccDescription:F,setAccDescription:R},Q=c(a=>{k(a,$);const{axes:t,curves:e,options:r}=a;$.setAxes(t),$.setCurves(e),$.setOptions(r)},"populate"),tt={parse:c(async a=>{const t=await H("radar",a);B.debug(t),Q(t)},"parse")},et=c((a,t,e,r)=>{const s=r.db,i=s.getAxes(),l=s.getCurves(),n=s.getOptions(),o=s.getConfig(),d=s.getDiagramTitle(),p=z(t),u=at(p,o),g=n.max??Math.max(...l.map(f=>Math.max(...f.entries))),h=n.min,v=Math.min(o.width,o.height)/2;rt(u,i,v,n.ticks,n.graticule),st(u,i,v,o),A(u,i,l,h,g,n.graticule,o),T(u,l,n.showLegend,o),u.append("text").attr("class","radarTitle").text(d).attr("x",0).attr("y",-o.height/2-o.marginTop)},"draw"),at=c((a,t)=>{const e=t.width+t.marginLeft+t.marginRight,r=t.height+t.marginTop+t.marginBottom,s={x:t.marginLeft+t.width/2,y:t.marginTop+t.height/2};return V(a,r,e,t.useMaxWidth??!0),a.attr("viewBox",`0 0 ${e} ${r}`).attr("overflow","visible"),a.append("g").attr("transform",`translate(${s.x}, ${s.y})`)},"drawFrame"),rt=c((a,t,e,r,s)=>{if(s==="circle")for(let i=0;i{const u=2*p*Math.PI/i-Math.PI/2,g=n*Math.cos(u),h=n*Math.sin(u);return`${g},${h}`}).join(" ");a.append("polygon").attr("points",o).attr("class","radarGraticule")}}},"drawGraticule"),st=c((a,t,e,r)=>{const s=t.length;for(let i=0;i.01?"start":o<-.01?"end":"middle",u=d>.01?"hanging":d<-.01?"auto":"central",g=4;a.append("text").text(l).attr("x",e*r.axisLabelFactor*o+g*o).attr("y",e*r.axisLabelFactor*d+g*d).attr("text-anchor",p).attr("dominant-baseline",u).attr("class","radarAxisLabel")}},"drawAxes");function A(a,t,e,r,s,i,l){const n=t.length,o=Math.min(l.width,l.height)/2;e.forEach((d,p)=>{if(d.entries.length!==n)return;const u=d.entries.map((g,h)=>{const v=2*Math.PI*h/n-Math.PI/2,f=M(g,r,s,o),S=f*Math.cos(v),O=f*Math.sin(v);return{x:S,y:O}});i==="circle"?a.append("path").attr("d",L(u,l.curveTension)).attr("class",`radarCurve-${p}`):i==="polygon"&&a.append("polygon").attr("points",u.map(g=>`${g.x},${g.y}`).join(" ")).attr("class",`radarCurve-${p}`)})}c(A,"drawCurves");function M(a,t,e,r){const s=Math.min(Math.max(a,t),e);return r*(s-t)/(e-t)}c(M,"relativeRadius");function L(a,t){const e=a.length;let r=`M${a[0].x},${a[0].y}`;for(let s=0;s{const d=a.append("g").attr("transform",`translate(${s}, ${i+o*l})`);d.append("rect").attr("width",12).attr("height",12).attr("class",`radarLegendBox-${o}`),d.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(n.label)})}c(T,"drawLegend");var nt={draw:et},ot=c((a,t)=>{let e="";for(let r=0;r{const r=e.alternatives.map(E);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformChoice"),E=t(e=>{const r=e.elements.map(d);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformSequence"),i=t(e=>{switch(e.$type){case"EbnfTerminal":return{type:"terminal",value:e.value};case"EbnfNonTerminal":return{type:"nonterminal",name:e.name};case"EbnfSpecial":return{type:"special",text:e.text};case"EbnfGroup":return s(e.element);case"EbnfOptional":return{type:"optional",element:s(e.element)};case"EbnfRepetition":return{type:"repetition",element:s(e.element),min:0,max:1/0};default:throw new Error(`Unsupported EBNF primary node: ${e.$type}`)}},"transformPrimary"),b=t((e,r)=>{switch(r.$type){case"EbnfOptionalPostfix":return{type:"optional",element:e};case"EbnfZeroOrMorePostfix":return{type:"repetition",element:e,min:0,max:1/0};case"EbnfOneOrMorePostfix":return{type:"repetition",element:e,min:1,max:1/0};case"EbnfExceptionPostfix":return{type:"sequence",elements:[e,{type:"terminal",value:"-"},i(r.except)]};default:throw new Error(`Unsupported EBNF postfix node: ${r.$type}`)}},"transformPostfix"),d=t(e=>e.postfixes.reduce((r,a)=>b(r,a),i(e.base)),"transformTerm"),y=t(e=>({name:e.name,definition:s(e.definition)}),"transformRule"),v=t(e=>{p(e,n),e.title&&n.setTitle(e.title),e.rules.map(r=>n.addRule(y(r)))},"populateDb"),g={parse:t(e=>{n.clear(),o.debug("[EBNF Parser] Starting Langium parse");const r=c.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new u(r);const a=r.value;o.debug("[EBNF Parser] Parsed rules:",a.rules.length),v(a),o.debug("[EBNF Parser] Parse complete")},"parse"),parser:{yy:n}},S={parser:g,db:n,renderer:m,styles:l};export{S as diagram}; +import{g as l,r as m,d as n}from"./chunk-MOJQB5TN-hIDvr-8C.js";import{p}from"./chunk-JWPE2WC7-DTx-f56M.js";import{_ as t,l as o}from"./mermaid.core-Cahi9cr1.js";import{M as u,a as f}from"./cynefin-VYW2F7L2-C5gNr-Q4.js";import"./index-HRJ6xRtC.js";import"./_commonjsHelpers-CqkleIqs.js";var c=f().RailroadEbnf.parser.LangiumParser,s=t(e=>{const r=e.alternatives.map(E);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformChoice"),E=t(e=>{const r=e.elements.map(d);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformSequence"),i=t(e=>{switch(e.$type){case"EbnfTerminal":return{type:"terminal",value:e.value};case"EbnfNonTerminal":return{type:"nonterminal",name:e.name};case"EbnfSpecial":return{type:"special",text:e.text};case"EbnfGroup":return s(e.element);case"EbnfOptional":return{type:"optional",element:s(e.element)};case"EbnfRepetition":return{type:"repetition",element:s(e.element),min:0,max:1/0};default:throw new Error(`Unsupported EBNF primary node: ${e.$type}`)}},"transformPrimary"),b=t((e,r)=>{switch(r.$type){case"EbnfOptionalPostfix":return{type:"optional",element:e};case"EbnfZeroOrMorePostfix":return{type:"repetition",element:e,min:0,max:1/0};case"EbnfOneOrMorePostfix":return{type:"repetition",element:e,min:1,max:1/0};case"EbnfExceptionPostfix":return{type:"sequence",elements:[e,{type:"terminal",value:"-"},i(r.except)]};default:throw new Error(`Unsupported EBNF postfix node: ${r.$type}`)}},"transformPostfix"),d=t(e=>e.postfixes.reduce((r,a)=>b(r,a),i(e.base)),"transformTerm"),y=t(e=>({name:e.name,definition:s(e.definition)}),"transformRule"),v=t(e=>{p(e,n),e.title&&n.setTitle(e.title),e.rules.map(r=>n.addRule(y(r)))},"populateDb"),g={parse:t(e=>{n.clear(),o.debug("[EBNF Parser] Starting Langium parse");const r=c.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new u(r);const a=r.value;o.debug("[EBNF Parser] Parsed rules:",a.rules.length),v(a),o.debug("[EBNF Parser] Parse complete")},"parse"),parser:{yy:n}},S={parser:g,db:n,renderer:m,styles:l};export{S as diagram}; diff --git a/apps/kimi-code/dist-web/assets/erDiagram-Q63AITRT-ClZyl3be.js b/apps/kimi-code/dist-web/assets/erDiagram-Q63AITRT-MX1lpdtV.js similarity index 99% rename from apps/kimi-code/dist-web/assets/erDiagram-Q63AITRT-ClZyl3be.js rename to apps/kimi-code/dist-web/assets/erDiagram-Q63AITRT-MX1lpdtV.js index 66afce28de..54e42e2924 100644 --- a/apps/kimi-code/dist-web/assets/erDiagram-Q63AITRT-ClZyl3be.js +++ b/apps/kimi-code/dist-web/assets/erDiagram-Q63AITRT-MX1lpdtV.js @@ -1,4 +1,4 @@ -import{g as Mt}from"./chunk-XXDRQBXY-CcyRETTg.js";import{s as Bt}from"./chunk-VR4S4FIN-Cveor6Gg.js";import{_ as l,b as Ft,a as Yt,s as Pt,g as zt,o as Gt,p as Kt,c as it,l as V,q as Ut,r as Zt,t as jt,u as Wt,v as qt,x as Qt,d as Xt,y as Ht}from"./mermaid.core-BMAf1qng.js";import{c as Jt}from"./channel-DV0CaBk6.js";import"./index-B-HzRssS.js";import"./_commonjsHelpers-CqkleIqs.js";var _t=(function(){var e=l(function(I,n,c,o){for(c=c||{},o=I.length;o--;c[I[o]]=n);return c},"o"),i=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52],h=[1,10],a=[1,11],u=[1,12],d=[1,13],y=[1,23],f=[1,24],m=[1,25],j=[1,26],W=[1,27],S=[1,19],q=[1,28],M=[1,29],D=[1,20],R=[1,18],T=[1,21],C=[1,22],nt=[1,36],at=[1,37],ct=[1,38],ot=[1,39],lt=[1,40],B=[6,8,10,13,15,17,20,21,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52,66,67,68,69,70],O=[1,45],N=[1,46],F=[1,55],Y=[40,48,50,51,52,71,72],P=[1,66],z=[1,64],A=[1,61],G=[1,65],K=[1,67],Q=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,51,52,66,67,68,69,70],gt=[66,67,68,69,70],bt=[1,85],kt=[1,84],mt=[1,82],Et=[1,83],St=[6,10,42,47],L=[6,10,13,41,42,47,48,49],X=[1,93],H=[1,92],J=[1,91],U=[19,58],Tt=[1,102],Ot=[1,101],ht=[19,58,61,63],ut={trace:l(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,COLON:13,role:14,STYLE_SEPARATOR:15,idList:16,BLOCK_START:17,attributes:18,BLOCK_STOP:19,SQS:20,SQE:21,title:22,title_value:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,direction:29,classDefStatement:30,classStatement:31,styleStatement:32,direction_tb:33,direction_bt:34,direction_rl:35,direction_lr:36,CLASSDEF:37,stylesOpt:38,separator:39,UNICODE_TEXT:40,STYLE_TEXT:41,COMMA:42,CLASS:43,STYLE:44,style:45,styleComponent:46,SEMI:47,NUM:48,BRKT:49,ENTITY_NAME:50,DECIMAL_NUM:51,ENTITY_ONE:52,attribute:53,attributeType:54,attributeName:55,attributeKeyTypeList:56,attributeComment:57,ATTRIBUTE_WORD:58,"?":59,attributeKeyType:60,",":61,ATTRIBUTE_KEY:62,COMMENT:63,cardinality:64,relType:65,ZERO_OR_ONE:66,ZERO_OR_MORE:67,ONE_OR_MORE:68,ONLY_ONE:69,MD_PARENT:70,NON_IDENTIFYING:71,IDENTIFYING:72,WORD:73,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",8:"SPACE",10:"NEWLINE",13:"COLON",15:"STYLE_SEPARATOR",17:"BLOCK_START",19:"BLOCK_STOP",20:"SQS",21:"SQE",22:"title",23:"title_value",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"direction_tb",34:"direction_bt",35:"direction_rl",36:"direction_lr",37:"CLASSDEF",40:"UNICODE_TEXT",41:"STYLE_TEXT",42:"COMMA",43:"CLASS",44:"STYLE",47:"SEMI",48:"NUM",49:"BRKT",50:"ENTITY_NAME",51:"DECIMAL_NUM",52:"ENTITY_ONE",58:"ATTRIBUTE_WORD",59:"?",61:",",62:"ATTRIBUTE_KEY",63:"COMMENT",66:"ZERO_OR_ONE",67:"ZERO_OR_MORE",68:"ONE_OR_MORE",69:"ONLY_ONE",70:"MD_PARENT",71:"NON_IDENTIFYING",72:"IDENTIFYING",73:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,9],[9,7],[9,7],[9,4],[9,6],[9,3],[9,5],[9,1],[9,3],[9,7],[9,9],[9,6],[9,8],[9,4],[9,6],[9,2],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[9,1],[29,1],[29,1],[29,1],[29,1],[30,4],[16,1],[16,1],[16,3],[16,3],[31,3],[32,4],[38,1],[38,3],[45,1],[45,2],[39,1],[39,1],[39,1],[46,1],[46,1],[46,1],[46,1],[11,1],[11,1],[11,1],[11,1],[11,1],[18,1],[18,2],[53,2],[53,3],[53,3],[53,4],[54,1],[54,2],[55,1],[56,1],[56,3],[60,1],[57,1],[12,3],[64,1],[64,1],[64,1],[64,1],[64,1],[65,1],[65,1],[14,1],[14,1],[14,1]],performAction:l(function(n,c,o,r,p,t,Z){var s=t.length-1;switch(p){case 1:break;case 2:this.$=[];break;case 3:t[s-1].push(t[s]),this.$=t[s-1];break;case 4:case 5:this.$=t[s];break;case 6:case 7:this.$=[];break;case 8:r.addEntity(t[s-4]),r.addEntity(t[s-2]),r.addRelationship(t[s-4],t[s],t[s-2],t[s-3]);break;case 9:r.addEntity(t[s-8]),r.addEntity(t[s-4]),r.addRelationship(t[s-8],t[s],t[s-4],t[s-5]),r.setClass([t[s-8]],t[s-6]),r.setClass([t[s-4]],t[s-2]);break;case 10:r.addEntity(t[s-6]),r.addEntity(t[s-2]),r.addRelationship(t[s-6],t[s],t[s-2],t[s-3]),r.setClass([t[s-6]],t[s-4]);break;case 11:r.addEntity(t[s-6]),r.addEntity(t[s-4]),r.addRelationship(t[s-6],t[s],t[s-4],t[s-5]),r.setClass([t[s-4]],t[s-2]);break;case 12:r.addEntity(t[s-3]),r.addAttributes(t[s-3],t[s-1]);break;case 13:r.addEntity(t[s-5]),r.addAttributes(t[s-5],t[s-1]),r.setClass([t[s-5]],t[s-3]);break;case 14:r.addEntity(t[s-2]);break;case 15:r.addEntity(t[s-4]),r.setClass([t[s-4]],t[s-2]);break;case 16:r.addEntity(t[s]);break;case 17:r.addEntity(t[s-2]),r.setClass([t[s-2]],t[s]);break;case 18:r.addEntity(t[s-6],t[s-4]),r.addAttributes(t[s-6],t[s-1]);break;case 19:r.addEntity(t[s-8],t[s-6]),r.addAttributes(t[s-8],t[s-1]),r.setClass([t[s-8]],t[s-3]);break;case 20:r.addEntity(t[s-5],t[s-3]);break;case 21:r.addEntity(t[s-7],t[s-5]),r.setClass([t[s-7]],t[s-2]);break;case 22:r.addEntity(t[s-3],t[s-1]);break;case 23:r.addEntity(t[s-5],t[s-3]),r.setClass([t[s-5]],t[s]);break;case 24:case 25:this.$=t[s].trim(),r.setAccTitle(this.$);break;case 26:case 27:this.$=t[s].trim(),r.setAccDescription(this.$);break;case 32:r.setDirection("TB");break;case 33:r.setDirection("BT");break;case 34:r.setDirection("RL");break;case 35:r.setDirection("LR");break;case 36:this.$=t[s-3],r.addClass(t[s-2],t[s-1]);break;case 37:case 38:case 59:case 68:this.$=[t[s]];break;case 39:case 40:this.$=t[s-2].concat([t[s]]);break;case 41:this.$=t[s-2],r.setClass(t[s-1],t[s]);break;case 42:this.$=t[s-3],r.addCssStyles(t[s-2],t[s-1]);break;case 43:this.$=[t[s]];break;case 44:t[s-2].push(t[s]),this.$=t[s-2];break;case 46:this.$=t[s-1]+t[s];break;case 54:case 80:case 81:this.$=t[s].replace(/"/g,"");break;case 55:case 56:case 57:case 58:case 82:this.$=t[s];break;case 60:t[s].push(t[s-1]),this.$=t[s];break;case 61:this.$={type:t[s-1],name:t[s]};break;case 62:this.$={type:t[s-2],name:t[s-1],keys:t[s]};break;case 63:this.$={type:t[s-2],name:t[s-1],comment:t[s]};break;case 64:this.$={type:t[s-3],name:t[s-2],keys:t[s-1],comment:t[s]};break;case 65:case 67:case 70:this.$=t[s];break;case 66:this.$=t[s-1]+t[s];break;case 69:t[s-2].push(t[s]),this.$=t[s-2];break;case 71:this.$=t[s].replace(/"/g,"");break;case 72:this.$={cardA:t[s],relType:t[s-1],cardB:t[s-2]};break;case 73:this.$=r.Cardinality.ZERO_OR_ONE;break;case 74:this.$=r.Cardinality.ZERO_OR_MORE;break;case 75:this.$=r.Cardinality.ONE_OR_MORE;break;case 76:this.$=r.Cardinality.ONLY_ONE;break;case 77:this.$=r.Cardinality.MD_PARENT;break;case 78:this.$=r.Identification.NON_IDENTIFYING;break;case 79:this.$=r.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},e(i,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:h,24:a,26:u,28:d,29:14,30:15,31:16,32:17,33:y,34:f,35:m,36:j,37:W,40:S,43:q,44:M,48:D,50:R,51:T,52:C},e(i,[2,7],{1:[2,1]}),e(i,[2,3]),{9:30,11:9,22:h,24:a,26:u,28:d,29:14,30:15,31:16,32:17,33:y,34:f,35:m,36:j,37:W,40:S,43:q,44:M,48:D,50:R,51:T,52:C},e(i,[2,5]),e(i,[2,6]),e(i,[2,16],{12:31,64:35,15:[1,32],17:[1,33],20:[1,34],66:nt,67:at,68:ct,69:ot,70:lt}),{23:[1,41]},{25:[1,42]},{27:[1,43]},e(i,[2,27]),e(i,[2,28]),e(i,[2,29]),e(i,[2,30]),e(i,[2,31]),e(B,[2,54]),e(B,[2,55]),e(B,[2,56]),e(B,[2,57]),e(B,[2,58]),e(i,[2,32]),e(i,[2,33]),e(i,[2,34]),e(i,[2,35]),{16:44,40:O,41:N},{16:47,40:O,41:N},{16:48,40:O,41:N},e(i,[2,4]),{11:49,40:S,48:D,50:R,51:T,52:C},{16:50,40:O,41:N},{18:51,19:[1,52],53:53,54:54,58:F},{11:56,40:S,48:D,50:R,51:T,52:C},{65:57,71:[1,58],72:[1,59]},e(Y,[2,73]),e(Y,[2,74]),e(Y,[2,75]),e(Y,[2,76]),e(Y,[2,77]),e(i,[2,24]),e(i,[2,25]),e(i,[2,26]),{13:P,38:60,41:z,42:A,45:62,46:63,48:G,49:K},e(Q,[2,37]),e(Q,[2,38]),{16:68,40:O,41:N,42:A},{13:P,38:69,41:z,42:A,45:62,46:63,48:G,49:K},{13:[1,70],15:[1,71]},e(i,[2,17],{64:35,12:72,17:[1,73],42:A,66:nt,67:at,68:ct,69:ot,70:lt}),{19:[1,74]},e(i,[2,14]),{18:75,19:[2,59],53:53,54:54,58:F},{55:76,58:[1,77]},{58:[2,65],59:[1,78]},{21:[1,79]},{64:80,66:nt,67:at,68:ct,69:ot,70:lt},e(gt,[2,78]),e(gt,[2,79]),{6:bt,10:kt,39:81,42:mt,47:Et},{40:[1,86],41:[1,87]},e(St,[2,43],{46:88,13:P,41:z,48:G,49:K}),e(L,[2,45]),e(L,[2,50]),e(L,[2,51]),e(L,[2,52]),e(L,[2,53]),e(i,[2,41],{42:A}),{6:bt,10:kt,39:89,42:mt,47:Et},{14:90,40:X,50:H,73:J},{16:94,40:O,41:N},{11:95,40:S,48:D,50:R,51:T,52:C},{18:96,19:[1,97],53:53,54:54,58:F},e(i,[2,12]),{19:[2,60]},e(U,[2,61],{56:98,57:99,60:100,62:Tt,63:Ot}),e([19,58,62,63],[2,67]),{58:[2,66]},e(i,[2,22],{15:[1,104],17:[1,103]}),e([40,48,50,51,52],[2,72]),e(i,[2,36]),{13:P,41:z,45:105,46:63,48:G,49:K},e(i,[2,47]),e(i,[2,48]),e(i,[2,49]),e(Q,[2,39]),e(Q,[2,40]),e(L,[2,46]),e(i,[2,42]),e(i,[2,8]),e(i,[2,80]),e(i,[2,81]),e(i,[2,82]),{13:[1,106],42:A},{13:[1,108],15:[1,107]},{19:[1,109]},e(i,[2,15]),e(U,[2,62],{57:110,61:[1,111],63:Ot}),e(U,[2,63]),e(ht,[2,68]),e(U,[2,71]),e(ht,[2,70]),{18:112,19:[1,113],53:53,54:54,58:F},{16:114,40:O,41:N},e(St,[2,44],{46:88,13:P,41:z,48:G,49:K}),{14:115,40:X,50:H,73:J},{16:116,40:O,41:N},{14:117,40:X,50:H,73:J},e(i,[2,13]),e(U,[2,64]),{60:118,62:Tt},{19:[1,119]},e(i,[2,20]),e(i,[2,23],{17:[1,120],42:A}),e(i,[2,11]),{13:[1,121],42:A},e(i,[2,10]),e(ht,[2,69]),e(i,[2,18]),{18:122,19:[1,123],53:53,54:54,58:F},{14:124,40:X,50:H,73:J},{19:[1,125]},e(i,[2,21]),e(i,[2,9]),e(i,[2,19])],defaultActions:{75:[2,60],78:[2,66]},parseError:l(function(n,c){if(c.recoverable)this.trace(n);else{var o=new Error(n);throw o.hash=c,o}},"parseError"),parse:l(function(n){var c=this,o=[0],r=[],p=[null],t=[],Z=this.table,s="",tt=0,Nt=0,Dt=2,At=1,Lt=t.slice.call(arguments,1),_=Object.create(this.lexer),x={yy:{}};for(var dt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,dt)&&(x.yy[dt]=this.yy[dt]);_.setInput(n,x.yy),x.yy.lexer=_,x.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var pt=_.yylloc;t.push(pt);var wt=_.options&&_.options.ranges;typeof x.yy.parseError=="function"?this.parseError=x.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Vt(b){o.length=o.length-2*b,p.length=p.length-b,t.length=t.length-b}l(Vt,"popStack");function It(){var b;return b=r.pop()||_.lex()||At,typeof b!="number"&&(b instanceof Array&&(r=b,b=r.pop()),b=c.symbols_[b]||b),b}l(It,"lex");for(var g,v,k,ft,w={},et,E,Rt,st;;){if(v=o[o.length-1],this.defaultActions[v]?k=this.defaultActions[v]:((g===null||typeof g>"u")&&(g=It()),k=Z[v]&&Z[v][g]),typeof k>"u"||!k.length||!k[0]){var yt="";st=[];for(et in Z[v])this.terminals_[et]&&et>Dt&&st.push("'"+this.terminals_[et]+"'");_.showPosition?yt="Parse error on line "+(tt+1)+`: +import{g as Mt}from"./chunk-XXDRQBXY-BmzWd-kT.js";import{s as Bt}from"./chunk-VR4S4FIN-he8WxbY-.js";import{_ as l,b as Ft,a as Yt,s as Pt,g as zt,o as Gt,p as Kt,c as it,l as V,q as Ut,r as Zt,t as jt,u as Wt,v as qt,x as Qt,d as Xt,y as Ht}from"./mermaid.core-Cahi9cr1.js";import{c as Jt}from"./channel-Bob_1R_C.js";import"./index-HRJ6xRtC.js";import"./_commonjsHelpers-CqkleIqs.js";var _t=(function(){var e=l(function(I,n,c,o){for(c=c||{},o=I.length;o--;c[I[o]]=n);return c},"o"),i=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52],h=[1,10],a=[1,11],u=[1,12],d=[1,13],y=[1,23],f=[1,24],m=[1,25],j=[1,26],W=[1,27],S=[1,19],q=[1,28],M=[1,29],D=[1,20],R=[1,18],T=[1,21],C=[1,22],nt=[1,36],at=[1,37],ct=[1,38],ot=[1,39],lt=[1,40],B=[6,8,10,13,15,17,20,21,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52,66,67,68,69,70],O=[1,45],N=[1,46],F=[1,55],Y=[40,48,50,51,52,71,72],P=[1,66],z=[1,64],A=[1,61],G=[1,65],K=[1,67],Q=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,51,52,66,67,68,69,70],gt=[66,67,68,69,70],bt=[1,85],kt=[1,84],mt=[1,82],Et=[1,83],St=[6,10,42,47],L=[6,10,13,41,42,47,48,49],X=[1,93],H=[1,92],J=[1,91],U=[19,58],Tt=[1,102],Ot=[1,101],ht=[19,58,61,63],ut={trace:l(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,COLON:13,role:14,STYLE_SEPARATOR:15,idList:16,BLOCK_START:17,attributes:18,BLOCK_STOP:19,SQS:20,SQE:21,title:22,title_value:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,direction:29,classDefStatement:30,classStatement:31,styleStatement:32,direction_tb:33,direction_bt:34,direction_rl:35,direction_lr:36,CLASSDEF:37,stylesOpt:38,separator:39,UNICODE_TEXT:40,STYLE_TEXT:41,COMMA:42,CLASS:43,STYLE:44,style:45,styleComponent:46,SEMI:47,NUM:48,BRKT:49,ENTITY_NAME:50,DECIMAL_NUM:51,ENTITY_ONE:52,attribute:53,attributeType:54,attributeName:55,attributeKeyTypeList:56,attributeComment:57,ATTRIBUTE_WORD:58,"?":59,attributeKeyType:60,",":61,ATTRIBUTE_KEY:62,COMMENT:63,cardinality:64,relType:65,ZERO_OR_ONE:66,ZERO_OR_MORE:67,ONE_OR_MORE:68,ONLY_ONE:69,MD_PARENT:70,NON_IDENTIFYING:71,IDENTIFYING:72,WORD:73,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",8:"SPACE",10:"NEWLINE",13:"COLON",15:"STYLE_SEPARATOR",17:"BLOCK_START",19:"BLOCK_STOP",20:"SQS",21:"SQE",22:"title",23:"title_value",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"direction_tb",34:"direction_bt",35:"direction_rl",36:"direction_lr",37:"CLASSDEF",40:"UNICODE_TEXT",41:"STYLE_TEXT",42:"COMMA",43:"CLASS",44:"STYLE",47:"SEMI",48:"NUM",49:"BRKT",50:"ENTITY_NAME",51:"DECIMAL_NUM",52:"ENTITY_ONE",58:"ATTRIBUTE_WORD",59:"?",61:",",62:"ATTRIBUTE_KEY",63:"COMMENT",66:"ZERO_OR_ONE",67:"ZERO_OR_MORE",68:"ONE_OR_MORE",69:"ONLY_ONE",70:"MD_PARENT",71:"NON_IDENTIFYING",72:"IDENTIFYING",73:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,9],[9,7],[9,7],[9,4],[9,6],[9,3],[9,5],[9,1],[9,3],[9,7],[9,9],[9,6],[9,8],[9,4],[9,6],[9,2],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[9,1],[29,1],[29,1],[29,1],[29,1],[30,4],[16,1],[16,1],[16,3],[16,3],[31,3],[32,4],[38,1],[38,3],[45,1],[45,2],[39,1],[39,1],[39,1],[46,1],[46,1],[46,1],[46,1],[11,1],[11,1],[11,1],[11,1],[11,1],[18,1],[18,2],[53,2],[53,3],[53,3],[53,4],[54,1],[54,2],[55,1],[56,1],[56,3],[60,1],[57,1],[12,3],[64,1],[64,1],[64,1],[64,1],[64,1],[65,1],[65,1],[14,1],[14,1],[14,1]],performAction:l(function(n,c,o,r,p,t,Z){var s=t.length-1;switch(p){case 1:break;case 2:this.$=[];break;case 3:t[s-1].push(t[s]),this.$=t[s-1];break;case 4:case 5:this.$=t[s];break;case 6:case 7:this.$=[];break;case 8:r.addEntity(t[s-4]),r.addEntity(t[s-2]),r.addRelationship(t[s-4],t[s],t[s-2],t[s-3]);break;case 9:r.addEntity(t[s-8]),r.addEntity(t[s-4]),r.addRelationship(t[s-8],t[s],t[s-4],t[s-5]),r.setClass([t[s-8]],t[s-6]),r.setClass([t[s-4]],t[s-2]);break;case 10:r.addEntity(t[s-6]),r.addEntity(t[s-2]),r.addRelationship(t[s-6],t[s],t[s-2],t[s-3]),r.setClass([t[s-6]],t[s-4]);break;case 11:r.addEntity(t[s-6]),r.addEntity(t[s-4]),r.addRelationship(t[s-6],t[s],t[s-4],t[s-5]),r.setClass([t[s-4]],t[s-2]);break;case 12:r.addEntity(t[s-3]),r.addAttributes(t[s-3],t[s-1]);break;case 13:r.addEntity(t[s-5]),r.addAttributes(t[s-5],t[s-1]),r.setClass([t[s-5]],t[s-3]);break;case 14:r.addEntity(t[s-2]);break;case 15:r.addEntity(t[s-4]),r.setClass([t[s-4]],t[s-2]);break;case 16:r.addEntity(t[s]);break;case 17:r.addEntity(t[s-2]),r.setClass([t[s-2]],t[s]);break;case 18:r.addEntity(t[s-6],t[s-4]),r.addAttributes(t[s-6],t[s-1]);break;case 19:r.addEntity(t[s-8],t[s-6]),r.addAttributes(t[s-8],t[s-1]),r.setClass([t[s-8]],t[s-3]);break;case 20:r.addEntity(t[s-5],t[s-3]);break;case 21:r.addEntity(t[s-7],t[s-5]),r.setClass([t[s-7]],t[s-2]);break;case 22:r.addEntity(t[s-3],t[s-1]);break;case 23:r.addEntity(t[s-5],t[s-3]),r.setClass([t[s-5]],t[s]);break;case 24:case 25:this.$=t[s].trim(),r.setAccTitle(this.$);break;case 26:case 27:this.$=t[s].trim(),r.setAccDescription(this.$);break;case 32:r.setDirection("TB");break;case 33:r.setDirection("BT");break;case 34:r.setDirection("RL");break;case 35:r.setDirection("LR");break;case 36:this.$=t[s-3],r.addClass(t[s-2],t[s-1]);break;case 37:case 38:case 59:case 68:this.$=[t[s]];break;case 39:case 40:this.$=t[s-2].concat([t[s]]);break;case 41:this.$=t[s-2],r.setClass(t[s-1],t[s]);break;case 42:this.$=t[s-3],r.addCssStyles(t[s-2],t[s-1]);break;case 43:this.$=[t[s]];break;case 44:t[s-2].push(t[s]),this.$=t[s-2];break;case 46:this.$=t[s-1]+t[s];break;case 54:case 80:case 81:this.$=t[s].replace(/"/g,"");break;case 55:case 56:case 57:case 58:case 82:this.$=t[s];break;case 60:t[s].push(t[s-1]),this.$=t[s];break;case 61:this.$={type:t[s-1],name:t[s]};break;case 62:this.$={type:t[s-2],name:t[s-1],keys:t[s]};break;case 63:this.$={type:t[s-2],name:t[s-1],comment:t[s]};break;case 64:this.$={type:t[s-3],name:t[s-2],keys:t[s-1],comment:t[s]};break;case 65:case 67:case 70:this.$=t[s];break;case 66:this.$=t[s-1]+t[s];break;case 69:t[s-2].push(t[s]),this.$=t[s-2];break;case 71:this.$=t[s].replace(/"/g,"");break;case 72:this.$={cardA:t[s],relType:t[s-1],cardB:t[s-2]};break;case 73:this.$=r.Cardinality.ZERO_OR_ONE;break;case 74:this.$=r.Cardinality.ZERO_OR_MORE;break;case 75:this.$=r.Cardinality.ONE_OR_MORE;break;case 76:this.$=r.Cardinality.ONLY_ONE;break;case 77:this.$=r.Cardinality.MD_PARENT;break;case 78:this.$=r.Identification.NON_IDENTIFYING;break;case 79:this.$=r.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},e(i,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:h,24:a,26:u,28:d,29:14,30:15,31:16,32:17,33:y,34:f,35:m,36:j,37:W,40:S,43:q,44:M,48:D,50:R,51:T,52:C},e(i,[2,7],{1:[2,1]}),e(i,[2,3]),{9:30,11:9,22:h,24:a,26:u,28:d,29:14,30:15,31:16,32:17,33:y,34:f,35:m,36:j,37:W,40:S,43:q,44:M,48:D,50:R,51:T,52:C},e(i,[2,5]),e(i,[2,6]),e(i,[2,16],{12:31,64:35,15:[1,32],17:[1,33],20:[1,34],66:nt,67:at,68:ct,69:ot,70:lt}),{23:[1,41]},{25:[1,42]},{27:[1,43]},e(i,[2,27]),e(i,[2,28]),e(i,[2,29]),e(i,[2,30]),e(i,[2,31]),e(B,[2,54]),e(B,[2,55]),e(B,[2,56]),e(B,[2,57]),e(B,[2,58]),e(i,[2,32]),e(i,[2,33]),e(i,[2,34]),e(i,[2,35]),{16:44,40:O,41:N},{16:47,40:O,41:N},{16:48,40:O,41:N},e(i,[2,4]),{11:49,40:S,48:D,50:R,51:T,52:C},{16:50,40:O,41:N},{18:51,19:[1,52],53:53,54:54,58:F},{11:56,40:S,48:D,50:R,51:T,52:C},{65:57,71:[1,58],72:[1,59]},e(Y,[2,73]),e(Y,[2,74]),e(Y,[2,75]),e(Y,[2,76]),e(Y,[2,77]),e(i,[2,24]),e(i,[2,25]),e(i,[2,26]),{13:P,38:60,41:z,42:A,45:62,46:63,48:G,49:K},e(Q,[2,37]),e(Q,[2,38]),{16:68,40:O,41:N,42:A},{13:P,38:69,41:z,42:A,45:62,46:63,48:G,49:K},{13:[1,70],15:[1,71]},e(i,[2,17],{64:35,12:72,17:[1,73],42:A,66:nt,67:at,68:ct,69:ot,70:lt}),{19:[1,74]},e(i,[2,14]),{18:75,19:[2,59],53:53,54:54,58:F},{55:76,58:[1,77]},{58:[2,65],59:[1,78]},{21:[1,79]},{64:80,66:nt,67:at,68:ct,69:ot,70:lt},e(gt,[2,78]),e(gt,[2,79]),{6:bt,10:kt,39:81,42:mt,47:Et},{40:[1,86],41:[1,87]},e(St,[2,43],{46:88,13:P,41:z,48:G,49:K}),e(L,[2,45]),e(L,[2,50]),e(L,[2,51]),e(L,[2,52]),e(L,[2,53]),e(i,[2,41],{42:A}),{6:bt,10:kt,39:89,42:mt,47:Et},{14:90,40:X,50:H,73:J},{16:94,40:O,41:N},{11:95,40:S,48:D,50:R,51:T,52:C},{18:96,19:[1,97],53:53,54:54,58:F},e(i,[2,12]),{19:[2,60]},e(U,[2,61],{56:98,57:99,60:100,62:Tt,63:Ot}),e([19,58,62,63],[2,67]),{58:[2,66]},e(i,[2,22],{15:[1,104],17:[1,103]}),e([40,48,50,51,52],[2,72]),e(i,[2,36]),{13:P,41:z,45:105,46:63,48:G,49:K},e(i,[2,47]),e(i,[2,48]),e(i,[2,49]),e(Q,[2,39]),e(Q,[2,40]),e(L,[2,46]),e(i,[2,42]),e(i,[2,8]),e(i,[2,80]),e(i,[2,81]),e(i,[2,82]),{13:[1,106],42:A},{13:[1,108],15:[1,107]},{19:[1,109]},e(i,[2,15]),e(U,[2,62],{57:110,61:[1,111],63:Ot}),e(U,[2,63]),e(ht,[2,68]),e(U,[2,71]),e(ht,[2,70]),{18:112,19:[1,113],53:53,54:54,58:F},{16:114,40:O,41:N},e(St,[2,44],{46:88,13:P,41:z,48:G,49:K}),{14:115,40:X,50:H,73:J},{16:116,40:O,41:N},{14:117,40:X,50:H,73:J},e(i,[2,13]),e(U,[2,64]),{60:118,62:Tt},{19:[1,119]},e(i,[2,20]),e(i,[2,23],{17:[1,120],42:A}),e(i,[2,11]),{13:[1,121],42:A},e(i,[2,10]),e(ht,[2,69]),e(i,[2,18]),{18:122,19:[1,123],53:53,54:54,58:F},{14:124,40:X,50:H,73:J},{19:[1,125]},e(i,[2,21]),e(i,[2,9]),e(i,[2,19])],defaultActions:{75:[2,60],78:[2,66]},parseError:l(function(n,c){if(c.recoverable)this.trace(n);else{var o=new Error(n);throw o.hash=c,o}},"parseError"),parse:l(function(n){var c=this,o=[0],r=[],p=[null],t=[],Z=this.table,s="",tt=0,Nt=0,Dt=2,At=1,Lt=t.slice.call(arguments,1),_=Object.create(this.lexer),x={yy:{}};for(var dt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,dt)&&(x.yy[dt]=this.yy[dt]);_.setInput(n,x.yy),x.yy.lexer=_,x.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var pt=_.yylloc;t.push(pt);var wt=_.options&&_.options.ranges;typeof x.yy.parseError=="function"?this.parseError=x.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Vt(b){o.length=o.length-2*b,p.length=p.length-b,t.length=t.length-b}l(Vt,"popStack");function It(){var b;return b=r.pop()||_.lex()||At,typeof b!="number"&&(b instanceof Array&&(r=b,b=r.pop()),b=c.symbols_[b]||b),b}l(It,"lex");for(var g,v,k,ft,w={},et,E,Rt,st;;){if(v=o[o.length-1],this.defaultActions[v]?k=this.defaultActions[v]:((g===null||typeof g>"u")&&(g=It()),k=Z[v]&&Z[v][g]),typeof k>"u"||!k.length||!k[0]){var yt="";st=[];for(et in Z[v])this.terminals_[et]&&et>Dt&&st.push("'"+this.terminals_[et]+"'");_.showPosition?yt="Parse error on line "+(tt+1)+`: `+_.showPosition()+` Expecting `+st.join(", ")+", got '"+(this.terminals_[g]||g)+"'":yt="Parse error on line "+(tt+1)+": Unexpected "+(g==At?"end of input":"'"+(this.terminals_[g]||g)+"'"),this.parseError(yt,{text:_.match,token:this.terminals_[g]||g,line:_.yylineno,loc:pt,expected:st})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+v+", token: "+g);switch(k[0]){case 1:o.push(g),p.push(_.yytext),t.push(_.yylloc),o.push(k[1]),g=null,Nt=_.yyleng,s=_.yytext,tt=_.yylineno,pt=_.yylloc;break;case 2:if(E=this.productions_[k[1]][1],w.$=p[p.length-E],w._$={first_line:t[t.length-(E||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(E||1)].first_column,last_column:t[t.length-1].last_column},wt&&(w._$.range=[t[t.length-(E||1)].range[0],t[t.length-1].range[1]]),ft=this.performAction.apply(w,[s,Nt,tt,x.yy,k[1],p,t].concat(Lt)),typeof ft<"u")return ft;E&&(o=o.slice(0,-1*E*2),p=p.slice(0,-1*E),t=t.slice(0,-1*E)),o.push(this.productions_[k[1]][0]),p.push(w.$),t.push(w._$),Rt=Z[o[o.length-2]][o[o.length-1]],o.push(Rt);break;case 3:return!0}}return!0},"parse")},vt=(function(){var I={EOF:1,parseError:l(function(c,o){if(this.yy.parser)this.yy.parser.parseError(c,o);else throw new Error(c)},"parseError"),setInput:l(function(n,c){return this.yy=c||this.yy||{},this._input=n,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:l(function(){var n=this._input[0];this.yytext+=n,this.yyleng++,this.offset++,this.match+=n,this.matched+=n;var c=n.match(/(?:\r\n?|\n).*/g);return c?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),n},"input"),unput:l(function(n){var c=n.length,o=n.split(/(?:\r\n?|\n)/g);this._input=n+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-c),this.offset-=c;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),o.length-1&&(this.yylineno-=o.length-1);var p=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:o?(o.length===r.length?this.yylloc.first_column:0)+r[r.length-o.length].length-o[0].length:this.yylloc.first_column-c},this.options.ranges&&(this.yylloc.range=[p[0],p[0]+this.yyleng-c]),this.yyleng=this.yytext.length,this},"unput"),more:l(function(){return this._more=!0,this},"more"),reject:l(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). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:l(function(n){this.unput(this.match.slice(n))},"less"),pastInput:l(function(){var n=this.matched.substr(0,this.matched.length-this.match.length);return(n.length>20?"...":"")+n.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:l(function(){var n=this.match;return n.length<20&&(n+=this._input.substr(0,20-n.length)),(n.substr(0,20)+(n.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:l(function(){var n=this.pastInput(),c=new Array(n.length+1).join("-");return n+this.upcomingInput()+` diff --git a/apps/kimi-code/dist-web/assets/flowDiagram-23GEKE2U-Cda1-vDp.js b/apps/kimi-code/dist-web/assets/flowDiagram-23GEKE2U-BJ9xq3_H.js similarity index 99% rename from apps/kimi-code/dist-web/assets/flowDiagram-23GEKE2U-Cda1-vDp.js rename to apps/kimi-code/dist-web/assets/flowDiagram-23GEKE2U-BJ9xq3_H.js index 49e6377e37..fe7e7dec94 100644 --- a/apps/kimi-code/dist-web/assets/flowDiagram-23GEKE2U-Cda1-vDp.js +++ b/apps/kimi-code/dist-web/assets/flowDiagram-23GEKE2U-BJ9xq3_H.js @@ -1,4 +1,4 @@ -import{g as He}from"./chunk-5VM5RSS4-DNp0lB9r.js";import{g as Xe}from"./chunk-XXDRQBXY-CcyRETTg.js";import{s as Qe}from"./chunk-VR4S4FIN-Cveor6Gg.js";import{_ as b,b6 as Ze,X as Oe,l as Z,c as g1,v as Je,x as $e,y as ie,b as et,s as tt,o as st,a as it,g as rt,p as at,k as nt,Y as ut,Z as ot,bo as lt,r as te,d as se,a5 as ct,q as ht,b8 as dt,t as pt}from"./mermaid.core-BMAf1qng.js";import{f as ft}from"./chunk-32BRIVSS-D2R4swWR.js";import{c as gt}from"./channel-DV0CaBk6.js";var bt="flowchart-",At=class{constructor(){this.vertexCounter=0,this.config=g1(),this.diagramId="",this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=et,this.setAccDescription=tt,this.setDiagramTitle=st,this.getAccTitle=it,this.getAccDescription=rt,this.getDiagramTitle=at,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}static{b(this,"FlowDB")}sanitizeText(e){return nt.sanitizeText(e,this.config)}sanitizeNodeLabelType(e){switch(e){case"markdown":case"string":case"text":return e;default:return"markdown"}}setDiagramId(e){this.diagramId=e}lookUpDomId(e){for(const i of this.vertices.values())if(i.id===e)return this.diagramId?`${this.diagramId}-${i.domId}`:i.domId;return this.diagramId?`${this.diagramId}-${e}`:e}addVertex(e,i,r,a,o,d,l={},A){if(!e||e.trim().length===0)return;let n;if(A!==void 0){let k;A.includes(` +import{g as He}from"./chunk-5VM5RSS4-CfD0Yt-O.js";import{g as Xe}from"./chunk-XXDRQBXY-BmzWd-kT.js";import{s as Qe}from"./chunk-VR4S4FIN-he8WxbY-.js";import{_ as b,b6 as Ze,X as Oe,l as Z,c as g1,v as Je,x as $e,y as ie,b as et,s as tt,o as st,a as it,g as rt,p as at,k as nt,Y as ut,Z as ot,bo as lt,r as te,d as se,a5 as ct,q as ht,b8 as dt,t as pt}from"./mermaid.core-Cahi9cr1.js";import{f as ft}from"./chunk-32BRIVSS-DAsxL712.js";import{c as gt}from"./channel-Bob_1R_C.js";var bt="flowchart-",At=class{constructor(){this.vertexCounter=0,this.config=g1(),this.diagramId="",this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=et,this.setAccDescription=tt,this.setDiagramTitle=st,this.getAccTitle=it,this.getAccDescription=rt,this.getDiagramTitle=at,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}static{b(this,"FlowDB")}sanitizeText(e){return nt.sanitizeText(e,this.config)}sanitizeNodeLabelType(e){switch(e){case"markdown":case"string":case"text":return e;default:return"markdown"}}setDiagramId(e){this.diagramId=e}lookUpDomId(e){for(const i of this.vertices.values())if(i.id===e)return this.diagramId?`${this.diagramId}-${i.domId}`:i.domId;return this.diagramId?`${this.diagramId}-${e}`:e}addVertex(e,i,r,a,o,d,l={},A){if(!e||e.trim().length===0)return;let n;if(A!==void 0){let k;A.includes(` `)?k=A+` `:k=`{ `+A+` diff --git a/apps/kimi-code/dist-web/assets/ganttDiagram-NO4QXBWP-BRVPZvRL.js b/apps/kimi-code/dist-web/assets/ganttDiagram-NO4QXBWP-UHBCrlBo.js similarity index 99% rename from apps/kimi-code/dist-web/assets/ganttDiagram-NO4QXBWP-BRVPZvRL.js rename to apps/kimi-code/dist-web/assets/ganttDiagram-NO4QXBWP-UHBCrlBo.js index aff945748b..13998c2fc5 100644 --- a/apps/kimi-code/dist-web/assets/ganttDiagram-NO4QXBWP-BRVPZvRL.js +++ b/apps/kimi-code/dist-web/assets/ganttDiagram-NO4QXBWP-UHBCrlBo.js @@ -1,4 +1,4 @@ -import{bg as on,bh as On,bi as cn,bj as un,bk as ln,bl as ue,bm as Hn,g as Nn,s as Pn,p as Vn,o as Rn,a as zn,b as qn,_ as d,c as Yt,d as Zt,e as Bn,bn as it,l as Tt,k as Zn,j as Xn,q as Gn,y as jn}from"./mermaid.core-BMAf1qng.js";import{g as oe}from"./_commonjsHelpers-CqkleIqs.js";import{b as Qn,t as Ne,c as Jn,a as Kn,l as tr}from"./linear-CmRMBRqQ.js";import{i as er}from"./init-Gi6I4Gst.js";import"./index-B-HzRssS.js";import"./defaultLocale-DX6XiGOO.js";function nr(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n=i)&&(n=i)}return n}function rr(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function ir(t){return t}var Gt=1,le=2,xe=3,Xt=4,Pe=1e-6;function sr(t){return"translate("+t+",0)"}function ar(t){return"translate(0,"+t+")"}function or(t){return e=>+t(e)}function cr(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function ur(){return!this.__axis}function fn(t,e){var n=[],r=null,i=null,s=6,a=6,y=3,F=typeof window<"u"&&window.devicePixelRatio>1?0:.5,S=t===Gt||t===Xt?-1:1,w=t===Xt||t===le?"x":"y",P=t===Gt||t===xe?sr:ar;function _(Y){var X=r??(e.ticks?e.ticks.apply(e,n):e.domain()),B=i??(e.tickFormat?e.tickFormat.apply(e,n):ir),v=Math.max(s,0)+y,U=e.range(),R=+U[0]+F,E=+U[U.length-1]+F,z=(e.bandwidth?cr:or)(e.copy(),F),G=Y.selection?Y.selection():Y,T=G.selectAll(".domain").data([null]),k=G.selectAll(".tick").data(X,e).order(),p=k.exit(),L=k.enter().append("g").attr("class","tick"),x=k.select("line"),C=k.select("text");T=T.merge(T.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),k=k.merge(L),x=x.merge(L.append("line").attr("stroke","currentColor").attr(w+"2",S*s)),C=C.merge(L.append("text").attr("fill","currentColor").attr(w,S*v).attr("dy",t===Gt?"0em":t===xe?"0.71em":"0.32em")),Y!==G&&(T=T.transition(Y),k=k.transition(Y),x=x.transition(Y),C=C.transition(Y),p=p.transition(Y).attr("opacity",Pe).attr("transform",function(M){return isFinite(M=z(M))?P(M+F):this.getAttribute("transform")}),L.attr("opacity",Pe).attr("transform",function(M){var D=this.parentNode.__axis;return P((D&&isFinite(D=D(M))?D:z(M))+F)})),p.remove(),T.attr("d",t===Xt||t===le?a?"M"+S*a+","+R+"H"+F+"V"+E+"H"+S*a:"M"+F+","+R+"V"+E:a?"M"+R+","+S*a+"V"+F+"H"+E+"V"+S*a:"M"+R+","+F+"H"+E),k.attr("opacity",1).attr("transform",function(M){return P(z(M)+F)}),x.attr(w+"2",S*s),C.attr(w,S*v).text(B),G.filter(ur).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===le?"start":t===Xt?"end":"middle"),G.each(function(){this.__axis=z})}return _.scale=function(Y){return arguments.length?(e=Y,_):e},_.ticks=function(){return n=Array.from(arguments),_},_.tickArguments=function(Y){return arguments.length?(n=Y==null?[]:Array.from(Y),_):n.slice()},_.tickValues=function(Y){return arguments.length?(r=Y==null?null:Array.from(Y),_):r&&r.slice()},_.tickFormat=function(Y){return arguments.length?(i=Y,_):i},_.tickSize=function(Y){return arguments.length?(s=a=+Y,_):s},_.tickSizeInner=function(Y){return arguments.length?(s=+Y,_):s},_.tickSizeOuter=function(Y){return arguments.length?(a=+Y,_):a},_.tickPadding=function(Y){return arguments.length?(y=+Y,_):y},_.offset=function(Y){return arguments.length?(F=+Y,_):F},_}function lr(t){return fn(Gt,t)}function fr(t){return fn(xe,t)}const dr=Math.PI/180,hr=180/Math.PI,ne=18,dn=.96422,hn=1,mn=.82521,gn=4/29,Ft=6/29,yn=3*Ft*Ft,mr=Ft*Ft*Ft;function kn(t){if(t instanceof ft)return new ft(t.l,t.a,t.b,t.opacity);if(t instanceof ht)return pn(t);t instanceof on||(t=On(t));var e=me(t.r),n=me(t.g),r=me(t.b),i=fe((.2225045*e+.7168786*n+.0606169*r)/hn),s,a;return e===n&&n===r?s=a=i:(s=fe((.4360747*e+.3850649*n+.1430804*r)/dn),a=fe((.0139322*e+.0971045*n+.7141733*r)/mn)),new ft(116*i-16,500*(s-i),200*(i-a),t.opacity)}function gr(t,e,n,r){return arguments.length===1?kn(t):new ft(t,e,n,r??1)}function ft(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}cn(ft,gr,un(ln,{brighter(t){return new ft(this.l+ne*(t??1),this.a,this.b,this.opacity)},darker(t){return new ft(this.l-ne*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return e=dn*de(e),t=hn*de(t),n=mn*de(n),new on(he(3.1338561*e-1.6168667*t-.4906146*n),he(-.9787684*e+1.9161415*t+.033454*n),he(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function fe(t){return t>mr?Math.pow(t,1/3):t/yn+gn}function de(t){return t>Ft?t*t*t:yn*(t-gn)}function he(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function me(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function yr(t){if(t instanceof ht)return new ht(t.h,t.c,t.l,t.opacity);if(t instanceof ft||(t=kn(t)),t.a===0&&t.b===0)return new ht(NaN,0(t(s=new Date(+s)),s),i.ceil=s=>(t(s=new Date(s-1)),e(s,1),t(s),s),i.round=s=>{const a=i(s),y=i.ceil(s);return s-a(e(s=new Date(+s),a==null?1:Math.floor(a)),s),i.range=(s,a,y)=>{const F=[];if(s=i.ceil(s),y=y==null?1:Math.floor(y),!(s0))return F;let S;do F.push(S=new Date(+s)),e(s,y),t(s);while(Snt(a=>{if(a>=a)for(;t(a),!s(a);)a.setTime(a-1)},(a,y)=>{if(a>=a)if(y<0)for(;++y<=0;)for(;e(a,-1),!s(a););else for(;--y>=0;)for(;e(a,1),!s(a););}),n&&(i.count=(s,a)=>(ge.setTime(+s),ye.setTime(+a),t(ge),t(ye),Math.floor(n(ge,ye))),i.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?i.filter(r?a=>r(a)%s===0:a=>i.count(0,a)%s===0):i)),i}const Et=nt(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Et.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?nt(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):Et);Et.range;const mt=1e3,ct=mt*60,gt=ct*60,yt=gt*24,Se=yt*7,Ve=yt*30,ke=yt*365,vt=nt(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*mt)},(t,e)=>(e-t)/mt,t=>t.getUTCSeconds());vt.range;const Nt=nt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*mt)},(t,e)=>{t.setTime(+t+e*ct)},(t,e)=>(e-t)/ct,t=>t.getMinutes());Nt.range;const Tr=nt(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*ct)},(t,e)=>(e-t)/ct,t=>t.getUTCMinutes());Tr.range;const Pt=nt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*mt-t.getMinutes()*ct)},(t,e)=>{t.setTime(+t+e*gt)},(t,e)=>(e-t)/gt,t=>t.getHours());Pt.range;const xr=nt(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*gt)},(t,e)=>(e-t)/gt,t=>t.getUTCHours());xr.range;const xt=nt(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*ct)/yt,t=>t.getDate()-1);xt.range;const _e=nt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/yt,t=>t.getUTCDate()-1);_e.range;const br=nt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/yt,t=>Math.floor(t/yt));br.range;function Dt(t){return nt(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*ct)/Se)}const zt=Dt(0),Vt=Dt(1),vn=Dt(2),Tn=Dt(3),bt=Dt(4),xn=Dt(5),bn=Dt(6);zt.range;Vt.range;vn.range;Tn.range;bt.range;xn.range;bn.range;function Mt(t){return nt(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/Se)}const wn=Mt(0),re=Mt(1),wr=Mt(2),Dr=Mt(3),It=Mt(4),Mr=Mt(5),Cr=Mt(6);wn.range;re.range;wr.range;Dr.range;It.range;Mr.range;Cr.range;const Rt=nt(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth());Rt.range;const Sr=nt(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth());Sr.range;const kt=nt(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());kt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:nt(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)});kt.range;const wt=nt(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());wt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:nt(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)});wt.range;function _r(t,e,n,r,i,s){const a=[[vt,1,mt],[vt,5,5*mt],[vt,15,15*mt],[vt,30,30*mt],[s,1,ct],[s,5,5*ct],[s,15,15*ct],[s,30,30*ct],[i,1,gt],[i,3,3*gt],[i,6,6*gt],[i,12,12*gt],[r,1,yt],[r,2,2*yt],[n,1,Se],[e,1,Ve],[e,3,3*Ve],[t,1,ke]];function y(S,w,P){const _=wv).right(a,_);if(Y===a.length)return t.every(Ne(S/ke,w/ke,P));if(Y===0)return Et.every(Math.max(Ne(S,w,P),1));const[X,B]=a[_/a[Y-1][2]53)return null;"w"in f||(f.w=1),"Z"in f?(A=ve($t(f.y,0,1)),Q=A.getUTCDay(),A=Q>4||Q===0?re.ceil(A):re(A),A=_e.offset(A,(f.V-1)*7),f.y=A.getUTCFullYear(),f.m=A.getUTCMonth(),f.d=A.getUTCDate()+(f.w+6)%7):(A=pe($t(f.y,0,1)),Q=A.getDay(),A=Q>4||Q===0?Vt.ceil(A):Vt(A),A=xt.offset(A,(f.V-1)*7),f.y=A.getFullYear(),f.m=A.getMonth(),f.d=A.getDate()+(f.w+6)%7)}else("W"in f||"U"in f)&&("w"in f||(f.w="u"in f?f.u%7:"W"in f?1:0),Q="Z"in f?ve($t(f.y,0,1)).getUTCDay():pe($t(f.y,0,1)).getDay(),f.m=0,f.d="W"in f?(f.w+6)%7+f.W*7-(Q+5)%7:f.w+f.U*7-(Q+6)%7);return"Z"in f?(f.H+=f.Z/100|0,f.M+=f.Z%100,ve(f)):pe(f)}}function p(h,N,V,f){for(var tt=0,A=N.length,Q=V.length,Z,st;tt=Q)return-1;if(Z=N.charCodeAt(tt++),Z===37){if(Z=N.charAt(tt++),st=G[Z in Re?N.charAt(tt++):Z],!st||(f=st(h,V,f))<0)return-1}else if(Z!=V.charCodeAt(f++))return-1}return f}function L(h,N,V){var f=S.exec(N.slice(V));return f?(h.p=w.get(f[0].toLowerCase()),V+f[0].length):-1}function x(h,N,V){var f=Y.exec(N.slice(V));return f?(h.w=X.get(f[0].toLowerCase()),V+f[0].length):-1}function C(h,N,V){var f=P.exec(N.slice(V));return f?(h.w=_.get(f[0].toLowerCase()),V+f[0].length):-1}function M(h,N,V){var f=U.exec(N.slice(V));return f?(h.m=R.get(f[0].toLowerCase()),V+f[0].length):-1}function D(h,N,V){var f=B.exec(N.slice(V));return f?(h.m=v.get(f[0].toLowerCase()),V+f[0].length):-1}function c(h,N,V){return p(h,e,N,V)}function g(h,N,V){return p(h,n,N,V)}function b(h,N,V){return p(h,r,N,V)}function m(h){return a[h.getDay()]}function I(h){return s[h.getDay()]}function o(h){return F[h.getMonth()]}function W(h){return y[h.getMonth()]}function u(h){return i[+(h.getHours()>=12)]}function K(h){return 1+~~(h.getMonth()/3)}function l(h){return a[h.getUTCDay()]}function $(h){return s[h.getUTCDay()]}function O(h){return F[h.getUTCMonth()]}function j(h){return y[h.getUTCMonth()]}function H(h){return i[+(h.getUTCHours()>=12)]}function J(h){return 1+~~(h.getUTCMonth()/3)}return{format:function(h){var N=T(h+="",E);return N.toString=function(){return h},N},parse:function(h){var N=k(h+="",!1);return N.toString=function(){return h},N},utcFormat:function(h){var N=T(h+="",z);return N.toString=function(){return h},N},utcParse:function(h){var N=k(h+="",!0);return N.toString=function(){return h},N}}}var Re={"-":"",_:" ",0:"0"},rt=/^\s*\d+/,Er=/^%/,Ir=/[\\^$*+?|[\]().{}]/g;function q(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",s=i.length;return r+(s[e.toLowerCase(),n]))}function Ar(t,e,n){var r=rt.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Wr(t,e,n){var r=rt.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function $r(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Or(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Hr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function ze(t,e,n){var r=rt.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function qe(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Nr(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Pr(t,e,n){var r=rt.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function Vr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Be(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Rr(t,e,n){var r=rt.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Ze(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function zr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function qr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Br(t,e,n){var r=rt.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Zr(t,e,n){var r=rt.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Xr(t,e,n){var r=Er.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Gr(t,e,n){var r=rt.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function jr(t,e,n){var r=rt.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Xe(t,e){return q(t.getDate(),e,2)}function Qr(t,e){return q(t.getHours(),e,2)}function Jr(t,e){return q(t.getHours()%12||12,e,2)}function Kr(t,e){return q(1+xt.count(kt(t),t),e,3)}function Dn(t,e){return q(t.getMilliseconds(),e,3)}function ti(t,e){return Dn(t,e)+"000"}function ei(t,e){return q(t.getMonth()+1,e,2)}function ni(t,e){return q(t.getMinutes(),e,2)}function ri(t,e){return q(t.getSeconds(),e,2)}function ii(t){var e=t.getDay();return e===0?7:e}function si(t,e){return q(zt.count(kt(t)-1,t),e,2)}function Mn(t){var e=t.getDay();return e>=4||e===0?bt(t):bt.ceil(t)}function ai(t,e){return t=Mn(t),q(bt.count(kt(t),t)+(kt(t).getDay()===4),e,2)}function oi(t){return t.getDay()}function ci(t,e){return q(Vt.count(kt(t)-1,t),e,2)}function ui(t,e){return q(t.getFullYear()%100,e,2)}function li(t,e){return t=Mn(t),q(t.getFullYear()%100,e,2)}function fi(t,e){return q(t.getFullYear()%1e4,e,4)}function di(t,e){var n=t.getDay();return t=n>=4||n===0?bt(t):bt.ceil(t),q(t.getFullYear()%1e4,e,4)}function hi(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+q(e/60|0,"0",2)+q(e%60,"0",2)}function Ge(t,e){return q(t.getUTCDate(),e,2)}function mi(t,e){return q(t.getUTCHours(),e,2)}function gi(t,e){return q(t.getUTCHours()%12||12,e,2)}function yi(t,e){return q(1+_e.count(wt(t),t),e,3)}function Cn(t,e){return q(t.getUTCMilliseconds(),e,3)}function ki(t,e){return Cn(t,e)+"000"}function pi(t,e){return q(t.getUTCMonth()+1,e,2)}function vi(t,e){return q(t.getUTCMinutes(),e,2)}function Ti(t,e){return q(t.getUTCSeconds(),e,2)}function xi(t){var e=t.getUTCDay();return e===0?7:e}function bi(t,e){return q(wn.count(wt(t)-1,t),e,2)}function Sn(t){var e=t.getUTCDay();return e>=4||e===0?It(t):It.ceil(t)}function wi(t,e){return t=Sn(t),q(It.count(wt(t),t)+(wt(t).getUTCDay()===4),e,2)}function Di(t){return t.getUTCDay()}function Mi(t,e){return q(re.count(wt(t)-1,t),e,2)}function Ci(t,e){return q(t.getUTCFullYear()%100,e,2)}function Si(t,e){return t=Sn(t),q(t.getUTCFullYear()%100,e,2)}function _i(t,e){return q(t.getUTCFullYear()%1e4,e,4)}function Yi(t,e){var n=t.getUTCDay();return t=n>=4||n===0?It(t):It.ceil(t),q(t.getUTCFullYear()%1e4,e,4)}function Fi(){return"+0000"}function je(){return"%"}function Qe(t){return+t}function Je(t){return Math.floor(+t/1e3)}var St,ie;Ui({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Ui(t){return St=Ur(t),ie=St.format,St.parse,St.utcFormat,St.utcParse,St}function Ei(t){return new Date(t)}function Ii(t){return t instanceof Date?+t:+new Date(+t)}function _n(t,e,n,r,i,s,a,y,F,S){var w=Jn(),P=w.invert,_=w.domain,Y=S(".%L"),X=S(":%S"),B=S("%I:%M"),v=S("%I %p"),U=S("%a %d"),R=S("%b %d"),E=S("%B"),z=S("%Y");function G(T){return(F(T)4&&(Y+=7),_.add(Y,n));return X.diff(B,"week")+1},y.isoWeekday=function(S){return this.$utils().u(S)?this.day()||7:this.day(this.day()%7?S:S-7)};var F=y.startOf;y.startOf=function(S,w){var P=this.$utils(),_=!!P.u(w)||w;return P.p(S)==="isoweek"?_?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):F.bind(this)(S,w)}}}))})(jt)),jt.exports}var $i=Wi();const Oi=oe($i);var Qt={exports:{}},Hi=Qt.exports,tn;function Ni(){return tn||(tn=1,(function(t,e){(function(n,r){t.exports=r()})(Hi,(function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d/,s=/\d\d/,a=/\d\d?/,y=/\d*[^-_:/,()\s\d]+/,F={},S=function(v){return(v=+v)+(v>68?1900:2e3)},w=function(v){return function(U){this[v]=+U}},P=[/[+-]\d\d:?(\d\d)?|Z/,function(v){(this.zone||(this.zone={})).offset=(function(U){if(!U||U==="Z")return 0;var R=U.match(/([+-]|\d\d)/g),E=60*R[1]+(+R[2]||0);return E===0?0:R[0]==="+"?-E:E})(v)}],_=function(v){var U=F[v];return U&&(U.indexOf?U:U.s.concat(U.f))},Y=function(v,U){var R,E=F.meridiem;if(E){for(var z=1;z<=24;z+=1)if(v.indexOf(E(z,0,U))>-1){R=z>12;break}}else R=v===(U?"pm":"PM");return R},X={A:[y,function(v){this.afternoon=Y(v,!1)}],a:[y,function(v){this.afternoon=Y(v,!0)}],Q:[i,function(v){this.month=3*(v-1)+1}],S:[i,function(v){this.milliseconds=100*+v}],SS:[s,function(v){this.milliseconds=10*+v}],SSS:[/\d{3}/,function(v){this.milliseconds=+v}],s:[a,w("seconds")],ss:[a,w("seconds")],m:[a,w("minutes")],mm:[a,w("minutes")],H:[a,w("hours")],h:[a,w("hours")],HH:[a,w("hours")],hh:[a,w("hours")],D:[a,w("day")],DD:[s,w("day")],Do:[y,function(v){var U=F.ordinal,R=v.match(/\d+/);if(this.day=R[0],U)for(var E=1;E<=31;E+=1)U(E).replace(/\[|\]/g,"")===v&&(this.day=E)}],w:[a,w("week")],ww:[s,w("week")],M:[a,w("month")],MM:[s,w("month")],MMM:[y,function(v){var U=_("months"),R=(_("monthsShort")||U.map((function(E){return E.slice(0,3)}))).indexOf(v)+1;if(R<1)throw new Error;this.month=R%12||R}],MMMM:[y,function(v){var U=_("months").indexOf(v)+1;if(U<1)throw new Error;this.month=U%12||U}],Y:[/[+-]?\d+/,w("year")],YY:[s,function(v){this.year=S(v)}],YYYY:[/\d{4}/,w("year")],Z:P,ZZ:P};function B(v){var U,R;U=v,R=F&&F.formats;for(var E=(v=U.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(x,C,M){var D=M&&M.toUpperCase();return C||R[M]||n[M]||R[D].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(c,g,b){return g||b.slice(1)}))}))).match(r),z=E.length,G=0;G-1)return new Date((I==="X"?1e3:1)*m);var u=B(I)(m),K=u.year,l=u.month,$=u.day,O=u.hours,j=u.minutes,H=u.seconds,J=u.milliseconds,h=u.zone,N=u.week,V=new Date,f=$||(K||l?1:V.getDate()),tt=K||V.getFullYear(),A=0;K&&!l||(A=l>0?l-1:V.getMonth());var Q,Z=O||0,st=j||0,at=H||0,pt=J||0;return h?new Date(Date.UTC(tt,A,f,Z,st,at,pt+60*h.offset*1e3)):o?new Date(Date.UTC(tt,A,f,Z,st,at,pt)):(Q=new Date(tt,A,f,Z,st,at,pt),N&&(Q=W(Q).week(N).toDate()),Q)}catch{return new Date("")}})(T,L,k,R),this.init(),D&&D!==!0&&(this.$L=this.locale(D).$L),M&&T!=this.format(L)&&(this.$d=new Date("")),F={}}else if(L instanceof Array)for(var c=L.length,g=1;g<=c;g+=1){p[1]=L[g-1];var b=R.apply(this,p);if(b.isValid()){this.$d=b.$d,this.$L=b.$L,this.init();break}g===c&&(this.$d=new Date(""))}else z.call(this,G)}}}))})(Qt)),Qt.exports}var Pi=Ni();const Vi=oe(Pi);var Jt={exports:{}},Ri=Jt.exports,en;function zi(){return en||(en=1,(function(t,e){(function(n,r){t.exports=r()})(Ri,(function(){return function(n,r){var i=r.prototype,s=i.format;i.format=function(a){var y=this,F=this.$locale();if(!this.isValid())return s.bind(this)(a);var S=this.$utils(),w=(a||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(P){switch(P){case"Q":return Math.ceil((y.$M+1)/3);case"Do":return F.ordinal(y.$D);case"gggg":return y.weekYear();case"GGGG":return y.isoWeekYear();case"wo":return F.ordinal(y.week(),"W");case"w":case"ww":return S.s(y.week(),P==="w"?1:2,"0");case"W":case"WW":return S.s(y.isoWeek(),P==="W"?1:2,"0");case"k":case"kk":return S.s(String(y.$H===0?24:y.$H),P==="k"?1:2,"0");case"X":return Math.floor(y.$d.getTime()/1e3);case"x":return y.$d.getTime();case"z":return"["+y.offsetName()+"]";case"zzz":return"["+y.offsetName("long")+"]";default:return P}}));return s.bind(this)(w)}}}))})(Jt)),Jt.exports}var qi=zi();const Bi=oe(qi);var Kt={exports:{}},Zi=Kt.exports,nn;function Xi(){return nn||(nn=1,(function(t,e){(function(n,r){t.exports=r()})(Zi,(function(){var n,r,i=1e3,s=6e4,a=36e5,y=864e5,F=31536e6,S=2628e6,w=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,P=/\[([^\]]+)]|YYYY|YY|Y|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS/g,_={years:F,months:S,days:y,hours:a,minutes:s,seconds:i,milliseconds:1,weeks:6048e5},Y=function(T){return T instanceof z},X=function(T,k,p){return new z(T,p,k.$l)},B=function(T){return r.p(T)+"s"},v=function(T){return T<0},U=function(T){return v(T)?Math.ceil(T):Math.floor(T)},R=function(T){return Math.abs(T)},E=function(T,k){return T?v(T)?{negative:!0,format:""+R(T)+k}:{negative:!1,format:""+T+k}:{negative:!1,format:""}},z=(function(){function T(p,L,x){var C=this;if(this.$d={},this.$l=x,p===void 0&&(this.$ms=0,this.parseFromMilliseconds()),L)return X(p*_[B(L)],this);if(typeof p=="number")return this.$ms=p,this.parseFromMilliseconds(),this;if(typeof p=="object")return Object.keys(p).forEach((function(c){C.$d[B(c)]=p[c]})),this.calMilliseconds(),this;if(typeof p=="string"){var M=p.match(w);if(M){var D=M.slice(2).map((function(c){return c!=null?Number(c):0}));return this.$d.years=D[0],this.$d.months=D[1],this.$d.weeks=D[2],this.$d.days=D[3],this.$d.hours=D[4],this.$d.minutes=D[5],this.$d.seconds=D[6],this.calMilliseconds(),this}}return this}var k=T.prototype;return k.calMilliseconds=function(){var p=this;this.$ms=Object.keys(this.$d).reduce((function(L,x){return L+(p.$d[x]||0)*_[x]}),0)},k.parseFromMilliseconds=function(){var p=this.$ms;this.$d.years=U(p/F),p%=F,this.$d.months=U(p/S),p%=S,this.$d.days=U(p/y),p%=y,this.$d.hours=U(p/a),p%=a,this.$d.minutes=U(p/s),p%=s,this.$d.seconds=U(p/i),p%=i,this.$d.milliseconds=p},k.toISOString=function(){var p=E(this.$d.years,"Y"),L=E(this.$d.months,"M"),x=+this.$d.days||0;this.$d.weeks&&(x+=7*this.$d.weeks);var C=E(x,"D"),M=E(this.$d.hours,"H"),D=E(this.$d.minutes,"M"),c=this.$d.seconds||0;this.$d.milliseconds&&(c+=this.$d.milliseconds/1e3,c=Math.round(1e3*c)/1e3);var g=E(c,"S"),b=p.negative||L.negative||C.negative||M.negative||D.negative||g.negative,m=M.format||D.format||g.format?"T":"",I=(b?"-":"")+"P"+p.format+L.format+C.format+m+M.format+D.format+g.format;return I==="P"||I==="-P"?"P0D":I},k.toJSON=function(){return this.toISOString()},k.format=function(p){var L=p||"YYYY-MM-DDTHH:mm:ss",x={Y:this.$d.years,YY:r.s(this.$d.years,2,"0"),YYYY:r.s(this.$d.years,4,"0"),M:this.$d.months,MM:r.s(this.$d.months,2,"0"),D:this.$d.days,DD:r.s(this.$d.days,2,"0"),H:this.$d.hours,HH:r.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:r.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:r.s(this.$d.seconds,2,"0"),SSS:r.s(this.$d.milliseconds,3,"0")};return L.replace(P,(function(C,M){return M||String(x[C])}))},k.as=function(p){return this.$ms/_[B(p)]},k.get=function(p){var L=this.$ms,x=B(p);return x==="milliseconds"?L%=1e3:L=x==="weeks"?U(L/_[x]):this.$d[x],L||0},k.add=function(p,L,x){var C;return C=L?p*_[B(L)]:Y(p)?p.$ms:X(p,this).$ms,X(this.$ms+C*(x?-1:1),this)},k.subtract=function(p,L){return this.add(p,L,!0)},k.locale=function(p){var L=this.clone();return L.$l=p,L},k.clone=function(){return X(this.$ms,this)},k.humanize=function(p){return n().add(this.$ms,"ms").locale(this.$l).fromNow(!p)},k.valueOf=function(){return this.asMilliseconds()},k.milliseconds=function(){return this.get("milliseconds")},k.asMilliseconds=function(){return this.as("milliseconds")},k.seconds=function(){return this.get("seconds")},k.asSeconds=function(){return this.as("seconds")},k.minutes=function(){return this.get("minutes")},k.asMinutes=function(){return this.as("minutes")},k.hours=function(){return this.get("hours")},k.asHours=function(){return this.as("hours")},k.days=function(){return this.get("days")},k.asDays=function(){return this.as("days")},k.weeks=function(){return this.get("weeks")},k.asWeeks=function(){return this.as("weeks")},k.months=function(){return this.get("months")},k.asMonths=function(){return this.as("months")},k.years=function(){return this.get("years")},k.asYears=function(){return this.as("years")},T})(),G=function(T,k,p){return T.add(k.years()*p,"y").add(k.months()*p,"M").add(k.days()*p,"d").add(k.hours()*p,"h").add(k.minutes()*p,"m").add(k.seconds()*p,"s").add(k.milliseconds()*p,"ms")};return function(T,k,p){n=p,r=p().$utils(),p.duration=function(C,M){var D=p.locale();return X(C,{$l:D},M)},p.isDuration=Y;var L=k.prototype.add,x=k.prototype.subtract;k.prototype.add=function(C,M){return Y(C)?G(this,C,1):L.bind(this)(C,M)},k.prototype.subtract=function(C,M){return Y(C)?G(this,C,-1):x.bind(this)(C,M)}}}))})(Kt)),Kt.exports}var Gi=Xi();const ji=oe(Gi);var we=(function(){var t=d(function(D,c,g,b){for(g=g||{},b=D.length;b--;g[D[b]]=c);return g},"o"),e=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],n=[1,26],r=[1,27],i=[1,28],s=[1,29],a=[1,30],y=[1,31],F=[1,32],S=[1,33],w=[1,34],P=[1,9],_=[1,10],Y=[1,11],X=[1,12],B=[1,13],v=[1,14],U=[1,15],R=[1,16],E=[1,19],z=[1,20],G=[1,21],T=[1,22],k=[1,23],p=[1,25],L=[1,35],x={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:d(function(c,g,b,m,I,o,W){var u=o.length-1;switch(I){case 1:return o[u-1];case 2:this.$=[];break;case 3:o[u-1].push(o[u]),this.$=o[u-1];break;case 4:case 5:this.$=o[u];break;case 6:case 7:this.$=[];break;case 8:m.setWeekday("monday");break;case 9:m.setWeekday("tuesday");break;case 10:m.setWeekday("wednesday");break;case 11:m.setWeekday("thursday");break;case 12:m.setWeekday("friday");break;case 13:m.setWeekday("saturday");break;case 14:m.setWeekday("sunday");break;case 15:m.setWeekend("friday");break;case 16:m.setWeekend("saturday");break;case 17:m.setDateFormat(o[u].substr(11)),this.$=o[u].substr(11);break;case 18:m.enableInclusiveEndDates(),this.$=o[u].substr(18);break;case 19:m.TopAxis(),this.$=o[u].substr(8);break;case 20:m.setAxisFormat(o[u].substr(11)),this.$=o[u].substr(11);break;case 21:m.setTickInterval(o[u].substr(13)),this.$=o[u].substr(13);break;case 22:m.setExcludes(o[u].substr(9)),this.$=o[u].substr(9);break;case 23:m.setIncludes(o[u].substr(9)),this.$=o[u].substr(9);break;case 24:m.setTodayMarker(o[u].substr(12)),this.$=o[u].substr(12);break;case 27:m.setDiagramTitle(o[u].substr(6)),this.$=o[u].substr(6);break;case 28:this.$=o[u].trim(),m.setAccTitle(this.$);break;case 29:case 30:this.$=o[u].trim(),m.setAccDescription(this.$);break;case 31:m.addSection(o[u].substr(8)),this.$=o[u].substr(8);break;case 33:m.addTask(o[u-1],o[u]),this.$="task";break;case 34:this.$=o[u-1],m.setClickEvent(o[u-1],o[u],null);break;case 35:this.$=o[u-2],m.setClickEvent(o[u-2],o[u-1],o[u]);break;case 36:this.$=o[u-2],m.setClickEvent(o[u-2],o[u-1],null),m.setLink(o[u-2],o[u]);break;case 37:this.$=o[u-3],m.setClickEvent(o[u-3],o[u-2],o[u-1]),m.setLink(o[u-3],o[u]);break;case 38:this.$=o[u-2],m.setClickEvent(o[u-2],o[u],null),m.setLink(o[u-2],o[u-1]);break;case 39:this.$=o[u-3],m.setClickEvent(o[u-3],o[u-1],o[u]),m.setLink(o[u-3],o[u-2]);break;case 40:this.$=o[u-1],m.setLink(o[u-1],o[u]);break;case 41:case 47:this.$=o[u-1]+" "+o[u];break;case 42:case 43:case 45:this.$=o[u-2]+" "+o[u-1]+" "+o[u];break;case 44:case 46:this.$=o[u-3]+" "+o[u-2]+" "+o[u-1]+" "+o[u];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:n,13:r,14:i,15:s,16:a,17:y,18:F,19:18,20:S,21:w,22:P,23:_,24:Y,25:X,26:B,27:v,28:U,29:R,30:E,31:z,33:G,35:T,36:k,37:24,38:p,40:L},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:36,11:17,12:n,13:r,14:i,15:s,16:a,17:y,18:F,19:18,20:S,21:w,22:P,23:_,24:Y,25:X,26:B,27:v,28:U,29:R,30:E,31:z,33:G,35:T,36:k,37:24,38:p,40:L},t(e,[2,5]),t(e,[2,6]),t(e,[2,17]),t(e,[2,18]),t(e,[2,19]),t(e,[2,20]),t(e,[2,21]),t(e,[2,22]),t(e,[2,23]),t(e,[2,24]),t(e,[2,25]),t(e,[2,26]),t(e,[2,27]),{32:[1,37]},{34:[1,38]},t(e,[2,30]),t(e,[2,31]),t(e,[2,32]),{39:[1,39]},t(e,[2,8]),t(e,[2,9]),t(e,[2,10]),t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),{41:[1,40],43:[1,41]},t(e,[2,4]),t(e,[2,28]),t(e,[2,29]),t(e,[2,33]),t(e,[2,34],{42:[1,42],43:[1,43]}),t(e,[2,40],{41:[1,44]}),t(e,[2,35],{43:[1,45]}),t(e,[2,36]),t(e,[2,38],{42:[1,46]}),t(e,[2,37]),t(e,[2,39])],defaultActions:{},parseError:d(function(c,g){if(g.recoverable)this.trace(c);else{var b=new Error(c);throw b.hash=g,b}},"parseError"),parse:d(function(c){var g=this,b=[0],m=[],I=[null],o=[],W=this.table,u="",K=0,l=0,$=2,O=1,j=o.slice.call(arguments,1),H=Object.create(this.lexer),J={yy:{}};for(var h in this.yy)Object.prototype.hasOwnProperty.call(this.yy,h)&&(J.yy[h]=this.yy[h]);H.setInput(c,J.yy),J.yy.lexer=H,J.yy.parser=this,typeof H.yylloc>"u"&&(H.yylloc={});var N=H.yylloc;o.push(N);var V=H.options&&H.options.ranges;typeof J.yy.parseError=="function"?this.parseError=J.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function f(ot){b.length=b.length-2*ot,I.length=I.length-ot,o.length=o.length-ot}d(f,"popStack");function tt(){var ot;return ot=m.pop()||H.lex()||O,typeof ot!="number"&&(ot instanceof Array&&(m=ot,ot=m.pop()),ot=g.symbols_[ot]||ot),ot}d(tt,"lex");for(var A,Q,Z,st,at={},pt,ut,He,Bt;;){if(Q=b[b.length-1],this.defaultActions[Q]?Z=this.defaultActions[Q]:((A===null||typeof A>"u")&&(A=tt()),Z=W[Q]&&W[Q][A]),typeof Z>"u"||!Z.length||!Z[0]){var ce="";Bt=[];for(pt in W[Q])this.terminals_[pt]&&pt>$&&Bt.push("'"+this.terminals_[pt]+"'");H.showPosition?ce="Parse error on line "+(K+1)+`: +import{bg as on,bh as On,bi as cn,bj as un,bk as ln,bl as ue,bm as Hn,g as Nn,s as Pn,p as Vn,o as Rn,a as zn,b as qn,_ as d,c as Yt,d as Zt,e as Bn,bn as it,l as Tt,k as Zn,j as Xn,q as Gn,y as jn}from"./mermaid.core-Cahi9cr1.js";import{g as oe}from"./_commonjsHelpers-CqkleIqs.js";import{b as Qn,t as Ne,c as Jn,a as Kn,l as tr}from"./linear-DHRafvZW.js";import{i as er}from"./init-Gi6I4Gst.js";import"./index-HRJ6xRtC.js";import"./defaultLocale-DX6XiGOO.js";function nr(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n=i)&&(n=i)}return n}function rr(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function ir(t){return t}var Gt=1,le=2,xe=3,Xt=4,Pe=1e-6;function sr(t){return"translate("+t+",0)"}function ar(t){return"translate(0,"+t+")"}function or(t){return e=>+t(e)}function cr(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function ur(){return!this.__axis}function fn(t,e){var n=[],r=null,i=null,s=6,a=6,y=3,F=typeof window<"u"&&window.devicePixelRatio>1?0:.5,S=t===Gt||t===Xt?-1:1,w=t===Xt||t===le?"x":"y",P=t===Gt||t===xe?sr:ar;function _(Y){var X=r??(e.ticks?e.ticks.apply(e,n):e.domain()),B=i??(e.tickFormat?e.tickFormat.apply(e,n):ir),v=Math.max(s,0)+y,U=e.range(),R=+U[0]+F,E=+U[U.length-1]+F,z=(e.bandwidth?cr:or)(e.copy(),F),G=Y.selection?Y.selection():Y,T=G.selectAll(".domain").data([null]),k=G.selectAll(".tick").data(X,e).order(),p=k.exit(),L=k.enter().append("g").attr("class","tick"),x=k.select("line"),C=k.select("text");T=T.merge(T.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),k=k.merge(L),x=x.merge(L.append("line").attr("stroke","currentColor").attr(w+"2",S*s)),C=C.merge(L.append("text").attr("fill","currentColor").attr(w,S*v).attr("dy",t===Gt?"0em":t===xe?"0.71em":"0.32em")),Y!==G&&(T=T.transition(Y),k=k.transition(Y),x=x.transition(Y),C=C.transition(Y),p=p.transition(Y).attr("opacity",Pe).attr("transform",function(M){return isFinite(M=z(M))?P(M+F):this.getAttribute("transform")}),L.attr("opacity",Pe).attr("transform",function(M){var D=this.parentNode.__axis;return P((D&&isFinite(D=D(M))?D:z(M))+F)})),p.remove(),T.attr("d",t===Xt||t===le?a?"M"+S*a+","+R+"H"+F+"V"+E+"H"+S*a:"M"+F+","+R+"V"+E:a?"M"+R+","+S*a+"V"+F+"H"+E+"V"+S*a:"M"+R+","+F+"H"+E),k.attr("opacity",1).attr("transform",function(M){return P(z(M)+F)}),x.attr(w+"2",S*s),C.attr(w,S*v).text(B),G.filter(ur).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===le?"start":t===Xt?"end":"middle"),G.each(function(){this.__axis=z})}return _.scale=function(Y){return arguments.length?(e=Y,_):e},_.ticks=function(){return n=Array.from(arguments),_},_.tickArguments=function(Y){return arguments.length?(n=Y==null?[]:Array.from(Y),_):n.slice()},_.tickValues=function(Y){return arguments.length?(r=Y==null?null:Array.from(Y),_):r&&r.slice()},_.tickFormat=function(Y){return arguments.length?(i=Y,_):i},_.tickSize=function(Y){return arguments.length?(s=a=+Y,_):s},_.tickSizeInner=function(Y){return arguments.length?(s=+Y,_):s},_.tickSizeOuter=function(Y){return arguments.length?(a=+Y,_):a},_.tickPadding=function(Y){return arguments.length?(y=+Y,_):y},_.offset=function(Y){return arguments.length?(F=+Y,_):F},_}function lr(t){return fn(Gt,t)}function fr(t){return fn(xe,t)}const dr=Math.PI/180,hr=180/Math.PI,ne=18,dn=.96422,hn=1,mn=.82521,gn=4/29,Ft=6/29,yn=3*Ft*Ft,mr=Ft*Ft*Ft;function kn(t){if(t instanceof ft)return new ft(t.l,t.a,t.b,t.opacity);if(t instanceof ht)return pn(t);t instanceof on||(t=On(t));var e=me(t.r),n=me(t.g),r=me(t.b),i=fe((.2225045*e+.7168786*n+.0606169*r)/hn),s,a;return e===n&&n===r?s=a=i:(s=fe((.4360747*e+.3850649*n+.1430804*r)/dn),a=fe((.0139322*e+.0971045*n+.7141733*r)/mn)),new ft(116*i-16,500*(s-i),200*(i-a),t.opacity)}function gr(t,e,n,r){return arguments.length===1?kn(t):new ft(t,e,n,r??1)}function ft(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}cn(ft,gr,un(ln,{brighter(t){return new ft(this.l+ne*(t??1),this.a,this.b,this.opacity)},darker(t){return new ft(this.l-ne*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return e=dn*de(e),t=hn*de(t),n=mn*de(n),new on(he(3.1338561*e-1.6168667*t-.4906146*n),he(-.9787684*e+1.9161415*t+.033454*n),he(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function fe(t){return t>mr?Math.pow(t,1/3):t/yn+gn}function de(t){return t>Ft?t*t*t:yn*(t-gn)}function he(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function me(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function yr(t){if(t instanceof ht)return new ht(t.h,t.c,t.l,t.opacity);if(t instanceof ft||(t=kn(t)),t.a===0&&t.b===0)return new ht(NaN,0(t(s=new Date(+s)),s),i.ceil=s=>(t(s=new Date(s-1)),e(s,1),t(s),s),i.round=s=>{const a=i(s),y=i.ceil(s);return s-a(e(s=new Date(+s),a==null?1:Math.floor(a)),s),i.range=(s,a,y)=>{const F=[];if(s=i.ceil(s),y=y==null?1:Math.floor(y),!(s0))return F;let S;do F.push(S=new Date(+s)),e(s,y),t(s);while(Snt(a=>{if(a>=a)for(;t(a),!s(a);)a.setTime(a-1)},(a,y)=>{if(a>=a)if(y<0)for(;++y<=0;)for(;e(a,-1),!s(a););else for(;--y>=0;)for(;e(a,1),!s(a););}),n&&(i.count=(s,a)=>(ge.setTime(+s),ye.setTime(+a),t(ge),t(ye),Math.floor(n(ge,ye))),i.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?i.filter(r?a=>r(a)%s===0:a=>i.count(0,a)%s===0):i)),i}const Et=nt(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Et.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?nt(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):Et);Et.range;const mt=1e3,ct=mt*60,gt=ct*60,yt=gt*24,Se=yt*7,Ve=yt*30,ke=yt*365,vt=nt(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*mt)},(t,e)=>(e-t)/mt,t=>t.getUTCSeconds());vt.range;const Nt=nt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*mt)},(t,e)=>{t.setTime(+t+e*ct)},(t,e)=>(e-t)/ct,t=>t.getMinutes());Nt.range;const Tr=nt(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*ct)},(t,e)=>(e-t)/ct,t=>t.getUTCMinutes());Tr.range;const Pt=nt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*mt-t.getMinutes()*ct)},(t,e)=>{t.setTime(+t+e*gt)},(t,e)=>(e-t)/gt,t=>t.getHours());Pt.range;const xr=nt(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*gt)},(t,e)=>(e-t)/gt,t=>t.getUTCHours());xr.range;const xt=nt(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*ct)/yt,t=>t.getDate()-1);xt.range;const _e=nt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/yt,t=>t.getUTCDate()-1);_e.range;const br=nt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/yt,t=>Math.floor(t/yt));br.range;function Dt(t){return nt(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*ct)/Se)}const zt=Dt(0),Vt=Dt(1),vn=Dt(2),Tn=Dt(3),bt=Dt(4),xn=Dt(5),bn=Dt(6);zt.range;Vt.range;vn.range;Tn.range;bt.range;xn.range;bn.range;function Mt(t){return nt(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/Se)}const wn=Mt(0),re=Mt(1),wr=Mt(2),Dr=Mt(3),It=Mt(4),Mr=Mt(5),Cr=Mt(6);wn.range;re.range;wr.range;Dr.range;It.range;Mr.range;Cr.range;const Rt=nt(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth());Rt.range;const Sr=nt(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth());Sr.range;const kt=nt(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());kt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:nt(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)});kt.range;const wt=nt(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());wt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:nt(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)});wt.range;function _r(t,e,n,r,i,s){const a=[[vt,1,mt],[vt,5,5*mt],[vt,15,15*mt],[vt,30,30*mt],[s,1,ct],[s,5,5*ct],[s,15,15*ct],[s,30,30*ct],[i,1,gt],[i,3,3*gt],[i,6,6*gt],[i,12,12*gt],[r,1,yt],[r,2,2*yt],[n,1,Se],[e,1,Ve],[e,3,3*Ve],[t,1,ke]];function y(S,w,P){const _=wv).right(a,_);if(Y===a.length)return t.every(Ne(S/ke,w/ke,P));if(Y===0)return Et.every(Math.max(Ne(S,w,P),1));const[X,B]=a[_/a[Y-1][2]53)return null;"w"in f||(f.w=1),"Z"in f?(A=ve($t(f.y,0,1)),Q=A.getUTCDay(),A=Q>4||Q===0?re.ceil(A):re(A),A=_e.offset(A,(f.V-1)*7),f.y=A.getUTCFullYear(),f.m=A.getUTCMonth(),f.d=A.getUTCDate()+(f.w+6)%7):(A=pe($t(f.y,0,1)),Q=A.getDay(),A=Q>4||Q===0?Vt.ceil(A):Vt(A),A=xt.offset(A,(f.V-1)*7),f.y=A.getFullYear(),f.m=A.getMonth(),f.d=A.getDate()+(f.w+6)%7)}else("W"in f||"U"in f)&&("w"in f||(f.w="u"in f?f.u%7:"W"in f?1:0),Q="Z"in f?ve($t(f.y,0,1)).getUTCDay():pe($t(f.y,0,1)).getDay(),f.m=0,f.d="W"in f?(f.w+6)%7+f.W*7-(Q+5)%7:f.w+f.U*7-(Q+6)%7);return"Z"in f?(f.H+=f.Z/100|0,f.M+=f.Z%100,ve(f)):pe(f)}}function p(h,N,V,f){for(var tt=0,A=N.length,Q=V.length,Z,st;tt=Q)return-1;if(Z=N.charCodeAt(tt++),Z===37){if(Z=N.charAt(tt++),st=G[Z in Re?N.charAt(tt++):Z],!st||(f=st(h,V,f))<0)return-1}else if(Z!=V.charCodeAt(f++))return-1}return f}function L(h,N,V){var f=S.exec(N.slice(V));return f?(h.p=w.get(f[0].toLowerCase()),V+f[0].length):-1}function x(h,N,V){var f=Y.exec(N.slice(V));return f?(h.w=X.get(f[0].toLowerCase()),V+f[0].length):-1}function C(h,N,V){var f=P.exec(N.slice(V));return f?(h.w=_.get(f[0].toLowerCase()),V+f[0].length):-1}function M(h,N,V){var f=U.exec(N.slice(V));return f?(h.m=R.get(f[0].toLowerCase()),V+f[0].length):-1}function D(h,N,V){var f=B.exec(N.slice(V));return f?(h.m=v.get(f[0].toLowerCase()),V+f[0].length):-1}function c(h,N,V){return p(h,e,N,V)}function g(h,N,V){return p(h,n,N,V)}function b(h,N,V){return p(h,r,N,V)}function m(h){return a[h.getDay()]}function I(h){return s[h.getDay()]}function o(h){return F[h.getMonth()]}function W(h){return y[h.getMonth()]}function u(h){return i[+(h.getHours()>=12)]}function K(h){return 1+~~(h.getMonth()/3)}function l(h){return a[h.getUTCDay()]}function $(h){return s[h.getUTCDay()]}function O(h){return F[h.getUTCMonth()]}function j(h){return y[h.getUTCMonth()]}function H(h){return i[+(h.getUTCHours()>=12)]}function J(h){return 1+~~(h.getUTCMonth()/3)}return{format:function(h){var N=T(h+="",E);return N.toString=function(){return h},N},parse:function(h){var N=k(h+="",!1);return N.toString=function(){return h},N},utcFormat:function(h){var N=T(h+="",z);return N.toString=function(){return h},N},utcParse:function(h){var N=k(h+="",!0);return N.toString=function(){return h},N}}}var Re={"-":"",_:" ",0:"0"},rt=/^\s*\d+/,Er=/^%/,Ir=/[\\^$*+?|[\]().{}]/g;function q(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",s=i.length;return r+(s[e.toLowerCase(),n]))}function Ar(t,e,n){var r=rt.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Wr(t,e,n){var r=rt.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function $r(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Or(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Hr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function ze(t,e,n){var r=rt.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function qe(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Nr(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Pr(t,e,n){var r=rt.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function Vr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Be(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Rr(t,e,n){var r=rt.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Ze(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function zr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function qr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Br(t,e,n){var r=rt.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Zr(t,e,n){var r=rt.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Xr(t,e,n){var r=Er.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Gr(t,e,n){var r=rt.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function jr(t,e,n){var r=rt.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Xe(t,e){return q(t.getDate(),e,2)}function Qr(t,e){return q(t.getHours(),e,2)}function Jr(t,e){return q(t.getHours()%12||12,e,2)}function Kr(t,e){return q(1+xt.count(kt(t),t),e,3)}function Dn(t,e){return q(t.getMilliseconds(),e,3)}function ti(t,e){return Dn(t,e)+"000"}function ei(t,e){return q(t.getMonth()+1,e,2)}function ni(t,e){return q(t.getMinutes(),e,2)}function ri(t,e){return q(t.getSeconds(),e,2)}function ii(t){var e=t.getDay();return e===0?7:e}function si(t,e){return q(zt.count(kt(t)-1,t),e,2)}function Mn(t){var e=t.getDay();return e>=4||e===0?bt(t):bt.ceil(t)}function ai(t,e){return t=Mn(t),q(bt.count(kt(t),t)+(kt(t).getDay()===4),e,2)}function oi(t){return t.getDay()}function ci(t,e){return q(Vt.count(kt(t)-1,t),e,2)}function ui(t,e){return q(t.getFullYear()%100,e,2)}function li(t,e){return t=Mn(t),q(t.getFullYear()%100,e,2)}function fi(t,e){return q(t.getFullYear()%1e4,e,4)}function di(t,e){var n=t.getDay();return t=n>=4||n===0?bt(t):bt.ceil(t),q(t.getFullYear()%1e4,e,4)}function hi(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+q(e/60|0,"0",2)+q(e%60,"0",2)}function Ge(t,e){return q(t.getUTCDate(),e,2)}function mi(t,e){return q(t.getUTCHours(),e,2)}function gi(t,e){return q(t.getUTCHours()%12||12,e,2)}function yi(t,e){return q(1+_e.count(wt(t),t),e,3)}function Cn(t,e){return q(t.getUTCMilliseconds(),e,3)}function ki(t,e){return Cn(t,e)+"000"}function pi(t,e){return q(t.getUTCMonth()+1,e,2)}function vi(t,e){return q(t.getUTCMinutes(),e,2)}function Ti(t,e){return q(t.getUTCSeconds(),e,2)}function xi(t){var e=t.getUTCDay();return e===0?7:e}function bi(t,e){return q(wn.count(wt(t)-1,t),e,2)}function Sn(t){var e=t.getUTCDay();return e>=4||e===0?It(t):It.ceil(t)}function wi(t,e){return t=Sn(t),q(It.count(wt(t),t)+(wt(t).getUTCDay()===4),e,2)}function Di(t){return t.getUTCDay()}function Mi(t,e){return q(re.count(wt(t)-1,t),e,2)}function Ci(t,e){return q(t.getUTCFullYear()%100,e,2)}function Si(t,e){return t=Sn(t),q(t.getUTCFullYear()%100,e,2)}function _i(t,e){return q(t.getUTCFullYear()%1e4,e,4)}function Yi(t,e){var n=t.getUTCDay();return t=n>=4||n===0?It(t):It.ceil(t),q(t.getUTCFullYear()%1e4,e,4)}function Fi(){return"+0000"}function je(){return"%"}function Qe(t){return+t}function Je(t){return Math.floor(+t/1e3)}var St,ie;Ui({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Ui(t){return St=Ur(t),ie=St.format,St.parse,St.utcFormat,St.utcParse,St}function Ei(t){return new Date(t)}function Ii(t){return t instanceof Date?+t:+new Date(+t)}function _n(t,e,n,r,i,s,a,y,F,S){var w=Jn(),P=w.invert,_=w.domain,Y=S(".%L"),X=S(":%S"),B=S("%I:%M"),v=S("%I %p"),U=S("%a %d"),R=S("%b %d"),E=S("%B"),z=S("%Y");function G(T){return(F(T)4&&(Y+=7),_.add(Y,n));return X.diff(B,"week")+1},y.isoWeekday=function(S){return this.$utils().u(S)?this.day()||7:this.day(this.day()%7?S:S-7)};var F=y.startOf;y.startOf=function(S,w){var P=this.$utils(),_=!!P.u(w)||w;return P.p(S)==="isoweek"?_?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):F.bind(this)(S,w)}}}))})(jt)),jt.exports}var $i=Wi();const Oi=oe($i);var Qt={exports:{}},Hi=Qt.exports,tn;function Ni(){return tn||(tn=1,(function(t,e){(function(n,r){t.exports=r()})(Hi,(function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d/,s=/\d\d/,a=/\d\d?/,y=/\d*[^-_:/,()\s\d]+/,F={},S=function(v){return(v=+v)+(v>68?1900:2e3)},w=function(v){return function(U){this[v]=+U}},P=[/[+-]\d\d:?(\d\d)?|Z/,function(v){(this.zone||(this.zone={})).offset=(function(U){if(!U||U==="Z")return 0;var R=U.match(/([+-]|\d\d)/g),E=60*R[1]+(+R[2]||0);return E===0?0:R[0]==="+"?-E:E})(v)}],_=function(v){var U=F[v];return U&&(U.indexOf?U:U.s.concat(U.f))},Y=function(v,U){var R,E=F.meridiem;if(E){for(var z=1;z<=24;z+=1)if(v.indexOf(E(z,0,U))>-1){R=z>12;break}}else R=v===(U?"pm":"PM");return R},X={A:[y,function(v){this.afternoon=Y(v,!1)}],a:[y,function(v){this.afternoon=Y(v,!0)}],Q:[i,function(v){this.month=3*(v-1)+1}],S:[i,function(v){this.milliseconds=100*+v}],SS:[s,function(v){this.milliseconds=10*+v}],SSS:[/\d{3}/,function(v){this.milliseconds=+v}],s:[a,w("seconds")],ss:[a,w("seconds")],m:[a,w("minutes")],mm:[a,w("minutes")],H:[a,w("hours")],h:[a,w("hours")],HH:[a,w("hours")],hh:[a,w("hours")],D:[a,w("day")],DD:[s,w("day")],Do:[y,function(v){var U=F.ordinal,R=v.match(/\d+/);if(this.day=R[0],U)for(var E=1;E<=31;E+=1)U(E).replace(/\[|\]/g,"")===v&&(this.day=E)}],w:[a,w("week")],ww:[s,w("week")],M:[a,w("month")],MM:[s,w("month")],MMM:[y,function(v){var U=_("months"),R=(_("monthsShort")||U.map((function(E){return E.slice(0,3)}))).indexOf(v)+1;if(R<1)throw new Error;this.month=R%12||R}],MMMM:[y,function(v){var U=_("months").indexOf(v)+1;if(U<1)throw new Error;this.month=U%12||U}],Y:[/[+-]?\d+/,w("year")],YY:[s,function(v){this.year=S(v)}],YYYY:[/\d{4}/,w("year")],Z:P,ZZ:P};function B(v){var U,R;U=v,R=F&&F.formats;for(var E=(v=U.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(x,C,M){var D=M&&M.toUpperCase();return C||R[M]||n[M]||R[D].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(c,g,b){return g||b.slice(1)}))}))).match(r),z=E.length,G=0;G-1)return new Date((I==="X"?1e3:1)*m);var u=B(I)(m),K=u.year,l=u.month,$=u.day,O=u.hours,j=u.minutes,H=u.seconds,J=u.milliseconds,h=u.zone,N=u.week,V=new Date,f=$||(K||l?1:V.getDate()),tt=K||V.getFullYear(),A=0;K&&!l||(A=l>0?l-1:V.getMonth());var Q,Z=O||0,st=j||0,at=H||0,pt=J||0;return h?new Date(Date.UTC(tt,A,f,Z,st,at,pt+60*h.offset*1e3)):o?new Date(Date.UTC(tt,A,f,Z,st,at,pt)):(Q=new Date(tt,A,f,Z,st,at,pt),N&&(Q=W(Q).week(N).toDate()),Q)}catch{return new Date("")}})(T,L,k,R),this.init(),D&&D!==!0&&(this.$L=this.locale(D).$L),M&&T!=this.format(L)&&(this.$d=new Date("")),F={}}else if(L instanceof Array)for(var c=L.length,g=1;g<=c;g+=1){p[1]=L[g-1];var b=R.apply(this,p);if(b.isValid()){this.$d=b.$d,this.$L=b.$L,this.init();break}g===c&&(this.$d=new Date(""))}else z.call(this,G)}}}))})(Qt)),Qt.exports}var Pi=Ni();const Vi=oe(Pi);var Jt={exports:{}},Ri=Jt.exports,en;function zi(){return en||(en=1,(function(t,e){(function(n,r){t.exports=r()})(Ri,(function(){return function(n,r){var i=r.prototype,s=i.format;i.format=function(a){var y=this,F=this.$locale();if(!this.isValid())return s.bind(this)(a);var S=this.$utils(),w=(a||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(P){switch(P){case"Q":return Math.ceil((y.$M+1)/3);case"Do":return F.ordinal(y.$D);case"gggg":return y.weekYear();case"GGGG":return y.isoWeekYear();case"wo":return F.ordinal(y.week(),"W");case"w":case"ww":return S.s(y.week(),P==="w"?1:2,"0");case"W":case"WW":return S.s(y.isoWeek(),P==="W"?1:2,"0");case"k":case"kk":return S.s(String(y.$H===0?24:y.$H),P==="k"?1:2,"0");case"X":return Math.floor(y.$d.getTime()/1e3);case"x":return y.$d.getTime();case"z":return"["+y.offsetName()+"]";case"zzz":return"["+y.offsetName("long")+"]";default:return P}}));return s.bind(this)(w)}}}))})(Jt)),Jt.exports}var qi=zi();const Bi=oe(qi);var Kt={exports:{}},Zi=Kt.exports,nn;function Xi(){return nn||(nn=1,(function(t,e){(function(n,r){t.exports=r()})(Zi,(function(){var n,r,i=1e3,s=6e4,a=36e5,y=864e5,F=31536e6,S=2628e6,w=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,P=/\[([^\]]+)]|YYYY|YY|Y|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS/g,_={years:F,months:S,days:y,hours:a,minutes:s,seconds:i,milliseconds:1,weeks:6048e5},Y=function(T){return T instanceof z},X=function(T,k,p){return new z(T,p,k.$l)},B=function(T){return r.p(T)+"s"},v=function(T){return T<0},U=function(T){return v(T)?Math.ceil(T):Math.floor(T)},R=function(T){return Math.abs(T)},E=function(T,k){return T?v(T)?{negative:!0,format:""+R(T)+k}:{negative:!1,format:""+T+k}:{negative:!1,format:""}},z=(function(){function T(p,L,x){var C=this;if(this.$d={},this.$l=x,p===void 0&&(this.$ms=0,this.parseFromMilliseconds()),L)return X(p*_[B(L)],this);if(typeof p=="number")return this.$ms=p,this.parseFromMilliseconds(),this;if(typeof p=="object")return Object.keys(p).forEach((function(c){C.$d[B(c)]=p[c]})),this.calMilliseconds(),this;if(typeof p=="string"){var M=p.match(w);if(M){var D=M.slice(2).map((function(c){return c!=null?Number(c):0}));return this.$d.years=D[0],this.$d.months=D[1],this.$d.weeks=D[2],this.$d.days=D[3],this.$d.hours=D[4],this.$d.minutes=D[5],this.$d.seconds=D[6],this.calMilliseconds(),this}}return this}var k=T.prototype;return k.calMilliseconds=function(){var p=this;this.$ms=Object.keys(this.$d).reduce((function(L,x){return L+(p.$d[x]||0)*_[x]}),0)},k.parseFromMilliseconds=function(){var p=this.$ms;this.$d.years=U(p/F),p%=F,this.$d.months=U(p/S),p%=S,this.$d.days=U(p/y),p%=y,this.$d.hours=U(p/a),p%=a,this.$d.minutes=U(p/s),p%=s,this.$d.seconds=U(p/i),p%=i,this.$d.milliseconds=p},k.toISOString=function(){var p=E(this.$d.years,"Y"),L=E(this.$d.months,"M"),x=+this.$d.days||0;this.$d.weeks&&(x+=7*this.$d.weeks);var C=E(x,"D"),M=E(this.$d.hours,"H"),D=E(this.$d.minutes,"M"),c=this.$d.seconds||0;this.$d.milliseconds&&(c+=this.$d.milliseconds/1e3,c=Math.round(1e3*c)/1e3);var g=E(c,"S"),b=p.negative||L.negative||C.negative||M.negative||D.negative||g.negative,m=M.format||D.format||g.format?"T":"",I=(b?"-":"")+"P"+p.format+L.format+C.format+m+M.format+D.format+g.format;return I==="P"||I==="-P"?"P0D":I},k.toJSON=function(){return this.toISOString()},k.format=function(p){var L=p||"YYYY-MM-DDTHH:mm:ss",x={Y:this.$d.years,YY:r.s(this.$d.years,2,"0"),YYYY:r.s(this.$d.years,4,"0"),M:this.$d.months,MM:r.s(this.$d.months,2,"0"),D:this.$d.days,DD:r.s(this.$d.days,2,"0"),H:this.$d.hours,HH:r.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:r.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:r.s(this.$d.seconds,2,"0"),SSS:r.s(this.$d.milliseconds,3,"0")};return L.replace(P,(function(C,M){return M||String(x[C])}))},k.as=function(p){return this.$ms/_[B(p)]},k.get=function(p){var L=this.$ms,x=B(p);return x==="milliseconds"?L%=1e3:L=x==="weeks"?U(L/_[x]):this.$d[x],L||0},k.add=function(p,L,x){var C;return C=L?p*_[B(L)]:Y(p)?p.$ms:X(p,this).$ms,X(this.$ms+C*(x?-1:1),this)},k.subtract=function(p,L){return this.add(p,L,!0)},k.locale=function(p){var L=this.clone();return L.$l=p,L},k.clone=function(){return X(this.$ms,this)},k.humanize=function(p){return n().add(this.$ms,"ms").locale(this.$l).fromNow(!p)},k.valueOf=function(){return this.asMilliseconds()},k.milliseconds=function(){return this.get("milliseconds")},k.asMilliseconds=function(){return this.as("milliseconds")},k.seconds=function(){return this.get("seconds")},k.asSeconds=function(){return this.as("seconds")},k.minutes=function(){return this.get("minutes")},k.asMinutes=function(){return this.as("minutes")},k.hours=function(){return this.get("hours")},k.asHours=function(){return this.as("hours")},k.days=function(){return this.get("days")},k.asDays=function(){return this.as("days")},k.weeks=function(){return this.get("weeks")},k.asWeeks=function(){return this.as("weeks")},k.months=function(){return this.get("months")},k.asMonths=function(){return this.as("months")},k.years=function(){return this.get("years")},k.asYears=function(){return this.as("years")},T})(),G=function(T,k,p){return T.add(k.years()*p,"y").add(k.months()*p,"M").add(k.days()*p,"d").add(k.hours()*p,"h").add(k.minutes()*p,"m").add(k.seconds()*p,"s").add(k.milliseconds()*p,"ms")};return function(T,k,p){n=p,r=p().$utils(),p.duration=function(C,M){var D=p.locale();return X(C,{$l:D},M)},p.isDuration=Y;var L=k.prototype.add,x=k.prototype.subtract;k.prototype.add=function(C,M){return Y(C)?G(this,C,1):L.bind(this)(C,M)},k.prototype.subtract=function(C,M){return Y(C)?G(this,C,-1):x.bind(this)(C,M)}}}))})(Kt)),Kt.exports}var Gi=Xi();const ji=oe(Gi);var we=(function(){var t=d(function(D,c,g,b){for(g=g||{},b=D.length;b--;g[D[b]]=c);return g},"o"),e=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],n=[1,26],r=[1,27],i=[1,28],s=[1,29],a=[1,30],y=[1,31],F=[1,32],S=[1,33],w=[1,34],P=[1,9],_=[1,10],Y=[1,11],X=[1,12],B=[1,13],v=[1,14],U=[1,15],R=[1,16],E=[1,19],z=[1,20],G=[1,21],T=[1,22],k=[1,23],p=[1,25],L=[1,35],x={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:d(function(c,g,b,m,I,o,W){var u=o.length-1;switch(I){case 1:return o[u-1];case 2:this.$=[];break;case 3:o[u-1].push(o[u]),this.$=o[u-1];break;case 4:case 5:this.$=o[u];break;case 6:case 7:this.$=[];break;case 8:m.setWeekday("monday");break;case 9:m.setWeekday("tuesday");break;case 10:m.setWeekday("wednesday");break;case 11:m.setWeekday("thursday");break;case 12:m.setWeekday("friday");break;case 13:m.setWeekday("saturday");break;case 14:m.setWeekday("sunday");break;case 15:m.setWeekend("friday");break;case 16:m.setWeekend("saturday");break;case 17:m.setDateFormat(o[u].substr(11)),this.$=o[u].substr(11);break;case 18:m.enableInclusiveEndDates(),this.$=o[u].substr(18);break;case 19:m.TopAxis(),this.$=o[u].substr(8);break;case 20:m.setAxisFormat(o[u].substr(11)),this.$=o[u].substr(11);break;case 21:m.setTickInterval(o[u].substr(13)),this.$=o[u].substr(13);break;case 22:m.setExcludes(o[u].substr(9)),this.$=o[u].substr(9);break;case 23:m.setIncludes(o[u].substr(9)),this.$=o[u].substr(9);break;case 24:m.setTodayMarker(o[u].substr(12)),this.$=o[u].substr(12);break;case 27:m.setDiagramTitle(o[u].substr(6)),this.$=o[u].substr(6);break;case 28:this.$=o[u].trim(),m.setAccTitle(this.$);break;case 29:case 30:this.$=o[u].trim(),m.setAccDescription(this.$);break;case 31:m.addSection(o[u].substr(8)),this.$=o[u].substr(8);break;case 33:m.addTask(o[u-1],o[u]),this.$="task";break;case 34:this.$=o[u-1],m.setClickEvent(o[u-1],o[u],null);break;case 35:this.$=o[u-2],m.setClickEvent(o[u-2],o[u-1],o[u]);break;case 36:this.$=o[u-2],m.setClickEvent(o[u-2],o[u-1],null),m.setLink(o[u-2],o[u]);break;case 37:this.$=o[u-3],m.setClickEvent(o[u-3],o[u-2],o[u-1]),m.setLink(o[u-3],o[u]);break;case 38:this.$=o[u-2],m.setClickEvent(o[u-2],o[u],null),m.setLink(o[u-2],o[u-1]);break;case 39:this.$=o[u-3],m.setClickEvent(o[u-3],o[u-1],o[u]),m.setLink(o[u-3],o[u-2]);break;case 40:this.$=o[u-1],m.setLink(o[u-1],o[u]);break;case 41:case 47:this.$=o[u-1]+" "+o[u];break;case 42:case 43:case 45:this.$=o[u-2]+" "+o[u-1]+" "+o[u];break;case 44:case 46:this.$=o[u-3]+" "+o[u-2]+" "+o[u-1]+" "+o[u];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:n,13:r,14:i,15:s,16:a,17:y,18:F,19:18,20:S,21:w,22:P,23:_,24:Y,25:X,26:B,27:v,28:U,29:R,30:E,31:z,33:G,35:T,36:k,37:24,38:p,40:L},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:36,11:17,12:n,13:r,14:i,15:s,16:a,17:y,18:F,19:18,20:S,21:w,22:P,23:_,24:Y,25:X,26:B,27:v,28:U,29:R,30:E,31:z,33:G,35:T,36:k,37:24,38:p,40:L},t(e,[2,5]),t(e,[2,6]),t(e,[2,17]),t(e,[2,18]),t(e,[2,19]),t(e,[2,20]),t(e,[2,21]),t(e,[2,22]),t(e,[2,23]),t(e,[2,24]),t(e,[2,25]),t(e,[2,26]),t(e,[2,27]),{32:[1,37]},{34:[1,38]},t(e,[2,30]),t(e,[2,31]),t(e,[2,32]),{39:[1,39]},t(e,[2,8]),t(e,[2,9]),t(e,[2,10]),t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),{41:[1,40],43:[1,41]},t(e,[2,4]),t(e,[2,28]),t(e,[2,29]),t(e,[2,33]),t(e,[2,34],{42:[1,42],43:[1,43]}),t(e,[2,40],{41:[1,44]}),t(e,[2,35],{43:[1,45]}),t(e,[2,36]),t(e,[2,38],{42:[1,46]}),t(e,[2,37]),t(e,[2,39])],defaultActions:{},parseError:d(function(c,g){if(g.recoverable)this.trace(c);else{var b=new Error(c);throw b.hash=g,b}},"parseError"),parse:d(function(c){var g=this,b=[0],m=[],I=[null],o=[],W=this.table,u="",K=0,l=0,$=2,O=1,j=o.slice.call(arguments,1),H=Object.create(this.lexer),J={yy:{}};for(var h in this.yy)Object.prototype.hasOwnProperty.call(this.yy,h)&&(J.yy[h]=this.yy[h]);H.setInput(c,J.yy),J.yy.lexer=H,J.yy.parser=this,typeof H.yylloc>"u"&&(H.yylloc={});var N=H.yylloc;o.push(N);var V=H.options&&H.options.ranges;typeof J.yy.parseError=="function"?this.parseError=J.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function f(ot){b.length=b.length-2*ot,I.length=I.length-ot,o.length=o.length-ot}d(f,"popStack");function tt(){var ot;return ot=m.pop()||H.lex()||O,typeof ot!="number"&&(ot instanceof Array&&(m=ot,ot=m.pop()),ot=g.symbols_[ot]||ot),ot}d(tt,"lex");for(var A,Q,Z,st,at={},pt,ut,He,Bt;;){if(Q=b[b.length-1],this.defaultActions[Q]?Z=this.defaultActions[Q]:((A===null||typeof A>"u")&&(A=tt()),Z=W[Q]&&W[Q][A]),typeof Z>"u"||!Z.length||!Z[0]){var ce="";Bt=[];for(pt in W[Q])this.terminals_[pt]&&pt>$&&Bt.push("'"+this.terminals_[pt]+"'");H.showPosition?ce="Parse error on line "+(K+1)+`: `+H.showPosition()+` Expecting `+Bt.join(", ")+", got '"+(this.terminals_[A]||A)+"'":ce="Parse error on line "+(K+1)+": Unexpected "+(A==O?"end of input":"'"+(this.terminals_[A]||A)+"'"),this.parseError(ce,{text:H.match,token:this.terminals_[A]||A,line:H.yylineno,loc:N,expected:Bt})}if(Z[0]instanceof Array&&Z.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Q+", token: "+A);switch(Z[0]){case 1:b.push(A),I.push(H.yytext),o.push(H.yylloc),b.push(Z[1]),A=null,l=H.yyleng,u=H.yytext,K=H.yylineno,N=H.yylloc;break;case 2:if(ut=this.productions_[Z[1]][1],at.$=I[I.length-ut],at._$={first_line:o[o.length-(ut||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(ut||1)].first_column,last_column:o[o.length-1].last_column},V&&(at._$.range=[o[o.length-(ut||1)].range[0],o[o.length-1].range[1]]),st=this.performAction.apply(at,[u,l,K,J.yy,Z[1],I,o].concat(j)),typeof st<"u")return st;ut&&(b=b.slice(0,-1*ut*2),I=I.slice(0,-1*ut),o=o.slice(0,-1*ut)),b.push(this.productions_[Z[1]][0]),I.push(at.$),o.push(at._$),He=W[b[b.length-2]][b[b.length-1]],b.push(He);break;case 3:return!0}}return!0},"parse")},C=(function(){var D={EOF:1,parseError:d(function(g,b){if(this.yy.parser)this.yy.parser.parseError(g,b);else throw new Error(g)},"parseError"),setInput:d(function(c,g){return this.yy=g||this.yy||{},this._input=c,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:d(function(){var c=this._input[0];this.yytext+=c,this.yyleng++,this.offset++,this.match+=c,this.matched+=c;var g=c.match(/(?:\r\n?|\n).*/g);return g?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),c},"input"),unput:d(function(c){var g=c.length,b=c.split(/(?:\r\n?|\n)/g);this._input=c+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-g),this.offset-=g;var m=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),b.length-1&&(this.yylineno-=b.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:b?(b.length===m.length?this.yylloc.first_column:0)+m[m.length-b.length].length-b[0].length:this.yylloc.first_column-g},this.options.ranges&&(this.yylloc.range=[I[0],I[0]+this.yyleng-g]),this.yyleng=this.yytext.length,this},"unput"),more:d(function(){return this._more=!0,this},"more"),reject:d(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). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:d(function(c){this.unput(this.match.slice(c))},"less"),pastInput:d(function(){var c=this.matched.substr(0,this.matched.length-this.match.length);return(c.length>20?"...":"")+c.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:d(function(){var c=this.match;return c.length<20&&(c+=this._input.substr(0,20-c.length)),(c.substr(0,20)+(c.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:d(function(){var c=this.pastInput(),g=new Array(c.length+1).join("-");return c+this.upcomingInput()+` diff --git a/apps/kimi-code/dist-web/assets/gitGraphDiagram-IHSO6WYX-BfyW9kzv.js b/apps/kimi-code/dist-web/assets/gitGraphDiagram-IHSO6WYX-BO6zli_L.js similarity index 99% rename from apps/kimi-code/dist-web/assets/gitGraphDiagram-IHSO6WYX-BfyW9kzv.js rename to apps/kimi-code/dist-web/assets/gitGraphDiagram-IHSO6WYX-BO6zli_L.js index d7c92c368e..d319a6d09f 100644 --- a/apps/kimi-code/dist-web/assets/gitGraphDiagram-IHSO6WYX-BfyW9kzv.js +++ b/apps/kimi-code/dist-web/assets/gitGraphDiagram-IHSO6WYX-BO6zli_L.js @@ -1,4 +1,4 @@ -import{I as le}from"./chunk-2Q5K7J3B-BJB08iqf.js";import{p as he}from"./chunk-JWPE2WC7-BiIZjhuH.js";import{p as $e,o as fe,s as ge,g as ue,a as ye,b as xe,_ as h,z as J,l as w,d as me,c as W,y as pe,A as be,q as we,k as B,B as ke,D as ve,E as Ce}from"./mermaid.core-BMAf1qng.js";import{p as Ee}from"./cynefin-VYW2F7L2-B2u2H2Wf.js";import"./index-B-HzRssS.js";import"./_commonjsHelpers-CqkleIqs.js";var m={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Be=ve.gitGraph,S=h(()=>ke({...Be,...J().gitGraph}),"getConfig"),d=new le(()=>{const e=S(),r=e.mainBranchName,t=e.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:t}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function Y(){return Ce({length:7})}h(Y,"getID");function te(e,r){const t=Object.create(null);return e.reduce((s,o)=>{const i=r(o);return t[i]||(t[i]=!0,s.push(o)),s},[])}h(te,"uniqBy");var Te=h(function(e){d.records.direction=e},"setDirection"),Le=h(function(e){w.debug("options str",e),e=e?.trim(),e=e||"{}";try{d.records.options=JSON.parse(e)}catch(r){w.error("error while parsing gitGraph options",r.message)}},"setOptions"),Me=h(function(){return d.records.options},"getOptions"),Re=h(function(e){let r=e.msg,t=e.id;const s=e.type;let o=e.tags;w.info("commit",r,t,s,o),w.debug("Entering commit:",r,t,s,o);const i=S();t=B.sanitizeText(t,i),r=B.sanitizeText(r,i),o=o?.map(a=>B.sanitizeText(a,i));const n={id:t||d.records.seq+"-"+Y(),message:r,seq:d.records.seq++,type:s??m.NORMAL,tags:o??[],parents:d.records.head==null?[]:[d.records.head.id],branch:d.records.currBranch};d.records.head=n,w.info("main branch",i.mainBranchName),d.records.commits.has(n.id)&&w.warn(`Commit ID ${n.id} already exists`),d.records.commits.set(n.id,n),d.records.branches.set(d.records.currBranch,n.id),w.debug("in pushCommit "+n.id)},"commit"),Ie=h(function(e){let r=e.name;const t=e.order;if(r=B.sanitizeText(r,S()),d.records.branches.has(r))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);d.records.branches.set(r,d.records.head!=null?d.records.head.id:null),d.records.branchConfig.set(r,{name:r,order:t}),ae(r),w.debug("in createBranch")},"branch"),Oe=h(e=>{let r=e.branch,t=e.id;const s=e.type,o=e.tags,i=S();r=B.sanitizeText(r,i),t&&(t=B.sanitizeText(t,i));const n=d.records.branches.get(d.records.currBranch),a=d.records.branches.get(r),l=n?d.records.commits.get(n):void 0,f=a?d.records.commits.get(a):void 0;if(l&&f&&l.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(d.records.currBranch===r){const c=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(l===void 0||!l){const c=new Error(`Incorrect usage of "merge". Current branch (${d.records.currBranch})has no commits`);throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},c}if(!d.records.branches.has(r)){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},c}if(f===void 0||!f){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},c}if(l===f){const c=new Error('Incorrect usage of "merge". Both branches have same head');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(t&&d.records.commits.has(t)){const c=new Error('Incorrect usage of "merge". Commit with id:'+t+" already exists, use different custom id");throw c.hash={text:`merge ${r} ${t} ${s} ${o?.join(" ")}`,token:`merge ${r} ${t} ${s} ${o?.join(" ")}`,expected:[`merge ${r} ${t}_UNIQUE ${s} ${o?.join(" ")}`]},c}const g=a||"",$={id:t||`${d.records.seq}-${Y()}`,message:`merged branch ${r} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,g],branch:d.records.currBranch,type:m.MERGE,customType:s,customId:!!t,tags:o??[]};d.records.head=$,d.records.commits.set($.id,$),d.records.branches.set(d.records.currBranch,$.id),w.debug(d.records.branches),w.debug("in mergeBranch")},"merge"),_e=h(function(e){let r=e.id,t=e.targetId,s=e.tags,o=e.parent;w.debug("Entering cherryPick:",r,t,s);const i=S();if(r=B.sanitizeText(r,i),t=B.sanitizeText(t,i),s=s?.map(l=>B.sanitizeText(l,i)),o=B.sanitizeText(o,i),!r||!d.records.commits.has(r)){const l=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw l.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},l}const n=d.records.commits.get(r);if(n===void 0||!n)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(o&&!(Array.isArray(n.parents)&&n.parents.includes(o)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const a=n.branch;if(n.type===m.MERGE&&!o)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!t||!d.records.commits.has(t)){if(a===d.records.currBranch){const $=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const l=d.records.branches.get(d.records.currBranch);if(l===void 0||!l){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const f=d.records.commits.get(l);if(f===void 0||!f){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const g={id:d.records.seq+"-"+Y(),message:`cherry-picked ${n?.message} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,n.id],branch:d.records.currBranch,type:m.CHERRY_PICK,tags:s?s.filter(Boolean):[`cherry-pick:${n.id}${n.type===m.MERGE?`|parent:${o}`:""}`]};d.records.head=g,d.records.commits.set(g.id,g),d.records.branches.set(d.records.currBranch,g.id),w.debug(d.records.branches),w.debug("in cherryPick")}},"cherryPick"),ae=h(function(e){if(e=B.sanitizeText(e,S()),d.records.branches.has(e)){d.records.currBranch=e;const r=d.records.branches.get(d.records.currBranch);r===void 0||!r?d.records.head=null:d.records.head=d.records.commits.get(r)??null}else{const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw r.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},r}},"checkout");function V(e,r,t){const s=e.indexOf(r);s===-1?e.push(t):e.splice(s,1,t)}h(V,"upsert");function Q(e){const r=e.reduce((o,i)=>o.seq>i.seq?o:i,e[0]);let t="";e.forEach(function(o){o===r?t+=" *":t+=" |"});const s=[t,r.id,r.seq];for(const o in d.records.branches)d.records.branches.get(o)===r.id&&s.push(o);if(w.debug(s.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){const o=d.records.commits.get(r.parents[0]);V(e,r,o),r.parents[1]&&e.push(d.records.commits.get(r.parents[1]))}else{if(r.parents.length==0)return;if(r.parents[0]){const o=d.records.commits.get(r.parents[0]);V(e,r,o)}}e=te(e,o=>o.id),Q(e)}h(Q,"prettyPrintCommitHistory");var Ge=h(function(){w.debug(d.records.commits);const e=ne()[0];Q([e])},"prettyPrint"),He=h(function(){d.reset(),we()},"clear"),Se=h(function(){return[...d.records.branchConfig.values()].map((r,t)=>r.order!==null&&r.order!==void 0?r:{...r,order:parseFloat(`0.${t}`)}).sort((r,t)=>(r.order??0)-(t.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),Ae=h(function(){return d.records.branches},"getBranches"),De=h(function(){return d.records.commits},"getCommits"),ne=h(function(){const e=[...d.records.commits.values()];return e.forEach(function(r){w.debug(r.id)}),e.sort((r,t)=>r.seq-t.seq),e},"getCommitsArray"),qe=h(function(){return d.records.currBranch},"getCurrentBranch"),Pe=h(function(){return d.records.direction},"getDirection"),We=h(function(){return d.records.head},"getHead"),se={commitType:m,getConfig:S,setDirection:Te,setOptions:Le,getOptions:Me,commit:Re,branch:Ie,merge:Oe,cherryPick:_e,checkout:ae,prettyPrint:Ge,clear:He,getBranchesAsObjArray:Se,getBranches:Ae,getCommits:De,getCommitsArray:ne,getCurrentBranch:qe,getDirection:Pe,getHead:We,setAccTitle:xe,getAccTitle:ye,getAccDescription:ue,setAccDescription:ge,setDiagramTitle:fe,getDiagramTitle:$e},Ne=h((e,r)=>{he(e,r),e.dir&&r.setDirection(e.dir);for(const t of e.statements)Fe(t,r)},"populate"),Fe=h((e,r)=>{const s={Commit:h(o=>r.commit(ze(o)),"Commit"),Branch:h(o=>r.branch(Ye(o)),"Branch"),Merge:h(o=>r.merge(je(o)),"Merge"),Checkout:h(o=>r.checkout(Ue(o)),"Checkout"),CherryPicking:h(o=>r.cherryPick(Ke(o)),"CherryPicking")}[e.$type];s?s(e):w.error(`Unknown statement type: ${e.$type}`)},"parseStatement"),ze=h(e=>({id:e.id,msg:e.message??"",type:e.type!==void 0?m[e.type]:m.NORMAL,tags:e.tags??void 0}),"parseCommit"),Ye=h(e=>({name:e.name,order:e.order??0}),"parseBranch"),je=h(e=>({branch:e.branch,id:e.id??"",type:e.type!==void 0?m[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),Ue=h(e=>e.branch,"parseCheckout"),Ke=h(e=>({id:e.id,targetId:"",tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),"parseCherryPicking"),Ve={parse:h(async e=>{const r=await Ee("gitGraph",e);w.debug(r),Ne(r,se)},"parse")},O=10,_=40,L=4,R=2,G=8,j=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),X=12,Z=new Set(["redux-color","redux-dark-color"]),Xe=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),H=h((e,r,t=!1)=>t&&e>0?(e-1)%(r-1)+1:e%r,"calcColorIndex"),C=new Map,E=new Map,F=30,q=new Map,z=[],I=0,y="LR",Je=h(()=>{C.clear(),E.clear(),q.clear(),I=0,z=[],y="LR"},"clear"),oe=h(e=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof e=="string"?e.split(/\\n|\n|/gi):e).forEach(s=>{const o=document.createElementNS("http://www.w3.org/2000/svg","tspan");o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),o.setAttribute("dy","1em"),o.setAttribute("x","0"),o.setAttribute("class","row"),o.textContent=s.trim(),r.appendChild(o)}),r},"drawText"),ce=h(e=>{let r,t,s;return y==="BT"?(t=h((o,i)=>o<=i,"comparisonFunc"),s=1/0):(t=h((o,i)=>o>=i,"comparisonFunc"),s=0),e.forEach(o=>{const i=y==="TB"||y=="BT"?E.get(o)?.y:E.get(o)?.x;i!==void 0&&t(i,s)&&(r=o,s=i)}),r},"findClosestParent"),Qe=h(e=>{let r="",t=1/0;return e.forEach(s=>{const o=E.get(s).y;o<=t&&(r=s,t=o)}),r||void 0},"findClosestParentBT"),Ze=h((e,r,t)=>{let s=t,o=t;const i=[];e.forEach(n=>{const a=r.get(n);if(!a)throw new Error(`Commit not found for key ${n}`);a.parents.length?(s=rr(a),o=Math.max(s,o)):i.push(a),tr(a,s)}),s=o,i.forEach(n=>{ar(n,s,t)}),e.forEach(n=>{const a=r.get(n);if(a?.parents.length){const l=Qe(a.parents);s=E.get(l).y-_,s<=o&&(o=s);const f=C.get(a.branch).pos,g=s-O;E.set(a.id,{x:f,y:g})}})},"setParallelBTPos"),er=h(e=>{const r=ce(e.parents.filter(s=>s!==null));if(!r)throw new Error(`Closest parent not found for commit ${e.id}`);const t=E.get(r)?.y;if(t===void 0)throw new Error(`Closest parent position not found for commit ${e.id}`);return t},"findClosestParentPos"),rr=h(e=>er(e)+_,"calculateCommitPosition"),tr=h((e,r)=>{const t=C.get(e.branch);if(!t)throw new Error(`Branch not found for commit ${e.id}`);const s=t.pos,o=r+O;return E.set(e.id,{x:s,y:o}),{x:s,y:o}},"setCommitPosition"),ar=h((e,r,t)=>{const s=C.get(e.branch);if(!s)throw new Error(`Branch not found for commit ${e.id}`);const o=r+t,i=s.pos;E.set(e.id,{x:i,y:o})},"setRootPosition"),nr=h((e,r,t,s,o,i)=>{const{theme:n}=W(),a=j.has(n??""),l=Z.has(n??""),f=Xe.has(n??"");if(i===m.HIGHLIGHT)e.append("rect").attr("x",t.x-10+(a?3:0)).attr("y",t.y-10+(a?3:0)).attr("width",a?14:20).attr("height",a?14:20).attr("class",`commit ${r.id} commit-highlight${H(o,G,l)} ${s}-outer`),e.append("rect").attr("x",t.x-6+(a?2:0)).attr("y",t.y-6+(a?2:0)).attr("width",a?8:12).attr("height",a?8:12).attr("class",`commit ${r.id} commit${H(o,G,l)} ${s}-inner`);else if(i===m.CHERRY_PICK)e.append("circle").attr("cx",t.x).attr("cy",t.y).attr("r",a?7:10).attr("class",`commit ${r.id} ${s}`),e.append("circle").attr("cx",t.x-3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("circle").attr("cx",t.x+3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("line").attr("x1",t.x+3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("line").attr("x1",t.x-3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`);else{const g=e.append("circle");if(g.attr("cx",t.x),g.attr("cy",t.y),g.attr("r",a?7:10),g.attr("class",`commit ${r.id} commit${H(o,G,l)}`),i===m.MERGE){const $=e.append("circle");$.attr("cx",t.x),$.attr("cy",t.y),$.attr("r",a?5:6),$.attr("class",`commit ${s} ${r.id} commit${H(o,G,l)}`)}if(i===m.REVERSE){const $=e.append("path"),c=a?4:5;$.attr("d",`M ${t.x-c},${t.y-c}L${t.x+c},${t.y+c}M${t.x-c},${t.y+c}L${t.x+c},${t.y-c}`).attr("class",`commit ${s} ${r.id} commit${H(o,G,l)}`)}}},"drawCommitBullet"),sr=h((e,r,t,s,o)=>{if(r.type!==m.CHERRY_PICK&&(r.customId&&r.type===m.MERGE||r.type!==m.MERGE)&&o.showCommitLabel){const i=e.append("g"),n=i.insert("rect").attr("class","commit-label-bkg"),a=i.append("text").attr("x",s).attr("y",t.y+25).attr("class","commit-label").text(r.id),l=a.node()?.getBBox();if(l&&(n.attr("x",t.posWithOffset-l.width/2-R).attr("y",t.y+13.5).attr("width",l.width+2*R).attr("height",l.height+2*R),y==="TB"||y==="BT"?(n.attr("x",t.x-(l.width+4*L+5)).attr("y",t.y-12),a.attr("x",t.x-(l.width+4*L)).attr("y",t.y+l.height-12)):a.attr("x",t.posWithOffset-l.width/2),o.rotateCommitLabel))if(y==="TB"||y==="BT")a.attr("transform","rotate(-45, "+t.x+", "+t.y+")"),n.attr("transform","rotate(-45, "+t.x+", "+t.y+")");else{const f=-7.5-(l.width+10)/25*9.5,g=10+l.width/25*8.5;i.attr("transform","translate("+f+", "+g+") rotate(-45, "+s+", "+t.y+")")}}},"drawCommitLabel"),or=h((e,r,t,s)=>{if(r.tags.length>0){let o=0,i=0,n=0;const a=[];for(const l of r.tags.reverse()){const f=e.insert("polygon"),g=e.append("circle"),$=e.append("text").attr("y",t.y-16-o).attr("class","tag-label").text(l),c=$.node()?.getBBox();if(!c)throw new Error("Tag bbox not found");i=Math.max(i,c.width),n=Math.max(n,c.height),$.attr("x",t.posWithOffset-c.width/2),a.push({tag:$,hole:g,rect:f,yOffset:o}),o+=20}for(const{tag:l,hole:f,rect:g,yOffset:$}of a){const c=n/2,x=t.y-19.2-$;if(g.attr("class","tag-label-bkg").attr("points",` +import{I as le}from"./chunk-2Q5K7J3B-B47YykJY.js";import{p as he}from"./chunk-JWPE2WC7-DTx-f56M.js";import{p as $e,o as fe,s as ge,g as ue,a as ye,b as xe,_ as h,z as J,l as w,d as me,c as W,y as pe,A as be,q as we,k as B,B as ke,D as ve,E as Ce}from"./mermaid.core-Cahi9cr1.js";import{p as Ee}from"./cynefin-VYW2F7L2-C5gNr-Q4.js";import"./index-HRJ6xRtC.js";import"./_commonjsHelpers-CqkleIqs.js";var m={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Be=ve.gitGraph,S=h(()=>ke({...Be,...J().gitGraph}),"getConfig"),d=new le(()=>{const e=S(),r=e.mainBranchName,t=e.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:t}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function Y(){return Ce({length:7})}h(Y,"getID");function te(e,r){const t=Object.create(null);return e.reduce((s,o)=>{const i=r(o);return t[i]||(t[i]=!0,s.push(o)),s},[])}h(te,"uniqBy");var Te=h(function(e){d.records.direction=e},"setDirection"),Le=h(function(e){w.debug("options str",e),e=e?.trim(),e=e||"{}";try{d.records.options=JSON.parse(e)}catch(r){w.error("error while parsing gitGraph options",r.message)}},"setOptions"),Me=h(function(){return d.records.options},"getOptions"),Re=h(function(e){let r=e.msg,t=e.id;const s=e.type;let o=e.tags;w.info("commit",r,t,s,o),w.debug("Entering commit:",r,t,s,o);const i=S();t=B.sanitizeText(t,i),r=B.sanitizeText(r,i),o=o?.map(a=>B.sanitizeText(a,i));const n={id:t||d.records.seq+"-"+Y(),message:r,seq:d.records.seq++,type:s??m.NORMAL,tags:o??[],parents:d.records.head==null?[]:[d.records.head.id],branch:d.records.currBranch};d.records.head=n,w.info("main branch",i.mainBranchName),d.records.commits.has(n.id)&&w.warn(`Commit ID ${n.id} already exists`),d.records.commits.set(n.id,n),d.records.branches.set(d.records.currBranch,n.id),w.debug("in pushCommit "+n.id)},"commit"),Ie=h(function(e){let r=e.name;const t=e.order;if(r=B.sanitizeText(r,S()),d.records.branches.has(r))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);d.records.branches.set(r,d.records.head!=null?d.records.head.id:null),d.records.branchConfig.set(r,{name:r,order:t}),ae(r),w.debug("in createBranch")},"branch"),Oe=h(e=>{let r=e.branch,t=e.id;const s=e.type,o=e.tags,i=S();r=B.sanitizeText(r,i),t&&(t=B.sanitizeText(t,i));const n=d.records.branches.get(d.records.currBranch),a=d.records.branches.get(r),l=n?d.records.commits.get(n):void 0,f=a?d.records.commits.get(a):void 0;if(l&&f&&l.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(d.records.currBranch===r){const c=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(l===void 0||!l){const c=new Error(`Incorrect usage of "merge". Current branch (${d.records.currBranch})has no commits`);throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},c}if(!d.records.branches.has(r)){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},c}if(f===void 0||!f){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},c}if(l===f){const c=new Error('Incorrect usage of "merge". Both branches have same head');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(t&&d.records.commits.has(t)){const c=new Error('Incorrect usage of "merge". Commit with id:'+t+" already exists, use different custom id");throw c.hash={text:`merge ${r} ${t} ${s} ${o?.join(" ")}`,token:`merge ${r} ${t} ${s} ${o?.join(" ")}`,expected:[`merge ${r} ${t}_UNIQUE ${s} ${o?.join(" ")}`]},c}const g=a||"",$={id:t||`${d.records.seq}-${Y()}`,message:`merged branch ${r} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,g],branch:d.records.currBranch,type:m.MERGE,customType:s,customId:!!t,tags:o??[]};d.records.head=$,d.records.commits.set($.id,$),d.records.branches.set(d.records.currBranch,$.id),w.debug(d.records.branches),w.debug("in mergeBranch")},"merge"),_e=h(function(e){let r=e.id,t=e.targetId,s=e.tags,o=e.parent;w.debug("Entering cherryPick:",r,t,s);const i=S();if(r=B.sanitizeText(r,i),t=B.sanitizeText(t,i),s=s?.map(l=>B.sanitizeText(l,i)),o=B.sanitizeText(o,i),!r||!d.records.commits.has(r)){const l=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw l.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},l}const n=d.records.commits.get(r);if(n===void 0||!n)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(o&&!(Array.isArray(n.parents)&&n.parents.includes(o)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const a=n.branch;if(n.type===m.MERGE&&!o)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!t||!d.records.commits.has(t)){if(a===d.records.currBranch){const $=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const l=d.records.branches.get(d.records.currBranch);if(l===void 0||!l){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const f=d.records.commits.get(l);if(f===void 0||!f){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const g={id:d.records.seq+"-"+Y(),message:`cherry-picked ${n?.message} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,n.id],branch:d.records.currBranch,type:m.CHERRY_PICK,tags:s?s.filter(Boolean):[`cherry-pick:${n.id}${n.type===m.MERGE?`|parent:${o}`:""}`]};d.records.head=g,d.records.commits.set(g.id,g),d.records.branches.set(d.records.currBranch,g.id),w.debug(d.records.branches),w.debug("in cherryPick")}},"cherryPick"),ae=h(function(e){if(e=B.sanitizeText(e,S()),d.records.branches.has(e)){d.records.currBranch=e;const r=d.records.branches.get(d.records.currBranch);r===void 0||!r?d.records.head=null:d.records.head=d.records.commits.get(r)??null}else{const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw r.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},r}},"checkout");function V(e,r,t){const s=e.indexOf(r);s===-1?e.push(t):e.splice(s,1,t)}h(V,"upsert");function Q(e){const r=e.reduce((o,i)=>o.seq>i.seq?o:i,e[0]);let t="";e.forEach(function(o){o===r?t+=" *":t+=" |"});const s=[t,r.id,r.seq];for(const o in d.records.branches)d.records.branches.get(o)===r.id&&s.push(o);if(w.debug(s.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){const o=d.records.commits.get(r.parents[0]);V(e,r,o),r.parents[1]&&e.push(d.records.commits.get(r.parents[1]))}else{if(r.parents.length==0)return;if(r.parents[0]){const o=d.records.commits.get(r.parents[0]);V(e,r,o)}}e=te(e,o=>o.id),Q(e)}h(Q,"prettyPrintCommitHistory");var Ge=h(function(){w.debug(d.records.commits);const e=ne()[0];Q([e])},"prettyPrint"),He=h(function(){d.reset(),we()},"clear"),Se=h(function(){return[...d.records.branchConfig.values()].map((r,t)=>r.order!==null&&r.order!==void 0?r:{...r,order:parseFloat(`0.${t}`)}).sort((r,t)=>(r.order??0)-(t.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),Ae=h(function(){return d.records.branches},"getBranches"),De=h(function(){return d.records.commits},"getCommits"),ne=h(function(){const e=[...d.records.commits.values()];return e.forEach(function(r){w.debug(r.id)}),e.sort((r,t)=>r.seq-t.seq),e},"getCommitsArray"),qe=h(function(){return d.records.currBranch},"getCurrentBranch"),Pe=h(function(){return d.records.direction},"getDirection"),We=h(function(){return d.records.head},"getHead"),se={commitType:m,getConfig:S,setDirection:Te,setOptions:Le,getOptions:Me,commit:Re,branch:Ie,merge:Oe,cherryPick:_e,checkout:ae,prettyPrint:Ge,clear:He,getBranchesAsObjArray:Se,getBranches:Ae,getCommits:De,getCommitsArray:ne,getCurrentBranch:qe,getDirection:Pe,getHead:We,setAccTitle:xe,getAccTitle:ye,getAccDescription:ue,setAccDescription:ge,setDiagramTitle:fe,getDiagramTitle:$e},Ne=h((e,r)=>{he(e,r),e.dir&&r.setDirection(e.dir);for(const t of e.statements)Fe(t,r)},"populate"),Fe=h((e,r)=>{const s={Commit:h(o=>r.commit(ze(o)),"Commit"),Branch:h(o=>r.branch(Ye(o)),"Branch"),Merge:h(o=>r.merge(je(o)),"Merge"),Checkout:h(o=>r.checkout(Ue(o)),"Checkout"),CherryPicking:h(o=>r.cherryPick(Ke(o)),"CherryPicking")}[e.$type];s?s(e):w.error(`Unknown statement type: ${e.$type}`)},"parseStatement"),ze=h(e=>({id:e.id,msg:e.message??"",type:e.type!==void 0?m[e.type]:m.NORMAL,tags:e.tags??void 0}),"parseCommit"),Ye=h(e=>({name:e.name,order:e.order??0}),"parseBranch"),je=h(e=>({branch:e.branch,id:e.id??"",type:e.type!==void 0?m[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),Ue=h(e=>e.branch,"parseCheckout"),Ke=h(e=>({id:e.id,targetId:"",tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),"parseCherryPicking"),Ve={parse:h(async e=>{const r=await Ee("gitGraph",e);w.debug(r),Ne(r,se)},"parse")},O=10,_=40,L=4,R=2,G=8,j=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),X=12,Z=new Set(["redux-color","redux-dark-color"]),Xe=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),H=h((e,r,t=!1)=>t&&e>0?(e-1)%(r-1)+1:e%r,"calcColorIndex"),C=new Map,E=new Map,F=30,q=new Map,z=[],I=0,y="LR",Je=h(()=>{C.clear(),E.clear(),q.clear(),I=0,z=[],y="LR"},"clear"),oe=h(e=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof e=="string"?e.split(/\\n|\n|/gi):e).forEach(s=>{const o=document.createElementNS("http://www.w3.org/2000/svg","tspan");o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),o.setAttribute("dy","1em"),o.setAttribute("x","0"),o.setAttribute("class","row"),o.textContent=s.trim(),r.appendChild(o)}),r},"drawText"),ce=h(e=>{let r,t,s;return y==="BT"?(t=h((o,i)=>o<=i,"comparisonFunc"),s=1/0):(t=h((o,i)=>o>=i,"comparisonFunc"),s=0),e.forEach(o=>{const i=y==="TB"||y=="BT"?E.get(o)?.y:E.get(o)?.x;i!==void 0&&t(i,s)&&(r=o,s=i)}),r},"findClosestParent"),Qe=h(e=>{let r="",t=1/0;return e.forEach(s=>{const o=E.get(s).y;o<=t&&(r=s,t=o)}),r||void 0},"findClosestParentBT"),Ze=h((e,r,t)=>{let s=t,o=t;const i=[];e.forEach(n=>{const a=r.get(n);if(!a)throw new Error(`Commit not found for key ${n}`);a.parents.length?(s=rr(a),o=Math.max(s,o)):i.push(a),tr(a,s)}),s=o,i.forEach(n=>{ar(n,s,t)}),e.forEach(n=>{const a=r.get(n);if(a?.parents.length){const l=Qe(a.parents);s=E.get(l).y-_,s<=o&&(o=s);const f=C.get(a.branch).pos,g=s-O;E.set(a.id,{x:f,y:g})}})},"setParallelBTPos"),er=h(e=>{const r=ce(e.parents.filter(s=>s!==null));if(!r)throw new Error(`Closest parent not found for commit ${e.id}`);const t=E.get(r)?.y;if(t===void 0)throw new Error(`Closest parent position not found for commit ${e.id}`);return t},"findClosestParentPos"),rr=h(e=>er(e)+_,"calculateCommitPosition"),tr=h((e,r)=>{const t=C.get(e.branch);if(!t)throw new Error(`Branch not found for commit ${e.id}`);const s=t.pos,o=r+O;return E.set(e.id,{x:s,y:o}),{x:s,y:o}},"setCommitPosition"),ar=h((e,r,t)=>{const s=C.get(e.branch);if(!s)throw new Error(`Branch not found for commit ${e.id}`);const o=r+t,i=s.pos;E.set(e.id,{x:i,y:o})},"setRootPosition"),nr=h((e,r,t,s,o,i)=>{const{theme:n}=W(),a=j.has(n??""),l=Z.has(n??""),f=Xe.has(n??"");if(i===m.HIGHLIGHT)e.append("rect").attr("x",t.x-10+(a?3:0)).attr("y",t.y-10+(a?3:0)).attr("width",a?14:20).attr("height",a?14:20).attr("class",`commit ${r.id} commit-highlight${H(o,G,l)} ${s}-outer`),e.append("rect").attr("x",t.x-6+(a?2:0)).attr("y",t.y-6+(a?2:0)).attr("width",a?8:12).attr("height",a?8:12).attr("class",`commit ${r.id} commit${H(o,G,l)} ${s}-inner`);else if(i===m.CHERRY_PICK)e.append("circle").attr("cx",t.x).attr("cy",t.y).attr("r",a?7:10).attr("class",`commit ${r.id} ${s}`),e.append("circle").attr("cx",t.x-3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("circle").attr("cx",t.x+3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("line").attr("x1",t.x+3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("line").attr("x1",t.x-3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`);else{const g=e.append("circle");if(g.attr("cx",t.x),g.attr("cy",t.y),g.attr("r",a?7:10),g.attr("class",`commit ${r.id} commit${H(o,G,l)}`),i===m.MERGE){const $=e.append("circle");$.attr("cx",t.x),$.attr("cy",t.y),$.attr("r",a?5:6),$.attr("class",`commit ${s} ${r.id} commit${H(o,G,l)}`)}if(i===m.REVERSE){const $=e.append("path"),c=a?4:5;$.attr("d",`M ${t.x-c},${t.y-c}L${t.x+c},${t.y+c}M${t.x-c},${t.y+c}L${t.x+c},${t.y-c}`).attr("class",`commit ${s} ${r.id} commit${H(o,G,l)}`)}}},"drawCommitBullet"),sr=h((e,r,t,s,o)=>{if(r.type!==m.CHERRY_PICK&&(r.customId&&r.type===m.MERGE||r.type!==m.MERGE)&&o.showCommitLabel){const i=e.append("g"),n=i.insert("rect").attr("class","commit-label-bkg"),a=i.append("text").attr("x",s).attr("y",t.y+25).attr("class","commit-label").text(r.id),l=a.node()?.getBBox();if(l&&(n.attr("x",t.posWithOffset-l.width/2-R).attr("y",t.y+13.5).attr("width",l.width+2*R).attr("height",l.height+2*R),y==="TB"||y==="BT"?(n.attr("x",t.x-(l.width+4*L+5)).attr("y",t.y-12),a.attr("x",t.x-(l.width+4*L)).attr("y",t.y+l.height-12)):a.attr("x",t.posWithOffset-l.width/2),o.rotateCommitLabel))if(y==="TB"||y==="BT")a.attr("transform","rotate(-45, "+t.x+", "+t.y+")"),n.attr("transform","rotate(-45, "+t.x+", "+t.y+")");else{const f=-7.5-(l.width+10)/25*9.5,g=10+l.width/25*8.5;i.attr("transform","translate("+f+", "+g+") rotate(-45, "+s+", "+t.y+")")}}},"drawCommitLabel"),or=h((e,r,t,s)=>{if(r.tags.length>0){let o=0,i=0,n=0;const a=[];for(const l of r.tags.reverse()){const f=e.insert("polygon"),g=e.append("circle"),$=e.append("text").attr("y",t.y-16-o).attr("class","tag-label").text(l),c=$.node()?.getBBox();if(!c)throw new Error("Tag bbox not found");i=Math.max(i,c.width),n=Math.max(n,c.height),$.attr("x",t.posWithOffset-c.width/2),a.push({tag:$,hole:g,rect:f,yOffset:o}),o+=20}for(const{tag:l,hole:f,rect:g,yOffset:$}of a){const c=n/2,x=t.y-19.2-$;if(g.attr("class","tag-label-bkg").attr("points",` ${s-i/2-L/2},${x+R} ${s-i/2-L/2},${x-R} ${t.posWithOffset-i/2-L},${x-c-R} diff --git a/apps/kimi-code/dist-web/assets/index-B-HzRssS.js b/apps/kimi-code/dist-web/assets/index-B-HzRssS.js deleted file mode 100644 index fd7dd8be0d..0000000000 --- a/apps/kimi-code/dist-web/assets/index-B-HzRssS.js +++ /dev/null @@ -1,626 +0,0 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/mhchem-DtR62fUK.js","assets/katex-DnlPpQZa.js","assets/mermaid.core-BMAf1qng.js","assets/_commonjsHelpers-CqkleIqs.js","assets/CodeBlockNode-pVrDnT5M.js","assets/safeRaf-DGuzXxDK.js","assets/index5-RZzprraT.js","assets/index11-BTFBrOND.js","assets/DesignSystemView-B7NHKYWW.js","assets/DesignSystemView-BOdJHjg1.css","assets/rive-CeXCFBdn.js"])))=>i.map(i=>d[i]); -(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))o(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const r of i.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&o(r)}).observe(document,{childList:!0,subtree:!0});function n(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function o(s){if(s.ep)return;s.ep=!0;const i=n(s);fetch(s.href,i)}})();/** -* @vue/shared v3.5.39 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/function Eg(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const wn={},Sd=[],kr=()=>{},lS=()=>!1,Ap=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Ig=e=>e.startsWith("onUpdate:"),Qn=Object.assign,by=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},qO=Object.prototype.hasOwnProperty,Un=(e,t)=>qO.call(e,t),jt=Array.isArray,Ad=e=>rf(e)==="[object Map]",wu=e=>rf(e)==="[object Set]",l7=e=>rf(e)==="[object Date]",KO=e=>rf(e)==="[object RegExp]",sn=e=>typeof e=="function",oo=e=>typeof e=="string",Xi=e=>typeof e=="symbol",jn=e=>e!==null&&typeof e=="object",Cy=e=>(jn(e)||sn(e))&&sn(e.then)&&sn(e.catch),aS=Object.prototype.toString,rf=e=>aS.call(e),ZO=e=>rf(e).slice(8,-1),Lg=e=>rf(e)==="[object Object]",$g=e=>oo(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,eu=Eg(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Ng=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},GO=/-\w/g,ms=Ng(e=>e.replace(GO,t=>t.slice(1).toUpperCase())),YO=/\B([A-Z])/g,Mi=Ng(e=>e.replace(YO,"-$1").toLowerCase()),Og=Ng(e=>e.charAt(0).toUpperCase()+e.slice(1)),Sh=Ng(e=>e?`on${Og(e)}`:""),ws=(e,t)=>!Object.is(e,t),Md=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:o,value:n})},Fg=e=>{const t=parseFloat(e);return isNaN(t)?e:t},nm=e=>{const t=oo(e)?Number(e):NaN;return isNaN(t)?e:t};let a7;const Rg=()=>a7||(a7=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),XO="Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol",JO=Eg(XO);function Gt(e){if(jt(e)){const t={};for(let n=0;n{if(n){const o=n.split(eF);o.length>1&&(t[o[0].trim()]=o[1].trim())}}),t}function Fe(e){let t="";if(oo(e))t=e;else if(jt(e))for(let n=0;nXl(n,t))}const dS=e=>!!(e&&e.__v_isRef===!0),N=e=>oo(e)?e:e==null?"":jt(e)||jn(e)&&(e.toString===aS||!sn(e.toString))?dS(e)?N(e.value):JSON.stringify(e,fS,2):String(e),fS=(e,t)=>dS(t)?fS(e,t.value):Ad(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[o,s],i)=>(n[Ov(o,i)+" =>"]=s,n),{})}:wu(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Ov(n))}:Xi(t)?Ov(t):jn(t)&&!jt(t)&&!Lg(t)?String(t):t,Ov=(e,t="")=>{var n;return Xi(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};function lF(e){return e==null?"initial":typeof e=="string"?e===""?" ":e:String(e)}/** -* @vue/reactivity v3.5.39 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/let ds;class pS{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&ds&&(ds.active?(this.parent=ds,this.index=(ds.scopes||(ds.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t0&&--this._on===0){if(ds===this)ds=this.prevScope;else{let t=ds;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let n,o;for(n=0,o=this.effects.length;n0)return;if(A1){let t=A1;for(A1=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;S1;){let t=S1;for(S1=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(o){e||(e=o)}t=n}}if(e)throw e}function gS(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function vS(e){let t,n=e.depsTail,o=n;for(;o;){const s=o.prevDep;o.version===-1?(o===n&&(n=s),xy(o),cF(o)):t=o,o.dep.activeLink=o.prevActiveLink,o.prevActiveLink=void 0,o=s}e.deps=t,e.depsTail=n}function w4(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(yS(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function yS(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===X1)||(e.globalVersion=X1,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!w4(e))))return;e.flags|=2;const t=e.dep,n=ao,o=zr;ao=e,zr=!0;try{gS(e);const s=e.fn(e._value);(t.version===0||ws(s,e._value))&&(e.flags|=128,e._value=s,t.version++)}catch(s){throw t.version++,s}finally{ao=n,zr=o,vS(e),e.flags&=-3}}function xy(e,t=!1){const{dep:n,prevSub:o,nextSub:s}=e;if(o&&(o.nextSub=s,e.prevSub=void 0),s&&(s.prevSub=o,e.nextSub=void 0),n.subs===e&&(n.subs=o,!o&&n.computed)){n.computed.flags&=-5;for(let i=n.computed.deps;i;i=i.nextDep)xy(i,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function cF(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}function nUe(e,t){e.effect instanceof om&&(e=e.effect.fn);const n=new om(e);t&&Qn(n,t);try{n.run()}catch(s){throw n.stop(),s}const o=n.run.bind(n);return o.effect=n,o}function oUe(e){e.effect.stop()}let zr=!0;const kS=[];function gl(){kS.push(zr),zr=!1}function vl(){const e=kS.pop();zr=e===void 0?!0:e}function c7(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=ao;ao=void 0;try{t()}finally{ao=n}}}let X1=0;class uF{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Bg{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!ao||!zr||ao===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==ao)n=this.activeLink=new uF(ao,this),ao.deps?(n.prevDep=ao.depsTail,ao.depsTail.nextDep=n,ao.depsTail=n):ao.deps=ao.depsTail=n,bS(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const o=n.nextDep;o.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=o),n.prevDep=ao.depsTail,n.nextDep=void 0,ao.depsTail.nextDep=n,ao.depsTail=n,ao.deps===n&&(ao.deps=o)}return n}trigger(t){this.version++,X1++,this.notify(t)}notify(t){wy();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{_y()}}}function bS(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let o=t.deps;o;o=o.nextDep)bS(o)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const sm=new WeakMap,tu=Symbol(""),_4=Symbol(""),J1=Symbol("");function Ks(e,t,n){if(zr&&ao){let o=sm.get(e);o||sm.set(e,o=new Map);let s=o.get(n);s||(o.set(n,s=new Bg),s.map=o,s.key=n),s.track()}}function zl(e,t,n,o,s,i){const r=sm.get(e);if(!r){X1++;return}const l=a=>{a&&a.trigger()};if(wy(),t==="clear")r.forEach(l);else{const a=jt(e),c=a&&$g(n);if(a&&n==="length"){const u=Number(o);r.forEach((d,f)=>{(f==="length"||f===J1||!Xi(f)&&f>=u)&&l(d)})}else switch((n!==void 0||r.has(void 0))&&l(r.get(n)),c&&l(r.get(J1)),t){case"add":a?c&&l(r.get("length")):(l(r.get(tu)),Ad(e)&&l(r.get(_4)));break;case"delete":a||(l(r.get(tu)),Ad(e)&&l(r.get(_4)));break;case"set":Ad(e)&&l(r.get(tu));break}}_y()}function dF(e,t){const n=sm.get(e);return n&&n.get(t)}function Ku(e){const t=In(e);return t===e?t:(Ks(t,"iterate",J1),Vi(e)?t:t.map(jr))}function Hg(e){return Ks(e=In(e),"iterate",J1),e}function dl(e,t){return Jl(e)?qd(Da(e)?jr(t):t):jr(t)}const fF={__proto__:null,[Symbol.iterator](){return Rv(this,Symbol.iterator,e=>dl(this,e))},concat(...e){return Ku(this).concat(...e.map(t=>jt(t)?Ku(t):t))},entries(){return Rv(this,"entries",e=>(e[1]=dl(this,e[1]),e))},every(e,t){return Nl(this,"every",e,t,void 0,arguments)},filter(e,t){return Nl(this,"filter",e,t,n=>n.map(o=>dl(this,o)),arguments)},find(e,t){return Nl(this,"find",e,t,n=>dl(this,n),arguments)},findIndex(e,t){return Nl(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Nl(this,"findLast",e,t,n=>dl(this,n),arguments)},findLastIndex(e,t){return Nl(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Nl(this,"forEach",e,t,void 0,arguments)},includes(...e){return Pv(this,"includes",e)},indexOf(...e){return Pv(this,"indexOf",e)},join(e){return Ku(this).join(e)},lastIndexOf(...e){return Pv(this,"lastIndexOf",e)},map(e,t){return Nl(this,"map",e,t,void 0,arguments)},pop(){return Uf(this,"pop")},push(...e){return Uf(this,"push",e)},reduce(e,...t){return u7(this,"reduce",e,t)},reduceRight(e,...t){return u7(this,"reduceRight",e,t)},shift(){return Uf(this,"shift")},some(e,t){return Nl(this,"some",e,t,void 0,arguments)},splice(...e){return Uf(this,"splice",e)},toReversed(){return Ku(this).toReversed()},toSorted(e){return Ku(this).toSorted(e)},toSpliced(...e){return Ku(this).toSpliced(...e)},unshift(...e){return Uf(this,"unshift",e)},values(){return Rv(this,"values",e=>dl(this,e))}};function Rv(e,t,n){const o=Hg(e),s=o[t]();return o!==e&&!Vi(e)&&(s._next=s.next,s.next=()=>{const i=s._next();return i.done||(i.value=n(i.value)),i}),s}const pF=Array.prototype;function Nl(e,t,n,o,s,i){const r=Hg(e),l=r!==e&&!Vi(e),a=r[t];if(a!==pF[t]){const d=a.apply(e,i);return l?jr(d):d}let c=n;r!==e&&(l?c=function(d,f){return n.call(this,dl(e,d),f,e)}:n.length>2&&(c=function(d,f){return n.call(this,d,f,e)}));const u=a.call(r,c,o);return l&&s?s(u):u}function u7(e,t,n,o){const s=Hg(e),i=s!==e&&!Vi(e);let r=n,l=!1;s!==e&&(i?(l=o.length===0,r=function(c,u,d){return l&&(l=!1,c=dl(e,c)),n.call(this,c,dl(e,u),d,e)}):n.length>3&&(r=function(c,u,d){return n.call(this,c,u,d,e)}));const a=s[t](r,...o);return l?dl(e,a):a}function Pv(e,t,n){const o=In(e);Ks(o,"iterate",J1);const s=o[t](...n);return(s===-1||s===!1)&&Ug(n[0])?(n[0]=In(n[0]),o[t](...n)):s}function Uf(e,t,n=[]){gl(),wy();const o=In(e)[t].apply(e,n);return _y(),vl(),o}const hF=Eg("__proto__,__v_isRef,__isVue"),CS=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Xi));function mF(e){Xi(e)||(e=String(e));const t=In(this);return Ks(t,"has",e),t.hasOwnProperty(e)}class wS{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,o){if(n==="__v_skip")return t.__v_skip;const s=this._isReadonly,i=this._isShallow;if(n==="__v_isReactive")return!s;if(n==="__v_isReadonly")return s;if(n==="__v_isShallow")return i;if(n==="__v_raw")return o===(s?i?TS:MS:i?AS:SS).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(o)?t:void 0;const r=jt(t);if(!s){let a;if(r&&(a=fF[n]))return a;if(n==="hasOwnProperty")return mF}const l=Reflect.get(t,n,jo(t)?t:o);if((Xi(n)?CS.has(n):hF(n))||(s||Ks(t,"get",n),i))return l;if(jo(l)){const a=r&&$g(n)?l:l.value;return s&&jn(a)?S4(a):a}return jn(l)?s?S4(l):Uo(l):l}}class _S extends wS{constructor(t=!1){super(!1,t)}set(t,n,o,s){let i=t[n];const r=jt(t)&&$g(n);if(!this._isShallow){const c=Jl(i);if(!Vi(o)&&!Jl(o)&&(i=In(i),o=In(o)),!r&&jo(i)&&!jo(o))return c||(i.value=o),!0}const l=r?Number(n)e,M0=e=>Reflect.getPrototypeOf(e);function bF(e,t,n){return function(...o){const s=this.__v_raw,i=In(s),r=Ad(i),l=e==="entries"||e===Symbol.iterator&&r,a=e==="keys"&&r,c=s[e](...o),u=n?x4:t?qd:jr;return!t&&Ks(i,"iterate",a?_4:tu),Qn(Object.create(c),{next(){const{value:d,done:f}=c.next();return f?{value:d,done:f}:{value:l?[u(d[0]),u(d[1])]:u(d),done:f}}})}}function T0(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function CF(e,t){const n={get(s){const i=this.__v_raw,r=In(i),l=In(s);e||(ws(s,l)&&Ks(r,"get",s),Ks(r,"get",l));const{has:a}=M0(r),c=t?x4:e?qd:jr;if(a.call(r,s))return c(i.get(s));if(a.call(r,l))return c(i.get(l));i!==r&&i.get(s)},get size(){const s=this.__v_raw;return!e&&Ks(In(s),"iterate",tu),s.size},has(s){const i=this.__v_raw,r=In(i),l=In(s);return e||(ws(s,l)&&Ks(r,"has",s),Ks(r,"has",l)),s===l?i.has(s):i.has(s)||i.has(l)},forEach(s,i){const r=this,l=r.__v_raw,a=In(l),c=t?x4:e?qd:jr;return!e&&Ks(a,"iterate",tu),l.forEach((u,d)=>s.call(i,c(u),c(d),r))}};return Qn(n,e?{add:T0("add"),set:T0("set"),delete:T0("delete"),clear:T0("clear")}:{add(s){const i=In(this),r=M0(i),l=In(s),a=!t&&!Vi(s)&&!Jl(s)?l:s;return r.has.call(i,a)||ws(s,a)&&r.has.call(i,s)||ws(l,a)&&r.has.call(i,l)||(i.add(a),zl(i,"add",a,a)),this},set(s,i){!t&&!Vi(i)&&!Jl(i)&&(i=In(i));const r=In(this),{has:l,get:a}=M0(r);let c=l.call(r,s);c||(s=In(s),c=l.call(r,s));const u=a.call(r,s);return r.set(s,i),c?ws(i,u)&&zl(r,"set",s,i):zl(r,"add",s,i),this},delete(s){const i=In(this),{has:r,get:l}=M0(i);let a=r.call(i,s);a||(s=In(s),a=r.call(i,s)),l&&l.call(i,s);const c=i.delete(s);return a&&zl(i,"delete",s,void 0),c},clear(){const s=In(this),i=s.size!==0,r=s.clear();return i&&zl(s,"clear",void 0,void 0),r}}),["keys","values","entries",Symbol.iterator].forEach(s=>{n[s]=bF(s,e,t)}),n}function zg(e,t){const n=CF(e,t);return(o,s,i)=>s==="__v_isReactive"?!e:s==="__v_isReadonly"?e:s==="__v_raw"?o:Reflect.get(Un(n,s)&&s in o?n:o,s,i)}const wF={get:zg(!1,!1)},_F={get:zg(!1,!0)},xF={get:zg(!0,!1)},SF={get:zg(!0,!0)},SS=new WeakMap,AS=new WeakMap,MS=new WeakMap,TS=new WeakMap;function AF(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Uo(e){return Jl(e)?e:Wg(e,!1,gF,wF,SS)}function ES(e){return Wg(e,!1,yF,_F,AS)}function S4(e){return Wg(e,!0,vF,xF,MS)}function sUe(e){return Wg(e,!0,kF,SF,TS)}function Wg(e,t,n,o,s){if(!jn(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const i=s.get(e);if(i)return i;const r=AF(ZO(e));if(r===0)return e;const l=new Proxy(e,r===2?o:n);return s.set(e,l),l}function Da(e){return Jl(e)?Da(e.__v_raw):!!(e&&e.__v_isReactive)}function Jl(e){return!!(e&&e.__v_isReadonly)}function Vi(e){return!!(e&&e.__v_isShallow)}function Ug(e){return e?!!e.__v_raw:!1}function In(e){const t=e&&e.__v_raw;return t?In(t):e}function wt(e){return!Un(e,"__v_skip")&&Object.isExtensible(e)&&cS(e,"__v_skip",!0),e}const jr=e=>jn(e)?Uo(e):e,qd=e=>jn(e)?S4(e):e;function jo(e){return e?e.__v_isRef===!0:!1}function K(e){return IS(e,!1)}function Kr(e){return IS(e,!0)}function IS(e,t){return jo(e)?e:new MF(e,t)}class MF{constructor(t,n){this.dep=new Bg,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:In(t),this._value=n?t:jr(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,o=this.__v_isShallow||Vi(t)||Jl(t);t=o?t:In(t),ws(t,n)&&(this._rawValue=t,this._value=o?t:jr(t),this.dep.trigger())}}function TF(e){e.dep&&e.dep.trigger()}function p(e){return jo(e)?e.value:e}function Ah(e){return sn(e)?e():p(e)}const EF={get:(e,t,n)=>t==="__v_raw"?e:p(Reflect.get(e,t,n)),set:(e,t,n,o)=>{const s=e[t];return jo(s)&&!jo(n)?(s.value=n,!0):Reflect.set(e,t,n,o)}};function LS(e){return Da(e)?e:new Proxy(e,EF)}class IF{constructor(t){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new Bg,{get:o,set:s}=t(n.track.bind(n),n.trigger.bind(n));this._get=o,this._set=s}get value(){return this._value=this._get()}set value(t){this._set(t)}}function LF(e){return new IF(e)}function iUe(e){const t=jt(e)?new Array(e.length):{};for(const n in e)t[n]=$S(e,n);return t}class $F{constructor(t,n,o){this._object=t,this._defaultValue=o,this.__v_isRef=!0,this._value=void 0,this._key=Xi(n)?n:String(n),this._raw=In(t);let s=!0,i=t;if(!jt(t)||Xi(this._key)||!$g(this._key))do s=!Ug(i)||Vi(i);while(s&&(i=i.__v_raw));this._shallow=s}get value(){let t=this._object[this._key];return this._shallow&&(t=p(t)),this._value=t===void 0?this._defaultValue:t}set value(t){if(this._shallow&&jo(this._raw[this._key])){const n=this._object[this._key];if(jo(n)){n.value=t;return}}this._object[this._key]=t}get dep(){return dF(this._raw,this._key)}}class NF{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function rUe(e,t,n){return jo(e)?e:sn(e)?new NF(e):jn(e)&&arguments.length>1?$S(e,t,n):K(e)}function $S(e,t,n){return new $F(e,t,n)}class OF{constructor(t,n,o){this.fn=t,this.setter=n,this._value=void 0,this.dep=new Bg(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=X1-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=o}notify(){if(this.flags|=16,!(this.flags&8)&&ao!==this)return mS(this,!0),!0}get value(){const t=this.dep.track();return yS(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function FF(e,t,n=!1){let o,s;return sn(e)?o=e:(o=e.get,s=e.set),new OF(o,s,n)}const lUe={GET:"get",HAS:"has",ITERATE:"iterate"},aUe={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},E0={},im=new WeakMap;let Aa;function cUe(){return Aa}function RF(e,t=!1,n=Aa){if(n){let o=im.get(n);o||im.set(n,o=[]),o.push(e)}}function PF(e,t,n=wn){const{immediate:o,deep:s,once:i,scheduler:r,augmentJob:l,call:a}=n,c=w=>s?w:Vi(w)||s===!1||s===0?Wl(w,1):Wl(w);let u,d,f,h,m=!1,g=!1;if(jo(e)?(d=()=>e.value,m=Vi(e)):Da(e)?(d=()=>c(e),m=!0):jt(e)?(g=!0,m=e.some(w=>Da(w)||Vi(w)),d=()=>e.map(w=>{if(jo(w))return w.value;if(Da(w))return c(w);if(sn(w))return a?a(w,2):w()})):sn(e)?t?d=a?()=>a(e,2):e:d=()=>{if(f){gl();try{f()}finally{vl()}}const w=Aa;Aa=u;try{return a?a(e,3,[h]):e(h)}finally{Aa=w}}:d=kr,t&&s){const w=d,x=s===!0?1/0:s;d=()=>Wl(w(),x)}const b=Dg(),_=()=>{u.stop(),b&&b.active&&by(b.effects,u)};if(i&&t){const w=t;t=(...x)=>{const A=w(...x);return _(),A}}let v=g?new Array(e.length).fill(E0):E0;const y=w=>{if(!(!(u.flags&1)||!u.dirty&&!w))if(t){const x=u.run();if(w||s||m||(g?x.some((A,L)=>ws(A,v[L])):ws(x,v))){f&&f();const A=Aa;Aa=u;try{const L=[x,v===E0?void 0:g&&v[0]===E0?[]:v,h];v=x,a?a(t,3,L):t(...L)}finally{Aa=A}}}else u.run()};return l&&l(y),u=new om(d),u.scheduler=r?()=>r(y,!1):y,h=w=>RF(w,!1,u),f=u.onStop=()=>{const w=im.get(u);if(w){if(a)a(w,4);else for(const x of w)x();im.delete(u)}},t?o?y(!0):v=u.run():r?r(y.bind(null,!0),!0):u.run(),_.pause=u.pause.bind(u),_.resume=u.resume.bind(u),_.stop=_,_}function Wl(e,t=1/0,n){if(t<=0||!jn(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,jo(e))Wl(e.value,t,n);else if(jt(e))for(let o=0;o{Wl(o,t,n)});else if(Lg(e)){for(const o in e)Wl(e[o],t,n);for(const o of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,o)&&Wl(e[o],t,n)}return e}/** -* @vue/runtime-core v3.5.39 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/const NS=[];function DF(e){NS.push(e)}function BF(){NS.pop()}function uUe(e,t){}const dUe={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER",COMPONENT_UPDATE:15,15:"COMPONENT_UPDATE",APP_UNMOUNT_CLEANUP:16,16:"APP_UNMOUNT_CLEANUP"},HF={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function Mp(e,t,n,o){try{return o?e(...o):e()}catch(s){af(s,t,n)}}function Cr(e,t,n,o){if(sn(e)){const s=Mp(e,t,n,o);return s&&Cy(s)&&s.catch(i=>{af(i,t,n)}),s}if(jt(e)){const s=[];for(let i=0;i>>1,s=si[o],i=Q1(s);i=Q1(n)?si.push(e):si.splice(WF(t),0,e),e.flags|=1,FS()}}function FS(){rm||(rm=OS.then(RS))}function lm(e){jt(e)?Td.push(...e):Ma&&e.id===-1?Ma.splice(rd+1,0,e):e.flags&1||(Td.push(e),e.flags|=1),FS()}function d7(e,t,n=al+1){for(;nQ1(n)-Q1(o));if(Td.length=0,Ma){Ma.push(...t);return}for(Ma=t,rd=0;rde.id==null?e.flags&2?-1:1/0:e.id;function RS(e){try{for(al=0;alld.emit(s,...i)),I0=[]):typeof window<"u"&&window.HTMLElement&&!((o=(n=window.navigator)==null?void 0:n.userAgent)!=null&&o.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(i=>{PS(i,t)}),setTimeout(()=>{ld||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,I0=[])},3e3)):I0=[]}let Rs=null,jg=null;function ep(e){const t=Rs;return Rs=e,jg=e&&e.type.__scopeId||null,t}function fUe(e){jg=e}function pUe(){jg=null}const hUe=e=>be;function be(e,t=Rs,n){if(!t||e._n)return e;const o=(...s)=>{o._d&&hm(-1);const i=ep(t);let r;try{r=e(...s)}finally{ep(i),o._d&&hm(1)}return r};return o._n=!0,o._c=!0,o._d=!0,o}function An(e,t){if(Rs===null)return e;const n=Lp(Rs),o=e.dirs||(e.dirs=[]);for(let s=0;s1)return n&&sn(t)?t.call(o&&o.proxy):t}}function mUe(){return!!(rs()||nu)}const UF=Symbol.for("v-scx"),jF=()=>dn(UF);function DS(e,t){return Tp(e,null,t)}function gUe(e,t){return Tp(e,null,{flush:"post"})}function VF(e,t){return Tp(e,null,{flush:"sync"})}function Je(e,t,n){return Tp(e,t,n)}function Tp(e,t,n=wn){const{immediate:o,deep:s,flush:i,once:r}=n,l=Qn({},n),a=t&&o||!t&&i!=="post";let c;if(cu){if(i==="sync"){const h=jF();c=h.__watcherHandles||(h.__watcherHandles=[])}else if(!a){const h=()=>{};return h.stop=kr,h.resume=kr,h.pause=kr,h}}const u=Fs;l.call=(h,m,g)=>Cr(h,u,m,g);let d=!1;i==="post"?l.scheduler=h=>{Jo(h,u&&u.suspense)}:i!=="sync"&&(d=!0,l.scheduler=(h,m)=>{m?h():Sy(h)}),l.augmentJob=h=>{t&&(h.flags|=4),d&&(h.flags|=2,u&&(h.id=u.uid,h.i=u))};const f=PF(e,t,l);return cu&&(c?c.push(f):a&&f()),f}function qF(e,t,n){const o=this.proxy,s=oo(e)?e.includes(".")?BS(o,e):()=>o[e]:e.bind(o,o);let i;sn(t)?i=t:(i=t.handler,n=t);const r=uf(this),l=Tp(s,i.bind(o),n);return r(),l}function BS(e,t){const n=t.split(".");return()=>{let o=e;for(let s=0;se.__isTeleport,Wc=e=>e&&(e.disabled||e.disabled===""),KF=e=>e&&(e.defer||e.defer===""),f7=e=>typeof SVGElement<"u"&&e instanceof SVGElement,p7=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,A4=(e,t)=>{const n=e&&e.to;return oo(n)?t?t(n):null:n},ZF={name:"Teleport",__isTeleport:!0,process(e,t,n,o,s,i,r,l,a,c){const{mc:u,pc:d,pbc:f,o:{insert:h,querySelector:m,createText:g,createComment:b,parentNode:_}}=c,v=Wc(t.props);let{dynamicChildren:y}=t;const w=(L,S,T)=>{L.shapeFlag&16&&u(L.children,S,T,s,i,r,l,a)},x=(L=t)=>{const S=Wc(L.props),T=L.target=A4(L.props,m),R=M4(T,L,g,h);T&&(r!=="svg"&&f7(T)?r="svg":r!=="mathml"&&p7(T)&&(r="mathml"),s&&s.isCE&&(s.ce._teleportTargets||(s.ce._teleportTargets=new Set)).add(T),S||(w(L,T,R),r1(L,!1)))},A=L=>{const S=()=>{if(Ca.get(L)===S){if(Ca.delete(L),Wc(L.props)){const T=_(L.el)||n;w(L,T,L.anchor),r1(L,!0)}x(L)}};Ca.set(L,S),Jo(S,i)};if(e==null){const L=t.el=g(""),S=t.anchor=g("");if(h(L,n,o),h(S,n,o),KF(t.props)||i&&i.pendingBranch){A(t);return}v&&(w(t,n,S),r1(t,!0)),x()}else{t.el=e.el;const L=t.anchor=e.anchor,S=Ca.get(e);if(S){S.flags|=8,Ca.delete(e),A(t);return}t.targetStart=e.targetStart;const T=t.target=e.target,R=t.targetAnchor=e.targetAnchor,B=Wc(e.props),I=B?n:T,$=B?L:R;if(r==="svg"||f7(T)?r="svg":(r==="mathml"||p7(T))&&(r="mathml"),y?(f(e.dynamicChildren,y,I,s,i,r,l),Fy(e,t,!0)):a||d(e,t,I,$,s,i,r,l,!1),v)B?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):L0(t,n,L,c,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const D=A4(t.props,m);D&&(t.target=D,L0(t,D,null,c,0))}else B&&L0(t,T,R,c,1);r1(t,v)}},remove(e,t,n,{um:o,o:{remove:s}},i){const{shapeFlag:r,children:l,anchor:a,targetStart:c,targetAnchor:u,target:d,props:f}=e,h=Wc(f),m=i||!h,g=Ca.get(e);if(g&&(g.flags|=8,Ca.delete(e)),d&&(s(c),s(u)),i&&s(a),!g&&(h||d)&&r&16)for(let b=0;b{e.isMounted=!0}),Dn(()=>{e.isUnmounting=!0}),e}const ar=[Function,Array],US={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:ar,onEnter:ar,onAfterEnter:ar,onEnterCancelled:ar,onBeforeLeave:ar,onLeave:ar,onAfterLeave:ar,onLeaveCancelled:ar,onBeforeAppear:ar,onAppear:ar,onAfterAppear:ar,onAppearCancelled:ar},jS=e=>{const t=e.subTree;return t.component?jS(t.component):t},YF={name:"BaseTransition",props:US,setup(e,{slots:t}){const n=rs(),o=WS();return()=>{const s=t.default&&Ay(t.default(),!0),i=s&&s.length?VS(s):n.subTree?te():void 0;if(!i)return;const r=In(e),{mode:l}=r;if(o.isLeaving)return Dv(i);const a=h7(i);if(!a)return Dv(i);let c=tp(a,r,o,n,d=>c=d);a.type!==ts&&ja(a,c);let u=n.subTree&&h7(n.subTree);if(u&&u.type!==ts&&!Rr(u,a)&&jS(n).type!==ts){let d=tp(u,r,o,n);if(ja(u,d),l==="out-in"&&a.type!==ts)return o.isLeaving=!0,d.afterLeave=()=>{o.isLeaving=!1,n.job.flags&8||n.update(),delete d.afterLeave,u=void 0},Dv(i);l==="in-out"&&a.type!==ts?d.delayLeave=(f,h,m)=>{const g=qS(o,u);g[String(u.key)]=u,f[mr]=()=>{h(),f[mr]=void 0,delete c.delayedLeave,u=void 0},c.delayedLeave=()=>{m(),delete c.delayedLeave,u=void 0}}:u=void 0}else u&&(u=void 0);return i}}};function VS(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==ts){t=n;break}}return t}const XF=YF;function qS(e,t){const{leavingVNodes:n}=e;let o=n.get(t.type);return o||(o=Object.create(null),n.set(t.type,o)),o}function tp(e,t,n,o,s){const{appear:i,mode:r,persisted:l=!1,onBeforeEnter:a,onEnter:c,onAfterEnter:u,onEnterCancelled:d,onBeforeLeave:f,onLeave:h,onAfterLeave:m,onLeaveCancelled:g,onBeforeAppear:b,onAppear:_,onAfterAppear:v,onAppearCancelled:y}=t,w=String(e.key),x=qS(n,e),A=(T,R)=>{T&&Cr(T,o,9,R)},L=(T,R)=>{const B=R[1];A(T,R),jt(T)?T.every(I=>I.length<=1)&&B():T.length<=1&&B()},S={mode:r,persisted:l,beforeEnter(T){let R=a;if(!n.isMounted)if(i)R=b||a;else return;T[mr]&&T[mr](!0);const B=x[w];B&&Rr(e,B)&&B.el[mr]&&B.el[mr](),A(R,[T])},enter(T){if(x[w]===e)return;let R=c,B=u,I=d;if(!n.isMounted)if(i)R=_||c,B=v||u,I=y||d;else return;let $=!1;T[jf]=H=>{$||($=!0,H?A(I,[T]):A(B,[T]),S.delayedLeave&&S.delayedLeave(),T[jf]=void 0)};const D=T[jf].bind(null,!1);R?L(R,[T,D]):D()},leave(T,R){const B=String(e.key);if(T[jf]&&T[jf](!0),n.isUnmounting)return R();A(f,[T]);let I=!1;T[mr]=D=>{I||(I=!0,R(),D?A(g,[T]):A(m,[T]),T[mr]=void 0,x[B]===e&&delete x[B])};const $=T[mr].bind(null,!1);x[B]=e,h?L(h,[T,$]):$()},clone(T){const R=tp(T,t,n,o,s);return s&&s(R),R}};return S}function Dv(e){if(Ep(e))return e=Ql(e),e.children=null,e}function h7(e){if(!Ep(e))return zS(e.type)&&e.children?VS(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&sn(n.default))return n.default()}}function ja(e,t){e.shapeFlag&6&&e.component?(e.transition=t,ja(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Ay(e,t=!1,n){let o=[],s=0;for(let i=0;i1)for(let i=0;in.value,set:i=>n.value=i})}return n}function m7(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const cm=new WeakMap;function Ed(e,t,n,o,s=!1){if(jt(e)){e.forEach((g,b)=>Ed(g,t&&(jt(t)?t[b]:t),n,o,s));return}if(Gl(o)&&!s){o.shapeFlag&512&&o.type.__asyncResolved&&o.component.subTree.component&&Ed(e,t,n,o.component.subTree);return}const i=o.shapeFlag&4?Lp(o.component):o.el,r=s?null:i,{i:l,r:a}=e,c=t&&t.r,u=l.refs===wn?l.refs={}:l.refs,d=l.setupState,f=In(d),h=d===wn?lS:g=>m7(u,g)?!1:Un(f,g),m=(g,b)=>!(b&&m7(u,b));if(c!=null&&c!==a){if(g7(t),oo(c))u[c]=null,h(c)&&(d[c]=null);else if(jo(c)){const g=t;m(c,g.k)&&(c.value=null),g.k&&(u[g.k]=null)}}if(sn(a)){gl();try{Mp(a,l,12,[r,u])}finally{vl()}}else{const g=oo(a),b=jo(a);if(g||b){const _=()=>{if(e.f){const v=g?h(a)?d[a]:u[a]:m()||!e.k?a.value:u[e.k];if(s)jt(v)&&by(v,i);else if(jt(v))v.includes(i)||v.push(i);else if(g)u[a]=[i],h(a)&&(d[a]=u[a]);else{const y=[i];m(a,e.k)&&(a.value=y),e.k&&(u[e.k]=y)}}else g?(u[a]=r,h(a)&&(d[a]=r)):b&&(m(a,e.k)&&(a.value=r),e.k&&(u[e.k]=r))};if(r){const v=()=>{_(),cm.delete(e)};v.id=-1,cm.set(e,v),Jo(v,n)}else g7(e),_()}}}function g7(e){const t=cm.get(e);t&&(t.flags|=8,cm.delete(e))}let v7=!1;const Zu=()=>{v7||(console.error("Hydration completed but contains mismatches."),v7=!0)},QF=e=>e.namespaceURI.includes("svg")&&e.tagName!=="foreignObject",eR=e=>e.namespaceURI.includes("MathML"),$0=e=>{if(e.nodeType===1){if(QF(e))return"svg";if(eR(e))return"mathml"}},hd=e=>e.nodeType===8;function tR(e){const{mt:t,p:n,o:{patchProp:o,createText:s,nextSibling:i,parentNode:r,remove:l,insert:a,createComment:c}}=e,u=(y,w)=>{if(!w.hasChildNodes()){n(null,y,w),am(),w._vnode=y;return}d(w.firstChild,y,null,null,null),am(),w._vnode=y},d=(y,w,x,A,L,S=!1)=>{S=S||!!w.dynamicChildren;const T=hd(y)&&y.data==="[",R=()=>g(y,w,x,A,L,T),{type:B,ref:I,shapeFlag:$,patchFlag:D}=w;let H=y.nodeType;w.el=y,D===-2&&(S=!1,w.dynamicChildren=null);let O=null;switch(B){case Ba:H!==3?w.children===""?(a(w.el=s(""),r(y),y),O=y):O=R():(y.data!==w.children&&(Zu(),y.data=w.children),O=i(y));break;case ts:v(y)?(O=i(y),_(w.el=y.content.firstChild,y,x)):H!==8||T?O=R():O=i(y);break;case Ld:if(T&&(y=i(y),H=y.nodeType),H===1||H===3){O=y;const P=!w.children.length;for(let z=0;z{S=S||!!w.dynamicChildren;const{type:T,dynamicProps:R,props:B,patchFlag:I,shapeFlag:$,dirs:D,transition:H}=w,O=T==="input"||T==="option",P=!!R;if(O||P||I!==-1){D&&ul(w,null,x,"created");let z=!1;if(v(y)){z=fA(null,H)&&x&&x.vnode.props&&x.vnode.props.appear;const U=y.content.firstChild;if(z){const G=U.getAttribute("class");G&&(U.$cls=G),H.beforeEnter(U)}_(U,y,x),w.el=y=U}if($&16&&!(B&&(B.innerHTML||B.textContent))){let U=h(y.firstChild,w,y,x,A,L,S);for(U&&!Mh(y,1)&&Zu();U;){const G=U;U=U.nextSibling,l(G)}}else if($&8){let U=w.children;U[0]===` -`&&(y.tagName==="PRE"||y.tagName==="TEXTAREA")&&(U=U.slice(1));const{textContent:G}=y;G!==U&&G!==U.replace(/\r\n|\r/g,` -`)&&(Mh(y,0)||Zu(),y.textContent=w.children)}if(B){if(O||P||!S||I&48){const U=y.tagName.includes("-");for(const G in B)(O&&(G.endsWith("value")||G==="indeterminate")||Ap(G)&&!eu(G)||G[0]==="."||U&&!eu(G)||R&&R.includes(G))&&o(y,G,null,B[G],void 0,x)}else if(B.onClick)o(y,"onClick",null,B.onClick,void 0,x);else if(I&4&&Da(B.style))for(const U in B.style)B.style[U]}let W;(W=B&&B.onVnodeBeforeMount)&&wi(W,x,w),D&&ul(w,null,x,"beforeMount"),((W=B&&B.onVnodeMounted)||D||z)&&gA(()=>{W&&wi(W,x,w),z&&H.enter(y),D&&ul(w,null,x,"mounted")},A)}return y.nextSibling},h=(y,w,x,A,L,S,T)=>{T=T||!!w.dynamicChildren;const R=w.children,B=R.length;let I=!1;for(let $=0;${const{slotScopeIds:T}=w;T&&(L=L?L.concat(T):T);const R=r(y),B=h(i(y),w,R,x,A,L,S);return B&&hd(B)&&B.data==="]"?i(w.anchor=B):(Zu(),a(w.anchor=c("]"),R,B),B)},g=(y,w,x,A,L,S)=>{if(oR(y,w)||Zu(),w.el=null,S){const B=b(y);for(;;){const I=i(y);if(I&&I!==B)l(I);else break}}const T=i(y),R=r(y);return l(y),n(null,w,R,T,x,A,$0(R),L),x&&(x.vnode.el=w.el,Kg(x,w.el)),T},b=(y,w="[",x="]")=>{let A=0;for(;y;)if(y=i(y),y&&hd(y)&&(y.data===w&&A++,y.data===x)){if(A===0)return i(y);A--}return y},_=(y,w,x)=>{const A=w.parentNode;A&&A.replaceChild(y,w);let L=x;for(;L;)L.vnode.el===w&&(L.vnode.el=L.subTree.el=y),L=L.parent},v=y=>y.nodeType===1&&y.tagName==="TEMPLATE";return[u,d]}const um="data-allow-mismatch",nR={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function Mh(e,t){if(t===0||t===1)for(;e&&!e.hasAttribute(um);)e=e.parentElement;return Ty(e&&e.getAttribute(um),t)}function Ty(e,t){if(e==null)return!1;if(e==="")return!0;{const n=e.split(",");return t===0&&n.includes("children")?!0:n.includes(nR[t])}}function oR(e,t){return Mh(e.parentElement,1)||sR(e)||iR(t)}function sR(e){return e.nodeType===1&&Ty(e.getAttribute(um),1)}function iR({props:e}){const t=e&&e[um];return typeof t=="string"&&Ty(t,1)}const rR=Rg().requestIdleCallback||(e=>setTimeout(e,1)),lR=Rg().cancelIdleCallback||(e=>clearTimeout(e)),yUe=(e=1e4)=>t=>{const n=rR(t,{timeout:e});return()=>lR(n)};function aR(e){const{top:t,left:n,bottom:o,right:s}=e.getBoundingClientRect(),{innerHeight:i,innerWidth:r}=window;return(t>0&&t0&&o0&&n0&&s(t,n)=>{const o=new IntersectionObserver(s=>{for(const i of s)if(i.isIntersecting){o.disconnect(),t();break}},e);return n(s=>{if(s instanceof Element){if(aR(s))return t(),o.disconnect(),!1;o.observe(s)}}),()=>o.disconnect()},bUe=e=>t=>{if(e){const n=matchMedia(e);if(n.matches)t();else return n.addEventListener("change",t,{once:!0}),()=>n.removeEventListener("change",t)}},CUe=(e=[])=>(t,n)=>{oo(e)&&(e=[e]);let o=!1;const s=r=>{o||(o=!0,i(),t(),r.target.dispatchEvent(new r.constructor(r.type,r)))},i=()=>{n(r=>{for(const l of e)r.removeEventListener(l,s)})};return n(r=>{for(const l of e)r.addEventListener(l,s,{once:!0})}),i};function cR(e,t){if(hd(e)&&e.data==="["){let n=1,o=e.nextSibling;for(;o;){if(o.nodeType===1){if(t(o)===!1)break}else if(hd(o))if(o.data==="]"){if(--n===0)break}else o.data==="["&&n++;o=o.nextSibling}}else t(e)}const Gl=e=>!!e.type.__asyncLoader;function Dr(e){sn(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:o,delay:s=200,hydrate:i,timeout:r,suspensible:l=!0,onError:a}=e;let c=null,u,d=0;const f=()=>(d++,c=null,h()),h=()=>{let m;return c||(m=c=t().catch(g=>{if(g=g instanceof Error?g:new Error(String(g)),a)return new Promise((b,_)=>{a(g,()=>b(f()),()=>_(g),d+1)});throw g}).then(g=>m!==c&&c?c:(g&&(g.__esModule||g[Symbol.toStringTag]==="Module")&&(g=g.default),u=g,g)))};return et({name:"AsyncComponentWrapper",__asyncLoader:h,__asyncHydrate(m,g,b){let _=!1;(g.bu||(g.bu=[])).push(()=>_=!0);const v=()=>{_||b()},y=i?()=>{const w=i(v,x=>cR(m,x));w&&(g.bum||(g.bum=[])).push(w)}:v;u?y():h().then(()=>!g.isUnmounted&&y())},get __asyncResolved(){return u},setup(){const m=Fs;if(My(m),u)return()=>N0(u,m);const g=x=>{c=null,af(x,m,13,!o)};if(l&&m.suspense||cu)return h().then(x=>()=>N0(x,m)).catch(x=>(g(x),()=>o?q(o,{error:x}):null));const b=K(!1),_=K(),v=K(!!s);let y,w;return kn(()=>{y!=null&&clearTimeout(y),w!=null&&clearTimeout(w)}),s&&(w=setTimeout(()=>{m.isUnmounted||(v.value=!1)},s)),r!=null&&(y=setTimeout(()=>{if(!m.isUnmounted&&!b.value&&!_.value){const x=new Error(`Async component timed out after ${r}ms.`);g(x),_.value=x}},r)),h().then(()=>{m.isUnmounted||(b.value=!0,m.parent&&Ep(m.parent.vnode)&&m.parent.update())}).catch(x=>{if(m.isUnmounted){c=null;return}g(x),_.value=x}),()=>{if(b.value&&u)return N0(u,m);if(_.value&&o)return q(o,{error:_.value});if(n&&!v.value)return N0(n,m)}}})}function N0(e,t){const{ref:n,props:o,children:s,ce:i}=t.vnode,r=q(e,o,s);return r.ref=n,r.ce=i,delete t.vnode.ce,r}const Ep=e=>e.type.__isKeepAlive,uR={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=rs(),o=n.ctx;if(!o.renderer)return()=>{const v=t.default&&t.default();return v&&v.length===1?v[0]:v};const s=new Map,i=new Set;let r=null;const l=n.suspense,{renderer:{p:a,m:c,um:u,o:{createElement:d}}}=o,f=d("div");o.activate=(v,y,w,x,A)=>{const L=v.component;c(v,y,w,0,l),a(L.vnode,v,y,w,L,l,x,v.slotScopeIds,A),Jo(()=>{L.isDeactivated=!1,L.a&&Md(L.a);const S=v.props&&v.props.onVnodeMounted;S&&wi(S,L.parent,v)},l)},o.deactivate=v=>{const y=v.component;fm(y.m),fm(y.a),c(v,f,null,1,l),Jo(()=>{y.da&&Md(y.da);const w=v.props&&v.props.onVnodeUnmounted;w&&wi(w,y.parent,v),y.isDeactivated=!0},l)};function h(v){Bv(v),u(v,n,l,!0)}function m(v){s.forEach((y,w)=>{const x=R4(Gl(y)?y.type.__asyncResolved||{}:y.type);x&&!v(x)&&g(w)})}function g(v){const y=s.get(v);y&&(!r||!Rr(y,r))?h(y):r&&Bv(r),s.delete(v),i.delete(v)}Je(()=>[e.include,e.exclude],([v,y])=>{v&&m(w=>l1(v,w)),y&&m(w=>!l1(y,w))},{flush:"post",deep:!0});let b=null;const _=()=>{b!=null&&(pm(n.subTree.type)?Jo(()=>{s.set(b,O0(n.subTree))},n.subTree.suspense):s.set(b,O0(n.subTree)))};return cn(_),Ip(_),Dn(()=>{s.forEach(v=>{const{subTree:y,suspense:w}=n,x=O0(y);if(v.type===x.type&&v.key===x.key){Bv(x);const A=x.component.da;A&&Jo(A,w);return}h(v)})}),()=>{if(b=null,!t.default)return r=null;const v=t.default(),y=v[0];if(v.length>1)return r=null,v;if(!Va(y)||!(y.shapeFlag&4)&&!(y.shapeFlag&128))return r=null,y;let w=O0(y);if(w.type===ts)return r=null,w;const x=w.type,A=R4(Gl(w)?w.type.__asyncResolved||{}:x),{include:L,exclude:S,max:T}=e;if(L&&(!A||!l1(L,A))||S&&A&&l1(S,A))return w.shapeFlag&=-257,r=w,y;const R=w.key==null?x:w.key,B=s.get(R);return w.el&&(w=Ql(w),y.shapeFlag&128&&(y.ssContent=w)),b=R,B?(w.el=B.el,w.component=B.component,w.transition&&ja(w,w.transition),w.shapeFlag|=512,i.delete(R),i.add(R)):(i.add(R),T&&i.size>parseInt(T,10)&&g(i.values().next().value)),w.shapeFlag|=256,r=w,pm(y.type)?y:w}}},wUe=uR;function l1(e,t){return jt(e)?e.some(n=>l1(n,t)):oo(e)?e.split(",").includes(t):KO(e)?(e.lastIndex=0,e.test(t)):!1}function dR(e,t){KS(e,"a",t)}function fR(e,t){KS(e,"da",t)}function KS(e,t,n=Fs){const o=e.__wdc||(e.__wdc=()=>{let s=n;for(;s;){if(s.isDeactivated)return;s=s.parent}return e()});if(Vg(t,o,n),n){let s=n.parent;for(;s&&s.parent;)Ep(s.parent.vnode)&&pR(o,t,n,s),s=s.parent}}function pR(e,t,n,o){const s=Vg(t,e,o,!0);kn(()=>{by(o[t],s)},n)}function Bv(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function O0(e){return e.shapeFlag&128?e.ssContent:e}function Vg(e,t,n=Fs,o=!1){if(n){const s=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...r)=>{gl();const l=uf(n),a=Cr(t,n,e,r);return l(),vl(),a});return o?s.unshift(i):s.push(i),i}}const oa=e=>(t,n=Fs)=>{(!cu||e==="sp")&&Vg(e,(...o)=>t(...o),n)},hR=oa("bm"),cn=oa("m"),ZS=oa("bu"),Ip=oa("u"),Dn=oa("bum"),kn=oa("um"),mR=oa("sp"),gR=oa("rtg"),vR=oa("rtc");function yR(e,t=Fs){Vg("ec",e,t)}const Ey="components",kR="directives";function bR(e,t){return Iy(Ey,e,!0,t)||e}const GS=Symbol.for("v-ndc");function fs(e){return oo(e)?Iy(Ey,e,!1)||e:e||GS}function _Ue(e){return Iy(kR,e)}function Iy(e,t,n=!0,o=!1){const s=Rs||Fs;if(s){const i=s.type;if(e===Ey){const l=R4(i,!1);if(l&&(l===t||l===ms(t)||l===Og(ms(t))))return i}const r=y7(s[e]||i[e],t)||y7(s.appContext[e],t);return!r&&o?i:r}}function y7(e,t){return e&&(e[t]||e[ms(t)]||e[Og(ms(t))])}function vt(e,t,n,o){let s;const i=n&&n[o],r=jt(e);if(r||oo(e)){const l=r&&Da(e);let a=!1,c=!1;l&&(a=!Vi(e),c=Jl(e),e=Hg(e)),s=new Array(e.length);for(let u=0,d=e.length;ut(l,a,void 0,i&&i[a]));else{const l=Object.keys(e);s=new Array(l.length);for(let a=0,c=l.length;a{const i=o.fn(...s);return i&&(i.key=o.key),i}:o.fn)}return e}function Cn(e,t,n={},o,s){if(Rs.ce||Rs.parent&&Gl(Rs.parent)&&Rs.parent.ce){const c=Object.keys(n).length>0;return t!=="default"&&(n.name=t),k(),me(De,null,[q("slot",n,o&&o())],c?-2:64)}let i=e[t];i&&i._c&&(i._d=!1),k();const r=i&&Ly(i(n)),l=n.key||r&&r.key,a=me(De,{key:(l&&!Xi(l)?l:`_${t}`)+(!r&&o?"_fb":"")},r||(o?o():[]),r&&e._===1?64:-2);return!s&&a.scopeId&&(a.slotScopeIds=[a.scopeId+"-s"]),i&&i._c&&(i._d=!0),a}function Ly(e){return e.some(t=>Va(t)?!(t.type===ts||t.type===De&&!Ly(t.children)):!0)?e:null}function xUe(e,t){const n={};for(const o in e)n[t&&/[A-Z]/.test(o)?`on:${o}`:Sh(o)]=e[o];return n}const T4=e=>e?wA(e)?Lp(e):T4(e.parent):null,M1=Qn(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>T4(e.parent),$root:e=>T4(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>$y(e),$forceUpdate:e=>e.f||(e.f=()=>{Sy(e.update)}),$nextTick:e=>e.n||(e.n=bt.bind(e.proxy)),$watch:e=>qF.bind(e)}),Hv=(e,t)=>e!==wn&&!e.__isScriptSetup&&Un(e,t),E4={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:o,data:s,props:i,accessCache:r,type:l,appContext:a}=e;if(t[0]!=="$"){const f=r[t];if(f!==void 0)switch(f){case 1:return o[t];case 2:return s[t];case 4:return n[t];case 3:return i[t]}else{if(Hv(o,t))return r[t]=1,o[t];if(s!==wn&&Un(s,t))return r[t]=2,s[t];if(Un(i,t))return r[t]=3,i[t];if(n!==wn&&Un(n,t))return r[t]=4,n[t];I4&&(r[t]=0)}}const c=M1[t];let u,d;if(c)return t==="$attrs"&&Ks(e.attrs,"get",""),c(e);if((u=l.__cssModules)&&(u=u[t]))return u;if(n!==wn&&Un(n,t))return r[t]=4,n[t];if(d=a.config.globalProperties,Un(d,t))return d[t]},set({_:e},t,n){const{data:o,setupState:s,ctx:i}=e;return Hv(s,t)?(s[t]=n,!0):o!==wn&&Un(o,t)?(o[t]=n,!0):Un(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:o,appContext:s,props:i,type:r}},l){let a;return!!(n[l]||e!==wn&&l[0]!=="$"&&Un(e,l)||Hv(t,l)||Un(i,l)||Un(o,l)||Un(M1,l)||Un(s.config.globalProperties,l)||(a=r.__cssModules)&&a[l])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Un(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}},CR=Qn({},E4,{get(e,t){if(t!==Symbol.unscopables)return E4.get(e,t,e)},has(e,t){return t[0]!=="_"&&!JO(t)}});function SUe(){return null}function AUe(){return null}function MUe(e){}function TUe(e){}function EUe(){return null}function IUe(){}function LUe(e,t){return null}function $Ue(){return XS().slots}function cf(){return XS().attrs}function XS(e){const t=rs();return t.setupContext||(t.setupContext=SA(t))}function np(e){return jt(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function NUe(e,t){const n=np(e);for(const o in t){if(o.startsWith("__skip"))continue;let s=n[o];s?jt(s)||sn(s)?s=n[o]={type:s,default:t[o]}:s.default=t[o]:s===null&&(s=n[o]={default:t[o]}),s&&t[`__skip_${o}`]&&(s.skipFactory=!0)}return n}function OUe(e,t){return!e||!t?e||t:jt(e)&&jt(t)?e.concat(t):Qn({},np(e),np(t))}function FUe(e,t){const n={};for(const o in e)t.includes(o)||Object.defineProperty(n,o,{enumerable:!0,get:()=>e[o]});return n}function RUe(e){const t=rs(),n=cu;let o=e();sp(),n&&$d(!1);const s=()=>{uf(t),n&&$d(!0)},i=()=>{rs()!==t&&t.scope.off(),sp(),n&&$d(!1)};return Cy(o)&&(o=o.catch(r=>{throw s(),Promise.resolve().then(()=>Promise.resolve().then(i)),r})),[o,()=>{s(),Promise.resolve().then(i)}]}let I4=!0;function wR(e){const t=$y(e),n=e.proxy,o=e.ctx;I4=!1,t.beforeCreate&&k7(t.beforeCreate,e,"bc");const{data:s,computed:i,methods:r,watch:l,provide:a,inject:c,created:u,beforeMount:d,mounted:f,beforeUpdate:h,updated:m,activated:g,deactivated:b,beforeDestroy:_,beforeUnmount:v,destroyed:y,unmounted:w,render:x,renderTracked:A,renderTriggered:L,errorCaptured:S,serverPrefetch:T,expose:R,inheritAttrs:B,components:I,directives:$,filters:D}=t;if(c&&_R(c,o,null),r)for(const P in r){const z=r[P];sn(z)&&(o[P]=z.bind(n))}if(s){const P=s.call(n,n);jn(P)&&(e.data=Uo(P))}if(I4=!0,i)for(const P in i){const z=i[P],W=sn(z)?z.bind(n,n):sn(z.get)?z.get.bind(n,n):kr,U=!sn(z)&&sn(z.set)?z.set.bind(n):kr,G=F({get:W,set:U});Object.defineProperty(o,P,{enumerable:!0,configurable:!0,get:()=>G.value,set:Z=>G.value=Z})}if(l)for(const P in l)JS(l[P],o,n,P);if(a){const P=sn(a)?a.call(n):a;Reflect.ownKeys(P).forEach(z=>{Wn(z,P[z])})}u&&k7(u,e,"c");function O(P,z){jt(z)?z.forEach(W=>P(W.bind(n))):z&&P(z.bind(n))}if(O(hR,d),O(cn,f),O(ZS,h),O(Ip,m),O(dR,g),O(fR,b),O(yR,S),O(vR,A),O(gR,L),O(Dn,v),O(kn,w),O(mR,T),jt(R))if(R.length){const P=e.exposed||(e.exposed={});R.forEach(z=>{Object.defineProperty(P,z,{get:()=>n[z],set:W=>n[z]=W,enumerable:!0})})}else e.exposed||(e.exposed={});x&&e.render===kr&&(e.render=x),B!=null&&(e.inheritAttrs=B),I&&(e.components=I),$&&(e.directives=$),T&&My(e)}function _R(e,t,n=kr){jt(e)&&(e=L4(e));for(const o in e){const s=e[o];let i;jn(s)?"default"in s?i=dn(s.from||o,s.default,!0):i=dn(s.from||o):i=dn(s),jo(i)?Object.defineProperty(t,o,{enumerable:!0,configurable:!0,get:()=>i.value,set:r=>i.value=r}):t[o]=i}}function k7(e,t,n){Cr(jt(e)?e.map(o=>o.bind(t.proxy)):e.bind(t.proxy),t,n)}function JS(e,t,n,o){let s=o.includes(".")?BS(n,o):()=>n[o];if(oo(e)){const i=t[e];sn(i)&&Je(s,i)}else if(sn(e))Je(s,e.bind(n));else if(jn(e))if(jt(e))e.forEach(i=>JS(i,t,n,o));else{const i=sn(e.handler)?e.handler.bind(n):t[e.handler];sn(i)&&Je(s,i,e)}}function $y(e){const t=e.type,{mixins:n,extends:o}=t,{mixins:s,optionsCache:i,config:{optionMergeStrategies:r}}=e.appContext,l=i.get(t);let a;return l?a=l:!s.length&&!n&&!o?a=t:(a={},s.length&&s.forEach(c=>dm(a,c,r,!0)),dm(a,t,r)),jn(t)&&i.set(t,a),a}function dm(e,t,n,o=!1){const{mixins:s,extends:i}=t;i&&dm(e,i,n,!0),s&&s.forEach(r=>dm(e,r,n,!0));for(const r in t)if(!(o&&r==="expose")){const l=xR[r]||n&&n[r];e[r]=l?l(e[r],t[r]):t[r]}return e}const xR={data:b7,props:C7,emits:C7,methods:a1,computed:a1,beforeCreate:ti,created:ti,beforeMount:ti,mounted:ti,beforeUpdate:ti,updated:ti,beforeDestroy:ti,beforeUnmount:ti,destroyed:ti,unmounted:ti,activated:ti,deactivated:ti,errorCaptured:ti,serverPrefetch:ti,components:a1,directives:a1,watch:AR,provide:b7,inject:SR};function b7(e,t){return t?e?function(){return Qn(sn(e)?e.call(this,this):e,sn(t)?t.call(this,this):t)}:t:e}function SR(e,t){return a1(L4(e),L4(t))}function L4(e){if(jt(e)){const t={};for(let n=0;n{let u,d=wn,f;return VF(()=>{const h=e[s];ws(u,h)&&(u=h,c())}),{get(){return a(),n.get?n.get(u):u},set(h){const m=n.set?n.set(h):h;if(!ws(m,u)&&!(d!==wn&&ws(h,d)))return;const g=o.vnode.props,b=!!(g&&(t in g||s in g||i in g)&&(`onUpdate:${t}`in g||`onUpdate:${s}`in g||`onUpdate:${i}`in g));b||(u=h,c()),o.emit(`update:${t}`,m),ws(h,d)&&(ws(h,m)&&!ws(m,f)||b&&d!==wn&&!ws(m,u))&&c(),d=h,f=m}}});return l[Symbol.iterator]=()=>{let a=0;return{next(){return a<2?{value:a++?r||wn:l,done:!1}:{done:!0}}}},l}const eA=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${ms(t)}Modifiers`]||e[`${Mi(t)}Modifiers`];function ER(e,t,...n){if(e.isUnmounted)return;const o=e.vnode.props||wn;let s=n;const i=t.startsWith("update:"),r=i&&eA(o,t.slice(7));r&&(r.trim&&(s=n.map(u=>oo(u)?u.trim():u)),r.number&&(s=n.map(Fg)));let l,a=o[l=Sh(t)]||o[l=Sh(ms(t))];!a&&i&&(a=o[l=Sh(Mi(t))]),a&&Cr(a,e,6,s);const c=o[l+"Once"];if(c){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,Cr(c,e,6,s)}}const IR=new WeakMap;function tA(e,t,n=!1){const o=n?IR:t.emitsCache,s=o.get(e);if(s!==void 0)return s;const i=e.emits;let r={},l=!1;if(!sn(e)){const a=c=>{const u=tA(c,t,!0);u&&(l=!0,Qn(r,u))};!n&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}return!i&&!l?(jn(e)&&o.set(e,null),null):(jt(i)?i.forEach(a=>r[a]=null):Qn(r,i),jn(e)&&o.set(e,r),r)}function qg(e,t){return!e||!Ap(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),Un(e,t[0].toLowerCase()+t.slice(1))||Un(e,Mi(t))||Un(e,t))}function Th(e){const{type:t,vnode:n,proxy:o,withProxy:s,propsOptions:[i],slots:r,attrs:l,emit:a,render:c,renderCache:u,props:d,data:f,setupState:h,ctx:m,inheritAttrs:g}=e,b=ep(e);let _,v;try{if(n.shapeFlag&4){const w=s||o,x=w;_=Ai(c.call(x,w,u,d,h,f,m)),v=l}else{const w=t;_=Ai(w.length>1?w(d,{attrs:l,slots:r,emit:a}):w(d,null)),v=t.props?l:$R(l)}}catch(w){T1.length=0,af(w,e,1),_=q(ts)}let y=_;if(v&&g!==!1){const w=Object.keys(v),{shapeFlag:x}=y;w.length&&x&7&&(i&&w.some(Ig)&&(v=NR(v,i)),y=Ql(y,v,!1,!0))}return n.dirs&&(y=Ql(y,null,!1,!0),y.dirs=y.dirs?y.dirs.concat(n.dirs):n.dirs),n.transition&&ja(y,n.transition),_=y,ep(b),_}function LR(e,t=!0){let n;for(let o=0;o{let t;for(const n in e)(n==="class"||n==="style"||Ap(n))&&((t||(t={}))[n]=e[n]);return t},NR=(e,t)=>{const n={};for(const o in e)(!Ig(o)||!(o.slice(9)in t))&&(n[o]=e[o]);return n};function OR(e,t,n){const{props:o,children:s,component:i}=e,{props:r,children:l,patchFlag:a}=t,c=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&a>=0){if(a&1024)return!0;if(a&16)return o?w7(o,r,c):!!r;if(a&8){const u=t.dynamicProps;for(let d=0;dObject.create(oA),iA=e=>Object.getPrototypeOf(e)===oA;function FR(e,t,n,o=!1){const s={},i=sA();e.propsDefaults=Object.create(null),rA(e,t,s,i);for(const r in e.propsOptions[0])r in s||(s[r]=void 0);n?e.props=o?s:ES(s):e.type.props?e.props=s:e.props=i,e.attrs=i}function RR(e,t,n,o){const{props:s,attrs:i,vnode:{patchFlag:r}}=e,l=In(s),[a]=e.propsOptions;let c=!1;if((o||r>0)&&!(r&16)){if(r&8){const u=e.vnode.dynamicProps;for(let d=0;d{a=!0;const[f,h]=lA(d,t,!0);Qn(r,f),h&&l.push(...h)};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!i&&!a)return jn(e)&&o.set(e,Sd),Sd;if(jt(i))for(let u=0;ue==="_"||e==="_ctx"||e==="$stable",Oy=e=>jt(e)?e.map(Ai):[Ai(e)],DR=(e,t,n)=>{if(t._n)return t;const o=be((...s)=>Oy(t(...s)),n);return o._c=!1,o},aA=(e,t,n)=>{const o=e._ctx;for(const s in e){if(Ny(s))continue;const i=e[s];if(sn(i))t[s]=DR(s,i,o);else if(i!=null){const r=Oy(i);t[s]=()=>r}}},cA=(e,t)=>{const n=Oy(t);e.slots.default=()=>n},uA=(e,t,n)=>{for(const o in t)(n||!Ny(o))&&(e[o]=t[o])},BR=(e,t,n)=>{const o=e.slots=sA();if(e.vnode.shapeFlag&32){const s=t._;s?(uA(o,t,n),n&&cS(o,"_",s,!0)):aA(t,o)}else t&&cA(e,t)},HR=(e,t,n)=>{const{vnode:o,slots:s}=e;let i=!0,r=wn;if(o.shapeFlag&32){const l=t._;l?n&&l===1?i=!1:uA(s,t,n):(i=!t.$stable,aA(t,s)),r=t}else t&&(cA(e,t),r={default:1});if(i)for(const l in s)!Ny(l)&&r[l]==null&&delete s[l]},Jo=gA;function zR(e){return dA(e)}function WR(e){return dA(e,tR)}function dA(e,t){const n=Rg();n.__VUE__=!0;const{insert:o,remove:s,patchProp:i,createElement:r,createText:l,createComment:a,setText:c,setElementText:u,parentNode:d,nextSibling:f,setScopeId:h=kr,insertStaticContent:m}=e,g=(j,Y,fe,ue=null,de=null,J=null,se=void 0,ce=null,he=!!Y.dynamicChildren)=>{if(j===Y)return;j&&!Rr(j,Y)&&(ue=xe(j),Z(j,de,J,!0),j=null),Y.patchFlag===-2&&(he=!1,Y.dynamicChildren=null);const{type:Ie,ref:Ge,shapeFlag:we}=Y;switch(Ie){case Ba:b(j,Y,fe,ue);break;case ts:_(j,Y,fe,ue);break;case Ld:j==null&&v(Y,fe,ue,se);break;case De:I(j,Y,fe,ue,de,J,se,ce,he);break;default:we&1?x(j,Y,fe,ue,de,J,se,ce,he):we&6?$(j,Y,fe,ue,de,J,se,ce,he):(we&64||we&128)&&Ie.process(j,Y,fe,ue,de,J,se,ce,he,ge)}Ge!=null&&de?Ed(Ge,j&&j.ref,J,Y||j,!Y):Ge==null&&j&&j.ref!=null&&Ed(j.ref,null,J,j,!0)},b=(j,Y,fe,ue)=>{if(j==null)o(Y.el=l(Y.children),fe,ue);else{const de=Y.el=j.el;Y.children!==j.children&&c(de,Y.children)}},_=(j,Y,fe,ue)=>{j==null?o(Y.el=a(Y.children||""),fe,ue):Y.el=j.el},v=(j,Y,fe,ue)=>{[j.el,j.anchor]=m(j.children,Y,fe,ue,j.el,j.anchor)},y=({el:j,anchor:Y},fe,ue)=>{let de;for(;j&&j!==Y;)de=f(j),o(j,fe,ue),j=de;o(Y,fe,ue)},w=({el:j,anchor:Y})=>{let fe;for(;j&&j!==Y;)fe=f(j),s(j),j=fe;s(Y)},x=(j,Y,fe,ue,de,J,se,ce,he)=>{if(Y.type==="svg"?se="svg":Y.type==="math"&&(se="mathml"),j==null)A(Y,fe,ue,de,J,se,ce,he);else{const Ie=j.el&&j.el._isVueCE?j.el:null;try{Ie&&Ie._beginPatch(),T(j,Y,de,J,se,ce,he)}finally{Ie&&Ie._endPatch()}}},A=(j,Y,fe,ue,de,J,se,ce)=>{let he,Ie;const{props:Ge,shapeFlag:we,transition:Te,dirs:st}=j;if(he=j.el=r(j.type,J,Ge&&Ge.is,Ge),we&8?u(he,j.children):we&16&&S(j.children,he,null,ue,de,zv(j,J),se,ce),st&&ul(j,null,ue,"created"),L(he,j,j.scopeId,se,ue),Ge){for(const Re in Ge)Re!=="value"&&!eu(Re)&&i(he,Re,null,Ge[Re],J,ue);"value"in Ge&&i(he,"value",null,Ge.value,J),(Ie=Ge.onVnodeBeforeMount)&&wi(Ie,ue,j)}st&&ul(j,null,ue,"beforeMount");const Ne=fA(de,Te);Ne&&Te.beforeEnter(he),o(he,Y,fe),((Ie=Ge&&Ge.onVnodeMounted)||Ne||st)&&Jo(()=>{try{Ie&&wi(Ie,ue,j),Ne&&Te.enter(he),st&&ul(j,null,ue,"mounted")}finally{}},de)},L=(j,Y,fe,ue,de)=>{if(fe&&h(j,fe),ue)for(let J=0;J{for(let Ie=he;Ie{const ce=Y.el=j.el;let{patchFlag:he,dynamicChildren:Ie,dirs:Ge}=Y;he|=j.patchFlag&16;const we=j.props||wn,Te=Y.props||wn;let st;if(fe&&Sc(fe,!1),(st=Te.onVnodeBeforeUpdate)&&wi(st,fe,Y,j),Ge&&ul(Y,j,fe,"beforeUpdate"),fe&&Sc(fe,!0),Ie&&(!j.dynamicChildren||j.dynamicChildren.length!==Ie.length)&&(he=0,se=!1,Ie=null),(we.innerHTML&&Te.innerHTML==null||we.textContent&&Te.textContent==null)&&u(ce,""),Ie?R(j.dynamicChildren,Ie,ce,fe,ue,zv(Y,de),J):se||z(j,Y,ce,null,fe,ue,zv(Y,de),J,!1),he>0){if(he&16)B(ce,we,Te,fe,de);else if(he&2&&we.class!==Te.class&&i(ce,"class",null,Te.class,de),he&4&&i(ce,"style",we.style,Te.style,de),he&8){const Ne=Y.dynamicProps;for(let Re=0;Re{st&&wi(st,fe,Y,j),Ge&&ul(Y,j,fe,"updated")},ue)},R=(j,Y,fe,ue,de,J,se)=>{for(let ce=0;ce{if(Y!==fe){if(Y!==wn)for(const J in Y)!eu(J)&&!(J in fe)&&i(j,J,Y[J],null,de,ue);for(const J in fe){if(eu(J))continue;const se=fe[J],ce=Y[J];se!==ce&&J!=="value"&&i(j,J,ce,se,de,ue)}"value"in fe&&i(j,"value",Y.value,fe.value,de)}},I=(j,Y,fe,ue,de,J,se,ce,he)=>{const Ie=Y.el=j?j.el:l(""),Ge=Y.anchor=j?j.anchor:l("");let{patchFlag:we,dynamicChildren:Te,slotScopeIds:st}=Y;st&&(ce=ce?ce.concat(st):st),j==null?(o(Ie,fe,ue),o(Ge,fe,ue),S(Y.children||[],fe,Ge,de,J,se,ce,he)):we>0&&we&64&&Te&&j.dynamicChildren&&j.dynamicChildren.length===Te.length?(R(j.dynamicChildren,Te,fe,de,J,se,ce),(Y.key!=null||de&&Y===de.subTree)&&Fy(j,Y,!0)):z(j,Y,fe,Ge,de,J,se,ce,he)},$=(j,Y,fe,ue,de,J,se,ce,he)=>{Y.slotScopeIds=ce,j==null?Y.shapeFlag&512?de.ctx.activate(Y,fe,ue,se,he):D(Y,fe,ue,de,J,se,he):H(j,Y,he)},D=(j,Y,fe,ue,de,J,se)=>{const ce=j.component=CA(j,ue,de);if(Ep(j)&&(ce.ctx.renderer=ge),_A(ce,!1,se),ce.asyncDep){if(de&&de.registerDep(ce,O,se),!j.el){const he=ce.subTree=q(ts);_(null,he,Y,fe),j.placeholder=he.el}}else O(ce,j,Y,fe,de,J,se)},H=(j,Y,fe)=>{const ue=Y.component=j.component;if(OR(j,Y,fe))if(ue.asyncDep&&!ue.asyncResolved){P(ue,Y,fe);return}else ue.next=Y,ue.update();else Y.el=j.el,ue.vnode=Y},O=(j,Y,fe,ue,de,J,se)=>{const ce=()=>{if(j.isMounted){let{next:we,bu:Te,u:st,parent:Ne,vnode:Re}=j;{const He=pA(j);if(He){we&&(we.el=Re.el,P(j,we,se)),He.asyncDep.then(()=>{Jo(()=>{j.isUnmounted||Ie()},de)});return}}let Ze=we,gt;Sc(j,!1),we?(we.el=Re.el,P(j,we,se)):we=Re,Te&&Md(Te),(gt=we.props&&we.props.onVnodeBeforeUpdate)&&wi(gt,Ne,we,Re),Sc(j,!0);const Pt=Th(j),Tt=j.subTree;j.subTree=Pt,g(Tt,Pt,d(Tt.el),xe(Tt),j,de,J),we.el=Pt.el,Ze===null&&Kg(j,Pt.el),st&&Jo(st,de),(gt=we.props&&we.props.onVnodeUpdated)&&Jo(()=>wi(gt,Ne,we,Re),de)}else{let we;const{el:Te,props:st}=Y,{bm:Ne,m:Re,parent:Ze,root:gt,type:Pt}=j,Tt=Gl(Y);if(Sc(j,!1),Ne&&Md(Ne),!Tt&&(we=st&&st.onVnodeBeforeMount)&&wi(we,Ze,Y),Sc(j,!0),Te&&ae){const He=()=>{j.subTree=Th(j),ae(Te,j.subTree,j,de,null)};Tt&&Pt.__asyncHydrate?Pt.__asyncHydrate(Te,j,He):He()}else{gt.ce&>.ce._hasShadowRoot()&>.ce._injectChildStyle(Pt,j.parent?j.parent.type:void 0);const He=j.subTree=Th(j);g(null,He,fe,ue,j,de,J),Y.el=He.el}if(Re&&Jo(Re,de),!Tt&&(we=st&&st.onVnodeMounted)){const He=Y;Jo(()=>wi(we,Ze,He),de)}(Y.shapeFlag&256||Ze&&Gl(Ze.vnode)&&Ze.vnode.shapeFlag&256)&&j.a&&Jo(j.a,de),j.isMounted=!0,Y=fe=ue=null}};j.scope.on();const he=j.effect=new om(ce);j.scope.off();const Ie=j.update=he.run.bind(he),Ge=j.job=he.runIfDirty.bind(he);Ge.i=j,Ge.id=j.uid,he.scheduler=()=>Sy(Ge),Sc(j,!0),Ie()},P=(j,Y,fe)=>{Y.component=j;const ue=j.vnode.props;j.vnode=Y,j.next=null,RR(j,Y.props,ue,fe),HR(j,Y.children,fe),gl(),d7(j),vl()},z=(j,Y,fe,ue,de,J,se,ce,he=!1)=>{const Ie=j&&j.children,Ge=j?j.shapeFlag:0,we=Y.children,{patchFlag:Te,shapeFlag:st}=Y;if(Te>0){if(Te&128){U(Ie,we,fe,ue,de,J,se,ce,he);return}else if(Te&256){W(Ie,we,fe,ue,de,J,se,ce,he);return}}st&8?(Ge&16&&oe(Ie,de,J),we!==Ie&&u(fe,we)):Ge&16?st&16?U(Ie,we,fe,ue,de,J,se,ce,he):oe(Ie,de,J,!0):(Ge&8&&u(fe,""),st&16&&S(we,fe,ue,de,J,se,ce,he))},W=(j,Y,fe,ue,de,J,se,ce,he)=>{j=j||Sd,Y=Y||Sd;const Ie=j.length,Ge=Y.length,we=Math.min(Ie,Ge);let Te;for(Te=0;TeGe?oe(j,de,J,!0,!1,we):S(Y,fe,ue,de,J,se,ce,he,we)},U=(j,Y,fe,ue,de,J,se,ce,he)=>{let Ie=0;const Ge=Y.length;let we=j.length-1,Te=Ge-1;for(;Ie<=we&&Ie<=Te;){const st=j[Ie],Ne=Y[Ie]=he?Hl(Y[Ie]):Ai(Y[Ie]);if(Rr(st,Ne))g(st,Ne,fe,null,de,J,se,ce,he);else break;Ie++}for(;Ie<=we&&Ie<=Te;){const st=j[we],Ne=Y[Te]=he?Hl(Y[Te]):Ai(Y[Te]);if(Rr(st,Ne))g(st,Ne,fe,null,de,J,se,ce,he);else break;we--,Te--}if(Ie>we){if(Ie<=Te){const st=Te+1,Ne=stTe)for(;Ie<=we;)Z(j[Ie],de,J,!0),Ie++;else{const st=Ie,Ne=Ie,Re=new Map;for(Ie=Ne;Ie<=Te;Ie++){const Et=Y[Ie]=he?Hl(Y[Ie]):Ai(Y[Ie]);Et.key!=null&&Re.set(Et.key,Ie)}let Ze,gt=0;const Pt=Te-Ne+1;let Tt=!1,He=0;const tt=new Array(Pt);for(Ie=0;Ie=Pt){Z(Et,de,J,!0);continue}let ft;if(Et.key!=null)ft=Re.get(Et.key);else for(Ze=Ne;Ze<=Te;Ze++)if(tt[Ze-Ne]===0&&Rr(Et,Y[Ze])){ft=Ze;break}ft===void 0?Z(Et,de,J,!0):(tt[ft-Ne]=Ie+1,ft>=He?He=ft:Tt=!0,g(Et,Y[ft],fe,null,de,J,se,ce,he),gt++)}const qe=Tt?UR(tt):Sd;for(Ze=qe.length-1,Ie=Pt-1;Ie>=0;Ie--){const Et=Ne+Ie,ft=Y[Et],en=Y[Et+1],Vt=Et+1{const{el:J,type:se,transition:ce,children:he,shapeFlag:Ie}=j;if(Ie&6){G(j.component.subTree,Y,fe,ue);return}if(Ie&128){j.suspense.move(Y,fe,ue);return}if(Ie&64){se.move(j,Y,fe,ge);return}if(se===De){o(J,Y,fe);for(let we=0;wece.enter(J),de));else{const{leave:we,delayLeave:Te,afterLeave:st}=ce,Ne=()=>{j.ctx.isUnmounted?s(J):o(J,Y,fe)},Re=()=>{const Ze=J._isLeaving||!!J[mr];J._isLeaving&&J[mr](!0),ce.persisted&&!Ze?Ne():we(J,()=>{Ne(),st&&st()})};Te?Te(J,Ne,Re):Re()}else o(J,Y,fe)},Z=(j,Y,fe,ue=!1,de=!1)=>{const{type:J,props:se,ref:ce,children:he,dynamicChildren:Ie,shapeFlag:Ge,patchFlag:we,dirs:Te,cacheIndex:st,memo:Ne}=j;if(we===-2&&(de=!1),ce!=null&&(gl(),Ed(ce,null,fe,j,!0),vl()),st!=null&&(Y.renderCache[st]=void 0),Ge&256){Y.ctx.deactivate(j);return}const Re=Ge&1&&Te,Ze=!Gl(j);let gt;if(Ze&&(gt=se&&se.onVnodeBeforeUnmount)&&wi(gt,Y,j),Ge&6)X(j.component,fe,ue);else{if(Ge&128){j.suspense.unmount(fe,ue);return}Re&&ul(j,null,Y,"beforeUnmount"),Ge&64?j.type.remove(j,Y,fe,ge,ue):Ie&&!Ie.hasOnce&&(J!==De||we>0&&we&64)?oe(Ie,Y,fe,!1,!0):(J===De&&we&384||!de&&Ge&16)&&oe(he,Y,fe),ue&&ee(j)}const Pt=Ne!=null&&st==null;(Ze&&(gt=se&&se.onVnodeUnmounted)||Re||Pt)&&Jo(()=>{gt&&wi(gt,Y,j),Re&&ul(j,null,Y,"unmounted"),Pt&&(j.el=null)},fe)},ee=j=>{const{type:Y,el:fe,anchor:ue,transition:de}=j;if(Y===De){Q(fe,ue);return}if(Y===Ld){w(j);return}const J=()=>{s(fe),de&&!de.persisted&&de.afterLeave&&de.afterLeave()};if(j.shapeFlag&1&&de&&!de.persisted){const{leave:se,delayLeave:ce}=de,he=()=>se(fe,J);ce?ce(j.el,J,he):he()}else J()},Q=(j,Y)=>{let fe;for(;j!==Y;)fe=f(j),s(j),j=fe;s(Y)},X=(j,Y,fe)=>{const{bum:ue,scope:de,job:J,subTree:se,um:ce,m:he,a:Ie}=j;fm(he),fm(Ie),ue&&Md(ue),de.stop(),J&&(J.flags|=8,Z(se,j,Y,fe)),ce&&Jo(ce,Y),Jo(()=>{j.isUnmounted=!0},Y)},oe=(j,Y,fe,ue=!1,de=!1,J=0)=>{for(let se=J;se{if(j.shapeFlag&6)return xe(j.component.subTree);if(j.shapeFlag&128)return j.suspense.next();const Y=f(j.anchor||j.el),fe=Y&&Y[HS];return fe?f(fe):Y};let pe=!1;const ve=(j,Y,fe)=>{let ue;j==null?Y._vnode&&(Z(Y._vnode,null,null,!0),ue=Y._vnode.component):g(Y._vnode||null,j,Y,null,null,null,fe),Y._vnode=j,pe||(pe=!0,d7(ue),am(),pe=!1)},ge={p:g,um:Z,m:G,r:ee,mt:D,mc:S,pc:z,pbc:R,n:xe,o:e};let ne,ae;return t&&([ne,ae]=t(ge)),{render:ve,hydrate:ne,createApp:TR(ve,ne)}}function zv({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function Sc({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function fA(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Fy(e,t,n=!1){const o=e.children,s=t.children;if(jt(o)&&jt(s))for(let i=0;i>1,e[n[l]]0&&(t[o]=n[i-1]),n[i]=o)}}for(i=n.length,r=n[i-1];i-- >0;)n[i]=r,r=t[r];return n}function pA(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:pA(t)}function fm(e){if(e)for(let t=0;te.__isSuspense;let N4=0;const jR={name:"Suspense",__isSuspense:!0,process(e,t,n,o,s,i,r,l,a,c){if(e==null)VR(t,n,o,s,i,r,l,a,c);else{if(i&&i.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}qR(e,t,n,o,s,r,l,a,c)}},hydrate:KR,normalize:ZR},DUe=jR;function op(e,t){const n=e.props&&e.props[t];sn(n)&&n()}function VR(e,t,n,o,s,i,r,l,a){const{p:c,o:{createElement:u}}=a,d=u("div"),f=e.suspense=mA(e,s,o,t,d,n,i,r,l,a);c(null,f.pendingBranch=e.ssContent,d,null,o,f,i,r),f.deps>0?(op(e,"onPending"),op(e,"onFallback"),c(null,e.ssFallback,t,n,o,null,i,r),Id(f,e.ssFallback)):f.resolve(!1,!0)}function qR(e,t,n,o,s,i,r,l,{p:a,um:c,o:{createElement:u}}){const d=t.suspense=e.suspense;d.vnode=t,t.el=e.el;const f=t.ssContent,h=t.ssFallback,{activeBranch:m,pendingBranch:g,isInFallback:b,isHydrating:_}=d;if(g)d.pendingBranch=f,Rr(g,f)?(a(g,f,d.hiddenContainer,null,s,d,i,r,l),d.deps<=0?d.resolve():b&&(_||(a(m,h,n,o,s,null,i,r,l),Id(d,h)))):(d.pendingId=N4++,_?(d.isHydrating=!1,d.activeBranch=g):c(g,s,d),d.deps=0,d.effects.length=0,d.hiddenContainer=u("div"),b?(a(null,f,d.hiddenContainer,null,s,d,i,r,l),d.deps<=0?d.resolve():(a(m,h,n,o,s,null,i,r,l),Id(d,h))):m&&Rr(m,f)?(a(m,f,n,o,s,d,i,r,l),d.resolve(!0)):(a(null,f,d.hiddenContainer,null,s,d,i,r,l),d.deps<=0&&d.resolve()));else if(m&&Rr(m,f))a(m,f,n,o,s,d,i,r,l),Id(d,f);else if(op(t,"onPending"),d.pendingBranch=f,f.shapeFlag&512?d.pendingId=f.component.suspenseId:d.pendingId=N4++,a(null,f,d.hiddenContainer,null,s,d,i,r,l),d.deps<=0)d.resolve();else{const{timeout:v,pendingId:y}=d;v>0?setTimeout(()=>{d.pendingId===y&&d.fallback(h)},v):v===0&&d.fallback(h)}}function mA(e,t,n,o,s,i,r,l,a,c,u=!1){const{p:d,m:f,um:h,n:m,o:{parentNode:g,remove:b}}=c;let _;const v=GR(e);v&&t&&t.pendingBranch&&(_=t.pendingId,t.deps++);const y=e.props?nm(e.props.timeout):void 0,w=i,x={vnode:e,parent:t,parentComponent:n,namespace:r,container:o,hiddenContainer:s,deps:0,pendingId:N4++,timeout:typeof y=="number"?y:-1,activeBranch:null,isFallbackMountPending:!1,pendingBranch:null,isInFallback:!u,isHydrating:u,isUnmounted:!1,effects:[],resolve(A=!1,L=!1){const{vnode:S,activeBranch:T,pendingBranch:R,pendingId:B,effects:I,parentComponent:$,container:D,isInFallback:H}=x;let O=!1;if(x.isHydrating)x.isHydrating=!1;else if(!A){O=T&&R.transition&&R.transition.mode==="out-in";let W=!1;O&&(T.transition.afterLeave=()=>{B===x.pendingId&&(f(R,D,i===w&&!W?m(T):i,0),lm(I),H&&S.ssFallback&&(S.ssFallback.el=null))}),T&&!x.isFallbackMountPending&&(g(T.el)===D&&(i=m(T),W=!0),h(T,$,x,!0),!O&&H&&S.ssFallback&&Jo(()=>S.ssFallback.el=null,x)),O||f(R,D,i,0)}x.isFallbackMountPending=!1,Id(x,R),x.pendingBranch=null,x.isInFallback=!1;let P=x.parent,z=!1;for(;P;){if(P.pendingBranch){P.effects.push(...I),z=!0;break}P=P.parent}!z&&!O&&lm(I),x.effects=[],v&&t&&t.pendingBranch&&_===t.pendingId&&(t.deps--,t.deps===0&&!L&&t.resolve()),op(S,"onResolve")},fallback(A){if(!x.pendingBranch)return;const{vnode:L,activeBranch:S,parentComponent:T,container:R,namespace:B}=x;op(L,"onFallback");const I=m(S),$=()=>{x.isFallbackMountPending=!1,x.isInFallback&&(d(null,A,R,I,T,null,B,l,a),Id(x,A))},D=A.transition&&A.transition.mode==="out-in";D&&(x.isFallbackMountPending=!0,S.transition.afterLeave=$),x.isInFallback=!0,h(S,T,null,!0),D||$()},move(A,L,S){x.activeBranch&&f(x.activeBranch,A,L,S),x.container=A},next(){return x.activeBranch&&m(x.activeBranch)},registerDep(A,L,S){const T=!!x.pendingBranch;T&&x.deps++;const R=A.vnode.el;A.asyncDep.catch(B=>{af(B,A,0)}).then(B=>{if(A.isUnmounted||x.isUnmounted||x.pendingId!==A.suspenseId)return;sp(),A.asyncResolved=!0;const{vnode:I}=A;O4(A,B,!1),R&&(I.el=R);const $=!R&&A.subTree.el;L(A,I,g(R||A.subTree.el),R?null:m(A.subTree),x,r,S),$&&(I.placeholder=null,b($)),Kg(A,I.el),T&&--x.deps===0&&x.resolve()})},unmount(A,L){x.isUnmounted=!0,x.activeBranch&&h(x.activeBranch,n,A,L),x.pendingBranch&&h(x.pendingBranch,n,A,L)}};return x}function KR(e,t,n,o,s,i,r,l,a){const c=t.suspense=mA(t,o,n,e.parentNode,document.createElement("div"),null,s,i,r,l,!0),u=a(e,c.pendingBranch=t.ssContent,n,c,i,r);return c.deps===0&&c.resolve(!1,!0),u}function ZR(e){const{shapeFlag:t,children:n}=e,o=t&32;e.ssContent=x7(o?n.default:n),e.ssFallback=o?x7(n.fallback):q(ts)}function x7(e){let t;if(sn(e)){const n=au&&e._c;n&&(e._d=!1,k()),e=e(),n&&(e._d=!0,t=Zs,vA())}return jt(e)&&(e=LR(e)),e=Ai(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(n=>n!==e)),e}function gA(e,t){t&&t.pendingBranch?jt(e)?t.effects.push(...e):t.effects.push(e):lm(e)}function Id(e,t){e.activeBranch=t;const{vnode:n,parentComponent:o}=e;let s=t.el;for(;!s&&t.component;)t=t.component.subTree,s=t.el;n.el=s,o&&o.subTree===n&&(o.vnode.el=s,Kg(o,s))}function GR(e){const t=e.props&&e.props.suspensible;return t!=null&&t!==!1}const De=Symbol.for("v-fgt"),Ba=Symbol.for("v-txt"),ts=Symbol.for("v-cmt"),Ld=Symbol.for("v-stc"),T1=[];let Zs=null;function k(e=!1){T1.push(Zs=e?null:[])}function vA(){T1.pop(),Zs=T1[T1.length-1]||null}let au=1;function hm(e,t=!1){au+=e,e<0&&Zs&&t&&(Zs.hasOnce=!0)}function yA(e){return e.dynamicChildren=au>0?Zs||Sd:null,vA(),au>0&&Zs&&Zs.push(e),e}function M(e,t,n,o,s,i){return yA(C(e,t,n,o,s,i,!0))}function me(e,t,n,o,s){return yA(q(e,t,n,o,s,!0))}function Va(e){return e?e.__v_isVNode===!0:!1}function Rr(e,t){return e.type===t.type&&e.key===t.key}function BUe(e){}const kA=({key:e})=>e??null,Eh=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?oo(e)||jo(e)||sn(e)?{i:Rs,r:e,k:t,f:!!n}:e:null);function C(e,t=null,n=null,o=0,s=null,i=e===De?0:1,r=!1,l=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&kA(t),ref:t&&Eh(t),scopeId:jg,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:o,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:Rs};return l?(mm(a,n),i&128&&e.normalize(a)):n&&(a.shapeFlag|=oo(n)?8:16),au>0&&!r&&Zs&&(a.patchFlag>0||i&6)&&a.patchFlag!==32&&Zs.push(a),a}const q=YR;function YR(e,t=null,n=null,o=0,s=null,i=!1){if((!e||e===GS)&&(e=ts),Va(e)){const l=Ql(e,t,!0);return n&&mm(l,n),au>0&&!i&&Zs&&(l.shapeFlag&6?Zs[Zs.indexOf(e)]=l:Zs.push(l)),l.patchFlag=-2,l}if(tP(e)&&(e=e.__vccOpts),t){t=bA(t);let{class:l,style:a}=t;l&&!oo(l)&&(t.class=Fe(l)),jn(a)&&(Ug(a)&&!jt(a)&&(a=Qn({},a)),t.style=Gt(a))}const r=oo(e)?1:pm(e)?128:zS(e)?64:jn(e)?4:sn(e)?2:0;return C(e,t,n,o,s,r,i,!0)}function bA(e){return e?Ug(e)||iA(e)?Qn({},e):e:null}function Ql(e,t,n=!1,o=!1){const{props:s,ref:i,patchFlag:r,children:l,transition:a}=e,c=t?Nn(s||{},t):s,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&kA(c),ref:t&&t.ref?n&&i?jt(i)?i.concat(Eh(t)):[i,Eh(t)]:Eh(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==De?r===-1?16:r|16:r,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:a,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Ql(e.ssContent),ssFallback:e.ssFallback&&Ql(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return a&&o&&ja(u,a.clone(u)),u}function Ve(e=" ",t=0){return q(Ba,null,e,t)}function _u(e,t){const n=q(Ld,null,e);return n.staticCount=t,n}function te(e="",t=!1){return t?(k(),me(ts,null,e)):q(ts,null,e)}function Ai(e){return e==null||typeof e=="boolean"?q(ts):jt(e)?q(De,null,e.slice()):Va(e)?Hl(e):q(Ba,null,String(e))}function Hl(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Ql(e)}function mm(e,t){let n=0;const{shapeFlag:o}=e;if(t==null)t=null;else if(jt(t))n=16;else if(typeof t=="object")if(o&65){const s=t.default;s&&(s._c&&(s._d=!1),mm(e,s()),s._c&&(s._d=!0));return}else{n=32;const s=t._;!s&&!iA(t)?t._ctx=Rs:s===3&&Rs&&(Rs.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(sn(t)){if(o&65){mm(e,{default:t});return}t={default:t,_ctx:Rs},n=32}else t=String(t),o&64?(n=16,t=[Ve(t)]):n=8;e.children=t,e.shapeFlag|=n}function Nn(...e){const t={};for(let n=0;nFs||Rs;let gm,$d;{const e=Rg(),t=(n,o)=>{let s;return(s=e[n])||(s=e[n]=[]),s.push(o),i=>{s.length>1?s.forEach(r=>r(i)):s[0](i)}};gm=t("__VUE_INSTANCE_SETTERS__",n=>Fs=n),$d=t("__VUE_SSR_SETTERS__",n=>cu=n)}const uf=e=>{const t=Fs;return gm(e),e.scope.on(),()=>{e.scope.off(),gm(t)}},sp=()=>{Fs&&Fs.scope.off(),gm(null)};function wA(e){return e.vnode.shapeFlag&4}let cu=!1;function _A(e,t=!1,n=!1){t&&$d(t);const{props:o,children:s}=e.vnode,i=wA(e);FR(e,o,i,t),BR(e,s,n||t);const r=i?QR(e,t):void 0;return t&&$d(!1),r}function QR(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,E4);const{setup:o}=n;if(o){gl();const s=e.setupContext=o.length>1?SA(e):null,i=uf(e),r=Mp(o,e,0,[e.props,s]),l=Cy(r);if(vl(),i(),(l||e.sp)&&!Gl(e)&&My(e),l){if(r.then(sp,sp),t)return r.then(a=>{O4(e,a,t)}).catch(a=>{af(a,e,0)});e.asyncDep=r}else O4(e,r,t)}else xA(e,t)}function O4(e,t,n){sn(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:jn(t)&&(e.setupState=LS(t)),xA(e,n)}let vm,F4;function HUe(e){vm=e,F4=t=>{t.render._rc&&(t.withProxy=new Proxy(t.ctx,CR))}}const zUe=()=>!vm;function xA(e,t,n){const o=e.type;if(!e.render){if(!t&&vm&&!o.render){const s=o.template||$y(e).template;if(s){const{isCustomElement:i,compilerOptions:r}=e.appContext.config,{delimiters:l,compilerOptions:a}=o,c=Qn(Qn({isCustomElement:i,delimiters:l},r),a);o.render=vm(s,c)}}e.render=o.render||kr,F4&&F4(e)}{const s=uf(e);gl();try{wR(e)}finally{vl(),s()}}}const eP={get(e,t){return Ks(e,"get",""),e[t]}};function SA(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,eP),slots:e.slots,emit:e.emit,expose:t}}function Lp(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(LS(wt(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in M1)return M1[n](e)},has(t,n){return n in t||n in M1}})):e.proxy}function R4(e,t=!0){return sn(e)?e.displayName||e.name:e.name||t&&e.__name}function tP(e){return sn(e)&&"__vccOpts"in e}const F=(e,t)=>FF(e,t,cu);function Qt(e,t,n){try{hm(-1);const o=arguments.length;return o===2?jn(t)&&!jt(t)?Va(t)?q(e,null,[t]):q(e,t):q(e,null,t):(o>3?n=Array.prototype.slice.call(arguments,2):o===3&&Va(n)&&(n=[n]),q(e,t,n))}finally{hm(1)}}function WUe(){}function UUe(e,t,n,o){const s=n[o];if(s&&nP(s,e))return s;const i=t();return i.memo=e.slice(),i.cacheIndex=o,n[o]=i}function nP(e,t){const n=e.memo;if(n.length!=t.length)return!1;for(let o=0;o0&&Zs&&Zs.push(e),!0}const oP="3.5.39",jUe=kr,VUe=HF,qUe=ld,KUe=PS,sP={createComponentInstance:CA,setupComponent:_A,renderComponentRoot:Th,setCurrentRenderingInstance:ep,isVNode:Va,normalizeVNode:Ai,getComponentPublicInstance:Lp,ensureValidVNode:Ly,pushWarningContext:DF,popWarningContext:BF},ZUe=sP,GUe=null,YUe=null,XUe=null;/** -* @vue/runtime-dom v3.5.39 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/let P4;const S7=typeof window<"u"&&window.trustedTypes;if(S7)try{P4=S7.createPolicy("vue",{createHTML:e=>e})}catch{}const AA=P4?e=>P4.createHTML(e):e=>e,iP="http://www.w3.org/2000/svg",rP="http://www.w3.org/1998/Math/MathML",Pl=typeof document<"u"?document:null,A7=Pl&&Pl.createElement("template"),lP={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,o)=>{const s=t==="svg"?Pl.createElementNS(iP,e):t==="mathml"?Pl.createElementNS(rP,e):n?Pl.createElement(e,{is:n}):Pl.createElement(e);return e==="select"&&o&&o.multiple!=null&&s.setAttribute("multiple",o.multiple),s},createText:e=>Pl.createTextNode(e),createComment:e=>Pl.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Pl.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,o,s,i){const r=n?n.previousSibling:t.lastChild;if(s&&(s===i||s.nextSibling))for(;t.insertBefore(s.cloneNode(!0),n),!(s===i||!(s=s.nextSibling)););else{A7.innerHTML=AA(o==="svg"?`${e}`:o==="mathml"?`${e}`:e);const l=A7.content;if(o==="svg"||o==="mathml"){const a=l.firstChild;for(;a.firstChild;)l.appendChild(a.firstChild);l.removeChild(a)}t.insertBefore(l,n)}return[r?r.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},ma="transition",Vf="animation",Kd=Symbol("_vtc"),MA={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},TA=Qn({},US,MA),aP=e=>(e.displayName="Transition",e.props=TA,e),gs=aP((e,{slots:t})=>Qt(XF,EA(e),t)),Ac=(e,t=[])=>{jt(e)?e.forEach(n=>n(...t)):e&&e(...t)},M7=e=>e?jt(e)?e.some(t=>t.length>1):e.length>1:!1;function EA(e){const t={};for(const I in e)I in MA||(t[I]=e[I]);if(e.css===!1)return t;const{name:n="v",type:o,duration:s,enterFromClass:i=`${n}-enter-from`,enterActiveClass:r=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:a=i,appearActiveClass:c=r,appearToClass:u=l,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:h=`${n}-leave-to`}=e,m=cP(s),g=m&&m[0],b=m&&m[1],{onBeforeEnter:_,onEnter:v,onEnterCancelled:y,onLeave:w,onLeaveCancelled:x,onBeforeAppear:A=_,onAppear:L=v,onAppearCancelled:S=y}=t,T=(I,$,D,H)=>{I._enterCancelled=H,wa(I,$?u:l),wa(I,$?c:r),D&&D()},R=(I,$)=>{I._isLeaving=!1,wa(I,d),wa(I,h),wa(I,f),$&&$()},B=I=>($,D)=>{const H=I?L:v,O=()=>T($,I,D);Ac(H,[$,O]),T7(()=>{wa($,I?a:i),ll($,I?u:l),M7(H)||E7($,o,g,O)})};return Qn(t,{onBeforeEnter(I){Ac(_,[I]),ll(I,i),ll(I,r)},onBeforeAppear(I){Ac(A,[I]),ll(I,a),ll(I,c)},onEnter:B(!1),onAppear:B(!0),onLeave(I,$){I._isLeaving=!0;const D=()=>R(I,$);ll(I,d),I._enterCancelled?(ll(I,f),D4(I)):(D4(I),ll(I,f)),T7(()=>{I._isLeaving&&(wa(I,d),ll(I,h),M7(w)||E7(I,o,b,D))}),Ac(w,[I,D])},onEnterCancelled(I){T(I,!1,void 0,!0),Ac(y,[I])},onAppearCancelled(I){T(I,!0,void 0,!0),Ac(S,[I])},onLeaveCancelled(I){R(I),Ac(x,[I])}})}function cP(e){if(e==null)return null;if(jn(e))return[Wv(e.enter),Wv(e.leave)];{const t=Wv(e);return[t,t]}}function Wv(e){return nm(e)}function ll(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Kd]||(e[Kd]=new Set)).add(t)}function wa(e,t){t.split(/\s+/).forEach(o=>o&&e.classList.remove(o));const n=e[Kd];n&&(n.delete(t),n.size||(e[Kd]=void 0))}function T7(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let uP=0;function E7(e,t,n,o){const s=e._endId=++uP,i=()=>{s===e._endId&&o()};if(n!=null)return setTimeout(i,n);const{type:r,timeout:l,propCount:a}=IA(e,t);if(!r)return o();const c=r+"end";let u=0;const d=()=>{e.removeEventListener(c,f),i()},f=h=>{h.target===e&&++u>=a&&d()};setTimeout(()=>{u(n[m]||"").split(", "),s=o(`${ma}Delay`),i=o(`${ma}Duration`),r=I7(s,i),l=o(`${Vf}Delay`),a=o(`${Vf}Duration`),c=I7(l,a);let u=null,d=0,f=0;t===ma?r>0&&(u=ma,d=r,f=i.length):t===Vf?c>0&&(u=Vf,d=c,f=a.length):(d=Math.max(r,c),u=d>0?r>c?ma:Vf:null,f=u?u===ma?i.length:a.length:0);const h=u===ma&&/\b(?:transform|all)(?:,|$)/.test(o(`${ma}Property`).toString());return{type:u,timeout:d,propCount:f,hasTransform:h}}function I7(e,t){for(;e.lengthL7(n)+L7(e[o])))}function L7(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function D4(e){return(e?e.ownerDocument:document).body.offsetHeight}function dP(e,t,n){const o=e[Kd];o&&(t=(t?[t,...o]:[...o]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const ym=Symbol("_vod"),Ry=Symbol("_vsh"),xs={name:"show",beforeMount(e,{value:t},{transition:n}){e[ym]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):qf(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:o}){!t!=!n&&(o?t?(o.beforeEnter(e),qf(e,!0),o.enter(e)):o.leave(e,()=>{qf(e,!1)}):qf(e,t))},beforeUnmount(e,{value:t}){qf(e,t)}};function qf(e,t){e.style.display=t?e[ym]:"none",e[Ry]=!t}function fP(){xs.getSSRProps=({value:e})=>{if(!e)return{style:{display:"none"}}}}const LA=Symbol("");function JUe(e){const t=rs();if(!t)return;const n=t.ut=(s=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(i=>km(i,s))},o=()=>{const s=e(t.proxy);t.ce?km(t.ce,s):B4(t.subTree,s),n(s)};ZS(()=>{lm(o)}),cn(()=>{Je(o,kr,{flush:"post"});const s=new MutationObserver(o);s.observe(t.subTree.el.parentNode,{childList:!0}),kn(()=>s.disconnect())})}function B4(e,t){if(e.shapeFlag&128){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{B4(n.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)km(e.el,t);else if(e.type===De)e.children.forEach(n=>B4(n,t));else if(e.type===Ld){let{el:n,anchor:o}=e;for(;n&&(km(n,t),n!==o);)n=n.nextSibling}}function km(e,t){if(e.nodeType===1){const n=e.style;let o="";for(const s in t){const i=lF(t[s]);n.setProperty(`--${s}`,i),o+=`--${s}: ${i};`}n[LA]=o}}const pP=/(?:^|;)\s*display\s*:/;function hP(e,t,n){const o=e.style,s=oo(n);let i=!1;if(n&&!s){if(t)if(oo(t))for(const r of t.split(";")){const l=r.slice(0,r.indexOf(":")).trim();n[l]==null&&c1(o,l,"")}else for(const r in t)n[r]==null&&c1(o,r,"");for(const r in n){r==="display"&&(i=!0);const l=n[r];l!=null?gP(e,r,!oo(t)&&t?t[r]:void 0,l)||c1(o,r,l):c1(o,r,"")}}else if(s){if(t!==n){const r=o[LA];r&&(n+=";"+r),o.cssText=n,i=pP.test(n)}}else t&&e.removeAttribute("style");ym in e&&(e[ym]=i?o.display:"",e[Ry]&&(o.display="none"))}const $7=/\s*!important$/;function c1(e,t,n){if(jt(n))n.forEach(o=>c1(e,t,o));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const o=mP(e,t);$7.test(n)?e.setProperty(Mi(o),n.replace($7,""),"important"):e[o]=n}}const N7=["Webkit","Moz","ms"],Uv={};function mP(e,t){const n=Uv[t];if(n)return n;let o=ms(t);if(o!=="filter"&&o in e)return Uv[t]=o;o=Og(o);for(let s=0;sjv||(wP.then(()=>jv=0),jv=Date.now());function xP(e,t){const n=o=>{if(!o._vts)o._vts=Date.now();else if(o._vts<=n.attached)return;const s=n.value;if(jt(s)){const i=o.stopImmediatePropagation;o.stopImmediatePropagation=()=>{i.call(o),o._stopped=!0};const r=s.slice(),l=[o];for(let a=0;ae.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,SP=(e,t,n,o,s,i)=>{const r=s==="svg";t==="class"?dP(e,o,r):t==="style"?hP(e,n,o):Ap(t)?Ig(t)||yP(e,t,n,o,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):AP(e,t,o,r))?(R7(e,t,o),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&F7(e,t,o,r,i,t!=="value")):e._isVueCE&&(MP(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!oo(o)))?R7(e,ms(t),o,i,t):(t==="true-value"?e._trueValue=o:t==="false-value"&&(e._falseValue=o),F7(e,t,o,r))};function AP(e,t,n,o){if(o)return!!(t==="innerHTML"||t==="textContent"||t in e&&D7(t)&&sn(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const s=e.tagName;if(s==="IMG"||s==="VIDEO"||s==="CANVAS"||s==="SOURCE")return!1}return D7(t)&&oo(n)?!1:t in e}function MP(e,t){const n=e._def.props;if(!n)return!1;const o=ms(t);return Array.isArray(n)?n.some(s=>ms(s)===o):Object.keys(n).some(s=>ms(s)===o)}const B7={};function TP(e,t,n){let o=et(e,t);Lg(o)&&(o=Qn({},o,t));class s extends Py{constructor(r){super(o,r,n)}}return s.def=o,s}const QUe=((e,t)=>TP(e,t,jP)),EP=typeof HTMLElement<"u"?HTMLElement:class{};class Py extends EP{constructor(t,n={},o=wm){super(),this._def=t,this._props=n,this._createApp=o,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._patching=!1,this._dirty=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._styleAnchors=new WeakMap,this._ob=null,this.shadowRoot&&o!==wm?this._root=this.shadowRoot:t.shadowRoot!==!1?(this.attachShadow(Qn({},t.shadowRootOptions,{mode:"open"})),this._root=this.shadowRoot):this._root=this}connectedCallback(){if(!this.isConnected)return;!this.shadowRoot&&!this._resolved&&this._parseSlots(),this._connected=!0;let t=this;for(;t=t&&(t.assignedSlot||t.parentNode||t.host);)if(t instanceof Py){this._parent=t;break}this._instance||(this._resolved?this._mount(this._def):t&&t._pendingResolve?this._pendingResolve=t._pendingResolve.then(()=>{this._pendingResolve=void 0,this._resolveDef()}):this._resolveDef())}_setParent(t=this._parent){t&&(this._instance.parent=t._instance,this._inheritParentContext(t))}_inheritParentContext(t=this._parent){t&&this._app&&Object.setPrototypeOf(this._app._context.provides,t._instance.provides)}disconnectedCallback(){this._connected=!1,bt(()=>{this._connected||(this._ob&&(this._ob.disconnect(),this._ob=null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null,this._teleportTargets&&(this._teleportTargets.clear(),this._teleportTargets=void 0))})}_processMutations(t){for(const n of t)this._setAttr(n.attributeName)}_resolveDef(){if(this._pendingResolve)return;for(let o=0;o{this._resolved=!0,this._pendingResolve=void 0;const{props:i,styles:r}=o;let l;if(i&&!jt(i))for(const a in i){const c=i[a];(c===Number||c&&c.type===Number)&&(a in this._props&&(this._props[a]=nm(this._props[a])),(l||(l=Object.create(null)))[ms(a)]=!0)}this._numberProps=l,this._resolveProps(o),this.shadowRoot&&this._applyStyles(r),this._mount(o)},n=this._def.__asyncLoader;n?this._pendingResolve=n().then(o=>{o.configureApp=this._def.configureApp,t(this._def=o,!0)}):t(this._def)}_mount(t){this._app=this._createApp(t),this._inheritParentContext(),t.configureApp&&t.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);const n=this._instance&&this._instance.exposed;if(n)for(const o in n)Un(this,o)||Object.defineProperty(this,o,{get:()=>p(n[o])})}_resolveProps(t){const{props:n}=t,o=jt(n)?n:Object.keys(n||{});for(const s of Object.keys(this))s[0]!=="_"&&o.includes(s)&&this._setProp(s,this[s]);for(const s of o.map(ms))Object.defineProperty(this,s,{get(){return this._getProp(s)},set(i){this._setProp(s,i,!0,!this._patching)}})}_setAttr(t){if(t.startsWith("data-v-"))return;const n=this.hasAttribute(t);let o=n?this.getAttribute(t):B7;const s=ms(t);n&&this._numberProps&&this._numberProps[s]&&(o=nm(o)),this._setProp(s,o,!1,!0)}_getProp(t){return this._props[t]}_setProp(t,n,o=!0,s=!1){if(n!==this._props[t]&&(this._dirty=!0,n===B7?delete this._props[t]:(this._props[t]=n,t==="key"&&this._app&&(this._app._ceVNode.key=n)),s&&this._instance&&this._update(),o)){const i=this._ob;i&&(this._processMutations(i.takeRecords()),i.disconnect()),n===!0?this.setAttribute(Mi(t),""):typeof n=="string"||typeof n=="number"?this.setAttribute(Mi(t),n+""):n||this.removeAttribute(Mi(t)),i&&i.observe(this,{attributes:!0})}}_update(){const t=this._createVNode();this._app&&(t.appContext=this._app._context),UP(t,this._root)}_createVNode(){const t={};this.shadowRoot||(t.onVnodeMounted=t.onVnodeUpdated=this._renderSlots.bind(this));const n=q(this._def,Qn(t,this._props));return this._instance||(n.ce=o=>{this._instance=o,o.ce=this,o.isCE=!0;const s=(i,r)=>{this.dispatchEvent(new CustomEvent(i,Lg(r[0])?Qn({detail:r},r[0]):{detail:r}))};o.emit=(i,...r)=>{s(i,r),Mi(i)!==i&&s(Mi(i),r)},this._setParent()}),n}_applyStyles(t,n,o){if(!t)return;if(n){if(n===this._def||this._styleChildren.has(n))return;this._styleChildren.add(n)}const s=this._nonce,i=this.shadowRoot,r=o?this._getStyleAnchor(o)||this._getStyleAnchor(this._def):this._getRootStyleInsertionAnchor(i);let l=null;for(let a=t.length-1;a>=0;a--){const c=document.createElement("style");s&&c.setAttribute("nonce",s),c.textContent=t[a],i.insertBefore(c,l||r),l=c,a===0&&(o||this._styleAnchors.set(this._def,c),n&&this._styleAnchors.set(n,c))}}_getStyleAnchor(t){if(!t)return null;const n=this._styleAnchors.get(t);return n&&n.parentNode===this.shadowRoot?n:(n&&this._styleAnchors.delete(t),null)}_getRootStyleInsertionAnchor(t){for(let n=0;n(delete e.props.mode,e),$P=LP({name:"TransitionGroup",props:Qn({},TA,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=rs(),o=WS();let s,i;return Ip(()=>{if(!s.length)return;const r=e.moveClass||`${e.name||"v"}-move`;if(!RP(s[0].el,n.vnode.el,r)){s=[];return}s.forEach(NP),s.forEach(OP);const l=s.filter(FP);D4(n.vnode.el),l.forEach(a=>{const c=a.el,u=c.style;ll(c,r),u.transform=u.webkitTransform=u.transitionDuration="";const d=c[bm]=f=>{f&&f.target!==c||(!f||f.propertyName.endsWith("transform"))&&(c.removeEventListener("transitionend",d),c[bm]=null,wa(c,r))};c.addEventListener("transitionend",d)}),s=[]}),()=>{const r=In(e),l=EA(r);let a=r.tag||De;if(s=[],i)for(let c=0;c{l.split(/\s+/).forEach(a=>a&&o.classList.remove(a))}),n.split(/\s+/).forEach(l=>l&&o.classList.add(l)),o.style.display="none";const i=t.nodeType===1?t:t.parentNode;i.appendChild(o);const{hasTransform:r}=IA(o);return i.removeChild(o),r}const qa=e=>{const t=e.props["onUpdate:modelValue"]||!1;return jt(t)?n=>Md(t,n):t};function PP(e){e.target.composing=!0}function z7(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const br=Symbol("_assign");function W7(e,t,n){return t&&(e=e.trim()),n&&(e=Fg(e)),e}const Ys={created(e,{modifiers:{lazy:t,trim:n,number:o}},s){e[br]=qa(s);const i=o||s.props&&s.props.type==="number";Ul(e,t?"change":"input",r=>{r.target.composing||e[br](W7(e.value,n,i))}),(n||i)&&Ul(e,"change",()=>{e.value=W7(e.value,n,i)}),t||(Ul(e,"compositionstart",PP),Ul(e,"compositionend",z7),Ul(e,"change",z7))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:o,trim:s,number:i}},r){if(e[br]=qa(r),e.composing)return;const l=(i||e.type==="number")&&!/^0\d/.test(e.value)?Fg(e.value):e.value,a=t??"";if(l===a)return;const c=e.getRootNode();(c instanceof Document||c instanceof ShadowRoot)&&c.activeElement===e&&e.type!=="range"&&(o&&t===n||s&&e.value.trim()===a)||(e.value=a)}},Cm={deep:!0,created(e,t,n){e[br]=qa(n),Ul(e,"change",()=>{const o=e._modelValue,s=Zd(e),i=e.checked,r=e[br];if(jt(o)){const l=Pg(o,s),a=l!==-1;if(i&&!a)r(o.concat(s));else if(!i&&a){const c=[...o];c.splice(l,1),r(c)}}else if(wu(o)){const l=new Set(o);i?l.add(s):l.delete(s),r(l)}else r(PA(e,i))})},mounted:U7,beforeUpdate(e,t,n){e[br]=qa(n),U7(e,t,n)}};function U7(e,{value:t,oldValue:n},o){e._modelValue=t;let s;if(jt(t))s=Pg(t,o.props.value)>-1;else if(wu(t))s=t.has(o.props.value);else{if(t===n)return;s=Xl(t,PA(e,!0))}e.checked!==s&&(e.checked=s)}const RA={created(e,{value:t},n){e.checked=Xl(t,n.props.value),e[br]=qa(n),Ul(e,"change",()=>{e[br](Zd(e))})},beforeUpdate(e,{value:t,oldValue:n},o){e[br]=qa(o),t!==n&&(e.checked=Xl(t,o.props.value))}},H4={deep:!0,created(e,{value:t,modifiers:{number:n}},o){const s=wu(t);Ul(e,"change",()=>{const i=Array.prototype.filter.call(e.options,r=>r.selected).map(r=>n?Fg(Zd(r)):Zd(r));e[br](e.multiple?s?new Set(i):i:i[0]),e._assigning=!0,bt(()=>{e._assigning=!1})}),e[br]=qa(o)},mounted(e,{value:t}){j7(e,t)},beforeUpdate(e,t,n){e[br]=qa(n)},updated(e,{value:t}){e._assigning||j7(e,t)}};function j7(e,t){const n=e.multiple,o=jt(t);if(!(n&&!o&&!wu(t))){for(let s=0,i=e.options.length;sString(c)===String(l)):r.selected=Pg(t,l)>-1}else r.selected=t.has(l);else if(Xl(Zd(r),t)){e.selectedIndex!==s&&(e.selectedIndex=s);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Zd(e){return"_value"in e?e._value:e.value}function PA(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const DP={created(e,t,n){F0(e,t,n,null,"created")},mounted(e,t,n){F0(e,t,n,null,"mounted")},beforeUpdate(e,t,n,o){F0(e,t,n,o,"beforeUpdate")},updated(e,t,n,o){F0(e,t,n,o,"updated")}};function DA(e,t){switch(e){case"SELECT":return H4;case"TEXTAREA":return Ys;default:switch(t){case"checkbox":return Cm;case"radio":return RA;default:return Ys}}}function F0(e,t,n,o,s){const r=DA(e.tagName,n.props&&n.props.type)[s];r&&r(e,t,n,o)}function BP(){Ys.getSSRProps=({value:e})=>({value:e}),RA.getSSRProps=({value:e},t)=>{if(t.props&&Xl(t.props.value,e))return{checked:!0}},Cm.getSSRProps=({value:e},t)=>{if(jt(e)){if(t.props&&Pg(e,t.props.value)>-1)return{checked:!0}}else if(wu(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},DP.getSSRProps=(e,t)=>{if(typeof t.type!="string")return;const n=DA(t.type.toUpperCase(),t.props&&t.props.type);if(n.getSSRProps)return n.getSSRProps(e,t)}}const HP=["ctrl","shift","alt","meta"],zP={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>HP.some(n=>e[`${n}Key`]&&!t.includes(n))},Ot=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),o=t.join(".");return n[o]||(n[o]=((s,...i)=>{for(let r=0;r{const n=e._withKeys||(e._withKeys={}),o=t.join(".");return n[o]||(n[o]=(s=>{if(!("key"in s))return;const i=Mi(s.key);if(t.some(r=>r===i||WP[r]===i))return e(s)}))},BA=Qn({patchProp:SP},lP);let E1,V7=!1;function HA(){return E1||(E1=zR(BA))}function zA(){return E1=V7?E1:WR(BA),V7=!0,E1}const UP=((...e)=>{HA().render(...e)}),nje=((...e)=>{zA().hydrate(...e)}),wm=((...e)=>{const t=HA().createApp(...e),{mount:n}=t;return t.mount=o=>{const s=UA(o);if(!s)return;const i=t._component;!sn(i)&&!i.render&&!i.template&&(i.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const r=n(s,!1,WA(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),r},t}),jP=((...e)=>{const t=zA().createApp(...e),{mount:n}=t;return t.mount=o=>{const s=UA(o);if(s)return n(s,!0,WA(s))},t});function WA(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function UA(e){return oo(e)?document.querySelector(e):e}let q7=!1;const oje=()=>{q7||(q7=!0,BP(),fP())};/*! - * shared v11.4.6 - * (c) 2026 kazuya kawaguchi - * Released under the MIT License. - */function VP(e,t){typeof console<"u"&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}const _m=typeof window<"u",tc=(e,t=!1)=>t?Symbol.for(e):Symbol(e),qP=(e,t,n)=>KP({l:e,k:t,s:n}),KP=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),ns=e=>typeof e=="number"&&isFinite(e),jA=e=>By(e)==="[object Date]",Gd=e=>By(e)==="[object RegExp]",Zg=e=>Mn(e)&&Object.keys(e).length===0,ss=Object.assign,ZP=Object.create,no=(e=null)=>ZP(e);let K7;const Zc=()=>K7||(K7=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:no());function Z7(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/").replace(/=/g,"=")}function GP(e){return e.replace(/&(?![a-zA-Z0-9#]{2,6};)/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}const YP=/^\s*javascript\s*(?::|�*58;?|�*3a;?|:?)/i,XP=/^(?:href|src|action|formaction)$/i;function Dy(e){return YP.test(e)}function JP(e){const t=/url\s*\(/gi;let n="",o=0,s;for(;(s=t.exec(e))!==null;){const i=s.index,r=t.lastIndex-1;let l=r+1,a=1,c=null;for(;l`${o}="${G7(o,s)}"`),e=e.replace(/([\w:-]+)\s*=\s*'([^']*)'/g,(n,o,s)=>`${o}='${G7(o,s)}'`),/\s*on\w+\s*=\s*["']?[^"'>]+["']?/gi.test(e)&&(e=e.replace(/(\s+)(on)(\w+\s*=)/gi,"$1on$3")),e=e.replace(/(\s+(?:href|src|action|formaction)\s*=\s*)([^\s"'=<>`]+)/gi,(n,o,s)=>Dy(s)?`${o}about:blank`:n),e}const eD=Object.prototype.hasOwnProperty;function vr(e,t){return eD.call(e,t)}const Ro=Array.isArray,vo=e=>typeof e=="function",Ht=e=>typeof e=="string",Fn=e=>typeof e=="boolean",Bn=e=>e!==null&&typeof e=="object",tD=e=>Bn(e)&&vo(e.then)&&vo(e.catch),VA=Object.prototype.toString,By=e=>VA.call(e),Mn=e=>By(e)==="[object Object]",nD=e=>e==null?"":Ro(e)||Mn(e)&&e.toString===VA?JSON.stringify(e,null,2):String(e);function Hy(e,t=""){return e.reduce((n,o,s)=>s===0?n+o:n+t+o,"")}const R0=e=>!Bn(e)||Ro(e);function Ih(e,t){if(R0(e)||R0(t))throw new Error("Invalid value");const n=[{src:e,des:t}];for(;n.length;){const{src:o,des:s}=n.pop();Object.keys(o).forEach(i=>{i!=="__proto__"&&(Bn(o[i])&&!Bn(s[i])&&(s[i]=Array.isArray(o[i])?[]:no()),R0(s[i])||R0(o[i])?s[i]=o[i]:n.push({src:o[i],des:s[i]}))})}}/*! - * message-compiler v11.4.6 - * (c) 2026 kazuya kawaguchi - * Released under the MIT License. - */function oD(e,t,n){return{line:e,column:t,offset:n}}function z4(e,t,n){return{start:e,end:t}}const Kn={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14},sD=17;function Gg(e,t,n={}){const{domain:o,messages:s,args:i}=n,r=e,l=new SyntaxError(String(r));return l.code=e,t&&(l.location=t),l.domain=o,l}function iD(e){throw e}const nl=" ",rD="\r",Us=` -`,lD="\u2028",aD="\u2029";function cD(e){const t=e;let n=0,o=1,s=1,i=0;const r=L=>t[L]===rD&&t[L+1]===Us,l=L=>t[L]===Us,a=L=>t[L]===aD,c=L=>t[L]===lD,u=L=>r(L)||l(L)||a(L)||c(L),d=()=>n,f=()=>o,h=()=>s,m=()=>i,g=L=>r(L)||a(L)||c(L)?Us:t[L],b=()=>g(n),_=()=>g(n+i);function v(){return i=0,u(n)&&(o++,s=0),r(n)&&n++,n++,s++,t[n]}function y(){return r(n+i)&&i++,i++,t[n+i]}function w(){n=0,o=1,s=1,i=0}function x(L=0){i=L}function A(){const L=n+i;for(;L!==n;)v();i=0}return{index:d,line:f,column:h,peekOffset:m,charAt:g,currentChar:b,currentPeek:_,next:v,peek:y,reset:w,resetPeek:x,skipToPeek:A}}const Ol=void 0,uD=".",Y7="'",dD="tokenizer";function fD(e,t={}){const n=t.location!==!1,o=cD(e),s=()=>o.index(),i=()=>oD(o.line(),o.column(),o.index()),r=i(),l=s(),a={currentType:13,offset:l,startLoc:r,endLoc:r,lastType:13,lastOffset:l,lastStartLoc:r,lastEndLoc:r,braceNest:0,inLinked:!1,text:""},c=()=>a,{onError:u}=t;function d(J,se,ce,...he){const Ie=c();if(se.column+=ce,se.offset+=ce,u){const Ge=n?z4(Ie.startLoc,se):null,we=Gg(J,Ge,{domain:dD,args:he});u(we)}}function f(J,se,ce){J.endLoc=i(),J.currentType=se;const he={type:se};return n&&(he.loc=z4(J.startLoc,J.endLoc)),ce!=null&&(he.value=ce),he}const h=J=>f(J,13);function m(J,se){return J.currentChar()===se?(J.next(),se):(d(Kn.EXPECTED_TOKEN,i(),0,se),"")}function g(J){let se="";for(;J.currentPeek()===nl||J.currentPeek()===Us;)se+=J.currentPeek(),J.peek();return se}function b(J){const se=g(J);return J.skipToPeek(),se}function _(J){if(J===Ol)return!1;const se=J.charCodeAt(0);return se>=97&&se<=122||se>=65&&se<=90||se===95}function v(J){if(J===Ol)return!1;const se=J.charCodeAt(0);return se>=48&&se<=57}function y(J,se){const{currentType:ce}=se;if(ce!==2)return!1;g(J);const he=_(J.currentPeek());return J.resetPeek(),he}function w(J,se){const{currentType:ce}=se;if(ce!==2)return!1;g(J);const he=J.currentPeek()==="-"?J.peek():J.currentPeek(),Ie=v(he);return J.resetPeek(),Ie}function x(J,se){const{currentType:ce}=se;if(ce!==2)return!1;g(J);const he=J.currentPeek()===Y7;return J.resetPeek(),he}function A(J,se){const{currentType:ce}=se;if(ce!==7)return!1;g(J);const he=J.currentPeek()===".";return J.resetPeek(),he}function L(J,se){const{currentType:ce}=se;if(ce!==8)return!1;g(J);const he=_(J.currentPeek());return J.resetPeek(),he}function S(J,se){const{currentType:ce}=se;if(!(ce===7||ce===11))return!1;g(J);const he=J.currentPeek()===":";return J.resetPeek(),he}function T(J,se){const{currentType:ce}=se;if(ce!==9)return!1;const he=()=>{const Ge=J.currentPeek();return Ge==="{"?_(J.peek()):Ge==="@"||Ge==="|"||Ge===":"||Ge==="."||Ge===nl||!Ge?!1:Ge===Us?(J.peek(),he()):B(J,!1)},Ie=he();return J.resetPeek(),Ie}function R(J){g(J);const se=J.currentPeek()==="|";return J.resetPeek(),se}function B(J,se=!0){const ce=(Ie=!1,Ge="")=>{const we=J.currentPeek();return we==="{"||we==="@"||!we?Ie:we==="|"?!(Ge===nl||Ge===Us):we===nl?(J.peek(),ce(!0,nl)):we===Us?(J.peek(),ce(!0,Us)):!0},he=ce();return se&&J.resetPeek(),he}function I(J,se){const ce=J.currentChar();return ce===Ol?Ol:se(ce)?(J.next(),ce):null}function $(J){const se=J.charCodeAt(0);return se>=97&&se<=122||se>=65&&se<=90||se>=48&&se<=57||se===95||se===36}function D(J){return I(J,$)}function H(J){const se=J.charCodeAt(0);return se>=97&&se<=122||se>=65&&se<=90||se>=48&&se<=57||se===95||se===36||se===45}function O(J){return I(J,H)}function P(J){const se=J.charCodeAt(0);return se>=48&&se<=57}function z(J){return I(J,P)}function W(J){const se=J.charCodeAt(0);return se>=48&&se<=57||se>=65&&se<=70||se>=97&&se<=102}function U(J){return I(J,W)}function G(J){let se="",ce="";for(;se=z(J);)ce+=se;return ce}function Z(J){let se="";for(;;){const ce=J.currentChar();if(ce==="\\"){const he=J.peek();he==="{"||he==="}"||he==="@"||he==="|"||he==="\\"?(se+=ce+he,J.next(),J.next()):(J.resetPeek(),se+=ce,J.next())}else{if(ce==="{"||ce==="}"||ce==="@"||ce==="|"||!ce)break;if(ce===nl||ce===Us)if(B(J))se+=ce,J.next();else{if(R(J))break;se+=ce,J.next()}else se+=ce,J.next()}}return se}function ee(J){b(J);let se="",ce="";for(;se=O(J);)ce+=se;const he=J.currentChar();if(he&&he!=="}"&&he!==Ol&&he!==nl&&he!==Us&&he!==" "){const Ie=ge(J);return d(Kn.INVALID_TOKEN_IN_PLACEHOLDER,i(),0,ce+Ie),ce+Ie}return J.currentChar()===Ol&&d(Kn.UNTERMINATED_CLOSING_BRACE,i(),0),ce}function Q(J){b(J);let se="";return J.currentChar()==="-"?(J.next(),se+=`-${G(J)}`):se+=G(J),J.currentChar()===Ol&&d(Kn.UNTERMINATED_CLOSING_BRACE,i(),0),se}function X(J){return J!==Y7&&J!==Us}function oe(J){b(J),m(J,"'");let se="",ce="";for(;se=I(J,X);)se==="\\"?ce+=xe(J):ce+=se;const he=J.currentChar();return he===Us||he===Ol?(d(Kn.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,i(),0),he===Us&&(J.next(),m(J,"'")),ce):(m(J,"'"),ce)}function xe(J){const se=J.currentChar();switch(se){case"\\":case"'":return J.next(),`\\${se}`;case"u":return pe(J,se,4);case"U":return pe(J,se,6);default:return d(Kn.UNKNOWN_ESCAPE_SEQUENCE,i(),0,se),""}}function pe(J,se,ce){m(J,se);let he="";for(let Ie=0;Ie{const he=J.currentChar();return he==="{"||he==="@"||he==="|"||he==="("||he===")"||!he||he===nl?ce:(ce+=he,J.next(),se(ce))};return se("")}function j(J){b(J);const se=m(J,"|");return b(J),se}function Y(J,se){let ce=null;switch(J.currentChar()){case"{":return se.braceNest>=1&&d(Kn.NOT_ALLOW_NEST_PLACEHOLDER,i(),0),J.next(),ce=f(se,2,"{"),b(J),se.braceNest++,ce;case"}":return se.braceNest>0&&se.currentType===2&&d(Kn.EMPTY_PLACEHOLDER,i(),0),J.next(),ce=f(se,3,"}"),se.braceNest--,se.braceNest>0&&b(J),se.inLinked&&se.braceNest===0&&(se.inLinked=!1),ce;case"@":return se.braceNest>0&&d(Kn.UNTERMINATED_CLOSING_BRACE,i(),0),ce=fe(J,se)||h(se),se.braceNest=0,ce;default:{let Ie=!0,Ge=!0,we=!0;if(R(J))return se.braceNest>0&&d(Kn.UNTERMINATED_CLOSING_BRACE,i(),0),ce=f(se,1,j(J)),se.braceNest=0,se.inLinked=!1,ce;if(se.braceNest>0&&(se.currentType===4||se.currentType===5||se.currentType===6))return d(Kn.UNTERMINATED_CLOSING_BRACE,i(),0),se.braceNest=0,ue(J,se);if(Ie=y(J,se))return ce=f(se,4,ee(J)),b(J),ce;if(Ge=w(J,se))return ce=f(se,5,Q(J)),b(J),ce;if(we=x(J,se))return ce=f(se,6,oe(J)),b(J),ce;if(!Ie&&!Ge&&!we)return ce=f(se,12,ge(J)),d(Kn.INVALID_TOKEN_IN_PLACEHOLDER,i(),0,ce.value),b(J),ce;break}}return ce}function fe(J,se){const{currentType:ce}=se;let he=null;const Ie=J.currentChar();switch((ce===7||ce===8||ce===11||ce===9)&&(Ie===Us||Ie===nl)&&d(Kn.INVALID_LINKED_FORMAT,i(),0),Ie){case"@":return J.next(),he=f(se,7,"@"),se.inLinked=!0,he;case".":return b(J),J.next(),f(se,8,".");case":":return b(J),J.next(),f(se,9,":");default:return R(J)?(he=f(se,1,j(J)),se.braceNest=0,se.inLinked=!1,he):A(J,se)||S(J,se)?(b(J),fe(J,se)):L(J,se)?(b(J),f(se,11,ne(J))):T(J,se)?(b(J),Ie==="{"?Y(J,se)||he:f(se,10,ae(J))):(ce===7&&d(Kn.INVALID_LINKED_FORMAT,i(),0),se.braceNest=0,se.inLinked=!1,ue(J,se))}}function ue(J,se){let ce={type:13};if(se.braceNest>0)return Y(J,se)||h(se);if(se.inLinked)return fe(J,se)||h(se);switch(J.currentChar()){case"{":return Y(J,se)||h(se);case"}":return d(Kn.UNBALANCED_CLOSING_BRACE,i(),0),J.next(),f(se,3,"}");case"@":return fe(J,se)||h(se);default:{if(R(J))return ce=f(se,1,j(J)),se.braceNest=0,se.inLinked=!1,ce;if(B(J))return f(se,0,Z(J));break}}return ce}function de(){const{currentType:J,offset:se,startLoc:ce,endLoc:he}=a;return a.lastType=J,a.lastOffset=se,a.lastStartLoc=ce,a.lastEndLoc=he,a.offset=s(),a.startLoc=i(),o.currentChar()===Ol?f(a,13):ue(o,a)}return{nextToken:de,currentOffset:s,currentPosition:i,context:c}}const pD="parser",hD=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g,mD=/\\([\\@{}|])/g;function gD(e,t){return t}function vD(e,t,n){switch(e){case"\\\\":return"\\";case"\\'":return"'";default:{const o=parseInt(t||n,16);return o<=55295||o>=57344?String.fromCodePoint(o):"�"}}}function yD(e={}){const t=e.location!==!1,{onError:n}=e;function o(_,v,y,w,...x){const A=_.currentPosition();if(A.offset+=w,A.column+=w,n){const L=t?z4(y,A):null,S=Gg(v,L,{domain:pD,args:x});n(S)}}function s(_,v,y){const w={type:_};return t&&(w.start=v,w.end=v,w.loc={start:y,end:y}),w}function i(_,v,y,w){t&&(_.end=v,_.loc&&(_.loc.end=y))}function r(_,v){const y=_.context(),w=s(3,y.offset,y.startLoc);return w.value=v.replace(mD,gD),i(w,_.currentOffset(),_.currentPosition()),w}function l(_,v){const y=_.context(),{lastOffset:w,lastStartLoc:x}=y,A=s(5,w,x);return A.index=parseInt(v,10),_.nextToken(),i(A,_.currentOffset(),_.currentPosition()),A}function a(_,v){const y=_.context(),{lastOffset:w,lastStartLoc:x}=y,A=s(4,w,x);return A.key=v,_.nextToken(),i(A,_.currentOffset(),_.currentPosition()),A}function c(_,v){const y=_.context(),{lastOffset:w,lastStartLoc:x}=y,A=s(9,w,x);return A.value=v.replace(hD,vD),_.nextToken(),i(A,_.currentOffset(),_.currentPosition()),A}function u(_){const v=_.nextToken(),y=_.context(),{lastOffset:w,lastStartLoc:x}=y,A=s(8,w,x);return v.type!==11?(o(_,Kn.UNEXPECTED_EMPTY_LINKED_MODIFIER,y.lastStartLoc,0),A.value="",i(A,w,x),{nextConsumeToken:v,node:A}):(v.value==null&&o(_,Kn.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,ol(v)),A.value=v.value||"",i(A,_.currentOffset(),_.currentPosition()),{node:A})}function d(_,v){const y=_.context(),w=s(7,y.offset,y.startLoc);return w.value=v,i(w,_.currentOffset(),_.currentPosition()),w}function f(_){const v=_.context(),y=s(6,v.offset,v.startLoc);let w=_.nextToken();if(w.type===8){const x=u(_);y.modifier=x.node,w=x.nextConsumeToken||_.nextToken()}switch(w.type!==9&&o(_,Kn.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,ol(w)),w=_.nextToken(),w.type===2&&(w=_.nextToken()),w.type){case 10:w.value==null&&o(_,Kn.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,ol(w)),y.key=d(_,w.value||"");break;case 4:w.value==null&&o(_,Kn.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,ol(w)),y.key=a(_,w.value||"");break;case 5:w.value==null&&o(_,Kn.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,ol(w)),y.key=l(_,w.value||"");break;case 6:w.value==null&&o(_,Kn.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,ol(w)),y.key=c(_,w.value||"");break;default:{o(_,Kn.UNEXPECTED_EMPTY_LINKED_KEY,v.lastStartLoc,0);const x=_.context(),A=s(7,x.offset,x.startLoc);return A.value="",i(A,x.offset,x.startLoc),y.key=A,i(y,x.offset,x.startLoc),{nextConsumeToken:w,node:y}}}return i(y,_.currentOffset(),_.currentPosition()),{node:y}}function h(_){const v=_.context(),y=v.currentType===1?_.currentOffset():v.offset,w=v.currentType===1?v.endLoc:v.startLoc,x=s(2,y,w);x.items=[];let A=null;do{const T=A||_.nextToken();switch(A=null,T.type){case 0:T.value==null&&o(_,Kn.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,ol(T)),x.items.push(r(_,T.value||""));break;case 5:T.value==null&&o(_,Kn.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,ol(T)),x.items.push(l(_,T.value||""));break;case 4:T.value==null&&o(_,Kn.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,ol(T)),x.items.push(a(_,T.value||""));break;case 6:T.value==null&&o(_,Kn.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,ol(T)),x.items.push(c(_,T.value||""));break;case 7:{const R=f(_);x.items.push(R.node),A=R.nextConsumeToken||null;break}}}while(v.currentType!==13&&v.currentType!==1);const L=v.currentType===1?v.lastOffset:_.currentOffset(),S=v.currentType===1?v.lastEndLoc:_.currentPosition();return i(x,L,S),x}function m(_,v,y,w){const x=_.context();let A=w.items.length===0;const L=s(1,v,y);L.cases=[],L.cases.push(w);do{const S=h(_);A||(A=S.items.length===0),L.cases.push(S)}while(x.currentType!==13);return A&&o(_,Kn.MUST_HAVE_MESSAGES_IN_PLURAL,y,0),i(L,_.currentOffset(),_.currentPosition()),L}function g(_){const v=_.context(),{offset:y,startLoc:w}=v,x=h(_);return v.currentType===13?x:m(_,y,w,x)}function b(_){const v=fD(_,ss({},e)),y=v.context(),w=s(0,y.offset,y.startLoc);return t&&w.loc&&(w.loc.source=_),w.body=g(v),e.onCacheKey&&(w.cacheKey=e.onCacheKey(_)),y.currentType!==13&&o(v,Kn.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,_[y.offset]||""),i(w,v.currentOffset(),v.currentPosition()),w}return{parse:b}}function ol(e){if(e.type===13)return"EOF";const t=(e.value||"").replace(/\r?\n/gu,"\\n");return t.length>10?t.slice(0,9)+"…":t}function kD(e,t={}){const n={ast:e,helpers:new Set};return{context:()=>n,helper:i=>(n.helpers.add(i),i)}}function X7(e,t){for(let n=0;nJ7(n)),e}function J7(e){if(e.items.length===1){const t=e.items[0];(t.type===3||t.type===9)&&(e.static=t.value,delete t.value)}else{const t=[];for(let n=0;nr;function a(g,b){r.code+=g}function c(g,b=!0){const _=b?o:"";a(s?_+" ".repeat(g):_)}function u(g=!0){const b=++r.indentLevel;g&&c(b)}function d(g=!0){const b=--r.indentLevel;g&&c(b)}function f(){c(r.indentLevel)}return{context:l,push:a,indent:u,deindent:d,newline:f,helper:g=>`_${g}`,needIndent:()=>r.needIndent}}function _D(e,t){const{helper:n}=e;e.push(`${n("linked")}(`),Yd(e,t.key),t.modifier?(e.push(", "),Yd(e,t.modifier),e.push(", _type")):e.push(", undefined, _type"),e.push(")")}function xD(e,t){const{helper:n,needIndent:o}=e;e.push(`${n("normalize")}([`),e.indent(o());const s=t.items.length;for(let i=0;i1){e.push(`${n("plural")}([`),e.indent(o());const s=t.cases.length;for(let i=0;i{const n=Ht(t.mode)?t.mode:"normal",o=Ht(t.filename)?t.filename:"message.intl";t.sourceMap;const s=t.breakLineCode!=null?t.breakLineCode:n==="arrow"?";":` -`,i=t.needIndent?t.needIndent:n!=="arrow",r=e.helpers||[],l=wD(e,{filename:o,breakLineCode:s,needIndent:i});l.push(n==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),l.indent(i),r.length>0&&(l.push(`const { ${Hy(r.map(u=>`${u}: _${u}`),", ")} } = ctx`),l.newline()),l.push("return "),Yd(l,e),l.deindent(i),l.push("}"),delete e.helpers;const{code:a,map:c}=l.context();return{ast:e,code:a,map:c?c.toJSON():void 0}};function TD(e,t={}){const n=ss({},t),o=!!n.jit,s=!!n.minify,i=n.optimize==null?!0:n.optimize,l=yD(n).parse(e);return o?(i&&CD(l),s&&ad(l),{ast:l,code:""}):(bD(l,n),MD(l,n))}/*! - * core-base v11.4.6 - * (c) 2026 kazuya kawaguchi - * Released under the MIT License. - */function ED(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(Zc().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(Zc().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function ml(e){return Bn(e)&&Wy(e)===0&&(vr(e,"b")||vr(e,"body"))}const qA=["b","body"];function ID(e){return nc(e,qA)}const KA=["c","cases"];function LD(e){return nc(e,KA,[])}const ZA=["s","static"];function $D(e){return nc(e,ZA)}const GA=["i","items"];function ND(e){return nc(e,GA,[])}const YA=["t","type"];function Wy(e){return nc(e,YA)}const XA=["v","value"];function P0(e,t){const n=nc(e,XA);if(n!=null)return n;throw ip(t)}const JA=["m","modifier"];function OD(e){return nc(e,JA)}const QA=["k","key"];function FD(e){const t=nc(e,QA);if(t)return t;throw ip(6)}function nc(e,t,n){for(let o=0;oRD(n,e)}function RD(e,t){const n=ID(t);if(n==null)throw ip(0);if(Wy(n)===1){const i=LD(n);return e.plural(i.reduce((r,l)=>[...r,Q7(e,l)],[]))}else return Q7(e,n)}function Q7(e,t){const n=$D(t);if(n!=null)return e.type==="text"?n:e.normalize([n]);{const o=ND(t).reduce((s,i)=>[...s,W4(e,i)],[]);return e.normalize(o)}}function W4(e,t){const n=Wy(t);switch(n){case 3:return P0(t,n);case 9:return P0(t,n);case 4:{const o=t;if(vr(o,"k")&&o.k)return e.interpolate(e.named(o.k));if(vr(o,"key")&&o.key)return e.interpolate(e.named(o.key));throw ip(n)}case 5:{const o=t;if(vr(o,"i")&&ns(o.i))return e.interpolate(e.list(o.i));if(vr(o,"index")&&ns(o.index))return e.interpolate(e.list(o.index));throw ip(n)}case 6:{const o=t,s=OD(o),i=FD(o);return e.linked(W4(e,i),s?W4(e,s):void 0,e.type)}case 7:return P0(t,n);case 8:return P0(t,n);default:throw new Error(`unhandled node on format message part: ${n}`)}}const PD=e=>e;let D0=no();function DD(e,t={}){let n=!1;const o=t.onError||iD;return t.onError=s=>{n=!0,o(s)},{...TD(e,t),detectError:n}}function BD(e,t){if(!__INTLIFY_DROP_MESSAGE_COMPILER__&&Ht(e)){Fn(t.warnHtmlMessage)&&t.warnHtmlMessage;const o=(t.onCacheKey||PD)(e),s=D0[o];if(s)return s;const{ast:i,detectError:r}=DD(e,{...t,location:!1,jit:!0}),l=Vv(i);return r?l:D0[o]=l}else{const n=e.cacheKey;if(n){const o=D0[n];return o||(D0[n]=Vv(e))}else return Vv(e)}}let rp=null;function HD(e){rp=e}function zD(e,t,n){rp&&rp.emit("i18n:init",{timestamp:Date.now(),i18n:e,version:t,meta:n})}const WD=UD("function:translate");function UD(e){return t=>rp&&rp.emit(e,t)}const Vl={INVALID_ARGUMENT:sD,INVALID_DATE_ARGUMENT:18,INVALID_ISO_DATE_ARGUMENT:19,NOT_SUPPORT_LOCALE_PROMISE_VALUE:21,NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:22,NOT_SUPPORT_LOCALE_TYPE:23},jD=24;function ql(e){return Gg(e,null,void 0)}function Uy(e,t){return t.locale!=null?ek(t.locale):ek(e.locale)}let qv;function ek(e){if(Ht(e))return e;if(vo(e)){if(e.resolvedOnce&&qv!=null)return qv;if(e.constructor.name==="Function"){const t=e();if(tD(t))throw ql(Vl.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return qv=t}else throw ql(Vl.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw ql(Vl.NOT_SUPPORT_LOCALE_TYPE)}function VD(e,t,n){return[...new Set([n,...Ro(t)?t:Bn(t)?Object.keys(t):Ht(t)?[t]:[n]])]}function U4(e,t,n){const o=Ht(n)?n:lp,s=e;s.__localeChainCache||(s.__localeChainCache=new Map);let i=s.__localeChainCache.get(o);if(!i){i=[];let r=[n];for(;Ro(r);)r=tk(i,r,t);const l=Ro(t)||!Mn(t)?t:t.default?t.default:null;r=Ht(l)?[l]:l,Ro(r)&&tk(i,r,!1),s.__localeChainCache.set(o,i)}return i}function tk(e,t,n){let o=!0;for(let s=0;s{r===void 0?r=l:r+=l},f[1]=()=>{r!==void 0&&(t.push(r),r=void 0)},f[2]=()=>{f[0](),s++},f[3]=()=>{if(s>0)s--,o=4,f[0]();else{if(s=0,r===void 0||(r=JD(r),r===!1))return!1;f[1]()}};function h(){const m=e[n+1];if(o===5&&m==="'"||o===6&&m==='"')return n++,l="\\"+m,f[0](),!0}for(;o!==null;)if(n++,i=e[n],!(i==="\\"&&h())){if(a=XD(i),d=oc[o],c=d[a]||d.l||8,c===8||(o=c[0],c[1]!==void 0&&(u=f[c[1]],u&&(l=i,u()===!1))))return;if(o===7)return t}}const nk=new Map;function eB(e,t){return Bn(e)?e[t]:null}function tB(e,t){if(!Bn(e))return null;let n=nk.get(t);if(n||(n=QD(t),n&&nk.set(t,n)),!n)return null;const o=n.length;let s=e,i=0;for(;i`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;function oB(){return{upper:(e,t)=>t==="text"&&Ht(e)?e.toUpperCase():t==="vnode"&&Bn(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,t)=>t==="text"&&Ht(e)?e.toLowerCase():t==="vnode"&&Bn(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,t)=>t==="text"&&Ht(e)?ok(e):t==="vnode"&&Bn(e)&&"__v_isVNode"in e?ok(e.children):e}}let tM;function sB(e){tM=e}let nM;function iB(e){nM=e}let oM;function rB(e){oM=e}let sM=null;const lB=e=>{sM=e},aB=()=>sM;let iM=null;const sk=e=>{iM=e},cB=()=>iM;let ik=0;function uB(e={}){const t=vo(e.onWarn)?e.onWarn:VP,n=Ht(e.version)?e.version:nB,o=Ht(e.locale)||vo(e.locale)?e.locale:lp,s=vo(o)?lp:o,i=Ro(e.fallbackLocale)||Mn(e.fallbackLocale)||Ht(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:s,r=Mn(e.messages)?e.messages:Kv(s),l=Mn(e.datetimeFormats)?e.datetimeFormats:Kv(s),a=Mn(e.numberFormats)?e.numberFormats:Kv(s),c=ss(no(),e.modifiers,oB()),u=e.pluralRules||no(),d=vo(e.missing)?e.missing:null,f=Fn(e.missingWarn)||Gd(e.missingWarn)?e.missingWarn:!0,h=Fn(e.fallbackWarn)||Gd(e.fallbackWarn)?e.fallbackWarn:!0,m=!!e.fallbackFormat,g=!!e.unresolving,b=vo(e.postTranslation)?e.postTranslation:null,_=Mn(e.processor)?e.processor:null,v=Fn(e.warnHtmlMessage)?e.warnHtmlMessage:!0,y=!!e.escapeParameter,w=vo(e.messageCompiler)?e.messageCompiler:tM,x=vo(e.messageResolver)?e.messageResolver:nM||eB,A=vo(e.localeFallbacker)?e.localeFallbacker:oM||VD,L=Bn(e.fallbackContext)?e.fallbackContext:void 0,S=e,T=Bn(S.__datetimeFormatters)?S.__datetimeFormatters:new Map,R=Bn(S.__numberFormatters)?S.__numberFormatters:new Map,B=Bn(S.__meta)?S.__meta:{};ik++;const I={version:n,cid:ik,locale:o,fallbackLocale:i,messages:r,modifiers:c,pluralRules:u,missing:d,missingWarn:f,fallbackWarn:h,fallbackFormat:m,unresolving:g,postTranslation:b,processor:_,warnHtmlMessage:v,escapeParameter:y,messageCompiler:w,messageResolver:x,localeFallbacker:A,fallbackContext:L,onWarn:t,__meta:B};return I.datetimeFormats=l,I.numberFormats=a,I.__datetimeFormatters=T,I.__numberFormatters=R,__INTLIFY_PROD_DEVTOOLS__&&zD(I,n,B),I}const Kv=e=>({[e]:no()});function jy(e,t,n,o,s){const{missing:i,onWarn:r}=e;if(i!==null){const l=i(e,n,t,s);return Ht(l)?l:t}else return t}function Kf(e,t,n){const o=e;o.__localeChainCache=new Map,e.localeFallbacker(e,n,t)}function dB(e,t){return e===t?!1:e.split("-")[0]===t.split("-")[0]}function fB(e,t){const n=t.indexOf(e);if(n===-1)return!1;for(let o=n+1;o{rM.includes(a)?r[a]=n[a]:i[a]=n[a]}),Ht(o)?i.locale=o:Mn(o)&&(r=o),Mn(s)&&(r=s),[i.key||"",l,i,r]}function lk(e,t,n){const o=e;for(const s in n){const i=`${t}__${s}`;o.__datetimeFormatters.has(i)&&o.__datetimeFormatters.delete(i)}}function ak(e,...t){const{numberFormats:n,unresolving:o,fallbackLocale:s,onWarn:i,localeFallbacker:r}=e,{__numberFormatters:l}=e;if(!ns(t[0]))return xm;const[a,c,u,d]=V4(...t),f=Fn(u.missingWarn)?u.missingWarn:e.missingWarn;Fn(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn;const h=!!u.part,m=Uy(e,u),g=r(e,s,m);if(!Ht(a)||a===""){const A=new Intl.NumberFormat(m.replace(/!/g,""),d);return h?A.formatToParts(c):A.format(c)}let b={},_,v=null;const y="number format";for(let A=0;A{lM.includes(a)?r[a]=n[a]:i[a]=n[a]}),Ht(o)?i.locale=o:Mn(o)&&(r=o),Mn(s)&&(r=s),[i.key||"",l,i,r]}function ck(e,t,n){const o=e;for(const s in n){const i=`${t}__${s}`;o.__numberFormatters.has(i)&&o.__numberFormatters.delete(i)}}const pB=e=>e,hB=e=>"",mB="text",gB=e=>e.length===0?"":Hy(e),vB=nD;function Zv(e,t){return e=Math.abs(e),t===2?e===1?0:1:Math.min(e,2)}function yB(e){const t=ns(e.pluralIndex)?e.pluralIndex:-1;return ns(e.named?.count)?e.named.count:ns(e.named?.n)?e.named.n:t}function kB(e={}){const t=e.locale,n=yB(e),o=Ht(t)&&vo(e.pluralRules?.[t])?e.pluralRules[t]:Zv,s=o===Zv?void 0:Zv,i=_=>_[o(n,_.length,s)],r=e.list||[],l=_=>r[_],a=e.named||no();ns(e.pluralIndex)&&(a.count||=e.pluralIndex,a.n||=e.pluralIndex);const c=_=>a[_];function u(_,v){const y=vo(e.messages)?e.messages(_,!!v):Bn(e.messages)?e.messages[_]:!1;return y||(e.parent?e.parent.message(_):hB)}const d=_=>e.modifiers?e.modifiers[_]:pB,f=vo(e.processor?.normalize)?e.processor.normalize:gB,h=vo(e.processor?.interpolate)?e.processor.interpolate:vB,m=Ht(e.processor?.type)?e.processor.type:mB,b={list:l,named:c,plural:i,linked:(_,...v)=>{const[y,w]=v;let x="text",A="";v.length===1?Bn(y)?(A=y.modifier||A,x=y.type||x):Ht(y)&&(A=y||A):v.length===2&&(Ht(y)&&(A=y||A),Ht(w)&&(x=w||x));const L=u(_,!0)(b),S=L===""||L===void 0?_:L,T=x==="vnode"&&Ro(S)&&A?S[0]:S;return A?d(A)(T,x):T},message:u,type:m,interpolate:h,normalize:f,values:ss(no(),r,a)};return b}const uk=()=>"",gr=e=>vo(e);function dk(e,...t){const{fallbackFormat:n,postTranslation:o,unresolving:s,messageCompiler:i,fallbackLocale:r,messages:l}=e,[a,c]=q4(...t),u=Fn(c.missingWarn)?c.missingWarn:e.missingWarn,d=Fn(c.fallbackWarn)?c.fallbackWarn:e.fallbackWarn,f=Fn(c.escapeParameter)?c.escapeParameter:e.escapeParameter,h=!!c.resolvedMessage,m=Ht(c.default)||Fn(c.default)?Fn(c.default)?i?a:()=>a:c.default:n?i?a:()=>a:null,g=n||m!=null&&(Ht(m)||vo(m)),b=Uy(e,c);f&&bB(c);let[_,v,y]=h?[a,b,l[b]||no()]:aM(e,a,b,r,d,u),w=_,x=a;if(!h&&!(Ht(w)||ml(w)||gr(w))&&g&&(w=m,x=w),!h&&(!(Ht(w)||ml(w)||gr(w))||!Ht(v)))return s?Yg:a;let A=!1;const L=()=>{A=!0},S=gr(w)?w:cM(e,a,v,w,x,L);if(A)return w;const T=_B(e,v,y,c),R=kB(T),B=CB(e,S,R);let I=o?o(B,a):B;if(f&&Ht(I)&&(I=QP(I)),__INTLIFY_PROD_DEVTOOLS__){const $={timestamp:Date.now(),key:Ht(a)?a:gr(w)?w.key:"",locale:v||(gr(w)?w.locale:""),format:Ht(w)?w:gr(w)?w.source:"",message:I};$.meta=ss({},e.__meta,aB()||{}),WD($)}return I}function bB(e){Ro(e.list)?e.list=e.list.map(t=>Ht(t)?Z7(t):t):Bn(e.named)&&Object.keys(e.named).forEach(t=>{Ht(e.named[t])&&(e.named[t]=Z7(e.named[t]))})}function aM(e,t,n,o,s,i){const{messages:r,onWarn:l,messageResolver:a,localeFallbacker:c}=e,u=c(e,o,n);let d=no(),f,h=null;const m="translate";for(let g=0;go);return c.locale=n,c.key=t,c}const a=r(o,wB(e,n,s,o,l,i));return a.locale=n,a.key=t,a.source=o,a}function CB(e,t,n){return t(n)}function q4(...e){const[t,n,o]=e,s=no();if(!Ht(t)&&!ns(t)&&!gr(t)&&!ml(t))throw ql(Vl.INVALID_ARGUMENT);const i=ns(t)?String(t):(gr(t),t);return ns(n)?s.plural=n:Ht(n)?s.default=n:Mn(n)&&!Zg(n)?s.named=n:Ro(n)&&(s.list=n),ns(o)?s.plural=o:Ht(o)?s.default=o:Mn(o)&&ss(s,o),[i,s]}function wB(e,t,n,o,s,i){return{locale:t,key:n,warnHtmlMessage:s,onError:r=>{throw i&&i(r),r},onCacheKey:r=>qP(t,n,r)}}function _B(e,t,n,o){const{modifiers:s,pluralRules:i,messageResolver:r,fallbackLocale:l,fallbackWarn:a,missingWarn:c,fallbackContext:u}=e,f={locale:t,modifiers:s,pluralRules:i,messages:(h,m)=>{let g=r(n,h);if(g==null&&(u||m)){const[b,,_]=aM(u||e,h,t,l,a,c);g=b??r(_,h)}if(Ht(g)||ml(g)){let b=!1;const v=cM(e,h,t,g,h,()=>{b=!0});return b?uk:v}else return gr(g)?g:uk}};return e.processor&&(f.processor=e.processor),o.list&&(f.list=o.list),o.named&&(f.named=o.named),ns(o.plural)&&(f.pluralIndex=o.plural),f}ED();/*! - * vue-i18n v11.4.6 - * (c) 2026 kazuya kawaguchi - * Released under the MIT License. - */const xB="11.4.6";function SB(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(Zc().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(Zc().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(Zc().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(Zc().__INTLIFY_PROD_DEVTOOLS__=!1)}const ci={UNEXPECTED_RETURN_TYPE:jD,INVALID_ARGUMENT:25,MUST_BE_CALL_SETUP_TOP:26,NOT_INSTALLED:27,REQUIRED_VALUE:28,INVALID_VALUE:29,NOT_INSTALLED_WITH_PROVIDE:31,UNEXPECTED_ERROR:32,NOT_AVAILABLE_COMPOSITION_IN_LEGACY:34};function Ti(e,...t){return Gg(e,null,void 0)}const K4=tc("__translateVNode"),Z4=tc("__datetimeParts"),G4=tc("__numberParts"),uM=tc("__setPluralRules"),dM=tc("__injectWithOption"),md=tc("__dispose");function ap(e){if(!Bn(e)||ml(e))return e;for(const t in e)if(vr(e,t))if(!t.includes("."))Bn(e[t])&&ap(e[t]);else{const n=t.split("."),o=n.length-1;let s=e,i=!1;for(let r=0;r{if("locale"in l&&"resource"in l){const{locale:a,resource:c}=l;a?(r[a]=r[a]||no(),Ih(c,r[a])):Ih(c,r)}else Ht(l)&&Ih(JSON.parse(l),r)}),s==null&&i)for(const l in r)vr(r,l)&&ap(r[l]);return r}function fM(e){return e.type}function pM(e,t,n){let o=Bn(t.messages)?t.messages:no();"__i18nGlobal"in n&&(o=Vy(e.locale.value,{messages:o,__i18n:n.__i18nGlobal}));const s=Object.keys(o);s.length&&s.forEach(i=>{e.mergeLocaleMessage(i,o[i])});{if(Bn(t.datetimeFormats)){const i=Object.keys(t.datetimeFormats);i.length&&i.forEach(r=>{e.mergeDateTimeFormat(r,t.datetimeFormats[r])})}if(Bn(t.numberFormats)){const i=Object.keys(t.numberFormats);i.length&&i.forEach(r=>{e.mergeNumberFormat(r,t.numberFormats[r])})}}}function fk(e){return q(Ba,null,e,0)}function cp(){return rs()}const pk="__INTLIFY_META__",hk=()=>[],AB=()=>!1;let mk=0;function gk(e){return((t,n,o,s)=>e(n,o,cp()||void 0,s))}const MB=()=>{const e=cp();let t=null;return e&&(t=fM(e)[pk])?{[pk]:t}:null};function Sm(e={}){const{__root:t,__injectWithOption:n}=e,o=t===void 0,s=e.flatJson,i=_m?K:Kr;let r=Fn(e.inheritLocale)?e.inheritLocale:!0;const l=i(t&&r?t.locale.value:Ht(e.locale)?e.locale:lp),a=i(t&&r?t.fallbackLocale.value:Ht(e.fallbackLocale)||Ro(e.fallbackLocale)||Mn(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:l.value),c=i(Vy(l.value,e)),u=i(Mn(e.datetimeFormats)?e.datetimeFormats:{[l.value]:{}}),d=i(Mn(e.numberFormats)?e.numberFormats:{[l.value]:{}});let f=t?t.missingWarn:Fn(e.missingWarn)||Gd(e.missingWarn)?e.missingWarn:!0,h=t?t.fallbackWarn:Fn(e.fallbackWarn)||Gd(e.fallbackWarn)?e.fallbackWarn:!0,m=t?t.fallbackRoot:Fn(e.fallbackRoot)?e.fallbackRoot:!0,g=!!e.fallbackFormat,b=vo(e.missing)?e.missing:null,_=vo(e.missing)?gk(e.missing):null,v=vo(e.postTranslation)?e.postTranslation:null,y=t?t.warnHtmlMessage:Fn(e.warnHtmlMessage)?e.warnHtmlMessage:!0,w=!!e.escapeParameter;const x=t?t.modifiers:Mn(e.modifiers)?e.modifiers:{};let A=e.pluralRules||t&&t.pluralRules,L;L=(()=>{o&&sk(null);const we={version:xB,locale:l.value,fallbackLocale:a.value,messages:c.value,modifiers:x,pluralRules:A,missing:_===null?void 0:_,missingWarn:f,fallbackWarn:h,fallbackFormat:g,unresolving:!0,postTranslation:v===null?void 0:v,warnHtmlMessage:y,escapeParameter:w,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:"vue"}};we.datetimeFormats=u.value,we.numberFormats=d.value,we.__datetimeFormatters=Mn(L)?L.__datetimeFormatters:void 0,we.__numberFormatters=Mn(L)?L.__numberFormatters:void 0;const Te=uB(we);return o&&sk(Te),Te})(),Kf(L,l.value,a.value);function T(){return[l.value,a.value,c.value,u.value,d.value]}const R=F({get:()=>l.value,set:we=>{L.locale=we,l.value=we}}),B=F({get:()=>a.value,set:we=>{L.fallbackLocale=we,a.value=we,Kf(L,l.value,we)}}),I=F(()=>c.value),$=F(()=>u.value),D=F(()=>d.value);function H(){return vo(v)?v:null}function O(we){v=we,L.postTranslation=we}function P(){return b}function z(we){we!==null&&(_=gk(we)),b=we,L.missing=_}const W=(we,Te,st,Ne,Re,Ze)=>{T();let gt;try{__INTLIFY_PROD_DEVTOOLS__,o||(L.fallbackContext=t?cB():void 0),gt=we(L)}finally{__INTLIFY_PROD_DEVTOOLS__,o||(L.fallbackContext=void 0)}if(st!=="translate exists"&&ns(gt)&>===Yg||st==="translate exists"&&!gt){const[Pt,Tt]=Te();return t&&m?Ne(t):Re(Pt)}else{if(Ze(gt))return gt;throw Ti(ci.UNEXPECTED_RETURN_TYPE)}};function U(...we){return W(Te=>Reflect.apply(dk,null,[Te,...we]),()=>q4(...we),"translate",Te=>Reflect.apply(Te.t,Te,[...we]),Te=>Te,Te=>Ht(Te))}function G(...we){const[Te,st,Ne]=we;if(Ne&&!Bn(Ne))throw Ti(ci.INVALID_ARGUMENT);return U(Te,st,ss({resolvedMessage:!0},Ne||{}))}function Z(...we){return W(Te=>Reflect.apply(rk,null,[Te,...we]),()=>j4(...we),"datetime format",Te=>Reflect.apply(Te.d,Te,[...we]),()=>xm,Te=>Ht(Te)||Ro(Te))}function ee(...we){return W(Te=>Reflect.apply(ak,null,[Te,...we]),()=>V4(...we),"number format",Te=>Reflect.apply(Te.n,Te,[...we]),()=>xm,Te=>Ht(Te)||Ro(Te))}function Q(we){return we.map(Te=>Ht(Te)||ns(Te)||Fn(Te)?fk(String(Te)):Te)}const oe={normalize:Q,interpolate:we=>we,type:"vnode"};function xe(...we){return W(Te=>{let st;const Ne=Te;try{Ne.processor=oe,st=Reflect.apply(dk,null,[Ne,...we])}finally{Ne.processor=null}return st},()=>q4(...we),"translate",Te=>Te[K4](...we),Te=>[fk(Te)],Te=>Ro(Te))}function pe(...we){return W(Te=>Reflect.apply(ak,null,[Te,...we]),()=>V4(...we),"number format",Te=>Te[G4](...we),hk,Te=>Ht(Te)||Ro(Te))}function ve(...we){return W(Te=>Reflect.apply(rk,null,[Te,...we]),()=>j4(...we),"datetime format",Te=>Te[Z4](...we),hk,Te=>Ht(Te)||Ro(Te))}function ge(we){A=we,L.pluralRules=A}function ne(we,Te){return W(()=>{if(!we)return!1;const st=Ht(Te)?Te:l.value,Ne=Ht(Te)?[st]:U4(L,a.value,st);for(let Re=0;Re[we],"translate exists",st=>Reflect.apply(st.te,st,[we,Te]),AB,st=>Fn(st))}function ae(we){let Te=null;const st=U4(L,a.value,l.value);for(let Ne=0;Ne{r&&(l.value=we,L.locale=we,Kf(L,l.value,a.value))}),Je(t.fallbackLocale,we=>{r&&(a.value=we,L.fallbackLocale=we,Kf(L,l.value,a.value))}));const Ge={id:mk,locale:R,fallbackLocale:B,get inheritLocale(){return r},set inheritLocale(we){r=we,we&&t&&(l.value=t.locale.value,a.value=t.fallbackLocale.value,Kf(L,l.value,a.value))},get availableLocales(){return Object.keys(c.value).sort()},messages:I,get modifiers(){return x},get pluralRules(){return A||{}},get isGlobal(){return o},get missingWarn(){return f},set missingWarn(we){f=we,L.missingWarn=f},get fallbackWarn(){return h},set fallbackWarn(we){h=we,L.fallbackWarn=h},get fallbackRoot(){return m},set fallbackRoot(we){m=we},get fallbackFormat(){return g},set fallbackFormat(we){g=we,L.fallbackFormat=g},get warnHtmlMessage(){return y},set warnHtmlMessage(we){y=we,L.warnHtmlMessage=we},get escapeParameter(){return w},set escapeParameter(we){w=we,L.escapeParameter=we},t:U,getLocaleMessage:Y,setLocaleMessage:fe,mergeLocaleMessage:ue,getPostTranslationHandler:H,setPostTranslationHandler:O,getMissingHandler:P,setMissingHandler:z,[uM]:ge};return Ge.datetimeFormats=$,Ge.numberFormats=D,Ge.rt=G,Ge.te=ne,Ge.tm=j,Ge.d=Z,Ge.n=ee,Ge.getDateTimeFormat=de,Ge.setDateTimeFormat=J,Ge.mergeDateTimeFormat=se,Ge.getNumberFormat=ce,Ge.setNumberFormat=he,Ge.mergeNumberFormat=Ie,Ge[dM]=n,Ge[K4]=xe,Ge[Z4]=ve,Ge[G4]=pe,Ge}function TB(e){const t=Ht(e.locale)?e.locale:lp,n=Ht(e.fallbackLocale)||Ro(e.fallbackLocale)||Mn(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:t,o=vo(e.missing)?e.missing:void 0,s=Fn(e.silentTranslationWarn)||Gd(e.silentTranslationWarn)?!e.silentTranslationWarn:!0,i=Fn(e.silentFallbackWarn)||Gd(e.silentFallbackWarn)?!e.silentFallbackWarn:!0,r=Fn(e.fallbackRoot)?e.fallbackRoot:!0,l=!!e.formatFallbackMessages,a=Mn(e.modifiers)?e.modifiers:{},c=e.pluralizationRules,u=vo(e.postTranslation)?e.postTranslation:void 0,d=Ht(e.warnHtmlInMessage)?e.warnHtmlInMessage!=="off":!0,f=!!e.escapeParameterHtml,h=Fn(e.sync)?e.sync:!0;let m=e.messages;if(Mn(e.sharedMessages)){const x=e.sharedMessages;m=Object.keys(x).reduce((L,S)=>{const T=L[S]||(L[S]={});return ss(T,x[S]),L},m||{})}const{__i18n:g,__root:b,__injectWithOption:_}=e,v=e.datetimeFormats,y=e.numberFormats,w=e.flatJson;return{locale:t,fallbackLocale:n,messages:m,flatJson:w,datetimeFormats:v,numberFormats:y,missing:o,missingWarn:s,fallbackWarn:i,fallbackRoot:r,fallbackFormat:l,modifiers:a,pluralRules:c,postTranslation:u,warnHtmlMessage:d,escapeParameter:f,messageResolver:e.messageResolver,inheritLocale:h,__i18n:g,__root:b,__injectWithOption:_}}function Y4(e={}){const t=Sm(TB(e)),{__extender:n}=e,o={id:t.id,get locale(){return t.locale.value},set locale(s){t.locale.value=s},get fallbackLocale(){return t.fallbackLocale.value},set fallbackLocale(s){t.fallbackLocale.value=s},get messages(){return t.messages.value},get datetimeFormats(){return t.datetimeFormats.value},get numberFormats(){return t.numberFormats.value},get availableLocales(){return t.availableLocales},get missing(){return t.getMissingHandler()},set missing(s){t.setMissingHandler(s)},get silentTranslationWarn(){return Fn(t.missingWarn)?!t.missingWarn:t.missingWarn},set silentTranslationWarn(s){t.missingWarn=Fn(s)?!s:s},get silentFallbackWarn(){return Fn(t.fallbackWarn)?!t.fallbackWarn:t.fallbackWarn},set silentFallbackWarn(s){t.fallbackWarn=Fn(s)?!s:s},get modifiers(){return t.modifiers},get formatFallbackMessages(){return t.fallbackFormat},set formatFallbackMessages(s){t.fallbackFormat=s},get postTranslation(){return t.getPostTranslationHandler()},set postTranslation(s){t.setPostTranslationHandler(s)},get sync(){return t.inheritLocale},set sync(s){t.inheritLocale=s},get warnHtmlInMessage(){return t.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(s){t.warnHtmlMessage=s!=="off"},get escapeParameterHtml(){return t.escapeParameter},set escapeParameterHtml(s){t.escapeParameter=s},get pluralizationRules(){return t.pluralRules||{}},__composer:t,t(...s){return Reflect.apply(t.t,t,[...s])},rt(...s){return Reflect.apply(t.rt,t,[...s])},te(s,i){return t.te(s,i)},tm(s){return t.tm(s)},getLocaleMessage(s){return t.getLocaleMessage(s)},setLocaleMessage(s,i){t.setLocaleMessage(s,i)},mergeLocaleMessage(s,i){t.mergeLocaleMessage(s,i)},d(...s){return Reflect.apply(t.d,t,[...s])},getDateTimeFormat(s){return t.getDateTimeFormat(s)},setDateTimeFormat(s,i){t.setDateTimeFormat(s,i)},mergeDateTimeFormat(s,i){t.mergeDateTimeFormat(s,i)},n(...s){return Reflect.apply(t.n,t,[...s])},getNumberFormat(s){return t.getNumberFormat(s)},setNumberFormat(s,i){t.setNumberFormat(s,i)},mergeNumberFormat(s,i){t.mergeNumberFormat(s,i)}};return o.__extender=n,o}function EB(e,t,n){return{beforeCreate(){const o=cp();if(!o)throw Ti(ci.UNEXPECTED_ERROR);const s=this.$options;if(s.i18n){const i=s.i18n;if(s.__i18n&&(i.__i18n=s.__i18n),i.__root=t,this===this.$root)this.$i18n=vk(e,i);else{i.__injectWithOption=!0,i.__extender=n.__vueI18nExtend,this.$i18n=Y4(i);const r=this.$i18n;r.__extender&&(r.__disposer=r.__extender(this.$i18n))}}else if(s.__i18n)if(this===this.$root)this.$i18n=vk(e,s);else{this.$i18n=Y4({__i18n:s.__i18n,__injectWithOption:!0,__extender:n.__vueI18nExtend,__root:t});const i=this.$i18n;i.__extender&&(i.__disposer=i.__extender(this.$i18n))}else this.$i18n=e;s.__i18nGlobal&&pM(t,s,s),this.$t=(...i)=>this.$i18n.t(...i),this.$rt=(...i)=>this.$i18n.rt(...i),this.$te=(i,r)=>this.$i18n.te(i,r),this.$d=(...i)=>this.$i18n.d(...i),this.$n=(...i)=>this.$i18n.n(...i),this.$tm=i=>this.$i18n.tm(i),n.__setInstance(o,this.$i18n)},mounted(){},unmounted(){const o=cp();if(!o)throw Ti(ci.UNEXPECTED_ERROR);const s=this.$i18n;s&&(delete this.$t,delete this.$rt,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,s?.__disposer&&(s.__disposer(),delete s.__disposer,delete s.__extender),n.__deleteInstance(o),delete this.$i18n)}}}function vk(e,t){e.locale=t.locale||e.locale,e.fallbackLocale=t.fallbackLocale||e.fallbackLocale,e.missing=t.missing||e.missing,e.silentTranslationWarn=t.silentTranslationWarn||e.silentFallbackWarn,e.silentFallbackWarn=t.silentFallbackWarn||e.silentFallbackWarn,e.formatFallbackMessages=t.formatFallbackMessages||e.formatFallbackMessages,e.postTranslation=t.postTranslation||e.postTranslation,e.warnHtmlInMessage=t.warnHtmlInMessage||e.warnHtmlInMessage,e.escapeParameterHtml=t.escapeParameterHtml||e.escapeParameterHtml,e.sync=t.sync||e.sync,e.__composer[uM](t.pluralizationRules||e.pluralizationRules);const n=Vy(e.locale,{messages:t.messages,__i18n:t.__i18n});return Object.keys(n).forEach(o=>e.mergeLocaleMessage(o,n[o])),t.datetimeFormats&&Object.keys(t.datetimeFormats).forEach(o=>e.mergeDateTimeFormat(o,t.datetimeFormats[o])),t.numberFormats&&Object.keys(t.numberFormats).forEach(o=>e.mergeNumberFormat(o,t.numberFormats[o])),e}const qy={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e==="parent"||e==="global",default:"parent"},i18n:{type:Object}};function IB({slots:e},t){return t.length===1&&t[0]==="default"?(e.default?e.default():[]).reduce((o,s)=>[...o,...s.type===De?s.children:[s]],[]):t.reduce((n,o)=>{const s=e[o];return s&&(n[o]=s()),n},no())}function hM(){return De}const LB=et({name:"i18n-t",props:ss({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>ns(e)||!isNaN(e)}},qy),setup(e,t){const{slots:n,attrs:o}=t,s=e.i18n||$t({useScope:e.scope,__useComponent:!0});return()=>{const i=()=>{const a=Object.keys(n).filter(d=>d[0]!=="_"),c=no();e.locale&&(c.locale=e.locale),e.plural!==void 0&&(c.plural=Ht(e.plural)?+e.plural:e.plural);const u=IB(t,a);return s[K4](e.keypath,u,c)},r=ss(no(),o),l=Ht(e.tag)||Bn(e.tag)?e.tag:hM();return Bn(l)?Qt(l,r,{default:i}):Qt(l,r,i())}}}),yk=LB;function $B(e){return Ro(e)&&!Ht(e[0])}function mM(e,t,n,o){const{slots:s,attrs:i}=t;return()=>{const r=()=>{const c={part:!0};let u=no();e.locale&&(c.locale=e.locale),Ht(e.format)?c.key=e.format:Bn(e.format)&&(Ht(e.format.key)&&(c.key=e.format.key),u=Object.keys(e.format).reduce((h,m)=>n.includes(m)?ss(no(),h,{[m]:e.format[m]}):h,no()));const d=o(e.value,c,u);let f=[c.key];return Ro(d)?f=d.map((h,m)=>{const g=s[h.type],b=g?g({[h.type]:h.value,index:m,parts:d}):[h.value];return $B(b)&&(b[0].key=`${h.type}-${m}`),b}):Ht(d)&&(f=[d]),f},l=ss(no(),i),a=Ht(e.tag)||Bn(e.tag)?e.tag:hM();return Bn(a)?Qt(a,l,{default:r}):Qt(a,l,r())}}const NB=et({name:"i18n-n",props:ss({value:{type:Number,required:!0},format:{type:[String,Object]}},qy),setup(e,t){const n=e.i18n||$t({useScope:e.scope,__useComponent:!0});return mM(e,t,lM,(...o)=>n[G4](...o))}}),kk=NB;function OB(e,t){const n=e;if(e.mode==="composition")return n.__getInstance(t)||e.global;{const o=n.__getInstance(t);return o!=null?o.__composer:e.global.__composer}}function FB(e){const t=r=>{const{instance:l,value:a}=r;if(!l||!l.$)throw Ti(ci.UNEXPECTED_ERROR);const c=OB(e,l.$),u=bk(a);return[Reflect.apply(c.t,c,[...Ck(u)]),c]};return{created:(r,l)=>{const[a,c]=t(l);_m&&(r.__i18nWatcher=Je(c.locale,()=>{l.instance&&l.instance.$forceUpdate()})),r.__composer=c,r.textContent=a},unmounted:r=>{_m&&r.__i18nWatcher&&(r.__i18nWatcher(),r.__i18nWatcher=void 0,delete r.__i18nWatcher),r.__composer&&(r.__composer=void 0,delete r.__composer)},beforeUpdate:(r,{value:l})=>{if(r.__composer){const a=r.__composer,c=bk(l);r.textContent=Reflect.apply(a.t,a,[...Ck(c)])}},getSSRProps:r=>{const[l]=t(r);return{textContent:l}}}}function bk(e){if(Ht(e))return{path:e};if(Mn(e)){if(!("path"in e))throw Ti(ci.REQUIRED_VALUE,"path");return e}else throw Ti(ci.INVALID_VALUE)}function Ck(e){const{path:t,locale:n,args:o,choice:s,plural:i}=e,r={},l=o||{};return Ht(n)&&(r.locale=n),ns(s)&&(r.plural=s),ns(i)&&(r.plural=i),[t,l,r]}function RB(e,t,...n){const o=Mn(n[0])?n[0]:{};(Fn(o.globalInstall)?o.globalInstall:!0)&&([yk.name,"I18nT"].forEach(i=>e.component(i,yk)),[kk.name,"I18nN"].forEach(i=>e.component(i,kk)),[xk.name,"I18nD"].forEach(i=>e.component(i,xk))),e.directive("t",FB(t))}const PB=tc("global-vue-i18n");function DB(e={}){const t=__VUE_I18N_LEGACY_API__&&Fn(e.legacy)?e.legacy:__VUE_I18N_LEGACY_API__,n=Fn(e.globalInjection)?e.globalInjection:!0,o=new Map,[s,i]=BB(e,t),r=tc("");function l(d){return o.get(d)||null}function a(d,f){o.set(d,f)}function c(d){o.delete(d)}const u={get mode(){return __VUE_I18N_LEGACY_API__&&t?"legacy":"composition"},async install(d,...f){if(d.__VUE_I18N_SYMBOL__=r,d.provide(d.__VUE_I18N_SYMBOL__,u),Mn(f[0])){const g=f[0];u.__composerExtend=g.__composerExtend,u.__vueI18nExtend=g.__vueI18nExtend}let h=null;!t&&n&&(h=qB(d,u.global)),__VUE_I18N_FULL_INSTALL__&&RB(d,u,...f),__VUE_I18N_LEGACY_API__&&t&&d.mixin(EB(i,i.__composer,u));const m=d.unmount;d.unmount=()=>{h&&h(),u.dispose(),m()}},get global(){return i},dispose(){s.stop()},__instances:o,__getInstance:l,__setInstance:a,__deleteInstance:c};return u}function $t(e={}){const t=cp();if(t==null)throw Ti(ci.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw Ti(ci.NOT_INSTALLED);const n=HB(t),o=WB(n),s=fM(t),i=zB(e,s);if(i==="global")return pM(o,e,s),o;if(i==="parent"){let a=wk(n,t,e.__useComponent);return a==null&&(a=o),a}if(i==="isolated"){if(n.mode!=="composition")throw Ti(ci.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);const a=n,c=ss({},e),u=wk(n,t);c.__root=u||o;const d=Sm(c);return a.__composerExtend&&(d[md]=a.__composerExtend(d)),Dg()&&lf(()=>{const h=d[md];h&&(h(),delete d[md])}),d}const r=n;let l=r.__getInstance(t);if(l==null){const a=ss({},e);"__i18n"in s&&(a.__i18n=s.__i18n),o&&(a.__root=o),l=Sm(a),r.__composerExtend&&(l[md]=r.__composerExtend(l)),jB(r,t,l),r.__setInstance(t,l)}return l}function BB(e,t){const n=aF(),o=__VUE_I18N_LEGACY_API__&&t?n.run(()=>Y4(e)):n.run(()=>Sm(e));if(o==null)throw Ti(ci.UNEXPECTED_ERROR);return[n,o]}function HB(e){const t=dn(e.isCE?PB:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw Ti(e.isCE?ci.NOT_INSTALLED_WITH_PROVIDE:ci.UNEXPECTED_ERROR);return t}function zB(e,t){return Zg(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}function WB(e){return e.mode==="composition"?e.global:e.global.__composer}function wk(e,t,n=!1){let o=null;const s=t.root;let i=UB(t,n);for(;i!=null;){const r=e;if(e.mode==="composition")o=r.__getInstance(i);else if(__VUE_I18N_LEGACY_API__){const l=r.__getInstance(i);l!=null&&(o=l.__composer,n&&o&&!o[dM]&&(o=null))}if(o!=null||s===i)break;i=i.parent}return o}function UB(e,t=!1){return e==null?null:t&&e.vnode.ctx||e.parent}function jB(e,t,n){cn(()=>{},t),kn(()=>{const o=n;e.__deleteInstance(t);const s=o[md];s&&(s(),delete o[md])},t)}const VB=["locale","fallbackLocale","availableLocales"],_k=["t","rt","d","n","tm","te"];function qB(e,t){const n=Object.create(null);return VB.forEach(s=>{const i=Object.getOwnPropertyDescriptor(t,s);if(!i)throw Ti(ci.UNEXPECTED_ERROR);const r=jo(i.value)?{get(){return i.value.value},set(l){i.value.value=l}}:{get(){return i.get&&i.get()}};Object.defineProperty(n,s,r)}),e.config.globalProperties.$i18n=n,_k.forEach(s=>{const i=Object.getOwnPropertyDescriptor(t,s);if(!i||!i.value)throw Ti(ci.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${s}`,i)}),()=>{delete e.config.globalProperties.$i18n,_k.forEach(s=>{delete e.config.globalProperties[`$${s}`]})}}const KB=et({name:"i18n-d",props:ss({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},qy),setup(e,t){const n=e.i18n||$t({useScope:e.scope,__useComponent:!0});return mM(e,t,rM,(...o)=>n[Z4](...o))}}),xk=KB;SB();sB(BD);iB(tB);rB(U4);if(__INTLIFY_PROD_DEVTOOLS__){const e=Zc();e.__INTLIFY__=!0,HD(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}const ZB={preview:"Preview",confirm:"Confirm",cancel:"Cancel",close:"Close",dismiss:"Dismiss",loading:"Loading",copy:"Copy"},GB={authBannerMessage:"Not signed in · Sign in to Kimi Code to start a conversation",authBannerLogin:"Sign in",connecting:"Connecting…",internalBuildBanner:"Internal testing only",menuFile:"File",menuEdit:"Edit",menuView:"View",menuHelp:"Help",applicationMenu:"Application menu"},YB={workspaceMeta:"workspace · {branch}",sessionsHeader:"sessions",workspaces:"Workspaces",collapseAll:"Collapse all workspaces",expandAll:"Expand all workspaces",newSession:"New Session",newChat:"New Session",newWorkspace:"New Workspace",dropToAddWorkspace:"Drop to add workspace",emptyState:"No sessions yet · click New Session to start",options:"Options",rename:"Rename",setEmoji:"Set Emoji…",sessionEmojiTitle:"Pick an emoji",removeEmoji:"Remove emoji",randomEmoji:"Random",searchEmoji:"Search emoji",recentEmojis:"Recently used",noEmojiResults:"No matching emoji",emojiGroupFaces:"Smileys & People",emojiGroupNature:"Animals & Nature",emojiGroupFood:"Food & Drink",emojiGroupActivity:"Activities & Travel",emojiGroupObjects:"Objects & Work",emojiGroupSymbols:"Symbols & Status",copyPath:"Copy path",copySessionId:"Copy session ID",copied:"Copied ✓",copyFailed:"Copy failed",archive:"Archive",archiveToastUndo:"Undo",archiveToastMid:"or view archived chats in",archiveToastSettings:"Settings",archiveToastTail:"",fork:"Fork session",export:"Export session",pin:"Pin",unpin:"Unpin",pinned:"Pinned",collapsePinned:"Collapse pinned",expandPinned:"Expand pinned",delete:"Delete",removeWorkspace:"Remove workspace",brand:"Kimi Code",signedIn:"Signed in",signOut:"Sign out",notSignedIn:"Not signed in",signIn:"Sign in",defaultUserName:"Kimi User",upgrade:"Upgrade",logoutConfirmTitle:"Sign out",logoutConfirmMessage:"Are you sure you want to sign out?",language:"Language",backendTitle:"Backend {backend} · {endpoint} — click to switch",noSessions:"No conversations yet",allPinned:"{count} conversations pinned",showMore:"Show more",showLess:"Show less",loadingMore:"Loading…",collapseSidebar:"Collapse sidebar",expandSidebar:"Expand sidebar",searchPlaceholder:"Search sessions",search:"Search",searchHint:"↑↓ navigate · ↵ open · Esc close",searchHintSelect:"navigate",searchHintOpen:"open",searchHintClose:"close",searchClear:"Clear search",searchNoResults:"No matching sessions",searchEmpty:"No sessions yet",update:"Upgrade",updateAvailable:"v{version} available",updateDownloading:"Downloading… {percent}%",updateReady:"v{version} ready",updateDone:"Restart",updateFailed:"Download failed",updateRetry:"Retry",updateDownloadNow:"Download & Update",updateSkip:"Skip This Version",updateRestartNow:"Restart Now",updateRestartLater:"Later",updateReleaseDate:"Released {date}",updateCurrentVersion:"Current v{version}",updateWhatsNew:"What’s new",updateBackground:"Download in Background",updateAutoDownload:"Automatically download and install updates"},XB={switcherTitle:"Switch workspace",switchTooltip:"Switch workspace",eyebrow:"Workspace",branchLabel:"branch: {branch}",noBranch:"no branch",sessionCount:"{count} session | {count} sessions",allWorkspaces:"All workspaces",currentWorkspace:"Current workspace only",addWorkspace:"Add workspace…",noWorkspace:"No workspace",deleteHasSessions:"This workspace still has sessions — archive them before deleting it",removeWorkspaceConfirm:'Remove workspace "{name}"?',swarmEnableTitle:"Enable swarm mode?",swarmEnableConfirm:"The agent will run multiple sub-agents in parallel.",goalStartTitle:"Start goal?",goalStartConfirm:'"{objective}" — the agent will run autonomously toward it.',scopeCurrent:"this workspace",scopeAll:"all workspaces",newInGroup:"New session in this workspace",addTitle:"Add workspace",pathLabel:"Path",pathPlaceholder:"/absolute/path/to/project",recentLabel:"Recent folders",add:"Add",cancel:"Cancel",addHint:"Paste an absolute folder path, or pick a recent one.",addFailed:"Couldn't open this folder. Check the path and try again.",requiredTitle:"Choose a workspace first",requiredMessage:"Pick a folder to use as your workspace before sending a message.",openThisFolder:"Open this folder",up:"Up",browsing:"Browsing…",filterPlaceholder:"Filter subfolders…",searchPlaceholder:"Fuzzy-search under this folder…",searching:"Searching…",pasteToggle:"Enter an absolute path",noFilterMatch:"No subfolders match “{q}”",noSubfolders:"No subfolders here",browseHint:'Click a folder to enter it, then "Open this folder" to add it as a workspace.',attentionTitle:"{count} item needs your attention | {count} items need your attention",awaitingAnswer:"Answer",awaitingAnswerTitle:"A question is waiting for your answer",awaitingPermission:"Approve",awaitingPermissionTitle:"An action is waiting for your approval",aborted:"Stopped",abortedTitle:"This session was interrupted before finishing"},JB={jumpToLatestAria:"Jump to latest message",toc:"Conversation outline",newMessages:"Latest messages",loading:"Loading…",starting:"Starting conversation…",requesting:"Requesting…",working:"Working…",emptyWorkspaceHint:"Send in {name}",switchWorkspace:"Switch workspace",addWorkspace:"New workspace",moreWorkspaces:"More workspaces ({count})",pickFolder:"Choose folder…",compacting:"Compacting context…",compactedPlain:"Context compacted",compactedAuto:"Context auto-compacted",compactedTokens:" ({before} → {after} tokens)",viewSummary:"View summary",summaryTitle:"Compaction summary",activatedSkill:"Activated skill: {name}",undo:"Undo",undoTooltip:"Undoing the conversation will not roll back code changes",undoConfirm:"Undo last message?",escUndoHintPre:"Press",escUndoHintPost:"again to undo",undone:"Undone — the message is back in the composer",turnInterrupted:"Manually stopped",yesterday:"Yesterday",loadOlder:"Load earlier messages",loadingOlder:"Loading earlier messages…",widenTable:"Widen table",restoreTableWidth:"Restore default width",cron:{fired:"Scheduled reminder fired",missed:"Missed scheduled reminders",job:"job {id}",oneShot:"one-shot",coalesced:"{n} fires coalesced",missedCount:"{n} missed",finalDelivery:"final delivery",expand:"Show more",collapse:"Show less"},fold:{worked:"Worked {duration}",workedUnknown:"Work details"},turnFiles:{titleOne:"{number} file changed",titleOther:"{number} files changed",more:"{number} more files",moreOne:"1 more file",showLess:"Show less",diffTitle:"Changes this turn",diffUnavailable:"This file’s changes can’t be shown line by line",openFile:"Open file"},goal:{continuation:"Goal continuation"},notification:{kindTask:"Background task",kindSubagent:"Subagent",title:{completed:"{kind} completed",failed:"{kind} failed",timed_out:"{kind} timed out",killed:"{kind} killed",lost:"{kind} lost",info:"{kind} notification"},status:{completed:"completed",failed:"failed",timed_out:"timed out",killed:"killed",lost:"lost",info:"info"},groupTitle:"{n} notifications",copyPath:"Copy path",copied:"Copied",rawPayload:"Raw payload",fields:{type:"Type",source:"Source",severity:"Severity"}},userMessage:{expand:"Show more",collapse:"Show less"},search:{placeholder:"Search chat…",searching:"Searching…",results:"{current}/{total} results",resultsCapped:"{current}/{total}+ results",noResults:"No results",previous:"Previous match",next:"Next match",close:"Close search"}},QB={connectionConnected:"Connected",connectionConnecting:"Connecting…",connectionDisconnected:"Disconnected",ctxTooltip:"Used {used} / {max} tokens ({pct}%)",modelLabel:"Model",permissionManual:"Manual",permissionAuto:"Auto",permissionYolo:"YOLO",permissionManualDesc:"Ask for approval on every tool action",permissionAutoDesc:"Fully autonomous — agent decides everything without asking",permissionYoloDesc:"Auto-approve tool actions, but agent may still ask questions",planLabel:"Plan",planDesc:"Have the agent make a plan before changing files",planOn:"on",planOff:"off",planTooltip:"Toggle plan mode (research before editing)",modesLabel:"Mode",goalLabel:"Goal",goalDesc:"Track one objective until it is complete",swarmLabel:"Swarm",swarmDesc:"Run parallel agents for broader exploration",modeOff:"Off",goalPlaceholder:"What should the agent achieve?",goalStart:"Start",goalPause:"Pause",goalResume:"Resume",goalCancel:"Cancel",goalCancelConfirm:"Cancel this goal? It cannot be resumed afterwards.",goalCancelConfirmYes:"Yes",goalCancelConfirmNo:"No",goalDoneWhen:"Done when",goalStatusActive:"Active",goalStatusPaused:"Paused",goalStatusBlocked:"Blocked",goalStatusComplete:"Complete",modeNotSupported:"Not supported",thinkingLabel:"Thinking",thinkingTooltip:"Toggle thinking mode",thinkingOn:"On",thinkingOff:"Off",cacheNote:"Note: Switching models or thinking effort invalidates the existing prompt cache. Start a new chat to avoid extra token costs.",starredModels:"Starred",moreModels:"More models…",statusPanelTitle:"Session status",statusPanelClose:"Close",statusModel:"Model",statusThinking:"Thinking",statusPermission:"Permission",statusPlanMode:"Plan mode",statusSwarmMode:"Swarm mode",swarmOn:"on",swarmOff:"off",statusContext:"Context",statusCost:"Cost",statusContextValue:"{used} / {max} ({pct}%)",statusNone:"—",activityRunning:"Running…",activityAwaitingApproval:"Awaiting approval",activityAwaitingQuestion:"Awaiting answer",interrupt:"Interrupt",runningShort:"in progress"},eH={placeholder:"Type a message…",send:"Send ↵",queueLabel:"Queue",placeholderRunning:"Press Enter to queue · Ctrl+S to inject into the running turn",starting:"Sending…",queueAutoDrain:"sends automatically when the current turn ends",queueNext:"Up next",queueDragTitle:"Drag to reorder",editQueued:"Edit (load back into the input)",queuedAttachments:"attachment ×{n}",queuedHasImage:"Contains {n} image(s) — remove only, not editable",attachmentImage:"Image",attachmentVideo:"Video",attachmentFile:"File",attachmentOpenUnsupported:"Can’t open {name} — this file type isn’t supported",dropToAttach:"Drop files to attach",remove:"Remove",removeNamed:"Remove {name}",clearAll:"Clear all attachments",attachmentCount:"{n} attachments",uploading:"Uploading",uploadFailed:"Upload failed",attachFile:"Attach file",previewAttachment:"Preview {name}",previewZoom:"Zoom",interrupt:"Interrupt",interruptTitle:"Interrupt current operation",expandTitle:"Expand input for multi-line editing",collapseTitle:"Collapse input",emptyConversationTitle:"Kimi Code",emptyConversation:"No messages yet — type below to start the conversation",upgradeBanner:"Upgrade your Kimi account to use Kimi Code",quickStartPlaceholder:"Type a message to start a new conversation…",thinkingSuffix:" · thinking",thinkingSuffixEffort:" · {level}"},tH={title:"Sign in to Kimi Code",close:"Close (Esc)",starting:"Starting sign-in flow…",lead:"Click the button below to sign in from a new browser tab.",authorizeInBrowser:"Sign in via browser",orDivider:"or",fallbackPrefix:"On another device? Open ",fallbackSuffix:" and enter the device code:",copy:"Copy",copied:"Copied",copyLink:"Copy link",waitingAuth:"Waiting for sign-in",waitingAutoClose:"Waiting for sign-in, closes automatically…",success:"Signed in",successHint:"Loading, will close automatically…",expiredTitle:"Device code expired",expiredHint:"Please restart the sign-in flow",retry:"Retry",closeBtn:"Close",errorTitle:"The current version does not support login yet",errorHint:"Please upgrade kimi-code and try again",pollErrorTitle:"Lost connection",pollErrorHint:"Sign-in polling failed repeatedly. Check the kimi-code process and try again.",action:"Sign in",requiredTitle:"Sign in required",requiredMessage:"Sign in to your Kimi account and set up a model to start chatting.",goToLogin:"Sign in",upgradeRequiredTitle:"Upgrade required",upgradeRequiredMessage:"Your account is on the free plan. Upgrade to a membership to start chatting with Kimi models."},nH={title:"Provider management",loading:"Loading providers…",unavailable:"Provider management is not available yet",empty:"No providers yet",status:{connected:"Connected",error:"Error",unconfigured:"Not configured"},keySet:"key set",keyNotSet:"key not set",managedBadge:"OAuth",modelCount:"{count} models",confirmDelete:"Confirm delete?",refresh:"Refresh",delete:"Delete",refreshTitle:"Refresh {type}",deleteTitle:"Delete {type}",loginKimi:"Sign in to Kimi",loginAnthropic:"Sign in to Anthropic",addProvider:"Add provider",added:"Provider added",enterApiKey:"Enter API Key",optional:"Optional",apiKeyRequired:"API Key cannot be empty",fieldId:"Name",fieldType:"API Protocol",types:{kimi:"Kimi",openai:"OpenAI",openai_responses:"OpenAI Responses",anthropic:"Anthropic","google-genai":"Google GenAI",vertexai:"Vertex AI"},fieldApiKey:"API Key",apiKeyManaged:"Signed in with OAuth",apiKeySet:"Set — enter a new key to replace",showApiKey:"Show API key",hideApiKey:"Hide API key",fieldBaseUrl:"Base URL",baseUrlPlaceholder:"https://api.example.com/v1",fieldModels:"Models",colModelId:"Model ID",colContext:"Context",colDisplayName:"Display name",modelIdPlaceholder:"kimi-k3",modelContextPlaceholder:"1048576",modelNamePlaceholder:"Optional",noModels:"No models",addModel:"Add model",removeModel:"Remove model",fieldDefaultModel:"Default model",save:"Save",saved:"Provider saved",deleteProvider:"Delete provider",deleteConfirm:"Delete {id} and its {count} models?",deleteConfirmYes:"Delete",managedHint:"Managed providers sign in and out on the Account tab",unsavedGuard:"You have unsaved changes.",guardStay:"Keep editing",guardDiscard:"Discard",add:"Add",catalog:{sourceCatalog:"From directory",sourceManual:"Manual",sourceRegistry:"Registry",registryHint:"Import providers and models from an api.json registry; re-importing the same URL refreshes it",registryUrlLabel:"Registry URL",registryImported:"{count} providers imported",searchPlaceholder:"Search providers",loading:"Loading directory…",loadError:"Failed to load the directory. Check your network and retry.",retry:"Retry",empty:"No matching providers",rejected:"Not importable",rejectReason:{"unknown-explicit-type":"Unsupported protocol","proprietary-sdk":"Proprietary SDK — cannot be imported","empty-base-url":"Blank base URL","placeholder-base-url":"Endpoint contains an env placeholder"},backToList:"Back to directory",willImport:"{count} models will be imported from the directory",overwriteWarning:"A provider with this name already exists; importing overwrites its config and models",importAction:"Import"},error:{idRequired:"Name cannot be empty",idInvalid:'Name must start with a letter or digit and may only contain letters, digits, "-", "_" and spaces',apiKeyRequired:"API Key cannot be empty",baseUrlRequired:"Base URL cannot be empty",registryUrlRequired:"Registry URL cannot be empty",modelRequired:"Model ID cannot be empty",contextSizeRequired:"Max context size cannot be empty",contextSizeInvalid:"Max context size must be a positive integer"},hintClose:"Close"},oH={dialogLabel:"Switch model",title:"Switch model",close:"Close (Esc)",allTab:"All",providerTabs:"Model providers",searchPlaceholder:"Search models or providers…",clearSearch:"Clear search",loading:"Loading models…",unavailable:"Model list is unavailable",contextSuffix:"{size} ctx",capabilityImageInput:"Image input",capabilityVideoInput:"Video input",capabilityToolUse:"Tool use",capabilityThinking:"Thinking",capabilityAlwaysThinking:"Always thinking",emptyNoModels:"No models available",emptyNoMatch:"No matching models",starTitle:"Add to favorites",unstarTitle:"Remove from favorites",hintNavigate:"Navigate",hintSelect:"Select",hintClose:"Close"},sH={justNow:"just now"},iH={title:{shell:"Run command?",diff:"Apply changes?",file:"Write file?",fileop:"File operation?",url:"Fetch URL?",search:"Search?",invocation:"Invoke?",todo:"Update todo?",plan_review:"Ready to build with this plan?",generic:"Approve action?"},subagentBadge:"sub agent · {name}",danger:"Danger: {detail}",searchQueryLabel:"query",searchScope:"scope: {scope}",feedbackPlaceholder:"Explain why you are rejecting… (Enter to submit, Esc to cancel)",feedbackHint:"Enter to submit · Esc to cancel",approve:"Approve",approveSession:"Approve for session",reject:"Reject",feedback:"Feedback",feedbackSubmit:"Reject with feedback",feedbackCancel:"Cancel",approvePlan:"Approve plan",revise:"Revise",rejectAndExit:"Reject and Exit",expandPlan:"Expand",collapsePlan:"Collapse"},rH={back:"‹ Previous question",nextQuestion:"Next question ›",otherDefault:"Other…",submit:"Submit",dismiss:"Dismiss",minimize:"Minimize",expand:"Expand",hint:"↑↓ to choose · Enter to confirm"},lH={tag:"tasks",summary:"{run} running · {done} done",copy:"Copy",calling:"Calling {label}",fieldTask:"Task",fieldOutput:"Output",fieldProgress:"Progress",fieldResult:"Result",moreLines:"… ({count} more)",copied:"Copied",stop:"stop",defaultDescription:"Background task",dockTasks:"Background tasks",dockBash:"Bash",dockSubagent:"Sub Agent",dockTodos:"Todos",running:"running",closePanel:"Close panel",timingRunning:"Running · {time}",timingDone:"Done · {sec}s",emptyTasks:"No background tasks running",emptyBash:"No bash tasks running",emptySubagent:"No sub agent tasks running",emptyTodo:"No todos yet",openTab:"Open the tasks tab",openDetail:"Open",collapse:"Collapse",expand:"Expand",transcriptLoadError:"Failed to load this sub agent’s conversation."},aH={panelTitle:"Thinking",streaming:"Thinking…",close:"Close"},cH={title:"Changes",branch:"branch",aheadTitle:"ahead of remote",behindTitle:"behind remote",fileCountOne:"{number} file",fileCountOther:"{number} files",empty:"No git changes",clean:"Working tree clean, no changes",back:"Back",loading:"Loading diff…",noDiff:"No line changes for this file",emptyFile:"Empty file",list:"List",tree:"Tree",close:"Close"},uH={},dH={empty:"Select a file on the left to preview",loading:"Loading…",lineCount:"{count} lines",copy:"Copy",copied:"Copied",copyPath:"Copy path",openInEditor:"Open",reveal:"Reveal",download:"Download",close:"Close",search:"Search",prevMatch:"Previous match",nextMatch:"Next match",htmlMode:"HTML preview mode",markdownMode:"Markdown preview mode",preview:"Preview",source:"Source",imageFit:"Image sizing",fit:"Fit",actual:"Actual",pdfNoPreview:"This PDF cannot be embedded here. Download it to view.",imageNoPreview:"Image file · {mime} · {size} · preview unavailable",binaryNoPreview:"Binary file · {mime} · {size} bytes · preview unavailable",unknownType:"unknown type",copyCode:"Copy code",enlargeImage:"Enlarge image",errors:{emptyPath:"File path is empty",unsupportedPath:"URLs and remote paths cannot be previewed",outsideWorkspace:"Only files inside the current workspace can be previewed",isDirectory:"Select a file instead of a directory",notFound:"File no longer exists or was moved",tooLarge:"File is too large to preview",loadFailed:"Unable to read this file"}},fH={searching:"Searching…",noMatch:"No matches"},pH={dismiss:"Close",errorLabel:"Error",noteLabel:"Note",agentWarningFallback:"agent warning",unhandledEvent:"Unhandled event: {type}",agentError:{title:"Model request failed",connection:"Cannot connect to the model service",auth:"Model authentication failed",rateLimit:"Model rate limit reached",overloaded:"Model overloaded",filtered:"Response filtered by the provider",api:"Model API error",contextOverflow:"Context size exceeded"},details:{cause:"Cause",code:"Error code",connection:"Connection",contentType:"Content type",details:"Server details",duration:"Duration",endpoint:"Endpoint",errorName:"Error type",message:"Message",operation:"Operation",phase:"Failure phase",request:"Request",requestId:"Request ID",responsePreview:"Response preview",sessionId:"Session ID",stack:"Stack",status:"HTTP status",timeout:"Timeout",timestamp:"Time"},daemonApiTitle:"Kimi server returned an error",daemonNetworkMessage:"Web did not receive a response from the Kimi server. Check that it is still running, or refresh the page.",daemonNetworkTitle:"Cannot connect to Kimi server",diagnostics:"Diagnostics",hideDetails:"Hide details",operationFailedMessage:"The last operation did not finish. Try again later.",operationFailedTitle:"Operation failed",sessionSnapshotMessage:"Web could not load the current conversation. Check that the Kimi server is still running, or refresh the page.",sessionSnapshotTitle:"Cannot load current conversation",showDetails:"Show details",copyDetails:"Copy diagnostics",copied:"Copied",wsTitle:"Realtime connection error",goal:{alreadyExists:"This session already has an active goal. Cancel it before starting a new one.",notFound:"No goal to act on — it may have already finished or been cancelled.",statusInvalid:"The current goal state does not allow this action.",notResumable:"This goal cannot be resumed (it may be cancelled or completed).",objectiveTooLong:"The objective is too long. Please shorten it and try again."}},hH={new:{desc:"Create a new session"},clear:{desc:"Clear and start a new session"},login:{desc:"Sign in to Kimi in the browser"},plan:{desc:"Toggle plan mode on/off"},swarm:{desc:"Toggle swarm mode; /swarm runs a task in swarm"},goal:{desc:"Create/control a goal: /goal , /goal pause{'|'}resume{'|'}cancel"},btw:{desc:"Side chat: /btw asks a forked side session"},yolo:{desc:"Auto-approve tool actions; the agent may still ask questions"},auto:{desc:"Fully autonomous — the agent never asks questions"},thinking:{desc:"Set the thinking level"},compact:{desc:"Compact the conversation history"},fork:{desc:"Fork this session into a new one"},export:{desc:"Download this session and troubleshooting logs as a ZIP",noSession:"Open a session before exporting it."},status:{desc:"View session status"},undo:{desc:"Undo the last message"}},mH={label:{read:"Read",bash:"Run",edit:"Edit",write:"Write",grep:"Search",glob:"Find",ls:"List",web_fetch:"Fetch",search:"Search",todo:"Todo",task:"Task",swarm:"Swarm",ask_user:"Question",plan:"Plan",goal_create:"Start Goal",goal_get:"Read Goal",goal_budget:"Set Goal Budget",goal_update:"Update Goal"},swarm:{progress:"{done} / {total}",runningSub:"{count} in progress",doneSub:"{completed} completed · {failed} failed",phaseQueued:"Queued",phaseWorking:"Working",phaseSuspended:"Suspended",phaseCompleted:"Completed",phaseFailed:"Failed",waiting:"Waiting for subagents…"},chip:{lines:"{count} lines",results:"{count} results",files:"{count} files",edited:"edited",created:"created",todos:"{count} items"},disclosure:{expand:"Expand details",collapse:"Collapse details"},output:{waiting:"Waiting for output…",empty:"No output",saved:"Saved result"},plan:{review:{pending:"Pending review",approved:"Approved",rejected:"Rejected",cancelled:"Cancelled"},selectedOption:"Selected",feedback:"Feedback"},summary:{inScope:"{value} in {scope}"},goal:{objectiveWithCriterion:"{objective} · {criterion}",status:"Status: {status}",budget:"{value} {unit}",turns:"{value} turns",tokens:"{value} tokens",milliseconds:"{value} ms",seconds:"{value} sec",minutes:"{value} min",hours:"{value} hr"},group:{countOther:"{count} tool call | {count} tool calls",typed:{read:{done:"Read {count} file | Read {count} files"},bash:{done:"Ran {count} command | Ran {count} commands"},grep:{done:"Searched {count} pattern | Searched {count} patterns"},search:{done:"Ran {count} web search | Ran {count} web searches"},glob:{done:"Matched {count} file pattern | Matched {count} file patterns"},ls:{done:"Listed {count} directory | Listed {count} directories"},web_fetch:{done:"Fetched {count} page | Fetched {count} pages"},edit:{done:"Made {count} edit | Made {count} edits"},write:{done:"Wrote {count} file | Wrote {count} files"}}},activity:{failedClause:" ({count} failed)",liveDonePrefix:"",busy:"Working…",doing:{read:"Reading {subject}",bash:"Running {subject}",grep:"Searching {subject}",search:"Searching {subject}",glob:"Matching {subject}",ls:"Listing {subject}",web_fetch:"Fetching {subject}",edit:"Editing {subject}",write:"Writing {subject}"}},ask:{dismissed:"Dismissed",answer:"{count} answer",answers:"{count} answers",answered:"Answered",more:"(+{count} more)",collected:"Collected your answers",question:"{count} question",questions:"{count} questions",freeInput:"(free text)",unanswered:"No answer"}},gH={resizeHandleAria:"Resize sidebar width",resizePreviewAria:"Resize preview panel width",detailPanelAria:"Detail panel"},vH={openSwitcher:"Switch session / workspace",openSettings:"Session settings",settingsTitle:"Session settings",groupSession:"Current session",groupApp:"App preferences",sheetLabel:"Sheet",closeSheet:"Close",tapToCycle:"tap to cycle",running:"running",idle:"idle",sessionCount:"{n} sessions",newSession:"New session",permManualSub:"confirm every tool",permAutoSub:"fully autonomous, never asks",permYoloSub:"auto-approve tools, may still ask",planModeSub:"Plan mode",swarmModeSub:"Swarm mode",archivedSessions:"Archived sessions",archivedSessionsSub:"Browse and restore archived sessions",archivedBack:"Back"},yH={colorSchemeLabel:"Appearance",light:"Moon bright",dark:"Moon dark",system:"System"},kH={continue:"Continue",back:"Back",skip:"Skip",welcome:{title:"Welcome to Kimi Code",subtitle:"The AI coding workbench for professional developers",languageLabel:"Language",themeLabel:"Appearance"},login:{title:"Configure Model",subtitle:"Choose the model service that powers Kimi Code. You can change it later in Settings",kimiTitle:"Sign in with Kimi",kimiHint:"Ready out of the box with Kimi membership benefits",recommended:"Recommended",customProviderTitle:"Add a custom provider",customProviderHint:"Bring your own API key for OpenAI-compatible and other services",loggedInTitle:"Logged in with Kimi",loggedInHint:"Your model service is ready to use",finish:"Finish",skip:"Skip for now"}},bH={title:"Settings",internalTest:"Internal Test",close:"Close (Esc)",tabs:{general:"General",agent:"Agent",account:"Account",providers:"Providers",advanced:"Advanced",archived:"Archived",shortcuts:"Hotkeys"},appearance:"Appearance",notifications:"Notifications",notifyEnabled:"System notifications",notifyEnabledHint:"Send a system notification when a turn completes, needs an answer, or needs approval",notifySound:"Notification sound",notifySoundHint:"Play the system sound with notifications",notifyDenied:"Blocked in browser settings",notifyTitle:"Kimi Code · Turn finished",notifyQuestionTitle:"Kimi Code · Needs answer",notifyApprovalTitle:"Kimi Code · Approval required",notifyFallback:"View result",notifyQuestionFallback:"A question is waiting for your answer",notifyApprovalFallback:"A tool needs your approval",account:"Account",signedIn:"Signed in",signedOutHint:"Sign in to view your account and model access",planUsage:{title:"Plan Usage",retry:"Retry",loadFailed:"Failed to load",empty:"No usage data yet",weekLimit:"Weekly limit",genericLimit:"Limit",hourLimit:"{n}h limit",dayLimit:"{n}d limit",minuteLimit:"{n}m limit",resetsIn:"resets in {duration}",resetDone:"reset",durationDay:"{n}d",durationHour:"{n}h",durationMinute:"{n}m",durationSecond:"{n}s",usedPct:"{pct}% used",boosterTitle:"Booster",boosterBalance:"Balance",monthlyUsed:"Used this month",monthlyLimit:"Monthly limit",unlimited:"Unlimited",freeTitle:"Free account",freeHint:"Upgrade to a membership to use Kimi models and see plan usage"},colorSchemeHint:"Choose the app’s light or dark appearance",appIcon:"Dock icon",appIconHint:"Choose the icon shown in the Dock",appIconDefault:"Default",appIconBlack:"Black",uiFontSize:"Font size",uiFontSizeHint:"Adjust interface and message text size",vibrancy:"Frosted sidebar",vibrancyHint:"Use the native macOS frosted-glass material behind the sidebar — turn it off if the translucency is hard to read",languageHint:"Choose the interface language",defaultOpenInApp:"Default open-in app",defaultOpenInAppHint:"App used when opening files and folders from the header menu",openWith:"Open with",agentDefaults:"Agent defaults",saving:"Saving",defaultModel:"Default model",defaultModelHint:"New sessions prefer this model",noDefaultModel:"No default model",defaultPermission:"Default permission",defaultPermissionHint:"Only affects newly-created sessions",defaultThinking:"Thinking by default",defaultThinkingHint:"Whether new sessions start with thinking enabled",defaultPlanMode:"Plan mode by default",defaultPlanModeHint:"Whether new sessions start in plan mode",secondaryModelSection:"Subagents",secondaryModel:"Subagent model",secondaryModelHint:"Model and thinking effort that subagents use by default",secondaryModelEffort:"Thinking effort",noSecondaryModel:"Not set (inherit primary)",secondaryModelEffortAuto:"Model default",telemetry:"Improve product with usage data",telemetryHint:"When on, we collect anonymous interaction data (such as clicks, interruptions, and feature usage) to improve the product experience. You can turn it off at any time.",telemetryRestartHint:"Takes effect after restarting the service.",credentialReady:"Credential configured",credentialMissing:"Missing credential",configUnavailable:"The server did not return config yet. These settings are unavailable.",versionAndUpdates:"Version & updates",appVersion:"App version",appVersionHint:"The running app’s version and build time",checkUpdate:"Check for updates",checkUpdateHint:"Manually check whether a new version is available",checkUpdateBtn:"Check now",updateChecking:"Checking…",updateCheckLatest:"You’re on the latest version",updateCheckAvailable:"Version {version} is available — download it from the update entry in the sidebar",updateCheckUnsupported:"This build does not support update checks",updateCheckFailed:"Check failed. Please try again later.",updateCheckAvailableAuto:"Version {version} found — downloading in the background",updateCheckDownloaded:"Version {version} is ready — restart from the update entry in the sidebar",autoDownloadUpdate:"Auto-download updates",autoDownloadUpdateHint:"Download new versions in the background and install them on the next restart",privacy:"Data & privacy",diagnostics:"Diagnostics",build:"Build",serverVersion:"Server version",serverAddress:"Server address",serverAddressHint:"The address of the connected server",serverVersionHint:"The version of the connected service",exportLog:"Troubleshooting log",exportLogHint:"Export the troubleshooting log collected by the app",logHint:"Enable with ?debug=1 to capture",exportLogBtn:"Export log",archivedTitle:"Archived sessions",archivedDesc:"Browse archived sessions, see their workspace path, name, and archive time, and restore them to the session list.",archivedSearch:"Search archived sessions",archivedAllWorkspaces:"All workspaces",archivedSortLabel:"Sort by",archivedSortArchived:"Archive time",archivedSortCreated:"Created time",archivedSortName:"Name",archivedRestore:"Restore",archivedEmpty:"No archived sessions yet",archivedNoMatch:"No matching archived sessions",archivedSessionsCount:"{count} sessions",archivedAt:"Archived {time}",archivedLoadMore:"Load more",archivedLoading:"Loading…",archivedLoadingAll:"Loading all archived sessions…"},CH={openInEditor:"Open in editor",openInEditorShort:"Open",openInApp:"Open in {app}",chooseOpenApp:"Choose application",copyAll:"Copy all as Markdown",copyFinalSummary:"Copy final summary",copied:"Copied",lastUsed:"Last used",copyPath:"Copy path",changed:"{n} changed",gitTooltip:"Open Files > Changed",detached:"detached",openPr:"Open pull request",prStatusOpen:"open",prStatusClosed:"closed",prStatusMerged:"merged",prStatusDraft:"draft",prStatusUnknown:"unknown",options:"Options",copySessionId:"Copy session ID",renameSession:"Rename",forkSession:"Fork session",archiveSession:"Archive",exportSession:"Export session",devBadge:"Running in development mode"},wH={title:"Side chat",subtitle:"forked from this session",empty:"Ask a quick question on the side — it shares this session’s context.",placeholder:"Ask the side chat…",send:"Send"},_H={actions:{summonApp:{label:"Show App Window",desc:"Bring the app window to the foreground from anywhere"},newSession:{label:"New Session",desc:"Start a new session in the current workspace"},searchSessions:{label:"Search Chats",desc:"Open the session search dialog"},archiveSession:{label:"Archive Chat",desc:"Archive the current chat right away"},toggleSideChat:{label:"Toggle Side Chat",desc:"Open or close the /btw side chat"},toggleSidebar:{label:"Toggle Sidebar",desc:"Collapse or expand the session sidebar"},openFolder:{label:"Open Folder",desc:"Add a workspace folder with the native picker"},openInDefaultApp:{label:"Open in App",desc:"Open the workspace in your default editor/terminal"},openSettings:{label:"Open Settings",desc:"Show or hide the settings dialog"},toggleTerminal:{label:"Toggle Terminal",desc:"Show or hide the bottom terminal panel"},send:{label:"Send Message",desc:"Send the composer input"},newline:{label:"Newline",desc:"Insert a newline in the composer"}},searchPlaceholder:"Search shortcuts",unassigned:"Unassigned",unassign:"Unassign shortcut",edit:"Edit shortcut",reset:"Reset to default",resetAll:"Reset all to defaults",recording:"Press the new shortcut…",invalid:"This key combination can’t be used as a shortcut",notGlobal:"This key combination can’t be registered as a system-wide shortcut",globalTaken:"This shortcut is already taken by the system or another app",reserved:"Reserved by the system menu",reservedSteer:"Reserved for steer (Ctrl/Cmd+S)",reservedFind:"Reserved for transcript find (Ctrl/Cmd+F)",conflict:"Already used by “{action}”",customBadge:"Custom"},xH={panelAria:"Terminal",toolbarAria:"Terminal tabs",resizeAria:"Resize terminal panel height",toggle:"Toggle terminal",newTab:"New terminal",closeTab:"Close terminal",restartTab:"Restart terminal",collapse:"Collapse terminal panel",empty:"No terminal yet — click to start one",processExited:"[process exited]",processExitedWithCode:"[process exited with code {code}]"},SH={common:ZB,app:GB,sidebar:YB,workspace:XB,conversation:JB,status:QB,composer:eH,login:tH,providers:nH,model:oH,sessions:sH,approval:iH,question:rH,tasks:lH,thinking:aH,diff:cH,fileTree:uH,filePreview:dH,mention:fH,warnings:pH,commands:hH,tools:mH,layout:gH,mobile:vH,theme:yH,onboarding:kH,settings:bH,header:CH,sideChat:wH,shortcuts:_H,terminal:xH},AH={preview:"预览",confirm:"确认",cancel:"取消",close:"关闭",dismiss:"关闭",loading:"加载中",copy:"复制"},MH={authBannerMessage:"未登录 · 需要登录 Kimi Code 才能开始对话",authBannerLogin:"登录",connecting:"连接中…",internalBuildBanner:"仅供内部测试",menuFile:"文件",menuEdit:"编辑",menuView:"视图",menuHelp:"帮助",applicationMenu:"应用菜单"},TH={workspaceMeta:"workspace · {branch}",sessionsHeader:"sessions",workspaces:"工作区",collapseAll:"折叠全部工作区",expandAll:"展开全部工作区",newSession:"新建会话",newChat:"新建会话",newWorkspace:"新建工作区",dropToAddWorkspace:"松开鼠标添加工作区",emptyState:"还没有会话 · 点击 新建会话 开始",options:"选项",rename:"重命名",setEmoji:"设置 Emoji…",sessionEmojiTitle:"选择 Emoji",removeEmoji:"移除 Emoji",randomEmoji:"随机",searchEmoji:"搜索 Emoji",recentEmojis:"最近使用",noEmojiResults:"没有匹配的 Emoji",emojiGroupFaces:"笑脸与人物",emojiGroupNature:"动物与自然",emojiGroupFood:"美食饮品",emojiGroupActivity:"活动与出行",emojiGroupObjects:"物品与工作",emojiGroupSymbols:"符号与状态",copyPath:"复制路径",copySessionId:"复制 Session ID",copied:"已复制 ✓",copyFailed:"复制失败",archive:"归档",archiveToastUndo:"撤销",archiveToastMid:"或到",archiveToastSettings:"设置",archiveToastTail:"查看已归档的会话",fork:"分叉会话",export:"导出会话",pin:"置顶",unpin:"取消置顶",pinned:"置顶",collapsePinned:"折叠置顶区",expandPinned:"展开置顶区",delete:"删除",removeWorkspace:"移除工作区",brand:"Kimi Code",signedIn:"已登录",signOut:"退出登录",notSignedIn:"未登录",signIn:"登录",defaultUserName:"Kimi 用户",upgrade:"升级",logoutConfirmTitle:"退出登录",logoutConfirmMessage:"确定要退出当前账号吗?",language:"语言",backendTitle:"后端 {backend} · {endpoint} — 点击切换",noSessions:"暂无对话",allPinned:"有 {count} 条对话被置顶",showMore:"展开更多",showLess:"收起",loadingMore:"加载中…",collapseSidebar:"收起侧边栏",expandSidebar:"展开侧边栏",searchPlaceholder:"搜索会话",search:"搜索",searchHint:"↑↓ 选择 · ↵ 打开 · Esc 关闭",searchHintSelect:"选择",searchHintOpen:"打开",searchHintClose:"关闭",searchClear:"清除搜索",searchNoResults:"没有匹配的会话",searchEmpty:"暂无会话",update:"更新",updateAvailable:"发现新版本 v{version}",updateDownloading:"下载中… {percent}%",updateReady:"v{version} 已就绪",updateDone:"重启并更新",updateFailed:"下载失败",updateRetry:"重试",updateDownloadNow:"下载并更新",updateSkip:"本次跳过",updateRestartNow:"立即重启",updateRestartLater:"下次启动",updateReleaseDate:"发布于 {date}",updateCurrentVersion:"当前版本 v{version}",updateWhatsNew:"更新内容",updateBackground:"后台下载",updateAutoDownload:"以后自动下载并安装更新"},EH={switcherTitle:"切换工作区",switchTooltip:"切换工作区",eyebrow:"工作区",branchLabel:"分支: {branch}",noBranch:"无分支",sessionCount:"{count} 个会话",allWorkspaces:"全部工作区",currentWorkspace:"仅当前工作区",addWorkspace:"添加工作区…",noWorkspace:"暂无工作区",deleteHasSessions:"工作区内还有会话,请先归档这些会话再删除",removeWorkspaceConfirm:"移除工作区「{name}」?",swarmEnableTitle:"启用 swarm 模式?",swarmEnableConfirm:"Agent 将并行运行多个子 agent。",goalStartTitle:"启动 goal?",goalStartConfirm:"「{objective}」——Agent 将自主执行。",scopeCurrent:"当前工作区",scopeAll:"全部工作区",newInGroup:"在此工作区新建会话",addTitle:"添加工作区",pathLabel:"路径",pathPlaceholder:"/项目的绝对路径",recentLabel:"最近的文件夹",add:"添加",cancel:"取消",addHint:"粘贴一个绝对路径,或从最近用过的文件夹中选择。",addFailed:"无法打开此文件夹,请检查路径后重试。",requiredTitle:"请先选择工作空间",requiredMessage:"发送消息前,需要先选择一个文件夹作为工作区。",openThisFolder:"打开此文件夹",up:"上一级",browsing:"加载中…",filterPlaceholder:"过滤子文件夹…",searchPlaceholder:"在此目录下模糊搜索…",searching:"搜索中…",pasteToggle:"直接输入绝对路径",noFilterMatch:"没有匹配「{q}」的子文件夹",noSubfolders:"此处没有子文件夹",browseHint:'点击文件夹进入,再点"打开此文件夹"将其添加为工作区。',attentionTitle:"{count} 项待处理",awaitingAnswer:"待回答",awaitingAnswerTitle:"有提问等待你回答",awaitingPermission:"待授权",awaitingPermissionTitle:"有操作等待你授权",aborted:"已中断",abortedTitle:"此会话在完成前被中断"},IH={jumpToLatestAria:"跳到最新消息",toc:"对话目录",newMessages:"最新消息",loading:"加载中…",starting:"正在创建对话…",requesting:"请求中…",working:"工作中…",emptyWorkspaceHint:"在 {name} 中发送",switchWorkspace:"切换工作区",addWorkspace:"添加工作区",moreWorkspaces:"更多工作区 ({count})",pickFolder:"选择文件夹…",compacting:"正在压缩上下文…",compactedPlain:"上下文已压缩",compactedAuto:"已自动压缩上下文",compactedTokens:"({before} → {after} tokens)",viewSummary:"查看摘要",summaryTitle:"压缩摘要",activatedSkill:"已激活技能: {name}",undo:"撤销",undoTooltip:"撤销对话不会回滚代码",undoConfirm:"撤销上一条消息?",escUndoHintPre:"再按",escUndoHintPost:"撤销本条",undone:"已撤销,原文已放回输入框",turnInterrupted:"已手动终止",yesterday:"昨天",loadOlder:"加载更早的消息",loadingOlder:"正在加载更早的消息…",widenTable:"加宽表格",restoreTableWidth:"恢复默认宽度",cron:{fired:"定时任务已触发",missed:"错过的定时提醒",job:"任务 {id}",oneShot:"单次",coalesced:"已合并 {n} 次触发",missedCount:"错过 {n} 次",finalDelivery:"最后一次投递",expand:"展开",collapse:"收起"},fold:{worked:"已工作 {duration}",workedUnknown:"工作过程"},turnFiles:{titleOne:"{number} 个文件已修改",titleOther:"{number} 个文件已修改",more:"还有 {number} 个文件",moreOne:"还有 1 个文件",showLess:"收起",diffTitle:"本次改动",diffUnavailable:"此文件的改动无法逐项展示",openFile:"打开文件"},goal:{continuation:"目标续跑"},notification:{kindTask:"后台任务",kindSubagent:"子代理",title:{completed:"{kind}完成",failed:"{kind}失败",timed_out:"{kind}超时",killed:"{kind}被终止",lost:"{kind}丢失",info:"{kind}通知"},status:{completed:"完成",failed:"失败",timed_out:"超时",killed:"已终止",lost:"丢失",info:"信息"},groupTitle:"{n} 条通知",copyPath:"复制路径",copied:"已复制",rawPayload:"原始 payload",fields:{type:"类型",source:"来源",severity:"严重度"}},userMessage:{expand:"展开",collapse:"收起"},search:{placeholder:"搜索对话…",searching:"搜索中…",results:"{current}/{total} 条结果",resultsCapped:"{current}/{total}+ 条结果",noResults:"无结果",previous:"上一个匹配",next:"下一个匹配",close:"关闭搜索"}},LH={connectionConnected:"已连接",connectionConnecting:"连接中…",connectionDisconnected:"未连接",ctxTooltip:"使用 {used} / {max} tokens ({pct}%)",modelLabel:"模型",permissionManual:"逐条确认",permissionAuto:"完全自主",permissionYolo:"自动通过",permissionManualDesc:"每个工具操作都需要你手动确认",permissionAutoDesc:"完全自主运行,智能体自己做决定,不再询问",permissionYoloDesc:"自动批准工具操作,但遇到关键问题仍会询问",planLabel:"计划",planDesc:"先让智能体梳理计划,再修改文件",planOn:"开",planOff:"关",planTooltip:"切换计划模式(先调研再修改)",modesLabel:"模式",goalLabel:"目标",goalDesc:"持续跟踪一个目标,直到任务完成",swarmLabel:"Swarm",swarmDesc:"并行运行多个智能体,适合大范围探索",modeOff:"未启用",goalPlaceholder:"让智能体完成什么目标?",goalStart:"开始",goalPause:"暂停",goalResume:"继续",goalCancel:"取消",goalCancelConfirm:"是否需要取消当前目标?取消后将无法恢复。",goalCancelConfirmYes:"是",goalCancelConfirmNo:"否",goalDoneWhen:"完成条件",goalStatusActive:"进行中",goalStatusPaused:"已暂停",goalStatusBlocked:"已阻塞",goalStatusComplete:"已完成",modeNotSupported:"暂不支持",thinkingLabel:"思考",thinkingTooltip:"切换思考模式",thinkingOn:"开",thinkingOff:"关",cacheNote:"提示:切换模型或思考程度会使已有的提示词缓存失效。建议新建会话,避免额外的 token 消耗。",starredModels:"收藏",moreModels:"更多模型…",statusPanelTitle:"会话状态",statusPanelClose:"关闭",statusModel:"模型",statusThinking:"思考强度",statusPermission:"权限",statusPlanMode:"计划模式",statusSwarmMode:"Swarm 模式",swarmOn:"开",swarmOff:"关",statusContext:"上下文",statusCost:"花费",statusContextValue:"{used} / {max} ({pct}%)",statusNone:"—",activityRunning:"运行中…",activityAwaitingApproval:"等待批准",activityAwaitingQuestion:"等待回答",interrupt:"中断",runningShort:"进行中"},$H={placeholder:"输入消息…",send:"发送 ↵",queueLabel:"队列",placeholderRunning:"输入会加入队列 · Ctrl+S 立即插入运行中的回合",starting:"正在发送…",queueAutoDrain:"当前回合结束后自动逐条发送",queueNext:"下一条",queueDragTitle:"拖拽排序",editQueued:"编辑(载入到输入框)",queuedAttachments:"附件 ×{n}",queuedHasImage:"包含 {n} 张图片 — 只能移除,不能编辑",attachmentImage:"图片",attachmentVideo:"视频",attachmentFile:"文件",attachmentOpenUnsupported:"无法打开 {name}:暂不支持此文件类型",dropToAttach:"松开鼠标添加附件",remove:"移除",removeNamed:"移除 {name}",clearAll:"清空全部附件",attachmentCount:"共 {n} 个附件",uploading:"上传中",uploadFailed:"上传失败",attachFile:"添加附件",previewAttachment:"预览 {name}",previewZoom:"缩放",interrupt:"中断",interruptTitle:"中断当前操作",expandTitle:"展开输入框进行多行编辑",collapseTitle:"收起输入框",emptyConversationTitle:"Kimi Code",emptyConversation:"还没有消息 —— 在下方输入开始对话",upgradeBanner:"升级你的 Kimi 账户来使用 Kimi Code",quickStartPlaceholder:"输入消息开始新对话…",thinkingSuffix:" · 思考",thinkingSuffixEffort:" · {level}"},NH={title:"登录 Kimi Code",close:"关闭 (Esc)",starting:"正在启动登录流程…",lead:"点击下方按钮,在新标签页中完成登录。",authorizeInBrowser:"在浏览器中登录",orDivider:"或者",fallbackPrefix:"换个设备?在浏览器打开 ",fallbackSuffix:" 输入设备码:",copy:"复制",copied:"已复制",copyLink:"复制链接",waitingAuth:"等待登录",waitingAutoClose:"等待登录,完成后自动关闭…",success:"已登录",successHint:"正在加载,稍后自动关闭…",expiredTitle:"设备码已过期",expiredHint:"请重新开始登录流程",retry:"重试",closeBtn:"关闭",errorTitle:"当前版本暂不支持登录",errorHint:"请升级 kimi-code 后重试",pollErrorTitle:"连接已断开",pollErrorHint:"登录轮询连续失败,请检查 kimi-code 进程后重试",action:"登录",requiredTitle:"请先登录",requiredMessage:"登录 Kimi 账号并配置模型后,才能开始对话。",goToLogin:"去登录",upgradeRequiredTitle:"请升级会员",upgradeRequiredMessage:"当前为免费账户,升级会员后即可使用 Kimi 模型开始对话。"},OH={title:"供应商管理",loading:"加载提供商中…",unavailable:"暂不支持提供商管理",empty:"暂无提供商",status:{connected:"已连接",error:"错误",unconfigured:"未配置"},keySet:"key 已设置",keyNotSet:"未设置 key",managedBadge:"OAuth",modelCount:"{count} 个模型",confirmDelete:"确认删除?",refresh:"刷新",delete:"删除",refreshTitle:"刷新 {type}",deleteTitle:"删除 {type}",loginKimi:"登录 Kimi",loginAnthropic:"登录 Anthropic",addProvider:"添加供应商",added:"已添加",enterApiKey:"填写 API Key",optional:"可选",apiKeyRequired:"API Key 不能为空",fieldId:"名称",fieldType:"API 协议",types:{kimi:"Kimi",openai:"OpenAI",openai_responses:"OpenAI Responses",anthropic:"Anthropic","google-genai":"Google GenAI",vertexai:"Vertex AI"},fieldApiKey:"API Key",apiKeyManaged:"OAuth 托管登录",apiKeySet:"已设置,输入以更换",showApiKey:"显示 API Key",hideApiKey:"隐藏 API Key",fieldBaseUrl:"Base URL",baseUrlPlaceholder:"https://api.example.com/v1",fieldModels:"模型",colModelId:"模型 ID",colContext:"上下文",colDisplayName:"显示名",modelIdPlaceholder:"kimi-k3",modelContextPlaceholder:"1048576",modelNamePlaceholder:"可选",noModels:"暂无模型",addModel:"添加模型",removeModel:"移除模型",fieldDefaultModel:"默认模型",save:"保存",saved:"已保存",deleteProvider:"删除供应商",deleteConfirm:"确认删除 {id} 及其 {count} 个模型?",deleteConfirmYes:"确认删除",managedHint:"托管供应商在账户页登录 / 登出",unsavedGuard:"有未保存的修改。",guardStay:"继续编辑",guardDiscard:"丢弃",add:"添加",catalog:{sourceCatalog:"从目录添加",sourceManual:"手动添加",sourceRegistry:"注册表",registryHint:"从 api.json 注册表导入供应商与模型;同一 URL 重复导入即为刷新",registryUrlLabel:"注册表 URL",registryImported:"已导入 {count} 个供应商",searchPlaceholder:"搜索供应商",loading:"加载目录中…",loadError:"目录加载失败,请检查网络后重试",retry:"重试",empty:"没有匹配的供应商",rejected:"不可导入",rejectReason:{"unknown-explicit-type":"协议不受支持","proprietary-sdk":"私有协议,无法导入","empty-base-url":"Base URL 为空","placeholder-base-url":"端点包含环境变量占位符"},backToList:"返回目录列表",willImport:"将从目录导入 {count} 个模型",overwriteWarning:"已存在同名供应商,导入将覆盖其配置与模型",importAction:"导入"},error:{idRequired:"名称不能为空",idInvalid:'名称需以字母或数字开头,只能包含字母、数字、"-"、"_" 和空格',apiKeyRequired:"API Key 不能为空",baseUrlRequired:"Base URL 不能为空",registryUrlRequired:"注册表 URL 不能为空",modelRequired:"模型 ID 不能为空",contextSizeRequired:"上下文长度不能为空",contextSizeInvalid:"上下文长度需为正整数"},hintClose:"关闭"},FH={dialogLabel:"切换模型",title:"切换模型",close:"关闭 (Esc)",allTab:"全部",providerTabs:"模型提供商",searchPlaceholder:"搜索模型或提供商…",clearSearch:"清除搜索",loading:"加载模型中…",unavailable:"暂无可用模型列表",contextSuffix:"{size} ctx",capabilityImageInput:"图片输入",capabilityVideoInput:"视频输入",capabilityToolUse:"工具调用",capabilityThinking:"思考",capabilityAlwaysThinking:"始终思考",emptyNoModels:"暂无可用模型",emptyNoMatch:"无匹配模型",starTitle:"添加到收藏",unstarTitle:"取消收藏",hintNavigate:"导航",hintSelect:"选择",hintClose:"关闭"},RH={justNow:"刚刚"},PH={title:{shell:"运行命令?",diff:"应用修改?",file:"写入文件?",fileop:"文件操作?",url:"抓取 URL?",search:"搜索?",invocation:"调用?",todo:"更新 todo?",plan_review:"按这份 plan 开始实现?",generic:"批准操作?"},subagentBadge:"子 agent · {name}",danger:"危险: {detail}",searchQueryLabel:"查询",searchScope:"范围:{scope}",feedbackPlaceholder:"说明拒绝原因… (Enter 提交, Esc 取消)",feedbackHint:"Enter 提交 · Esc 取消",approve:"批准",approveSession:"本会话内批准",reject:"拒绝",feedback:"反馈",feedbackSubmit:"提交并拒绝",feedbackCancel:"取消",approvePlan:"批准 plan",revise:"修改",rejectAndExit:"拒绝并退出",expandPlan:"放大",collapsePlan:"还原"},DH={back:"‹ 上一题",nextQuestion:"下一题 ›",otherDefault:"其他…",submit:"提交",dismiss:"放弃",minimize:"最小化",expand:"展开",hint:"↑↓ 选择 · Enter 确认"},BH={tag:"任务",summary:"{run} 运行中 · {done} 完成",copy:"复制",calling:"调用 {label}",fieldTask:"任务",fieldOutput:"输出",fieldProgress:"进度",fieldResult:"结果",moreLines:"…(还有 {count} 行)",copied:"已复制",stop:"stop",defaultDescription:"后台任务",dockTasks:"后台任务",dockBash:"后台 Bash",dockSubagent:"子 Agent",dockTodos:"待办",running:"运行中",closePanel:"关闭面板",timingRunning:"运行中 · {time}",timingDone:"完成 · {sec}s",emptyTasks:"暂无后台任务",emptyBash:"暂无后台 Bash 任务",emptySubagent:"暂无子 Agent 任务",emptyTodo:"暂无待办事项",openTab:"查看全部后台任务",openDetail:"查看",collapse:"折叠",expand:"展开",transcriptLoadError:"无法加载这个子 Agent 的对话。"},HH={panelTitle:"思考过程",streaming:"思考中…",close:"关闭"},zH={title:"改动",branch:"分支",aheadTitle:"领先远程",behindTitle:"落后远程",fileCountOne:"{number} 个文件",fileCountOther:"{number} 个文件",empty:"无 git 改动",clean:"工作区干净,无改动",back:"返回",loading:"正在加载 diff…",noDiff:"该文件没有行级改动",emptyFile:"空文件",list:"列表",tree:"树形",close:"关闭"},WH={},UH={empty:"选择左侧文件预览",loading:"加载中…",lineCount:"{count} 行",copy:"复制",copied:"已复制",copyPath:"复制路径",openInEditor:"打开",reveal:"显示",download:"下载",close:"关闭",search:"搜索",prevMatch:"上一个匹配",nextMatch:"下一个匹配",htmlMode:"HTML 预览模式",markdownMode:"Markdown 预览模式",preview:"预览",source:"源码",imageFit:"图片缩放",fit:"适应",actual:"原始",pdfNoPreview:"无法内嵌预览此 PDF,可以下载后查看",imageNoPreview:"图片文件 · {mime} · {size} · 暂不预览",binaryNoPreview:"二进制文件 · {mime} · {size} 字节 · 暂不预览",unknownType:"未知类型",copyCode:"复制代码",enlargeImage:"放大图片",errors:{emptyPath:"文件路径为空",unsupportedPath:"不支持预览 URL 或远程路径",outsideWorkspace:"只能预览当前 workspace 内的文件",isDirectory:"请选择具体文件,而不是目录",notFound:"文件不存在或已被移动",tooLarge:"文件过大,暂不支持预览",loadFailed:"无法读取这个文件"}},jH={searching:"搜索中…",noMatch:"无匹配"},VH={dismiss:"关闭",errorLabel:"错误",noteLabel:"提示",agentWarningFallback:"agent 警告",unhandledEvent:"未处理的事件:{type}",agentError:{title:"模型请求失败",connection:"无法连接模型服务",auth:"模型认证失败",rateLimit:"模型请求被限流",overloaded:"模型服务过载",filtered:"响应被提供方过滤",api:"模型接口返回错误",contextOverflow:"上下文超出模型限制"},details:{cause:"底层原因",code:"错误码",connection:"连接状态",contentType:"响应类型",details:"服务端详情",duration:"耗时",endpoint:"请求地址",errorName:"错误类型",message:"错误信息",operation:"操作",phase:"失败阶段",request:"请求",requestId:"Request ID",responsePreview:"响应预览",sessionId:"Session ID",stack:"堆栈",status:"HTTP 状态",timeout:"超时设置",timestamp:"时间"},daemonApiTitle:"Kimi 服务器返回错误",daemonNetworkMessage:"Web 没有拿到 Kimi 服务器的响应。请确认它仍在运行,或刷新页面重试。",daemonNetworkTitle:"无法连接到 Kimi 服务器",diagnostics:"诊断信息",hideDetails:"收起详情",operationFailedMessage:"刚才的操作没有完成,请稍后重试。",operationFailedTitle:"操作失败",sessionSnapshotMessage:"Web 没能加载当前会话内容。请确认 Kimi 服务器仍在运行,或刷新页面重试。",sessionSnapshotTitle:"无法加载当前会话内容",showDetails:"查看详情",copyDetails:"复制诊断信息",copied:"已复制",wsTitle:"实时连接出错",goal:{alreadyExists:"当前会话已有一个进行中的目标,请先取消它再创建新目标。",notFound:"没有找到可操作的目标,可能它已经结束或被取消。",statusInvalid:"当前目标状态不支持这个操作。",notResumable:"这个目标无法恢复(可能已取消或已完成)。",objectiveTooLong:"目标描述太长了,请精简后重试。"}},qH={new:{desc:"创建新会话"},clear:{desc:"清空并新建会话"},login:{desc:"在浏览器中登录 Kimi"},plan:{desc:"切换计划模式 开/关"},swarm:{desc:"切换 swarm 模式;/swarm <任务> 直接在 swarm 下执行"},goal:{desc:"创建/控制目标:/goal <目标>、/goal pause{'|'}resume{'|'}cancel"},btw:{desc:"侧边聊天:/btw <问题> 向 fork 的侧边会话提问"},yolo:{desc:"自动批准工具操作,Agent 仍可能提问"},auto:{desc:"完全自主,Agent 不再提问"},thinking:{desc:"设置思考强度"},compact:{desc:"压缩会话历史"},fork:{desc:"把当前会话 fork 出一个新会话"},export:{desc:"将当前会话和排障日志下载为 ZIP 压缩包",noSession:"请先打开一个会话再导出。"},status:{desc:"查看会话状态"},undo:{desc:"撤销上一条消息"}},KH={label:{read:"读取",bash:"运行",edit:"编辑",write:"写入",grep:"搜索",glob:"查找",ls:"列目录",web_fetch:"抓取",search:"搜索",todo:"待办",task:"任务",swarm:"Swarm",ask_user:"提问",plan:"计划",goal_create:"启动目标",goal_get:"读取目标",goal_budget:"设置目标预算",goal_update:"更新目标"},swarm:{progress:"{done} / {total}",runningSub:"{count} 个进行中",doneSub:"完成 {completed} · 失败 {failed}",phaseQueued:"排队",phaseWorking:"运行中",phaseSuspended:"暂停",phaseCompleted:"完成",phaseFailed:"失败",waiting:"等待子任务加入…"},chip:{lines:"{count} 行",results:"{count} 结果",files:"{count} 个文件",edited:"已编辑",created:"已创建",todos:"{count} 项"},disclosure:{expand:"展开详情",collapse:"收起详情"},output:{waiting:"等待输出…",empty:"(无输出)",saved:"已保存的结果"},plan:{review:{pending:"待确认",approved:"已通过",rejected:"已拒绝",cancelled:"已取消"},selectedOption:"已选择",feedback:"反馈"},summary:{inScope:"{value} 在 {scope} 中"},goal:{objectiveWithCriterion:"{objective} · {criterion}",status:"状态:{status}",budget:"{value} {unit}",turns:"{value} 轮",tokens:"{value} token",milliseconds:"{value} 毫秒",seconds:"{value} 秒",minutes:"{value} 分钟",hours:"{value} 小时"},group:{countOther:"执行了 {count} 次工具调用",typed:{read:{done:"读取了 {count} 个文件"},bash:{done:"运行了 {count} 条命令"},grep:{done:"搜索了 {count} 个模式"},search:{done:"网络搜索了 {count} 次"},glob:{done:"找了 {count} 次文件"},ls:{done:"列出了 {count} 个目录"},web_fetch:{done:"抓取了 {count} 个页面"},edit:{done:"编辑了 {count} 处"},write:{done:"写入了 {count} 个文件"}}},activity:{failedClause:"({count} 失败)",liveDonePrefix:"已",busy:"正在执行…",doing:{read:"正在读取 {subject}",bash:"正在运行 {subject}",grep:"正在搜索 {subject}",search:"正在搜索 {subject}",glob:"正在匹配 {subject}",ls:"正在列出 {subject}",web_fetch:"正在抓取 {subject}",edit:"正在编辑 {subject}",write:"正在写入 {subject}"}},ask:{dismissed:"已忽略",answer:"{count} 个回答",answers:"{count} 个回答",answered:"已回答",more:"(还有 {count} 个)",collected:"已收集回答",question:"{count} 个问题",questions:"{count} 个问题",freeInput:"(自由输入)",unanswered:"未作答"}},ZH={resizeHandleAria:"调整侧栏宽度",resizePreviewAria:"调整预览面板宽度",detailPanelAria:"详情面板"},GH={openSwitcher:"切换会话 / 工作区",openSettings:"会话设置",settingsTitle:"会话设置",groupSession:"当前会话",groupApp:"应用偏好",sheetLabel:"面板",closeSheet:"关闭",tapToCycle:"点击切换",running:"运行中",idle:"空闲",sessionCount:"{n} 个会话",newSession:"新建会话",permManualSub:"每个工具都确认",permAutoSub:"完全自主,不再提问",permYoloSub:"自动批准工具,仍可能提问",planModeSub:"计划模式",swarmModeSub:"Swarm 模式",archivedSessions:"已归档会话",archivedSessionsSub:"查看并恢复已归档会话",archivedBack:"返回"},YH={colorSchemeLabel:"外观",light:"月之亮面",dark:"月之暗面",system:"跟随系统"},XH={continue:"继续",back:"上一步",skip:"跳过",welcome:{title:"欢迎使用 Kimi Code",subtitle:"为专业开发者打造的 AI 编程工作台",languageLabel:"语言",themeLabel:"外观"},login:{title:"选择配置模型",subtitle:"选择驱动 Kimi Code 的模型服务,之后可在「设置」中更改。",kimiTitle:"登录 Kimi 账号",kimiHint:"使用 Kimi 会员权益,开箱即用",recommended:"推荐",customProviderTitle:"添加自定义供应商",customProviderHint:"使用自己的 API Key,接入 OpenAI 兼容等模型服务",loggedInTitle:"已登录 Kimi 账号",loggedInHint:"模型服务已就绪,可以开始使用",finish:"完成",skip:"跳过,稍后再说"}},JH={title:"设置",internalTest:"内部测试",close:"关闭 (Esc)",tabs:{general:"通用",agent:"Agent",account:"账户",providers:"供应商",advanced:"高级",archived:"已归档",shortcuts:"快捷键"},appearance:"外观",notifications:"通知",notifyEnabled:"系统通知",notifyEnabledHint:"回合完成、待回答或待审批时发送系统通知",notifySound:"通知提示音",notifySoundHint:"系统通知随附提示音",notifyDenied:"已在浏览器设置中被阻止",notifyTitle:"Kimi Code · 回合完成",notifyQuestionTitle:"Kimi Code · 待回答",notifyApprovalTitle:"Kimi Code · 等待审批",notifyFallback:"点击查看结果",notifyQuestionFallback:"有提问等待你回答",notifyApprovalFallback:"有工具等待你审批",account:"账户",signedIn:"已登录",signedOutHint:"登录后可查看账户和模型权益",planUsage:{title:"套餐用量",retry:"重试",loadFailed:"加载失败",empty:"暂无用量数据",weekLimit:"每周限额",genericLimit:"限额",hourLimit:"{n} 小时限额",dayLimit:"{n} 天限额",minuteLimit:"{n} 分钟限额",resetsIn:"{duration}后重置",resetDone:"已重置",durationDay:"{n} 天",durationHour:"{n} 小时",durationMinute:"{n} 分钟",durationSecond:"{n} 秒",usedPct:"已用 {pct}%",boosterTitle:"加油包",boosterBalance:"余额",monthlyUsed:"本月已用",monthlyLimit:"每月上限",unlimited:"不限",freeTitle:"免费账户",freeHint:"升级会员后即可使用 Kimi 模型并查看套餐用量"},colorSchemeHint:"选择应用的明暗外观",appIcon:"程序坞图标",appIconHint:"选择程序坞中显示的图标",appIconDefault:"默认",appIconBlack:"黑色",uiFontSize:"字体大小",uiFontSizeHint:"调整界面和消息文字大小",vibrancy:"毛玻璃侧栏",vibrancyHint:"在侧栏使用 macOS 原生毛玻璃材质——如果半透明影响阅读可以关闭",languageHint:"选择界面显示语言",defaultOpenInApp:"默认打开应用",defaultOpenInAppHint:"从顶栏菜单打开文件和文件夹时默认使用的应用",openWith:"打开方式",agentDefaults:"Agent 默认值",saving:"保存中",defaultModel:"默认模型",defaultModelHint:"新会话会优先使用这个模型",noDefaultModel:"未设置默认模型",defaultPermission:"默认权限",defaultPermissionHint:"只影响之后新建的会话",defaultThinking:"默认开启思考",defaultThinkingHint:"新会话默认是否开启思考",defaultPlanMode:"默认计划模式",defaultPlanModeHint:"新会话默认进入计划模式",secondaryModelSection:"子智能体",secondaryModel:"子智能体模型",secondaryModelHint:"子智能体默认使用的模型与思考强度",secondaryModelEffort:"思考强度",noSecondaryModel:"未设置(跟随主模型)",secondaryModelEffortAuto:"模型默认",telemetry:"使用数据改进产品",telemetryHint:"开启后,我们会收集您的匿名交互数据(如点击、打断、功能使用等),用于改进产品体验。您可以随时关闭。",telemetryRestartHint:"更改后需重启服务生效。",credentialReady:"凭据已配置",credentialMissing:"缺少凭据",configUnavailable:"当前服务端没有返回 config,设置项暂不可用。",versionAndUpdates:"版本与更新",appVersion:"应用版本",appVersionHint:"当前应用的版本号和构建时间",checkUpdate:"检查更新",checkUpdateHint:"手动检查是否有新版本",checkUpdateBtn:"立即检查",updateChecking:"检查中…",updateCheckLatest:"已是最新版本",updateCheckAvailable:"发现新版本 {version},可从侧边栏的更新入口下载",updateCheckUnsupported:"当前构建不支持检查更新",updateCheckFailed:"检查失败,请稍后重试",updateCheckAvailableAuto:"发现新版本 {version},正在后台下载",updateCheckDownloaded:"新版本 {version} 已就绪,可从侧边栏的更新入口重启安装",autoDownloadUpdate:"自动下载更新",autoDownloadUpdateHint:"发现新版本时在后台自动下载,重启后完成安装",privacy:"数据与隐私",diagnostics:"诊断",build:"构建",serverVersion:"服务端版本",serverAddress:"服务器地址",serverAddressHint:"当前连接的服务器地址",serverVersionHint:"当前连接服务的版本",exportLog:"故障排查日志",exportLogHint:"导出已采集的故障排查日志",logHint:"加 ?debug=1 开启采集",exportLogBtn:"导出日志",archivedTitle:"已归档会话",archivedDesc:"查看已归档会话,确认其所属工作区路径、会话名称和归档时间,并可恢复到会话列表。",archivedSearch:"搜索已归档会话",archivedAllWorkspaces:"所有工作区",archivedSortLabel:"排序方式",archivedSortArchived:"归档时间",archivedSortCreated:"创建时间",archivedSortName:"按字母顺序",archivedRestore:"恢复",archivedEmpty:"还没有归档的会话",archivedNoMatch:"没有匹配的已归档会话",archivedSessionsCount:"{count} 个会话",archivedAt:"归档于 {time}",archivedLoadMore:"加载更多",archivedLoading:"加载中…",archivedLoadingAll:"正在加载全部归档会话…"},QH={openInEditor:"在编辑器中打开",openInEditorShort:"打开",openInApp:"用 {app} 打开",chooseOpenApp:"选择应用",copyAll:"复制全部对话为 Markdown",copyFinalSummary:"仅复制最终总结",copied:"已复制",lastUsed:"上次使用",copyPath:"复制路径",changed:"{n} 处改动",gitTooltip:"打开「文件 > 改动」",detached:"游离",openPr:"打开 Pull Request",prStatusOpen:"已打开",prStatusClosed:"已关闭",prStatusMerged:"已合并",prStatusDraft:"草稿",prStatusUnknown:"未知",options:"选项",copySessionId:"复制 Session ID",renameSession:"重命名",forkSession:"分叉会话",archiveSession:"归档",exportSession:"导出会话",devBadge:"开发环境运行中"},ez={title:"侧边聊天",subtitle:"从当前会话 fork",empty:"在侧边随手问一句 —— 它共享当前会话的上下文。",placeholder:"问问侧边聊天…",send:"发送"},tz={actions:{summonApp:{label:"显示应用窗口",desc:"从任意位置将应用窗口唤起到前台"},newSession:{label:"新建会话",desc:"在当前工作区开始一个新会话"},searchSessions:{label:"搜索会话",desc:"打开会话搜索弹窗"},archiveSession:{label:"归档任务",desc:"立即归档当前聊天"},toggleSideChat:{label:"侧边聊天",desc:"打开或关闭 /btw 侧边聊天"},toggleSidebar:{label:"展开/收起侧边栏",desc:"收起或展开会话侧边栏"},openFolder:{label:"打开文件夹",desc:"通过系统原生选择器添加工作目录"},openInDefaultApp:{label:"在默认应用中打开",desc:"在默认编辑器或终端中打开当前工作目录"},openSettings:{label:"打开设置",desc:"显示或隐藏设置窗口"},toggleTerminal:{label:"切换终端",desc:"显示或隐藏底部终端面板"},send:{label:"发送消息",desc:"发送输入框中的内容"},newline:{label:"换行",desc:"在输入框中插入换行"}},searchPlaceholder:"搜索快捷键",unassigned:"未分配",unassign:"取消分配",edit:"编辑快捷键",reset:"恢复默认",resetAll:"全部恢复默认",recording:"按下新的快捷键…",invalid:"该按键组合不能用作快捷键",notGlobal:"该按键组合无法注册为系统级快捷键",globalTaken:"该快捷键已被系统或其他应用占用",reserved:"系统菜单已占用该快捷键",reservedSteer:"steer 固定快捷键(Ctrl/Cmd+S),不可占用",reservedFind:"对话搜索固定快捷键(Ctrl/Cmd+F),不可占用",conflict:"已被「{action}」占用",customBadge:"自定义"},nz={panelAria:"终端",toolbarAria:"终端标签页",resizeAria:"调整终端面板高度",toggle:"切换终端",newTab:"新建终端",closeTab:"关闭终端",restartTab:"重启终端",collapse:"收起终端面板",empty:"还没有终端,点击新建一个",processExited:"[进程已退出]",processExitedWithCode:"[进程已退出,退出码 {code}]"},oz={common:AH,app:MH,sidebar:TH,workspace:EH,conversation:IH,status:LH,composer:$H,login:NH,providers:OH,model:FH,sessions:RH,approval:PH,question:DH,tasks:BH,thinking:HH,diff:zH,fileTree:WH,filePreview:UH,mention:jH,warnings:VH,commands:qH,tools:KH,layout:ZH,mobile:GH,theme:YH,onboarding:XH,settings:JH,header:QH,sideChat:ez,shortcuts:tz,terminal:nz},sz={en:SH,zh:oz},iz="kimi-locale";function gM(){let e=null;try{e=globalThis.localStorage?.getItem(iz)??null}catch{e=null}return e==="en"||e==="zh"?e:globalThis.navigator?.language?.toLowerCase().startsWith("zh")?"zh":"en"}function rz(e){const t=e.locale??gM();return DB({legacy:!1,locale:t,fallbackLocale:"en",messages:sz})}const vM=Symbol("KimiI18n"),lz={t:e=>e};function df(){const e=dn(vM,null);if(e)return e;try{const t=$t();return{t:(n,o)=>t.t(n,o),locale:t.locale.value}}catch{return lz}}const az=["type","disabled","aria-label"],cz=et({__name:"IconButton",props:{size:{default:"md"},disabled:{type:Boolean},label:{},type:{default:"button"}},setup(e,{expose:t}){const n=K();return t({el:n}),(o,s)=>(k(),M("button",{ref_key:"el",ref:n,class:Fe(["ui-icon-button",`ui-icon-button--${e.size}`]),type:e.type,disabled:e.disabled,"aria-label":e.label},[Cn(o.$slots,"default",{},void 0,!0)],10,az))}}),mt=(e,t)=>{const n=e.__vccOpts||e;for(const[o,s]of t)n[o]=s;return n},mn=mt(cz,[["__scopeId","data-v-57997ee5"]]),yM=Symbol("IconResolver"),uz={sm:14,md:16,lg:20},Me=et({__name:"Icon",props:{name:{},size:{default:"md"},label:{}},setup(e){const t=e,n=dn(yM,()=>{}),o=F(()=>n(t.name)),s=F(()=>uz[t.size]);return(i,r)=>o.value?(k(),me(fs(o.value),{key:0,class:"kw-icon",width:s.value,height:s.value,"aria-label":e.label,"aria-hidden":e.label?void 0:!0},null,8,["width","height","aria-label","aria-hidden"])):te("",!0)}}),dz={class:"ui-action-toast-host"},fz={class:"ui-action-toast__body"},pz=et({__name:"ActionToast",props:{duration:{default:8e3},dismissLabel:{}},emits:["dismiss"],setup(e,{emit:t}){const n=e,o=t,{t:s}=df();let i=null,r=0,l=0;function a(d){i=setTimeout(()=>o("dismiss"),d),r=Date.now()+d}function c(){i!==null&&(clearTimeout(i),i=null,l=Math.max(0,r-Date.now()))}function u(){i===null&&a(l)}return a(n.duration),kn(()=>{i!==null&&clearTimeout(i)}),(d,f)=>(k(),M("div",dz,[C("div",{class:"ui-action-toast",role:"status",onPointerenter:c,onPointerleave:u},[C("span",fz,[Cn(d.$slots,"default")]),q(mn,{class:"ui-action-toast__close",size:"sm",label:e.dismissLabel??p(s)("common.dismiss"),onClick:f[0]||(f[0]=h=>o("dismiss"))},{default:be(()=>[q(Me,{name:"close",size:"sm"})]),_:1},8,["label"])],32)]))}}),hz=mt(pz,[["__scopeId","data-v-6c6626f8"]]),mz={key:0,width:"36",height:"36",viewBox:"0 0 36 36",fill:"none",stroke:"var(--color-success)","stroke-width":"2","aria-hidden":"true"},gz={key:1,width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",stroke:"var(--color-danger)","stroke-width":"1.5","aria-hidden":"true"},vz={key:2,width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",stroke:"var(--color-warning)","stroke-width":"1.5","aria-hidden":"true"},Nd=et({__name:"AuthStateIcon",props:{kind:{}},setup(e){return(t,n)=>e.kind==="success"?(k(),M("svg",mz,[...n[0]||(n[0]=[C("circle",{cx:"18",cy:"18",r:"15"},null,-1),C("polyline",{points:"10,18 15,24 26,12"},null,-1)])])):e.kind==="expired"?(k(),M("svg",gz,[...n[1]||(n[1]=[C("circle",{cx:"14",cy:"14",r:"12"},null,-1),C("line",{x1:"14",y1:"8",x2:"14",y2:"15"},null,-1),C("circle",{cx:"14",cy:"19",r:"1.2",fill:"var(--color-danger)"},null,-1)])])):(k(),M("svg",vz,[...n[2]||(n[2]=[C("path",{d:"M14 3 L26 24 H2 Z"},null,-1),C("line",{x1:"14",y1:"12",x2:"14",y2:"18"},null,-1),C("circle",{cx:"14",cy:"21.5",r:"1",fill:"var(--color-warning)"},null,-1)])]))}}),yz={key:0,class:"ui-badge__dot","aria-hidden":"true"},kz=et({__name:"Badge",props:{variant:{default:"neutral"},size:{default:"md"},dot:{type:Boolean}},setup(e){return(t,n)=>(k(),M("span",{class:Fe(["ui-badge",[`ui-badge--${e.variant}`,`ui-badge--${e.size}`]])},[e.dot?(k(),M("span",yz)):te("",!0),Cn(t.$slots,"default",{},void 0,!0)],2))}}),Wr=mt(kz,[["__scopeId","data-v-b2534598"]]),bz={class:"ui-banner__icon","aria-hidden":"true"},Cz={class:"ui-banner__text"},wz=et({__name:"Banner",props:{variant:{default:"info"}},setup(e){return(t,n)=>(k(),M("div",{class:Fe(["ui-banner",`ui-banner--${e.variant}`]),role:"status"},[C("span",bz,[Cn(t.$slots,"icon",{},()=>[e.variant==="info"?(k(),me(Me,{key:0,name:"info",size:"md"})):(k(),me(Me,{key:1,name:"alert-triangle",size:"md"}))],!0)]),C("span",Cz,[Cn(t.$slots,"default",{},void 0,!0)])],2))}}),Uc=mt(wz,[["__scopeId","data-v-6d311338"]]),_z=["aria-label"],xz=et({__name:"Spinner",props:{size:{default:"md"},label:{}},setup(e){const{t}=df(),n=K(null);let o,s;function i(){const r=n.value;if(r){if(s?.matches){o?.cancel(),o=void 0;return}o||(o=r.animate([{transform:"rotate(0deg)"},{transform:"rotate(360deg)"}],{duration:850,iterations:1/0}),o.startTime=0)}}return cn(()=>{const r=n.value;!r||typeof r.animate!="function"||(s=window.matchMedia("(prefers-reduced-motion: reduce)"),s.addEventListener("change",i),i())}),Dn(()=>{s?.removeEventListener("change",i),s=void 0,o?.cancel(),o=void 0}),(r,l)=>(k(),M("span",{ref_key:"boxRef",ref:n,class:Fe(["ui-spinner",`ui-spinner--${e.size}`]),role:"status","aria-label":e.label??p(t)("common.loading")},[...l[0]||(l[0]=[C("svg",{class:"ui-spinner__svg",viewBox:"0 0 24 24","aria-hidden":"true"},[C("circle",{class:"ui-spinner__track",cx:"12",cy:"12",r:"9"}),C("circle",{class:"ui-spinner__arc",cx:"12",cy:"12",r:"9"})],-1)])],10,_z))}}),Ao=mt(xz,[["__scopeId","data-v-980b39ef"]]),Sz=["type","disabled"],Az={class:"ui-button__content"},Mz=et({__name:"Button",props:{variant:{default:"primary"},size:{default:"md"},disabled:{type:Boolean},loading:{type:Boolean},type:{default:"button"}},setup(e){return(t,n)=>(k(),M("button",{class:Fe(["ui-button",[`ui-button--${e.variant}`,`ui-button--${e.size}`,{"is-loading":e.loading}]]),type:e.type,disabled:e.disabled||e.loading},[e.loading?(k(),me(Ao,{key:0,size:"sm",class:"ui-button__spinner"})):te("",!0),C("span",Az,[Cn(t.$slots,"default",{},void 0,!0)])],10,Sz))}}),Rt=mt(Mz,[["__scopeId","data-v-991bd099"]]),Tz={key:0,class:"ui-card__head"},Ez={class:"ui-card__body"},Iz={key:1,class:"ui-card__foot"},Lz=et({__name:"Card",props:{elevated:{type:Boolean,default:!1}},setup(e){return(t,n)=>(k(),M("div",{class:Fe(["ui-card",{"is-elevated":e.elevated}])},[t.$slots.head?(k(),M("div",Tz,[Cn(t.$slots,"head",{},void 0,!0)])):te("",!0),C("div",Ez,[Cn(t.$slots,"default",{},void 0,!0)]),t.$slots.foot?(k(),M("div",Iz,[Cn(t.$slots,"foot",{},void 0,!0)])):te("",!0)],2))}}),$z=mt(Lz,[["__scopeId","data-v-5b79d24e"]]),Nz=["checked","disabled"],Oz={class:"ui-check__box","aria-hidden":"true"},Fz={key:0,class:"ui-check__label"},Rz=et({__name:"Checkbox",props:{modelValue:{type:Boolean},disabled:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const n=t;return(o,s)=>(k(),M("label",{class:Fe(["ui-check",{"is-on":e.modelValue,"is-disabled":e.disabled}])},[C("input",{class:"ui-check__input",type:"checkbox",checked:e.modelValue,disabled:e.disabled,onChange:s[0]||(s[0]=i=>n("update:modelValue",i.target.checked))},null,40,Nz),C("span",Oz,[e.modelValue?(k(),me(Me,{key:0,name:"check",size:"md"})):te("",!0)]),o.$slots.default?(k(),M("span",Fz,[Cn(o.$slots,"default",{},void 0,!0)])):te("",!0)],2))}}),Pz=mt(Rz,[["__scopeId","data-v-24b7346f"]]),Dz={class:"ctx-ring",viewBox:"0 0 20 20","aria-hidden":"true"},Bz=["stroke-dasharray","stroke-dashoffset"],Gv=7,Hz=et({__name:"ContextRing",props:{pct:{}},setup(e){const t=e,n=2*Math.PI*Gv;return(o,s)=>(k(),M("svg",Dz,[C("circle",{class:"ctx-ring-track",cx:"10",cy:"10",r:Gv,fill:"none","stroke-width":"2.5"}),C("circle",{class:"ctx-ring-fill",cx:"10",cy:"10",r:Gv,fill:"none","stroke-width":"2.5","stroke-linecap":"round","stroke-dasharray":`${n}`,"stroke-dashoffset":`${n*(1-t.pct/100)}`},null,8,Bz)]))}}),zz=mt(Hz,[["__scopeId","data-v-5449b6d4"]]),li=K(0),Wz=["aria-label"],Uz={key:0,class:"ui-dialog__head"},jz={class:"ui-dialog__titles"},Vz={key:0,class:"ui-dialog__title"},qz={key:1,class:"ui-dialog__desc"},Kz={class:"ui-dialog__body"},Zz={key:1,class:"ui-dialog__foot"},Gz='a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])',Yz=et({__name:"Dialog",props:{open:{type:Boolean},title:{},ariaLabel:{},description:{},closeOnOverlay:{type:Boolean,default:!0},closeOnEsc:{type:Boolean,default:!0},size:{default:"md"},height:{default:"auto"},padded:{type:Boolean,default:!0},hideClose:{type:Boolean},level:{default:"raised"},initialFocus:{}},emits:["update:open","close"],setup(e,{emit:t}){const n=e,o=t,{t:s}=df(),i=K(null);let r=null;function l(){o("update:open",!1),o("close")}function a(){return i.value?Array.from(i.value.querySelectorAll(Gz)):[]}function c(){const{initialFocus:f}=n;return f?typeof f=="function"?f()??null:typeof f=="string"?i.value?.querySelector(f)??null:i.value?.contains(f)?f:null:null}function u(f){if(!n.open)return;if(f.key==="Escape"&&n.closeOnEsc){f.preventDefault(),l();return}if(f.key!=="Tab")return;const h=a(),m=h[0],g=h[h.length-1];if(!m||!g){f.preventDefault(),i.value?.focus();return}const b=document.activeElement;f.shiftKey&&b===m?(f.preventDefault(),g.focus()):!f.shiftKey&&b===g&&(f.preventDefault(),m.focus())}function d(f){n.closeOnOverlay&&f.target===f.currentTarget&&l()}return Je(()=>n.open,async f=>{if(f){li.value+=1,r=document.activeElement,await bt();const h=c(),m=a();(h??m[0]??i.value)?.focus()}else li.value=Math.max(0,li.value-1),r instanceof HTMLElement&&(r.focus(),r=null)},{immediate:!0}),typeof window<"u"&&window.addEventListener("keydown",u),Dn(()=>{typeof window<"u"&&window.removeEventListener("keydown",u),n.open&&(li.value=Math.max(0,li.value-1),r instanceof HTMLElement&&r.focus())}),(f,h)=>(k(),me(Vr,{to:"body"},[e.open?(k(),M("div",{key:0,class:"ui-dialog__overlay",onMousedown:d},[C("div",{ref_key:"panel",ref:i,class:Fe(["ui-dialog",[`ui-dialog--${e.size}`,{"ui-dialog--flush":!e.padded,"ui-dialog--fixed-height":e.height==="fixed","ui-dialog--grouped":e.level==="grouped"}]]),role:"dialog","aria-modal":"true","aria-label":e.ariaLabel??e.title,tabindex:"-1"},[e.title||f.$slots.head?(k(),M("div",Uz,[Cn(f.$slots,"head",{},()=>[C("div",jz,[e.title?(k(),M("div",Vz,N(e.title),1)):te("",!0),e.description?(k(),M("div",qz,N(e.description),1)):te("",!0)])],!0),e.hideClose?te("",!0):(k(),me(mn,{key:0,class:"ui-dialog__close",size:"sm",label:p(s)("common.close"),onClick:l},{default:be(()=>[q(Me,{name:"close",size:"md"})]),_:1},8,["label"]))])):te("",!0),C("div",Kz,[Cn(f.$slots,"default",{},void 0,!0)]),f.$slots.foot?(k(),M("div",Zz,[Cn(f.$slots,"foot",{},void 0,!0)])):te("",!0)],10,Wz)],32)):te("",!0)]))}}),sa=mt(Yz,[["__scopeId","data-v-f88f8b0f"]]),Xz={class:"ui-empty"},Jz={key:0,class:"ui-empty__icon","aria-hidden":"true"},Qz={key:1,class:"ui-empty__title"},eW={key:2,class:"ui-empty__hint"},tW=et({__name:"EmptyState",props:{title:{},hint:{}},setup(e){return(t,n)=>(k(),M("div",Xz,[t.$slots.icon?(k(),M("span",Jz,[Cn(t.$slots,"icon",{},void 0,!0)])):te("",!0),e.title?(k(),M("div",Qz,N(e.title),1)):te("",!0),e.hint?(k(),M("div",eW,N(e.hint),1)):te("",!0),Cn(t.$slots,"default",{},void 0,!0)]))}}),nW=mt(tW,[["__scopeId","data-v-b0fa7ac8"]]),oW={key:0,class:"ui-field__label"},sW={key:1,class:"ui-field__error"},iW={key:2,class:"ui-field__hint"},rW=et({__name:"Field",props:{label:{},hint:{},error:{}},setup(e){return(t,n)=>(k(),M("div",{class:Fe(["ui-field",{"has-error":!!e.error}])},[e.label?(k(),M("label",oW,N(e.label),1)):te("",!0),Cn(t.$slots,"default",{},void 0,!0),e.error?(k(),M("span",sW,N(e.error),1)):e.hint?(k(),M("span",iW,N(e.hint),1)):te("",!0)],2))}}),lW=mt(rW,[["__scopeId","data-v-1ee2d269"]]),aW=["type","value","placeholder","disabled","readonly"],cW=et({__name:"Input",props:{modelValue:{},size:{default:"md"},type:{default:"text"},placeholder:{},disabled:{type:Boolean},readonly:{type:Boolean},error:{type:Boolean}},emits:["update:modelValue","focus","blur"],setup(e,{expose:t,emit:n}){const o=n,s=K();function i(a){o("update:modelValue",a.target.value)}function r(){s.value?.focus()}function l(){s.value?.select()}return t({focus:r,select:l,el:s}),(a,c)=>(k(),M("input",{ref_key:"el",ref:s,class:Fe(["ui-input",[`ui-input--${e.size}`,{"has-error":e.error}]]),type:e.type,value:e.modelValue,placeholder:e.placeholder,disabled:e.disabled,readonly:e.readonly,onInput:i,onFocus:c[0]||(c[0]=u=>a.$emit("focus",u)),onBlur:c[1]||(c[1]=u=>a.$emit("blur",u))},null,42,aW))}}),Os=mt(cW,[["__scopeId","data-v-d7981aa3"]]),uW={class:"ui-kbd"},dW=et({__name:"Kbd",props:{keys:{}},setup(e){return(t,n)=>(k(),M("span",uW,[(k(!0),M(De,null,vt(e.keys,o=>(k(),M("kbd",{key:o,class:"ui-kbd__key"},N(o),1))),128))]))}}),Yl=mt(dW,[["__scopeId","data-v-33bf22f6"]]),fW=["role"],pW=et({__name:"Menu",props:{role:{default:"menu"}},setup(e,{expose:t}){const n=K();return t({el:n}),(o,s)=>(k(),M("div",{ref_key:"el",ref:n,class:"ui-menu",role:e.role},[Cn(o.$slots,"default",{},void 0,!0)],8,fW))}}),ea=mt(pW,[["__scopeId","data-v-030302f1"]]),hW={key:0,class:"ui-menu-sep",role:"separator"},mW=["role","disabled"],gW=et({__name:"MenuItem",props:{active:{type:Boolean},danger:{type:Boolean},disabled:{type:Boolean},separator:{type:Boolean},size:{default:"md"},role:{default:"menuitem"}},emits:["click"],setup(e){return(t,n)=>e.separator?(k(),M("div",hW)):(k(),M("button",{key:1,class:Fe(["ui-menu-item",[`ui-menu-item--${e.size}`,{"is-active":e.active,"is-danger":e.danger}]]),type:"button",role:e.role,disabled:e.disabled,onClick:n[0]||(n[0]=o=>t.$emit("click",o))},[Cn(t.$slots,"default",{},void 0,!0)],10,mW))}}),hn=mt(gW,[["__scopeId","data-v-acfc5c6f"]]),B0=new Set;let Sk;const vW=et({__name:"Tooltip",props:{text:{},placement:{default:"top"},maxWidth:{default:280},maxLines:{default:6}},setup(e){const t=e,n=6,o=8,s=150,i=K(),r=K(),l=K(!1),a=K(!1),c=K({maxWidth:`${t.maxWidth}px`});let u,d=null,f;const h={getTarget:()=>d,hide:b,show:g};function m(){const x=r.value;if(!d||!x)return;const A=d.getBoundingClientRect(),L=x.offsetWidth,S=x.offsetHeight,T=window.innerWidth,R=window.innerHeight;let B=t.placement;B==="top"&&A.top-n-SR-o?B="top":B==="left"&&A.left-n-LT-o&&(B="left");let I=0,$=0;B==="top"?(I=A.top-n-S,$=A.left+A.width/2-L/2):B==="bottom"?(I=A.bottom+n,$=A.left+A.width/2-L/2):B==="left"?(I=A.top+A.height/2-S/2,$=A.left-n-L):(I=A.top+A.height/2-S/2,$=A.right+n),$=Math.min(Math.max($,o),T-o-L),I=Math.min(Math.max(I,o),R-o-S),c.value={maxWidth:`${t.maxWidth}px`,top:`${Math.round(I)}px`,left:`${Math.round($)}px`}}function g(x){if(t.text){if(x!==void 0){if(x===Sk)return;Sk=x}for(const A of B0){const L=A.getTarget();A!==h&&d&&L&&L!==d&&L.contains(d)&&A.hide()}window.clearTimeout(u),u=window.setTimeout(()=>{l.value=!0,a.value=!1,bt(()=>{m(),a.value=!0})},s)}}function b(){window.clearTimeout(u),l.value=!1,a.value=!1}function _(){for(const x of B0){const A=x.getTarget();x!==h&&d&&A&&A!==d&&A.contains(d)&&A.matches(":hover, :focus-within")&&x.show()}}function v(){b(),_()}function y(){l.value&&b()}function w(x){x!==d&&(d&&(d.removeEventListener("mouseenter",g),d.removeEventListener("mouseleave",v),d.removeEventListener("focusin",g),d.removeEventListener("focusout",v)),d=x,d&&(d.addEventListener("mouseenter",g),d.addEventListener("mouseleave",v),d.addEventListener("focusin",g),d.addEventListener("focusout",v)))}return cn(()=>{B0.add(h);const x=i.value??null;w(x?.firstElementChild??x),x&&(f=new MutationObserver(()=>{const A=x.firstElementChild??null;A!==d&&(b(),w(A??x),_())}),f.observe(x,{childList:!0})),window.addEventListener("scroll",y,!0),window.addEventListener("resize",y)}),Dn(()=>{_(),B0.delete(h),window.clearTimeout(u),f?.disconnect(),w(null),window.removeEventListener("scroll",y,!0),window.removeEventListener("resize",y)}),(x,A)=>(k(),M(De,null,[C("span",{ref_key:"trigger",ref:i,class:"ui-tip"},[Cn(x.$slots,"default",{},void 0,!0)],512),(k(),me(Vr,{to:"body"},[An(C("div",{ref_key:"bubble",ref:r,class:Fe(["ui-tip__bubble",{positioned:a.value}]),style:Gt([c.value,{"--tip-lines":e.maxLines}]),role:"tooltip"},N(e.text),7),[[xs,l.value]])]))],64))}}),$n=mt(vW,[["__scopeId","data-v-39b305fe"]]),yW={class:"ui-panel-header__title"},kW={key:0,class:"ui-panel-header__sub"},bW=et({__name:"PanelHeader",props:{title:{},subtitle:{},closable:{type:Boolean,default:!0},closeLabel:{},closeIcon:{default:"close"},wrap:{type:Boolean}},emits:["close"],setup(e){const{t}=df();return(n,o)=>(k(),M("div",{class:Fe(["ui-panel-header",{wrap:e.wrap}])},[C("span",yW,N(e.title),1),q($n,{text:e.subtitle},{default:be(()=>[e.subtitle?(k(),M("span",kW,N(e.subtitle),1)):te("",!0)]),_:1},8,["text"]),Cn(n.$slots,"default",{},void 0,!0),e.closable?(k(),me(mn,{key:0,class:"ui-panel-header__close",size:"sm",label:e.closeLabel??p(t)("common.close"),onClick:o[0]||(o[0]=s=>n.$emit("close"))},{default:be(()=>[q(Me,{name:e.closeIcon,size:"sm"},null,8,["name"])]),_:1},8,["label"])):te("",!0)],2))}}),uu=mt(bW,[["__scopeId","data-v-82d0e93d"]]),CW=["disabled","aria-pressed"],wW=et({__name:"Pill",props:{clickable:{type:Boolean,default:!0},active:{type:Boolean},disabled:{type:Boolean},ariaPressed:{type:Boolean}},emits:["click"],setup(e){return(t,n)=>e.clickable?(k(),M("button",{key:0,class:Fe(["ui-pill",{"is-active":e.active}]),type:"button",disabled:e.disabled,"aria-pressed":e.ariaPressed,onClick:n[0]||(n[0]=o=>t.$emit("click",o))},[Cn(t.$slots,"default",{},void 0,!0)],10,CW)):(k(),M("span",{key:1,class:Fe(["ui-pill",{"is-active":e.active}])},[Cn(t.$slots,"default",{},void 0,!0)],2))}}),H0=mt(wW,[["__scopeId","data-v-e30f5edc"]]),_W=et({__name:"ScrollArea",props:{orientation:{default:"vertical"},hideDelay:{default:600}},setup(e,{expose:t}){const n=e,o=K(null),s=K(null),i=K(!1),r=K({overflow:!1,size:0,offset:0}),l=K({overflow:!1,size:0,offset:0}),a=K(null);let c=null,u=null,d=null;const f=F(()=>({overflowX:n.orientation==="vertical"?"hidden":"auto",overflowY:n.orientation==="horizontal"?"hidden":"auto"})),h=F(()=>({height:`${r.value.size}px`,transform:`translateY(${r.value.offset}px)`})),m=F(()=>({width:`${l.value.size}px`,transform:`translateX(${l.value.offset}px)`}));function g(T,R,B){if(!(R>T+1)||T<=0)return{overflow:!1,size:0,offset:0};const $=Math.max(0,T-4),D=Math.min($,Math.max(24,$*T/R)),H=Math.max(0,$-D),O=Math.max(1,R-T);return{overflow:!0,size:D,offset:H*B/O}}function b(){const T=s.value;if(!T)return;const R=g(T.clientHeight,T.scrollHeight,T.scrollTop),B=g(T.clientWidth,T.scrollWidth,T.scrollLeft);(R.overflow!==r.value.overflow||R.size!==r.value.size||R.offset!==r.value.offset)&&(r.value=R),(B.overflow!==l.value.overflow||B.size!==l.value.size||B.offset!==l.value.offset)&&(l.value=B)}function _(){c!==null&&clearTimeout(c),c=null}function v(){_(),i.value=!0}function y(){_(),!(a.value||o.value?.matches(":hover, :focus-within"))&&(c=setTimeout(()=>{i.value=!1,c=null},n.hideDelay))}function w(){b(),v(),y()}function x(T,R){const B=s.value;B&&(R.preventDefault(),v(),a.value={axis:T,pointerId:R.pointerId,startPointer:T==="vertical"?R.clientY:R.clientX,startScroll:T==="vertical"?B.scrollTop:B.scrollLeft},R.currentTarget.setPointerCapture(R.pointerId))}function A(T){const R=a.value,B=s.value;if(!R||R.pointerId!==T.pointerId||!B)return;const I=R.axis==="vertical"?T.clientY:T.clientX,$=R.axis==="vertical"?B.clientHeight:B.clientWidth,D=R.axis==="vertical"?B.scrollHeight:B.scrollWidth,H=R.axis==="vertical"?r.value.size:l.value.size,O=Math.max(1,$-4-H),P=(I-R.startPointer)*(D-$)/O;R.axis==="vertical"?B.scrollTop=R.startScroll+P:B.scrollLeft=R.startScroll+P}function L(T){!a.value||a.value.pointerId!==T.pointerId||(a.value=null,y())}function S(){const T=s.value;if(!(!T||!u))for(const R of T.children)u.observe(R)}return cn(async()=>{await bt();const T=s.value;T&&(u=new ResizeObserver(b),u.observe(T),S(),d=new MutationObserver(()=>{S(),b()}),d.observe(T,{childList:!0,subtree:!0,characterData:!0}),b())}),Dn(()=>{_(),u?.disconnect(),d?.disconnect()}),t({viewport:s,updateMetrics:b}),(T,R)=>(k(),M("div",{ref_key:"root",ref:o,class:"ui-scroll-area",onPointerenter:v,onPointerleave:y,onFocusin:v,onFocusout:y},[C("div",{ref_key:"viewport",ref:s,class:"ui-scroll-area__viewport",style:Gt(f.value),tabindex:"0",onScroll:w},[Cn(T.$slots,"default",{},void 0,!0)],36),r.value.overflow&&n.orientation!=="horizontal"?(k(),M("div",{key:0,class:Fe(["ui-scroll-area__bar ui-scroll-area__bar--vertical",{"is-visible":i.value}]),"aria-hidden":"true"},[C("span",{class:"ui-scroll-area__thumb",style:Gt(h.value),onPointerdown:R[0]||(R[0]=B=>x("vertical",B)),onPointermove:A,onPointerup:L,onPointercancel:L},null,36)],2)):te("",!0),l.value.overflow&&n.orientation!=="vertical"?(k(),M("div",{key:1,class:Fe(["ui-scroll-area__bar ui-scroll-area__bar--horizontal",{"is-visible":i.value}]),"aria-hidden":"true"},[C("span",{class:"ui-scroll-area__thumb",style:Gt(m.value),onPointerdown:R[1]||(R[1]=B=>x("horizontal",B)),onPointermove:A,onPointerup:L,onPointercancel:L},null,36)],2)):te("",!0)],544))}}),Ak=mt(_W,[["__scopeId","data-v-26a82ded"]]),xW=["aria-selected","onClick"],SW=et({__name:"SegmentedControl",props:{modelValue:{},options:{},size:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,o=t,s=K(null),i=K([]),r=K(!1),l=K({});let a=null;function c(d,f){d instanceof HTMLElement&&(i.value[f]=d)}async function u(){await bt();const d=n.options.findIndex(h=>h.value===n.modelValue),f=i.value[d];f&&(l.value={width:`${f.offsetWidth}px`,height:`${f.offsetHeight}px`,transform:`translate(${f.offsetLeft}px, ${f.offsetTop}px)`},r.value=!0)}return Je(()=>[n.modelValue,n.options.length],u,{immediate:!0}),cn(()=>{a=new ResizeObserver(()=>u()),s.value&&a.observe(s.value);for(const d of i.value)a.observe(d);u()}),Dn(()=>a?.disconnect()),(d,f)=>(k(),M("div",{ref_key:"root",ref:s,class:Fe(["ui-seg",`ui-seg--${e.size??"md"}`]),role:"tablist"},[C("span",{class:Fe(["ui-seg__indicator",{"is-ready":r.value}]),style:Gt(l.value),"aria-hidden":"true"},null,6),(k(!0),M(De,null,vt(e.options,(h,m)=>(k(),M("button",{key:h.value,ref_for:!0,ref:g=>c(g,m),class:Fe(["ui-seg__item",{"is-on":h.value===e.modelValue}]),type:"button",role:"tab","aria-selected":h.value===e.modelValue,onClick:g=>o("update:modelValue",h.value)},[h.icon?(k(),me(Me,{key:0,class:"ui-seg__icon",name:h.icon,size:"sm"},null,8,["name"])):te("",!0),h.swatch?(k(),M("span",{key:1,class:"ui-seg__swatch",style:Gt({backgroundColor:h.swatch})},null,4)):te("",!0),Ve(" "+N(h.label),1)],10,xW))),128))],2))}}),ai=mt(SW,[["__scopeId","data-v-0442baca"]]),AW=["aria-expanded","disabled"],MW=["src"],TW={class:"ui-select__value-text"},EW={key:0,class:"ui-select__group"},IW=["aria-selected","disabled","onMouseenter","onClick"],LW=["src"],$W=et({inheritAttrs:!1,__name:"Select",props:{modelValue:{},options:{},placeholder:{default:""},size:{default:"md"},disabled:{type:Boolean},error:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,o=t,s=cf(),i=K(null),r=K(null),l=K(null),a=K([]),c=K(!1),u=K(-1),d=`ui-select-${Math.random().toString(36).slice(2,9)}`,f=F(()=>n.options.findIndex(S=>String(S.value)===String(n.modelValue??""))),h=F(()=>n.options[f.value]),m=F(()=>h.value?.label??n.placeholder);function g(S,T){a.value[T]=S instanceof HTMLElement?S:null}function b(){const S=l.value,T=a.value[u.value];!S||!T||(S.scrollTop=T.offsetTop-(S.clientHeight-T.offsetHeight)/2)}function _(){n.disabled||c.value||(c.value=!0,u.value=f.value>=0?f.value:n.options.findIndex(S=>!S.disabled),bt(b))}function v({restoreFocus:S=!1}={}){c.value&&(c.value=!1,S&&bt(()=>r.value?.focus()))}function y(){c.value?v():_()}function w(S){S.disabled||(String(S.value)!==String(n.modelValue??"")&&o("update:modelValue",S.value),v({restoreFocus:!0}))}function x(S){if(c.value||_(),n.options.length===0)return;let T=u.value;for(let R=0;RR.disabled?-1:B).filter(R=>R>=0);u.value=S.key==="Home"?T[0]??-1:T.at(-1)??-1,bt(b)}}function L(S){i.value?.contains(S.target)||v()}return cn(()=>document.addEventListener("pointerdown",L)),kn(()=>document.removeEventListener("pointerdown",L)),(S,T)=>(k(),M("div",{ref_key:"rootRef",ref:i,class:Fe(["ui-select",[`ui-select--${e.size}`,{"has-error":e.error,"is-open":c.value,"is-disabled":e.disabled}]])},[C("button",Nn({ref_key:"triggerRef",ref:r},p(s),{class:"ui-select__trigger",type:"button",role:"combobox","aria-controls":d,"aria-expanded":c.value,"aria-haspopup":"listbox",disabled:e.disabled,onClick:y,onKeydown:A}),[C("span",{class:Fe(["ui-select__value",{"is-placeholder":!h.value}])},[h.value?.icon?(k(),M("img",{key:0,class:"ui-select__icon",src:h.value.icon,alt:""},null,8,MW)):te("",!0),C("span",TW,N(m.value),1)],2),q(Me,{class:"ui-select__chevron",name:"chevron-down",size:"sm"})],16,AW),c.value?(k(),M("div",{key:0,id:d,ref_key:"listRef",ref:l,class:"ui-select__menu",role:"listbox"},[(k(!0),M(De,null,vt(e.options,(R,B)=>(k(),M(De,{key:`${R.group??""}:${R.value}`},[R.group&&R.group!==e.options[B-1]?.group?(k(),M("div",EW,N(R.group),1)):te("",!0),C("button",{ref_for:!0,ref:I=>g(I,B),class:Fe(["ui-select__option",{"is-selected":B===f.value,"is-active":B===u.value}]),type:"button",role:"option","aria-selected":B===f.value,disabled:R.disabled,onMouseenter:I=>u.value=B,onClick:I=>w(R)},[q(Me,{class:"ui-select__check",name:"check",size:"sm"}),R.icon?(k(),M("img",{key:0,class:"ui-select__icon ui-select__icon--option",src:R.icon,alt:""},null,8,LW)):te("",!0),C("span",null,N(R.label),1)],42,IW)],64))),128))],512)):te("",!0)],2))}}),X4=mt($W,[["__scopeId","data-v-deb232f5"]]),NW=et({__name:"StatusDot",props:{status:{}},setup(e){const t=e;function n(s){switch(s){case"ok":case"done":case"completed":case"success":return"ok";case"error":case"failed":case"danger":return"error";case"running":case"working":case"in_progress":case"active":return"running";case"suspended":return"suspended";default:return"idle"}}const o=F(()=>n(t.status));return(s,i)=>(k(),M("span",{class:Fe(["kw-dot",`kw-dot--${o.value}`]),"aria-hidden":"true"},null,2))}}),du=mt(NW,[["__scopeId","data-v-3b4eb64a"]]),OW=["aria-checked","aria-label","disabled"],FW=et({__name:"Switch",props:{modelValue:{type:Boolean},disabled:{type:Boolean},label:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=t;return(o,s)=>(k(),M("button",{class:Fe(["ui-switch",{"is-on":e.modelValue}]),type:"button",role:"switch","aria-checked":e.modelValue,"aria-label":e.label,disabled:e.disabled,onClick:s[0]||(s[0]=i=>n("update:modelValue",!e.modelValue))},[...s[1]||(s[1]=[C("span",{class:"ui-switch__thumb"},null,-1)])],10,OW))}}),Gu=mt(FW,[["__scopeId","data-v-351aa9a1"]]),RW={class:"ui-toast__icon","aria-hidden":"true"},PW={class:"ui-toast__body"},DW={class:"ui-toast__title"},BW={key:0,class:"ui-toast__msg"},HW=et({__name:"Toast",props:{variant:{default:"info"},title:{},message:{},dismissLabel:{}},emits:["dismiss"],setup(e){const{t}=df();return(n,o)=>(k(),M("div",{class:Fe(["ui-toast",`ui-toast--${e.variant}`])},[C("span",RW,[Cn(n.$slots,"icon",{},()=>[e.variant==="success"?(k(),me(Me,{key:0,name:"check"})):e.variant==="danger"?(k(),me(Me,{key:1,name:"close"})):e.variant==="warning"?(k(),me(Me,{key:2,name:"alert-triangle"})):(k(),me(Me,{key:3,name:"info"}))],!0)]),C("div",PW,[C("div",DW,N(e.title),1),e.message?(k(),M("div",BW,N(e.message),1)):te("",!0),Cn(n.$slots,"default",{},void 0,!0)]),q(mn,{class:"ui-toast__close",size:"sm",label:e.dismissLabel??p(t)("common.dismiss"),onClick:o[0]||(o[0]=s=>n.$emit("dismiss"))},{default:be(()=>[q(Me,{name:"close",size:"sm"})]),_:1},8,["label"])],2))}}),zW=mt(HW,[["__scopeId","data-v-c212359e"]]);function _r(){let e=!1,t=null;function n(){t!==null&&(clearTimeout(t),t=null)}function o(){n(),e=!0}function s(){n(),t=setTimeout(()=>{t=null,e=!1},0)}function i(){n(),e=!1}function r(l){return e||l.isComposing||l.keyCode===229}return typeof window<"u"&&(window.addEventListener("focusin",i,!0),window.addEventListener("focusout",i,!0)),kn(()=>{n(),typeof window<"u"&&(window.removeEventListener("focusin",i,!0),window.removeEventListener("focusout",i,!0))}),{handleCompositionStart:o,handleCompositionEnd:s,resetComposition:i,isComposingKeyEvent:r}}function gd(e,t){return`${e}/api/v1${t.startsWith("/")?t:`/${t}`}`}function WW(e,t){const n=new URL(`${e}/api/v1/ws`);return n.protocol=n.protocol==="https:"?"wss:":"ws:",n.searchParams.set("client_id",t),n.toString()}const Ky={};class vd extends Error{code;requestId;details;timestamp;durationMs;constructor(t){super(t.msg),this.name="DaemonApiError",this.code=t.code,this.requestId=t.requestId,this.details=t.details,this.timestamp=t.timestamp,this.durationMs=t.durationMs}}class Fl extends Error{cause;method;path;url;requestId;phase;timeoutMs;status;statusText;contentType;bodyPreview;timestamp;durationMs;constructor(t){super(t.message),this.name="DaemonNetworkError",this.cause=t.cause,this.method=t.method,this.path=t.path,this.url=t.url,this.requestId=t.requestId,this.phase=t.phase,this.timeoutMs=t.timeoutMs,this.status=t.status,this.statusText=t.statusText,this.contentType=t.contentType,this.bodyPreview=t.bodyPreview,this.timestamp=t.timestamp,this.durationMs=t.durationMs}}class Zy extends Error{size;limit;constructor(t){super(`file too large to preview: ${t.size} bytes (limit ${t.limit})`),this.name="FileTooLargeError",this.size=t.size,this.limit=t.limit}}function qs(e){return e instanceof vd||typeof e=="object"&&e!==null&&e.name==="DaemonApiError"&&typeof e.code=="number"}function Gy(e){return e instanceof Fl||typeof e=="object"&&e!==null&&e.name==="DaemonNetworkError"&&typeof e.method=="string"&&typeof e.path=="string"}function UW(e){return e instanceof Zy||typeof e=="object"&&e!==null&&e.name==="FileTooLargeError"&&typeof e.limit=="number"}const cd=3e4,z0=5*6e4,kM="0123456789ABCDEFGHJKMNPQRSTVWXYZ",Mk=500,bM=40101;function W0(e=cd){try{return AbortSignal.timeout(e)}catch{return}}function jW(e,t){let n="",o=e;for(let s=0;skM[n%32]).join("")}function U0(){return`${jW(Date.now(),10)}${VW(16)}`}function qW(e){try{const t=[];return e.forEach((n,o)=>{typeof n=="string"?t.push({field:o,value:n}):t.push({field:o,file:n.name,size:n.size,type:n.type})}),{formData:t}}catch{return"[FormData]"}}async function Yv(e){try{const t=await e.text();return t?t.length>Mk?`${t.slice(0,Mk)}...`:t:void 0}catch{return}}class KW{constructor(t){this.opts=t,this.tracer=t.tracer??Ky}tracer;async get(t,n){return this.request("GET",t,void 0,n)}async getBlob(t,n,o){let s=gd(this.opts.origin,t);if(n){const u=new URLSearchParams;for(const[f,h]of Object.entries(n))h!==void 0&&u.set(f,String(h));const d=u.toString();d&&(s=`${s}?${d}`)}const i=U0(),r={"X-Request-Id":i};this.addClientHeaders(r);const l=Date.now();this.tracer.restRequest?.({method:"GET",path:t,url:s,requestId:i});let a;try{a=await fetch(s,{method:"GET",headers:r,signal:W0()})}catch(u){throw this.tracer.restFailure?.({method:"GET",path:t,requestId:i,phase:"fetch",durationMs:Date.now()-l,error:u}),new Fl({message:`Network error calling GET ${t}`,cause:u,method:"GET",path:t,url:s,requestId:i,phase:"fetch",timeoutMs:cd,timestamp:Date.now(),durationMs:Date.now()-l})}if(a.ok){this.tracer.restResponse?.({method:"GET",path:t,requestId:i,status:a.status,durationMs:Date.now()-l,code:0,msg:""});const u=Number(a.headers.get("content-length")??0);if(o?.maxBytes!==void 0&&u>o.maxBytes)throw a.body?.cancel(),new Zy({size:u,limit:o.maxBytes});return a.blob()}let c;try{c=await a.clone().json()}catch{}throw this.checkAuthRequired(a,c?.code??0),this.tracer.restResponse?.({method:"GET",path:t,requestId:i,status:a.status,durationMs:Date.now()-l,code:c?.code??a.status,msg:c?.msg??a.statusText,envelopeRequestId:c?.request_id}),new vd({code:c?.code??a.status,msg:c?.msg??a.statusText,requestId:c?.request_id??i,details:c?.details,timestamp:Date.now(),durationMs:Date.now()-l})}async post(t,n,o){return this.request("POST",t,n,void 0,o?.allowCodes)}async postZip(t,n,o){const s="POST",i=gd(this.opts.origin,t),r=U0(),l={"X-Request-Id":r,"Content-Type":"application/json; charset=utf-8"};this.addClientHeaders(l);const a=Date.now();this.tracer.restRequest?.({method:s,path:t,url:i,requestId:r,body:o});let c;try{c=await fetch(i,{method:s,headers:l,body:JSON.stringify(n),signal:W0(z0)})}catch(h){throw this.tracer.restFailure?.({method:s,path:t,requestId:r,phase:"fetch",durationMs:Date.now()-a,error:h}),new Fl({message:`Network error calling ${s} ${t}`,cause:h,method:s,path:t,url:i,requestId:r,phase:"fetch",timeoutMs:z0,timestamp:Date.now(),durationMs:Date.now()-a})}const u=c.headers.get("content-type")??void 0,d=u?.split(";",1)[0]?.trim().toLowerCase();if(!c.ok||d!=="application/zip"){let h;try{h=await c.clone().json()}catch{}if(this.checkAuthRequired(c,h?.code??0),!c.ok||h!==void 0&&h.code!==0){const b=h?.code??c.status,_=h?.msg??c.statusText;throw this.tracer.restResponse?.({method:s,path:t,requestId:r,status:c.status,durationMs:Date.now()-a,code:b,msg:_,envelopeRequestId:h?.request_id}),new vd({code:b,msg:_,requestId:h?.request_id??r,details:h?.details,timestamp:Date.now(),durationMs:Date.now()-a})}const m=c.clone(),g=new TypeError(`Expected application/zip, received ${u??"no content type"}`);throw this.tracer.restFailure?.({method:s,path:t,requestId:r,phase:"parse",durationMs:Date.now()-a,status:c.status,error:g}),new Fl({message:`Invalid ZIP response from ${s} ${t}`,cause:g,method:s,path:t,url:i,requestId:r,phase:"parse",timeoutMs:z0,status:c.status,statusText:c.statusText,contentType:u,bodyPreview:await Yv(m),timestamp:Date.now(),durationMs:Date.now()-a})}let f;try{f=await c.blob()}catch(h){throw this.tracer.restFailure?.({method:s,path:t,requestId:r,phase:"parse",durationMs:Date.now()-a,status:c.status,error:h}),new Fl({message:`Failed to read ZIP response from ${s} ${t}`,cause:h,method:s,path:t,url:i,requestId:r,phase:"parse",timeoutMs:z0,status:c.status,statusText:c.statusText,contentType:u,timestamp:Date.now(),durationMs:Date.now()-a})}return this.tracer.restResponse?.({method:s,path:t,requestId:r,status:c.status,durationMs:Date.now()-a,code:0,msg:""}),{blob:f,contentDisposition:c.headers.get("content-disposition")??void 0}}async postForm(t,n){const o=gd(this.opts.origin,t),s=U0(),i={"X-Request-Id":s};this.addClientHeaders(i);const r=Date.now();this.tracer.restRequest?.({method:"POST",path:t,url:o,requestId:s,body:qW(n)});let l;try{l=await fetch(o,{method:"POST",headers:i,body:n,signal:W0()})}catch(u){throw this.tracer.restFailure?.({method:"POST",path:t,requestId:s,phase:"fetch",durationMs:Date.now()-r,error:u}),new Fl({message:`Network error calling POST ${t}`,cause:u,method:"POST",path:t,url:o,requestId:s,phase:"fetch",timeoutMs:cd,timestamp:Date.now(),durationMs:Date.now()-r})}let a;const c=l.clone();try{a=await l.json()}catch(u){throw this.tracer.restFailure?.({method:"POST",path:t,requestId:s,phase:"parse",durationMs:Date.now()-r,status:l.status,error:u}),new Fl({message:`Failed to parse JSON response from POST ${t}`,cause:u,method:"POST",path:t,url:o,requestId:s,phase:"parse",timeoutMs:cd,status:l.status,statusText:l.statusText,contentType:l.headers.get("content-type")??void 0,bodyPreview:await Yv(c),timestamp:Date.now(),durationMs:Date.now()-r})}if(this.tracer.restResponse?.({method:"POST",path:t,requestId:s,status:l.status,durationMs:Date.now()-r,code:a.code,msg:a.msg,envelopeRequestId:a.request_id,data:a.data}),this.checkAuthRequired(l,a.code),a.code!==0)throw new vd({code:a.code,msg:a.msg,requestId:a.request_id,details:a.details,timestamp:Date.now(),durationMs:Date.now()-r});return a.data}async patch(t,n){return this.request("PATCH",t,n)}async put(t,n){return this.request("PUT",t,n)}async delete(t){return this.request("DELETE",t)}async request(t,n,o,s,i=[]){let r=gd(this.opts.origin,n);if(s){const h=new URLSearchParams;for(const[g,b]of Object.entries(s))b!==void 0&&h.set(g,String(b));const m=h.toString();m&&(r=`${r}?${m}`)}const l=U0(),a={"X-Request-Id":l};this.addClientHeaders(a),o!==void 0&&(a["Content-Type"]="application/json; charset=utf-8");const c=Date.now();this.tracer.restRequest?.({method:t,path:n,url:r,requestId:l,body:o});let u;try{u=await fetch(r,{method:t,headers:a,body:o!==void 0?JSON.stringify(o):void 0,signal:W0()})}catch(h){throw this.tracer.restFailure?.({method:t,path:n,requestId:l,phase:"fetch",durationMs:Date.now()-c,error:h}),new Fl({message:`Network error calling ${t} ${n}`,cause:h,method:t,path:n,url:r,requestId:l,phase:"fetch",timeoutMs:cd,timestamp:Date.now(),durationMs:Date.now()-c})}let d;const f=u.clone();try{const h=await u.text();d=u.status===204&&h===""?{code:0,msg:"",data:null,request_id:l}:JSON.parse(h)}catch(h){throw this.tracer.restFailure?.({method:t,path:n,requestId:l,phase:"parse",durationMs:Date.now()-c,status:u.status,error:h}),new Fl({message:`Failed to parse JSON response from ${t} ${n}`,cause:h,method:t,path:n,url:r,requestId:l,phase:"parse",timeoutMs:cd,status:u.status,statusText:u.statusText,contentType:u.headers.get("content-type")??void 0,bodyPreview:await Yv(f),timestamp:Date.now(),durationMs:Date.now()-c})}if(this.tracer.restResponse?.({method:t,path:n,requestId:l,status:u.status,durationMs:Date.now()-c,code:d.code,msg:d.msg,envelopeRequestId:d.request_id,data:d.data}),this.checkAuthRequired(u,d.code),d.code!==0&&!i.includes(d.code))throw new vd({code:d.code,msg:typeof d.msg=="string"&&d.msg.length>0?d.msg:`HTTP ${u.status}${u.statusText?` ${u.statusText}`:""}`,requestId:d.request_id??l,details:d.details,timestamp:Date.now(),durationMs:Date.now()-c});return d.data}addClientHeaders(t){const n=this.opts.credentialStore?.getToken();n!==void 0&&(t.Authorization=`Bearer ${n}`);const o=this.opts.identity;o!==void 0&&(t["X-Kimi-Client-Id"]=o.clientId,t["X-Kimi-Client-Name"]=o.clientName,t["X-Kimi-Client-Version"]=o.clientVersion,t["X-Kimi-Client-Ui-Mode"]=o.clientUiMode)}checkAuthRequired(t,n){(t.status===401||n===bM)&&this.opts.credentialStore?.markAuthRequired?.()}}function CM(e){return{inputTokens:e.input_tokens,outputTokens:e.output_tokens,cacheReadTokens:e.cache_read_tokens,cacheCreationTokens:e.cache_creation_tokens,totalCostUsd:e.total_cost_usd,contextTokens:e.context_tokens,contextLimit:e.context_limit,turnCount:e.turn_count}}function J4(e){return e.contextTokens===0&&e.contextLimit===0&&e.inputTokens===0&&e.outputTokens===0&&e.turnCount===0}function Lr(e){return{id:e.id,title:e.title,createdAt:e.created_at,updatedAt:e.updated_at,busy:e.busy,mainTurnActive:e.main_turn_active,pendingInteraction:e.pending_interaction,lastTurnReason:e.last_turn_reason,archived:e.archived??!1,currentPromptId:e.current_prompt_id,lastPrompt:e.last_prompt,cwd:e.metadata.cwd,model:e.agent_config.model,usage:CM(e.usage),messageCount:e.message_count,lastSeq:e.last_seq,workspaceId:e.workspace_id,parentSessionId:typeof e.metadata.parent_session_id=="string"?e.metadata.parent_session_id:void 0}}function I1(e){return{id:e.id,root:e.root,name:e.name,lastOpenedAt:e.last_opened_at,sessionCount:e.session_count}}function Tk(e){return e.kind==="base64"?{kind:"base64",mediaType:e.media_type,data:e.data}:e.kind==="file"?{kind:"file",fileId:e.file_id}:{kind:"url",url:e.url}}function Yy(e){switch(e.type){case"text":return{type:"text",text:e.text};case"tool_use":return{type:"toolUse",toolCallId:e.tool_call_id,toolName:e.tool_name,input:e.input};case"tool_result":return{type:"toolResult",toolCallId:e.tool_call_id,output:e.output,isError:e.is_error};case"image":return{type:"image",source:Tk(e.source)};case"video":return{type:"video",source:Tk(e.source)};case"file":return{type:"file",fileId:e.file_id,name:e.name,mediaType:e.media_type,size:e.size};case"thinking":return{type:"thinking",thinking:e.thinking,signature:e.signature};default:return{type:"unknown",raw:e}}}function Q4(e){return{id:e.id,sessionId:e.session_id,role:e.role,content:e.content.map(Yy),createdAt:e.created_at,promptId:e.prompt_id,parentMessageId:e.parent_message_id,metadata:e.metadata}}function ZW(e){switch(e.type){case"text":return{type:"text",text:e.text};case"toolUse":return{type:"tool_use",tool_call_id:e.toolCallId,tool_name:e.toolName,input:e.input};case"toolResult":return{type:"tool_result",tool_call_id:e.toolCallId,output:e.output,is_error:e.isError};case"image":case"video":{const t=e.source;let n;return t.kind==="base64"?n={kind:"base64",media_type:t.mediaType,data:t.data}:t.kind==="file"?n={kind:"file",file_id:t.fileId}:n={kind:"url",url:t.url},{type:e.type,source:n}}case"file":return{type:"file",file_id:e.fileId,name:e.name,media_type:e.mediaType,size:e.size};case"thinking":return{type:"thinking",thinking:e.thinking,signature:e.signature};case"unknown":return e.raw}}function GW(e){return{content:e.content.map(ZW),metadata:e.metadata,agent_id:e.agentId,model:e.model,thinking:e.thinking,permission_mode:e.permissionMode,plan_mode:e.planMode,swarm_mode:e.swarmMode,goal_objective:e.goalObjective,goal_control:e.goalControl}}function YW(e){return{decision:e.decision,scope:e.scope,feedback:e.feedback,selected_label:e.selectedLabel}}function wM(e){return{approvalId:e.approval_id,sessionId:e.session_id,turnId:e.turn_id,toolCallId:e.tool_call_id,toolName:e.tool_name,action:e.action,display:e.tool_input_display??e.display,expiresAt:e.expires_at,createdAt:e.created_at}}function XW(e){return{id:e.id,label:e.label,description:e.description,recommended:e.recommended===!0||e.is_recommended===!0}}function JW(e){return{id:e.id,question:e.question,header:e.header,body:e.body,options:e.options.map(XW),multiSelect:e.multi_select,allowOther:e.allow_other,otherLabel:e.other_label,otherDescription:e.other_description}}function _M(e){return{questionId:e.question_id,sessionId:e.session_id,turnId:e.turn_id,toolCallId:e.tool_call_id,questions:e.questions.map(JW),createdAt:e.created_at}}function QW(e){switch(e.kind){case"single":return{kind:"single",option_id:e.optionId};case"multi":return{kind:"multi",option_ids:e.optionIds};case"other":return{kind:"other",text:e.text};case"multiWithOther":return{kind:"multi_with_other",option_ids:e.optionIds,other_text:e.otherText};case"skipped":return{kind:"skipped"}}}function eU(e){const t={};for(const[n,o]of Object.entries(e.answers))t[n]=QW(o);return{answers:t,method:e.method,note:e.note}}function Lh(e,t){return{id:e.id,agentId:e.agent_id??t,sessionId:e.session_id,kind:e.kind,description:e.description,status:e.status,command:e.command,createdAt:e.created_at,startedAt:e.started_at,completedAt:e.completed_at,outputPreview:e.output_preview,outputBytes:e.output_bytes,subagentPhase:e.subagent_phase,subagentType:e.subagent_type,parentToolCallId:e.parent_tool_call_id,suspendedReason:e.suspended_reason,swarmIndex:e.swarm_index,runInBackground:e.run_in_background??(e.kind==="subagent"?!0:void 0)}}function Ek(e){return{path:e.path,name:e.name,kind:e.kind,size:e.size,modifiedAt:e.modified_at,etag:e.etag,mime:e.mime,languageId:e.language_id,isBinary:e.is_binary,isSymlinkTo:e.is_symlink_to,gitStatus:e.git_status,childCount:e.child_count}}function ga(e,t){const n=e[t];return typeof n=="string"?n:void 0}function Yu(e,t){const n=e[t];return typeof n=="number"&&Number.isFinite(n)?n:void 0}function cr(e,t){const n=e[t];return typeof n=="number"&&Number.isFinite(n)?n:null}function xM(e){if(!e||typeof e!="object")return null;const t=e,n=ga(t,"status");if(n!=="active"&&n!=="paused"&&n!=="blocked"&&n!=="complete")return null;const o=t.budget,s=o&&typeof o=="object"?o:{};return{goalId:ga(t,"goalId")??ga(t,"goal_id")??"goal",objective:ga(t,"objective")??"",completionCriterion:ga(t,"completionCriterion")??ga(t,"completion_criterion"),status:n,turnsUsed:Yu(t,"turnsUsed")??Yu(t,"turns_used")??0,tokensUsed:Yu(t,"tokensUsed")??Yu(t,"tokens_used")??0,wallClockMs:Yu(t,"wallClockMs")??Yu(t,"wall_clock_ms")??0,terminalReason:ga(t,"terminalReason")??ga(t,"terminal_reason"),budget:{tokenBudget:cr(s,"tokenBudget")??cr(s,"token_budget"),remainingTokens:cr(s,"remainingTokens")??cr(s,"remaining_tokens"),turnBudget:cr(s,"turnBudget")??cr(s,"turn_budget"),remainingTurns:cr(s,"remainingTurns")??cr(s,"remaining_turns"),wallClockBudgetMs:cr(s,"wallClockBudgetMs")??cr(s,"wall_clock_budget_ms"),remainingWallClockMs:cr(s,"remainingWallClockMs")??cr(s,"remaining_wall_clock_ms"),overBudget:s.overBudget===!0||s.over_budget===!0}}}function tU(e){const t=e;switch(e.type){case"event.session.created":return{type:"sessionCreated",session:Lr(t.payload.session)};case"event.session.updated":return{type:"sessionUpdated",session:Lr(t.payload.session),changedFields:t.payload.changed_fields};case"event.session.deleted":return{type:"sessionDeleted",sessionId:t.session_id};case"event.workspace.created":return{type:"workspaceCreated",workspace:I1(t.payload.workspace)};case"event.workspace.updated":return{type:"workspaceUpdated",workspace:I1(t.payload.workspace)};case"event.workspace.deleted":return{type:"workspaceDeleted",workspaceId:t.payload.workspace_id,root:t.payload.root};case"event.session.work_changed":return{type:"sessionWorkChanged",sessionId:t.session_id,busy:t.payload.busy,mainTurnActive:t.payload.main_turn_active,pendingInteraction:t.payload.pending_interaction,lastTurnReason:t.payload.last_turn_reason};case"event.session.status_changed":return{type:"sessionWorkChanged",sessionId:t.session_id,busy:t.payload.status!=="idle"&&t.payload.status!=="aborted",mainTurnActive:t.payload.status!=="idle"&&t.payload.status!=="aborted",pendingInteraction:t.payload.status==="awaiting_approval"?"approval":t.payload.status==="awaiting_question"?"question":"none",lastTurnReason:t.payload.status==="aborted"?"cancelled":void 0};case"event.session.usage_updated":return{type:"sessionUsageUpdated",sessionId:t.session_id,usage:CM(t.payload.usage)};case"event.session.history_compacted":return{type:"historyCompacted",sessionId:t.session_id,beforeSeq:t.payload.before_seq,reason:t.payload.reason,summaryMessageId:t.payload.summary_message_id};case"event.goal.updated":{const n=xM(t.payload.snapshot??null);return{type:"goalUpdated",sessionId:t.session_id,goal:n?.status==="complete"?null:n}}case"event.message.created":return{type:"messageCreated",message:Q4(t.payload.message)};case"event.message.updated":return{type:"messageUpdated",sessionId:t.session_id,messageId:t.payload.message_id,content:t.payload.content.map(Yy),status:t.payload.status};case"event.assistant.delta":return{type:"assistantDelta",sessionId:t.session_id,messageId:t.payload.message_id,contentIndex:t.payload.content_index,delta:t.payload.delta};case"event.assistant.tool_use_started":case"event.assistant.tool_use_delta":case"event.assistant.tool_use_completed":case"event.assistant.completed":case"event.tool.started":return{type:"unknown",raw:{_noop:!0,_wireType:t.type}};case"event.tool.output":return{type:"toolOutput",sessionId:t.session_id,toolCallId:t.payload.tool_call_id,outputChunk:t.payload.chunk,stream:t.payload.stream};case"event.tool.progress":return typeof t.payload.message=="string"&&t.payload.message.length>0?{type:"toolOutput",sessionId:t.session_id,toolCallId:t.payload.tool_call_id,outputChunk:t.payload.message,stream:"stdout"}:{type:"unknown",raw:{_noop:!0,_wireType:t.type}};case"event.tool.completed":return{type:"unknown",raw:{_noop:!0,_wireType:t.type}};case"event.approval.requested":return{type:"approvalRequested",sessionId:t.session_id,approval:wM(t.payload)};case"event.approval.resolved":return{type:"approvalResolved",sessionId:t.session_id,approvalId:t.payload.approval_id,decision:t.payload.decision,resolvedAt:t.payload.resolved_at};case"event.approval.expired":return{type:"approvalExpired",sessionId:t.session_id,approvalId:t.payload.approval_id};case"event.question.requested":return{type:"questionRequested",sessionId:t.session_id,question:_M(t.payload)};case"event.question.answered":return{type:"questionAnswered",sessionId:t.session_id,questionId:t.payload.question_id,resolvedAt:t.payload.resolved_at};case"event.question.dismissed":return{type:"questionDismissed",sessionId:t.session_id,questionId:t.payload.question_id,dismissedAt:t.payload.dismissed_at};case"event.task.created":return{type:"taskCreated",sessionId:t.session_id,task:Lh(t.payload.task)};case"event.task.progress":return{type:"taskProgress",sessionId:t.session_id,taskId:t.payload.task_id,outputChunk:t.payload.output_chunk,stream:t.payload.stream};case"event.task.completed":return{type:"taskCompleted",sessionId:t.session_id,taskId:t.payload.task_id,status:t.payload.status,outputPreview:t.payload.output_preview,outputBytes:t.payload.output_bytes};case"event.config.changed":return{type:"configChanged",changedFields:t.payload.changed_fields,config:e3(t.payload.config)};case"event.model_catalog.changed":return{type:"modelCatalogChanged",changed:t.payload.changed.map(n=>({providerId:n.provider_id,providerName:n.provider_name,added:n.added,removed:n.removed})),unchanged:t.payload.unchanged,failed:t.payload.failed};default:return{type:"unknown",raw:e}}}function nU(e){return{id:e.model,provider:e.provider,model:e.model,displayName:e.display_name,maxContextSize:e.max_context_size,capabilities:e.capabilities,supportEfforts:e.support_efforts,defaultEffort:e.default_effort}}function Xu(e){return{id:e.id,type:e.type,baseUrl:e.base_url,defaultModel:e.default_model,hasApiKey:e.has_api_key,status:e.status,models:e.models}}function Ik(e){return{id:e.id,name:e.name,wireType:e.wire_type,guessed:e.guessed,needsBaseUrl:e.needs_base_url,rejected:e.rejected,rejectReason:e.reject_reason,envKey:e.env_key,models:e.models.map(t=>({id:t.id,name:t.name,maxContextSize:t.max_context_size,capabilities:t.capabilities,reasoning:t.reasoning}))}}function e3(e){const t={};for(const[n,o]of Object.entries(e.providers))t[n]={type:o.type,baseUrl:o.base_url,defaultModel:o.default_model,hasApiKey:o.has_api_key};return{providers:t,defaultProvider:e.default_provider,defaultModel:e.default_model,secondaryModel:e.secondary_model,models:e.models,thinking:e.thinking,planMode:e.plan_mode,yolo:e.yolo,defaultPermissionMode:e.default_permission_mode,defaultPlanMode:e.default_plan_mode,permission:e.permission,hooks:e.hooks,services:e.services,mergeAllAvailableSkills:e.merge_all_available_skills,extraSkillDirs:e.extra_skill_dirs,loopControl:e.loop_control,background:e.background,experimental:e.experimental,telemetry:e.telemetry,raw:e.raw}}function oU(e){return e.session_id}function sU(e){return e.seq}function iU(e){const t=Number(e.slice(1));return Number.isFinite(t)?t:0}const rU={items:[],tasks:new Map,interactions:new Map,attachments:new Map,todos:new Map,prompts:new Map,meta:{},pendingInteractions:new Set,hasMoreOlder:!1};function lU(e,t){switch(t.op){case"reset":return aU(e,t);case"turn.upsert":return uU(e,t.turn);case"step.upsert":return fU(e,t.turnId,t.step);case"frame.upsert":return hU(e,t);case"append":return gU(e,t);case"marker.upsert":return $k(e,t.item,t.item.markerId,t.beforeTurn);case"taskref.upsert":return $k(e,t.item,t.item.refId,t.beforeTurn);case"task.upsert":return kU(e,t.task);case"interaction.upsert":return bU(e,t.interaction);case"attachment.upsert":return wU(e,t.attachment);case"todo.upsert":return xU(e,t.todo);case"prompt.upsert":return AU(e,t.prompt);case"meta.merge":return EU(e,t.meta);case"items.remove":return yU(e,t.ids)}}function aU(e,t){const n=new Set;for(const o of t.snapshot.interactions)o.state==="pending"&&n.add(o.interactionId);return{state:{items:t.snapshot.items,tasks:new Map(t.snapshot.tasks.map(o=>[o.taskId,o])),interactions:new Map(t.snapshot.interactions.map(o=>[o.interactionId,o])),attachments:new Map(t.snapshot.attachments.map(o=>[o.attachmentId,o])),todos:new Map(t.snapshot.todos.map(o=>[o.todoId,o])),prompts:new Map(t.snapshot.prompts.map(o=>[o.promptId,o])),meta:t.snapshot.meta,pendingInteractions:n,hasMoreOlder:t.snapshot.hasMoreOlder??!1},changed:!0}}function Lk(e,t){return{...e,kind:"turn",steps:[...t]}}function SM(e){return{kind:"turn",turnId:e,ordinal:iU(e),state:"running",origin:{kind:"other"},steps:[]}}function cU(e,t){const n=Number(e.slice(t.length+1))||0;return{kind:"step",stepId:e,turnId:t,ordinal:n,state:"running",frames:[]}}function Xd(e,t){const n=e.items.find(o=>o.kind==="turn"&&o.turnId===t);return n?.kind==="turn"?n:void 0}function Xy(e,t){const n=[...e];let o=n.length;for(let s=0;st.ordinal){o=s;break}}return n.splice(o,0,t),n}function Xg(e,t,n){return e.map(o=>o.kind==="turn"&&o.turnId===t?n(o):o)}function uU(e,t){const n=Xd(e,t.turnId);return n?dU(n,t)?{state:e,changed:!1}:{state:{...e,items:Xg(e.items,t.turnId,o=>Lk(t,o.steps))},changed:!0}:{state:{...e,items:Xy(e.items,Lk(t,[]))},changed:!0}}function dU(e,t){return e.ordinal===t.ordinal&&e.state===t.state&&e.prompt===t.prompt&&e.attachmentIds===t.attachmentIds&&e.startedAt===t.startedAt&&e.endedAt===t.endedAt&&e.origin.kind===t.origin.kind&&e.origin.payload===t.origin.payload&&e.usage===t.usage&&e.durationMs===t.durationMs&&e.error===t.error}function fU(e,t,n){const o=Xd(e,t)??SM(t),s=o.steps.findIndex(c=>c.stepId===n.stepId);let i,r=!0;if(s>=0){const c=o.steps[s];c&&pU(c,n)?(r=!1,i=o.steps):i=o.steps.map(u=>u.stepId===n.stepId?{...n,kind:"step",frames:u.frames}:u)}else i=[...o.steps,{...n,kind:"step",frames:[]}].toSorted((c,u)=>c.ordinal-u.ordinal);if(!r)return{state:e,changed:!1};const l={...o,steps:[...i]},a=Xd(e,t)?Xg(e.items,t,()=>l):Xy(e.items,l);return{state:{...e,items:a},changed:!0}}function pU(e,t){return e.ordinal===t.ordinal&&e.state===t.state&&e.startedAt===t.startedAt&&e.endedAt===t.endedAt&&e.usage===t.usage&&e.finishReason===t.finishReason&&e.timing===t.timing&&e.retry===t.retry&&e.endReason===t.endReason&&e.endMessage===t.endMessage}function hU(e,t){const n=Xd(e,t.turnId)??SM(t.turnId),o=n.steps.find(u=>u.stepId===t.stepId)??cU(t.stepId,t.turnId),s=o.frames.findIndex(u=>u.frameId===t.frame.frameId);let i;if(s>=0){const u=o.frames[s];if(u!==void 0&&mU(u,t.frame))return{state:e,changed:!1};i=o.frames.map(d=>d.frameId===t.frame.frameId?t.frame:d)}else i=[...o.frames,t.frame];const r={...o,frames:[...i]},l=n.steps.some(u=>u.stepId===t.stepId)?n.steps.map(u=>u.stepId===t.stepId?r:u):[...n.steps,r].toSorted((u,d)=>u.ordinal-d.ordinal),a={...n,steps:l},c=Xd(e,t.turnId)?Xg(e.items,t.turnId,()=>a):Xy(e.items,a);return{state:{...e,items:c},changed:!0}}function mU(e,t){return e.kind!==t.kind?!1:e.kind==="text"&&t.kind==="text"?e.text===t.text&&e.role===t.role&&e.attachmentIds===t.attachmentIds&&e.taskId===t.taskId:e.kind==="thinking"&&t.kind==="thinking"?e.text===t.text:e.kind==="tool"&&t.kind==="tool"?e.state===t.state&&e.toolCallId===t.toolCallId&&e.name===t.name&&e.view===t.view&&e.input===t.input&&e.output===t.output&&e.display===t.display&&e.error===t.error&&e.inputText===t.inputText&&e.progress===t.progress&&e.taskId===t.taskId&&e.approvalId===t.approvalId&&e.todoId===t.todoId&&e.agentRefs===t.agentRefs:e.kind==="notice"&&t.kind==="notice"?e.message===t.message&&e.level===t.level&&e.detail===t.detail:!1}function gU(e,t){if(t.target.type==="task")return vU(e,t);const{turnId:n,stepId:o,frameId:s}=t.target,i=Xd(e,n),r=i?.steps.find(f=>f.stepId===o),l=r?.frames.find(f=>f.frameId===s);if(!i||!r||!l||l.kind!=="text"&&l.kind!=="thinking")return{state:e,changed:!1,gap:{expected:0,got:t.offset}};const a=AM(l.text,t.offset,t.text);if(a.gap)return{state:e,changed:!1,gap:a.gap};if(!a.changed)return{state:e,changed:!1};const c={...l,text:a.text},u={...r,frames:r.frames.map(f=>f.frameId===s?c:f)},d={...i,steps:i.steps.map(f=>f.stepId===o?u:f)};return{state:{...e,items:Xg(e.items,n,()=>d)},changed:!0}}function vU(e,t){if(t.target.type!=="task")throw new Error("unreachable");const n=t.target.taskId,o=e.tasks.get(n),s=o?.outputTail??"",i=AM(s,t.offset,t.text);if(i.gap)return{state:e,changed:!1,gap:i.gap};if(!i.changed)return{state:e,changed:!1};const r=o?{...o,outputTail:i.text}:{taskId:n,kind:"other",state:"running",detached:!1,outputTail:i.text},l=new Map(e.tasks);return l.set(n,r),{state:{...e,tasks:l},changed:!0}}function AM(e,t,n){if(t>e.length)return{text:e,changed:!1,gap:{expected:e.length,got:t}};if(e.slice(t,t+n.length)===n)return{text:e,changed:!1};const o=e.length-t;return e.slice(t)!==n.slice(0,o)?{text:e,changed:!1,gap:{expected:e.length,got:t}}:(o>0?n.slice(o):n).length===0?{text:e,changed:!1}:{text:e.slice(0,t)+n,changed:!0}}function $k(e,t,n,o){if(e.items.some(i=>t3(i)===n)){let i=!1;const r=e.items.map(l=>t3(l)!==n||l===t?l:(i=!0,t));return i?{state:{...e,items:r},changed:!0}:{state:e,changed:!1}}if(o!==void 0){const i=[...e.items];let r=i.length;for(let l=0;l=o){r=l;break}}return i.splice(r,0,t),{state:{...e,items:i},changed:!0}}return{state:{...e,items:[...e.items,t]},changed:!0}}function t3(e){switch(e.kind){case"turn":return e.turnId;case"marker":return e.markerId;case"taskref":return e.refId}}function yU(e,t){const n=new Set(t),o=e.items.filter(l=>l.kind==="turn"&&n.has(l.turnId)),s=e.items.filter(l=>!n.has(t3(l)));if(s.length===e.items.length)return{state:e,changed:!1};let i=e.pendingInteractions,r=e.interactions;if(o.length>0){const l=new Set,a=new Set(i),c=new Set;for(const u of o)for(const d of u.steps)for(const f of d.frames)f.kind==="tool"&&l.add(f.toolCallId);for(const u of r.values())u.toolCallId!==void 0&&l.has(u.toolCallId)&&(c.add(u.interactionId),a.delete(u.interactionId));if(c.size>0){const u=new Map(r);for(const d of c)u.delete(d);r=u}i=a}return{state:{...e,items:s,interactions:r,pendingInteractions:i},changed:!0}}function kU(e,t){const n=e.tasks.get(t.taskId);if(n&&TU(n,t))return{state:e,changed:!1};const o=new Map(e.tasks);return o.set(t.taskId,t),{state:{...e,tasks:o},changed:!0}}function bU(e,t){const n=e.interactions.get(t.interactionId);if(n&&CU(n,t))return{state:e,changed:!1};const o=new Map(e.interactions);o.set(t.interactionId,t);let s=e.pendingInteractions;if(t.state==="pending"){if(!s.has(t.interactionId)){const i=new Set(s);i.add(t.interactionId),s=i}}else if(s.has(t.interactionId)){const i=new Set(s);i.delete(t.interactionId),s=i}return{state:{...e,interactions:o,pendingInteractions:s},changed:!0}}function CU(e,t){return e.interactionKind===t.interactionKind&&e.toolCallId===t.toolCallId&&e.state===t.state&&e.request===t.request&&e.response===t.response}function wU(e,t){const n=e.attachments.get(t.attachmentId);if(n&&_U(n,t))return{state:e,changed:!1};const o=new Map(e.attachments);return o.set(t.attachmentId,t),{state:{...e,attachments:o},changed:!0}}function _U(e,t){return e.mediaType===t.mediaType&&e.name===t.name&&e.size===t.size&&e.source===t.source&&e.placeholder===t.placeholder}function xU(e,t){const n=e.todos.get(t.todoId);if(n&&SU(n,t))return{state:e,changed:!1};const o=new Map(e.todos);return o.set(t.todoId,t),{state:{...e,todos:o},changed:!0}}function SU(e,t){return e.items===t.items&&e.updatedAt===t.updatedAt}function AU(e,t){const n=e.prompts.get(t.promptId);if(n&&MU(n,t))return{state:e,changed:!1};const o=new Map(e.prompts);return o.set(t.promptId,t),{state:{...e,prompts:o},changed:!0}}function MU(e,t){return e.status===t.status&&e.userMessageId===t.userMessageId&&e.content===t.content&&e.createdAt===t.createdAt&&e.finishedAt===t.finishedAt&&e.steeredAt===t.steeredAt}function TU(e,t){return e.kind===t.kind&&e.state===t.state&&e.detached===t.detached&&e.description===t.description&&e.agentId===t.agentId&&e.outputTail===t.outputTail&&e.startedAt===t.startedAt&&e.endedAt===t.endedAt&&e.resultSummary===t.resultSummary&&e.error===t.error&&e.stateReason===t.stateReason&&e.usage===t.usage}function EU(e,t){const n=t.modes!==void 0?{plan:t.modes.plan===null?void 0:t.modes.plan??e.meta.modes?.plan,swarm:t.modes.swarm===null?void 0:t.modes.swarm??e.meta.modes?.swarm}:e.meta.modes,o=t.agent!==void 0?{...e.meta.agent,...t.agent}:e.meta.agent,s={goal:t.goal??e.meta.goal,activity:t.activity??e.meta.activity,modes:n!==void 0&&n.plan===void 0&&n.swarm===void 0?void 0:n,agent:o};return s.goal===e.meta.goal&&s.activity===e.meta.activity&&s.modes===e.meta.modes&&s.agent===e.meta.agent?{state:e,changed:!1}:{state:{...e,meta:s},changed:!0}}class IU{constructor(t){this.agentId=t}#e=rU;#t=new Set;receive(t){return this.apply(t)}apply(t){const n=[];let o,s=this.#e;for(const i of t){const r=lU(s,i);if(r.gap){o={target:i.target,...r.gap};continue}r.changed&&(s=r.state,n.push(i))}if(this.#e=s,n.length>0){const i={agentId:this.agentId,ops:n};for(const r of this.#t)r(i)}return{accepted:n,gap:o}}onChange(t){return this.#t.add(t),{dispose:()=>void this.#t.delete(t)}}getItems(){return this.#e.items}getTurn(t){const n=this.#e.items.find(o=>o.kind==="turn"&&o.turnId===t);return n?.kind==="turn"?n:void 0}getTasks(){return this.#e.tasks}getTask(t){return this.#e.tasks.get(t)}getInteractions(){return this.#e.interactions}getInteraction(t){return this.#e.interactions.get(t)}getAttachments(){return this.#e.attachments}getAttachment(t){return this.#e.attachments.get(t)}getTodos(){return this.#e.todos}getTodo(t){return this.#e.todos.get(t)}getPrompts(){return this.#e.prompts}getPrompt(t){return this.#e.prompts.get(t)}getMeta(){return this.#e.meta}listPendingInteractions(){return[...this.#e.pendingInteractions]}get hasMoreOlder(){return this.#e.hasMoreOlder}snapshot(t){let n=this.#e.items,o=this.#e.hasMoreOlder;if(t!==void 0){const s=n.reduce((i,r)=>r.kind==="turn"?i+1:i,0);if(s>t.tailTurns){const i=s-t.tailTurns,r=[];let l=0;for(const a of n)if(a.kind==="turn"){if(l+=1,l<=i)continue;r.push(a)}else l>i&&r.push(a);n=r,o=!0}}return{items:n,tasks:[...this.#e.tasks.values()],interactions:[...this.#e.interactions.values()],attachments:[...this.#e.attachments.values()],todos:[...this.#e.todos.values()],prompts:[...this.#e.prompts.values()],meta:this.#e.meta,hasMoreOlder:o}}}function pt(e,t,n){function o(l,a){if(l._zod||Object.defineProperty(l,"_zod",{value:{def:a,constr:r,traits:new Set},enumerable:!1}),l._zod.traits.has(e))return;l._zod.traits.add(e),t(l,a);const c=r.prototype,u=Object.keys(c);for(let d=0;dn?.Parent&&l instanceof n.Parent?!0:l?._zod?.traits?.has(e)}),Object.defineProperty(r,"name",{value:e}),r}class Od extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class MM extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const TM={};function Ka(e){return TM}function EM(e){const t=Object.values(e).filter(o=>typeof o=="number");return Object.entries(e).filter(([o,s])=>t.indexOf(+o)===-1).map(([o,s])=>s)}function n3(e,t){return typeof t=="bigint"?t.toString():t}function Jg(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Jy(e){return e==null}function Qy(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function LU(e,t){const n=(e.toString().split(".")[1]||"").length,o=t.toString();let s=(o.split(".")[1]||"").length;if(s===0&&/\d?e-\d?/.test(o)){const a=o.match(/\d?e-(\d?)/);a?.[1]&&(s=Number.parseInt(a[1]))}const i=n>s?n:s,r=Number.parseInt(e.toFixed(i).replace(".","")),l=Number.parseInt(t.toFixed(i).replace(".",""));return r%l/10**i}const Nk=Symbol("evaluating");function Zn(e,t,n){let o;Object.defineProperty(e,t,{get(){if(o!==Nk)return o===void 0&&(o=Nk,o=n()),o},set(s){Object.defineProperty(e,t,{value:s})},configurable:!0})}function xu(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function sc(...e){const t={};for(const n of e){const o=Object.getOwnPropertyDescriptors(n);Object.assign(t,o)}return Object.defineProperties({},t)}function Ok(e){return JSON.stringify(e)}function $U(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const IM="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function up(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const NU=Jg(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Jd(e){if(up(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(up(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function LM(e){return Jd(e)?{...e}:Array.isArray(e)?[...e]:e}const OU=new Set(["string","number","symbol"]);function Qd(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ic(e,t,n){const o=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(o._zod.parent=e),o}function Yt(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function FU(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const RU={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function PU(e,t){const n=e._zod.def,o=n.checks;if(o&&o.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const i=sc(e._zod.def,{get shape(){const r={};for(const l in t){if(!(l in n.shape))throw new Error(`Unrecognized key: "${l}"`);t[l]&&(r[l]=n.shape[l])}return xu(this,"shape",r),r},checks:[]});return ic(e,i)}function DU(e,t){const n=e._zod.def,o=n.checks;if(o&&o.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const i=sc(e._zod.def,{get shape(){const r={...e._zod.def.shape};for(const l in t){if(!(l in n.shape))throw new Error(`Unrecognized key: "${l}"`);t[l]&&delete r[l]}return xu(this,"shape",r),r},checks:[]});return ic(e,i)}function BU(e,t){if(!Jd(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const i=e._zod.def.shape;for(const r in t)if(Object.getOwnPropertyDescriptor(i,r)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const s=sc(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return xu(this,"shape",i),i}});return ic(e,s)}function HU(e,t){if(!Jd(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=sc(e._zod.def,{get shape(){const o={...e._zod.def.shape,...t};return xu(this,"shape",o),o}});return ic(e,n)}function zU(e,t){const n=sc(e._zod.def,{get shape(){const o={...e._zod.def.shape,...t._zod.def.shape};return xu(this,"shape",o),o},get catchall(){return t._zod.def.catchall},checks:[]});return ic(e,n)}function WU(e,t,n){const s=t._zod.def.checks;if(s&&s.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const r=sc(t._zod.def,{get shape(){const l=t._zod.def.shape,a={...l};if(n)for(const c in n){if(!(c in l))throw new Error(`Unrecognized key: "${c}"`);n[c]&&(a[c]=e?new e({type:"optional",innerType:l[c]}):l[c])}else for(const c in l)a[c]=e?new e({type:"optional",innerType:l[c]}):l[c];return xu(this,"shape",a),a},checks:[]});return ic(t,r)}function UU(e,t,n){const o=sc(t._zod.def,{get shape(){const s=t._zod.def.shape,i={...s};if(n)for(const r in n){if(!(r in i))throw new Error(`Unrecognized key: "${r}"`);n[r]&&(i[r]=new e({type:"nonoptional",innerType:s[r]}))}else for(const r in s)i[r]=new e({type:"nonoptional",innerType:s[r]});return xu(this,"shape",i),i}});return ic(t,o)}function yd(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n{var o;return(o=n).path??(o.path=[]),n.path.unshift(e),n})}function j0(e){return typeof e=="string"?e:e?.message}function Za(e,t,n){const o={...e,path:e.path??[]};if(!e.message){const s=j0(e.inst?._zod.def?.error?.(e))??j0(t?.error?.(e))??j0(n.customError?.(e))??j0(n.localeError?.(e))??"Invalid input";o.message=s}return delete o.inst,delete o.continue,t?.reportInput||delete o.input,o}function e8(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function dp(...e){const[t,n,o]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:o}:{...t}}const $M=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,n3,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},NM=pt("$ZodError",$M),OM=pt("$ZodError",$M,{Parent:Error});function jU(e,t=n=>n.message){const n={},o=[];for(const s of e.issues)s.path.length>0?(n[s.path[0]]=n[s.path[0]]||[],n[s.path[0]].push(t(s))):o.push(t(s));return{formErrors:o,fieldErrors:n}}function VU(e,t=n=>n.message){const n={_errors:[]},o=s=>{for(const i of s.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(r=>o({issues:r}));else if(i.code==="invalid_key")o({issues:i.issues});else if(i.code==="invalid_element")o({issues:i.issues});else if(i.path.length===0)n._errors.push(t(i));else{let r=n,l=0;for(;l(t,n,o,s)=>{const i=o?Object.assign(o,{async:!1}):{async:!1},r=t._zod.run({value:n,issues:[]},i);if(r instanceof Promise)throw new Od;if(r.issues.length){const l=new(s?.Err??e)(r.issues.map(a=>Za(a,i,Ka())));throw IM(l,s?.callee),l}return r.value},n8=e=>async(t,n,o,s)=>{const i=o?Object.assign(o,{async:!0}):{async:!0};let r=t._zod.run({value:n,issues:[]},i);if(r instanceof Promise&&(r=await r),r.issues.length){const l=new(s?.Err??e)(r.issues.map(a=>Za(a,i,Ka())));throw IM(l,s?.callee),l}return r.value},Qg=e=>(t,n,o)=>{const s=o?{...o,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},s);if(i instanceof Promise)throw new Od;return i.issues.length?{success:!1,error:new(e??NM)(i.issues.map(r=>Za(r,s,Ka())))}:{success:!0,data:i.value}},qU=Qg(OM),e2=e=>async(t,n,o)=>{const s=o?Object.assign(o,{async:!0}):{async:!0};let i=t._zod.run({value:n,issues:[]},s);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(r=>Za(r,s,Ka())))}:{success:!0,data:i.value}},KU=e2(OM),ZU=e=>(t,n,o)=>{const s=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return t8(e)(t,n,s)},GU=e=>(t,n,o)=>t8(e)(t,n,o),YU=e=>async(t,n,o)=>{const s=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return n8(e)(t,n,s)},XU=e=>async(t,n,o)=>n8(e)(t,n,o),JU=e=>(t,n,o)=>{const s=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return Qg(e)(t,n,s)},QU=e=>(t,n,o)=>Qg(e)(t,n,o),ej=e=>async(t,n,o)=>{const s=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return e2(e)(t,n,s)},tj=e=>async(t,n,o)=>e2(e)(t,n,o),nj=/^[cC][^\s-]{8,}$/,oj=/^[0-9a-z]+$/,sj=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,ij=/^[0-9a-vA-V]{20}$/,rj=/^[A-Za-z0-9]{27}$/,lj=/^[a-zA-Z0-9_-]{21}$/,aj=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,cj=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Fk=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,uj=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,dj="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function fj(){return new RegExp(dj,"u")}const pj=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,hj=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,mj=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,gj=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,vj=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,FM=/^[A-Za-z0-9_-]*$/,yj=/^\+[1-9]\d{6,14}$/,RM="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",kj=new RegExp(`^${RM}$`);function PM(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function bj(e){return new RegExp(`^${PM(e)}$`)}function Cj(e){const t=PM({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const o=`${t}(?:${n.join("|")})`;return new RegExp(`^${RM}T(?:${o})$`)}const wj=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},_j=/^-?\d+$/,DM=/^-?\d+(?:\.\d+)?$/,xj=/^(?:true|false)$/i,Sj=/^[^A-Z]*$/,Aj=/^[^a-z]*$/,Oi=pt("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),BM={number:"number",bigint:"bigint",object:"date"},HM=pt("$ZodCheckLessThan",(e,t)=>{Oi.init(e,t);const n=BM[typeof t.value];e._zod.onattach.push(o=>{const s=o._zod.bag,i=(t.inclusive?s.maximum:s.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value{(t.inclusive?o.value<=t.value:o.value{Oi.init(e,t);const n=BM[typeof t.value];e._zod.onattach.push(o=>{const s=o._zod.bag,i=(t.inclusive?s.minimum:s.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?s.minimum=t.value:s.exclusiveMinimum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value>=t.value:o.value>t.value)||o.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Mj=pt("$ZodCheckMultipleOf",(e,t)=>{Oi.init(e,t),e._zod.onattach.push(n=>{var o;(o=n._zod.bag).multipleOf??(o.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):LU(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),Tj=pt("$ZodCheckNumberFormat",(e,t)=>{Oi.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),o=n?"int":"number",[s,i]=RU[t.format];e._zod.onattach.push(r=>{const l=r._zod.bag;l.format=t.format,l.minimum=s,l.maximum=i,n&&(l.pattern=_j)}),e._zod.check=r=>{const l=r.value;if(n){if(!Number.isInteger(l)){r.issues.push({expected:o,format:t.format,code:"invalid_type",continue:!1,input:l,inst:e});return}if(!Number.isSafeInteger(l)){l>0?r.issues.push({input:l,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort}):r.issues.push({input:l,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort});return}}li&&r.issues.push({origin:"number",input:l,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),Ej=pt("$ZodCheckMaxLength",(e,t)=>{var n;Oi.init(e,t),(n=e._zod.def).when??(n.when=o=>{const s=o.value;return!Jy(s)&&s.length!==void 0}),e._zod.onattach.push(o=>{const s=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum{const s=o.value;if(s.length<=t.maximum)return;const r=e8(s);o.issues.push({origin:r,code:"too_big",maximum:t.maximum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),Ij=pt("$ZodCheckMinLength",(e,t)=>{var n;Oi.init(e,t),(n=e._zod.def).when??(n.when=o=>{const s=o.value;return!Jy(s)&&s.length!==void 0}),e._zod.onattach.push(o=>{const s=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>s&&(o._zod.bag.minimum=t.minimum)}),e._zod.check=o=>{const s=o.value;if(s.length>=t.minimum)return;const r=e8(s);o.issues.push({origin:r,code:"too_small",minimum:t.minimum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),Lj=pt("$ZodCheckLengthEquals",(e,t)=>{var n;Oi.init(e,t),(n=e._zod.def).when??(n.when=o=>{const s=o.value;return!Jy(s)&&s.length!==void 0}),e._zod.onattach.push(o=>{const s=o._zod.bag;s.minimum=t.length,s.maximum=t.length,s.length=t.length}),e._zod.check=o=>{const s=o.value,i=s.length;if(i===t.length)return;const r=e8(s),l=i>t.length;o.issues.push({origin:r,...l?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),t2=pt("$ZodCheckStringFormat",(e,t)=>{var n,o;Oi.init(e,t),e._zod.onattach.push(s=>{const i=s._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=s=>{t.pattern.lastIndex=0,!t.pattern.test(s.value)&&s.issues.push({origin:"string",code:"invalid_format",format:t.format,input:s.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(o=e._zod).check??(o.check=()=>{})}),$j=pt("$ZodCheckRegex",(e,t)=>{t2.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Nj=pt("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Sj),t2.init(e,t)}),Oj=pt("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Aj),t2.init(e,t)}),Fj=pt("$ZodCheckIncludes",(e,t)=>{Oi.init(e,t);const n=Qd(t.includes),o=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=o,e._zod.onattach.push(s=>{const i=s._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(o)}),e._zod.check=s=>{s.value.includes(t.includes,t.position)||s.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:s.value,inst:e,continue:!t.abort})}}),Rj=pt("$ZodCheckStartsWith",(e,t)=>{Oi.init(e,t);const n=new RegExp(`^${Qd(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(o=>{const s=o._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(n)}),e._zod.check=o=>{o.value.startsWith(t.prefix)||o.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:o.value,inst:e,continue:!t.abort})}}),Pj=pt("$ZodCheckEndsWith",(e,t)=>{Oi.init(e,t);const n=new RegExp(`.*${Qd(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(o=>{const s=o._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(n)}),e._zod.check=o=>{o.value.endsWith(t.suffix)||o.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:o.value,inst:e,continue:!t.abort})}}),Dj=pt("$ZodCheckOverwrite",(e,t)=>{Oi.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class Bj{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const o=t.split(` -`).filter(r=>r),s=Math.min(...o.map(r=>r.length-r.trimStart().length)),i=o.map(r=>r.slice(s)).map(r=>" ".repeat(this.indent*2)+r);for(const r of i)this.content.push(r)}compile(){const t=Function,n=this?.args,s=[...(this?.content??[""]).map(i=>` ${i}`)];return new t(...n,s.join(` -`))}}const Hj={major:4,minor:3,patch:6},Mo=pt("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Hj;const o=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&o.unshift(e);for(const s of o)for(const i of s._zod.onattach)i(e);if(o.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const s=(r,l,a)=>{let c=yd(r),u;for(const d of l){if(d._zod.def.when){if(!d._zod.def.when(r))continue}else if(c)continue;const f=r.issues.length,h=d._zod.check(r);if(h instanceof Promise&&a?.async===!1)throw new Od;if(u||h instanceof Promise)u=(u??Promise.resolve()).then(async()=>{await h,r.issues.length!==f&&(c||(c=yd(r,f)))});else{if(r.issues.length===f)continue;c||(c=yd(r,f))}}return u?u.then(()=>r):r},i=(r,l,a)=>{if(yd(r))return r.aborted=!0,r;const c=s(l,o,a);if(c instanceof Promise){if(a.async===!1)throw new Od;return c.then(u=>e._zod.parse(u,a))}return e._zod.parse(c,a)};e._zod.run=(r,l)=>{if(l.skipChecks)return e._zod.parse(r,l);if(l.direction==="backward"){const c=e._zod.parse({value:r.value,issues:[]},{...l,skipChecks:!0});return c instanceof Promise?c.then(u=>i(u,r,l)):i(c,r,l)}const a=e._zod.parse(r,l);if(a instanceof Promise){if(l.async===!1)throw new Od;return a.then(c=>s(c,o,l))}return s(a,o,l)}}Zn(e,"~standard",()=>({validate:s=>{try{const i=qU(e,s);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return KU(e,s).then(r=>r.success?{value:r.data}:{issues:r.error?.issues})}},vendor:"zod",version:1}))}),o8=pt("$ZodString",(e,t)=>{Mo.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??wj(e._zod.bag),e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),ko=pt("$ZodStringFormat",(e,t)=>{t2.init(e,t),o8.init(e,t)}),zj=pt("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=cj),ko.init(e,t)}),Wj=pt("$ZodUUID",(e,t)=>{if(t.version){const o={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(o===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Fk(o))}else t.pattern??(t.pattern=Fk());ko.init(e,t)}),Uj=pt("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=uj),ko.init(e,t)}),jj=pt("$ZodURL",(e,t)=>{ko.init(e,t),e._zod.check=n=>{try{const o=n.value.trim(),s=new URL(o);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(s.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(s.protocol.endsWith(":")?s.protocol.slice(0,-1):s.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=s.href:n.value=o;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),Vj=pt("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=fj()),ko.init(e,t)}),qj=pt("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=lj),ko.init(e,t)}),Kj=pt("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=nj),ko.init(e,t)}),Zj=pt("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=oj),ko.init(e,t)}),Gj=pt("$ZodULID",(e,t)=>{t.pattern??(t.pattern=sj),ko.init(e,t)}),Yj=pt("$ZodXID",(e,t)=>{t.pattern??(t.pattern=ij),ko.init(e,t)}),Xj=pt("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=rj),ko.init(e,t)}),Jj=pt("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Cj(t)),ko.init(e,t)}),Qj=pt("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=kj),ko.init(e,t)}),eV=pt("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=bj(t)),ko.init(e,t)}),tV=pt("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=aj),ko.init(e,t)}),nV=pt("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=pj),ko.init(e,t),e._zod.bag.format="ipv4"}),oV=pt("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=hj),ko.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),sV=pt("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=mj),ko.init(e,t)}),iV=pt("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=gj),ko.init(e,t),e._zod.check=n=>{const o=n.value.split("/");try{if(o.length!==2)throw new Error;const[s,i]=o;if(!i)throw new Error;const r=Number(i);if(`${r}`!==i)throw new Error;if(r<0||r>128)throw new Error;new URL(`http://[${s}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function WM(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const rV=pt("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=vj),ko.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{WM(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function lV(e){if(!FM.test(e))return!1;const t=e.replace(/[-_]/g,o=>o==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return WM(n)}const aV=pt("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=FM),ko.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{lV(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),cV=pt("$ZodE164",(e,t)=>{t.pattern??(t.pattern=yj),ko.init(e,t)});function uV(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[o]=n;if(!o)return!1;const s=JSON.parse(atob(o));return!("typ"in s&&s?.typ!=="JWT"||!s.alg||t&&(!("alg"in s)||s.alg!==t))}catch{return!1}}const dV=pt("$ZodJWT",(e,t)=>{ko.init(e,t),e._zod.check=n=>{uV(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),UM=pt("$ZodNumber",(e,t)=>{Mo.init(e,t),e._zod.pattern=e._zod.bag.pattern??DM,e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}const s=n.value;if(typeof s=="number"&&!Number.isNaN(s)&&Number.isFinite(s))return n;const i=typeof s=="number"?Number.isNaN(s)?"NaN":Number.isFinite(s)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:s,inst:e,...i?{received:i}:{}}),n}}),fV=pt("$ZodNumberFormat",(e,t)=>{Tj.init(e,t),UM.init(e,t)}),pV=pt("$ZodBoolean",(e,t)=>{Mo.init(e,t),e._zod.pattern=xj,e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=!!n.value}catch{}const s=n.value;return typeof s=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:s,inst:e}),n}}),hV=pt("$ZodUnknown",(e,t)=>{Mo.init(e,t),e._zod.parse=n=>n}),mV=pt("$ZodNever",(e,t)=>{Mo.init(e,t),e._zod.parse=(n,o)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function Rk(e,t,n){e.issues.length&&t.issues.push(...kd(n,e.issues)),t.value[n]=e.value}const gV=pt("$ZodArray",(e,t)=>{Mo.init(e,t),e._zod.parse=(n,o)=>{const s=n.value;if(!Array.isArray(s))return n.issues.push({expected:"array",code:"invalid_type",input:s,inst:e}),n;n.value=Array(s.length);const i=[];for(let r=0;rRk(c,n,r))):Rk(a,n,r)}return i.length?Promise.all(i).then(()=>n):n}});function Am(e,t,n,o,s){if(e.issues.length){if(s&&!(n in o))return;t.issues.push(...kd(n,e.issues))}e.value===void 0?n in o&&(t.value[n]=void 0):t.value[n]=e.value}function jM(e){const t=Object.keys(e.shape);for(const o of t)if(!e.shape?.[o]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${o}": expected a Zod schema`);const n=FU(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function VM(e,t,n,o,s,i){const r=[],l=s.keySet,a=s.catchall._zod,c=a.def.type,u=a.optout==="optional";for(const d in t){if(l.has(d))continue;if(c==="never"){r.push(d);continue}const f=a.run({value:t[d],issues:[]},o);f instanceof Promise?e.push(f.then(h=>Am(h,n,d,t,u))):Am(f,n,d,t,u)}return r.length&&n.issues.push({code:"unrecognized_keys",keys:r,input:t,inst:i}),e.length?Promise.all(e).then(()=>n):n}const vV=pt("$ZodObject",(e,t)=>{if(Mo.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const l=t.shape;Object.defineProperty(t,"shape",{get:()=>{const a={...l};return Object.defineProperty(t,"shape",{value:a}),a}})}const o=Jg(()=>jM(t));Zn(e._zod,"propValues",()=>{const l=t.shape,a={};for(const c in l){const u=l[c]._zod;if(u.values){a[c]??(a[c]=new Set);for(const d of u.values)a[c].add(d)}}return a});const s=up,i=t.catchall;let r;e._zod.parse=(l,a)=>{r??(r=o.value);const c=l.value;if(!s(c))return l.issues.push({expected:"object",code:"invalid_type",input:c,inst:e}),l;l.value={};const u=[],d=r.shape;for(const f of r.keys){const h=d[f],m=h._zod.optout==="optional",g=h._zod.run({value:c[f],issues:[]},a);g instanceof Promise?u.push(g.then(b=>Am(b,l,f,c,m))):Am(g,l,f,c,m)}return i?VM(u,c,l,a,o.value,e):u.length?Promise.all(u).then(()=>l):l}}),yV=pt("$ZodObjectJIT",(e,t)=>{vV.init(e,t);const n=e._zod.parse,o=Jg(()=>jM(t)),s=f=>{const h=new Bj(["shape","payload","ctx"]),m=o.value,g=y=>{const w=Ok(y);return`shape[${w}]._zod.run({ value: input[${w}], issues: [] }, ctx)`};h.write("const input = payload.value;");const b=Object.create(null);let _=0;for(const y of m.keys)b[y]=`key_${_++}`;h.write("const newResult = {};");for(const y of m.keys){const w=b[y],x=Ok(y),L=f[y]?._zod?.optout==="optional";h.write(`const ${w} = ${g(y)};`),L?h.write(` - if (${w}.issues.length) { - if (${x} in input) { - payload.issues = payload.issues.concat(${w}.issues.map(iss => ({ - ...iss, - path: iss.path ? [${x}, ...iss.path] : [${x}] - }))); - } - } - - if (${w}.value === undefined) { - if (${x} in input) { - newResult[${x}] = undefined; - } - } else { - newResult[${x}] = ${w}.value; - } - - `):h.write(` - if (${w}.issues.length) { - payload.issues = payload.issues.concat(${w}.issues.map(iss => ({ - ...iss, - path: iss.path ? [${x}, ...iss.path] : [${x}] - }))); - } - - if (${w}.value === undefined) { - if (${x} in input) { - newResult[${x}] = undefined; - } - } else { - newResult[${x}] = ${w}.value; - } - - `)}h.write("payload.value = newResult;"),h.write("return payload;");const v=h.compile();return(y,w)=>v(f,y,w)};let i;const r=up,l=!TM.jitless,c=l&&NU.value,u=t.catchall;let d;e._zod.parse=(f,h)=>{d??(d=o.value);const m=f.value;return r(m)?l&&c&&h?.async===!1&&h.jitless!==!0?(i||(i=s(t.shape)),f=i(f,h),u?VM([],m,f,h,d,e):f):n(f,h):(f.issues.push({expected:"object",code:"invalid_type",input:m,inst:e}),f)}});function Pk(e,t,n,o){for(const i of e)if(i.issues.length===0)return t.value=i.value,t;const s=e.filter(i=>!yd(i));return s.length===1?(t.value=s[0].value,s[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(i=>i.issues.map(r=>Za(r,o,Ka())))}),t)}const qM=pt("$ZodUnion",(e,t)=>{Mo.init(e,t),Zn(e._zod,"optin",()=>t.options.some(s=>s._zod.optin==="optional")?"optional":void 0),Zn(e._zod,"optout",()=>t.options.some(s=>s._zod.optout==="optional")?"optional":void 0),Zn(e._zod,"values",()=>{if(t.options.every(s=>s._zod.values))return new Set(t.options.flatMap(s=>Array.from(s._zod.values)))}),Zn(e._zod,"pattern",()=>{if(t.options.every(s=>s._zod.pattern)){const s=t.options.map(i=>i._zod.pattern);return new RegExp(`^(${s.map(i=>Qy(i.source)).join("|")})$`)}});const n=t.options.length===1,o=t.options[0]._zod.run;e._zod.parse=(s,i)=>{if(n)return o(s,i);let r=!1;const l=[];for(const a of t.options){const c=a._zod.run({value:s.value,issues:[]},i);if(c instanceof Promise)l.push(c),r=!0;else{if(c.issues.length===0)return c;l.push(c)}}return r?Promise.all(l).then(a=>Pk(a,s,e,i)):Pk(l,s,e,i)}}),kV=pt("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,qM.init(e,t);const n=e._zod.parse;Zn(e._zod,"propValues",()=>{const s={};for(const i of t.options){const r=i._zod.propValues;if(!r||Object.keys(r).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(const[l,a]of Object.entries(r)){s[l]||(s[l]=new Set);for(const c of a)s[l].add(c)}}return s});const o=Jg(()=>{const s=t.options,i=new Map;for(const r of s){const l=r._zod.propValues?.[t.discriminator];if(!l||l.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(const a of l){if(i.has(a))throw new Error(`Duplicate discriminator value "${String(a)}"`);i.set(a,r)}}return i});e._zod.parse=(s,i)=>{const r=s.value;if(!up(r))return s.issues.push({code:"invalid_type",expected:"object",input:r,inst:e}),s;const l=o.value.get(r?.[t.discriminator]);return l?l._zod.run(s,i):t.unionFallback?n(s,i):(s.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:r,path:[t.discriminator],inst:e}),s)}}),bV=pt("$ZodIntersection",(e,t)=>{Mo.init(e,t),e._zod.parse=(n,o)=>{const s=n.value,i=t.left._zod.run({value:s,issues:[]},o),r=t.right._zod.run({value:s,issues:[]},o);return i instanceof Promise||r instanceof Promise?Promise.all([i,r]).then(([a,c])=>Dk(n,a,c)):Dk(n,i,r)}});function o3(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Jd(e)&&Jd(t)){const n=Object.keys(t),o=Object.keys(e).filter(i=>n.indexOf(i)!==-1),s={...e,...t};for(const i of o){const r=o3(e[i],t[i]);if(!r.valid)return{valid:!1,mergeErrorPath:[i,...r.mergeErrorPath]};s[i]=r.data}return{valid:!0,data:s}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let o=0;ol.l&&l.r).map(([l])=>l);if(i.length&&s&&e.issues.push({...s,keys:i}),yd(e))return e;const r=o3(t.value,n.value);if(!r.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);return e.value=r.data,e}const CV=pt("$ZodRecord",(e,t)=>{Mo.init(e,t),e._zod.parse=(n,o)=>{const s=n.value;if(!Jd(s))return n.issues.push({expected:"record",code:"invalid_type",input:s,inst:e}),n;const i=[],r=t.keyType._zod.values;if(r){n.value={};const l=new Set;for(const c of r)if(typeof c=="string"||typeof c=="number"||typeof c=="symbol"){l.add(typeof c=="number"?c.toString():c);const u=t.valueType._zod.run({value:s[c],issues:[]},o);u instanceof Promise?i.push(u.then(d=>{d.issues.length&&n.issues.push(...kd(c,d.issues)),n.value[c]=d.value})):(u.issues.length&&n.issues.push(...kd(c,u.issues)),n.value[c]=u.value)}let a;for(const c in s)l.has(c)||(a=a??[],a.push(c));a&&a.length>0&&n.issues.push({code:"unrecognized_keys",input:s,inst:e,keys:a})}else{n.value={};for(const l of Reflect.ownKeys(s)){if(l==="__proto__")continue;let a=t.keyType._zod.run({value:l,issues:[]},o);if(a instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof l=="string"&&DM.test(l)&&a.issues.length){const d=t.keyType._zod.run({value:Number(l),issues:[]},o);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");d.issues.length===0&&(a=d)}if(a.issues.length){t.mode==="loose"?n.value[l]=s[l]:n.issues.push({code:"invalid_key",origin:"record",issues:a.issues.map(d=>Za(d,o,Ka())),input:l,path:[l],inst:e});continue}const u=t.valueType._zod.run({value:s[l],issues:[]},o);u instanceof Promise?i.push(u.then(d=>{d.issues.length&&n.issues.push(...kd(l,d.issues)),n.value[a.value]=d.value})):(u.issues.length&&n.issues.push(...kd(l,u.issues)),n.value[a.value]=u.value)}}return i.length?Promise.all(i).then(()=>n):n}}),wV=pt("$ZodEnum",(e,t)=>{Mo.init(e,t);const n=EM(t.entries),o=new Set(n);e._zod.values=o,e._zod.pattern=new RegExp(`^(${n.filter(s=>OU.has(typeof s)).map(s=>typeof s=="string"?Qd(s):s.toString()).join("|")})$`),e._zod.parse=(s,i)=>{const r=s.value;return o.has(r)||s.issues.push({code:"invalid_value",values:n,input:r,inst:e}),s}}),_V=pt("$ZodLiteral",(e,t)=>{if(Mo.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(o=>typeof o=="string"?Qd(o):o?Qd(o.toString()):String(o)).join("|")})$`),e._zod.parse=(o,s)=>{const i=o.value;return n.has(i)||o.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),o}}),xV=pt("$ZodTransform",(e,t)=>{Mo.init(e,t),e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new MM(e.constructor.name);const s=t.transform(n.value,n);if(o.async)return(s instanceof Promise?s:Promise.resolve(s)).then(r=>(n.value=r,n));if(s instanceof Promise)throw new Od;return n.value=s,n}});function Bk(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const KM=pt("$ZodOptional",(e,t)=>{Mo.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Zn(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Zn(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Qy(n.source)})?$`):void 0}),e._zod.parse=(n,o)=>{if(t.innerType._zod.optin==="optional"){const s=t.innerType._zod.run(n,o);return s instanceof Promise?s.then(i=>Bk(i,n.value)):Bk(s,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,o)}}),SV=pt("$ZodExactOptional",(e,t)=>{KM.init(e,t),Zn(e._zod,"values",()=>t.innerType._zod.values),Zn(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,o)=>t.innerType._zod.run(n,o)}),AV=pt("$ZodNullable",(e,t)=>{Mo.init(e,t),Zn(e._zod,"optin",()=>t.innerType._zod.optin),Zn(e._zod,"optout",()=>t.innerType._zod.optout),Zn(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Qy(n.source)}|null)$`):void 0}),Zn(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,o)=>n.value===null?n:t.innerType._zod.run(n,o)}),MV=pt("$ZodDefault",(e,t)=>{Mo.init(e,t),e._zod.optin="optional",Zn(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);if(n.value===void 0)return n.value=t.defaultValue,n;const s=t.innerType._zod.run(n,o);return s instanceof Promise?s.then(i=>Hk(i,t)):Hk(s,t)}});function Hk(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const TV=pt("$ZodPrefault",(e,t)=>{Mo.init(e,t),e._zod.optin="optional",Zn(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>(o.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,o))}),EV=pt("$ZodNonOptional",(e,t)=>{Mo.init(e,t),Zn(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(o=>o!==void 0)):void 0}),e._zod.parse=(n,o)=>{const s=t.innerType._zod.run(n,o);return s instanceof Promise?s.then(i=>zk(i,e)):zk(s,e)}});function zk(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const IV=pt("$ZodCatch",(e,t)=>{Mo.init(e,t),Zn(e._zod,"optin",()=>t.innerType._zod.optin),Zn(e._zod,"optout",()=>t.innerType._zod.optout),Zn(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);const s=t.innerType._zod.run(n,o);return s instanceof Promise?s.then(i=>(n.value=i.value,i.issues.length&&(n.value=t.catchValue({...n,error:{issues:i.issues.map(r=>Za(r,o,Ka()))},input:n.value}),n.issues=[]),n)):(n.value=s.value,s.issues.length&&(n.value=t.catchValue({...n,error:{issues:s.issues.map(i=>Za(i,o,Ka()))},input:n.value}),n.issues=[]),n)}}),LV=pt("$ZodPipe",(e,t)=>{Mo.init(e,t),Zn(e._zod,"values",()=>t.in._zod.values),Zn(e._zod,"optin",()=>t.in._zod.optin),Zn(e._zod,"optout",()=>t.out._zod.optout),Zn(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,o)=>{if(o.direction==="backward"){const i=t.out._zod.run(n,o);return i instanceof Promise?i.then(r=>V0(r,t.in,o)):V0(i,t.in,o)}const s=t.in._zod.run(n,o);return s instanceof Promise?s.then(i=>V0(i,t.out,o)):V0(s,t.out,o)}});function V0(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const $V=pt("$ZodReadonly",(e,t)=>{Mo.init(e,t),Zn(e._zod,"propValues",()=>t.innerType._zod.propValues),Zn(e._zod,"values",()=>t.innerType._zod.values),Zn(e._zod,"optin",()=>t.innerType?._zod?.optin),Zn(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);const s=t.innerType._zod.run(n,o);return s instanceof Promise?s.then(Wk):Wk(s)}});function Wk(e){return e.value=Object.freeze(e.value),e}const NV=pt("$ZodCustom",(e,t)=>{Oi.init(e,t),Mo.init(e,t),e._zod.parse=(n,o)=>n,e._zod.check=n=>{const o=n.value,s=t.fn(o);if(s instanceof Promise)return s.then(i=>Uk(i,n,o,e));Uk(s,n,o,e)}});function Uk(e,t,n,o){if(!e){const s={code:"custom",input:n,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};o._zod.def.params&&(s.params=o._zod.def.params),t.issues.push(dp(s))}}var jk;class OV{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const o=n[0];return this._map.set(t,o),o&&typeof o=="object"&&"id"in o&&this._idmap.set(o.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const o={...this.get(n)??{}};delete o.id;const s={...o,...this._map.get(t)};return Object.keys(s).length?s:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function FV(){return new OV}(jk=globalThis).__zod_globalRegistry??(jk.__zod_globalRegistry=FV());const u1=globalThis.__zod_globalRegistry;function RV(e,t){return new e({type:"string",...Yt(t)})}function PV(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Yt(t)})}function Vk(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Yt(t)})}function DV(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Yt(t)})}function BV(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Yt(t)})}function HV(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Yt(t)})}function zV(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Yt(t)})}function WV(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Yt(t)})}function UV(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Yt(t)})}function jV(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Yt(t)})}function VV(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Yt(t)})}function qV(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Yt(t)})}function KV(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Yt(t)})}function ZV(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Yt(t)})}function GV(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Yt(t)})}function YV(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Yt(t)})}function XV(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Yt(t)})}function JV(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Yt(t)})}function QV(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Yt(t)})}function eq(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Yt(t)})}function tq(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Yt(t)})}function nq(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Yt(t)})}function oq(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Yt(t)})}function sq(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Yt(t)})}function iq(e,t){return new e({type:"string",format:"date",check:"string_format",...Yt(t)})}function rq(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Yt(t)})}function lq(e,t){return new e({type:"string",format:"duration",check:"string_format",...Yt(t)})}function aq(e,t){return new e({type:"number",checks:[],...Yt(t)})}function cq(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...Yt(t)})}function uq(e,t){return new e({type:"boolean",...Yt(t)})}function dq(e){return new e({type:"unknown"})}function fq(e,t){return new e({type:"never",...Yt(t)})}function qk(e,t){return new HM({check:"less_than",...Yt(t),value:e,inclusive:!1})}function Xv(e,t){return new HM({check:"less_than",...Yt(t),value:e,inclusive:!0})}function Kk(e,t){return new zM({check:"greater_than",...Yt(t),value:e,inclusive:!1})}function Jv(e,t){return new zM({check:"greater_than",...Yt(t),value:e,inclusive:!0})}function Zk(e,t){return new Mj({check:"multiple_of",...Yt(t),value:e})}function ZM(e,t){return new Ej({check:"max_length",...Yt(t),maximum:e})}function Mm(e,t){return new Ij({check:"min_length",...Yt(t),minimum:e})}function GM(e,t){return new Lj({check:"length_equals",...Yt(t),length:e})}function pq(e,t){return new $j({check:"string_format",format:"regex",...Yt(t),pattern:e})}function hq(e){return new Nj({check:"string_format",format:"lowercase",...Yt(e)})}function mq(e){return new Oj({check:"string_format",format:"uppercase",...Yt(e)})}function gq(e,t){return new Fj({check:"string_format",format:"includes",...Yt(t),includes:e})}function vq(e,t){return new Rj({check:"string_format",format:"starts_with",...Yt(t),prefix:e})}function yq(e,t){return new Pj({check:"string_format",format:"ends_with",...Yt(t),suffix:e})}function ff(e){return new Dj({check:"overwrite",tx:e})}function kq(e){return ff(t=>t.normalize(e))}function bq(){return ff(e=>e.trim())}function Cq(){return ff(e=>e.toLowerCase())}function wq(){return ff(e=>e.toUpperCase())}function _q(){return ff(e=>$U(e))}function xq(e,t,n){return new e({type:"array",element:t,...Yt(n)})}function Sq(e,t,n){return new e({type:"custom",check:"custom",fn:t,...Yt(n)})}function Aq(e){const t=Mq(n=>(n.addIssue=o=>{if(typeof o=="string")n.issues.push(dp(o,n.value,t._zod.def));else{const s=o;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=n.value),s.inst??(s.inst=t),s.continue??(s.continue=!t._zod.def.abort),n.issues.push(dp(s))}},e(n.value,n)));return t}function Mq(e,t){const n=new Oi({check:"custom",...Yt(t)});return n._zod.check=e,n}function YM(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??u1,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function is(e,t,n={path:[],schemaPath:[]}){var o;const s=e._zod.def,i=t.seen.get(e);if(i)return i.count++,n.schemaPath.includes(e)&&(i.cycle=n.path),i.schema;const r={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,r);const l=e._zod.toJSONSchema?.();if(l)r.schema=l;else{const u={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,r.schema,u);else{const f=r.schema,h=t.processors[s.type];if(!h)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${s.type}`);h(e,t,f,u)}const d=e._zod.parent;d&&(r.ref||(r.ref=d),is(d,t,u),t.seen.get(d).isParent=!0)}const a=t.metadataRegistry.get(e);return a&&Object.assign(r.schema,a),t.io==="input"&&ni(e)&&(delete r.schema.examples,delete r.schema.default),t.io==="input"&&r.schema._prefault&&((o=r.schema).default??(o.default=r.schema._prefault)),delete r.schema._prefault,t.seen.get(e).schema}function XM(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const o=new Map;for(const r of e.seen.entries()){const l=e.metadataRegistry.get(r[0])?.id;if(l){const a=o.get(l);if(a&&a!==r[0])throw new Error(`Duplicate schema id "${l}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);o.set(l,r[0])}}const s=r=>{const l=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const d=e.external.registry.get(r[0])?.id,f=e.external.uri??(m=>m);if(d)return{ref:f(d)};const h=r[1].defId??r[1].schema.id??`schema${e.counter++}`;return r[1].defId=h,{defId:h,ref:`${f("__shared")}#/${l}/${h}`}}if(r[1]===n)return{ref:"#"};const c=`#/${l}/`,u=r[1].schema.id??`__schema${e.counter++}`;return{defId:u,ref:c+u}},i=r=>{if(r[1].schema.$ref)return;const l=r[1],{ref:a,defId:c}=s(r);l.def={...l.schema},c&&(l.defId=c);const u=l.schema;for(const d in u)delete u[d];u.$ref=a};if(e.cycles==="throw")for(const r of e.seen.entries()){const l=r[1];if(l.cycle)throw new Error(`Cycle detected: #/${l.cycle?.join("/")}/ - -Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const r of e.seen.entries()){const l=r[1];if(t===r[0]){i(r);continue}if(e.external){const c=e.external.registry.get(r[0])?.id;if(t!==r[0]&&c){i(r);continue}}if(e.metadataRegistry.get(r[0])?.id){i(r);continue}if(l.cycle){i(r);continue}if(l.count>1&&e.reused==="ref"){i(r);continue}}}function JM(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const o=r=>{const l=e.seen.get(r);if(l.ref===null)return;const a=l.def??l.schema,c={...a},u=l.ref;if(l.ref=null,u){o(u);const f=e.seen.get(u),h=f.schema;if(h.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(a.allOf=a.allOf??[],a.allOf.push(h)):Object.assign(a,h),Object.assign(a,c),r._zod.parent===u)for(const g in a)g==="$ref"||g==="allOf"||g in c||delete a[g];if(h.$ref&&f.def)for(const g in a)g==="$ref"||g==="allOf"||g in f.def&&JSON.stringify(a[g])===JSON.stringify(f.def[g])&&delete a[g]}const d=r._zod.parent;if(d&&d!==u){o(d);const f=e.seen.get(d);if(f?.schema.$ref&&(a.$ref=f.schema.$ref,f.def))for(const h in a)h==="$ref"||h==="allOf"||h in f.def&&JSON.stringify(a[h])===JSON.stringify(f.def[h])&&delete a[h]}e.override({zodSchema:r,jsonSchema:a,path:l.path??[]})};for(const r of[...e.seen.entries()].reverse())o(r[0]);const s={};if(e.target==="draft-2020-12"?s.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?s.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?s.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const r=e.external.registry.get(t)?.id;if(!r)throw new Error("Schema is missing an `id` property");s.$id=e.external.uri(r)}Object.assign(s,n.def??n.schema);const i=e.external?.defs??{};for(const r of e.seen.entries()){const l=r[1];l.def&&l.defId&&(i[l.defId]=l.def)}e.external||Object.keys(i).length>0&&(e.target==="draft-2020-12"?s.$defs=i:s.definitions=i);try{const r=JSON.parse(JSON.stringify(s));return Object.defineProperty(r,"~standard",{value:{...t["~standard"],jsonSchema:{input:Tm(t,"input",e.processors),output:Tm(t,"output",e.processors)}},enumerable:!1,writable:!1}),r}catch{throw new Error("Error converting schema to JSON.")}}function ni(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const o=e._zod.def;if(o.type==="transform")return!0;if(o.type==="array")return ni(o.element,n);if(o.type==="set")return ni(o.valueType,n);if(o.type==="lazy")return ni(o.getter(),n);if(o.type==="promise"||o.type==="optional"||o.type==="nonoptional"||o.type==="nullable"||o.type==="readonly"||o.type==="default"||o.type==="prefault")return ni(o.innerType,n);if(o.type==="intersection")return ni(o.left,n)||ni(o.right,n);if(o.type==="record"||o.type==="map")return ni(o.keyType,n)||ni(o.valueType,n);if(o.type==="pipe")return ni(o.in,n)||ni(o.out,n);if(o.type==="object"){for(const s in o.shape)if(ni(o.shape[s],n))return!0;return!1}if(o.type==="union"){for(const s of o.options)if(ni(s,n))return!0;return!1}if(o.type==="tuple"){for(const s of o.items)if(ni(s,n))return!0;return!!(o.rest&&ni(o.rest,n))}return!1}const Tq=(e,t={})=>n=>{const o=YM({...n,processors:t});return is(e,o),XM(o,e),JM(o,e)},Tm=(e,t,n={})=>o=>{const{libraryOptions:s,target:i}=o??{},r=YM({...s??{},target:i,io:t,processors:n});return is(e,r),XM(r,e),JM(r,e)},Eq={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Iq=(e,t,n,o)=>{const s=n;s.type="string";const{minimum:i,maximum:r,format:l,patterns:a,contentEncoding:c}=e._zod.bag;if(typeof i=="number"&&(s.minLength=i),typeof r=="number"&&(s.maxLength=r),l&&(s.format=Eq[l]??l,s.format===""&&delete s.format,l==="time"&&delete s.format),c&&(s.contentEncoding=c),a&&a.size>0){const u=[...a];u.length===1?s.pattern=u[0].source:u.length>1&&(s.allOf=[...u.map(d=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:d.source}))])}},Lq=(e,t,n,o)=>{const s=n,{minimum:i,maximum:r,format:l,multipleOf:a,exclusiveMaximum:c,exclusiveMinimum:u}=e._zod.bag;typeof l=="string"&&l.includes("int")?s.type="integer":s.type="number",typeof u=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(s.minimum=u,s.exclusiveMinimum=!0):s.exclusiveMinimum=u),typeof i=="number"&&(s.minimum=i,typeof u=="number"&&t.target!=="draft-04"&&(u>=i?delete s.minimum:delete s.exclusiveMinimum)),typeof c=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(s.maximum=c,s.exclusiveMaximum=!0):s.exclusiveMaximum=c),typeof r=="number"&&(s.maximum=r,typeof c=="number"&&t.target!=="draft-04"&&(c<=r?delete s.maximum:delete s.exclusiveMaximum)),typeof a=="number"&&(s.multipleOf=a)},$q=(e,t,n,o)=>{n.type="boolean"},Nq=(e,t,n,o)=>{n.not={}},Oq=(e,t,n,o)=>{},Fq=(e,t,n,o)=>{const s=e._zod.def,i=EM(s.entries);i.every(r=>typeof r=="number")&&(n.type="number"),i.every(r=>typeof r=="string")&&(n.type="string"),n.enum=i},Rq=(e,t,n,o)=>{const s=e._zod.def,i=[];for(const r of s.values)if(r===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof r=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(r))}else i.push(r);if(i.length!==0)if(i.length===1){const r=i[0];n.type=r===null?"null":typeof r,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[r]:n.const=r}else i.every(r=>typeof r=="number")&&(n.type="number"),i.every(r=>typeof r=="string")&&(n.type="string"),i.every(r=>typeof r=="boolean")&&(n.type="boolean"),i.every(r=>r===null)&&(n.type="null"),n.enum=i},Pq=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Dq=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Bq=(e,t,n,o)=>{const s=n,i=e._zod.def,{minimum:r,maximum:l}=e._zod.bag;typeof r=="number"&&(s.minItems=r),typeof l=="number"&&(s.maxItems=l),s.type="array",s.items=is(i.element,t,{...o,path:[...o.path,"items"]})},Hq=(e,t,n,o)=>{const s=n,i=e._zod.def;s.type="object",s.properties={};const r=i.shape;for(const c in r)s.properties[c]=is(r[c],t,{...o,path:[...o.path,"properties",c]});const l=new Set(Object.keys(r)),a=new Set([...l].filter(c=>{const u=i.shape[c]._zod;return t.io==="input"?u.optin===void 0:u.optout===void 0}));a.size>0&&(s.required=Array.from(a)),i.catchall?._zod.def.type==="never"?s.additionalProperties=!1:i.catchall?i.catchall&&(s.additionalProperties=is(i.catchall,t,{...o,path:[...o.path,"additionalProperties"]})):t.io==="output"&&(s.additionalProperties=!1)},zq=(e,t,n,o)=>{const s=e._zod.def,i=s.inclusive===!1,r=s.options.map((l,a)=>is(l,t,{...o,path:[...o.path,i?"oneOf":"anyOf",a]}));i?n.oneOf=r:n.anyOf=r},Wq=(e,t,n,o)=>{const s=e._zod.def,i=is(s.left,t,{...o,path:[...o.path,"allOf",0]}),r=is(s.right,t,{...o,path:[...o.path,"allOf",1]}),l=c=>"allOf"in c&&Object.keys(c).length===1,a=[...l(i)?i.allOf:[i],...l(r)?r.allOf:[r]];n.allOf=a},Uq=(e,t,n,o)=>{const s=n,i=e._zod.def;s.type="object";const r=i.keyType,a=r._zod.bag?.patterns;if(i.mode==="loose"&&a&&a.size>0){const u=is(i.valueType,t,{...o,path:[...o.path,"patternProperties","*"]});s.patternProperties={};for(const d of a)s.patternProperties[d.source]=u}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(s.propertyNames=is(i.keyType,t,{...o,path:[...o.path,"propertyNames"]})),s.additionalProperties=is(i.valueType,t,{...o,path:[...o.path,"additionalProperties"]});const c=r._zod.values;if(c){const u=[...c].filter(d=>typeof d=="string"||typeof d=="number");u.length>0&&(s.required=u)}},jq=(e,t,n,o)=>{const s=e._zod.def,i=is(s.innerType,t,o),r=t.seen.get(e);t.target==="openapi-3.0"?(r.ref=s.innerType,n.nullable=!0):n.anyOf=[i,{type:"null"}]},Vq=(e,t,n,o)=>{const s=e._zod.def;is(s.innerType,t,o);const i=t.seen.get(e);i.ref=s.innerType},qq=(e,t,n,o)=>{const s=e._zod.def;is(s.innerType,t,o);const i=t.seen.get(e);i.ref=s.innerType,n.default=JSON.parse(JSON.stringify(s.defaultValue))},Kq=(e,t,n,o)=>{const s=e._zod.def;is(s.innerType,t,o);const i=t.seen.get(e);i.ref=s.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(s.defaultValue)))},Zq=(e,t,n,o)=>{const s=e._zod.def;is(s.innerType,t,o);const i=t.seen.get(e);i.ref=s.innerType;let r;try{r=s.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=r},Gq=(e,t,n,o)=>{const s=e._zod.def,i=t.io==="input"?s.in._zod.def.type==="transform"?s.out:s.in:s.out;is(i,t,o);const r=t.seen.get(e);r.ref=i},Yq=(e,t,n,o)=>{const s=e._zod.def;is(s.innerType,t,o);const i=t.seen.get(e);i.ref=s.innerType,n.readOnly=!0},QM=(e,t,n,o)=>{const s=e._zod.def;is(s.innerType,t,o);const i=t.seen.get(e);i.ref=s.innerType},Xq=pt("ZodISODateTime",(e,t)=>{Jj.init(e,t),Eo.init(e,t)});function Jq(e){return sq(Xq,e)}const Qq=pt("ZodISODate",(e,t)=>{Qj.init(e,t),Eo.init(e,t)});function eK(e){return iq(Qq,e)}const tK=pt("ZodISOTime",(e,t)=>{eV.init(e,t),Eo.init(e,t)});function nK(e){return rq(tK,e)}const oK=pt("ZodISODuration",(e,t)=>{tV.init(e,t),Eo.init(e,t)});function sK(e){return lq(oK,e)}const iK=(e,t)=>{NM.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>VU(e,n)},flatten:{value:n=>jU(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,n3,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,n3,2)}},isEmpty:{get(){return e.issues.length===0}}})},xr=pt("ZodError",iK,{Parent:Error}),rK=t8(xr),lK=n8(xr),aK=Qg(xr),cK=e2(xr),uK=ZU(xr),dK=GU(xr),fK=YU(xr),pK=XU(xr),hK=JU(xr),mK=QU(xr),gK=ej(xr),vK=tj(xr),To=pt("ZodType",(e,t)=>(Mo.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Tm(e,"input"),output:Tm(e,"output")}}),e.toJSONSchema=Tq(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(sc(t,{checks:[...t.checks??[],...n.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]}),{parent:!0}),e.with=e.check,e.clone=(n,o)=>ic(e,n,o),e.brand=()=>e,e.register=((n,o)=>(n.add(e,o),e)),e.parse=(n,o)=>rK(e,n,o,{callee:e.parse}),e.safeParse=(n,o)=>aK(e,n,o),e.parseAsync=async(n,o)=>lK(e,n,o,{callee:e.parseAsync}),e.safeParseAsync=async(n,o)=>cK(e,n,o),e.spa=e.safeParseAsync,e.encode=(n,o)=>uK(e,n,o),e.decode=(n,o)=>dK(e,n,o),e.encodeAsync=async(n,o)=>fK(e,n,o),e.decodeAsync=async(n,o)=>pK(e,n,o),e.safeEncode=(n,o)=>hK(e,n,o),e.safeDecode=(n,o)=>mK(e,n,o),e.safeEncodeAsync=async(n,o)=>gK(e,n,o),e.safeDecodeAsync=async(n,o)=>vK(e,n,o),e.refine=(n,o)=>e.check(dZ(n,o)),e.superRefine=n=>e.check(fZ(n)),e.overwrite=n=>e.check(ff(n)),e.optional=()=>Xk(e),e.exactOptional=()=>JK(e),e.nullable=()=>Jk(e),e.nullish=()=>Xk(Jk(e)),e.nonoptional=n=>sZ(e,n),e.array=()=>On(e),e.or=n=>UK([e,n]),e.and=n=>qK(e,n),e.transform=n=>Qk(e,YK(n)),e.default=n=>tZ(e,n),e.prefault=n=>oZ(e,n),e.catch=n=>rZ(e,n),e.pipe=n=>Qk(e,n),e.readonly=()=>cZ(e),e.describe=n=>{const o=e.clone();return u1.add(o,{description:n}),o},Object.defineProperty(e,"description",{get(){return u1.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return u1.get(e);const o=e.clone();return u1.add(o,n[0]),o},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),eT=pt("_ZodString",(e,t)=>{o8.init(e,t),To.init(e,t),e._zod.processJSONSchema=(o,s,i)=>Iq(e,o,s);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...o)=>e.check(pq(...o)),e.includes=(...o)=>e.check(gq(...o)),e.startsWith=(...o)=>e.check(vq(...o)),e.endsWith=(...o)=>e.check(yq(...o)),e.min=(...o)=>e.check(Mm(...o)),e.max=(...o)=>e.check(ZM(...o)),e.length=(...o)=>e.check(GM(...o)),e.nonempty=(...o)=>e.check(Mm(1,...o)),e.lowercase=o=>e.check(hq(o)),e.uppercase=o=>e.check(mq(o)),e.trim=()=>e.check(bq()),e.normalize=(...o)=>e.check(kq(...o)),e.toLowerCase=()=>e.check(Cq()),e.toUpperCase=()=>e.check(wq()),e.slugify=()=>e.check(_q())}),yK=pt("ZodString",(e,t)=>{o8.init(e,t),eT.init(e,t),e.email=n=>e.check(PV(kK,n)),e.url=n=>e.check(WV(bK,n)),e.jwt=n=>e.check(oq(FK,n)),e.emoji=n=>e.check(UV(CK,n)),e.guid=n=>e.check(Vk(Gk,n)),e.uuid=n=>e.check(DV(q0,n)),e.uuidv4=n=>e.check(BV(q0,n)),e.uuidv6=n=>e.check(HV(q0,n)),e.uuidv7=n=>e.check(zV(q0,n)),e.nanoid=n=>e.check(jV(wK,n)),e.guid=n=>e.check(Vk(Gk,n)),e.cuid=n=>e.check(VV(_K,n)),e.cuid2=n=>e.check(qV(xK,n)),e.ulid=n=>e.check(KV(SK,n)),e.base64=n=>e.check(eq($K,n)),e.base64url=n=>e.check(tq(NK,n)),e.xid=n=>e.check(ZV(AK,n)),e.ksuid=n=>e.check(GV(MK,n)),e.ipv4=n=>e.check(YV(TK,n)),e.ipv6=n=>e.check(XV(EK,n)),e.cidrv4=n=>e.check(JV(IK,n)),e.cidrv6=n=>e.check(QV(LK,n)),e.e164=n=>e.check(nq(OK,n)),e.datetime=n=>e.check(Jq(n)),e.date=n=>e.check(eK(n)),e.time=n=>e.check(nK(n)),e.duration=n=>e.check(sK(n))});function Ct(e){return RV(yK,e)}const Eo=pt("ZodStringFormat",(e,t)=>{ko.init(e,t),eT.init(e,t)}),kK=pt("ZodEmail",(e,t)=>{Uj.init(e,t),Eo.init(e,t)}),Gk=pt("ZodGUID",(e,t)=>{zj.init(e,t),Eo.init(e,t)}),q0=pt("ZodUUID",(e,t)=>{Wj.init(e,t),Eo.init(e,t)}),bK=pt("ZodURL",(e,t)=>{jj.init(e,t),Eo.init(e,t)}),CK=pt("ZodEmoji",(e,t)=>{Vj.init(e,t),Eo.init(e,t)}),wK=pt("ZodNanoID",(e,t)=>{qj.init(e,t),Eo.init(e,t)}),_K=pt("ZodCUID",(e,t)=>{Kj.init(e,t),Eo.init(e,t)}),xK=pt("ZodCUID2",(e,t)=>{Zj.init(e,t),Eo.init(e,t)}),SK=pt("ZodULID",(e,t)=>{Gj.init(e,t),Eo.init(e,t)}),AK=pt("ZodXID",(e,t)=>{Yj.init(e,t),Eo.init(e,t)}),MK=pt("ZodKSUID",(e,t)=>{Xj.init(e,t),Eo.init(e,t)}),TK=pt("ZodIPv4",(e,t)=>{nV.init(e,t),Eo.init(e,t)}),EK=pt("ZodIPv6",(e,t)=>{oV.init(e,t),Eo.init(e,t)}),IK=pt("ZodCIDRv4",(e,t)=>{sV.init(e,t),Eo.init(e,t)}),LK=pt("ZodCIDRv6",(e,t)=>{iV.init(e,t),Eo.init(e,t)}),$K=pt("ZodBase64",(e,t)=>{rV.init(e,t),Eo.init(e,t)}),NK=pt("ZodBase64URL",(e,t)=>{aV.init(e,t),Eo.init(e,t)}),OK=pt("ZodE164",(e,t)=>{cV.init(e,t),Eo.init(e,t)}),FK=pt("ZodJWT",(e,t)=>{dV.init(e,t),Eo.init(e,t)}),tT=pt("ZodNumber",(e,t)=>{UM.init(e,t),To.init(e,t),e._zod.processJSONSchema=(o,s,i)=>Lq(e,o,s),e.gt=(o,s)=>e.check(Kk(o,s)),e.gte=(o,s)=>e.check(Jv(o,s)),e.min=(o,s)=>e.check(Jv(o,s)),e.lt=(o,s)=>e.check(qk(o,s)),e.lte=(o,s)=>e.check(Xv(o,s)),e.max=(o,s)=>e.check(Xv(o,s)),e.int=o=>e.check(Yk(o)),e.safe=o=>e.check(Yk(o)),e.positive=o=>e.check(Kk(0,o)),e.nonnegative=o=>e.check(Jv(0,o)),e.negative=o=>e.check(qk(0,o)),e.nonpositive=o=>e.check(Xv(0,o)),e.multipleOf=(o,s)=>e.check(Zk(o,s)),e.step=(o,s)=>e.check(Zk(o,s)),e.finite=()=>e;const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function Ut(e){return aq(tT,e)}const RK=pt("ZodNumberFormat",(e,t)=>{fV.init(e,t),tT.init(e,t)});function Yk(e){return cq(RK,e)}const PK=pt("ZodBoolean",(e,t)=>{pV.init(e,t),To.init(e,t),e._zod.processJSONSchema=(n,o,s)=>$q(e,n,o)});function $p(e){return uq(PK,e)}const DK=pt("ZodUnknown",(e,t)=>{hV.init(e,t),To.init(e,t),e._zod.processJSONSchema=(n,o,s)=>Oq()});function ps(){return dq(DK)}const BK=pt("ZodNever",(e,t)=>{mV.init(e,t),To.init(e,t),e._zod.processJSONSchema=(n,o,s)=>Nq(e,n,o)});function HK(e){return fq(BK,e)}const zK=pt("ZodArray",(e,t)=>{gV.init(e,t),To.init(e,t),e._zod.processJSONSchema=(n,o,s)=>Bq(e,n,o,s),e.element=t.element,e.min=(n,o)=>e.check(Mm(n,o)),e.nonempty=n=>e.check(Mm(1,n)),e.max=(n,o)=>e.check(ZM(n,o)),e.length=(n,o)=>e.check(GM(n,o)),e.unwrap=()=>e.element});function On(e,t){return xq(zK,e,t)}const WK=pt("ZodObject",(e,t)=>{yV.init(e,t),To.init(e,t),e._zod.processJSONSchema=(n,o,s)=>Hq(e,n,o,s),Zn(e,"shape",()=>t.shape),e.keyof=()=>yo(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:ps()}),e.loose=()=>e.clone({...e._zod.def,catchall:ps()}),e.strict=()=>e.clone({...e._zod.def,catchall:HK()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>BU(e,n),e.safeExtend=n=>HU(e,n),e.merge=n=>zU(e,n),e.pick=n=>PU(e,n),e.omit=n=>DU(e,n),e.partial=(...n)=>WU(oT,e,n[0]),e.required=(...n)=>UU(sT,e,n[0])});function Lt(e,t){const n={type:"object",shape:e??{},...Yt(t)};return new WK(n)}const nT=pt("ZodUnion",(e,t)=>{qM.init(e,t),To.init(e,t),e._zod.processJSONSchema=(n,o,s)=>zq(e,n,o,s),e.options=t.options});function UK(e,t){return new nT({type:"union",options:e,...Yt(t)})}const jK=pt("ZodDiscriminatedUnion",(e,t)=>{nT.init(e,t),kV.init(e,t)});function rc(e,t,n){return new jK({type:"union",options:t,discriminator:e,...Yt(n)})}const VK=pt("ZodIntersection",(e,t)=>{bV.init(e,t),To.init(e,t),e._zod.processJSONSchema=(n,o,s)=>Wq(e,n,o,s)});function qK(e,t){return new VK({type:"intersection",left:e,right:t})}const KK=pt("ZodRecord",(e,t)=>{CV.init(e,t),To.init(e,t),e._zod.processJSONSchema=(n,o,s)=>Uq(e,n,o,s),e.keyType=t.keyType,e.valueType=t.valueType});function s8(e,t,n){return new KK({type:"record",keyType:e,valueType:t,...Yt(n)})}const s3=pt("ZodEnum",(e,t)=>{wV.init(e,t),To.init(e,t),e._zod.processJSONSchema=(o,s,i)=>Fq(e,o,s),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(o,s)=>{const i={};for(const r of o)if(n.has(r))i[r]=t.entries[r];else throw new Error(`Key ${r} not found in enum`);return new s3({...t,checks:[],...Yt(s),entries:i})},e.exclude=(o,s)=>{const i={...t.entries};for(const r of o)if(n.has(r))delete i[r];else throw new Error(`Key ${r} not found in enum`);return new s3({...t,checks:[],...Yt(s),entries:i})}});function yo(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new s3({type:"enum",entries:n,...Yt(t)})}const ZK=pt("ZodLiteral",(e,t)=>{_V.init(e,t),To.init(e,t),e._zod.processJSONSchema=(n,o,s)=>Rq(e,n,o),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function pn(e,t){return new ZK({type:"literal",values:Array.isArray(e)?e:[e],...Yt(t)})}const GK=pt("ZodTransform",(e,t)=>{xV.init(e,t),To.init(e,t),e._zod.processJSONSchema=(n,o,s)=>Dq(e,n),e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new MM(e.constructor.name);n.addIssue=i=>{if(typeof i=="string")n.issues.push(dp(i,n.value,t));else{const r=i;r.fatal&&(r.continue=!1),r.code??(r.code="custom"),r.input??(r.input=n.value),r.inst??(r.inst=e),n.issues.push(dp(r))}};const s=t.transform(n.value,n);return s instanceof Promise?s.then(i=>(n.value=i,n)):(n.value=s,n)}});function YK(e){return new GK({type:"transform",transform:e})}const oT=pt("ZodOptional",(e,t)=>{KM.init(e,t),To.init(e,t),e._zod.processJSONSchema=(n,o,s)=>QM(e,n,o,s),e.unwrap=()=>e._zod.def.innerType});function Xk(e){return new oT({type:"optional",innerType:e})}const XK=pt("ZodExactOptional",(e,t)=>{SV.init(e,t),To.init(e,t),e._zod.processJSONSchema=(n,o,s)=>QM(e,n,o,s),e.unwrap=()=>e._zod.def.innerType});function JK(e){return new XK({type:"optional",innerType:e})}const QK=pt("ZodNullable",(e,t)=>{AV.init(e,t),To.init(e,t),e._zod.processJSONSchema=(n,o,s)=>jq(e,n,o,s),e.unwrap=()=>e._zod.def.innerType});function Jk(e){return new QK({type:"nullable",innerType:e})}const eZ=pt("ZodDefault",(e,t)=>{MV.init(e,t),To.init(e,t),e._zod.processJSONSchema=(n,o,s)=>qq(e,n,o,s),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function tZ(e,t){return new eZ({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():LM(t)}})}const nZ=pt("ZodPrefault",(e,t)=>{TV.init(e,t),To.init(e,t),e._zod.processJSONSchema=(n,o,s)=>Kq(e,n,o,s),e.unwrap=()=>e._zod.def.innerType});function oZ(e,t){return new nZ({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():LM(t)}})}const sT=pt("ZodNonOptional",(e,t)=>{EV.init(e,t),To.init(e,t),e._zod.processJSONSchema=(n,o,s)=>Vq(e,n,o,s),e.unwrap=()=>e._zod.def.innerType});function sZ(e,t){return new sT({type:"nonoptional",innerType:e,...Yt(t)})}const iZ=pt("ZodCatch",(e,t)=>{IV.init(e,t),To.init(e,t),e._zod.processJSONSchema=(n,o,s)=>Zq(e,n,o,s),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function rZ(e,t){return new iZ({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const lZ=pt("ZodPipe",(e,t)=>{LV.init(e,t),To.init(e,t),e._zod.processJSONSchema=(n,o,s)=>Gq(e,n,o,s),e.in=t.in,e.out=t.out});function Qk(e,t){return new lZ({type:"pipe",in:e,out:t})}const aZ=pt("ZodReadonly",(e,t)=>{$V.init(e,t),To.init(e,t),e._zod.processJSONSchema=(n,o,s)=>Yq(e,n,o,s),e.unwrap=()=>e._zod.def.innerType});function cZ(e){return new aZ({type:"readonly",innerType:e})}const uZ=pt("ZodCustom",(e,t)=>{NV.init(e,t),To.init(e,t),e._zod.processJSONSchema=(n,o,s)=>Pq(e,n)});function dZ(e,t={}){return Sq(uZ,e,t)}function fZ(e){return Aq(e)}const fu=Ct().min(1),i8=Ct().min(1),Np=Ct().min(1),pu=Ct().min(1),Ji=Ct().min(1),pZ=/^[A-Za-z0-9._-]{1,128}$/;function hZ(e){return pZ.test(e)&&e!=="."&&e!==".."}const iT=rc("kind",[Lt({kind:pn("user"),payload:ps().optional()}),Lt({kind:pn("cron"),taskId:pu.optional(),payload:ps().optional()}),Lt({kind:pn("task"),taskId:pu,payload:ps().optional()}),Lt({kind:pn("hook"),payload:ps().optional()}),Lt({kind:pn("compaction"),payload:ps().optional()}),Lt({kind:pn("side"),payload:ps().optional()}),Lt({kind:pn("other"),payload:ps().optional()})]),mZ=Lt({inputTokens:Ut().optional(),outputTokens:Ut().optional(),cachedTokens:Ut().optional(),cost:Ut().optional()}),L1=Lt({inputOther:Ut(),output:Ut(),inputCacheRead:Ut(),inputCacheCreation:Ut()}),gZ=Lt({llmFirstTokenLatencyMs:Ut().optional(),llmStreamDurationMs:Ut().optional(),llmRequestBuildMs:Ut().optional(),llmServerFirstTokenMs:Ut().optional(),llmServerDecodeMs:Ut().optional(),llmClientConsumeMs:Ut().optional()}),vZ=Lt({failedAttempt:Ut(),nextAttempt:Ut(),maxAttempts:Ut(),delayMs:Ut(),errorName:Ct(),errorMessage:Ct(),statusCode:Ut().optional()}),rT=yo(["queued","running","completed","failed","cancelled"]),yZ=yo(["running","completed","interrupted","failed"]),kZ=Lt({kind:pn("text"),frameId:Np,role:yo(["assistant","user"]),text:Ct(),attachmentIds:On(Ct()).optional(),taskId:pu.optional()}),bZ=Lt({kind:pn("thinking"),frameId:Np,text:Ct()}),CZ=Lt({agentId:Ji,role:yo(["child","member"]).optional()}),wZ=Lt({kind:yo(["stdout","stderr","progress","status","custom"]),text:Ct().optional(),percent:Ut().optional(),customKind:Ct().optional(),customData:ps().optional()}),_Z=Lt({kind:pn("tool"),frameId:Np,toolCallId:Ct(),name:Ct(),view:Ct().optional(),state:yo(["running","done","error"]),input:ps().optional(),output:ps().optional(),display:ps().optional(),error:Ct().optional(),inputText:Ct().optional(),progress:wZ.optional(),taskId:pu.optional(),approvalId:Ct().optional(),todoId:Ct().optional(),agentRefs:On(CZ).optional()}),r8=Lt({interactionId:Ct(),interactionKind:yo(["approval","question"]),toolCallId:Ct().optional(),state:yo(["pending","approved","rejected","cancelled","answered","dismissed"]),request:ps().optional(),response:ps().optional()}),xZ=Lt({kind:pn("notice"),frameId:Np,level:yo(["error","warning","info"]),source:Ct().optional(),message:Ct(),detail:ps().optional()}),lT=rc("kind",[kZ,bZ,_Z,xZ]),aT=Lt({kind:pn("step"),stepId:i8,turnId:fu,ordinal:Ut().int(),state:yZ,frames:On(lT),startedAt:Ct().optional(),endedAt:Ct().optional(),usage:L1.optional(),finishReason:Ct().optional(),timing:gZ.optional(),retry:vZ.optional(),endReason:Ct().optional(),endMessage:Ct().optional()}),cT=Lt({kind:pn("turn"),turnId:fu,ordinal:Ut().int(),state:rT,origin:iT,prompt:Ct().optional(),attachmentIds:On(Ct()).optional(),steps:On(aT),startedAt:Ct().optional(),endedAt:Ct().optional(),usage:mZ.optional(),durationMs:Ut().optional(),error:Ct().optional()}),uT=Lt({kind:pn("marker"),markerId:Ct(),marker:Ct(),payload:ps().optional(),at:Ct().optional()}),dT=Lt({kind:pn("taskref"),refId:Ct(),taskId:pu,at:Ct().optional()}),fT=rc("kind",[cT,uT,dT]),l8=Lt({taskId:pu,kind:yo(["shell","subagent","tool","other"]),state:yo(["running","completed","failed","timed_out","killed","lost"]),detached:$p(),description:Ct().optional(),agentId:Ji.optional(),outputTail:Ct(),startedAt:Ct().optional(),endedAt:Ct().optional(),resultSummary:Ct().optional(),error:Ct().optional(),stateReason:Ct().optional(),usage:L1.optional()}),SZ=Lt({objective:Ct(),status:yo(["active","paused","blocked","complete"]),completionCriterion:Ct().optional(),budgetUsed:Ut().optional(),budgetLimit:Ut().optional()}),AZ=Lt({plan:Lt({reviewPath:Ct().optional(),version:Ut().optional()}).optional(),swarm:Lt({trigger:Ct().optional()}).optional()}),MZ=Lt({plan:Lt({reviewPath:Ct().optional(),version:Ut().optional()}).nullable().optional(),swarm:Lt({trigger:Ct().optional()}).nullable().optional()}),TZ=rc("kind",[Lt({kind:pn("idle")}),Lt({kind:pn("running"),turnId:Ut(),step:Ut(),stepId:Ct(),since:Ut()}),Lt({kind:pn("streaming"),turnId:Ut(),step:Ut(),stepId:Ct(),stream:yo(["assistant","thinking","tool_call"]),toolCallId:Ct().optional(),toolName:Ct().optional(),since:Ut()}),Lt({kind:pn("tool_call"),turnId:Ut(),step:Ut(),toolCallId:Ct(),name:Ct(),since:Ut()}),Lt({kind:pn("retrying"),turnId:Ut(),step:Ut(),stepId:Ct(),failedAttempt:Ut(),nextAttempt:Ut(),maxAttempts:Ut(),delayMs:Ut(),errorName:Ct().optional(),statusCode:Ut().optional(),since:Ut()}),Lt({kind:pn("awaiting_approval"),turnId:Ut(),step:Ut().optional(),approval:ps().optional(),since:Ut()}),Lt({kind:pn("interrupted"),turnId:Ut(),step:Ut().optional(),reason:yo(["aborted","max_steps","error"]),message:Ct().optional(),at:Ut()}),Lt({kind:pn("ended"),turnId:Ut(),reason:yo(["completed","cancelled","failed","blocked"]),durationMs:Ut().optional(),at:Ut()})]),EZ=Lt({byModel:s8(Ct(),L1).optional(),currentTurn:L1.optional(),total:L1.optional()}),IZ=Lt({model:Ct().optional(),thinkingEffort:Ct().optional(),usage:EZ.optional(),contextTokens:Ut().optional(),maxContextTokens:Ut().optional(),contextUsage:Ut().optional(),permission:yo(["manual","yolo","auto"]).optional(),phase:TZ.optional()}),a8=Lt({goal:SZ.optional(),modes:AZ.optional(),activity:yo(["idle","turn","disposing","unknown"]).optional(),agent:IZ.optional()}),LZ=a8.extend({modes:MZ.optional()}),n2=Lt({attachmentId:Ct(),mediaType:Ct(),name:Ct().optional(),size:Ut().optional(),source:rc("kind",[Lt({kind:pn("url"),url:Ct()}),Lt({kind:pn("file"),fileId:Ct()})]).optional(),placeholder:Ct().optional()}),$Z=Lt({title:Ct(),status:yo(["pending","in_progress","done"])}),c8=Lt({todoId:Ct(),items:On($Z),updatedAt:Ct().optional()}),u8=Lt({promptId:Ct(),status:yo(["running","queued","blocked","completed","failed","aborted"]),userMessageId:Ct().optional(),content:ps().optional(),createdAt:Ct(),finishedAt:Ct().optional(),steeredAt:Ct().optional()}),pT=Lt({items:On(fT),tasks:On(l8),interactions:On(r8).default([]),attachments:On(n2).default([]),todos:On(c8).default([]),prompts:On(u8).default([]),meta:a8,hasMoreOlder:$p().optional()}),NZ=cT.omit({steps:!0}),OZ=aT.omit({frames:!0}),FZ=rc("type",[Lt({type:pn("frame"),turnId:fu,stepId:i8,frameId:Np}),Lt({type:pn("task"),taskId:pu})]),d8=rc("op",[Lt({op:pn("reset"),agentId:Ji,snapshot:pT}),Lt({op:pn("turn.upsert"),turn:NZ}),Lt({op:pn("step.upsert"),turnId:fu,step:OZ}),Lt({op:pn("frame.upsert"),turnId:fu,stepId:i8,frame:lT}),Lt({op:pn("append"),target:FZ,offset:Ut().int().nonnegative(),text:Ct()}),Lt({op:pn("marker.upsert"),item:uT,beforeTurn:Ut().int().optional()}),Lt({op:pn("taskref.upsert"),item:dT,beforeTurn:Ut().int().optional()}),Lt({op:pn("task.upsert"),task:l8}),Lt({op:pn("interaction.upsert"),interaction:r8}),Lt({op:pn("attachment.upsert"),attachment:n2}),Lt({op:pn("todo.upsert"),todo:c8}),Lt({op:pn("prompt.upsert"),prompt:u8}),Lt({op:pn("meta.merge"),meta:LZ}),Lt({op:pn("items.remove"),ids:On(Ct())})]);Lt({agentId:Ji,ops:On(d8)});const RZ=yo(["off","turn","block","delta"]),ef=Ut().int().nonnegative(),PZ=s8(Ct(),RZ);Lt({session_id:Ct().min(1),transcript:PZ,transcript_since:s8(Ct(),ef).optional()});Lt({agent_id:Ji,before_turn:Ct().min(1).optional(),after_turn:Ct().min(1).optional(),page_size:Ut().int().min(1).max(100).optional()}).superRefine((e,t)=>{e.before_turn!==void 0&&e.after_turn!==void 0&&t.addIssue({code:"custom",message:"before_turn and after_turn are mutually exclusive",path:["before_turn"]}),hZ(e.agent_id)||t.addIssue({code:"custom",message:"agent_id must be a plain agent id (no path separators)",path:["agent_id"]})});const DZ=Lt({agentId:Ji,type:yo(["main","sub","independent"]).optional(),parentAgentId:Ji.optional(),label:Ct().optional(),createdAt:Ct().optional(),disposedAt:Ct().optional()}),BZ=Lt({agent_id:Ji,items:On(fT),has_more:$p(),tasks:On(l8),interactions:On(r8).default([]),attachments:On(n2).default([]),todos:On(c8).default([]),prompts:On(u8).default([]),meta:a8,agents:On(DZ),pending_interactions:On(Ct()),seq:ef.optional()});Lt({agent_id:Ji,batches:On(Lt({seq:ef,ops:On(d8)})),latest_seq:ef,complete:$p()});const HZ=Lt({turn_id:fu,ordinal:Ut().int(),state:rT,origin:iT,prompt:Ct(),attachment_ids:On(Ct()).optional(),started_at:Ct().optional()});Lt({agents:On(Lt({agent_id:Ji,messages:On(HZ),attachments:On(n2).default([])}))});const zZ=Lt({state:yo(["pending","approved","rejected","cancelled"]),selected_option:Ct().optional(),feedback:Ct().optional()}),WZ=Lt({tool_call_id:Ct(),turn_id:fu,source:yo(["interaction","display","output"]),plan:Ct(),path:Ct().optional(),options:On(Lt({label:Ct(),description:Ct().optional()})).optional(),review:zZ.optional()});Lt({agent_id:Ji,plans:On(WZ)});const UZ=Lt({agent_id:Ji,snapshot:pT,has_more_older:$p(),seq:ef.optional()}),jZ=Lt({agent_id:Ji,ops:On(d8),seq:ef.optional()}),hT=UZ.extend({type:pn("transcript.reset")}),mT=jZ.extend({type:pn("transcript.ops")});rc("type",[hT,mT]);const eb=new Set(["turn.started","turn.step.started","turn.step.completed","turn.step.retrying","turn.step.interrupted","turn.ended","thinking.delta","assistant.delta","tool.call.started","tool.use","tool.call.delta","tool.progress","tool.result","agent.status.updated","prompt.submitted","prompt.completed","prompt.aborted","session.meta.updated","compaction.started","compaction.completed","compaction.cancelled","goal.updated","error","warning","subagent.spawned","subagent.started","subagent.suspended","subagent.completed","subagent.failed","task.started","task.terminated","background.task.started","background.task.terminated","cron.fired"]),VZ=new Set(["session.created","session.updated","session.deleted","session.status_changed","session.usage_updated","session.history_compacted","message.created","message.updated","approval.requested","approval.resolved","approval.expired","question.requested","question.answered","question.dismissed","task.created","task.progress","task.completed","assistant.tool_use_started","assistant.tool_use_delta","assistant.tool_use_completed","assistant.completed","tool.started","tool.output","tool.completed"]),qZ=new Set(["server_hello","ack","ping","resync_required","error","pong"]),KZ=new Set(["assistant.delta","thinking.delta"]);function ZZ(e,t){if(qZ.has(e))return{route:"ignore"};const n=e.startsWith("event."),o=n?e.slice(6):e;return KZ.has(o)?GZ(t)?{route:"agent",agentType:o}:{route:"protocol"}:n?VZ.has(o)?{route:"protocol"}:eb.has(o)?{route:"agent",agentType:o}:{route:"protocol"}:eb.has(o)?{route:"agent",agentType:o}:{route:"agent",agentType:o}}function GZ(e){if(!e||typeof e!="object")return!1;const t=e;return"message_id"in t||"content_index"in t?!1:typeof t.delta=="string"}const YZ="kimi-code.bearer.",XZ=3e4;class JZ{constructor(t){this.opts=t,this.tracer=t.tracer??Ky}ws=null;connected=!1;closed=!1;subscriptions=new Map;transcriptSubscriptions=new Map;sideChannelAgents=new Map;pendingSubscriptions=[];terminalAttachments=new Map;msgSeq=0;clientHelloId=null;reconnectAttempts=0;reconnectTimer=null;heartbeatMs=3e4;lastActivityAt=0;tracer;connect(){if(this.ws!==null||this.closed)return;this.lastActivityAt=Date.now(),this.tracer.wsEvent?.({kind:"lifecycle",event:"connect",detail:{url:this.opts.wsUrl,attempt:this.reconnectAttempts}});const t=this.opts.credentialStore?.getToken(),n=t!==void 0?[`${YZ}${t}`]:void 0,o=new WebSocket(this.opts.wsUrl,n);this.ws=o,o.onopen=()=>{this.tracer.wsEvent?.({kind:"lifecycle",event:"open"})},o.onmessage=s=>{this.lastActivityAt=Date.now();try{const i=JSON.parse(String(s.data));this.tracer.wsEvent?.({kind:"in",frame:i}),this.handleFrame(i)}catch(i){this.tracer.wsEvent?.({kind:"lifecycle",event:"parse-error",detail:{error:String(i)}}),this.opts.handlers.onError(0,`Failed to parse WS frame: ${String(i)}`,!1)}},o.onerror=()=>{this.tracer.wsEvent?.({kind:"lifecycle",event:"error"}),this.opts.handlers.onError(0,"WebSocket error",!1)},o.onclose=s=>{this.tracer.wsEvent?.({kind:"lifecycle",event:"close",detail:s?{code:s.code,reason:s.reason,wasClean:s.wasClean}:void 0}),this.connected=!1,this.ws=null,this.opts.handlers.onConnectionState(!1),this.scheduleReconnect()}}scheduleReconnect(){if(this.closed||this.reconnectTimer!==null)return;const n=Math.min(3e4,1e3*2**this.reconnectAttempts)+Math.floor(Math.random()*250);this.reconnectAttempts+=1,this.tracer.wsEvent?.({kind:"lifecycle",event:"reconnect-scheduled",detail:{delayMs:n,attempt:this.reconnectAttempts}}),this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.connect()},n)}subscribe(t,n={seq:0}){if(this.subscriptions.set(t,{...n}),this.connected)this.sendSubscribe([t],{[t]:n});else{const o=this.pendingSubscriptions.findIndex(s=>s.sessionId===t);o!==-1&&this.pendingSubscriptions.splice(o,1),this.pendingSubscriptions.push({sessionId:t,cursor:{...n}})}}unsubscribe(t){this.subscriptions.delete(t);const n=this.pendingSubscriptions.findIndex(o=>o.sessionId===t);n!==-1&&this.pendingSubscriptions.splice(n,1),this.connected&&this.ws&&this.send({type:"unsubscribe",id:this.nextId(),payload:{session_ids:[t]}})}subscribeTranscript(t,n,o){this.transcriptSubscriptions.set(t,{agentId:n,...o!==void 0?{sinceSeq:o}:{}}),this.connected&&this.sendTranscriptSubscribe(t,n,o)}unsubscribeTranscript(t,n){const o=this.transcriptSubscriptions.get(t);(n===void 0||o===void 0||n.includes(o.agentId))&&this.transcriptSubscriptions.delete(t),!(!this.connected||!this.ws)&&this.send({type:"unsubscribe_v2",id:this.nextId(),payload:{session_id:t,...n!==void 0?{agent_ids:n}:{}}})}markSideChannelAgent(t,n){if(!this.opts.mainAgentOnly)return;let o=this.sideChannelAgents.get(t);if(o===void 0&&(o=new Set,this.sideChannelAgents.set(t,o)),o.has(n))return;o.add(n);const s=this.subscriptions.get(t);this.connected&&s!==void 0&&this.sendSubscribe([t],{[t]:s})}abort(t,n){!this.connected||!this.ws||this.send({type:"abort",id:this.nextId(),payload:{session_id:t,prompt_id:n}})}terminalAttach(t,n,o){const s=K0(t,n),i=this.terminalAttachments.get(s),r=o??i?.lastSeq??0;this.terminalAttachments.set(s,{sessionId:t,terminalId:n,lastSeq:r}),!(!this.connected||!this.ws)&&this.sendTerminalAttach(t,n,r)}terminalInput(t,n,o){!this.connected||!this.ws||this.send({type:"terminal_input",id:this.nextId(),payload:{session_id:t,terminal_id:n,data:o}})}terminalResize(t,n,o,s){!this.connected||!this.ws||this.send({type:"terminal_resize",id:this.nextId(),payload:{session_id:t,terminal_id:n,cols:o,rows:s}})}terminalDetach(t,n){this.terminalAttachments.delete(K0(t,n)),!(!this.connected||!this.ws)&&this.send({type:"terminal_detach",id:this.nextId(),payload:{session_id:t,terminal_id:n}})}terminalClose(t,n){this.terminalAttachments.delete(K0(t,n)),!(!this.connected||!this.ws)&&this.send({type:"terminal_close",id:this.nextId(),payload:{session_id:t,terminal_id:n}})}close(){this.closed=!0,this.connected=!1,this.reconnectTimer!==null&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.ws&&(this.ws.close(1e3),this.ws=null)}health(){const t=this.ws!==null&&this.ws.readyState===WebSocket.OPEN,n=Math.max(this.heartbeatMs*2,XZ),o=this.lastActivityAt>0&&Date.now()-this.lastActivityAt>n;return{connected:this.connected,open:t,stale:o}}reconnect(){if(this.closed)return;this.reconnectTimer!==null&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null);const t=this.ws;if(t!==null){t.onopen=null,t.onmessage=null,t.onerror=null,t.onclose=null;try{t.close(1e3,"reconnect")}catch{}}const n=this.connected;this.ws=null,this.connected=!1,n&&this.opts.handlers.onConnectionState(!1),this.connect()}handleFrame(t){const n=t,o=t.type;if(o==="transcript.reset"){const s=hT.safeParse({type:o,...n.payload}),i=n.session_id;if(!s.success||typeof i!="string"){this.opts.handlers.onError(0,"Invalid transcript.reset frame",!1);return}const r=s.data;this.opts.handlers.onTranscriptReset?.(i,r.agent_id,{...r.snapshot,hasMoreOlder:r.has_more_older},r.seq);const l=this.transcriptSubscriptions.get(i);l?.agentId===r.agent_id&&r.seq!==void 0&&(l.sinceSeq=r.seq);return}if(o==="transcript.ops"){const s=mT.safeParse({type:o,...n.payload}),i=n.session_id;if(!s.success||typeof i!="string"){this.opts.handlers.onError(0,"Invalid transcript.ops frame",!1);return}const r=s.data,l=this.opts.handlers.onTranscriptOps?.(i,r.agent_id,r.ops,r.seq),a=this.transcriptSubscriptions.get(i);l!==!1&&a?.agentId===r.agent_id&&r.seq!==void 0&&(a.sinceSeq=r.seq);return}switch(o){case"server_hello":{const s=n.payload?.heartbeat_ms;typeof s=="number"&&s>0&&(this.heartbeatMs=s),this.onServerHello();break}case"ping":this.send({type:"pong",payload:{nonce:n.payload.nonce}});break;case"resync_required":{const s=n.payload.session_id,i=n.payload.epoch;this.subscriptions.set(s,{seq:n.payload.current_seq,epoch:i}),this.opts.handlers.onResync(s,n.payload.current_seq,i);break}case"error":{const s=n.session_id;typeof s=="string"&&this.opts.handlers.onRawAgentEvent?this.opts.handlers.onRawAgentEvent({type:"error",seq:n.seq,session_id:s,timestamp:n.timestamp,payload:n.payload}):this.opts.handlers.onError(n.payload.code,n.payload.msg,n.payload.fatal);break}case"ack":n.id===this.clientHelloId&&(this.clientHelloId=null,n.code===0&&this.opts.handlers.onReplayComplete?.());break;case"terminal_output":{const s=n.session_id,i=n.terminal_id,r=n.seq,l=K0(s,i),a=this.terminalAttachments.get(l);a&&this.terminalAttachments.set(l,{...a,lastSeq:Math.max(a.lastSeq,r)});const c=typeof n.payload?.data=="string"?n.payload.data:"";this.opts.handlers.onTerminalOutput?.(s,i,c,r);break}case"terminal_exit":{const s=n.session_id,i=n.terminal_id,r=n.payload?.exit_code,l=typeof r=="number"?r:null;this.opts.handlers.onTerminalExit?.(s,i,l);break}default:{this.trackCursor(n);const s=n.type,i=ZZ(s,n.payload);if(i.route==="protocol"){this.opts.handlers.onWireEvent(n);break}if(i.route==="agent"){if(this.opts.handlers.onRawAgentEvent&&typeof n.session_id=="string"){const r=n,l=n;this.opts.handlers.onRawAgentEvent({type:i.agentType,seq:r.seq,session_id:r.session_id,timestamp:r.timestamp,payload:r.payload,...l.volatile!==void 0?{volatile:l.volatile}:{},...l.offset!==void 0?{offset:l.offset}:{}})}break}break}}}onServerHello(){this.connected=!0,this.reconnectAttempts=0,this.opts.handlers.onConnectionState(!0);const t=Array.from(this.subscriptions.keys());for(const s of this.pendingSubscriptions)this.subscriptions.set(s.sessionId,s.cursor),t.includes(s.sessionId)||t.push(s.sessionId);this.pendingSubscriptions.length=0;const n={};for(const[s,i]of this.subscriptions.entries())n[s]=i;const o=this.nextId();this.clientHelloId=o,this.send({type:"client_hello",id:o,payload:{client_id:this.opts.clientId,subscriptions:t,cursors:n,...this.opts.mainAgentOnly?{agent_filter:this.rawAgentFilter(t)}:{}}});for(const[s,i]of this.transcriptSubscriptions)this.sendTranscriptSubscribe(s,i.agentId,i.sinceSeq);for(const s of this.terminalAttachments.values())this.sendTerminalAttach(s.sessionId,s.terminalId,s.lastSeq)}sendSubscribe(t,n){this.send({type:"subscribe",id:this.nextId(),payload:{session_ids:t,cursors:n,...this.opts.mainAgentOnly?{agent_filter:this.rawAgentFilter(t)}:{}}})}rawAgentFilter(t){return Object.fromEntries(t.map(n=>[n,["main",...this.sideChannelAgents.get(n)??[]]]))}sendTranscriptSubscribe(t,n,o){this.send({type:"subscribe_v2",id:this.nextId(),payload:{session_id:t,transcript:{[n]:"delta"},...o!==void 0?{transcript_since:{[n]:o}}:{}}})}sendTerminalAttach(t,n,o){this.send({type:"terminal_attach",id:this.nextId(),payload:{session_id:t,terminal_id:n,since_seq:o>0?o:void 0}})}trackCursor(t){if(t.volatile===!0)return;const n=t.session_id,o=t.seq;if(typeof n!="string"||typeof o!="number")return;const s=this.subscriptions.get(n);if(!s||o<=s.seq&&s.epoch!==void 0)return;const i=typeof t.epoch=="string"?t.epoch:s.epoch;this.subscriptions.set(n,{seq:Math.max(o,s.seq),epoch:i})}send(t){if(!(!this.ws||this.ws.readyState!==WebSocket.OPEN))try{this.ws.send(JSON.stringify(t)),this.tracer.wsEvent?.({kind:"out",frame:t})}catch{}}nextId(){return`c_${++this.msgSeq}`}}function K0(e,t){return`${e}\0${t}`}async function QZ(e,t,n){const o=await e.get(`/sessions/${encodeURIComponent(t)}/transcript`,{agent_id:n.agentId,before_turn:n.beforeTurn,after_turn:n.afterTurn,page_size:n.pageSize}),s=BZ.parse(o),i={items:s.items,tasks:s.tasks,interactions:s.interactions,attachments:s.attachments,todos:s.todos,prompts:s.prompts,meta:s.meta,hasMoreOlder:s.has_more};return{agentId:s.agent_id,...i,agents:s.agents,pendingInteractions:s.pending_interactions,...s.seq!==void 0?{seq:s.seq}:{}}}const Qv=10485760,eG=40001;function tG(e,t){if(e===void 0)return t;let n;const o=/filename\*\s*=\s*UTF-8''([^;]+)/i.exec(e)?.[1]?.trim();if(o!==void 0)try{n=decodeURIComponent(o.replaceAll(/^"|"$/g,""))}catch{return t}else n=/filename\s*=\s*"([^"]*)"/i.exec(e)?.[1]??/filename\s*=\s*([^;]+)/i.exec(e)?.[1]?.trim();return n===void 0||n.length===0||n.length>200||n==="."||n===".."||/[\u0000-\u001F\u007F/\\]/.test(n)||!n.toLowerCase().endsWith(".zip")?t:n}function tb(e){if(typeof e!="object"||e===null)return{errorName:typeof e};const t=e;return{errorName:typeof t.name=="string"?t.name:"Error",errorCode:typeof t.code=="number"?t.code:void 0,requestId:typeof t.requestId=="string"?t.requestId:void 0,phase:typeof t.phase=="string"?t.phase:void 0,httpStatus:typeof t.status=="number"?t.status:void 0}}function e9(e){return{id:e.id,sessionId:e.session_id,cwd:e.cwd,shell:e.shell,cols:e.cols,rows:e.rows,status:e.status,createdAt:e.created_at,exitedAt:e.exited_at,exitCode:e.exit_code}}function nb(e){return e==="auto_compact"||e==="manual_compact"}class nG{constructor(t){this.opts=t,this.tracer=t.tracer??Ky,this.http=new KW({origin:t.origin,identity:t.identity,tracer:this.tracer,credentialStore:t.credentialStore})}http;tracer;async getHealth(){return{status:"ok",uptimeSec:(await this.http.get("/healthz")).uptime_sec??0}}async getMeta(){const t=await this.http.get("/meta");return{serverVersion:t.server_version,serverId:t.server_id,startedAt:t.started_at,capabilities:t.capabilities,openInApps:Array.isArray(t.open_in_apps)?t.open_in_apps:[],dangerousBypassAuth:t.dangerous_bypass_auth===!0,experimentalFlags:t.experimental_flags??{},backend:t.backend==="v2"?"v2":"v1"}}async listSessions(t){const n={before_id:t?.beforeId,after_id:t?.afterId,page_size:t?.pageSize,busy:t?.busy,include_archive:t?.includeArchive,archived_only:t?.archivedOnly,exclude_empty:t?.excludeEmpty,workspace_id:t?.workspaceId},o=await this.http.get("/sessions",n);return{items:o.items.map(Lr),hasMore:o.has_more}}async createSession(t){const n={metadata:t.cwd!==void 0?{cwd:t.cwd}:{}};t.workspaceId!==void 0&&(n.workspace_id=t.workspaceId),t.title!==void 0&&(n.title=t.title),t.model!==void 0&&(n.agent_config={model:t.model});const o=await this.http.post("/sessions",n);return Lr(o)}async getSession(t){const n=await this.http.get(`/sessions/${encodeURIComponent(t)}`);return Lr(n)}async updateSession(t,n){const o={};n.title!==void 0&&(o.title=n.title),n.cwd!==void 0&&(o.metadata={cwd:n.cwd});const s={};n.model!==void 0&&(s.model=n.model),n.permissionMode!==void 0&&(s.permission_mode=n.permissionMode),n.planMode!==void 0&&(s.plan_mode=n.planMode),n.swarmMode!==void 0&&(s.swarm_mode=n.swarmMode),n.goalObjective!==void 0&&(s.goal_objective=n.goalObjective),n.goalControl!==void 0&&(s.goal_control=n.goalControl),n.thinking!==void 0&&(s.thinking=n.thinking),Object.keys(s).length>0&&(o.agent_config=s);const i=await this.http.post(`/sessions/${encodeURIComponent(t)}/profile`,o);return Lr(i)}async getSessionStatus(t){const n=await this.http.get(`/sessions/${encodeURIComponent(t)}/status`);return{model:n.model&&n.model.length>0?n.model:null,thinkingEffort:n.thinking_level,permission:n.permission,planMode:n.plan_mode===!0,swarmMode:n.swarm_mode===!0,contextTokens:n.context_tokens??0,maxContextTokens:n.max_context_tokens??0,contextUsage:n.context_usage??0}}async getSessionGoal(t){const n=await this.http.get(`/sessions/${encodeURIComponent(t)}/goal`);return xM(n)}async getSessionPlans(t,n){const o=await this.http.get(`/sessions/${encodeURIComponent(t)}/transcript/plan`,{agent_id:n.agentId,tool_call_id:n.toolCallId});return o.plans.map(s=>({agentId:o.agent_id,toolCallId:s.tool_call_id,turnId:s.turn_id,source:s.source,plan:s.plan,...s.path!==void 0?{path:s.path}:{},...s.options!==void 0?{options:s.options.map(i=>({label:i.label,...i.description!==void 0?{description:i.description}:{}}))}:{},...s.review!==void 0?{review:{state:s.review.state,...s.review.selected_option!==void 0?{selectedOption:s.review.selected_option}:{},...s.review.feedback!==void 0?{feedback:s.review.feedback}:{}}}:{}}))}async getSessionWarnings(t){return(await this.http.get(`/sessions/${encodeURIComponent(t)}/warnings`)).warnings??[]}async archiveSession(t){return await this.http.post(`/sessions/${encodeURIComponent(t)}:archive`,{})}async restoreSession(t){const n=await this.http.post(`/sessions/${encodeURIComponent(t)}:restore`,{});return Lr(n)}async listMessages(t,n){const o={before_id:n?.beforeId,after_id:n?.afterId,page_size:n?.pageSize,role:n?.role},s=await this.http.get(`/sessions/${encodeURIComponent(t)}/messages`,o);return{items:s.items.map(Q4),hasMore:s.has_more}}async getSessionSnapshot(t){const n=Date.now();this.tracer.traceKeyEvent?.("session:snapshot:start",{sessionId:t});try{const o=await this.http.get(`/sessions/${encodeURIComponent(t)}/snapshot`),s={asOfSeq:o.as_of_seq,epoch:o.epoch,session:Lr(o.session),messages:o.messages.items.map(Q4),hasMoreMessages:o.messages.has_more,inFlightTurn:o.in_flight_turn===null?null:{turnId:o.in_flight_turn.turn_id,assistantText:o.in_flight_turn.assistant_text,thinkingText:o.in_flight_turn.thinking_text,runningTools:o.in_flight_turn.running_tools.map(i=>({toolCallId:i.tool_call_id,name:i.name,args:i.args,description:i.description,lastProgress:i.last_progress})),promptId:o.in_flight_turn.current_prompt_id},pendingApprovals:o.pending_approvals.map(wM),pendingQuestions:o.pending_questions.map(_M),subagents:(o.subagents??[]).map(i=>Lh(i,i.id))};return this.tracer.traceKeyEvent?.("session:snapshot:accepted",{sessionId:t,busy:s.session.busy,seq:s.asOfSeq,messageCount:s.messages.length,durationMs:Date.now()-n}),s}catch(o){throw this.tracer.traceKeyEvent?.("session:snapshot:failed",{sessionId:t,status:"failed",durationMs:Date.now()-n,...tb(o)}),o}}async getSessionTranscript(t,n){return QZ(this.http,t,n)}async exportSession(t,n,o){const s=n===void 0?0:new TextEncoder().encode(n).byteLength,i=n===void 0||n.length===0?0:n.split(` -`).length,r=`/sessions/${encodeURIComponent(t)}/export`,l={web_log_bytes:s,web_log_entries:i},a=o?.desktop===!0;let c;try{c=await this.http.postZip(r,{web_log:n,...a?{desktop:!0}:{}},l)}catch(d){if(a&&qs(d)&&d.code===eG)c=await this.http.postZip(r,{web_log:n},l);else throw d}const u=`${t}.zip`;return{blob:c.blob,fileName:tG(c.contentDisposition,u)}}async submitPrompt(t,n){const o=Date.now();this.tracer.traceKeyEvent?.("prompt:start",{sessionId:t,contentCount:n.content.length,mediaCount:n.content.filter(s=>s.type==="image"||s.type==="video"||s.type==="file").length});try{const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/prompts`,GW(n));return this.tracer.traceKeyEvent?.("prompt:accepted",{sessionId:t,promptId:s.prompt_id,status:s.status,durationMs:Date.now()-o}),{promptId:s.prompt_id,userMessageId:s.user_message_id,status:s.status}}catch(s){throw this.tracer.traceKeyEvent?.("prompt:failed",{sessionId:t,status:"failed",durationMs:Date.now()-o,...tb(s)}),s}}async steerPrompts(t,n){const o=await this.http.post(`/sessions/${encodeURIComponent(t)}/prompts:steer`,{prompt_ids:n});return{steered:o.steered,promptIds:o.prompt_ids}}async abortPrompt(t,n){const o=await this.http.post(`/sessions/${encodeURIComponent(t)}/prompts/${encodeURIComponent(n)}:abort`,void 0,{allowCodes:[40903]});return{aborted:o.aborted,atSeq:o.at_seq}}async abortSession(t){return{aborted:(await this.http.post(`/sessions/${encodeURIComponent(t)}:abort`,{})).aborted}}async compactSession(t,n){await this.http.post(`/sessions/${encodeURIComponent(t)}:compact`,n?{instruction:n}:{})}async undoSession(t,n=1){await this.http.post(`/sessions/${encodeURIComponent(t)}:undo`,{count:n})}async forkSession(t,n){const o={};n?.title!==void 0&&(o.title=n.title);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}:fork`,o);return Lr(s)}async createChildSession(t,n){const o={};n?.title!==void 0&&(o.title=n.title);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/children`,o);return Lr(s)}async listChildSessions(t){return(await this.http.get(`/sessions/${encodeURIComponent(t)}/children`)).items.map(Lr)}async startBtw(t){return{agentId:(await this.http.post(`/sessions/${encodeURIComponent(t)}:btw`,{})).agent_id}}async respondApproval(t,n,o){const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/approvals/${encodeURIComponent(n)}`,YW(o));return{resolved:s.resolved,resolvedAt:s.resolved_at}}async respondQuestion(t,n,o){const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/questions/${encodeURIComponent(n)}`,eU(o));return{resolved:s.resolved,resolvedAt:s.resolved_at}}async dismissQuestion(t,n){return{dismissed:!0,dismissedAt:(await this.http.post(`/sessions/${encodeURIComponent(t)}/questions/${encodeURIComponent(n)}:dismiss`,void 0,{allowCodes:[40909]})).dismissed_at}}async listTasks(t,n){const o={status:n};return(await this.http.get(`/sessions/${encodeURIComponent(t)}/tasks`,o)).items.map(i=>Lh(i))}async getTask(t,n,o){const s={with_output:o?.withOutput,output_bytes:o?.outputBytes},i=await this.http.get(`/sessions/${encodeURIComponent(t)}/tasks/${encodeURIComponent(n)}`,s);return Lh(i)}async cancelTask(t,n){return await this.http.post(`/sessions/${encodeURIComponent(t)}/tasks/${encodeURIComponent(n)}:cancel`)}async listTerminals(t){return(await this.http.get(`/sessions/${encodeURIComponent(t)}/terminals`)).items.map(e9)}async createTerminal(t,n={}){const o={cwd:n.cwd,shell:n.shell,cols:n.cols,rows:n.rows},s=await this.http.post(`/sessions/${encodeURIComponent(t)}/terminals`,o);return e9(s)}async getTerminal(t,n){const o=await this.http.get(`/sessions/${encodeURIComponent(t)}/terminals/${encodeURIComponent(n)}`);return e9(o)}async closeTerminal(t,n){return this.http.post(`/sessions/${encodeURIComponent(t)}/terminals/${encodeURIComponent(n)}:close`)}async listSkills(t){return((await this.http.get(`/sessions/${encodeURIComponent(t)}/skills`)).skills??[]).map(o=>({name:o.name,description:o.description,source:o.source}))}async listSkillsForWorkspace(t){return((await this.http.get(`/workspaces/${encodeURIComponent(t)}/skills`)).skills??[]).map(o=>({name:o.name,description:o.description,source:o.source}))}async activateSkill(t,n,o){const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/skills/${encodeURIComponent(n)}:activate`,o!==void 0&&o.length>0?{args:o}:{});return{activated:s.activated,skillName:s.skill_name}}async listDirectory(t,n){const o={};n.path!==void 0&&(o.path=n.path),n.depth!==void 0&&(o.depth=n.depth),n.includeGitStatus!==void 0&&(o.include_git_status=n.includeGitStatus);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/fs:list`,o),i=s.children_by_path?Object.fromEntries(Object.entries(s.children_by_path).map(([r,l])=>[r,l.map(Ek)])):void 0;return{items:s.items.map(Ek),childrenByPath:i,truncated:s.truncated}}async readFile(t,n){const o={path:n.path};n.offset!==void 0&&(o.offset=n.offset),n.length!==void 0&&(o.length=n.length);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/fs:read`,o);return{path:s.path,content:s.content,encoding:s.encoding,size:s.size,truncated:s.truncated,etag:s.etag,mime:s.mime,languageId:s.language_id,lineCount:s.line_count,isBinary:s.is_binary}}async searchFiles(t,n){const o={workspace:t,query:n.query};n.limit!==void 0&&(o.limit=n.limit);const s=await this.http.post("/workspace/fs:search",o);return{items:s.items.map(i=>({path:i.path,name:i.name,kind:i.kind,score:i.score,matchPositions:i.match_positions})),truncated:s.truncated}}async grepFiles(t,n){const o={pattern:n.pattern};n.regex!==void 0&&(o.regex=n.regex),n.caseSensitive!==void 0&&(o.case_sensitive=n.caseSensitive);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/fs:grep`,o);return{files:s.files,filesScanned:s.files_scanned,truncated:s.truncated,elapsedMs:s.elapsed_ms}}async getGitStatus(t,n){const o={};n!==void 0&&(o.paths=n);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/fs:git_status`,o);return{branch:s.branch,ahead:s.ahead,behind:s.behind,entries:s.entries,additions:s.additions,deletions:s.deletions,pullRequest:s.pullRequest??null}}async getFileDiff(t,n){const o=await this.http.post(`/sessions/${encodeURIComponent(t)}/fs:diff`,{path:n});return{path:o.path,diff:o.diff,truncated:o.truncated??!1}}getFileDownloadUrl(t,n){const o=n.split("/").map(s=>encodeURIComponent(s)).join("/");return gd(this.opts.origin,`/sessions/${encodeURIComponent(t)}/fs/${o}:download`)}async openFile(t,n){const o={path:n.path};return n.line!==void 0&&(o.line=n.line),this.http.post(`/sessions/${encodeURIComponent(t)}/fs:open`,o)}async revealFile(t,n){return this.http.post(`/sessions/${encodeURIComponent(t)}/fs:reveal`,{path:n.path})}async openInApp(t,n,o,s){const i={app_id:n,path:o};s!==void 0&&(i.line=s),await this.http.post(`/sessions/${encodeURIComponent(t)}/fs:open-in`,i)}async listWorkspaces(){try{return((await this.http.get("/workspaces")).items??[]).map(I1)}catch{return[]}}async addWorkspace(t){const n={root:t.root};t.name!==void 0&&(n.name=t.name);const o=await this.http.post("/workspaces",n);return I1(o)}async deleteWorkspace(t){await this.http.delete(`/workspaces/${encodeURIComponent(t)}`)}async updateWorkspace(t,n){const o=await this.http.patch(`/workspaces/${encodeURIComponent(t)}`,{name:n.name});return I1(o)}async browseFs(t){try{const n=await this.http.get("/fs:browse",{path:t});return{path:n.path,parent:n.parent,entries:(n.entries??[]).map(o=>({name:o.name,path:o.path,isDir:o.is_dir}))}}catch{return{path:"",parent:null,entries:[]}}}async getFsHome(){try{const t=await this.http.get("/fs:home");return{home:t.home,recentRoots:t.recent_roots??[]}}catch{return{home:"",recentRoots:[]}}}async listModels(){return(await this.http.get("/models")).items.map(nU)}async listProviders(){return(await this.http.get("/providers")).items.map(Xu)}async getProvider(t){const n=await this.http.get(`/providers/${encodeURIComponent(t)}`),o=Xu(n);return n.api_key!==void 0?{...o,apiKey:n.api_key}:o}async addProvider(t){const n={id:t.id??"",type:t.type,models:(t.models??[]).map(s=>{const i={model:s.model,max_context_size:s.maxContextSize};return s.displayName!==void 0&&(i.display_name=s.displayName),s.capabilities!==void 0&&(i.capabilities=s.capabilities),s.maxOutputSize!==void 0&&(i.max_output_size=s.maxOutputSize),s.supportEfforts!==void 0&&(i.support_efforts=s.supportEfforts),s.adaptiveThinking!==void 0&&(i.adaptive_thinking=s.adaptiveThinking),i})};t.apiKey!==void 0&&(n.api_key=t.apiKey),t.baseUrl!==void 0&&(n.base_url=t.baseUrl),t.defaultModel!==void 0&&(n.default_model=t.defaultModel);const o=await this.http.post("/providers",n);return Xu(o)}async updateProvider(t,n){const o={type:n.type,models:(n.models??[]).map(i=>{const r={model:i.model,max_context_size:i.maxContextSize};return i.displayName!==void 0&&(r.display_name=i.displayName),i.capabilities!==void 0&&(r.capabilities=i.capabilities),i.maxOutputSize!==void 0&&(r.max_output_size=i.maxOutputSize),i.supportEfforts!==void 0&&(r.support_efforts=i.supportEfforts),i.adaptiveThinking!==void 0&&(r.adaptive_thinking=i.adaptiveThinking),r})};n.newId!==void 0&&(o.new_id=n.newId),n.apiKey!==void 0&&(o.api_key=n.apiKey),n.baseUrl!==void 0&&(o.base_url=n.baseUrl),n.defaultModel!==void 0&&(o.default_model=n.defaultModel);const s=await this.http.put(`/providers/${encodeURIComponent(t)}`,o);return{provider:Xu(s.provider)}}async deleteProvider(t){return await this.http.delete(`/providers/${encodeURIComponent(t)}`),{deleted:t}}async listCatalogProviders(){return(await this.http.get("/catalog/providers")).items.map(Ik)}async getCatalogProvider(t){const n=await this.http.get(`/catalog/providers/${encodeURIComponent(t)}`);return Ik(n)}async importCatalogProvider(t){const n={catalog_id:t.catalogId};t.apiKey!==void 0&&(n.api_key=t.apiKey),t.baseUrl!==void 0&&(n.base_url=t.baseUrl),t.id!==void 0&&(n.id=t.id);const o=await this.http.post("/providers:import_catalog",n);return{provider:Xu(o.provider),modelsImported:o.models_imported}}async importCustomRegistry(t){const n={url:t.url};t.apiKey!==void 0&&(n.api_key=t.apiKey);const o=await this.http.post("/providers:import_registry",n);return{providers:o.providers.map(Xu),modelsImported:o.models_imported}}async refreshProvider(t){const n=await this.http.post(`/providers/${encodeURIComponent(t)}:refresh`);return t9(n)}async refreshAllProviders(){const t=await this.http.post("/providers:refresh");return t9(t)}async refreshOAuthProviderModels(){const t=await this.http.post("/providers:refresh_oauth");return t9(t)}async getConfig(){const t=await this.http.get("/config");return e3(t)}async setConfig(t){const n={},o={providers:"providers",defaultProvider:"default_provider",defaultModel:"default_model",secondaryModel:"secondary_model",models:"models",thinking:"thinking",planMode:"plan_mode",yolo:"yolo",defaultPermissionMode:"default_permission_mode",defaultPlanMode:"default_plan_mode",permission:"permission",hooks:"hooks",services:"services",mergeAllAvailableSkills:"merge_all_available_skills",extraSkillDirs:"extra_skill_dirs",loopControl:"loop_control",background:"background",experimental:"experimental",telemetry:"telemetry",raw:"raw"};for(const[i,r]of Object.entries(t)){const l=o[i];l!==void 0&&(n[l]=r)}const s=await this.http.post("/config",n);return e3(s)}async getAuth(){const t=await this.http.get("/auth");return{ready:t.ready,providersCount:t.providers_count,defaultModel:t.default_model,managedProvider:t.managed_provider?{status:t.managed_provider.status}:null}}async startOAuthLogin(){const t=await this.http.post("/oauth/login",{});return t.status==="authenticated"?{flowId:t.flow_id,provider:t.provider,status:"authenticated"}:{flowId:t.flow_id,provider:t.provider,status:"pending",verificationUri:t.verification_uri,verificationUriComplete:t.verification_uri_complete,userCode:t.user_code,expiresIn:t.expires_in,interval:t.interval,expiresAt:t.expires_at}}async pollOAuthLogin(){const t=await this.http.get("/oauth/login");return t?{flowId:t.flow_id,status:t.status,resolvedAt:t.resolved_at}:null}async cancelOAuthLogin(){const t=await this.http.delete("/oauth/login");return{cancelled:t.cancelled,status:t.status}}async logout(){return{loggedOut:(await this.http.post("/oauth/logout",{})).logged_out}}async getUsage(){const t=await this.http.get("/oauth/usage");if(t.kind==="error")return{kind:"error",message:t.message,status:t.status};const n=o=>({name:o.name,window:o.window,used:o.used,limit:o.limit,resetAt:o.reset_at});return{kind:"ok",summary:t.summary===null?null:n(t.summary),limits:t.limits.map(n),extraUsage:t.extra_usage===null?null:{balanceCents:t.extra_usage.balance_cents,totalCents:t.extra_usage.total_cents,monthlyChargeLimitEnabled:t.extra_usage.monthly_charge_limit_enabled,monthlyChargeLimitCents:t.extra_usage.monthly_charge_limit_cents,monthlyUsedCents:t.extra_usage.monthly_used_cents,currency:t.extra_usage.currency}}}async getUserInfo(){return this.http.get("/oauth/userinfo")}async uploadFile(t){const n=new FormData;n.append("file",t.file,t.name??(t.file instanceof File?t.file.name:"upload")),t.name!==void 0&&n.append("name",t.name);const o=await this.http.postForm("/files",n);return{id:o.id,name:o.name,mediaType:o.media_type,size:o.size}}getFileUrl(t){return gd(this.opts.origin,`/files/${encodeURIComponent(t)}`)}async getFileBlob(t){return this.http.getBlob(`/files/${encodeURIComponent(t)}`)}async readHostFileContent(t){const n=await this.http.getBlob("/fs:content",{path:t},{maxBytes:Qv});if(n.size>Qv)throw new Zy({size:n.size,limit:Qv});const o=n.type,s=!oG(o),i=o||(s?"application/octet-stream":"text/plain");if(s){const l=await sG(n);return{path:t,content:l,encoding:"base64",mime:i,isBinary:!0,size:n.size}}const r=await n.text();return{path:t,content:r,encoding:"utf-8",mime:i,isBinary:!1,size:n.size}}connectEvents(t){const n=WW(this.opts.origin,this.opts.identity.clientId),o=this.opts.projectorFactory(),s=new JZ({wsUrl:n,clientId:this.opts.identity.clientId,tracer:this.tracer,credentialStore:this.opts.credentialStore,mainAgentOnly:this.opts.mainAgentOnly,handlers:{onWireEvent:i=>{const r=oU(i),l=sU(i),a=tU(i);a.type==="historyCompacted"&&!nb(a.reason)&&t.onResync(a.sessionId,a.beforeSeq),t.onEvent(a,{sessionId:r,seq:l})},onRawAgentEvent:i=>{const{type:r,seq:l,session_id:a,payload:c,offset:u}=i,d=o.project(r,c,a,{offset:u});for(const f of d){const h=c?.turnId,m=f.type==="assistantDelta"&&typeof h=="number"&&typeof u=="number"&&(r==="assistant.delta"||r==="thinking.delta")?{turnId:h,offset:u,kind:r==="assistant.delta"?"text":"thinking"}:void 0;f.type==="historyCompacted"&&!nb(f.reason)&&t.onResync(a,l),t.onEvent(f,{sessionId:a,seq:l,stream:m})}},onResync:(i,r,l)=>{o.reset(i),t.onResync(i,r,l)},onConnectionState:i=>{t.onConnectionChange(i)},onReplayComplete:()=>{t.onReplayComplete?.()},onError:(i,r,l)=>{t.onError(i,r,l)},onTerminalOutput:(i,r,l,a)=>{t.onTerminalOutput?.(i,r,l,a)},onTerminalExit:(i,r,l)=>{t.onTerminalExit?.(i,r,l)},onTranscriptReset:(i,r,l,a)=>{t.onTranscriptReset?.(i,r,l,a)},onTranscriptOps:(i,r,l,a)=>t.onTranscriptOps?.(i,r,l,a)??!0}});return s.connect(),{subscribe(i,r){s.subscribe(i,r??{seq:0})},unsubscribe(i){s.unsubscribe(i)},subscribeTranscript(i,r,l){s.subscribeTranscript(i,r,l)},unsubscribeTranscript(i,r){s.unsubscribeTranscript(i,r)},seedSnapshot(i,r){if(r.inFlightTurn===null){o.reset(i);return}const l=o.seedInFlight(i,r.inFlightTurn);for(const a of l)t.onEvent(a,{sessionId:i,seq:r.asOfSeq})},bindNextPromptId(i,r){o.bindNextPromptId(i,r)},abort(i,r){s.abort(i,r)},terminalAttach(i,r,l){s.terminalAttach(i,r,l)},terminalInput(i,r,l){s.terminalInput(i,r,l)},terminalResize(i,r,l,a){s.terminalResize(i,r,l,a)},terminalDetach(i,r){s.terminalDetach(i,r)},terminalClose(i,r){s.terminalClose(i,r)},markSideChannelAgent(i,r){s.markSideChannelAgent(i,r),o.markSideChannelAgent(r)},health(){return s.health()},reconnect(){s.reconnect()},close(){s.close()}}}}function t9(e){return{changed:e.changed.map(t=>({providerId:t.provider_id,providerName:t.provider_name,added:t.added,removed:t.removed})),unchanged:e.unchanged,failed:e.failed}}function oG(e){const t=e.toLowerCase().split(";")[0].trim();return t===""||t==="text/plain"||t.startsWith("text/")?!0:/(json|xml|javascript|typescript|x-yaml|yaml|svg|x-sh|x-python|markdown|csv|html|css)$/.test(t)}function sG(e){return new Promise((t,n)=>{const o=new FileReader;o.onload=()=>{const s=String(o.result);t(s.slice(s.indexOf(",")+1))},o.onerror=()=>n(o.error),o.readAsDataURL(e)})}const gT="kimiWeb.compaction",iG={t:e=>e},rG="kimiWeb.optimisticUserMessage",ob="Sub Agent";function d1(e,t,n=e.length){for(let o=0;o=0;s--){const i=o[s];if(i.role!=="assistant")continue;if(!i.content.some(c=>c.type==="thinking"&&c.startedAt!==void 0&&c.durationMs===void 0))return;const l=[...i.content];d1(l,n);const a=[...o];a[s]={...i,content:l},e.messagesBySession[t]=a;return}}function ib(e){const t=Date.parse(e);return Number.isNaN(t)?Date.now():t}function lG(){return{sessions:[],activeSessionId:void 0,messagesBySession:{},approvalsBySession:{},planReviewByToolCallId:{},questionsBySession:{},tasksBySession:{},goalBySession:{},goalVersionBySession:{},lastSeqBySession:{},turnActiveBySession:{},turnEndedPromptIdBySession:{},compactionBySession:{},warnings:[]}}function aG(e){return{...e,sessions:e.sessions,messagesBySession:{...e.messagesBySession},approvalsBySession:{...e.approvalsBySession},planReviewByToolCallId:{...e.planReviewByToolCallId},questionsBySession:{...e.questionsBySession},tasksBySession:{...e.tasksBySession},goalBySession:{...e.goalBySession},goalVersionBySession:{...e.goalVersionBySession},lastSeqBySession:{...e.lastSeqBySession},turnActiveBySession:{...e.turnActiveBySession},turnEndedPromptIdBySession:{...e.turnEndedPromptIdBySession},compactionBySession:{...e.compactionBySession},warnings:[...e.warnings]}}function cG(e,t,n){if(t!==void 0&&n!==void 0&&n>0){const o=e.lastSeqBySession[t]??0;n>o&&(e.lastSeqBySession[t]=n)}}function Ju(e,t){const n=new Date().toISOString();e.sessions=e.sessions.map(o=>o.id===t&&n>o.updatedAt?{...o,updatedAt:n}:o)}function Mc(e,t){return t.seq>(e.lastSeqBySession[t.sessionId]??0)}function rb(e){return e.role==="user"&&e.metadata?.[rG]===!0}function uG(e){const t=e.metadata?.origin;return t?.kind==="cron_job"||t?.kind==="cron_missed"}function dG(e){return e.metadata?.origin?.kind==="system_trigger"}function fG(e,t){const n=t.userMessageId??t.id;for(let s=e.length-1;s>=0;s--){const i=e[s];if(rb(i)&&i.userMessageId===n)return s}const o=t.promptId;if(o!==void 0)for(let s=e.length-1;s>=0;s--){const i=e[s];if(rb(i)&&i.promptId===o)return s}return-1}function pG(e,t,n){let o=!1;const s=e.map(i=>{let r=!1;const l=i.content.map(a=>a.type!=="toolUse"||a.toolCallId!==t?a:(r=!0,{...a,outputLines:[...a.outputLines??[],n]}));return r?(o=!0,{...i,content:l}):i});return o?s:e}const hG={"provider.connection_error":"connection","provider.auth_error":"auth","provider.rate_limit":"rateLimit","provider.overloaded":"overloaded","provider.filtered":"filtered","provider.api_error":"api","context.overflow":"contextOverflow"};function mG(e,t){const n=[],o=(r,l)=>{typeof l=="number"||typeof l=="boolean"?n.push({label:r,value:String(l)}):typeof l=="string"&&l.length>0&&n.push({label:r,value:l})};o(t("warnings.details.code"),e.code);const s=e.details??{};o(t("warnings.details.status"),s.statusCode),o(t("warnings.details.requestId"),s.requestId),o(t("warnings.details.errorName"),e.name);for(const[r,l]of Object.entries(s))r==="statusCode"||r==="requestId"||o(r,l);const i=(e.code!==void 0?hG[e.code]:void 0)??"title";return{severity:"error",title:t(`warnings.agentError.${i}`),message:e.message,details:n.length>0?n:void 0}}function gG(e,t,n,o=iG){const s=aG(e);switch(cG(s,n.sessionId,n.seq),t.type){case"sessionCreated":{s.sessions.some(r=>r.id===t.session.id)||(s.sessions=[t.session,...s.sessions]);break}case"sessionUpdated":{s.sessions=s.sessions.map(i=>i.id===t.session.id?t.session:i);break}case"sessionDeleted":{const i=t.sessionId;s.sessions=s.sessions.filter(r=>r.id!==i),delete s.messagesBySession[i],delete s.tasksBySession[i],delete s.goalBySession[i],delete s.approvalsBySession[i],delete s.questionsBySession[i],delete s.lastSeqBySession[i],delete s.turnActiveBySession[i],delete s.turnEndedPromptIdBySession[i],s.activeSessionId===i&&(s.activeSessionId=void 0);break}case"sessionWorkChanged":{let i;s.sessions=s.sessions.map(r=>r.id!==t.sessionId?r:(i=t.pendingInteraction??(t.busy?r.pendingInteraction:"none"),{...r,busy:t.busy,mainTurnActive:t.mainTurnActive??(t.busy?r.mainTurnActive:!1),pendingInteraction:i,lastTurnReason:t.lastTurnReason})),Mc(e,n)&&(i==="none"?(delete s.approvalsBySession[t.sessionId],delete s.questionsBySession[t.sessionId]):i==="question"&&delete s.approvalsBySession[t.sessionId]),t.mainTurnActive===!0?s.turnActiveBySession[t.sessionId]=!0:(t.mainTurnActive===!1||!t.busy)&&(e.turnActiveBySession[t.sessionId]&&Mc(e,n)&&Ju(s,t.sessionId),delete s.turnActiveBySession[t.sessionId]);break}case"sessionMetaUpdated":{s.sessions=s.sessions.map(i=>i.id===t.sessionId?{...i,title:t.title??i.title,lastPrompt:t.lastPrompt??i.lastPrompt}:i);break}case"sessionUsageUpdated":{s.sessions=s.sessions.map(i=>{if(i.id!==t.sessionId)return i;const r=t.model&&t.model.length>0?t.model:i.model;return{...i,usage:t.usage,model:r}});break}case"historyCompacted":break;case"compactionStarted":{s.compactionBySession={...s.compactionBySession,[t.sessionId]:{status:"running",trigger:t.trigger}};break}case"compactionCompleted":{const i=t.sessionId,r=s.compactionBySession[i],{[i]:l,...a}=s.compactionBySession;if(s.compactionBySession=a,Object.prototype.hasOwnProperty.call(s.messagesBySession,i)){const c=s.messagesBySession[i]??[],u=`compaction_${i}_${n.seq}`;if(!c.some(d=>d.id===u)){const d={trigger:r?.trigger??"auto",tokensBefore:t.tokensBefore,tokensAfter:t.tokensAfter};s.messagesBySession[i]=[...c,{id:u,sessionId:i,role:"assistant",content:t.summary?[{type:"text",text:t.summary}]:[],createdAt:new Date().toISOString(),metadata:{origin:{kind:"compaction_summary"},[gT]:d}}]}}break}case"compactionCancelled":{const{[t.sessionId]:i,...r}=s.compactionBySession;s.compactionBySession=r;break}case"messageCreated":{const i=t.message.sessionId,r=s.messagesBySession[i]??[];if(!r.some(a=>a.id===t.message.id)){if(t.message.role==="user"&&!uG(t.message)&&!dG(t.message)){const a=fG(r,t.message);if(a!==-1){const c=[...r],u=c[a];c[a]={...t.message,id:u.id,promptId:t.message.promptId??u.promptId,userMessageId:t.message.userMessageId??t.message.id,metadata:{...t.message.metadata,...u.metadata}},s.messagesBySession[i]=c;break}}s.messagesBySession[i]=[...r,t.message]}break}case"messageUpdated":{const i=t.sessionId,r=s.messagesBySession[i]??[];s.messagesBySession[i]=r.map(l=>{if(l.id!==t.messageId)return l;const a=t.content.map((u,d)=>{const f=l.content[d];return u.type==="thinking"&&f?.type==="thinking"?{...u,startedAt:f.startedAt,durationMs:f.durationMs}:u}),c=Date.now();return d1(a,c,a.length-1),(t.status!=="pending"||t.durationMs!==void 0)&&d1(a,c),{...l,content:a,durationMs:t.durationMs??l.durationMs}});break}case"assistantDelta":{const i=t.sessionId,r=s.messagesBySession[i]??[];s.messagesBySession[i]=r.map(l=>{if(l.id!==t.messageId)return l;const a=[...l.content],c=t.contentIndex,u=a.length<=c;for(;a.length<=c;)a.push({type:"text",text:""});const d=a[c];let f;return t.delta.text!==void 0?d.type==="text"&&!u?f={type:"text",text:d.text+t.delta.text}:(f={type:"text",text:t.delta.text},d1(a,Date.now(),c)):t.delta.thinking!==void 0?d.type==="thinking"?f={type:"thinking",thinking:d.thinking+t.delta.thinking,signature:d.signature,startedAt:d.startedAt,durationMs:d.durationMs}:(f={type:"thinking",thinking:t.delta.thinking,startedAt:new Date().toISOString()},d1(a,Date.now(),c)):f=d,a[c]=f,{...l,content:a}});break}case"toolOutput":{const i=t.sessionId,r=s.messagesBySession[i]??[];s.messagesBySession[i]=pG(r,t.toolCallId,t.outputChunk);break}case"approvalRequested":{const i=t.sessionId,r=s.approvalsBySession[i]??[];r.some(c=>c.approvalId===t.approval.approvalId)||(s.approvalsBySession[i]=[...r,t.approval],Mc(e,n)&&(sb(s,i,ib(t.approval.createdAt)),Ju(s,i)));const a=t.approval.display;a?.kind==="plan_review"&&typeof a.plan=="string"&&a.plan.length>0&&(s.planReviewByToolCallId={...s.planReviewByToolCallId,[t.approval.toolCallId]:{plan:a.plan,path:typeof a.path=="string"?a.path:void 0}});break}case"approvalResolved":case"approvalExpired":{const i=t.sessionId,r=t.approvalId,l=s.approvalsBySession[i]??[];s.approvalsBySession[i]=l.filter(a=>a.approvalId!==r);break}case"questionRequested":{const i=t.sessionId,r=s.questionsBySession[i]??[];r.some(a=>a.questionId===t.question.questionId)||(s.questionsBySession[i]=[...r,t.question],Mc(e,n)&&(sb(s,i,ib(t.question.createdAt)),Ju(s,i)));break}case"questionAnswered":case"questionDismissed":{const i=t.sessionId,r=t.questionId,l=s.questionsBySession[i]??[];s.questionsBySession[i]=l.filter(a=>a.questionId!==r);break}case"taskCreated":{const i=t.sessionId,r=s.tasksBySession[i]??[],l=r.findIndex(a=>a.id===t.task.id);if(l===-1)s.tasksBySession[i]=[...r,t.task];else{const a=[...r],c=r[l];a[l]={...t.task,outputLines:c.outputLines,text:c.text,description:t.task.description===ob&&c.description!==ob?c.description:t.task.description,swarmIndex:t.task.swarmIndex??c.swarmIndex,parentToolCallId:t.task.parentToolCallId??c.parentToolCallId,subagentType:t.task.subagentType??c.subagentType,runInBackground:t.task.runInBackground??c.runInBackground,backgroundTaskId:t.task.backgroundTaskId??c.backgroundTaskId,agentId:t.task.agentId??c.agentId},s.tasksBySession[i]=a}break}case"taskProgress":{const i=t.sessionId,r=s.tasksBySession[i]??[];s.tasksBySession[i]=r.map(l=>{if(l.id!==t.taskId)return l;if(l.kind==="subagent"&&t.kind==="text")return{...l,text:(l.text??"")+t.outputChunk};const a=l.outputLines??[];if(a.at(-1)===t.outputChunk)return l;const c=[...a,t.outputChunk];return{...l,outputLines:l.kind==="subagent"?c:c.slice(-40)}});break}case"taskCompleted":{const i=t.sessionId,r=s.tasksBySession[i]??[];s.tasksBySession[i]=r.map(l=>l.id!==t.taskId?l:{...l,status:t.status,outputPreview:t.outputPreview,outputBytes:t.outputBytes});break}case"goalUpdated":{const i=t.sessionId;s.goalVersionBySession[i]=(s.goalVersionBySession[i]??0)+1,t.goal===null||t.goal.status==="complete"?delete s.goalBySession[i]:s.goalBySession[i]=t.goal;break}case"configChanged":{s.config=t.config;break}case"modelCatalogChanged":break;case"agentDelta":case"agentTurnEnded":break;case"promptCompleted":{t.reason==="blocked"&&Mc(e,n)&&Ju(s,t.sessionId);break}case"promptAborted":{if(t.promptId===e.turnEndedPromptIdBySession[t.sessionId])break;Mc(e,n)&&Ju(s,t.sessionId);break}case"turnActiveChanged":{s.sessions=s.sessions.map(i=>i.id===t.sessionId?{...i,mainTurnActive:t.active}:i),t.active?(s.turnActiveBySession[t.sessionId]=!0,delete s.turnEndedPromptIdBySession[t.sessionId]):(delete s.turnActiveBySession[t.sessionId],t.promptId!==void 0&&(s.turnEndedPromptIdBySession[t.sessionId]=t.promptId),Mc(e,n)&&Ju(s,t.sessionId));break}case"unknown":{const i=t.raw;if(!(i&&i._noop===!0))if(i&&i._agentError)s.warnings=[...s.warnings,mG(i,o.t)];else if(i&&i._agentWarning){const r=i.message??i.code??o.t("warnings.agentWarningFallback");s.warnings=[...s.warnings,`${o.t("warnings.noteLabel")}: ${r}`]}else{const r=i?.type??"(unknown)";s.warnings=[...s.warnings,o.t("warnings.unhandledEvent",{type:r})]}break}}return s}function vG(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n"u"||!document.documentElement)return;document.documentElement.dataset.colorScheme=e;const t=document.querySelectorAll('meta[name="theme-color"]');if(t.length===0)return;const n=e==="dark"?Z0.dark:e==="light"?Z0.light:null;t.forEach(o=>{const i=(o.getAttribute("media")??"").includes("dark")?Z0.dark:Z0.light;o.setAttribute("content",n??i)})}function kT(e){return yG.includes(e)}function wG(e){return e<=13?"small":e<=15?"medium":e<=17?"large":"xlarge"}function _G(){const e=r3(i3);if(e==="xxlarge")return"xlarge";if(e!==null)return kT(e)?e:n9;const t=r3(lb);if(t===null)return n9;const n=Number(t),o=Number.isFinite(n)?wG(n):n9;return f8(i3,o),kG(lb),o}function xG(e){typeof document>"u"||!document.documentElement||(document.documentElement.dataset.fontScale=e)}const p8=K(bG()),h8=K(_G());let ab=!1;function SG(){ab||(ab=!0,Je(p8,CG,{immediate:!0}),Je(h8,xG,{immediate:!0}))}function AG(e){vT.includes(e)&&(p8.value=e,f8(yT,e))}function MG(e){kT(e)&&(h8.value=e,f8(i3,e))}function bT(){return SG(),{colorScheme:p8,fontScale:h8,setColorScheme:AG,setFontScale:MG}}const G0=K(!1);let cb=!1;function o9(){const e=document.documentElement.dataset.colorScheme;return e==="dark"?!0:e==="light"?!1:window.matchMedia("(prefers-color-scheme: dark)").matches}function o2(){return!cb&&typeof window<"u"&&typeof document<"u"&&(cb=!0,G0.value=o9(),new MutationObserver(()=>{G0.value=o9()}).observe(document.documentElement,{attributes:!0,attributeFilter:["data-color-scheme"]}),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>{G0.value=o9()})),G0}const TG=Symbol("KimiWebClientFacade"),EG="modulepreload",IG=function(e){return"/"+e},ub={},Po=function(t,n,o){let s=Promise.resolve();if(n&&n.length>0){let r=function(c){return Promise.all(c.map(u=>Promise.resolve(u).then(d=>({status:"fulfilled",value:d}),d=>({status:"rejected",reason:d}))))};document.getElementsByTagName("link");const l=document.querySelector("meta[property=csp-nonce]"),a=l?.nonce||l?.getAttribute("nonce");s=r(n.map(c=>{if(c=IG(c),c in ub)return;ub[c]=!0;const u=c.endsWith(".css"),d=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${d}`))return;const f=document.createElement("link");if(f.rel=u?"stylesheet":EG,u||(f.as="script"),f.crossOrigin="",f.href=c,a&&f.setAttribute("nonce",a),document.head.appendChild(f),u)return new Promise((h,m)=>{f.addEventListener("load",h),f.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${c}`)))})}))}function i(r){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=r,window.dispatchEvent(l),!l.defaultPrevented)throw r}return s.then(r=>{for(const l of r||[])l.status==="rejected"&&i(l.reason);return t().catch(i)})};async function Ps(e){const t=typeof navigator<"u"?navigator.clipboard:void 0;if(t&&typeof t.writeText=="function")try{return await t.writeText(e),!0}catch{}return LG(e)}function LG(e){if(typeof document>"u"||typeof document.execCommand!="function")return!1;const t=document.createElement("textarea");t.value=e,t.setAttribute("readonly",""),t.style.position="fixed",t.style.top="-9999px",t.style.left="-9999px",t.style.opacity="0",document.body.appendChild(t);let n=!1;try{t.focus(),t.select(),n=document.execCommand("copy")}catch{n=!1}finally{document.body.removeChild(t)}return n}const ln={permission:"kimi-web.permission",activeWorkspace:"kimi-active-workspace",planMode:"kimi-web.plan-mode",swarmMode:"kimi-web.swarm-mode",goalMode:"kimi-web.goal-mode",fontScale:"kimi-web.font-scale",starredModels:"kimi-web.starred-models",unread:"kimi-web.unread",onboarded:"kimi-web.onboarded",colorScheme:"kimi-web.color-scheme",hiddenWorkspaces:"kimi-web.hidden-workspaces",collapsedWorkspaces:"kimi-web.collapsed-workspaces",workspaceOrder:"kimi-web.workspace-order",pinnedSessions:"kimi-web.pinned-sessions",pinnedCollapsed:"kimi-web.pinned-collapsed",workspaceNameOverrides:"kimi-web.workspace-name-overrides",notifyEnabled:"kimi-web.notify-enabled",notifySound:"kimi-web.notify-sound",inputHistory:"kimi-web.input-history",locale:"kimi-locale",clientId:"kimi-web.client-id",debug:"kimi-web.debug",openInLastTarget:"kimi-web.open-in.last-target",sidebarCollapsed:"kimi-web.sidebar-collapsed",sidebarWidth:"kimi-web.sidebar-width",updateSkippedVersion:"kimi-web.update-skipped-version",codeFont:"kimi-web.code-font",contentAlign:"kimi-web.content-align",theme:"kimi-web.theme",thinking:"kimi-web.thinking",accent:"kimi-web.accent",notifyOnComplete:"kimi-web.notify-on-complete",notifyOnQuestion:"kimi-web.notify-on-question",notifyOnApproval:"kimi-web.notify-on-approval",soundOnComplete:"kimi-web.sound-on-complete"};function db(e){return`kimi-web.draft.${e&&e.length>0?e:"__new__"}`}function mi(e){try{return globalThis.localStorage.getItem(e)}catch{return null}}function Ds(e,t){try{globalThis.localStorage.setItem(e,t)}catch{}}function Qi(e){try{globalThis.localStorage.removeItem(e)}catch{}}function pf(e){const t=mi(e);if(t===null)return null;try{return JSON.parse(t)}catch{return null}}function Su(e,t){try{globalThis.localStorage.setItem(e,JSON.stringify(t))}catch{}}function m8(){const e=mi(ln.unread);if(!e)return{};try{const t=JSON.parse(e);if(!t||typeof t!="object")return{};const n={};for(const[o,s]of Object.entries(t))s===!0&&(n[o]=!0);return n}catch{return{}}}function g8(e){const n={...m8()};for(const[o,s]of Object.entries(e))s?n[o]=!0:delete n[o];Ds(ln.unread,JSON.stringify(n))}function $G(){const e=pf(ln.collapsedWorkspaces);return Array.isArray(e)?e.filter(t=>typeof t=="string"):[]}function s9(e){Su(ln.collapsedWorkspaces,Array.from(e))}function NG(){return pf(ln.pinnedCollapsed)===!0}function l3(e){Su(ln.pinnedCollapsed,e)}function OG(){const e=pf(ln.workspaceOrder);return Array.isArray(e)?e.filter(t=>typeof t=="string"):[]}function CT(e){Su(ln.workspaceOrder,Array.from(e))}function wT(){const e=pf(ln.pinnedSessions);return Array.isArray(e)?e.filter(t=>typeof t=="string"):[]}function hf(e){Su(ln.pinnedSessions,Array.from(e))}function Y0(){const e=pf(ln.workspaceNameOverrides);if(!e||typeof e!="object")return{};const t={};for(const[n,o]of Object.entries(e))typeof o=="string"&&(t[n]=o);return t}function fb(e){Su(ln.workspaceNameOverrides,e)}function FG(e,t){if(e.length===0)return null;const n=new Set(e),o=t.filter(i=>n.has(i)),s=e.filter(i=>!t.includes(i));return s.length===0&&o.length===t.length?null:[...s,...o]}function RG(e,t){const n=new Map(t.map((o,s)=>[o,s]));return e.toSorted((o,s)=>(n.get(o.id)??-1)-(n.get(s.id)??-1))}function _T(e,t,n,o="before"){const s=e.indexOf(t),i=e.indexOf(n);if(s===-1||i===-1||s===i)return e;const r=[...e];r.splice(s,1);const l=st.kind==="file"&&t.type==="")}function DG(e,t=PG){const n=[],o=new Set;for(const s of Array.from(e.dataTransfer?.items??[])){if(s.kind!=="file"||s.webkitGetAsEntry()?.isDirectory!==!0)continue;const i=s.getAsFile();if(!i)continue;const r=t(i);!r||o.has(r)||(o.add(r),n.push(r))}return n}const BG={"&":"&","<":"<",">":">",'"':""","'":"'"};function pb(e){return e.replace(/[&<>"']/g,t=>BG[t]??t)}function HG(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function zG(e,t,n=40){const o=e.replace(/\s+/g," ").trim();if(o.length===0)return"";const s=t.trim();if(s.length===0)return hb(o,n*2);const i=o.toLowerCase().indexOf(s.toLowerCase());if(i<0)return hb(o,n*2);const r=Math.max(0,i-n),l=Math.min(o.length,i+s.length+n),a=r>0,c=l`${i}`)}const WG={class:"sd-body"},UG={class:"sd-search"},jG=["aria-label"],VG=["aria-selected","onClick","onMousemove"],qG={class:"sd-meta"},KG=["innerHTML"],ZG={class:"sd-time"},GG=["innerHTML"],YG=["innerHTML"],XG={key:1,class:"sd-empty"},JG={class:"sd-foot","aria-hidden":"true"},QG={class:"sd-hint"},eY={class:"sd-hint"},tY={class:"sd-hint"},nY=200,oY=et({__name:"SearchSessionsDialog",props:{sessions:{},activeId:{}},emits:["select","close"],setup(e,{emit:t}){const{t:n}=$t(),o=e,s=t,i=K(!0),r=K(""),l=K(null),a=K(null),c=F(()=>{const A=r.value.trim().toLowerCase(),L=[];for(const S of o.sessions){const T=S.title??"",R=S.lastPrompt??"",B=S.workspaceName??"",I=A.length>0&&T.toLowerCase().includes(A),$=A.length>0&&R.toLowerCase().includes(A),D=A.length>0&&B.toLowerCase().includes(A);if(!(A.length>0&&!I&&!$&&!D)&&(L.push({session:S,inTitle:I,inWorkspace:D,snippetText:R?zG(R,r.value):""}),L.length>=nY))break}return L}),u=K(0);Je(r,()=>{u.value=0});function d(A){const L=c.value.length;return L===0?0:Math.max(0,Math.min(L-1,A))}async function f(){await bt(),a.value?.querySelector('[aria-selected="true"]')?.scrollIntoView({block:"nearest"})}function h(A){u.value=d(u.value+A),f()}function m(A){s("select",A),s("close")}function g(){r.value="",l.value?.focus()}function b(){const A=c.value[u.value];A&&m(A.session.id)}function _(){return l.value?.el??null}const{handleCompositionStart:v,handleCompositionEnd:y,isComposingKeyEvent:w}=_r();function x(A){if(w(A)){A.key==="Escape"&&A.stopPropagation();return}A.key==="ArrowDown"?(A.preventDefault(),h(1)):A.key==="ArrowUp"?(A.preventDefault(),h(-1)):A.key==="Enter"&&(A.preventDefault(),b())}return cn(()=>{l.value?.focus()}),(A,L)=>(k(),me(p(sa),{open:i.value,"onUpdate:open":L[1]||(L[1]=S=>i.value=S),title:p(n)("sidebar.searchPlaceholder"),size:"lg",height:"fixed",padded:!1,"initial-focus":_,onClose:L[2]||(L[2]=S=>s("close"))},{default:be(()=>[C("div",WG,[C("div",UG,[q(p(Os),{ref_key:"inputRef",ref:l,modelValue:r.value,"onUpdate:modelValue":L[0]||(L[0]=S=>r.value=S),placeholder:p(n)("sidebar.searchPlaceholder"),autocomplete:"off",spellcheck:"false",onKeydown:x,onCompositionstart:p(v),onCompositionend:p(y)},null,8,["modelValue","placeholder","onCompositionstart","onCompositionend"]),C("button",{type:"button",class:Fe(["search-clear",{"is-on":r.value.length>0}]),tabindex:"-1","aria-label":p(n)("sidebar.searchClear"),onClick:g},[q(p(Me),{name:"close",size:"sm"})],10,jG)]),C("div",{ref_key:"listRef",ref:a,class:"sd-list",role:"listbox"},[c.value.length>0?(k(!0),M(De,{key:0},vt(c.value,(S,T)=>(k(),M("button",{key:S.session.id,class:Fe(["sd-row",{on:T===u.value,active:S.session.id===e.activeId}]),role:"option","aria-selected":T===u.value,onClick:R=>m(S.session.id),onMousemove:R=>u.value=T},[C("span",qG,[q(p(Me),{class:"sd-folder",name:"folder-closed",size:"sm"}),C("span",{class:"sd-ws",innerHTML:p(r9)(S.session.workspaceName??S.session.workspaceId??"",S.inWorkspace?r.value:"")},null,8,KG),C("span",ZG,N(S.session.time),1)]),C("span",{class:"sd-title",innerHTML:p(r9)(S.session.title,S.inTitle?r.value:"")},null,8,GG),S.snippetText?(k(),M("span",{key:0,class:"sd-snippet",innerHTML:p(r9)(S.snippetText,r.value)},null,8,YG)):te("",!0)],42,VG))),128)):(k(),M("div",XG,[q(p(nW),{title:r.value.trim()?p(n)("sidebar.searchNoResults"):p(n)("sidebar.searchEmpty")},{icon:be(()=>[q(p(Me),{name:"search",size:"lg"})]),_:1},8,["title"])]))],512),C("div",JG,[C("span",QG,[q(p(Yl),{keys:["↑","↓"]}),Ve(N(p(n)("sidebar.searchHintSelect")),1)]),L[3]||(L[3]=C("span",{class:"sd-dot"},"·",-1)),C("span",eY,[q(p(Yl),{keys:["Enter"]}),Ve(N(p(n)("sidebar.searchHintOpen")),1)]),L[4]||(L[4]=C("span",{class:"sd-dot"},"·",-1)),C("span",tY,[q(p(Yl),{keys:["Esc"]}),Ve(N(p(n)("sidebar.searchHintClose")),1)])])])]),_:1},8,["open","title"]))}}),sY=mt(oY,[["__scopeId","data-v-99adf152"]]);var iY=Object.create,v8=Object.defineProperty,rY=Object.getOwnPropertyDescriptor,ST=Object.getOwnPropertyNames,lY=Object.getPrototypeOf,aY=Object.prototype.hasOwnProperty,AT=(e,t)=>function(){return t||(0,e[ST(e)[0]])((t={exports:{}}).exports,t),t.exports},MT=e=>{let t={};for(var n in e)v8(t,n,{get:e[n],enumerable:!0});return t},cY=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(var s=ST(t),i=0,r=s.length,l;it[a]).bind(null,l),enumerable:!(o=rY(t,l))||o.enumerable});return e},TT=(e,t,n)=>(n=e!=null?iY(lY(e)):{},cY(v8(n,"default",{value:e,enumerable:!0}),e));function uY(e,t,n,o){const s=Number(e[t].meta.id+1).toString();let i="";return typeof o.docId=="string"&&(i=`-${o.docId}-`),i+s}function dY(e,t){let n=Number(e[t].meta.id+1).toString();return e[t].meta.subId>0&&(n+=`:${e[t].meta.subId}`),`[${n}]`}function fY(e,t,n,o,s){const i=s.rules.footnote_anchor_name(e,t,n,o,s),r=s.rules.footnote_caption(e,t,n,o,s);let l=i;return e[t].meta.subId>0&&(l+=`:${e[t].meta.subId}`),`${r}`}function pY(e,t,n){return(n.xhtmlOut?`
-`:`
-`)+`
-
    -`}function hY(){return`
-
-`}function mY(e,t,n,o,s){let i=s.rules.footnote_anchor_name(e,t,n,o,s);return e[t].meta.subId>0&&(i+=`:${e[t].meta.subId}`),`
  • `}function gY(){return`
  • -`}function vY(e,t,n,o,s){let i=s.rules.footnote_anchor_name(e,t,n,o,s);return e[t].meta.subId>0&&(i+=`:${e[t].meta.subId}`),` ↩︎`}function yY(e){const t=e.helpers.parseLinkLabel,n=e.utils.isSpace;e.renderer.rules.footnote_ref=fY,e.renderer.rules.footnote_block_open=pY,e.renderer.rules.footnote_block_close=hY,e.renderer.rules.footnote_open=mY,e.renderer.rules.footnote_close=gY,e.renderer.rules.footnote_anchor=vY,e.renderer.rules.footnote_caption=dY,e.renderer.rules.footnote_anchor_name=uY;function o(l,a,c,u){const d=l.bMarks[a]+l.tShift[a],f=l.eMarks[a];if(d+4>f||l.src.charCodeAt(d)!==91||l.src.charCodeAt(d+1)!==94)return!1;let h;for(h=d+2;h=f||l.src.charCodeAt(++h)!==58)return!1;if(u)return!0;h++,l.env.footnotes||(l.env.footnotes={}),l.env.footnotes.refs||(l.env.footnotes.refs={});const m=l.src.slice(d+2,h-2);l.env.footnotes.refs[`:${m}`]=-1;const g=new l.Token("footnote_reference_open","",1);g.meta={label:m},g.level=l.level++,l.tokens.push(g);const b=l.bMarks[a],_=l.tShift[a],v=l.sCount[a],y=l.parentType,w=h,x=l.sCount[a]+h-(l.bMarks[a]+l.tShift[a]);let A=x;for(;h=c||l.src.charCodeAt(u)!==94||l.src.charCodeAt(u+1)!==91)return!1;const d=u+2,f=t(l,u+1);if(f<0)return!1;if(!a){l.env.footnotes||(l.env.footnotes={}),l.env.footnotes.list||(l.env.footnotes.list=[]);const h=l.env.footnotes.list.length,m=[];l.md.inline.parse(l.src.slice(d,f),l.md,l.env,m);const g=l.push("footnote_ref","",0);g.meta={id:h},l.env.footnotes.list[h]={content:l.src.slice(d,f),tokens:m}}return l.pos=f+1,l.posMax=c,!0}function i(l,a){const c=l.posMax,u=l.pos;if(u+3>c||!l.env.footnotes||!l.env.footnotes.refs||l.src.charCodeAt(u)!==91||l.src.charCodeAt(u+1)!==94)return!1;let d;for(d=u+2;d=c)return!1;d++;const f=l.src.slice(u+2,d-1);if(typeof l.env.footnotes.refs[`:${f}`]>"u")return!1;if(!a){l.env.footnotes.list||(l.env.footnotes.list=[]);let h;l.env.footnotes.refs[`:${f}`]<0?(h=l.env.footnotes.list.length,l.env.footnotes.list[h]={label:f,count:0},l.env.footnotes.refs[`:${f}`]=h):h=l.env.footnotes.refs[`:${f}`];const m=l.env.footnotes.list[h].count;l.env.footnotes.list[h].count++;const g=l.push("footnote_ref","",0);g.meta={id:h,subId:m,label:f}}return l.pos=d,l.posMax=c,!0}function r(l){let a,c,u,d=!1;const f={};if(!l.env.footnotes||(l.tokens=l.tokens.filter(function(m){return m.type==="footnote_reference_open"?(d=!0,c=[],u=m.meta.label,!1):m.type==="footnote_reference_close"?(d=!1,f[":"+u]=c,!1):(d&&c.push(m),!d)}),!l.env.footnotes.list))return;const h=l.env.footnotes.list;l.tokens.push(new l.Token("footnote_block_open","",1));for(let m=0,g=h.length;m0?h[m].count:1;for(let y=0;y?@[\]^_`{|}~-])/g;function wY(e,t){const n=e.posMax,o=e.pos;if(e.src.charCodeAt(o)!==126||t||o+2>=n)return!1;e.pos=o+1;let s=!1;for(;e.pos?@[\]^_`{|}~-])/g;function SY(e,t){const n=e.posMax,o=e.pos;if(e.src.charCodeAt(o)!==94||t||o+2>=n)return!1;e.pos=o+1;let s=!1;for(;e.pos{t.exports=function(g,b){b=Object.assign({},{disabled:!0,divWrap:!1,divClass:"checkbox",idPrefix:"cbx_",ulClass:"task-list",liClass:"task-list-item"},b),g.core.ruler.after("inline","github-task-lists",function(_){for(var v=_.tokens,y=0,w=2;w=0;v--)if(g[v].level===_)return v;return-1}function s(g,b){return d(g[b])&&f(g[b-1])&&h(g[b-2])&&m(g[b])}function i(g,b,_,v){var y=_.idPrefix+b;g.children[0].content=g.children[0].content.slice(3),g.children.unshift(l(y,v)),g.children.push(a(v)),g.children.unshift(r(g,y,_,v)),_.divWrap&&(g.children.unshift(c(_,v)),g.children.push(u(v)))}function r(g,b,_,v){var y=new v("checkbox_input","input",0);return y.attrs=[["type","checkbox"],["id",b]],/^\[[xX]\][ \u00A0]/.test(g.content)===!0&&y.attrs.push(["checked","true"]),_.disabled===!0&&y.attrs.push(["disabled","true"]),y}function l(g,b){var _=new b("label_open","label",1);return _.attrs=[["for",g]],_}function a(g){return new g("label_close","label",-1)}function c(g,b){var _=new b("checkbox_open","div",0);return _.attrs=[["class",g.divClass]],_}function u(g){return new g("checkbox_close","div",-1)}function d(g){return g.type==="inline"}function f(g){return g.type==="paragraph_open"}function h(g){return g.type==="list_item_open"}function m(g){return/^\[[xX \u00A0]\][ \u00A0]/.test(g.content)}})}),TY=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),EY=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0))),l9;const IY=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),LY=(l9=String.fromCodePoint)!==null&&l9!==void 0?l9:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function $Y(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=IY.get(e))!==null&&t!==void 0?t:e}var Ss;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(Ss||(Ss={}));const NY=32;var Oa;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Oa||(Oa={}));function a3(e){return e>=Ss.ZERO&&e<=Ss.NINE}function OY(e){return e>=Ss.UPPER_A&&e<=Ss.UPPER_F||e>=Ss.LOWER_A&&e<=Ss.LOWER_F}function FY(e){return e>=Ss.UPPER_A&&e<=Ss.UPPER_Z||e>=Ss.LOWER_A&&e<=Ss.LOWER_Z||a3(e)}function RY(e){return e===Ss.EQUALS||FY(e)}var Cs;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(Cs||(Cs={}));var Ia;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Ia||(Ia={}));var PY=class{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=Cs.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Ia.Strict}startEntity(e){this.decodeMode=e,this.state=Cs.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case Cs.EntityStart:return e.charCodeAt(t)===Ss.NUM?(this.state=Cs.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=Cs.NamedEntity,this.stateNamedEntity(e,t));case Cs.NumericStart:return this.stateNumericStart(e,t);case Cs.NumericDecimal:return this.stateNumericDecimal(e,t);case Cs.NumericHex:return this.stateNumericHex(e,t);case Cs.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|NY)===Ss.LOWER_X?(this.state=Cs.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=Cs.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,n,o){if(t!==n){const s=n-t;this.result=this.result*Math.pow(o,s)+parseInt(e.substr(t,s),o),this.consumed+=s}}stateNumericHex(e,t){const n=t;for(;t>14;for(;t>14,s!==0){if(i===Ss.SEMI)return this.emitNamedEntityData(this.treeIndex,s,this.consumed+this.excess);this.decodeMode!==Ia.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;const{result:t,decodeTree:n}=this,o=(n[t]&Oa.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,o,this.consumed),(e=this.errors)===null||e===void 0||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){const{decodeTree:o}=this;return this.emitCodePoint(t===1?o[e]&~Oa.VALUE_LENGTH:o[e+1],n),t===3&&this.emitCodePoint(o[e+2],n),n}end(){var e;switch(this.state){case Cs.NamedEntity:return this.result!==0&&(this.decodeMode!==Ia.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Cs.NumericDecimal:return this.emitNumericEntity(0,2);case Cs.NumericHex:return this.emitNumericEntity(0,3);case Cs.NumericStart:return(e=this.errors)===null||e===void 0||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Cs.EntityStart:return 0}}};function ET(e){let t="";const n=new PY(e,o=>t+=LY(o));return function(s,i){let r=0,l=0;for(;(l=s.indexOf("&",l))>=0;){t+=s.slice(r,l),n.startEntity(i);const c=n.write(s,l+1);if(c<0){r=l+n.end();break}r=l+c,l=c===0?r+1:r}const a=t+s.slice(r);return t="",a}}function DY(e,t,n,o){const s=(t&Oa.BRANCH_LENGTH)>>7,i=t&Oa.JUMP_TABLE;if(s===0)return i!==0&&o===i?n:-1;if(i){const a=o-i;return a<0||a>=s?-1:e[n+a]-1}let r=n,l=r+s-1;for(;r<=l;){const a=r+l>>>1,c=e[a];if(co)l=a-1;else return e[a+s]}return-1}const BY=ET(TY);ET(EY);function y8(e,t=Ia.Legacy){return BY(e,t)}var HY=TT(MY());const mb={};function zY(e){let t=mb[e];if(t)return t;t=mb[e]=[];for(let n=0;n<128;n++){const o=String.fromCharCode(n);t.push(o)}for(let n=0;n=55296&&u<=57343?s+="���":s+=String.fromCharCode(u),i+=6;continue}}if((l&248)===240&&i+91114111?s+="����":(d-=65536,s+=String.fromCharCode(55296+(d>>10),56320+(d&1023))),i+=9;continue}}s+="�"}return s})}s2.defaultChars=";/?:@&=+$,#";s2.componentChars="";var c3=s2;const gb={};function WY(e){let t=gb[e];if(t)return t;t=gb[e]=[];for(let n=0;n<128;n++){const o=String.fromCharCode(n);/^[0-9a-z]$/i.test(o)?t.push(o):t.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2))}for(let n=0;n"u"&&(n=!0);const o=WY(t);let s="";for(let i=0,r=e.length;i=55296&&l<=57343){if(l>=55296&&l<=56319&&i+1=56320&&a<=57343){s+=encodeURIComponent(e[i]+e[i+1]),i++;continue}}s+="%EF%BF%BD";continue}s+=encodeURIComponent(e[i])}return s}i2.defaultChars=";/?:@&=+$,-_.!~*'()#";i2.componentChars="-_.!~*'()";var IT=i2;function k8(e){let t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&e.hostname.indexOf(":")!==-1?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||"",t}function Em(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}const UY=/^([a-z0-9.+-]+:)/i,jY=/:[0-9]*$/,VY=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,qY=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r",` -`," "]),KY=["'"].concat(qY),vb=["%","/","?",";","#"].concat(KY),yb=["/","?","#"],ZY=255,kb=/^[+a-z0-9A-Z_-]{0,63}$/,GY=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,bb={javascript:!0,"javascript:":!0},Cb={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function YY(e,t){if(e&&e instanceof Em)return e;const n=new Em;return n.parse(e,t),n}Em.prototype.parse=function(e,t){let n,o,s,i=e;if(i=i.trim(),!t&&e.split("#").length===1){const c=VY.exec(i);if(c)return this.pathname=c[1],c[2]&&(this.search=c[2]),this}let r=UY.exec(i);if(r&&(r=r[0],n=r.toLowerCase(),this.protocol=r,i=i.substr(r.length)),(t||r||i.match(/^\/\/[^@\/]+@[^@\/]+/))&&(s=i.substr(0,2)==="//",s&&!(r&&bb[r])&&(i=i.substr(2),this.slashes=!0)),!bb[r]&&(s||r&&!Cb[r])){let c=-1;for(let m=0;m127?v+="x":v+=_[y];if(!v.match(kb)){const y=m.slice(0,g),w=m.slice(g+1),x=_.match(GY);x&&(y.push(x[1]),w.unshift(x[2])),w.length&&(i=w.join(".")+i),this.hostname=y.join(".");break}}}}this.hostname.length>ZY&&(this.hostname=""),h&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const l=i.indexOf("#");l!==-1&&(this.hash=i.substr(l),i=i.slice(0,l));const a=i.indexOf("?");return a!==-1&&(this.search=i.substr(a),i=i.slice(0,a)),i&&(this.pathname=i),Cb[n]&&this.hostname&&!this.pathname&&(this.pathname=""),this};Em.prototype.parseHost=function(e){let t=jY.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};var b8=YY,LT=MT({decode:()=>c3,encode:()=>IT,format:()=>k8,parse:()=>b8}),$T=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,NT=/[\0-\x1F\x7F-\x9F]/,XY=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,OT=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,JY=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/,FT=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,QY=MT({Any:()=>$T,Cc:()=>NT,Cf:()=>XY,P:()=>OT,S:()=>JY,Z:()=>FT}),eX=Object.defineProperty,RT=e=>{let t={};for(var n in e)eX(t,n,{get:e[n],enumerable:!0});return t},hs=class{type;tag;attrs;map;nesting;level;children;content;markup;info;meta;block;hidden;constructor(e,t,n){this.type=e,this.tag=t,this.attrs=null,this.map=null,this.nesting=n,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}attrIndex(e){if(!this.attrs)return-1;const t=this.attrs;for(let n=0,o=t.length;n=0&&(n=this.attrs[t][1]),n}attrJoin(e,t){const n=this.attrIndex(e);n<0?this.attrPush([e,t]):this.attrs[n][1]=`${this.attrs[n][1]} ${t}`}},tX=RT({arrayReplaceAt:()=>aX,assign:()=>rX,countLines:()=>Oo,escapeHtml:()=>vX,escapeRE:()=>kX,fromCodePoint:()=>pp,has:()=>iX,isMdAsciiPunct:()=>$m,isPunctChar:()=>Lm,isPunctCode:()=>u3,isSpace:()=>lX,isString:()=>oX,isValidEntityCode:()=>l2,isWhiteSpace:()=>fp,lib:()=>bX,mdurl:()=>LT,normalizeReference:()=>r2,ucmicro:()=>Im,unescapeAll:()=>hp,unescapeMd:()=>fX});const Im=QY;function nX(e){return Object.prototype.toString.call(e)}function oX(e){return nX(e)==="[object String]"}const sX=Object.prototype.hasOwnProperty;function iX(e,t){return sX.call(e,t)}function rX(e,...t){return t.forEach(n=>{if(n){if(typeof n!="object")throw new TypeError(`${String(n)}must be object`);Object.keys(n).forEach(o=>{e[o]=n[o]})}}),e}function lX(e){return e===9||e===32}function fp(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function Lm(e){return Im.P.test(e)||Im.S.test(e)}const wb=new Map;function u3(e){if($m(e))return!0;if(e>=0&&e<128)return!1;const t=wb.get(e);if(t!==void 0)return t;const n=Lm(String.fromCharCode(e));return wb.set(e,n),n}function $m(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function r2(e){return e=e.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}function aX(e,t,n){return[...e.slice(0,t),...n,...e.slice(t+1)]}function l2(e){return!(e>=55296&&e<=57343||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534||e>=0&&e<=8||e===11||e>=14&&e<=31||e>=127&&e<=159||e>1114111)}function pp(e){if(e>65535){e-=65536;const t=55296+(e>>10),n=56320+(e&1023);return String.fromCharCode(t,n)}return String.fromCharCode(e)}const PT=/\\([!"#$%&'()*+,\-\./:;<=>?@[\\\]^_`{|}~])/g,cX=new RegExp(`${PT.source}|${/&([a-z#][a-z0-9]{1,31});/gi.source}`,"gi"),uX=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function dX(e,t){if(t.charCodeAt(0)===35&&uX.test(t)){const o=t[1].toLowerCase()==="x"?Number.parseInt(t.slice(2),16):Number.parseInt(t.slice(1),10);return l2(o)?pp(o):e}const n=y8(e);return n!==e?n:e}function fX(e){return e.includes("\\")?e.replace(PT,"$1"):e}function hp(e){return!e.includes("\\")&&!e.includes("&")?e:e.replace(cX,(t,n,o)=>n||dX(t,o))}const pX=/[&<>"]/,hX=/[&<>"]/g,mX={"&":"&","<":"<",">":">",'"':"""};function gX(e){return mX[e]}function vX(e){return pX.test(e)?e.replace(hX,gX):e}const yX=/[.?*+^$[\]\\(){}|-]/g;function kX(e){return e.replace(yX,"\\$&")}const bX={mdurl:LT,ucmicro:Im};function Oo(e){if(e.length===0)return 0;let t=0,n=-1;for(;(n=e.indexOf(` -`,n+1))!==-1;)t++;return t}const CX=/(?:^|\n)[ \t]{0,3}\[\^[^\]\n]+\]:/m,wX=/(?:^|\n)[ \t]{0,3}\*\[[^\]\n]+\]:/m,_X=/(?:^|\n)[ \t]{0,3}\[(?!\^)(?:\\[\s\S]|[^\]\\[])+\][ \t]*:/m,C8=["references","footnotes","abbreviations","abbr","abbrs"],w8=Symbol.for("markdown-it-ts.global-state"),_8=Object.prototype.hasOwnProperty;function _b(e){return e==="reference-definition"||e==="footnote-definition"||e==="abbreviation-definition"}function Br(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function Ha(e){if(Array.isArray(e))return e.map(t=>Ha(t));if(Br(e)){const t={};for(const n of Object.keys(e))t[n]=Ha(e[n]);return t}return e}function Nm(e){return Array.isArray(e)?e.map((t,n)=>String(n)):Br(e)?Object.keys(e):[]}function d3(e,t){if(Array.isArray(e)||Array.isArray(t)){if(!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length)return!1;for(let n=0;ni.has(r)?!d3(s[r],DT(o.value,r)):!0)}}function ta(e){const t=x8(e);if(t){for(const n of C8){const o=t.snapshot[n];if(!o){delete e[n];continue}if(o.ownedKeys){SX(e,n,o);continue}o.existed?e[n]=xX(e[n],o.value):delete e[n]}delete e[w8]}}function a9(e){return{area:e,attempted:!0,matched:!1,attemptMs:0,blocks:0,headings:0,paragraphs:0,lists:0,fences:0,paragraphCacheHits:0,paragraphCacheMisses:0,paragraphCacheBypasses:0,listCacheHits:0,listCacheMisses:0,fenceCacheHits:0,fenceCacheMisses:0}}const f3=Symbol.for("markdown-it-ts.diagnostics");function Fp(e,t){if(e)try{const n=e[f3];if(n&&typeof n=="object")return n;if(!t)return;const o={};return e[f3]=o,o}catch{return}}function Dl(e){return Fp(e,!1)}function MX(e){if(e)try{const t=e[f3];t&&typeof t=="object"&&(delete t.strategy,delete t.chunk,delete t.unbounded,delete t.editable,delete t.stockFast)}catch{}}function oi(e){MX(e)}function Zf(e,t){const n=Fp(e,!0);n&&(n.stockFast=t)}function Qo(e,t){const n=Fp(e,!0);n&&(n.strategy=t)}function c9(e,t){const n=Fp(e,!0);n&&(n.chunk=t)}function BT(e,t){const n=Fp(e,!0);n&&(n.unbounded=t)}function TX(e){const t={};e=e||{},t.src_Any=$T.source,t.src_Cc=NT.source,t.src_Z=FT.source,t.src_P=OT.source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");const n="[><|]";return t.src_pseudo_letter=`(?:(?!${n}|${t.src_ZPCc})${t.src_Any})`,t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth=`(?:(?:(?!${t.src_ZCc}|[@/\\[\\]()]).){1,50}@)?`,t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator=`(?=$|${n}|${t.src_ZPCc})(?!${e["---"]?"-(?!--)|":"-|"}_|:\\d|\\.-|\\.(?!$|${t.src_ZPCc}))`,t.src_path=`(?:[/?#](?:(?!${t.src_ZCc}|${n}|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!${t.src_ZCc}|\\]).)*\\]|\\((?:(?!${t.src_ZCc}|[)]).)*\\)|\\{(?:(?!${t.src_ZCc}|[}]).)*\\}|\\"(?:(?!${t.src_ZCc}|["]).)+\\"|\\'(?:(?!${t.src_ZCc}|[']).)+\\'|\\'(?=${t.src_pseudo_letter}|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!${t.src_ZCc}|[.]|$)|`+(e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+`,(?!${t.src_ZCc}|$)|;(?!${t.src_ZCc}|$)|\\!+(?!${t.src_ZCc}|[!]|$)|\\?(?!${t.src_ZCc}|[?]|$))+|\\/)?`,t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]{0,63}',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+`|${t.src_pseudo_letter}{1,63})`,t.src_domain="(?:"+t.src_xn+`|(?:${t.src_pseudo_letter})|(?:${t.src_pseudo_letter}(?:-|${t.src_pseudo_letter}){0,61}${t.src_pseudo_letter}))`,t.src_host=`(?:(?:(?:(?:${t.src_domain})\\.)*${t.src_domain}))`,t.tpl_host_fuzzy="(?:"+t.src_ip4+`|(?:(?:(?:${t.src_domain})\\.)+(?:%TLDS%)))`,t.tpl_host_no_ip_fuzzy=`(?:(?:(?:${t.src_domain})\\.)+(?:%TLDS%))`,t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test=`localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:${t.src_ZPCc}|>|$))`,t.tpl_email_fuzzy=`(^|${n}|"|\\(|${t.src_ZCc})(${t.src_email_name}@${t.tpl_host_fuzzy_strict})`,t.tpl_link_fuzzy=`(^|(?![.:/\\-_@])(?:[$+<=>^\`||]|${t.src_ZPCc}))((?![$+<=>^\`||])${t.tpl_host_port_fuzzy_strict}${t.src_path})`,t.tpl_link_no_ip_fuzzy=`(^|(?![.:/\\-_@])(?:[$+<=>^\`||]|${t.src_ZPCc}))((?![$+<=>^\`||])${t.tpl_host_port_no_ip_fuzzy_strict}${t.src_path})`,t}function p3(e){return Array.prototype.slice.call(arguments,1).forEach(function(t){t&&Object.keys(t).forEach(function(n){e[n]=t[n]})}),e}function a2(e){return Object.prototype.toString.call(e)}function EX(e){return a2(e)==="[object String]"}function IX(e){return a2(e)==="[object Object]"}function LX(e){return a2(e)==="[object RegExp]"}function xb(e){return a2(e)==="[object Function]"}function $X(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const HT={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function NX(e){return Object.keys(e||{}).reduce(function(t,n){return t||HT.hasOwnProperty(n)},!1)}const OX={"http:":{validate:function(e,t,n){const o=e.slice(t);return n.re.http||(n.re.http=new RegExp(`^\\/\\/${n.re.src_auth}${n.re.src_host_port_strict}${n.re.src_path}`,"i")),n.re.http.test(o)?o.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){const o=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+`(?:localhost|(?:(?:${n.re.src_domain})\\.)+${n.re.src_domain_root})`+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(o)?t>=3&&e[t-3]===":"||t>=3&&e[t-3]==="/"?0:o.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){const o=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp(`^${n.re.src_email_name}@${n.re.src_host_strict}`,"i")),n.re.mailto.test(o)?o.match(n.re.mailto)[0].length:0}}},FX="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",RX="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function PX(e){return function(t,n){const o=t.slice(n);return e.test(o)?o.match(e)[0].length:0}}function Sb(){return function(e,t){t.normalize(e)}}function Om(e){const t=e.re=TX(e.__opts__),n=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||n.push(FX),n.push(t.src_xn),t.src_tlds=n.join("|");function o(l){return l.replace("%TLDS%",t.src_tlds)}t.email_fuzzy=RegExp(o(t.tpl_email_fuzzy),"i"),t.email_fuzzy_global=RegExp(o(t.tpl_email_fuzzy),"ig"),t.link_fuzzy=RegExp(o(t.tpl_link_fuzzy),"i"),t.link_fuzzy_global=RegExp(o(t.tpl_link_fuzzy),"ig"),t.link_no_ip_fuzzy=RegExp(o(t.tpl_link_no_ip_fuzzy),"i"),t.link_no_ip_fuzzy_global=RegExp(o(t.tpl_link_no_ip_fuzzy),"ig"),t.host_fuzzy_test=RegExp(o(t.tpl_host_fuzzy_test),"i");const s=[];e.__compiled__={};function i(l,a){throw new Error(`(LinkifyIt) Invalid schema "${l}": ${a}`)}Object.keys(e.__schemas__).forEach(function(l){const a=e.__schemas__[l];if(a===null)return;const c={validate:null,link:null};if(e.__compiled__[l]=c,IX(a)){LX(a.validate)?c.validate=PX(a.validate):xb(a.validate)?c.validate=a.validate:i(l,a),xb(a.normalize)?c.normalize=a.normalize:a.normalize?i(l,a):c.normalize=Sb();return}if(EX(a)){s.push(l);return}i(l,a)}),s.forEach(function(l){e.__compiled__[e.__schemas__[l]]&&(e.__compiled__[l].validate=e.__compiled__[e.__schemas__[l]].validate,e.__compiled__[l].normalize=e.__compiled__[e.__schemas__[l]].normalize)}),e.__compiled__[""]={validate:null,normalize:Sb()};const r=Object.keys(e.__compiled__).filter(function(l){return l.length>0&&e.__compiled__[l]}).map($X).join("|");e.re.schema_test=RegExp(`(^|(?!_)(?:[><|]|${t.src_ZPCc}))(${r})`,"i"),e.re.schema_search=RegExp(`(^|(?!_)(?:[><|]|${t.src_ZPCc}))(${r})`,"ig"),e.re.schema_at_start=RegExp(`^${e.re.schema_search.source}`,"i"),e.re.pretest=RegExp(`(${e.re.schema_test.source})|(${e.re.host_fuzzy_test.source})|@`,"i")}function zT(e,t,n,o){const s=e.slice(n,o);this.schema=t.toLowerCase(),this.index=n,this.lastIndex=o,this.raw=s,this.text=s,this.url=s}function er(e,t){if(!(this instanceof er))return new er(e,t);t||NX(e)&&(t=e,e={}),this.__opts__=p3({},HT,t),this.__schemas__=p3({},OX,e),this.__compiled__={},this.__tlds__=RX,this.__tlds_replaced__=!1,this.re={},Om(this)}er.prototype.add=function(t,n){return this.__schemas__[t]=n,Om(this),this};er.prototype.set=function(t){return this.__opts__=p3(this.__opts__,t),this};er.prototype.test=function(t){if(!t.length)return!1;let n,o;if(this.re.schema_test.test(t)){for(o=this.re.schema_search,o.lastIndex=0;(n=o.exec(t))!==null;)if(this.testSchemaAt(t,n[2],o.lastIndex))return!0}return!!(this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&t.search(this.re.host_fuzzy_test)>=0&&t.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy)!==null||this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&t.indexOf("@")>=0&&t.match(this.re.email_fuzzy)!==null)};er.prototype.pretest=function(t){return this.re.pretest.test(t)};er.prototype.testSchemaAt=function(t,n,o){return this.__compiled__[n.toLowerCase()]?this.__compiled__[n.toLowerCase()].validate(t,o,this):0};er.prototype.match=function(t){const n=[],o=[],s=[],i=[];let r,l,a;function c(f,h){return f?h?f.index!==h.index?f.index=h.lastIndex?f:h:f:h}if(!t.length)return null;if(this.re.schema_test.test(t))for(a=this.re.schema_search,a.lastIndex=0;(r=a.exec(t))!==null;)l=this.testSchemaAt(t,r[2],a.lastIndex),l&&o.push({schema:r[2],index:r.index+r[1].length,lastIndex:r.index+r[0].length+l});if(this.__opts__.fuzzyLink&&this.__compiled__["http:"])for(a=this.__opts__.fuzzyIP?this.re.link_fuzzy_global:this.re.link_no_ip_fuzzy_global,a.lastIndex=0;(r=a.exec(t))!==null;)s.push({schema:"",index:r.index+r[1].length,lastIndex:r.index+r[0].length});if(this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"])for(a=this.re.email_fuzzy_global,a.lastIndex=0;(r=a.exec(t))!==null;)i.push({schema:"mailto:",index:r.index+r[1].length,lastIndex:r.index+r[0].length});const u=[0,0,0];let d=0;for(;;){const f=[o[u[0]],i[u[1]],s[u[2]]],h=c(c(f[0],f[1]),f[2]);if(!h)break;if(h===f[0]?u[0]++:h===f[1]?u[1]++:u[2]++,h.index{const d=/^xn--/,f=/[^\0-\x7F]/,h=/[\x2E\u3002\uFF0E\uFF61]/g,m={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},g=35,b=Math.floor,_=String.fromCharCode;function v(H){throw new RangeError(m[H])}function y(H,O){const P=[];let z=H.length;for(;z--;)P[z]=O(H[z]);return P}function w(H,O){const P=H.split("@");let z="";P.length>1&&(z=P[0]+"@",H=P[1]),H=H.replace(h,".");const W=y(H.split("."),O).join(".");return z+W}function x(H){const O=[];let P=0;const z=H.length;for(;P=55296&&W<=56319&&PString.fromCodePoint(...H),L=function(H){return H>=48&&H<58?26+(H-48):H>=65&&H<91?H-65:H>=97&&H<123?H-97:36},S=function(H,O){return H+22+75*(H<26)-((O!=0)<<5)},T=function(H,O,P){let z=0;for(H=P?b(H/700):H>>1,H+=b(H/O);H>g*26>>1;z+=36)H=b(H/g);return b(z+(g+1)*H/(H+38))},R=function(H){const O=[],P=H.length;let z=0,W=128,U=72,G=H.lastIndexOf("-");G<0&&(G=0);for(let Z=0;Z=128&&v("not-basic"),O.push(H.charCodeAt(Z));for(let Z=G>0?G+1:0;Z=P&&v("invalid-input");const xe=L(H.charCodeAt(Z++));xe>=36&&v("invalid-input"),xe>b((2147483647-z)/X)&&v("overflow"),z+=xe*X;const pe=oe<=U?1:oe>=U+26?26:oe-U;if(xeb(2147483647/ve)&&v("overflow"),X*=ve}const Q=O.length+1;U=T(z-ee,Q,ee==0),b(z/Q)>2147483647-W&&v("overflow"),W+=b(z/Q),z%=Q,O.splice(z++,0,W)}return String.fromCodePoint(...O)},B=function(H){const O=[];H=x(H);const P=H.length;let z=128,W=0,U=72;for(const ee of H)ee<128&&O.push(_(ee));const G=O.length;let Z=G;for(G&&O.push("-");Z=z&&Xb((2147483647-W)/Q)&&v("overflow"),W+=(ee-z)*Q,z=ee;for(const X of H)if(X2147483647&&v("overflow"),X===z){let oe=W;for(let xe=36;;xe+=36){const pe=xe<=U?1:xe>=U+26?26:xe-U;if(oe32))return i;if(o===41){if(r===0)break;r--}s++}return t===s||r!==0||(i.str=hp(e.slice(t,s)),i.pos=s,i.ok=!0),i}var jT=M8;const $h=-2;function BX(e,t,n,o){let s=1,i=t+1;for(;i=0&&t+1>=u)return-1;const d=l.indexOf("]",t+1);if(d<0||d>=a)return e.linkLabelNoCloseFrom=t+1,-1;const f=BX(l,t,a,n);if(f!==$h)return f;for(e.pos=t+1;e.pos=n)return r;let l=e.charCodeAt(i);if(l!==34&&l!==39&&l!==40)return r;t++,i++,l===40&&(l=41),r.marker=l}for(;i=0?e.attrs[n][1]:null}function WX(e,t,n){const o=c2(e,t);o<0?I8(e,[t,n]):e.attrs[o][1]=`${e.attrs[o][1]} ${n}`}var UX=RT({attrGet:()=>zX,attrIndex:()=>c2,attrJoin:()=>WX,attrPush:()=>I8,attrSet:()=>HX,parseLinkDestination:()=>M8,parseLinkLabel:()=>T8,parseLinkTitle:()=>E8});function jX(e){return e.includes("\r")||e.includes("\0")}function qT(e){return typeof e=="string"?e:e.toString()}function VX(e){if(e.inlineMode){const t=new hs("inline","",0);t.content=qT(e.src),t.map=[0,1],t.children=[],t.level=0,e.tokens.push(t)}else e.md&&e.md.block&&e.md.block.parse(e.src,e.md,e.env,e.tokens)}const qX=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,KX=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function ZX(e,t){let n=e.pos;const o=e.src;if(o.charCodeAt(n)!==60)return!1;const s=n,i=e.posMax;for(;;){if(++n>=i)return!1;const l=o.charCodeAt(n);if(l===60)return!1;if(l===62)break}const r=o.slice(s+1,n);if(KX.test(r)){const l=e.md.normalizeLink(r);if(!e.md.validateLink(l))return!1;if(!t){const a=e.push("link_open","a",1);a.attrs=[["href",l]],a.markup="autolink",a.info="auto";const c=e.push("text","",0);c.content=e.md.normalizeLinkText(r);const u=e.push("link_close","a",-1);u.markup="autolink",u.info="auto"}return e.pos+=r.length+2,!0}if(qX.test(r)){const l=e.md.normalizeLink(`mailto:${r}`);if(!e.md.validateLink(l))return!1;if(!t){const a=e.push("link_open","a",1);a.attrs=[["href",l]],a.markup="autolink",a.info="auto";const c=e.push("text","",0);c.content=e.md.normalizeLinkText(r);const u=e.push("link_close","a",-1);u.markup="autolink",u.info="auto"}return e.pos+=r.length+2,!0}return!1}var KT=ZX;function GX(e,t){const n=e.src;let o=e.pos;if(n.charCodeAt(o)!==96)return!1;const s=o;o++;const i=e.posMax;for(;o2&&f.charCodeAt(0)===32&&f.charCodeAt(f.length-1)===32&&(f=f.slice(1,-1)),d.content=f}return e.pos=a,!0}e.backticks[u]=c}return e.backticksScanned=!0,t||(e.pending+=r),e.pos+=l,!0}var ZT=GX;function Ab(e){const t={},n=e.length;if(!n)return;let o=0,s=-2;const i=[];for(let r=0;ra;c-=i[c]+1){const d=e[c];if(d.marker===l.marker&&d.open&&d.end<0){let f=!1;if((d.close||l.open)&&(d.length+l.length)%3===0&&(d.length%3!==0||l.length%3!==0)&&(f=!0),!f){const h=c>0&&!e[c-1].open?i[c-1]+1:0;i[r]=r-c+h,i[c]=h,l.open=!1,d.end=r,d.close=!1,u=-1,s=-2;break}}}u!==-1&&(t[l.marker][(l.open?3:0)+(l.length||0)%3]=u)}}function YX(e){const t=e.tokens_meta,n=e.tokens_meta.length;Ab(e.delimiters);for(let o=0;o=0;s--){const i=t[s],r=i.marker;if(r!==95&&r!==42||i.end===-1)continue;const l=t[i.end],a=i.token,c=l.token,u=s>0&&t[s-1].end===i.end+1&&t[s-1].marker===r&&t[s-1].token===a-1&&t[i.end+1].token===c+1,d=r===42?GT:YT,f=o[a];u?(f.type="strong_open",f.tag="strong",f.nesting=1,f.markup=d+d,f.content=""):(f.type="em_open",f.tag="em",f.nesting=1,f.markup=d,f.content="");const h=o[c];u?(h.type="strong_close",h.tag="strong",h.nesting=-1,h.markup=d+d,h.content=""):(h.type="em_close",h.tag="em",h.nesting=-1,h.markup=d,h.content=""),u&&(o[t[s-1].token].content="",o[t[i.end+1].token].content="",s--)}}function QX(e){const t=e.tokens_meta,n=e.tokens_meta.length;Mb(e,e.delimiters);for(let o=0;o=48&&e<=57}function eJ(e){const t=e|32;return L8(e)||t>=97&&t<=102}function JT(e){const t=e|32;return t>=97&&t<=122}function tJ(e){return JT(e)||L8(e)}function nJ(e,t,n){let o=t+2;if(o>=n)return null;let s=!1,i=7,r=o;for((e.charCodeAt(o)|32)===120&&(s=!0,i=6,o++,r=o);o=n||e.charCodeAt(o)!==59?null:e.slice(t,o+1)}function oJ(e,t,n){let o=t+1;if(o>=n||!JT(e.charCodeAt(o)))return null;for(o++;o=n||e.charCodeAt(o)!==59)return null;const s=e.slice(t,o+1);return XT(s)!==s?s:null}function sJ(e,t){const n=e.pos,o=e.posMax;if(e.src.charCodeAt(n)!==38||n+1>=o)return!1;if(e.src.charCodeAt(n+1)===35){const s=nJ(e.src,n,o);if(s){if(!t){const i=(s.charCodeAt(2)|32)===120?Number.parseInt(s.slice(3,-1),16):Number.parseInt(s.slice(2,-1),10),r=e.push("text_special","",0);r.content=l2(i)?pp(i):pp(65533),r.markup=s,r.info="entity"}return e.pos+=s.length,!0}}else{const s=oJ(e.src,n,o);if(s){const i=XT(s);if(!t){const r=e.push("text_special","",0);r.content=i,r.markup=s,r.info="entity"}return e.pos+=s.length,!0}}return!1}var QT=sJ;const eE=(()=>{const e=new Array(256).fill(0),t="\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-";for(let n=0;n<32;n++)e[t.charCodeAt(n)]=1;return e})(),m3=new Array(128),tE=new Array(128);for(let e=0;e<128;e++){const t=String.fromCharCode(e);m3[e]=`\\${t}`,tE[e]=eE[e]?t:m3[e]}function Tb(e,t,n){e.pending&&e.pushPending();const o=new hs("text_special","",0);o.level=e.level,o.content=t,o.markup=n,o.info="escape",e.pendingLevel=e.level,e.tokens.push(o),e.tokens_meta.push(null)}function iJ(e,t){let n=e.pos;const o=e.posMax,s=e.src;if(s.charCodeAt(n)!==92||(n++,n>=o))return!1;let i=s.charCodeAt(n);if(i===10){for(t||e.push("hardbreak","br",0),n++;n=55296&&i<=56319&&n+1=56320&&a<=57343&&n++}return e.pos=n+1,!0}let r=s.charAt(n);if(i>=55296&&i<=56319&&n+1=56320&&a<=57343&&(r+=s.charAt(n+1),n++)}const l=`\\${r}`;return Tb(e,i<256&&eE[i]?r:l,l),e.pos=n+1,!0}var nE=iJ;function rJ(e){let t,n,o=0;const s=e.tokens,i=e.tokens.length;for(t=n=0;t0&&o++,r.type==="text"&&t+1\`\\x00-\\x20]+|'[^']*'|"[^"]*"))?)*\\s*\\/?>`,sE="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",aJ=new RegExp(`^(?:${oE}|${sE}||<\\?[\\s\\S]*?\\?>|]*>|)`),cJ=new RegExp(`^(?:${oE}|${sE})`);function iE(e){return e===32||e===9||e===10||e===12||e===13}function uJ(e){if(e.length<3||e.charCodeAt(0)!==60||(e.charCodeAt(1)|32)!==97)return!1;const t=e.charCodeAt(2);return t===62||iE(t)}function dJ(e){if(e.length<4||e.charCodeAt(0)!==60||e.charCodeAt(1)!==47||(e.charCodeAt(2)|32)!==97)return!1;for(let t=3;t=97&&t<=122}function pJ(e,t){if(!e.md.options.html)return!1;const n=e.posMax,o=e.pos,s=e.src;if(s.charCodeAt(o)!==60||o+2>=n)return!1;const i=s.charCodeAt(o+1);if(i!==33&&i!==63&&i!==47&&!fJ(i))return!1;const r=s.slice(o).match(aJ);if(!r)return!1;const l=r[0];if(!t){const a=e.pushSimple("html_inline","");a.content=l,uJ(l)&&e.linkLevel++,dJ(l)&&e.linkLevel--}return e.pos+=l.length,!0}var rE=pJ;function hJ(e,t){let n,o,s,i,r,l,a,c,u="";const d=e.pos,f=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;const h=e.pos+2,m=Fm(e,e.pos+1,!1);if(m<0)return!1;if(i=m+1,i=f)return!1;if(l=jT(e.src,i,e.posMax),l.ok){for(u=e.md.normalizeLink(l.str),e.md.validateLink(u)?i=l.pos:u="",c=i;i=f||e.src.charCodeAt(i)!==41)return e.pos=d,!1;i++}else{if(typeof e.env.references>"u")return!1;if(i=0?s=e.src.slice(c,i++):i=m+1):i=m+1,s||(s=e.src.slice(h,m)),r=e.env.references[r2(s)],!r)return e.pos=d,!1;u=r.href,a=r.title}if(!t){o=e.src.slice(h,m);const g=[];e.md.inline.parse(o,e.md,e.env,g);const b=e.push("image","img",0);b.attrs=[["src",u],["alt",""]],b.children=g,b.content=o,a&&b.attrs.push(["title",a])}return e.pos=i,e.posMax=f,!0}var lE=hJ;function u9(e,t,n){for(;t"u")return!1;let d;if(l=r+1,l=0?(d=n.slice(h,m),d||(d=n.slice(i,r)),l=m+1):d=n.slice(i,r)}else d=n.slice(i,r);const f=e.env.references[r2(d)];if(!f)return e.pos=o,!1;a=f.href,c=f.title}if(!t){e.pos=i,e.posMax=r;const d=e.push("link_open","a",1);d.attrs=c?[["href",a],["title",c]]:[["href",a]],e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=l,e.posMax=s,!0}var aE=mJ;function cE(e){const t=e|32;return t>=97&&t<=122}function gJ(e){return e>=48&&e<=57}function vJ(e){return cE(e)||gJ(e)||e===43||e===45||e===46}function yJ(e){if(e.length===0)return null;let t=e.length-1;for(;t>=0&&vJ(e.charCodeAt(t));)t--;return t++,t>=e.length||!cE(e.charCodeAt(t))?null:e.slice(t)}function kJ(e,t,n){let o=t;for(;o0)return!1;const n=e.pos,o=e.posMax;if(n+3>o||e.src.charCodeAt(n)!==58||e.src.charCodeAt(n+1)!==47||e.src.charCodeAt(n+2)!==47)return!1;const s=yJ(e.pending);if(!s)return!1;const i=kJ(e.src,n-s.length,o),r=e.md.linkify.matchAtStart(i);if(!r)return!1;let l=r.url;if(l.length<=s.length)return!1;let a=l.length;for(;a>0&&l.charCodeAt(a-1)===42;)a--;a!==l.length&&(l=l.slice(0,a));const c=e.md.normalizeLink(l);if(!e.md.validateLink(c))return!1;if(!t){e.pending=e.pending.slice(0,-s.length);const u=e.push("link_open","a",1);u.attrs=[["href",c]],u.markup="linkify",u.info="auto";const d=e.push("text","",0);d.content=e.md.normalizeLinkText(l);const f=e.push("link_close","a",-1);f.markup="linkify",f.info="auto"}return e.pos+=l.length-s.length,!0}function bJ(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==10)return!1;const o=e.pending.length-1,s=e.posMax;if(!t)if(o>=0&&e.pending.charCodeAt(o)===32)if(o>=1&&e.pending.charCodeAt(o-1)===32){let i=o-1;for(;i>=1&&e.pending.charCodeAt(i-1)===32;)i--;e.pending=e.pending.slice(0,i),e.pushSimple("hardbreak","br")}else e.pending=e.pending.slice(0,-1),e.pushSimple("softbreak","br");else e.pushSimple("softbreak","br");for(n++;n=s||Ib(n.charCodeAt(o)))return!1;let i=o+1;for(;io-s),n=Math.floor(t.length/2);return t.length%2===0?(t[n-1]+t[n])/2:t[n]}function SJ(e,t){return{chain:e,name:t,calls:0,hits:0,inclusiveMs:0,medianMs:0,maxMs:0,normalCalls:0,normalHits:0,silentCalls:0,silentHits:0,samples:[]}}function pE(e){const t=e;if(!t)return null;if(t.__mdtsRuleProfile)return t.__mdtsRuleProfile;if(!t.__mdtsProfileRules)return null;const n=t.__mdtsProfileRules===!0?{}:t.__mdtsProfileRules,o={enabled:!0,fixture:n.fixture,mode:n.mode,startedAt:$8(),records:Object.create(null)};return t.__mdtsRuleProfile=o,o}function Rd(e,t,n,o,s,i){const r=pE(e);if(!r)return;const l=`${t}:${n}`,a=r.records[l]??(r.records[l]=SJ(t,n));a.calls++,a.inclusiveMs+=o,o>a.maxMs&&(a.maxMs=o),a.samples.push(o),i?(a.silentCalls++,s&&a.silentHits++):(a.normalCalls++,s&&a.normalHits++),s&&a.hits++,r.completedAt=$8()}function AJ(e){const t=pE(e);if(!t)return null;const n=Object.keys(t.records);for(let o=0;os.name===e);o>=0&&this.rules.splice(o,1),this.rules.push({name:e,fn:t,alt:n?.alt||[],enabled:!0}),this.invalidateCache()}at(e,t,n){const o=this.rules.findIndex(s=>s.name===e);if(t===void 0){if(o<0)return;const s=this.rules[o];return Object.freeze({name:s.name,fn:s.fn,alt:s.alt?Object.freeze(s.alt.slice()):void 0,enabled:s.enabled})}if(o<0)throw new Error(`Parser rule not found: ${e}`);this.rules[o].fn=t,n?.alt!==void 0&&(this.rules[o].alt=n.alt),this.invalidateCache()}before(e,t,n,o){const s=this.rules.findIndex(r=>r.name===e);if(s<0)throw new Error(`Parser rule not found: ${e}`);const i=this.rules.findIndex(r=>r.name===t);i>=0&&this.rules.splice(i,1),this.rules.splice(s,0,{name:t,fn:n,alt:o?.alt||[],enabled:!0}),this.invalidateCache()}after(e,t,n,o){const s=this.rules.findIndex(r=>r.name===e);if(s<0)throw new Error(`Parser rule not found: ${e}`);const i=this.rules.findIndex(r=>r.name===t);i>=0&&this.rules.splice(i,1),this.rules.splice(s+1,0,{name:t,fn:n,alt:o?.alt||[],enabled:!0}),this.invalidateCache()}enable(e,t){const n=Array.isArray(e)?e:[e],o=[];let s=!1;for(const i of n){const r=this.rules.findIndex(l=>l.name===i);if(r<0){if(!t)throw new Error(`Rules manager: invalid rule name ${i}`);continue}o.push(i),this.rules[r].enabled||(this.rules[r].enabled=!0,s=!0)}return s&&this.invalidateCache(),o}disable(e,t){const n=Array.isArray(e)?e:[e],o=[];let s=!1;for(const i of n){const r=this.rules.findIndex(l=>l.name===i);if(r<0){if(!t)throw new Error(`Rules manager: invalid rule name ${i}`);continue}o.push(i),this.rules[r].enabled&&(this.rules[r].enabled=!1,s=!0)}return s&&this.invalidateCache(),o}enableOnly(e){const t=new Set(e);let n=!1;for(const o of this.rules){const s=t.has(o.name);o.enabled!==s&&(o.enabled=s,n=!0)}n&&this.invalidateCache()}getRules(e){const t=e||"";return this.cache||this.compileCache(),this.cache.get(t)??[]}getNamedRules(e){const t=e||"";return this.namedCache||this.compileCache(),this.namedCache.get(t)??[]}compileCache(){const e=new Set([""]);for(const o of this.rules)if(o.enabled&&o.alt)for(const s of o.alt)e.add(s);const t=new Map,n=new Map;for(const o of e){const s=[],i=[];for(const r of this.rules)r.enabled&&(o!==""&&!r.alt?.includes(o)||(s.push(r.fn),i.push({name:r.name,fn:r.fn})));t.set(o,s),n.set(o,i)}this.cache=t,this.namedCache=n}},hE=class{src;md;env;tokens;tokens_meta;pos;posMax;level;pending;pendingLevel;cache;delimiters;_prev_delimiters;backticks;backticksScanned;linkLevel;linkLabelNoCloseFrom;maxNesting;constructor(e,t,n,o){this.src=e,this.md=t,this.env=n,this.tokens=o,this.tokens_meta=new Array(o.length),this.pos=0,this.posMax=e.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache=[],this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0,this.linkLabelNoCloseFrom=-1,this.maxNesting=t.options.maxNesting}pushPending(){const e=new hs("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e}pushSimple(e,t){this.pending&&this.pushPending();const n=new hs(e,t,0);return n.level=this.level,this.pendingLevel=this.level,this.tokens.push(n),this.tokens_meta.push(null),n}push(e,t,n){if(this.pending&&this.pushPending(),n===0)return this.pushSimple(e,t);const o=new hs(e,t,n);let s=null;return n<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),o.level=this.level,n>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],s={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(o),this.tokens_meta.push(s),o}scanDelims(e,t){const{src:n,posMax:o}=this,s=n.charCodeAt(e);let i=e;for(;i0?n.charCodeAt(e-1):32,a=i@[\]\\^_`{}~]/;function $b(e,t){switch(e.src.charCodeAt(e.pos)){case 10:return dE(e,t);case 33:return lE(e,t);case 38:return QT(e,t);case 42:case 95:return h3.tokenize(e,t);case 58:return e.md.options.linkify&&uE(e,t);case 60:return KT(e,t)||rE(e,t);case 91:return aE(e,t);case 92:return nE(e,t);case 96:return ZT(e,t);case 126:return g3.tokenize(e,t);default:return fE(e,t)}}function mE(e){return!MJ.test(e)}var TJ=class{ruler;ruler2;cachedRulesVersion=-1;cachedRules=[];cachedRules2Version=-1;cachedRules2=[];defaultRulerVersion;defaultRuler2Version;constructor(){this.ruler=new Lb,this.ruler2=new Lb,this.ruler.push("text",fE),this.ruler.push("linkify",uE),this.ruler.push("newline",dE),this.ruler.push("escape",nE),this.ruler.push("backticks",ZT),this.ruler.push("strikethrough",g3.tokenize),this.ruler.push("emphasis",h3.tokenize),this.ruler.push("link",aE),this.ruler.push("image",lE),this.ruler.push("autolink",KT),this.ruler.push("html_inline",rE),this.ruler.push("entity",QT),this.ruler2.push("balance_pairs",XX),this.ruler2.push("strikethrough",g3.postProcess),this.ruler2.push("emphasis",h3.postProcess),this.ruler2.push("fragments_join",lJ),this.defaultRulerVersion=this.ruler.version,this.defaultRuler2Version=this.ruler2.version}skipToken(e){const t=e.pos,n=this.getRules(),o=n.length,s=e.cache,i=s[t],r=!!e.env&&(Object.prototype.hasOwnProperty.call(e.env,"__mdtsRuleProfile")||Object.prototype.hasOwnProperty.call(e.env,"__mdtsProfileRules"));if(i!==void 0){e.pos=i;return}let l=!1;if(e.level=e.pos)throw new Error("inline rule didn't increment state.pos");break}}}else if(this.isDefaultRuleset()){if(e.level++,l=$b(e,!0),e.level--,l&&t>=e.pos)throw new Error("inline rule didn't increment state.pos")}else for(let a=0;a=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;l||e.pos++,s[t]=e.pos}tokenize(e){const t=this.getRules(),n=t.length,o=e.posMax;if(!(e.env&&(Object.prototype.hasOwnProperty.call(e.env,"__mdtsRuleProfile")||Object.prototype.hasOwnProperty.call(e.env,"__mdtsProfileRules")))){const i=this.isDefaultRuleset();for(;e.pos=e.pos)throw new Error("inline rule didn't increment state.pos")}if(l){if(e.pos>=o)break;continue}e.pending+=e.src.charAt(e.pos++)}e.pending&&e.pushPending();return}const s=this.ruler.getNamedRules("");for(;e.pos=e.pos)throw new Error("inline rule didn't increment state.pos");break}}if(r){if(e.pos>=o)break;continue}e.pending+=e.src.charAt(e.pos++)}e.pending&&e.pushPending()}isDefaultRuleset(){return this.ruler.version===this.defaultRulerVersion&&this.ruler2.version===this.defaultRuler2Version}parseSource(e,t,n,o){if(typeof e=="string"&&e.length>0&&this.isDefaultRuleset()&&mE(e)){const a=new hs("text","",0);a.content=e,o.push(a);return}const s=new hE(e,t,n,o);this.tokenize(s);const i=this.getRules2(),r=i.length;if(!(s.env&&(Object.prototype.hasOwnProperty.call(s.env,"__mdtsRuleProfile")||Object.prototype.hasOwnProperty.call(s.env,"__mdtsProfileRules")))){for(let a=0;a0&&mE(i.content)){const r=new hs("text","",0);r.content=i.content,i.children.push(r);continue}e.md.inline.parse(i.content,e.md,e.env,i.children)}}}const IJ=/[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}]/u,LJ=/[0-9a-z]/i;function $J(e){return/^\s]/i.test(e)}function NJ(e){return/^<\/a\s*>/i.test(e)}function OJ(e,t){if(t.schema||t.index!==0||!t.raw)return t;for(let n=1;n=0;r--){const l=s[r];if(l.type==="link_close"){for(r--;r>=0&&s[r].level!==l.level&&s[r].type!=="link_open";)r--;continue}if(l.type==="html_inline"&&($J(l.content)&&i>0&&i--,NJ(l.content)&&i++),i>0||l.type!=="text"||!e.md.linkify.test(l.content))continue;const a=l.content;let c=(e.md.linkify.match(a)||[]).map(h=>OJ(e.md.linkify,h));if(c.length===0)continue;const u=[];let d=l.level,f=0;c.length>0&&c[0].index===0&&r>0&&s[r-1].type==="text_special"&&(c=c.slice(1));for(let h=0;hf){const x=new hs("text","",0);x.content=a.slice(f,_),x.level=d,u.push(x)}const v=new hs("link_open","a",1);v.attrs=[["href",g]],v.level=d++,v.markup="linkify",v.info="auto",u.push(v);const y=new hs("text","",0);y.content=b,y.level=d,u.push(y);const w=new hs("link_close","a",-1);w.level=--d,w.markup="linkify",w.info="auto",u.push(w),f=m.lastIndex}if(f!==0){if(f=0;n--){const o=e[n];o.type==="text"&&!t&&(o.content=o.content.replace(HJ,WJ)),o.type==="link_open"&&o.info==="auto"&&t--,o.type==="link_close"&&o.info==="auto"&&t++}}function jJ(e){let t=0;for(let n=e.length-1;n>=0;n--){const o=e[n];o.type==="text"&&!t&&gE.test(o.content)&&(o.content=o.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/gm,"$1—").replace(/(^|\s)--(?=\s|$)/gm,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/gm,"$1–")),o.type==="link_open"&&o.info==="auto"&&t--,o.type==="link_close"&&o.info==="auto"&&t++}}function VJ(e){if(e.md?.options?.typographer)for(let t=e.tokens.length-1;t>=0;t--){const n=e.tokens[t];if(n.type!=="inline")continue;const o=n.content||(Array.isArray(n.children)?n.children.map(s=>s.type==="text"?s.content:"").join(""):"");BJ.test(o)&&UJ(n.children||[]),gE.test(o)&&jJ(n.children||[])}}var qJ=class{rules=[];cache=null;namedCache=null;version=0;invalidateCache(){this.cache=null,this.namedCache=null,this.version++}push(e,t){const n=this.rules.findIndex(o=>o.name===e);n>=0&&this.rules.splice(n,1),this.rules.push({name:e,fn:t,enabled:!0}),this.invalidateCache()}at(e,t){const n=this.rules.findIndex(o=>o.name===e);if(n<0)throw new Error(`Parser rule not found: ${e}`);this.rules[n].fn=t,this.invalidateCache()}before(e,t,n){const o=this.rules.findIndex(i=>i.name===e);if(o<0)throw new Error(`Parser rule not found: ${e}`);const s=this.rules.findIndex(i=>i.name===t);s>=0&&this.rules.splice(s,1),this.rules.splice(o,0,{name:t,fn:n,enabled:!0}),this.invalidateCache()}after(e,t,n){const o=this.rules.findIndex(i=>i.name===e);if(o<0)throw new Error(`Parser rule not found: ${e}`);const s=this.rules.findIndex(i=>i.name===t);s>=0&&this.rules.splice(s,1),this.rules.splice(o+1,0,{name:t,fn:n,enabled:!0}),this.invalidateCache()}enable(e,t){const n=Array.isArray(e)?e:[e],o=[];let s=!1;for(const i of n){const r=this.rules.findIndex(l=>l.name===i);if(r<0){if(!t)throw new Error(`Rules manager: invalid rule name ${i}`);continue}o.push(i),this.rules[r].enabled||(this.rules[r].enabled=!0,s=!0)}return s&&this.invalidateCache(),o}disable(e,t){const n=Array.isArray(e)?e:[e],o=[];let s=!1;for(const i of n){const r=this.rules.findIndex(l=>l.name===i);if(r<0){if(!t)throw new Error(`Rules manager: invalid rule name ${i}`);continue}o.push(i),this.rules[r].enabled&&(this.rules[r].enabled=!1,s=!0)}return s&&this.invalidateCache(),o}enableOnly(e){const t=new Set(e);let n=!1;for(const o of this.rules){const s=t.has(o.name);o.enabled!==s&&(o.enabled=s,n=!0)}n&&this.invalidateCache()}compileCache(){this.cache=this.rules.filter(e=>e.enabled).map(e=>e.fn),this.namedCache=this.rules.filter(e=>e.enabled).map(e=>({name:e.name,fn:e.fn}))}getRules(e=""){return this.cache||this.compileCache(),this.cache}getNamedRules(e=""){return this.namedCache||this.compileCache(),this.namedCache}};const KJ=/['"]/,Nb=/['"]/g,Ob="’";function J0(e,t,n){return e.slice(0,t)+n+e.slice(t+1)}function ZJ(e,t){let n;const o=[],s=t.md&&t.md.options&&t.md.options.quotes||"“”‘’";for(let i=0;i=0&&!(o[n].level<=l);n--);if(o.length=n+1,r.type!=="text")continue;let a=r.content,c=0,u=a.length;e:for(;c=0)g=a.charCodeAt(d.index-1);else for(n=i-1;n>=0&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n--)if(e[n].content){g=e[n].content.charCodeAt(e[n].content.length-1);break}let b=32;if(c=48&&g<=57&&(h=f=!1),f&&h&&(f=_,h=v),!f&&!h){m&&(r.content=J0(r.content,d.index,Ob));continue}if(h)for(n=o.length-1;n>=0;n--){let x=o[n];if(o[n].level=0;t--){const n=e.tokens[t];if(n.type!=="inline")continue;const o=typeof n.content=="string"?n.content:(n.children||[]).map(s=>s.content||"").join("");!KJ.test(o)||!n.children||ZJ(n.children,e)}}function YJ(e){const t=e.tokens||[],n=t.length;for(let o=0;o=4||s.charCodeAt(u)!==62)return!1;if(o)return!0;const h=[],m=[],g=[],b=[],_=e.md.block.ruler.getRulesForState(e,"blockquote"),v=e.parentType;e.parentType="blockquote";let y=!1,w;for(w=t;w=d)break;if(s.charCodeAt(u++)===62&&!T){let B=a[w]+1,I,$;s.charCodeAt(u)===32?(u++,B++,$=!1,I=!0):s.charCodeAt(u)===9?(I=!0,(c[w]+B)%4===3?(u++,B++,$=!1):$=!0):I=!1;let D=B;for(h.push(i[w]),i[w]=u;u=d,m.push(c[w]),c[w]=a[w]+1+(I?1:0),g.push(a[w]),a[w]=D-B,b.push(l[w]),l[w]=u-i[w];continue}if(y)break;let R=!1;for(let B=0,I=_.length;B";const L=[t,0];A.map=L,e.md.block.tokenize(e,t,w);const S=e.push("blockquote_close","blockquote",-1);S.markup=">",e.lineMax=f,e.parentType=v,L[1]=e.line;for(let T=0;T=4){o++,s=o;continue}break}e.line=s;const i=e.push("code_block","code",0);return i.content=`${e.getLines(t,s,4+e.blkIndent,!1)} -`,i.map=[t,e.line],!0}function nQ(e,t,n,o){let s=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||s+3>i)return!1;const r=e.src.charCodeAt(s);if(r!==126&&r!==96)return!1;let l=s;s=e.skipChars(s,r);let a=s-l;if(a<3)return!1;const c=e.src.slice(l,s),u=e.src.slice(s,i);if(r===96&&u.includes(String.fromCharCode(r)))return!1;if(o)return!0;let d=t,f=!1;for(;d++,!(d>=n||(s=l=e.bMarks[d]+e.tShift[d],i=e.eMarks[d],s=4)&&(s=e.skipChars(s,r),!(s-l=4)return!1;let u=s.charCodeAt(a);if(u!==35||a>=c)return!1;let d=1;for(u=s.charCodeAt(++a);u===35&&a6||aa&&Pb(s.charCodeAt(f-1))&&(c=f),e.line=t+1;const h=e.push("heading_open",Fb[d],1);h.markup=Rb[d],h.map=[t,e.line];const m=e.push("inline","",0);m.content=s.slice(a,c).trim(),m.map=[t,e.line],m.children=[];const g=e.push("heading_close",Fb[d],-1);return g.markup=Rb[d],!0}function sQ(e){switch(e){case 9:case 32:return!0}return!1}function iQ(e,t,n,o){const s=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let i=e.bMarks[t]+e.tShift[t];const r=e.src.charCodeAt(i++);if(r!==42&&r!==45&&r!==95)return!1;let l=1;for(;i|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp(`^|$))`,"i"),/^$/,!0],[new RegExp(`${cJ.source}\\s*$`),/^$/,!1]];function rQ(e,t,n,o){let s=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(s)!==60)return!1;let r=e.src.slice(s,i),l=0;for(;l=48&&e<=57}var CE=class{src;md;env;tokens;bMarks=[];eMarks=[];tShift=[];sCount=[];bsCount=[];lineFlags=[];blkIndent=0;line=0;lineMax=0;tight=!1;ddIndent=-1;listIndent=-1;parentType="root";level=0;constructor(e,t,n,o){this.src=e,this.md=t,this.env=n,this.tokens=o;const s=this.src;let i=0,r=0,l=0,a=!1,c=0;for(let u=0,d=s.length;u0&&this.level++,this.tokens.push(o),o}isEmpty(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]}skipEmptyLines(e){const t=this.bMarks,n=this.tShift,o=this.eMarks;for(let s=this.lineMax;et;){const o=n.charCodeAt(--e);if(o!==9&&o!==32)return e+1}return e}skipChars(e,t){const n=this.src;for(let o=n.length;en;)if(t!==o.charCodeAt(--e))return e+1;return e}getLines(e,t,n,o){if(e>=t)return"";if(e+1===t){const u=e,d=this.bMarks[u];let f=d;const h=o?this.eMarks[u]+1:this.eMarks[u];let m=0;const g=this.src,b=this.bsCount,_=this.tShift;for(;fn?new Array(m-n+1).join(" ")+g.slice(f,h):g.slice(f,h)}const s=new Array(t-e),i=this.src,r=this.bMarks,l=this.eMarks,a=this.bsCount,c=this.tShift;for(let u=0,d=e;dn?s[u]=new Array(f-n+1).join(" ")+i.slice(m,g):s[u]=i.slice(m,g)}return s.join("")}};CE.prototype.Token=hs;function aQ(e,t,n){for(let o=t;o=s)return!1;const i=n.charCodeAt(o);switch(i){case 35:case 42:case 43:case 45:case 60:case 62:case 95:case 96:case 126:return!0}return i>=48&&i<=57?!0:aQ(n,o,s)}const Bb=["","h1","h2"];function cQ(e,t,n){const o=e.md.block.ruler.getRulesForState(e,"paragraph"),s=e.src,i=e.bMarks,r=e.tShift,l=e.eMarks,a=e.sCount,c=e.blkIndent,u=wE(e);if(a[t]-c>=4)return!1;const d=e.parentType;e.parentType="paragraph";let f=0,h,m=t+1;for(;m=x)break;if(a[m]-c>3)continue;if(a[m]>=c&&(h=s.charCodeAt(w),h===45||h===61)){let L=w+1,S=L;for(;L=x){f=h===61?1:2;break}if(S-w>1)continue}if(a[m]<0||u&&!_E(e,m,s,w,x))continue;let A=!1;for(let L=0,S=o.length;Lw;){const A=s.charCodeAt(x-1);if(A!==9&&A!==32)break;x--}g=s.slice(w,x)}else g=e.getLines(t,m,c,!1).trim();e.line=m+1;const b=h===61?"=":"-",_=e.push("heading_open",Bb[f],1);_.markup=b,_.map=[t,e.line];const v=e.push("inline","",0);v.content=g,v.map=[t,e.line-1],v.children=[];const y=e.push("heading_close",Bb[f],-1);return y.markup=b,e.parentType=d,!0}function xE(e){switch(e){case 9:case 32:return!0}return!1}function Hb(e,t){const n=e.eMarks,o=e.bMarks,s=e.tShift,i=e.src,r=n[t];let l=o[t]+s[t];const a=i.charCodeAt(l++);return a!==42&&a!==45&&a!==43||l=l)return-1;let c=i.charCodeAt(a++);if(c<48||c>57)return-1;for(;;){if(a>=l)return-1;if(c=i.charCodeAt(a++),c>=48&&c<=57){if(a-r>=10)return-1;continue}if(c===41||c===46)break;return-1}return a0&&++s=4||e.listIndent>=0&&e.sCount[l]-e.listIndent>=4&&e.sCount[l]=e.blkIndent&&(c=!0);let u,d,f;const h=e.src,m=e.bMarks,g=e.tShift,b=e.eMarks,_=e.sCount,v=e.bsCount,y=m[l]+g[l];if(y>=b[l])return!1;const w=h.charCodeAt(y);if(w>=48&&w<=57){if(f=zb(e,l),f<0||(u=!0,r=y,d=uQ(e,l,f),c&&d!==1))return!1}else if(w===42||w===45||w===43){if(f=Hb(e,l),f<0)return!1;u=!1}else return!1;if(c&&e.skipSpaces(f)>=b[l])return!1;if(o)return!0;const x=h.charCodeAt(f-1),A=String.fromCharCode(x);if(u){const I=e.push("ordered_list_open","ol",1);d!==void 0&&d!==1&&(I.attrs=[["start",String(d)]])}else e.push("bullet_list_open","ul",1);const L=[l,0];e.tokens[e.tokens.length-1].map=L,e.tokens[e.tokens.length-1].markup=A;let S=!1;const T=e.tokens.length-1,R=e.md.block.ruler.getRulesForState(e,"list"),B=e.parentType;for(e.parentType="list";l=s?H=1:H=$-I,H>4&&(H=1);const O=I+H,P=e.push("list_item_open","li",1);P.markup=A;const z=[l,0];P.map=z,u&&(P.info=f-r-1===1?dQ[h.charCodeAt(r)-48]:h.slice(r,f-1));const W=e.tight,U=e.tShift[l],G=e.sCount[l],Z=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=O,e.tight=!0,e.tShift[l]=D-m[l],e.sCount[l]=$,D>=s&&e.isEmpty(l+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,l,n,!0),(!e.tight||S)&&(a=!1),S=e.line-l>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=Z,e.tShift[l]=U,e.sCount[l]=G,e.tight=W,e.push("list_item_close","li",-1).markup=A,l=e.line,z[1]=l,l>=n||e.sCount[l]=4)break;let ee=!1;for(let Q=0,X=R.length;Q3||c[f]<0)continue;if(s==="list"&&c[f]>=u){const y=r[f]+l[f],w=a[f];if(y=w||Wb(i.charCodeAt(y+1)))break}else if(x>=48&&x<=57&&y+1=w){A=-1;break}const L=i.charCodeAt(A++);if(L>=48&&L<=57){if(A-y>=10){A=-1;break}continue}if((L===41||L===46)&&(A>=w||Wb(i.charCodeAt(A))))break;A=-1;break}if(A>=0)break}}}const b=r[f]+l[f],_=a[f];if(d&&!_E(e,f,i,b,_))continue;let v=!1;for(let y=0,w=o.length;y=4||e.src.charCodeAt(s)!==91)return!1;function a(y){const w=e.lineMax;if(y>=w||e.isEmpty(y))return null;let x=!1;if(e.sCount[y]-e.blkIndent>3&&(x=!0),e.sCount[y]<0&&(x=!0),!x){const S=e.parentType;e.parentType="reference";let T=!1;for(let R=0,B=l.length;R"u"&&(e.env.references={}),typeof e.env.references[v]>"u"&&(e.env.references[v]={title:_,href:f}),e.line=r),!0):!1}function d9(e){switch(e){case 9:case 32:return!0}return!1}const gQ=65536;function f9(e,t){const n=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];return e.src.slice(n,o)}function vQ(e,t){if(e.lineFlags)return(e.lineFlags[t]&$1.Pipe)!==0;for(let n=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];nn)return!1;let s=t+1;if(e.sCount[s]=4)return!1;let i=e.bMarks[s]+e.tShift[s];if(i>=e.eMarks[s])return!1;const r=e.src.charCodeAt(i++);if(r!==124&&r!==45&&r!==58||i>=e.eMarks[s])return!1;const l=e.src.charCodeAt(i++);if(l!==124&&l!==45&&l!==58&&!d9(l)||r===45&&d9(l)||!vQ(e,t))return!1;for(;i=4)return!1;c=Ub(a),c.length&&c[0]===""&&c.shift(),c.length&&c[c.length-1]===""&&c.pop();const d=c.length;if(d===0||d!==u.length)return!1;if(o)return!0;const f=e.parentType;e.parentType="table";const h=e.md.block.ruler.getRulesForState(e,"blockquote"),m=e.push("table_open","table",1),g=[t,0];m.map=g;const b=e.push("thead_open","thead",1);b.map=[t,t+1];const _=e.push("tr_open","tr",1);_.map=[t,t+1];for(let w=0;w=4||(c=Ub(a),c.length&&c[0]===""&&c.shift(),c.length&&c[c.length-1]===""&&c.pop(),y+=d-c.length,y>gQ))break;if(s===t+2){const A=e.push("tbody_open","tbody",1);A.map=v=[t+2,0]}const x=e.push("tr_open","tr",1);x.map=[s,s+1];for(let A=0;Ar.name===e);if(s<0)throw new Error(`Parser rule not found: ${e}`);const i=this._rules.findIndex(r=>r.name===t);i>=0&&this._rules.splice(i,1),this._rules.splice(s,0,{name:t,enabled:!0,fn:n,alt:o?.alt||[]}),this.invalidateCache()}after(e,t,n,o){const s=this._rules.findIndex(r=>r.name===e);if(s<0)throw new Error(`Parser rule not found: ${e}`);const i=this._rules.findIndex(r=>r.name===t);i>=0&&this._rules.splice(i,1),this._rules.splice(s+1,0,{name:t,enabled:!0,fn:n,alt:o?.alt||[]}),this.invalidateCache()}getRules(e){const t=e||"";return this.cache||this.compileCache(),this.cache[t]??[]}getNamedRules(e){const t=e||"";return this.namedCache||this.compileCache(),this.namedCache[t]??[]}getRulesForState(e,t){const n=e?.env;return n&&(Object.prototype.hasOwnProperty.call(n,"__mdtsRuleProfile")||Object.prototype.hasOwnProperty.call(n,"__mdtsProfileRules"))?this.getNamedRules(t).map(({name:o,fn:s})=>(i,r,l,a)=>{const c=typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now(),u=s(i,r,l,a),d=typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now();return Rd(i?.env,"block",o,d-c,u,!!a),u}):this.getRules(t)}at(e,t,n){const o=this._rules.findIndex(s=>s.name===e);if(o===-1)throw new Error(`Parser rule not found: ${e}`);this._rules[o].fn=t,n?.alt&&(this._rules[o].alt=n.alt),this.invalidateCache()}enable(e,t){const n=Array.isArray(e)?e:[e],o=[];let s=!1;return n.forEach(i=>{const r=this._rules.findIndex(l=>l.name===i);if(r===-1){if(t)return;throw new Error(`Rules manager: invalid rule name ${i}`)}o.push(i),this._rules[r].enabled||(this._rules[r].enabled=!0,s=!0)}),s&&this.invalidateCache(),o}disable(e,t){const n=Array.isArray(e)?e:[e],o=[];let s=!1;return n.forEach(i=>{const r=this._rules.findIndex(l=>l.name===i);if(r===-1){if(t)return;throw new Error(`Rules manager: invalid rule name ${i}`)}o.push(i),this._rules[r].enabled&&(this._rules[r].enabled=!1,s=!0)}),s&&this.invalidateCache(),o}enableOnly(e){const t=new Set(e);let n=!1;for(const o of this._rules){const s=t.has(o.name);o.enabled!==s&&(o.enabled=s,n=!0)}n&&this.invalidateCache()}compileCache(){const e=new Set([""]);for(const o of this._rules)if(o.enabled)for(const s of o.alt)e.add(s);const t=Object.create(null),n=Object.create(null);for(const o of e){const s=[],i=[];for(const r of this._rules)r.enabled&&(o!==""&&!r.alt.includes(o)||(s.push(r.fn),i.push({name:r.name,fn:r.fn})));t[o]=s,n[o]=i}this.cache=t,this.namedCache=n}};const eh=[["table",yQ,["paragraph","reference"]],["code",tQ],["fence",nQ,["paragraph","reference","blockquote","list"]],["blockquote",eQ,["paragraph","reference","blockquote","list"]],["hr",iQ,["paragraph","reference","blockquote","list"]],["list",pQ,["paragraph","reference","blockquote"]],["reference",mQ],["html_block",rQ,["paragraph","reference","blockquote"]],["heading",oQ,["paragraph","reference","blockquote"]],["lheading",cQ],["paragraph",hQ]];var bQ=class{ruler;cachedRulesVersion=-1;cachedRules=[];constructor(){this.ruler=new kQ;for(let e=0;e=a[u];)u++;if(e.line=u,u>=n||c[u]=i){e.line=n;break}const h=e.line;let m=!1;for(let g=0;g=e.line)throw new Error("block rule didn't increment state.line");break}if(!m)throw new Error("none of the block rules matched");e.tight=!d,r[e.line-1]+l[e.line-1]>=a[e.line-1]&&(d=!0),u=e.line,u=a[u]&&(d=!0,u++,e.line=u)}return}const f=this.ruler.getNamedRules("");for(;u=a[u];)u++;if(e.line=u,u>=n||c[u]=i){e.line=n;break}const h=e.line;let m=!1;for(let g=0;g=e.line)throw new Error("block rule didn't increment state.line");break}}if(!m)throw new Error("none of the block rules matched");e.tight=!d,r[e.line-1]+l[e.line-1]>=a[e.line-1]&&(d=!0),u=e.line,u=a[u]&&(d=!0,u++,e.line=u)}}parse(e,t,n,o){if(!e||e.length===0)return;const s=new CE(e,t,n,o);this.tokenize(s,s.line,s.lineMax)}getRules(){return this.cachedRulesVersion!==this.ruler.version&&(this.cachedRules=this.ruler.getRules(""),this.cachedRulesVersion=this.ruler.version),this.cachedRules}},SE=class{src;env;tokens;inlineMode;md;constructor(e,t,n={}){this.src=typeof e=="string"?e||"":e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}};SE.prototype.Token=hs;const jb=[["normalize",DJ],["block",VX],["inline",EJ],["linkify",FJ],["replacements",VJ],["smartquotes",GJ],["text_join",YJ]],CQ={html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",maxNesting:100},wQ={parseLinkLabel:T8,parseLinkDestination:M8,parseLinkTitle:E8};function _Q(){return{...CQ}}function xQ(){return{...wQ}}var SQ=class{fallbackParser;lastState=null;block;inline;ruler;linkifyInstance=null;cachedCoreRulesVersion=-1;cachedCoreRules=[];cachedCoreNamedRulesVersion=-1;cachedCoreNamedRules=[];constructor(){this.block=new bQ,this.inline=new TJ,this.ruler=new qJ;for(let e=0;e@[\]\\^_`{}~]/;function Rm(e){return!AQ.test(e)}function f1(e,t){const n=e.indexOf(` -`,t);return n===-1?e.length:n}function Nh(e,t,n){for(let o=t;o3)return Rm(e);for(let t=0;t=o||t.charCodeAt(r)!==32)return!1;let l=r+1;for(;ll&&t.charCodeAt(a-1)===32;)a--;let c=a;for(;c>l&&t.charCodeAt(c-1)===35;)c--;if(c>l&&t.charCodeAt(c-1)===32)for(a=c-1;a>l&&t.charCodeAt(a-1)===32;)a--;const u=t.slice(l,a);if(!Rm(u))return!1;const d=TQ[i],f=EQ[i],h=yr("heading_open",d,1,0);h.map=[s,s+1],h.markup=f,e.push(h),e.push(N8(u,s,1));const m=yr("heading_close",d,-1,0);return m.markup=f,e.push(m),!0}function LQ(e,t,n){const o=yr("paragraph_open","p",1,0);o.map=[n,n+1],e.push(o),e.push(N8(t,n,1)),e.push(yr("paragraph_close","p",-1,0))}function $Q(e,t,n){const o=e.charCodeAt(n-1);return o===32||o===9?e.slice(t,n).trim():e.slice(t,n)}function g9(e,t){for(;t=1e5?qb:m9,s="",i=!1,r=!1,l=0,a=0;for(;l"]/,Kb=/[&<>"]/g,BQ=/&/g,HQ=/[<>"]/g,zQ={"&":"&","<":"<",">":">",'"':"""};function v9(e){return zQ[e]||e}function Jn(e){if(e.length===0)return"";if(e.length<32)return DQ.test(e)?e.replace(Kb,v9):e;const t=e.includes("&"),n=e.includes("<"),o=e.includes(">"),s=e.includes('"');return!t&&!n&&!o&&!s?e:t&&!n&&!o&&!s?e.replace(BQ,"&"):t?e.replace(Kb,v9):e.replace(HQ,v9)}const WQ=new RegExp(`${/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g.source}|${/&([a-z#][a-z0-9]{1,31});/gi.source}`,"gi"),UQ=/^#(?:x[a-f0-9]{1,8}|\d{1,8})$/i;function AE(e){return!e.includes("\\")&&!e.includes("&")?e:e.replace(WQ,(t,n,o)=>{if(n)return n;if(UQ.test(o)){const i=o[1].toLowerCase()==="x"?Number.parseInt(o.slice(2),16):Number.parseInt(o.slice(1),10);return l2(i)?pp(i):"�"}const s=y8(t);return s!==t?s:t})}const jQ=/[\n!#$%&*+\-:<=>@[\]\\^_`{}~]/,VQ=/[\n!"#$%&*+\-:<=>@[\]\\^_`{}~]/,qQ=/"/g;function bd(e,t){const n=e.indexOf(` -`,t);return n===-1?e.length:n}function Pm(e,t,n){for(let o=t;o=e.length||e.charCodeAt(t)===10?!1:!Pm(e,t,bd(e,t))}function Zb(e,t,n){return t+2=n||e.charCodeAt(s)!==32)return null;let i=s+1;for(;ii&&e.charCodeAt(r-1)===32;)r--;let l=r;for(;l>i&&e.charCodeAt(l-1)===35;)l--;if(l>i&&e.charCodeAt(l-1)===32)for(r=l-1;r>i&&e.charCodeAt(r-1)===32;)r--;const a=O8(e.slice(i,r));return a===null?null:`${a} -`}function Gb(e,t,n){return t+1" -`;case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return null}return`
  • ${e[t]}
  • -`}function XQ(e,t,n){const o=t+2;if(n===o+1)return YQ(e,o);const s=O8(e.slice(t+2,n));return s===null?null:`
  • ${s}
  • -`}function JQ(e,t,n){for(;tt;){const s=e.charCodeAt(n-1);if(s!==32&&s!==9)break;n--}let o=n;for(let s=t;s`:"
    ",o.lang=i,o.open=d),{html:`${d}${Jn(u)}
    -`,nextPos:c=25e4,i=[],r={lang:null,open:""};let l="",a="",c="",u="";for(;n -`;w -`,l=_,a=v}let y=th(e,b);for(;y${b}

    -`,c=h,u=m}const g=de.core.parse(t,n,e).tokens);let r=Oh(t,s);if(s.maxChunks&&r.length>s.maxChunks&&(r=see(r,s.maxChunks)),Fh(t,r))return c9(n,{count:1,fallback:!0,fallbackReason:"unsafe-chunk-boundary",maxChunkChars:s.maxChunkChars,maxChunkLines:s.maxChunkLines}),Fd(n,i,()=>e.core.parse(t,n,e).tokens);let l=0;const a=[];return c9(n,{count:r.length,maxChunkChars:s.maxChunkChars,maxChunkLines:s.maxChunkLines,globalStateDetected:i||void 0,globalStateFallbackDisabled:s.fallbackOnGlobalState===!1&&!!i}),Fd(n,i,()=>{for(let c=0;c=3&&(u?u.marker===y&&x>=u.length&&(u=null):u={marker:y,length:x})}}const b=m-f;s+=b,i+=1,l+=1,g?(a=0,c=0):(a+=1,c+=b);const _=g;if((s>=t.maxChunkChars||i>=t.maxChunkLines)&&!u)if(_)d(m);else{const v=Math.max(10,Math.floor(t.maxChunkLines*.5)),y=Math.max(t.maxChunkChars,8e3);(a>=v||c>=y)&&d(m)}f=m}return n&&d(e.length),o}function Fh(e,t,n={rangesCoverWholeSource:!0}){const o=n.rangesCoverWholeSource?t.length-1:t.length;for(let s=0;se.length||e.charCodeAt(t-1)!==10)return!1;let n=t-2;for(;n>=0&&e.charCodeAt(n)!==10;)n--;for(let o=n+1;o=0;o--)n.push(e[o]);for(;n.length;){const o=n.pop();if(o.map&&(o.map[0]+=t,o.map[1]+=t),o.children)for(let s=o.children.length-1;s>=0;s--)n.push(o.children[s])}}function oee(e,t){for(let n=0;n=0;o--)n.push(e[o]);for(;n.length;){const o=n.pop();if(o.map&&(o.map[0]+=t,o.map[1]+=t),o.children)for(let s=o.children.length-1;s>=0;s--)n.push(o.children[s])}}function va(e){return e.length===0?0:Oo(e)+(e.charCodeAt(e.length-1)===10?0:1)}function dee(e,t,n){for(let o=t;o=3&&(n?n.marker===r&&a>=n.length&&(n=null):n={marker:r,length:a})}o=s===e.length?e.length:s+1}return n!==null}function pee(e,t){if(e.length===0||e.charCodeAt(e.length-1)!==10)return!1;let n=e.length-2;for(;n>=0&&e.charCodeAt(n)!==10;)n--;return dee(e,n+1,e.length-1)?!fee(e,t):!1}function hee(e,t,n,o={}){const s=o.mode??"full",i=o.fenceAware??(s==="stream"?e.options.streamChunkFenceAware??!0:e.options.fullChunkFenceAware??!0);if(o.maxChunkChars!==void 0||o.maxChunkLines!==void 0||o.autoTune===!1){const r=o.maxChunkChars??(s==="stream"?e.options.streamChunkSizeChars??aee:e.options.fullChunkSizeChars??ree),l=o.maxChunkLines??(s==="stream"?e.options.streamChunkSizeLines??cee:e.options.fullChunkSizeLines??lee);return{maxChunkChars:r,maxChunkLines:l,holdBelowChars:r,holdBelowLines:l,fenceAware:i}}return s==="stream"?t<=5e3?{maxChunkChars:16e3,maxChunkLines:250,holdBelowChars:16e3,holdBelowLines:250,fenceAware:i}:t<=2e4?{maxChunkChars:16e3,maxChunkLines:200,holdBelowChars:16e3,holdBelowLines:200,fenceAware:i}:t<=5e4?{maxChunkChars:16e3,maxChunkLines:250,holdBelowChars:16e3,holdBelowLines:250,fenceAware:i}:t<=5e5?{maxChunkChars:32e3,maxChunkLines:350,holdBelowChars:32e3,holdBelowLines:350,fenceAware:i}:{maxChunkChars:64e3,maxChunkLines:700,holdBelowChars:64e3,holdBelowLines:700,fenceAware:i}:t<=1e5&&n<=2500?{maxChunkChars:32e3,maxChunkLines:350,holdBelowChars:1e5,holdBelowLines:2500,fenceAware:i}:t<=2e5?{maxChunkChars:2e4,maxChunkLines:150,holdBelowChars:2e4,holdBelowLines:150,fenceAware:i}:t<=5e5?{maxChunkChars:32e3,maxChunkLines:350,holdBelowChars:32e3,holdBelowLines:350,fenceAware:i}:{maxChunkChars:64e3,maxChunkLines:700,holdBelowChars:64e3,holdBelowLines:700,fenceAware:i}}var Rp=class{md;options;pending="";tokens=[];committedChars=0;committedLines=0;fedChunks=0;parsedChunks=0;globalStateEnv=null;markedGlobalStateReason=null;constructor(e,t={}){if(this.md=e,this.options={mode:"full",autoTune:!0,retainTokens:!0,...t},this.options.retainTokens===!1&&!this.options.onChunkTokens)throw new Error("UnboundedBuffer with retainTokens=false requires onChunkTokens")}feed(e){e&&(this.pending+=e,this.fedChunks+=1)}flushAvailable(e={}){if(!this.pending)return null;const t=this.resolveWindow(),n=va(this.pending);if(this.pending.length=o||n>=s}function $E(e,t,n){if(e.options.autoUnbounded===!1)return"no";if(t>=(e.options.autoUnboundedThresholdChars??TE))return"yes";const o=e.options.autoUnboundedThresholdLines??EE;return n!==void 0?n>=o?"yes":"no":t+1e.core.parse(t,n,e).tokens);const i=[],r=new Rp(e,{mode:"full",...o,retainTokens:!1,onChunkTokens(l){IE(i,l)}});if(s&&S8(n,s),r.feed(t),r.flushForce(n),s&&(A8(n),o.fallbackOnGlobalState===!1)){const l=Dl(n)?.unbounded;l&&(l.globalStateDetected=s,l.globalStateFallbackDisabled=!0)}return i}const Pd=(e,t,n)=>en?n:e;function NE(e){return e.experimental?{...e,...e.experimental}:e}const Jb=[{max:5e3,strategy:"discrete",maxChunkChars:32e3,maxChunkLines:150,maxChunks:8,notes:"<=5k"},{max:2e4,strategy:"discrete",maxChunkChars:24e3,maxChunkLines:200,maxChunks:12,notes:"<=20k"},{max:1e5,strategy:"plain",notes:"<=100k plain"},{max:2e5,strategy:"discrete",maxChunkChars:2e4,maxChunkLines:150,maxChunks:12,notes:"<=200k"},{max:5e5,strategy:"discrete",maxChunkChars:64e3,maxChunkLines:700,maxChunks:16,notes:"<=500k"},{max:5e6,strategy:"discrete",maxChunkChars:64e3,maxChunkLines:700,maxChunks:16,notes:"<=5M"}],Qb=[{max:5e3,strategy:"discrete",maxChunkChars:16e3,maxChunkLines:250,maxChunks:8,notes:"<=5k"},{max:2e4,strategy:"discrete",maxChunkChars:2e4,maxChunkLines:200,maxChunks:24,notes:"<=20k"},{max:1e5,strategy:"discrete",maxChunkChars:2e4,maxChunkLines:200,maxChunks:24,notes:"<=100k"},{max:5e5,strategy:"discrete",maxChunkChars:64e3,maxChunkLines:700,maxChunks:32,notes:"<=500k"},{max:5e6,strategy:"discrete",maxChunkChars:64e3,maxChunkLines:700,maxChunks:32,notes:"<=5M"}];function OE(e,t){return{strategy:t.strategy,maxChunkChars:t.maxChunkChars,maxChunkLines:t.maxChunkLines,maxChunks:t.maxChunks,fenceAware:e,notes:t.notes}}function kee(e,t=Math.max(0,e/40|0),n={}){const o=NE(n),s=o.fullChunkFenceAware??!0,i=o.fullChunkTargetChunks??8,r=o.fullChunkAdaptive!==!1;for(let l=0;l5e6?{strategy:"plain",fenceAware:s,notes:">5M plain"}:r?{strategy:"adaptive",maxChunkChars:Pd(Math.ceil(e/i),8e3,64e3),maxChunkLines:Pd(Math.ceil(t/i),150,700),maxChunks:Pd(Math.ceil(e/64e3),i,16),fenceAware:s,notes:"adaptive fallback"}:{strategy:"discrete",maxChunkChars:o.fullChunkSizeChars??1e4,maxChunkLines:o.fullChunkSizeLines??200,fenceAware:s,maxChunks:o.fullChunkMaxChunks}}function eC(e,t=Math.max(0,e/40|0),n={}){const o=NE(n),s=o.streamChunkFenceAware??!0,i=o.streamChunkTargetChunks??8,r=o.streamChunkAdaptive!==!1;for(let l=0;l5e6?{strategy:"plain",fenceAware:s,notes:">5M plain"}:r?{strategy:"adaptive",maxChunkChars:Pd(Math.ceil(e/i),8e3,64e3),maxChunkLines:Pd(Math.ceil(t/i),150,700),maxChunks:Pd(Math.ceil(e/64e3),i,32),fenceAware:s,notes:"adaptive fallback"}:{strategy:"discrete",maxChunkChars:o.streamChunkSizeChars??1e4,maxChunkLines:o.streamChunkSizeLines??200,maxChunks:o.streamChunkMaxChunks,fenceAware:s}}var bee={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"]},inline2:{rules:["balance_pairs","emphasis","fragments_join"]}}},Cee={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},wee={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"]},inline2:{rules:["balance_pairs","fragments_join"]}}};function u2(e){return!!e&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function"}function Rh(e,t){if(u2(e))throw new TypeError(`Renderer rule "${t}" returned a Promise. Use renderAsync() instead.`);return e}const tC=e=>u2(e)?e:Promise.resolve(e);function O1(e){switch(e){case"alt":case"class":case"href":case"id":case"lang":case"rel":case"src":case"start":case"style":case"target":case"title":return e;default:return Jn(e)}}function Ga(e){if(!e||e.length===0)return"";const t=e[0];let n=` ${O1(t[0])}="${Jn(t[1])}"`;for(let o=1;o=e.length)return{langName:e,langAttrs:""};let n=t;for(;n${t} -`;const i=e.attrIndex("class"),r=e.attrs?e.attrs.slice():[],l=`${s.langPrefix??"language-"}${o}`;return i<0?r.push(["class",l]):(r[i]=r[i].slice(),r[i][1]+=` ${l}`),`
    ${t}
    -`}return`
    ${t}
    -`}function mp(e){return!e.attrs||e.attrs.length===0?`${Jn(e.content)}`:`${Jn(e.content)}`}function v3(e){const t=Jn(e.content);return e.attrs?`${t} -`:`
    ${t}
    -`}function _ee(e,t){const n=e.attrs;if(!n||n.length===0)switch(e.type){case"paragraph_open":return`${t}

    `;case"heading_open":return`<${e.tag}>`;case"td_open":return`${t}`;case"th_open":return`${t}`;default:return null}if(n.length===1&&n[0][0]==="style"){if(e.type==="td_open")return`${t}`;if(e.type==="th_open")return`${t}`}return null}function nC(e){const t=e.attrs;return!t||t.length===0?"":t.length===1?``:t.length===2?``:``}function xee(e){switch(e.type){case"text":case"text_special":case"softbreak":case"hardbreak":case"html_inline":case"code_inline":case"image":return!0;default:return!1}}function oC(e){switch(e.type){case"text":case"text_special":case"softbreak":case"hardbreak":case"html_inline":case"code_inline":return!0;default:return!1}}function Bm(e,t){if(e.hidden)return"";const n=e.attrs,o=e.nesting,s=e.tag;if(!n||n.length===0)return o===0?t?`<${s} />`:`<${s}>`:o===-1?``:`<${s}>`;let i=(o===-1?"`}const See={langPrefix:"language-",xhtmlOut:!1,breaks:!1},nh=Object.prototype.hasOwnProperty,En={code_inline(e,t){return mp(e[t])},code_block(e,t){return v3(e[t])},fence(e,t,n,o,s){const i=e[t],r=i.info?AE(i.info).trim():"",{langName:l,langAttrs:a}=FE(r),c=n.highlight,u=Jn(i.content);if(!c)return F1(i,u,r,l,n);const d=c(i.content,l,a);return u2(d)?d.then(f=>F1(i,f||u,r,l,n)):F1(i,d||u,r,l,n)},image(e,t,n,o,s){const i=e[t],r=s.renderInlineAsText(i.children||[],n,o),l=i.attrIndex("alt");return l>=0&&i.attrs?i.attrs[l][1]=r:i.attrs?i.attrs.push(["alt",r]):i.attrs=[["alt",r]],Bm(i,n.xhtmlOut===!0)},hardbreak(e,t,n){return n.xhtmlOut?`
    -`:`
    -`},softbreak(e,t,n){return n.breaks?n.xhtmlOut?`
    -`:`
    -`:` -`},text(e,t){return Jn(e[t].content)},text_special(e,t){return Jn(e[t].content)},html_block(e,t){return e[t].content},html_inline(e,t){return e[t].content}};function sC(e,t,n){const o=e.info?AE(e.info).trim():"",{langName:s,langAttrs:i}=FE(o),r=t.highlight,l=Jn(e.content);if(!r)return F1(e,l,o,s,t);const a=r(e.content,s,i);if(u2(a))throw new TypeError('Renderer rule "fence" returned a Promise. Use renderAsync() instead.');return F1(e,a||l,o,s,t)}function y9(e,t,n,o){switch(e.type){case"text":return t.text===En.text?e.content.length===0?"":Jn(e.content):null;case"text_special":return t.text_special===En.text_special?e.content.length===0?"":Jn(e.content):null;case"softbreak":return t.softbreak===En.softbreak?o:null;case"hardbreak":return t.hardbreak===En.hardbreak?n:null;case"html_inline":return t.html_inline===En.html_inline?e.content:null;case"code_inline":return t.code_inline===En.code_inline?mp(e):null;default:return null}}function Aee(e,t,n,o,s){const i=e[0];switch(i.type){case"text":if(s.text===En.text)return i.content.length===0?"":Jn(i.content);break;case"text_special":if(s.text_special===En.text_special)return i.content.length===0?"":Jn(i.content);break;case"softbreak":if(s.softbreak===En.softbreak)return t.breaks?t.xhtmlOut?`
    -`:`
    -`:` -`;break;case"hardbreak":if(s.hardbreak===En.hardbreak)return t.xhtmlOut?`
    -`:`
    -`;break;case"html_inline":if(s.html_inline===En.html_inline)return i.content;break;case"code_inline":if(s.code_inline===En.code_inline)return mp(i);break}const r=s[i.type];if(!r)return Bm(i,t.xhtmlOut===!0);const l=r(e,0,t,n,o);return typeof l=="string"?l:Rh(l,i.type)}var Mee=class{rules;baseOptions;normalizedBase;constructor(e={}){this.baseOptions={...e},this.normalizedBase=this.buildNormalizedBase(),this.rules={...En}}set(e){return this.baseOptions={...this.baseOptions,...e},this.normalizedBase=this.buildNormalizedBase(),this}render(e,t,n){if(!Array.isArray(e))throw new TypeError("render expects token array as first argument");if(e.length===1)return this.renderSingleToken(e,e[0],t,n);const o=this.mergeOptions(t),s=n??{},i=this.rules,r=o.xhtmlOut===!0;let l,a,c,u,d,f,h="",m="",g=!1,b="";for(let _=0;_0&&e[_-1].hidden?` -`:"";if(y==="list_item_open"&&(!v.attrs||v.attrs.length===0)&&_+3${this.renderInlineTokens(S.children||[],o,s)}`,_+=3;continue}}if(_+2 -`,_+=2;continue}}}if(y==="inline"){const L=v.children||[];if(L.length===1){g||(l=i.text,a=i.text_special,c=i.softbreak,u=i.hardbreak,d=i.html_inline,f=i.code_inline,h=o.xhtmlOut?`
    -`:`
    -`,m=o.breaks?h:` -`,g=!0);const S=L[0];switch(S.type){case"text":if(l===En.text){b+=Jn(S.content);continue}break;case"text_special":if(a===En.text_special){b+=Jn(S.content);continue}break;case"softbreak":if(c===En.softbreak){b+=m;continue}break;case"hardbreak":if(u===En.hardbreak){b+=h;continue}break;case"html_inline":if(d===En.html_inline){b+=S.content;continue}break;case"code_inline":if(f===En.code_inline){b+=mp(S);continue}break}}b+=this.renderInlineTokens(L,o,s);continue}const x=i[y];if(!x){const L=v.attrs;if(!v.hidden){if(!L||L.length===0)switch(y){case"hr":b+=r?`


    -`:`
    -`;continue;case"heading_open":b+=`<${v.tag}>`;continue;case"heading_close":b+=` -`;continue;case"paragraph_open":b+=`${w}

    `;continue;case"paragraph_close":b+=`

    -`;continue;case"list_item_open":{const S=e[_+1];b+=w+(S&&(S.type==="inline"||S.hidden||S.nesting===-1&&S.tag==="li")?"
  • ":`
  • -`);continue}case"list_item_close":b+=`
  • -`;continue;case"bullet_list_open":b+=`${w}
      -`;continue;case"bullet_list_close":b+=`
    -`;continue;case"blockquote_open":b+=w+(e[_+1]&&e[_+1].nesting===-1&&e[_+1].tag==="blockquote"?"
    ":`
    -`);continue;case"blockquote_close":b+=`
    -`;continue;case"ordered_list_open":b+=`${w}
      -`;continue;case"ordered_list_close":b+=`
    -`;continue;case"table_open":b+=`${w} -`;continue;case"table_close":b+=`
    -`;continue;case"thead_open":b+=`${w} -`;continue;case"thead_close":b+=` -`;continue;case"tbody_open":b+=`${w} -`;continue;case"tbody_close":b+=` -`;continue;case"tr_open":b+=`${w} -`;continue;case"tr_close":b+=` -`;continue;case"td_open":b+=`${w}`;continue;case"td_close":b+=` -`;continue;case"th_open":b+=`${w}`;continue;case"th_close":b+=` -`;continue}else if(L.length===1){const S=L[0];if(y==="ordered_list_open"&&S[0]==="start"){b+=`${w}
      -`;continue}if(y==="td_open"&&S[0]==="style"){b+=`${w}`;continue}if(y==="th_open"&&S[0]==="style"){b+=`${w}`;continue}}}b+=this.renderToken(e,_,o);continue}if(y==="code_block"&&x===En.code_block){b+=v3(v);continue}if(y==="fence"&&x===En.fence){b+=sC(v,o);continue}if(y==="html_block"&&x===En.html_block){b+=v.content;continue}const A=x(e,_,o,s,this);typeof A=="string"?b+=A:b+=Rh(A,v.type)}return b}async renderAsync(e,t,n){if(!Array.isArray(e))throw new TypeError("render expects token array as first argument");const o=this.mergeOptions(t),s=n??{},i=this.rules;let r="";for(let l=0;l0&&e[t-1].hidden?` -`:"",u=a?`> -`:">";if(!l||l.length===0)return i===0?n.xhtmlOut?`${c}<${r} /${u}`:`${c}<${r}${u}`:i===-1?`${c}(n||(n={...t}),n);if(nh.call(e,"highlight")&&e.highlight!==t.highlight&&(o().highlight=e.highlight),nh.call(e,"langPrefix")){const s=e.langPrefix;s!==t.langPrefix&&(o().langPrefix=s)}if(nh.call(e,"xhtmlOut")){const s=e.xhtmlOut;s!==t.xhtmlOut&&(o().xhtmlOut=s)}if(nh.call(e,"breaks")){const s=e.breaks;s!==t.breaks&&(o().breaks=s)}return n||t}buildNormalizedBase(){return Object.freeze({...See,...this.baseOptions})}renderSingleToken(e,t,n,o){const s=this.rules,i=t.type;if(i==="code_block"&&s.code_block===En.code_block)return v3(t);if(i==="html_block"&&s.html_block===En.html_block)return t.content;const r=this.mergeOptions(n),l=o??{};if(i==="inline")return this.renderInlineTokens(t.children||[],r,l);const a=s[i];if(!a)return t.block?this.renderToken(e,0,r):Bm(t,r.xhtmlOut===!0);if(i==="fence"&&a===En.fence)return sC(t,r);const c=a(e,0,r,l,this);return typeof c=="string"?c:Rh(c,i)}renderInlineTokens(e,t,n){if(!e||e.length===0)return"";const o=this.rules;if(e.length===1)return Aee(e,t,n,this,o);const s=t.xhtmlOut===!0,i=s?`
      -`:`
      -`,r=t.breaks?i:` -`,l=o.text,a=o.text_special,c=o.softbreak,u=o.hardbreak,d=o.html_inline,f=o.code_inline,h=o.link_open,m=o.link_close,g=o.em_open,b=o.em_close,_=o.strong_open,v=o.strong_close;let y="";for(let w=0;w`;if(c===En.softbreak&&w+3`,w+=1;continue}if(x.type==="em_open"&&!g&&!b&&w+2${T}`,w+=2;continue}}}if(x.type==="strong_open"&&!_&&!v&&w+2${T}`,w+=2;continue}}}switch(x.type){case"text":if(l===En.text){const S=x.content.length===0?"":Jn(x.content);if(d===En.html_inline&&w+1=4)return!0;continue}if(l===9){if(r+=4-r%4,i++,r>=4)return!0;continue}break}if(i0&&c<=6){if(a=3)return!0;break}default:if(l>=48&&l<=57){let a=i+1;for(;a57)break;a++}if(a=pe,!ne&&ve!==void 0&&(ge=Oo(e),ne=ge>=ve)),ne){const j=this.parseFullDocument(e,$,n,ge,!1);return this.stats.total+=1,this.stats.fullParses+=1,this.stats.lastMode="full",Qo($,{area:"stream",path:"stream-full",reason:"skip-cache-large-one-shot",unbounded:!!Dl($)?.unbounded}),j.tokens}else if(z){const j=(ce,he,Ie)=>ceIe?Ie:ce;ge===void 0&&(ge=Oo(e));const Y=X&&!Q?eC(e.length,ge,n.options):null,fe=Y?.maxChunkChars??(W?j(Math.ceil(e.length/U),8e3,64e3):G??1e4),ue=Y?.maxChunkLines??(W?j(Math.ceil(ge/U),150,700):Z??200),de=Y?.maxChunks??(W?j(Math.ceil(e.length/64e3),U,32):ee),J=e.length>0&&e.charCodeAt(e.length-1)===10,se=P&&e.length>=this.IMPLICIT_STREAM_CHUNK_MIN_CHARS&&Y?.strategy!=="plain";if((O||se)&&(e.length>=fe*2||ge>=ue*2)&&J){const ce=Dm(n,e,$,{maxChunkChars:fe,maxChunkLines:ue,fenceAware:Y?.fenceAware??oe,maxChunks:de});return this.cache={src:e,tokens:ce,env:$,lineCount:ge,lastSegment:void 0,globalStateReason:_i(e)},this.updateCacheLineCount(this.cache,ge),this.recordChunkedParseResult($,O?"explicit-initial-large-doc":"default-initial-large-doc"),ce}}const ae=this.parseFullDocument(e,$,n,ge);return ge=ae.lineCount,this.cache={src:e,tokens:ae.tokens,env:$,lineCount:ge,lastSegment:void 0,globalStateReason:_i(e)},this.updateCacheLineCount(this.cache,ge),this.stats.total+=1,this.stats.fullParses+=1,this.stats.lastMode="full",Qo($,{area:"stream",path:"stream-full",reason:"initial-parse",unbounded:!!Dl($)?.unbounded}),ae.tokens}if(e===s.src)return this.stats.total+=1,this.stats.cacheHits+=1,this.stats.lastMode="cache",Qo(s.env,{area:"stream",path:"stream-cache",reason:"same-source"}),s.tokens;const i=e.startsWith(s.src)?e.slice(s.src.length):null;let r=s.globalStateReason;r===void 0&&(r=_i(s.src),s.globalStateReason=r);const l=r?null:i!==null?this.detectGlobalStateForAppend(s,i):_i(e),a=r||l;if(a){const $=o??s.env;ta($);const D=_i(e),H=this.parseFullDocument(e,$,n),O=H.tokens,P=H.lineCount;return this.cache={src:e,tokens:O,env:$,lineCount:P,lastSegment:void 0,globalStateReason:D},this.updateCacheLineCount(this.cache,P),this.stats.total+=1,this.stats.fullParses+=1,this.stats.lastMode="full",Qo($,{area:"stream",path:"stream-full",reason:`global-state:${a}`,unbounded:!!Dl($)?.unbounded}),O}const c=n.options?.streamOptimizationMinSize??this.MIN_SIZE_FOR_OPTIMIZATION;if(s.src.length5e3?D=8:u.length>1e3?D=6:u.length>200&&(D=4),D=Math.min(D,$);let H=null;const O=n.options?.streamContextParseStrategy??"chars",P=n.options?.streamContextParseMinChars??200,z=n.options?.streamContextParseMinLines??2;let W;const U=()=>(W===void 0&&(W=Oo(u)),W),G=this.canDirectlyParseAppend(s),Z=G&&this.shouldUseUnboundedAppend(e,s,u);let ee=!1;if(!G)switch(O){case"lines":ee=U()>=z;break;case"constructs":if(u.length>=P){ee=!0;break}if(Iee(u)){ee=!0;break}ee=U()>=z;break;case"chars":default:ee=u.length>=P}if(D>0&&ee){const oe=this.getTailLines(s.src,D)+u;try{const xe=this.core.parse(oe,s.env,n).tokens,pe=xe.findIndex(ve=>ve.map&&typeof ve.map[1]=="number"&&ve.map[1]>D);if(pe!==-1){const ve=xe.slice(pe),ge=$-D;ge!==0&&this.shiftTokenLines(ve,ge),H={tokens:ve}}}catch{H=null}}else H=null;if(!H){const oe=$;if(Z)H={tokens:N1(n,u,s.env,{mode:"stream"})},oe>0&&this.shiftTokenLines(H.tokens,oe);else{const xe=this.core.parse(u,s.env,n);oe>0&&this.shiftTokenLines(xe.tokens,oe),H=xe}}let Q=0;if(s.tokens.length>0&&H.tokens.length>0){const oe=s.tokens[s.tokens.length-1],xe=H.tokens[0];try{oe.type==="inline"&&xe.type==="inline"&&(xe.children&&xe.children.length>0&&(oe.children||(oe.children=[]),this.appendTokens(oe.children,xe.children)),oe.content=(oe.content||"")+(xe.content||""),Q=1)}catch{Q=0}}const X=s.tokens.length;if(H.tokens.length>Q){const oe=s.tokens,xe=H.tokens,pe=Math.min(oe.length,xe.length-Q);let ve=0;for(let ge=pe;ge>0;ge--){let ne=!0;for(let ae=0;ae0&&(Q+=ve),xe.length>Q&&this.appendTokens(s.tokens,xe,Q)}if(s.src=e,s.globalStateReason=null,s.lineCount=$+(W??U()),s.tokens.length>X){const oe=this.getLastSegment(s.tokens,e,X,s.tokens.length,e.length-u.length,$);oe?s.lastSegment=oe:s.lastSegment=void 0}else s.lastSegment=void 0;return this.stats.total+=1,this.stats.appendHits+=1,Z&&(this.stats.unboundedAppendHits=(this.stats.unboundedAppendHits||0)+1),this.stats.lastMode="append",Qo(s.env,{area:"stream",path:Z?"stream-unbounded-append":"stream-append",reason:Z?"large-delta":"safe-append",unbounded:Z}),s.tokens}const d=o??s.env,f=this.tryTailSegmentReparse(e,s,d,n);if(f)return this.stats.total+=1,this.stats.tailHits+=1,this.stats.lastMode="tail",Qo(d,{area:"stream",path:"stream-tail",reason:"tail-reparse"}),f;const h=!!n.__explicitStreamChunkFallbackSetting,m=typeof n.__canUseImplicitLargeInputStrategy=="function"?n.__canUseImplicitLargeInputStrategy():!0,g=!!n.options?.streamChunkedFallback,b=!h&&!u&&m,_=g||b,v=n.options?.streamChunkAdaptive!==!1,y=n.options?.streamChunkTargetChunks??8,w=n.options?.streamChunkSizeChars,x=n.options?.streamChunkSizeLines,A=n.options?.streamChunkMaxChunks,L=!!n.__explicitStreamChunkConfig,S=n.options?.autoTuneChunks!==!1,T=n.options?.streamChunkFenceAware??!0;let R=u&&s.lineCount!==void 0?s.lineCount+Oo(u):void 0;if(_){R===void 0&&(R=Oo(e));const $=(U,G,Z)=>UZ?Z:U,D=S&&!L?eC(e.length,R,n.options):null,H=D?.maxChunkChars??(v?$(Math.ceil(e.length/y),8e3,64e3):w??1e4),O=D?.maxChunkLines??(v?$(Math.ceil(R/y),150,700):x??200),P=D?.maxChunks??(v?$(Math.ceil(e.length/64e3),y,32):A),z=e.length>0&&e.charCodeAt(e.length-1)===10,W=b&&e.length>=this.IMPLICIT_STREAM_CHUNK_MIN_CHARS&&D?.strategy!=="plain";if((g||W)&&(e.length>=H*2||R>=O*2)&&z){const U=Dm(n,e,d,{maxChunkChars:H,maxChunkLines:O,fenceAware:D?.fenceAware??T,maxChunks:P});return this.cache={src:e,tokens:U,env:d,lineCount:R,lastSegment:void 0,globalStateReason:_i(e)},this.updateCacheLineCount(this.cache,R),this.recordChunkedParseResult(d,g?"explicit-fallback-large-doc":"default-fallback-large-doc"),U}}const B=this.parseFullDocument(e,d,n,R),I=B.tokens;return R=B.lineCount,this.cache={src:e,tokens:I,env:d,lineCount:R,lastSegment:void 0,globalStateReason:_i(e)},this.updateCacheLineCount(this.cache,R),this.stats.total+=1,this.stats.fullParses+=1,this.stats.lastMode="full",Qo(d,{area:"stream",path:"stream-full",reason:"fallback-full",unbounded:!!Dl(d)?.unbounded}),I}recordChunkedParseResult(e,t){const n=Dl(e)?.chunk,o=n?.fallback?String(n.fallbackReason||"global-state"):null;if(this.stats.total+=1,o){this.stats.fullParses+=1,this.stats.lastMode="full",Qo(e,{area:"stream",path:"stream-full",reason:`global-state:${o}`,unbounded:!!Dl(e)?.unbounded});return}this.stats.chunkedParses=(this.stats.chunkedParses||0)+1,this.stats.lastMode="chunked",Qo(e,{area:"stream",path:"stream-chunked",chunked:!0,reason:t})}parseFullDocument(e,t,n,o,s=!0){const i=_i(e);Op(t)&&ta(t);const r=typeof n.__canUseImplicitLargeInputStrategy!="function"||n.__canUseImplicitLargeInputStrategy()?$E(n,e.length,o):"no";if(r==="yes"){const a=N1(n,e,t);return Qo(t,{area:"stream",path:"stream-full",reason:"auto-unbounded-char-threshold",unbounded:!0}),{tokens:a,lineCount:o??(s?Oo(e):0)}}let l=o;if(r==="need-lines"&&(l=Oo(e),LE(n,e.length,l))){const a=N1(n,e,t);return Qo(t,{area:"stream",path:"stream-full",reason:"auto-unbounded-line-threshold",unbounded:!0}),{tokens:a,lineCount:l}}return l===void 0&&(l=s?Oo(e):0),{tokens:Fd(t,i,()=>this.core.parse(e,t,n).tokens),lineCount:l}}shouldUseUnboundedAppend(e,t,n){return!n||e.length=this.MIN_UNBOUNDED_APPEND_CHARS?!0:Oo(n)>=this.MIN_UNBOUNDED_APPEND_LINES}getAppendedSegment(e,t,n){if(n===null||n===void 0&&!t.startsWith(e)||!e.endsWith(` -`))return null;const o=n??t.slice(e.length);if(!o)return null;const s=o.length;if(o.charCodeAt(s-1)!==10)return null;let i=0,r=-1;for(let a=0;a=2));a++);if(i<2)return null;const l=(r===-1?o:o.slice(0,r)).trim();if(l.length===0)return null;if(/^[-=]+$/.test(l)){const a=e.slice(0,-1),c=a.lastIndexOf(` -`);if(a.slice(c+1).trim().length>0)return null}return this.endsInsideOpenFence(e)||this.mayContainReferenceDefinition(o)?null:o}tryTailSegmentReparse(e,t,n,o){const s=this.ensureLastSegment(t);if(!s||s.srcOffset<=0&&s.tokenStart<=0)return null;const i=t.src.slice(0,s.srcOffset);if(!e.startsWith(i))return null;const r=t.src.slice(s.srcOffset),l=e.slice(s.srcOffset);if(l===r)return null;const a=e.startsWith(t.src)?e.slice(t.src.length):null;if(a){const c=this.tryContainerTailAppendMerge(e,t,n,o,s,a);if(c)return c}if(this.mayContainReferenceDefinition(r)||this.mayContainReferenceDefinition(l))return null;try{const c=this.core.parse(l,n,o),u=this.getLastSegment(c.tokens,l);return s.lineStart>0&&this.shiftTokenLines(c.tokens,s.lineStart),t.src=e,t.env=n,t.globalStateReason=null,t.globalStateCarry=void 0,t.tokens.length=s.tokenStart,this.appendTokens(t.tokens,c.tokens),t.lineCount=s.lineStart+Oo(l),u?t.lastSegment={tokenStart:s.tokenStart+u.tokenStart,tokenEnd:s.tokenStart+u.tokenEnd,lineStart:s.lineStart+u.lineStart,lineEnd:s.lineStart+u.lineEnd,srcOffset:s.srcOffset+u.srcOffset}:t.lastSegment=null,t.tokens}catch{return null}}getTailLines(e,t){if(t<=0)return"";let n=t;for(let o=e.length-1;o>=0;o--)if(e.charCodeAt(o)===10&&(n--,n===0))return e.slice(o+1);return e}endsInsideOpenFence(e){const n=e.length>4e3?e.length-4e3:0,o=e.slice(n),s=o.length;let i=null,r=0;for(;r<=s;){let l=o.indexOf(` -`,r);l===-1&&(l=s);let a=r;for(;a=3&&(i?i.marker===c&&d>=i.length&&(i=null):i={marker:c,length:d})}}if(l===s)break;r=l+1}return i!==null}peek(){return this.cache?.tokens??Eee}getStats(){return{...this.stats}}appendTokens(e,t,n=0,o=t.length){for(let s=n;sk9?n.slice(n.length-k9):n,o&&(e.globalStateReason=o),o}ensureLastSegment(e){return e.lastSegment!==void 0||(e.lastSegment=this.getLastSegment(e.tokens,e.src)),e.lastSegment}getLastSegment(e,t,n=0,o=e.length,s,i){if(o<=n)return null;let r=Number.POSITIVE_INFINITY,l=-1,a=0;for(let c=o-1;c>=n;c--){const u=e[c];if(u.map&&(u.map[0]l&&(l=u.map[1])),u.nesting<0){a+=-u.nesting;continue}if(u.nesting>0){if(a-=u.nesting,u.level===0&&a<=0){const d=Number.isFinite(r)?r:u.map?.[0]??0,f=l>=d?l:u.map?.[1]??d;return{tokenStart:c,tokenEnd:o,lineStart:d,lineEnd:f,srcOffset:this.getLineStartOffset(t,d,s,i)}}continue}if(u.level===0&&a===0){const d=Number.isFinite(r)?r:u.map?.[0]??0,f=l>=d?l:u.map?.[1]??d;return{tokenStart:c,tokenEnd:o,lineStart:d,lineEnd:f,srcOffset:this.getLineStartOffset(t,d,s,i)}}}return null}getLineStartOffset(e,t,n,o){if(n!==void 0&&o!==void 0&&t>=o)return this.getLineStartOffsetFrom(e,n,t-o);if(t<=0)return 0;let s=t,i=-1;for(;s>0;){if(i=e.indexOf(` -`,i+1),i===-1)return e.length;s--}return i+1}getLineStartOffsetFrom(e,t,n){if(n<=0)return t;let o=n,s=t-1;for(;o>0;){if(s=e.indexOf(` -`,s+1),s===-1)return e.length;o--}return s+1}mayContainReferenceDefinition(e){return e.includes("]:")?/(?:^|\n)[ \t]{0,3}\[[^\]\n]+\]:/.test(e):!1}canDirectlyParseAppend(e){if(!this.endsWithBlankLine(e.src))return!1;const t=this.ensureLastSegment(e);if(!t)return!1;switch(e.tokens[t.tokenStart]?.type){case"paragraph_open":case"heading_open":case"fence":case"code_block":case"html_block":case"hr":case"table_open":return!0;default:return!1}}tryContainerTailAppendMerge(e,t,n,o,s,i){if(!i||this.mayContainReferenceDefinition(i))return null;const r=t.tokens[s.tokenStart];switch(r?.type){case"bullet_list_open":case"ordered_list_open":return this.tryListTailAppendMerge(e,t,n,o,s,i,r);case"table_open":return this.tryTableTailAppendMerge(e,t,n,o,s,i,r);default:return null}}tryListTailAppendMerge(e,t,n,o,s,i,r){if(t.src.length===0||t.src.charCodeAt(t.src.length-1)!==10)return null;const l=s.lineEnd-s.lineStart,a=t.src.length-s.srcOffset;if(l0&&this.shiftTokenLines(d,f);const h=this.getListParagraphMode(t.tokens,s.tokenStart,t.tokens.length,r.level),m=this.getListParagraphMode(u,0,u.length,0);(h==="loose"||m==="loose"||this.endsWithBlankLine(t.src)||(u[0]?.map?.[0]??0)>0)&&(this.setListParagraphVisibility(t.tokens,s.tokenStart,t.tokens.length,r.level,!1),this.setListParagraphVisibility(d,0,d.length,r.level,!1)),t.tokens.splice(t.tokens.length-1,0,...d),t.src=e,t.env=n,t.globalStateReason=null;const g=f+Oo(i);t.lineCount=g;const b=this.getDocLineCount(e,g);return r.map&&(r.map[1]=b),t.lastSegment={tokenStart:s.tokenStart,tokenEnd:t.tokens.length,lineStart:s.lineStart,lineEnd:b,srcOffset:s.srcOffset},t.tokens}tryTableTailAppendMerge(e,t,n,o,s,i,r){if(t.src.length===0||t.src.charCodeAt(t.src.length-1)!==10||/(?:^|\n)[ \t]*\n/.test(i))return null;const l=s.lineEnd-s.lineStart,a=t.src.length-s.srcOffset;if(l=0?d.slice(f.tbodyOpenIndex+1,f.tbodyCloseIndex):d.slice(f.tbodyOpenIndex,f.tbodyCloseIndex+1);if(m.length===0)return null;const g=s.lineEnd-2;g!==0&&this.shiftTokenLines(m,g);const b=h.tbodyCloseIndex>=0?h.tbodyCloseIndex:h.tableCloseIndex,_=t.lineCount??Oo(t.src);t.tokens.splice(b,0,...m),t.src=e,t.env=n,t.globalStateReason=null;const v=_+Oo(i);t.lineCount=v;const y=this.getDocLineCount(e,v);if(r.map&&(r.map[1]=y),h.tbodyOpenIndex>=0){const w=t.tokens[h.tbodyOpenIndex];w?.map&&(w.map[1]=y)}return t.lastSegment={tokenStart:s.tokenStart,tokenEnd:t.tokens.length,lineStart:s.lineStart,lineEnd:y,srcOffset:s.srcOffset},t.tokens}getTableHeaderContext(e){const t=e.indexOf(` -`);if(t<0)return null;const n=e.indexOf(` -`,t+1);return n<0?null:e.slice(0,n+1)}getTableBodySection(e,t,n,o){if(t<0||t>=n||e[t]?.type!=="table_open")return null;let s=-1;for(let l=n-1;l>t;l--){const a=e[l];if(a.type==="table_close"&&a.level===o){s=l;break}}if(s<0)return null;let i=-1,r=-1;for(let l=t+1;l=0){for(let l=s-1;l>i;l--){const a=e[l];if(a.type==="tbody_close"&&a.level===o+1){r=l;break}}if(r<0)return null}return{tableCloseIndex:s,tbodyOpenIndex:i,tbodyCloseIndex:r}}isSingleTopLevelContainer(e,t,n,o){if(e.length<2)return!1;const s=e[0],i=e[e.length-1];if(s.type!==t||i.type!==n||s.level!==0||i.level!==0||o!==void 0&&s.markup!==o)return!1;let r=0;for(let l=0;l0&&l0||a.nesting<0)&&(r+=a.nesting)}return r===0}getListParagraphMode(e,t,n,o){let s=!1,i=!1;const r=o+2;for(let l=t;l=0;){const o=e.charCodeAt(n);if(o===32||o===9){n--;continue}return o===10}return!0}getDocLineCount(e,t=Oo(e)){return e.length===0?0:e.charCodeAt(e.length-1)===10?t:t+1}shiftTokenLines(e,t){if(t===0)return;let n=null;for(let o=0;o=0;i--)n.push(s.children[i]);for(;n.length>0;){const i=n.pop();if(i.map&&(i.map[0]+=t,i.map[1]+=t),i.children)for(let r=i.children.length-1;r>=0;r--)n.push(i.children[r])}}}}};const rC={default:Cee,zero:wee,commonmark:bee};function Oee(e){return{core:e.core.ruler.version,block:e.block.ruler.version,inline:e.inline.ruler.version,inline2:e.inline.ruler2.version}}function Fee(e,t){return e.core.ruler.version!==t.core||e.block.ruler.version!==t.block||e.inline.ruler.version!==t.inline||e.inline.ruler2.version!==t.inline2}function lC(e){return e.experimental?{...e,...e.experimental}:e}function hr(e,t){if(!e)return!1;if(Object.prototype.hasOwnProperty.call(e,t)&&e[t]!==void 0)return!0;const n=e.experimental;return!!n&&Object.prototype.hasOwnProperty.call(n,t)&&n[t]!==void 0}function aC(e,t,n){for(let o=0;o=4?n.quotes=[S[0],S[1],S[2],S[3]]:n.quotes=["“","”","‘","’"]}let r=aC(i?.options,s,["fullChunkSizeChars","fullChunkSizeLines","fullChunkMaxChunks"]),l=aC(i?.options,s,["streamChunkSizeChars","streamChunkSizeLines","streamChunkMaxChunks"]),a=cC(i?.options,s,"fullChunkedFallback"),c=cC(i?.options,s,"streamChunkedFallback"),u=!1,d=null,f=null;const h=new SQ;let m=null;const g=()=>(m||(m=new Tee(n)),m);let b=null;const _=()=>(b||(b=new Nee(h)),b);let v=null;const y=()=>(v||(v=new WT),v),w=S=>!u&&!!d&&!Fee(S,d),x=(S,T)=>o==="default"&&!u&&m===null&&f!==null&&S.parse===f&&w(S)&&!S.stream.enabled&&T<(S.options.autoUnboundedThresholdChars??4e6)&&S.options.html===!1&&S.options.xhtmlOut===!1&&S.options.breaks===!1&&S.options.langPrefix==="language-"&&S.options.linkify===!1&&S.options.typographer===!1&&S.options.highlight===null,A=(S,T)=>o==="default"&&!u&&w(S)&&!S.stream.enabled&&!S.options.fullChunkedFallback&&T<(S.options.autoUnboundedThresholdChars??4e6)&&S.options.html===!1&&S.options.linkify===!1&&S.options.typographer===!1,L={core:h,block:h.block,inline:h.inline,get linkify(){const S=y();return Object.defineProperty(this,"linkify",{value:S,writable:!0,configurable:!0}),S},get renderer(){const S=g();return Object.defineProperty(this,"renderer",{value:S,writable:!0,configurable:!0}),S},options:n,__explicitFullChunkConfig:r,__explicitStreamChunkConfig:l,__explicitFullChunkFallbackSetting:a,__explicitStreamChunkFallbackSetting:c,__canUseImplicitLargeInputStrategy(){return w(this)},set(S){const T=lC(S);return this.options={...this.options,...T},(hr(S,"fullChunkSizeChars")||hr(S,"fullChunkSizeLines")||hr(S,"fullChunkMaxChunks"))&&(r=!0,this.__explicitFullChunkConfig=!0),(hr(S,"streamChunkSizeChars")||hr(S,"streamChunkSizeLines")||hr(S,"streamChunkMaxChunks"))&&(l=!0,this.__explicitStreamChunkConfig=!0),hr(S,"fullChunkedFallback")&&(a=!0,this.__explicitFullChunkFallbackSetting=!0),hr(S,"streamChunkedFallback")&&(c=!0,this.__explicitStreamChunkFallbackSetting=!0),m&&m.set(T),typeof T.stream=="boolean"&&(this.stream.enabled=T.stream,b&&(b.reset(),b.resetStats())),this},configure(S){const T=typeof S=="string"?rC[S]:S;if(!T)throw new Error("Wrong `markdown-it` preset, can't be empty");if(T.options&&this.set(T.options),T.components){const R=T.components;R.core?.rules&&this.core.ruler.enableOnly(R.core.rules),R.block?.rules&&this.block.ruler.enableOnly(R.block.rules),R.inline?.rules&&this.inline.ruler.enableOnly(R.inline.rules),R.inline2?.rules&&this.inline.ruler2.enableOnly(R.inline2.rules)}return this},enable(S,T){const R=Array.isArray(S)?S:[S],B=[this.core?.ruler,this.block?.ruler,this.inline?.ruler,this.inline?.ruler2],I=new Set;for(const $ of B){if(!$)continue;const D=$.enable(R,!0);for(let H=0;H!I.has(D));if($.length)throw new Error(`Rules manager: invalid rule name ${$.join(", ")}`)}return this},disable(S,T){const R=Array.isArray(S)?S:[S],B=[this.core?.ruler,this.block?.ruler,this.inline?.ruler,this.inline?.ruler2],I=new Set;for(const $ of B){if(!$)continue;const D=$.disable(R,!0);for(let H=0;H!I.has(D));if($.length)throw new Error(`Rules manager: invalid rule name ${$.join(", ")}`)}return this},use(S,...T){const R=typeof S=="function"?S:S&&typeof S.default=="function"?S.default:void 0;if(!R)throw new TypeError("MarkdownIt.use: plugin must be a function");const B=[this,...T],I=S;return u=!0,R.apply(I,B),this},render(S,T){let R;if(x(this,S.length)){T!==void 0&&(oi(T),R=a9("render"));const $=R?ed():0,D=R?Xb(S,R):Yb(S);if(R&&(R.attemptMs=ed()-$,D===null&&(R.fallbackReason="unsupported-stock-subset"),Zf(T,R)),D!==null)return T!==void 0&&Qo(T,{area:"render",path:"stock-fast",reason:"stock-subset"}),D}const B=T??{},I=this.parse(S,B);return R&&Zf(B,R),g().render(I,this.options,B)},async renderAsync(S,T){let R;if(x(this,S.length)){T!==void 0&&(oi(T),R=a9("render"));const $=R?ed():0,D=R?Xb(S,R):Yb(S);if(R&&(R.attemptMs=ed()-$,D===null&&(R.fallbackReason="unsupported-stock-subset"),Zf(T,R)),D!==null)return T!==void 0&&Qo(T,{area:"render",path:"stock-fast",reason:"stock-subset"}),D}const B=T??{},I=this.parse(S,B);return R&&Zf(B,R),g().renderAsync(I,this.options,B)},renderIterable(S,T={}){const R=this.parseIterable(S,T);return g().render(R,this.options,T)},async renderAsyncIterable(S,T={}){const R=await this.parseAsyncIterable(S,T);return g().renderAsync(R,this.options,T)},renderInline(S,T={}){const R=this.parseInline(S,T);return g().render(R,this.options,T)},validateLink:yE,normalizeLink:kE,normalizeLinkText:bE,utils:tX,helpers:{...UX},parse(S,T){if(typeof S!="string")throw new TypeError("Input data should be a String");if(T!==void 0&&oi(T),A(this,S.length)){const $=T===void 0?void 0:a9("parse"),D=$?ed():0,H=PQ(S,$);if($&&($.attemptMs=ed()-D,H===null&&($.fallbackReason="unsupported-stock-subset"),Zf(T,$)),H!==null)return T!==void 0&&Qo(T,{area:"parse",path:"stock-fast",reason:"stock-subset"}),H}const R=T??{};let B;if(!this.stream.enabled&&!this.options.fullChunkedFallback&&w(this)){const $=$E(this,S.length);if($==="yes"){const D=N1(this,S,R);return Qo(T,{area:"parse",path:"auto-unbounded",unbounded:!0,reason:"char-threshold"}),D}$==="need-lines"&&(B=Oo(S))}if(!this.stream.enabled){const $=S.length,D=this.options.autoTuneChunks!==!1,H=r,O=!a&&w(this),P=!!this.options.fullChunkedFallback,z=O&&$>=2e5;let W;(P||z||B!==void 0)&&(W=B??Oo(S));const U=(P||z)&&D&&!H?kee($,W,this.options):null;if(P||z){const G=W??0;if(P?$>=(this.options.fullChunkThresholdChars??2e4)||G>=(this.options.fullChunkThresholdLines??400):z){if(U&&U.strategy!=="plain"){const Z=Dm(this,S,R,{maxChunkChars:U.maxChunkChars,maxChunkLines:U.maxChunkLines,fenceAware:U.fenceAware,maxChunks:U.maxChunks});return T&&uC(T,P?"explicit-full-chunk":"default-large-string"),Z}if(P){const Z=(ne,ae,j)=>nej?j:ne,ee=this.options.fullChunkAdaptive!==!1,Q=this.options.fullChunkTargetChunks??8,X=Z(Math.ceil($/Q),8e3,64e3),oe=Z(Math.ceil(G/Q),150,700),xe=ee?X:this.options.fullChunkSizeChars??1e4,pe=ee?oe:this.options.fullChunkSizeLines??200,ve=ee?Z(Math.ceil($/64e3),Q,32):this.options.fullChunkMaxChunks,ge=Dm(this,S,R,{maxChunkChars:xe,maxChunkLines:pe,fenceAware:this.options.fullChunkFenceAware??!0,maxChunks:ve});return T&&uC(T,"explicit-full-chunk"),ge}}}if(B!==void 0&&w(this)&&LE(this,$,W??B)){const G=N1(this,S,R);return Qo(T,{area:"parse",path:"auto-unbounded",unbounded:!0,reason:"line-threshold"}),G}}const I=_i(S);return Qo(T,{area:"parse",path:"plain",reason:"default-plain"}),Fd(R,I,()=>h.parse(S,R,this).tokens)},parseIterable(S,T={}){return oi(T),mee(this,S,T)},parseAsyncIterable(S,T={}){return oi(T),gee(this,S,T)},parseIterableToSink(S,T,R={}){return oi(R),vee(this,S,T,R)},parseAsyncIterableToSink(S,T,R={}){return oi(R),yee(this,S,T,R)},parseInline(S,T={}){if(typeof S!="string")throw new TypeError("Input data should be a String");oi(T),Op(T)&&ta(T);const R=h.createState(S,T,this);return R.inlineMode=!0,h.process(R),R.tokens}};if(L.stream={enabled:!!n.stream,parse(S,T){return L.stream.enabled?_().parse(S,T,L):L.parse(S,T??{})},reset(){_().reset()},peek(){return b?b.peek():[]},stats(){return b?b.getStats():{total:0,cacheHits:0,appendHits:0,unboundedAppendHits:0,tailHits:0,fullParses:0,resets:0,chunkedParses:0,lastMode:"idle"}},resetStats(){b&&b.resetStats()}},i?.components){const S=i.components;S.core?.rules&&L.core.ruler.enableOnly(S.core.rules),S.block?.rules&&L.block.ruler.enableOnly(S.block.rules),S.inline?.rules&&L.inline.ruler.enableOnly(S.inline.rules),S.inline2?.rules&&L.inline.ruler2.enableOnly(S.inline2.rules)}return d=Oee(L),f=L.parse,L}var Pee=Ree;const PE=["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"],Dee=["a","abbr","b","bdi","bdo","button","cite","code","data","del","dfn","em","font","i","ins","kbd","label","mark","q","s","samp","small","span","strong","sub","sup","time","u","var"],DE=["article","aside","blockquote","details","div","figcaption","figure","footer","header","h1","h2","h3","h4","h5","h6","li","main","nav","ol","p","pre","section","summary","table","tbody","td","th","thead","tr","ul"],Bee=["svg","g","path"],Hee=["address","audio","body","canvas","caption","colgroup","datalist","dd","dialog","dl","dt","fieldset","form","head","hgroup","html","iframe","legend","map","menu","meter","noscript","object","optgroup","option","output","picture","progress","rp","rt","ruby","script","select","style","template","textarea","tfoot","title","video"],zee=["onclick","onerror","onload","onmouseover","onmouseout","onmousedown","onmouseup","onkeydown","onkeyup","onfocus","onblur","onsubmit","onreset","onchange","onselect","ondblclick","ontouchstart","ontouchend","ontouchmove","ontouchcancel","onwheel","onscroll","oncopy","oncut","onpaste","oninput","oninvalid","onsearch","innerhtml","outerhtml","textcontent","innertext","srcdoc","ping"],Wee=["action","data","href","src","srcset","poster","xlink:href","formaction"],Uee=["script"],jee=["pre","iframe","picture","script","style","table","tbody","td","tfoot","th","thead","textarea","tr","title","video"],Ya=new Set(PE),BE=new Set(DE),gp=new Set([...PE,...Dee,...DE,...Bee]),HE=new Set([...gp,...Hee]),Vee=new Set(zee),qee=new Set(Wee),Pp=new Set(Uee),zE=new Set(jee);function WE(e){let t="";for(const n of e){const o=n.charCodeAt(0);o<=31||o>=127&&o<=159||/\s/u.test(n)||(t+=n)}return t}const Kee={amp:"&",bsol:"\\",colon:":",newline:` -`,sol:"/",tab:" "};function UE(e){return e.replace(/&(?:#(\d+)|#x([0-9a-f]+)|([a-z][a-z0-9]+));?/gi,(t,n,o,s)=>{const i=n??o;if(i){const r=Number.parseInt(i,n?10:16);try{return Number.isFinite(r)?String.fromCodePoint(r):""}catch{return""}}return Kee[String(s??"").toLowerCase()]??t})}const oh=new Set(["http","https","mailto","tel"]),Zee=new Set(["javascript","vbscript","data","file","ftp","blob","filesystem","intent","chrome","chrome-extension","moz-extension","ms-browser-extension","view-source"]),Tc=new Set(["http","https"]);function jE(e){return e.match(/^([a-z][a-z0-9+.-]*):/i)?.[1]?.toLowerCase()??""}const Gee=/^https?:\/\//i;function Yee(e){if(!Gee.test(e))return!1;for(const t of e){const n=t.charCodeAt(0);if(t==="&"||n<=32||n>=127&&n<=159||n>127&&/\s/u.test(t))return!1}return!0}function Xee(e,t,n){if(!R1(t,n)||!e.startsWith("file:///"))return!1;const o=e.charAt(8);return o!=="/"&&o!=="\\"}function R1(e,t){return e?(e==="a"||e==="area")&&(!t||t==="href"||t==="xlink:href"):!t||t==="href"}function Jee(e,t){return t==="href"||t==="xlink:href"?R1(e,t)?oh:Tc:t==="src"||t==="srcset"||t==="poster"||t==="action"||t==="formaction"||t==="data"?Tc:(R1(e,t),oh)}function ou(e,t={}){if(Yee(e))return!1;const n=WE(UE(e)).toLowerCase(),o=String(t.tagName??"").toLowerCase(),s=String(t.attrName??"").toLowerCase();if(!n)return!1;if(n.startsWith("data:")){const r=/^data:image\/(?:png|gif|jpe?g|webp|avif|bmp);/i.test(n);return o==="img"&&s==="src"?!r:!0}if(/^[\\/]{2}/.test(n))return!0;if(n.startsWith("/")||n.startsWith("./")||n.startsWith("../")||n.startsWith("#")||n.startsWith("?"))return!1;const i=jE(n);return i?i==="file"?!Xee(n,o,s):R1(o,s)?Zee.has(i):!Jee(o,s).has(i):!1}function Qee(e){const t=UE(String(e??"")).trim();if(!t||t.startsWith("#")||t.startsWith("/")||t.startsWith("./")||t.startsWith("../")||t.startsWith("?"))return!1;const n=jE(WE(t).toLowerCase());return n==="http"||n==="https"}function ete(e,t={}){const n=String(e??"").trim();return n?ou(n,t)?"":n:""}function dC(e){return ete(e,{tagName:"img",attrName:"src"})}function tte(e,t,n){function o(f){return f.trim().split(" ",2)[0]===t}function s(f,h,m,g,b){return f[h].nesting===1&&f[h].attrJoin("class",t),b.renderToken(f,h,m,g,b)}n=n||{};const i=3,r=n.marker||":",l=r.charCodeAt(0),a=r.length,c=n.validate||o,u=n.render||s;function d(f,h,m,g){let b,_=!1,v=f.bMarks[h]+f.tShift[h],y=f.eMarks[h];if(l!==f.src.charCodeAt(v))return!1;for(b=v+1;b<=y&&r[(b-v)%a]===f.src[b];b++);const w=Math.floor((b-v)/a);if(w=m||(v=f.bMarks[L]+f.tShift[L],y=f.eMarks[L],v=4)){for(b=v+1;b<=y&&r[(b-v)%a]===f.src[b];b++);if(!(Math.floor((b-v)/a)=2){const r=Number(i[0]),l=Number(i[1]);Number.isFinite(r)&&Number.isFinite(l)&&(s.map=[r+t,Math.min(l+t,n)])}Array.isArray(s.children)&&VE(s.children,t,n)}}function ote(e){["admonition","info","warning","error","tip","danger","note","caution"].forEach(t=>{e.use(tte,t,{render(n,o){return n[o].nesting===1?`
      `:`
      -`}})}),e.block.ruler.before("fence","vmr_container_fallback",(t,n,o,s)=>{const i=t,r=i.bMarks[n]+i.tShift[n],l=i.eMarks[n],a=i.src.slice(r,l),c=a.match(/^:::\s*([^\s{]+)/);if(!c)return!1;const u=c[1];if(!u.trim())return!1;const d=a.slice(c[0].length).trim();let f,h;const m=d.indexOf("{"),g=m>=0?d.slice(m).trimStart():void 0;if(m===-1)f=d||void 0;else{if(f=d.slice(0,m).trim()||void 0,g?.startsWith("{")){let A=0,L=-1;for(let S=0;S0&&(h=g.slice(0,L))}h||(f=d||void 0)}if(s)return!0;const b=!!i.env.__markstreamFinal;let _=n+1,v=!1;for(;_<=o;){const A=i.bMarks[_]+i.tShift[_],L=i.eMarks[_];if(i.src.slice(A,L).trim()===":::"){v=!0;break}_++}v||(_=o);const y=i.push("vmr_container_open","div",1);if(y.attrSet("class",`vmr-container vmr-container-${u}`),y.map=[n,v?_:o],y.meta={...y.meta??{},unclosed:!v&&!b},f&&y.attrSet("data-args",f),h)try{const A=JSON.parse(h);for(const[L,S]of Object.entries(A)){const T=S!=null&&typeof S=="object";y.attrSet(`data-${L}`,T?JSON.stringify(S):String(S))}}catch{const A=nte(h);if(A)for(const[L,S]of Object.entries(A)){const T=S!=null&&typeof S=="object";y.attrSet(`data-${L}`,T?JSON.stringify(S):String(S))}else y.attrSet("data-attrs",h)}const w=[];for(let A=n+1;A<_;A++){const L=i.bMarks[A]+i.tShift[A],S=i.eMarks[A];w.push(i.src.slice(L,S))}if(w.some(A=>A.trim().length>0)){let A=w.join(` -`);A.endsWith(` -`)||(A+=` -`),A.endsWith(` - -`)||(A+=` -`);const L=i.tokens[i.tokens.length-1];L&&(L.raw=A);const S=[];i.md.block.parse(A,i.md,i.env,S),VE(S,n+1,n+1+w.length),i.tokens.push(...S)}const x=i.push("vmr_container_close","div",-1);return v||(x.hidden=!0,x.map=[o,o]),i.line=v?_+1:_,!0},{alt:["paragraph","reference","blockquote","list"]})}function qr(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Do(e){let t=!1,n=!1;for(let o=0;o")return o}return-1}function d2(e){const t=[],n=/\s([\w:-]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'>]+)))?/g;let o;for(;(o=n.exec(e))!==null;){const s=o[1];if(!s)continue;const i=o[2]||o[3]||o[4]||"";t.push([s,i])}return t}const ste=/^[a-z][a-z0-9_-]*$/;function fC(e){return ste.test(String(e??"").trim().toLowerCase())}function wr(e){const t=String(e??"").trim();if(!t)return"";if(!t.startsWith("<"))return fC(t)?t.toLowerCase():"";let n=1;for(;n]/.test(i)?"":fC(s)?s:""}function Au(e){if(!e||e.length===0)return[];const t=new Set,n=[];for(const o of e){const s=wr(o);!s||t.has(s)||(t.add(s),n.push(s))}return n}function ite(...e){const t=new Set,n=[];for(const o of e)for(const s of Au(o))t.has(s)||(t.add(s),n.push(s));return n}function rte(e){const t=Au(e);return{key:t.join(","),tags:t}}function qE(e){return wr(e)}function lte(e,t){const n=String(e??""),o=wr(t);if(!o)return!1;const s=qr(o),i=n.match(new RegExp(String.raw`^\s*<\s*${s}(?:\s[^>]*)?(\s*\/)?>`,"i"));return i?i[1]?!0:new RegExp(String.raw`<\s*\/\s*${s}\s*>`,"i").test(n):!1}function KE(e,t){const n=wr(t);return!!n&&!gp.has(n)&&!lte(e,n)}function ate(e,t){const n=String(e??""),o=wr(t);if(!o)return n;const s=qr(o),i=new RegExp(String.raw`^\s*<\s*${s}(?:\s[^>]*)?>\s*`,"i"),r=new RegExp(String.raw`\s*<\s*\/\s*${s}\s*>\s*$`,"i");return n.replace(i,"").replace(r,"")}const ZE=Ya,cte=gp,GE=new Set(BE);GE.delete("details");const ute=/<([A-Z][\w-]*)(?=[\s/>]|$)/gi,dte=/<\/\s*([A-Z][\w-]*)(?=[\s/>]|$)/gi,y3=/^<\s*(?:\/\s*)?([A-Z][\w-]*)/i,fte=/^<\s*([A-Z][\w:-]*)(?=[\s/>]|$)/i;function Hm(e){return(e.match(y3)?.[1]??"").toLowerCase()}function F8(e){return/^\s*<\s*\//.test(e)}function R8(e,t){return ZE.has(t)||/\/\s*>\s*$/.test(e)}function pte(e,t){let n=0;for(let o=0;o0&&n--;continue}R8(s,i)||n++}}return n}function pC(e,t,n=0){const o=new RegExp(String.raw`<\s*(\/?)\s*${qr(t)}(?=[\s>/])[^>]*>`,"gi");o.lastIndex=Math.max(0,n);let s=0,i;for(;(i=o.exec(e))!==null;){const r=i[0]??"",l=!!i[1],a=!l&&/\/\s*>$/.test(r);if(l){if(s===0)return{start:i.index,end:i.index+r.length};s--;continue}a||s++}return null}function mte(e,t){const n=new RegExp(String.raw`<\s*(\/?)\s*${qr(t)}(?=[\s>/])[^>]*>`,"gi");let o=0,s;for(;(s=n.exec(e))!==null;){const i=s[0]??"",r=!!s[1],l=!r&&/\/\s*>$/.test(i);if(r){o>0&&o--;continue}l||o++}return o}function zm(e){const t=e;return String(t.raw??t.content??t.markup??"")}function gte(e){const t=e;return t.meta||(t.meta={}),t.meta}function b9(e,t,n){const o=gte(e);o.markstreamCustomHtmlRaw=t,o.markstreamCustomHtmlInner=n}function vte(e,t){if(!t.size)return;const n=Array.from(t,h=>new RegExp(String.raw`<\s*${qr(h)}(?=[\s>/])`,"i")),o=[];let s=!1;const i=h=>h?n.some(m=>m.test(h)):!1,r=h=>{if(!(!h||!o.length))for(const m of o)m.raw+=h,m.inner+=h},l=()=>{!o.length||!s||(r(` -`),s=!1)},a=h=>{r(h)},c=h=>{for(let g=0;g{const m=o[o.length-1]?.tag;if(!m)return null;const g=new RegExp(String.raw`^\s*<\s*\/\s*${qr(m)}\s*>`,"i");return h.match(g)?.[0]??null},d=h=>!!u(h),f=(h,m,g)=>{const b=g??(h.type==="html_inline"?Hm(m):"");if(!(b&&t.has(b))){r(m);return}const _=F8(m),v=!_&&R8(m,b);if(_){if(!o.length||o[o.length-1].tag!==b){r(m);return}c(m);return}if(r(m),v){b9(h,m,"");return}o.push({tag:b,token:h,raw:m,inner:""})};for(const h of e){if(h.type==="inline"&&Array.isArray(h.children)){const m=String(h.content??"");if(d(m)?s=!1:l(),!o.length&&!i(m)){s=!1;continue}let g=0,b=!0;for(const _ of h.children){const v=zm(_),y=_.type==="html_inline"?Hm(v):"",w=y&&t.has(y);let x=v;if(b&&m&&v&&(o.length||w)){const A=m.indexOf(v,g);if(A!==-1)a(m.slice(g,A)),x=m.slice(A,A+v.length),g=A+v.length;else{if(o.length&&!w)continue;b=!1}}f(_,x,y)}b&&m&&g0;continue}if(o.length&&typeof h.content=="string"){const m=zm(h),g=h.type==="html_block"?u(m):null;if(g){c(`${s?` -`:""}${g}`),s=o.length>0;continue}if(!h.content)continue;l(),r(h.content),s=!0}}for(const h of o)b9(h.token,h.raw,h.inner)}function yte(e){return/^\s*<\s*[!?]/.test(e)}function kte(e){const t=new Set(cte);if(e&&Array.isArray(e))for(const n of e){const o=String(n??"").trim();if(!o)continue;const s=o.match(/^[<\s/]*([A-Z][\w-]*)/i);s&&t.add(s[1].toLowerCase())}return t}function hC(e,t){if(t.has(e))return!0;for(const n of t)if(n.startsWith(e))return!0;return!1}function bte(e,t){let n=null;for(const i of e.matchAll(ute)){const r=i.index??-1;if(r<0)continue;const l=(i[1]??"").toLowerCase();hC(l,t)&&Do(e.slice(r))===-1&&(!n||r")&&(!n||i")&&(!n||i{const h=f,m=new Set(n),g=Array.isArray(h.env?.__markstreamCustomHtmlTags)?h.env.__markstreamCustomHtmlTags:[];for(const y of g){const w=wr(String(y??""));w&&m.add(w)}const b=kte(Array.from(m)),_=new Set(_te);for(const y of m)_.add(y);return{autoCloseInlineTagSet:_,commonHtmlTags:b,customTagSet:m,shouldMergeHtmlBlockTag:y=>m.has(y)||!b.has(y)||GE.has(y)}},s=f=>{if(f.type==="html_block")return String(f.content??"");if(f.type!=="inline"||!Array.isArray(f.children)||f.children.length!==1)return"";const h=f.children[0];return h?.type!=="html_block"?"":String(f.content??h.content??"")},i=(f,h)=>{f.type="html_block",f.content=h,f.raw=h,f.children=[]},r=f=>f.replace(/^(?:\r?\n)+/,""),l=f=>/^(?: {4}|\t)/.test(f),a=f=>f.replace(/^(?: {4}|\t)/gm,""),c=(f,h)=>{const m=r(f);if(!/\S/.test(m))return[];if(l(m))return[{type:"code_block",content:a(m),raw:m}];const g=m.replace(/^[\t ]+/,"");if(!g)return[];if(g.startsWith("<"))return[{type:"html_block",content:g}];const b={type:"inline",tag:"",nesting:0,content:g,children:[{type:"text",content:g,raw:g}]};return h==="paragraph"?[{type:"paragraph_open",tag:"p",nesting:1},b,{type:"paragraph_close",tag:"p",nesting:-1}]:h==="text"?[{type:"text",content:g,raw:g}]:[b]},u=(f,h,m)=>f[h-1]?.type==="paragraph_open"&&f[h+1]?.type==="paragraph_close"?"inline":m,d=(f,h)=>{const m=r(h);return!/\S/.test(m)||f.type!=="inline"||!Array.isArray(f.children)?!1:(f.content=`${String(f.content??"")}${m}`,f.children.push({type:"text",content:m,raw:m}),!0)};e.core.ruler.after("inline","fix_html_inline_streaming",f=>{const h=f.tokens??[],{commonHtmlTags:m,customTagSet:g}=o(f);for(const b of h){const _=b;if(_.type!=="inline"||!Array.isArray(_.children))continue;const v=String(_.content??""),y=_.children.length?_.children:v.includes("<")?[{type:"text",content:v,raw:v}]:null;if(y)try{const w=wte(y,m);if(_.children=w.children,w.pendingBuffer){const x=v.lastIndexOf(w.pendingBuffer);if(x!==-1){const A=v.slice(0,x);_.content=A,typeof _.raw=="string"&&(_.raw=A)}}}catch(w){console.error("[applyFixHtmlInlineTokens] failed to fix streaming html inline",w)}}vte(h,g)}),e.core.ruler.push("fix_html_inline_tokens",f=>{const h=f.tokens??[],{autoCloseInlineTagSet:m,customTagSet:g,shouldMergeHtmlBlockTag:b}=o(f),_=[];for(let v=0;v0){const[x,A]=_[_.length-1];if(v!==A){if(y.type==="paragraph_open"||y.type==="paragraph_close"){h.splice(v,1),v--;continue}const L=String(y.content??y.raw??"");if(L){const S=h[A],T=`${String(S.content||"")} -${L}`,R=Do(T),B=R===-1?null:pC(T,x,R+1);if(B){const I=T.slice(0,B.end),$=T.slice(B.end);S.content=I,S.loading=!1,h.splice(v,1),_.pop();const D=d(S,$)?[]:c($,u(h,v,"paragraph"));D.length&&h.splice(v,0,...D),v--;continue}S.content=T,S.loading!==!1&&(S.loading=!0)}h.splice(v,1),v--;continue}}const w=s(y);if(w){if(yte(w))continue;const x=(w.match(/<\s*(?:\/\s*)?([^\s>/]+)/)?.[1]??"").toLowerCase(),A=/^\s*<\s*\//.test(w);if(!x||!b(x))continue;if(i(y,w),!A)x&&!new RegExp(`^\\s*<\\s*${x}\\b[^>]*\\/\\s*>`,"i").test(w)&&mte(w,x)>0&&_.push([x,v]);else if(_.length>0&&x&&_[_.length-1][0]===x){const[,L]=_[_.length-1],S=h[L];S.content=`${String(S.content||"")} -${w}`,S.loading=!1,_.pop(),h.splice(v,1),v--}continue}else if(_.length>0){if(y.type==="paragraph_open"||y.type==="paragraph_close"){h.splice(v,1),v--;continue}const x=y.content||"",A=new RegExp(`<\\s*\\/\\s*${_[_.length-1][0]}\\s*>`,"i").test(x);if(x){const[,L]=_[_.length-1],S=h[L];S.content=`${S.content||""} -${x}`,S.loading!==!1&&(S.loading=!A)}A&&_.pop(),h.splice(v,1),v--}else continue}if(g.size>0){const v=new Map,y=new Map,w=L=>{let S=v.get(L);return S||(S=new RegExp(`<\\s*${L}\\b`,"i"),v.set(L,S)),S},x=L=>{let S=y.get(L);return S||(S=new RegExp(`<\\s*\\/\\s*${L}\\s*>`,"i"),y.set(L,S)),S},A=[];for(let L=0;L0){const B=A[A.length-1],I=h[B.index],$=S.type==="html_block"?x(B.tag).exec(T):null;if($){const O=$.index+$[0].length,P=T.slice(0,O),z=T.slice(O);I.content=`${String(I.content??"")} -${P}`,Array.isArray(I.children)&&I.children.push({type:"html_inline",content:``,raw:``}),A.pop();const W=d(I,z)?[]:c(z,u(h,L,"paragraph"));W.length?h.splice(L,1,...W):(h.splice(L,1),L--);continue}if(S.type!=="inline")continue;const D=Array.isArray(S.children)?S.children:[],H=pte(D,B.tag);if(H!==-1){const O=D.slice(0,H+1),P=D.slice(H+1),z=O.map(W=>String(W?.content??W?.raw??"")).join("");if(I.content=`${String(I.content??"")} -${z}`,Array.isArray(I.children)&&I.children.push(...O),P.length){const W=P.map(U=>String(U.content??U.raw??"")).join("");if(W.trim()){const U=W.replace(/^\s+/,"");if(d(I,W))h.splice(L,1),L--;else if(U.startsWith("<"))h.splice(L,1,{type:"html_block",content:U});else{const G=c(W,u(h,L,"paragraph"));h.splice(L,1,...G)}}else h.splice(L,1),L--}else h.splice(L,1),L--;A.pop();continue}I.content=`${String(I.content??"")} -${T}`,Array.isArray(I.children)&&I.children.push(...D),h.splice(L,1),L--;continue}if(S.type!=="inline")continue;const R=Array.isArray(S.children)?S.children:[];for(const B of g)if((R.length?hte(R,B):w(B).test(T)&&!x(B).test(T)?1:0)>0){A.push({tag:B,index:L});break}}}{let v=0;for(let y=0;y0?v--:(h.splice(y,1),y--))}}for(let v=0;v/]+)/)?.[1]??"").toLowerCase();if(S.startsWith("!")||S.startsWith("?")){y.loading=!1;continue}if(g.has(S)){const H=String(y.content??""),O=Do(H),P=O===-1?null:pC(H,S,O+1);y.loading=P?!1:y.loading!==void 0?y.loading:!0;const z=P?.start??-1,W=P?P.end-P.start:0;if(z!==-1){const U=H.slice(0,z+W);let G="";O!==-1&&O]+)))?/g;let R;for(;(R=T.exec(y.content||""))!==null;)R[1],R[2]||R[3]||R[4];const B=String(y.content??""),I=new RegExp(`<\\/\\s*${S}\\s*>`,"i").exec(B),$=I?I.index:-1,D=I?I[0].length:0;if($!==-1){const H=B.slice(0,$+D),O=(B.slice($+D)||"").replace(/^\s+/,"");y.children=[{type:"html_block",content:H,tag:S,loading:!1}],y.content=H,y.raw=H,O&&h.splice(v+1,0,O.startsWith("<")?{type:"html_block",content:O}:{type:"text",content:O,raw:O})}else y.children=[{type:"html_block",content:y.content,tag:S,loading:!0}];continue}if(!y||y.type!=="inline")continue;if(y.children.length===2&&y.children[0].type==="html_inline"){const S=(y.children[0].content?.match(/<([^\s>/]+)/)?.[1]??"").toLowerCase(),T=y.children[1],R=String(T?.content??"").match(/^<\s*\/\s*([^\s>]+)/)?.[1]?.toLowerCase()??"";if(T?.type==="html_inline"&&R===S)continue;m.has(S)?(y.children[0].loading=!0,y.children[0].tag=S,y.children.push({type:"html_inline",tag:S,loading:!0,content:``})):y.children=[{type:"html_block",loading:!0,tag:S,content:String(y.children[0]?.content??"")+String(y.children[1]?.content??"")}];continue}else if(y.children.length===3&&y.children[0].type==="html_inline"&&y.children[2].type==="html_inline"){const S=(y.children[0].content?.match(/<([^\s>/]+)/)?.[1]??"").toLowerCase();if(m.has(S))continue;y.children=[{type:"html_block",loading:!1,tag:S,content:y.children.map(T=>T.content).join("")}];continue}if(!y.content?.startsWith("<")||y.children?.length!==1)continue;const w=String(y.content),x=y,A=x.children[0];if(A?.type!=="html_inline"){/^<\s*(?:\/\s*)?[A-Z][\w:-]*\s*$/i.test(w)&&(x.children.length=0);continue}const L=String(A.content??w).match(fte)?.[1]?.toLowerCase()??"";if(L){if(/\/\s*>\s*$/.test(w)||ZE.has(L)){x.children=[{type:"html_inline",content:w}];continue}x.children.length=0}}})}function Ste(e){const t=e.trim();return!t||/^&[a-z0-9#]+;/i.test(t)?!1:!!(/^(?:const|let|var|function|class|import|export|if|for|while|return|await|async|yield|try|catch|throw|new|typeof|instanceof|switch|case|break|continue|def|ruby|perl|print|echo|true|false|null|undefined|NaN|Infinity|this)\b/.test(t)||/[a-z_$][\w$]*(?:\.[a-z_$][\w$]*|\['[^']*'\]|\["[^"]*"\]|\[\d+\])*\s*\(/i.test(t)||/[a-z_$][\w$]*(?:\.[a-z_$][\w$]*|\['[^']*'\]|\["[^"]*"\]|\[[\d+\]])+/i.test(t)||/\w+\s*(?:===?|!==?|<=?|>=?|\+\+|--|&&|\|\||\?\.)/.test(t)||/^(?:!!|\+\+|--)\s*\w/.test(t)||/[\w$]+\s*(?:\+=|-=|\*=|\/=|%=|\*\*=|=)/.test(t)||/^(?:https?:\/\/|ftp:\/\/|file:\/\/|\/\/|www\.)/i.test(t)||/`[^`]*\$\{[^}]*\}[^`]*`/.test(t)||/<\/?[A-Z][a-zA-Z0-9]*/.test(t)||/<[a-z][a-z0-9]*\s[^>]+>/.test(t)||/^(["'`]).*\1\s*[;,]?$/.test(t)||/^\[[\s\S]*\]$/.test(t)||/^\{[\s\S]*\}$/.test(t)||/^\(\s*\)$/.test(t)||/[\w$]+(?:\s*[+\-*/%<>=!&|^~:]+\s*[\w$]+|\s*\.\s*[\w$]+)/.test(t)||/=>|->|::/.test(t)||/^@[\w.$]+$/.test(t)||/^(?:0x[0-9a-fA-F]+|0b[01]+|0o[0-7]+|\d+(?:\.\d*)?(?:px|em|rem|%|vh|vw|deg|s|ms)?)$/.test(t)||/^\$[\w$]+\s*[=:]/.test(t)||/\|\s*\w+|\w+\s*\|/.test(t)||/^(?:git|npm|yarn|pnpm|bun|pip|cargo|go|rust|python|node|java|mvn|gradle|docker|kubectl)\s+/.test(t)||/(?:console|window|document|Math|JSON|Date|Array|Object|String|Number|Boolean)\.[a-zA-Z]/.test(t)||/^(?:\/\/|#|\/\*|\*\/|)/.test(t)||/^(?:<<<|<<\s*['"]?\w+['"]?)/.test(t))}function Ate(e,t={}){t.enabled!==!1&&e.core.ruler.after("inline","fix_indented_code_block",n=>{const o=n.tokens??[];for(let s=0;sa.trim().length>0);if(l.length===1&&!Ste(l[0]??"")){const a=l[0]??"",c=i.level??0;o.splice(s,1,{type:"paragraph_open",tag:"p",nesting:1,level:c},{type:"inline",tag:"",nesting:0,level:c,content:a,children:[{type:"text",content:a,level:c+1,raw:a}],block:!0},{type:"paragraph_close",tag:"p",nesting:-1,level:c}),s+=2}}})}const YE=/\.([a-z0-9]{1,15})$/i,Mte=/[_()[\]{}<>]/u,Tte=/^(?:https?:\/\/|ftp:\/\/|mailto:|www\.)/i,Ete=/[?#@]/u,Ite=/[\\/]/u,Lte=/^[\p{L}\p{N}./\\-]+$/u,$te=/^[A-Za-z0-9-]{1,63}$/u,Nte=/^xn--[a-z0-9-]{2,59}$/i,Ote=/^(?:[A-Z]{1,6}|\d{1,8})$/u,Fte=/^(?=.{1,12}$)[A-Z0-9]+(?:[-.][A-Z0-9]+)*$/iu,Rte=/文件名\s*[::]?|附件\s*[::]?|路径\s*[::]?|路徑\s*[::]?|文件列表\s*[::]?|文档列表\s*[::]?|文檔列表\s*[::]?|\bfile\s*names?\b\s*[::]?|\battachments?\b\s*[::]?|\bpaths?\b\s*[::]?|\bfile\s+lists?\b\s*[::]?|\bdocument\s+lists?\b\s*[::]?/iu,Pte=/文件名\s*[::]?|文件\s*[::]?|附件\s*[::]?|档案\s*[::]?|檔案\s*[::]?|文档\s*[::]?|文檔\s*[::]?|资料\s*[::]?|資料\s*[::]?|路径\s*[::]?|路徑\s*[::]?|\bfile\s*name\b\s*[::]?|\battachments?\b\s*[::]?|\bfiles?\b\s*[::]?|\bdocuments?\b\s*[::]?|\bdocs?\b\s*[::]?|\bpaths?\b\s*[::]?/iu,Dte=/股票代码|股票代碼|证券代码|證券代碼|(?:代码|代碼|交易所|后缀|後綴|市场|市場)(?=$|[\s::/|,,、()()])|\btickers?\b|\bsymbols?\b|\bexchanges?\b/iu,Bte=2e3,Hte=512,zte={},Wte=new Set(["ai","md","py","rs","sh","zip"]),XE=new Set(["as","bj","de","hk","l","ln","ny","pa","sh","ss","sz","t","us"]),Ute=new Set([...XE,"at","ax","cn","co","it","jp","ks","mc","mx","nz","pl","sa","si","to","tw"]),jte=new Set(["com","dev","io","page","site"]),Vte=new Set(["app","apk","dmg","exe","ipa","lock","log","markdown","webmanifest"]),qte=new Set(["7z","ai","astro","avi","bash","bz2","c","cjs","cpp","cs","csv","doc","docx","fish","flac","gif","go","gz","h","hpp","html","java","jpeg","jpg","js","json","jsx","kt","md","mdx","mjs","mov","mp3","mp4","pdf","php","png","ppt","pptx","ps1","py","rar","rb","rs","sh","sql","svg","swift","svelte","tar","tgz","toml","ts","tsx","txt","vue","wav","webp","xls","xlsx","xml","yaml","yml","zip","zsh"]),Gc=new Map;function mC(e,t){if(!e||e.length>Hte)return t;for(Gc.set(e,t);Gc.size>Bte;){const n=Gc.keys().next().value;if(!n)break;Gc.delete(n)}return t}function vp(e){return e?.filename===!0||e?.explicitFilename===!0||e?.marketTicker===!0}function C9(e,t){const n={filename:e?.filename||t?.filename,explicitFilename:e?.explicitFilename||t?.explicitFilename,marketTicker:e?.marketTicker||t?.marketTicker};return vp(n)?n:void 0}function gC(e,t){if(!vp(t))return e;const n=e?.__linkifyDemotionContext;return{...e,__linkifyDemotionContext:{filename:n?.filename||t?.filename,explicitFilename:n?.explicitFilename||t?.explicitFilename,marketTicker:n?.marketTicker||t?.marketTicker}}}function vC(e){const t=Dp(e);return vp(t)?t:void 0}function Kte(e){return e.replace(/^[\s>*_`[\]((【《"'“‘]+/u,"").replace(/[\s<*_`\]))】》"'.。;;,,、::!?!?]+$/u,"")}function yC(e,t){if(!vp(t))return;const n=String(e??"").trim().split(/\s+/u).map(Kte).filter(Boolean);if(n.length===0)return;const o={};return t?.filename&&n.every(s=>Wm(s,{filename:!0,explicitFilename:t.explicitFilename}))&&(o.filename=!0),t?.explicitFilename&&o.filename&&(o.explicitFilename=!0),t?.marketTicker&&n.every(s=>Wm(s,{marketTicker:!0}))&&(o.marketTicker=!0),vp(o)?o:void 0}function lc(e,t=!1){let n;return{options(o){return t||o==null?gC(e,n):gC(e,C9(vC(o),yC(o,n)))},remember(o){const s=vC(o);n=t?C9(n,s):C9(s,yC(o,n))},reset(){n=void 0}}}function kC(e){return $te.test(e)&&!e.startsWith("-")&&!e.endsWith("-")}function Zte(e){const t=e.split(".");if(t.length<2)return!1;const n=t[t.length-1]?.toLowerCase()??"";return kC(n)||Nte.test(n)?t.every(kC):!1}function JE(e){return Array.from(e).some(t=>t.charCodeAt(0)>127)}function Gte(e){return e.replace(/^[a-z][a-z0-9+.-]*:\/\//i,"").split(/[/?#]/,1)[0]??""}function Yte(e){return e.split(".").some(t=>t.toLowerCase().startsWith("xn--"))}function QE(e,t,n){const o=Gte(t);return JE(e)&&Yte(o)&&String(n??"").toLowerCase().includes(o.toLowerCase())}function Xte(e){if(!e)return!1;if(e.includes("文件")||e.includes("附件")||e.includes("路径")||e.includes("路徑")||e.includes("文档")||e.includes("文檔")||e.includes("档案")||e.includes("檔案")||e.includes("资料")||e.includes("資料")||e.includes("股票")||e.includes("证券")||e.includes("證券")||e.includes("代码")||e.includes("代碼")||e.includes("交易所")||e.includes("后缀")||e.includes("後綴")||e.includes("市场")||e.includes("市場"))return!0;const t=e.toLowerCase();return t.includes("file")||t.includes("attachment")||t.includes("document")||t.includes("doc")||t.includes("path")||t.includes("ticker")||t.includes("symbol")||t.includes("exchange")}function Dp(e){const t=String(e??""),n=Gc.get(t);return n?(Gc.delete(t),Gc.set(t,n),n):Xte(t)?mC(t,{explicitFilename:Rte.test(t),filename:Pte.test(t),marketTicker:Dte.test(t)}):mC(t,zte)}function Jte(e){return Zte(e.split(/[\\/]/)[0]??"")}function Qte(e){const t=e.replace(/[^a-z]/gi,"");return t.length>=2&&t===t.toUpperCase()}function ene(e){if(Mte.test(e)||!Lte.test(e))return!0;if(Ite.test(e))return!Jte(e);const t=e.replace(YE,"");return JE(t)?!0:t.split(".").filter(Boolean).some(Qte)}function tne(e,t,n){if(!(n?Ute:XE).has(t))return!1;const o=e.slice(0,-(t.length+1));return o===""?e.startsWith("."):(n?Fte:Ote).test(o)}function Wm(e,t={}){if(!e||Tte.test(e)||Ete.test(e))return!1;const n=e.match(YE);if(!n)return!1;const o=String(n[1]??"").toLowerCase();return tne(e,o,t.marketTicker===!0)?!0:qte.has(o)?!Wte.has(o)||t.filename?!0:ene(e):!!(t.explicitFilename&&jte.has(o)||t.filename&&Vte.has(o))}const bC=["!"];function Ci(e){return{type:"text",content:e,raw:e}}function Ec(e,t){t===1?e.push({type:"em_open",tag:"em",nesting:1}):t===2?e.push({type:"strong_open",tag:"strong",nesting:1}):t===3&&(e.push({type:"strong_open",tag:"strong",nesting:1}),e.push({type:"em_open",tag:"em",nesting:1}))}function Ic(e,t){t===1?e.push({type:"em_close",tag:"em",nesting:-1}):t===2?e.push({type:"strong_close",tag:"strong",nesting:-1}):t===3&&(e.push({type:"em_close",tag:"em",nesting:-1}),e.push({type:"strong_close",tag:"strong",nesting:-1}))}function ya(e,t,n){let o="";if(t.includes('"')){const s=t.split('"');t=s[0].trim(),o=s[1].trim()}return{type:"link",loading:n,href:t,title:o,text:e,children:[{type:"text",content:e,raw:e}],raw:`[${e}](${t})`}}function nne(e,t){if(!(!e||!t)&&(e.href=String(e.href??"")+t,e.text=String(e.text??"")+t,e.raw=`[${e.text}](${e.href})`,Array.isArray(e.children)&&e.children.length)){const n=e.children[e.children.length-1];n?.type==="text"?(n.content=String(n.content??"")+t,n.raw=String(n.raw??"")+t):e.children.push(Ci(t))}}function CC(e,t){let n=-1;for(const o of t){const s=e.indexOf(o);s!==-1&&(n===-1||sn?.[0]==="href")?.[1];return typeof t=="string"?t:""}function sne(e,t){if(!e)return;e.attrs=Array.isArray(e.attrs)?e.attrs:[];const n=e.attrs.findIndex(o=>o?.[0]==="href");n>=0?e.attrs[n][1]=t:e.attrs.push(["href",t])}function wC(e,t,n){let o="";for(let s=t+1;s{const n=t.tokens??[];for(let o=0;or.type==="code_inline"),o=new Map;let s=0;for(let r=0;r0&&c?_C(c):-1;if(u!==-1&&c)for(const d of c.slice(u))d==="("?s++:d===")"&&s>0&&s--}a!==-1&&(r=a);continue}if(!(l.type!=="text"||typeof l.content!="string"))for(const a of l.content)a==="("?s++:a===")"&&s>0&&s--}const i=Dp(t);for(let r=0;r<=e.length-1;r++){r<0&&(r=0);const l=e[r];if(!l)break;if(l.type==="link_open"&&(l.markup==="linkify"||l.markup==="autolink")){let a=-1;for(let c=r+1;c0){const m=_C(c);m!==-1&&(d===-1||m=g.content.length){h-=g.content.length;continue}if(h<0)break;const b=g.content[h],_=g.content.slice(0,h);let v=g.content.slice(h);for(let x=m+1;x0&&(e.splice(m+1,y),a=m+1);let w=u;if(b==="!"&&f!==-1)w=u.slice(0,f);else if(v){const x=encodeURI(v);if(x&&u.endsWith(x))w=u.slice(0,u.length-x.length);else{const A=b?encodeURI(b):"",L=A?u.indexOf(A):-1;L!==-1&&(w=u.slice(0,L))}}w!==u&&sne(l,w),v&&e.splice(a+1,0,Ci(v));break}}}if(!n){if(l?.type==="em_open"&&e[r-1]?.type==="text"&&e[r-1].content?.endsWith("*")){const a=e[r-1].content?.replace(/(\*+)$/,"")||"";e[r-1].content=a,l.type="strong_open",l.tag="strong",l.markup="**";for(let c=r+1;cd[0]==="href")?.[1]||"";if(e[r+3]?.type==="text"){const d=(e[r+3]?.content??"").indexOf(")"),f=d===-1;d===-1&&(u+=e[r+3]?.content?.slice(0,d)||"",e[r+3].content=""),a.push(ya(c,u,f));const h=e[r+3].content?.replace(/^\)\**/,"");h&&a.push(Ci(h)),e.splice(r-4,8,...a)}else a.push({type:"link",loading:!0,href:u,title:"",text:c,children:[{type:"text",content:u,raw:u}],raw:`[${c}](${u})`}),e.splice(r-4,7,...a);continue}else if(e[r-1].content==="]("&&e[r-3]?.type==="text"&&e[r-3].content?.endsWith(")"))if(e[r-2]?.type==="strong_open"){const[a,c]=e[r-3].content?.split("[**")||[];e[r+1].content=c||"",e[r-3].content=a||"",e[r-1].content=""}else if(e[r-2]?.type==="em_open"){const[a,c]=e[r-3].content?.split("[*")||[];e[r+1].content=c||"",e[r-3].content=a||"",e[r-1].content=""}else{const[a,c]=e[r-3].content?.split("[")||[];e[r+1].content=c||"",e[r-3].content=a||"",e[r-1].content=""}}if(l.type==="link_close"&&l.nesting===-1&&e[r-2]?.type==="link_open"&&e[r+1]?.type==="text"&&e[r-1]?.type==="text"){const a=e[r-1].content||"",c=e[r-2].attrs||[],u=c.find(_=>_[0]==="href")?.[1]||"",d=c.find(_=>_[0]==="title")?.[1]||"";let f=3,h=2;const m=(e[r-3]?.content||"").match(/^(\*+)$/),g=[];if(m){h+=1;const _=m[1].length;Ec(g,_)}if(l.markup!=="linkify"&&e[r+1].type==="text"&&e[r+1]?.content?.startsWith("](")){f+=1;for(let _=r+1;_b[0]==="href")?.[1];e[r+5]?.type==="text"&&e[r+5].content==="."?(f=(g||f)+e[r+5].content,e[r+5].content=""):f=g||f,h+=3}let m=!0;if(l.nesting===-1&&(d=d.replace(/\*+$/,"")),e[r+2]?.type==="text"){const g=(e[r+2]?.content??"").indexOf(")");m=g===-1,g===-1&&(f+=e[r+2]?.content?.slice(0,g)||"",e[r+2].content="")}a.push(ya(d,f,m)),Ic(a,2),e.splice(r-2,h,...a)}if(l.type==="text"&&/\*+\[[^\]]*$/.test(l.content||"")&&e[r+1]?.type==="strong_open"&&e[r+2]?.type==="text"&&e[r+2].content==="]("&&e[r+3]?.type==="link_open"&&e[r+5]?.type==="link_close"&&e[r+6]?.type==="text"&&e[r+6].content===")"&&e[r+7]?.type==="strong_close"){const a=(l.content||"").match(/^(\*+)\[(.*)$/);if(a){const c=(a[2]||"")+a[1];let u=e[r+3]?.attrs?.find(f=>f[0]==="href")?.[1]||"";!u&&e[r+4]?.type==="text"&&(u=e[r+4].content||"");const d=[];Ec(d,2),d.push(ya(c,u,!1)),Ic(d,2),e.splice(r,9,...d),r-=d.length-1;continue}}}}if(n)return e;for(let r=0;r{const n=t.tokens??[];for(let o=0;o{const n=t.tokens??[];for(let o=0;o=0&&e[m].type==="text"&&e[m].content==="";)m--;const g=e[m];let b=u+1;for(;b=0&&e[m].type==="text"&&e[m].content==="";)m--;const g=e[m];let b=u+1;for(;b{const n=t;try{const o=kne(n.tokens??[],!!n.env?.__markstreamFinal,n.src??"");Array.isArray(o)&&(n.tokens=o)}catch(o){console.error("[applyFixTableTokens] failed to fix table tokens",o)}})}function xC(){return[{type:"table_open",tag:"table",attrs:null,map:null,children:null,content:"",markup:"",info:"",level:0,loading:!0,meta:null},{type:"thead_open",tag:"thead",attrs:null,block:!0,level:1,children:null},{type:"tr_open",tag:"tr",attrs:null,block:!0,level:2,children:null}]}function SC(){return[{type:"tr_close",tag:"tr",attrs:null,block:!0,level:2,children:null},{type:"thead_close",tag:"thead",attrs:null,block:!0,level:1,children:null},{type:"table_close",tag:"table",attrs:null,map:null,children:null,content:"",markup:"",info:"",level:0,meta:null}]}function AC(e){return[{type:"th_open",tag:"th",attrs:null,block:!0,level:3,children:null},{type:"inline",tag:"",children:null,content:e,level:4,attrs:null,block:!0},{type:"th_close",tag:"th",attrs:null,block:!0,level:3,children:null}]}function eI(e,t){if(!e.startsWith("|")||e.includes(` -`)||!e.endsWith("|"))return null;const n=e.slice(1).split("|");return n.at(-1)===""&&n.pop(),n.length>0&&n.every(o=>o.trim().length>0)?n:null}function w9(e){return eI(e)!==null}function tI(e){return/^:?-+:?$/.test(e.trim())}function hne(e){if(!e.startsWith("|"))return!1;const t=e.slice(1).split("|");return t.at(-1)===""&&t.pop(),t.length>0&&t.every(tI)}function mne(e){return/^(?:[::]-*|:?-+:?)?$/.test(e.trim())}function gne(e){if(e==="")return!0;if(!e.startsWith("|"))return!1;const t=e.slice(1).split("|"),n=t.at(-1)??"";return t.slice(0,-1).every(tI)&&mne(n)}function vne(e){return e==="|"||e==="|:"}function yne(e){const t=eI(e);return t!==null&&t.every(n=>!n.includes(":"))}function kne(e,t=!1,n=""){const o=[...e];if(e.length<3)return o;const s=e.length-2,i=e[s];if(i.type==="inline"){const r=String(i.content??""),l=r.split(` -`)[0]??"",[a="",c="",...u]=r.split(` -`),d=!t&&!r.includes(` -`)&&/\r?\n$/.test(n)&&w9(r);if(!t&&(r.includes(` -`)&&u.length===0&&w9(a)&&gne(c)||d)){const f=l.slice(1,-1).split("|").map(m=>m.trim()).flatMap(m=>AC(m)),h=[...xC(),...f,...SC()];o.splice(s-1,3,...h)}else if(r.includes(` -`)&&u.length===0&&w9(a)&&hne(c)){const f=l.slice(1,-1).split("|").map(m=>m.trim()).flatMap(m=>AC(m)),h=[...xC(),...f,...SC()];o.splice(s-1,3,...h)}else r.includes(` -`)&&u.length===0&&yne(a)&&vne(c)&&(i.content=r.slice(0,-2),i.children.splice(2,1))}return o}function bne(e,t,n,o){const s=e.length;if(n==="$$"&&o==="$$"){let c=t;for(;c=0&&e[u]==="\\";)d++,u--;if(d%2===0)return c}c++}return-1}const i=n[n.length-1],r=o;let l=0,a=t;for(;a=0&&e[u]==="\\";)d++,u--;if(d%2===0){if(l===0)return a;l--,a+=r.length;continue}}const c=e[a];if(c==="\\"){a+=2;continue}c===i?l++:c===r[r.length-1]&&l>0&&l--,a++}return-1}var Cne=bne;const wne=["boldsymbol","mathbb","mathcal","mathfrak","mathrm","mathit","mathsf","vec","hat","bar","tilde","overline","underline","mathscr","mathnormal","operatorname","mathbf*"],Um=wne.map(e=>e.replace(/[.*+?^${}()|[\\]"\]/g,"\\$&")).join("|"),_ne=/\\[a-z]+/i,nI="(?:\\\\|\\u0008)",xne=new RegExp(String.raw`${nI}(?:${Um})\s*\{[^}]+\}`,"i"),Sne=new RegExp(String.raw`(?:${nI})?(?:${Um})\s*\{`,"i"),Ane=/\\(?:text|frac|left|right|times)/,Mne=/(?:^|[^+])\+(?!\+)|[=\-*/^<>]|\\times|\\pm|\\cdot|\\le|\\ge|\\neq/,Tne=/\b[A-Z]{2,}-[A-Z]{2,}\b/i,Ene=/[A-Z]+\s*\([^)]+\)/i,Ine=/^\(\s*[a-z](?:\s*,\s*[a-z])+\s*\)$/i,Lne=/\b(?:sin|cos|tan|log|ln|exp|sqrt|frac|sum|lim|int|prod)\b/,$ne=/\b\d{4}\/\d{1,2}\/\d{1,2}(?:[ T]\d{1,2}:\d{2}(?::\d{2})?)?\b/,Nne={"\b":"\\b","\v":"\\v","\f":"\\f"};function One(e){let t="";for(const n of e)t+=Nne[n]??n;return t}function La(e){if(!e)return!1;const t=One(e),n=t.trim();if($ne.test(n)||n.includes("**"))return!1;if(n.length>2e3)return!0;const o=_ne.test(t),s=xne.test(t),i=Sne.test(t),r=Ane.test(t),l=/(?:^|[^\w\\])(?:[A-Z]|\\[A-Z]+)_(?:\{[^}]+\}|[A-Z0-9\\])/i.test(t)||/(?:^|[^\w\\])(?:[A-Z]|\\[A-Z]+)\^(?:\{[^}]+\}|[A-Z0-9\\])/i.test(t),a=Mne.test(t)&&!Tne.test(t),c=Ene.test(t),u=Ine.test(n),d=Lne.test(t),f=/^\([a-z]\)$/i.test(n)||/^(?:[a-z]|pi)$/i.test(n),h=/^(?:[A-Z][a-z]?(?:_\{?\d+\}?|\^\{?\d+\}?)?)+$/.test(n);return o||s||i||r||l||a||c||u||d||f||h}const oI="__markstreamMathPluginApplied",k3=80,sI=2e4,MC=sI+4096;function P8(e){return!!e[oI]}function Fne(e){e[oI]=!0}const iI=["ldots","cdots","quad","in","displaystyle","int_","lim","lim_","ce","pu","end","infty","perp","mid","operatorname","to","rightarrow","leftarrow","math","mathrm","mathit","mathbb","mathcal","mathfrak","implies","alpha","beta","gamma","delta","epsilon","lambda","sum","sum_","prod","sqrt","fbox","boxed","color","rule","edef","fcolorbox","hline","hdashline","cdot","times","pm","le","ge","neq","sin","cos","tan","log","ln","exp","frac","text","left","right"],Rne=["cdot","mathbf{","partial","mu_{"],rI=iI.slice().sort((e,t)=>t.length-e.length).map(e=>e.replace(/[.*+?^${}()|[\\]\\\]/g,"\\$&")).join("|"),lI="[ \r\b\f\v]",Pne=new RegExp(`([^\\\\])(${Rne.map(e=>e).join("|")})+`,"g"),Dne=/span\{([^}]+)\}/,Bne=/\\operatorname\{span\}\{((?:[^{}]|\{[^}]*\})+)\}/,Hne=/(^|[^\\])\\\r?\n/g,zne=/(^|[^\\])\\$/g,Wne=/[\p{L}\p{M}\p{N}\p{Pe}\p{Pf}'′″‴|‖]/u,Une=new RegExp(`(${lI})|(${rI})\\b`,"g"),TC=new Map,EC=new Map;function jne(e){if(!e)return Une;const t=[...e];t.sort((r,l)=>l.length-r.length);const n=t.join(""),o=TC.get(n);if(o)return o;const s=`(?:${t.map(r=>r.replace(/[.*+?^${}()|[\\]\\"\]/g,"\\$&")).join("|")})`,i=new RegExp(`(${lI})|(${s})\\b`,"g");return TC.set(n,i),i}function Vne(e,t){const n=e?[]:[...t??[]];e||n.sort((l,a)=>a.length-l.length);const o=e?"__default__":n.join(""),s=EC.get(o);if(s)return s;const i=e?[Um,rI].filter(Boolean).join("|"):[n.map(l=>l.replace(/[.*+?^${}()|[\\]\\\]/g,"\\$&")).join("|"),Um].filter(Boolean).join("|"),r=new RegExp(`(^|[^\\\\\\w])(${i})\\s*\\{`,"g");return EC.set(o,r),r}const IC={" ":"t","\r":"r","\b":"b","\f":"f","\v":"v"};function LC(e){const t=/(^|[^\\])(__|\*\*)/g;let n=0;for(;t.exec(e)!==null;)n++;return n}function qne(e){return e.replace(/(^|[^\\])!+/gu,(t,n)=>{if(n&&Wne.test(n))return t;const o=n?t.slice(n.length):t;return`${n}${"\\!".repeat(o.length)}`})}function $C(e){const t=/(^|[^\\])(__|\*\*)/g;let n,o=null;for(;(n=t.exec(e))!==null;)o={marker:n[2],index:n.index+(n[1]?.length??0)};return o}function ka(e,t){const n=t?.commands??iI,o=t?.escapeExclamation??!0,s=t?.commands==null,i=jne(s?void 0:n);let r=e.replace(i,(c,u,d,f,h)=>{if(u!==void 0&&IC[u]!==void 0)return`\\${IC[u]}`;if(d&&n.includes(d)){const m=h&&typeof f=="number"?h[f-1]:void 0;return m==="\\"||m&&/\w/.test(m)?c:`\\${d}`}return c});o&&(r=qne(r));let l=r;const a=Vne(s,s?void 0:n);return l=l.replace(a,(c,u,d)=>`${u}\\${d}{`),l=l.replace(Dne,"span\\{$1\\}").replace(Bne,"\\operatorname{span}\\{$1\\}"),l=l.replace(Hne,`$1\\\\ -`),l=l.replace(zne,"$1\\\\"),l=l.replace(Pne,"$1\\$2"),l}function NC(e){const t=e.trim();return!(!La(t)||/"[^"\n]{1,80}"\s*:\s*/.test(t)||!(/\\[a-z]+/i.test(t)||/[=+*/^<>]|\\times|\\pm|\\cdot|\\le|\\ge|\\neq/.test(t)||/[_^]/.test(t))&&/\s-\s/.test(t))}function aI(e){const t=[];let n=0;for(;n=n[0]&&t0;){if(e[i]==="\\"&&i+10;){if(e[l]==="\\"&&l+1=0&&e[n]==="\\";)o++,n--;return o%2===1}function b3(e,t){let n=t;for(;n0&&e[o-1]==="$"||o+1=l)break;const c=jm(s,a);if(c){r=Math.max(a+Math.max(1,t.length),c[1]);continue}Bp(e,a)||i++,r=a+Math.max(1,t.length)}return i}function D8(e,t,n){const o=kp(String(e??""));if(!o.endsWith(t))return-1;const s=o.length-t.length;if(s<=0||!kp(o.slice(0,s)).trim()||Bp(o,s))return-1;const i=aI(o);if(jm(i,s))return-1;const r=OC(o,t,0,s,i);if(t==="$$"){if(r%2===1)return-1}else if(r>OC(o,n,0,s,i))return-1;return s}function yp(e){return e===" "||e===" "}function kp(e){let t=e.length;for(;t>0&&yp(e[t-1]);)t--;return e.slice(0,t)}function FC(e){let t=0;for(let n=0;n=48&&t<=57}function Zne(e){if(e.length<3)return!1;const t=e[0];if(t!=="-"&&t!=="*"&&t!=="_"&&t!=="=")return!1;let n=0;for(let o=0;o=3}function Gne(e){const t=e.trim();if(!t)return!1;let n=0;t[n]===":"&&n++;let o=0;for(;t[n]==="-";)o++,n++;return o<3?!1:(t[n]===":"&&n++,n===t.length)}function Yne(e){if(!e.includes("|"))return!1;const t=e[0]==="|"?e.slice(1):e;return(t.endsWith("|")?t.slice(0,-1):t).split("|").every(Gne)}function Xne(e){let t=0;if(!RC(e[t]))return!1;for(;RC(e[t]);)t++;return e[t]!=="."&&e[t]!==")"?!1:yp(e[t+1])}function cI(e){const t=e.trimStart();if(!t||t.startsWith("```")||t.startsWith("~~~")||t.startsWith(":::")||t[0]===">"||t[0]==="<")return!0;if(t[0]==="#"){let n=0;for(;t[n]==="#";)n++;if(n>=1&&n<=6&&yp(t[n]))return!0}return!!((t[0]==="-"||t[0]==="+"||t[0]==="*")&&yp(t[1])||Xne(t)||Zne(t)||Yne(t))}function PC(e,t){return e?t?`${e} -${t}`:e:t}function C3(e){const t=String(e??"").trim();return t?La(t):!1}function DC(e){let t=0;for(let n=0;nk3){h=!0;break}const g=s[m],b=ud(g,u);if(b!==-1){const _=PC(f,g.slice(0,b));if(!C3(_)){h=!0;break}const v=g.slice(b+u.length),y=v.trim()?`suffix:${DC(v)}`:"nosuffix";return["closed",c,o+l,d,o+m,b,DC(_),y].join(":")}if(cI(g)){h=!0;break}if(f=PC(f,g),f.length>sI){h=!0;break}}if(!h&&C3(f))return["pending",c,o+l,d].join(":")}}return null}function x9(e,t){const n=String(e??"").trim();return!n||!/^\d[\d,.]*\s*[~~-]\s*$/.test(n)?!1:/\d/.test(String(t??""))}function Qne(e){const t=String(e??"").trimStart(),n=t.match(/^\d+(?:,\d{3})*(?:\.\d+)?/);if(!n)return!1;const o=t.slice(n[0].length);return/^\s*(?:[+\-*/^_=<>]|\\[a-z]+)/i.test(o)?!1:o===""||/^[)\s,.!?;:]/.test(o)}function S9(e){const t=String(e??"").trim();return t?/^(?:\.{3,}|…+)$/.test(t):!1}function eoe(e,t){Fne(e);const n=(r,l,a)=>{const c=String(l??"").replace(/^[\t ]+/,"").replace(/[\t ]+$/,"");if(!c)return;const u=r.push("paragraph_open","p",1);u.map=[a,a+1];const d=r.push("inline","",0);d.content=c,d.map=[a,a+1],d.children=[],r.push("paragraph_close","p",-1)},o=(r,l)=>{const a=r,c=!!t?.strictDelimiters,u=!a?.env?.__markstreamFinal,d=(v,y)=>{let w=y;for(;w=3&&(!w||/\s/.test(w))){const x=a.push("text","",0);return x.content=a.src.slice(a.pos,v),a.pos=v,!0}}const f=[["$$","$$"],["$","$"],["\\(","\\)"]],h=String(a.pending??""),m=Math.max(0,a.pos-h.length);let g=m,b=m;const _=m;for(const[v,y]of f){const w=a.src,x=aI(w),A=Kne(w,u);let L=!1;v==="$$"&&g!==_&&(g=_);let S=-1,T=-1,R=0;const B=I=>{if((I==="undefined"||I==null)&&(I=""),I==="\\"){a.pos=a.pos+I.length,g=a.pos;return}if(I==="\\)"||I==="\\("){const H=a.push("text_special","",0);H.content=I==="\\)"?")":"(",H.markup=I,a.pos=a.pos+I.length,g=a.pos;return}if(!I)return;if(v==="$$"&&I.includes("$")){let H=0;for(;H0&&I[O-1]==="$"||O+10){const P=I.slice(0,$),z=a.push("text","",0);z.content=P,a.pos=a.pos+P.length,g=a.pos}const H=I.slice($).match(/^!\[([^\]]*)\]\(([^)]+)\)/);if(H){const[,P,z]=H,W=z.match(/^(\S+)(?:\s+"([^"]+)")?\s*$/),U=W?W[1]:z,G=W&&W[2]?W[2]:null,Z=a.push("image","img",0);Z.attrs=[["src",U],["alt",P]],G&&Z.attrs.push(["title",G]),Z.content=P,Z.children=[{type:"text",content:P,tag:""}],a.pos=a.pos+H[0].length,g=a.pos;const ee=I.slice($+H[0].length);ee&&B(ee);return}const O=a.push("text","",0);O.content=I,a.pos=a.pos+I.length,g=a.pos;return}const D=a.push("text","",0);D.content=I,a.pos=a.pos+I.length,g=a.pos};for(;!(g>=w.length);){const I=w.indexOf(v,g);if(I===-1)break;if(Bp(w,I)){g=I+Math.max(1,v.length);continue}const $=jm(x,I);if($){g=$[1];continue}const D=jm(A,I);if(D){g=D[1];continue}if(I===S&&g===T){if(R++,R>2){g=I+Math.max(1,v.length);continue}}else R=0,S=I,T=g;if(v==="("&&I>0){let ee=I-1;for(;ee>=0&&w[ee]===" ";)ee--;if(ee>=0&&w[ee]==="]"){g=I+v.length;continue}}if(v==="$"&&I>0&&w[I-1]==="$"){g=I+1;continue}if(v==="$"&&I=w.length);){const $=b3(w,I);if($===-1)break;if($+10&&w[$-1]==="$"){I=$+1;continue}const D=_9(w,$+1);if(D===-1)break;const H=w.slice($+1,D),O=H.includes("`"),P=!H||!H.trim(),z=w[D+1],W=x9(H,z),U=S9(H);if(!O&&!P&&!W&&!U){const G=w.slice(g,$);G&&B(G);const Z=a.push("math_inline","math",0);Z.content=ka(H,t),Z.markup="$",Z.raw=`$${H}$`,Z.loading=!1,g=D+1,I=D+1}else B("$"),I=$+1}I{const u=r,d=!u?.env?.__markstreamFinal,f=t?.strictDelimiters,h=f?[["\\[","\\]"],["$$","$$"]]:[["\\[","\\]"],["[","]"],["$$","$$"]],m=u.bMarks[l]+u.tShift[l];let g=u.src.slice(m,u.eMarks[l]).trim(),b=!1,_="",v="",y=!1,w="",x=!1;for(const[G,Z]of h)if(g.startsWith(G))if(G.includes("[")){const ee=G==="\\["?g.slice(G.length):"";if(G==="\\["&&ud(ee,Z)===-1&&!/^\s*!\[/.test(ee)&&!ee.includes("`")&&La(ee)){b=!0,_=G,v=Z;break}if(t?.strictDelimiters){if(g.replace("\\","")==="["){if(l+1=0?"\\]":v,R=S>=0?S:ud(g,v,L);if(!y&&R>_.length){const G=g.slice(A+_.length,R),Z=u.push("math_block","math",0);Z.content=ka(G),Z.markup=_==="$$"?"$$":_==="["?"[]":"\\[\\]",Z.map=[l,l+1],Z.raw=`${_}${G}${T}`,Z.block=!0,Z.loading=!1,u.line=l+1;const ee=g.slice(R+T.length);return ee.trim()&&n(u,ee,l),!0}let B=l,I="",$=!1,D="",H=l;const O=y?g:g===_?"":g.slice(_.length),P=!f&&_==="\\["?"]":"",z=ud(O,v);if(z!==-1){const G=z;I=O.slice(0,G),D=O.slice(G+v.length),H=y?l+1:l,$=!0,B=H}else for(O&&!y&&(I=O),B=l+1;B{const u=r,d=u.bMarks[l]+u.tShift[l],f=u.src.slice(d,u.eMarks[l]).trim();return!f.startsWith("$$")&&!f.startsWith("\\[")?!1:s(r,l,a,c)};e.inline.ruler.before("escape","math",o),e.block.ruler.before("lheading","explicit_math_block",i,{alt:["paragraph","reference","blockquote","list"]}),e.block.ruler.before("paragraph","math_block",s,{alt:["paragraph","reference","blockquote","list"]})}function toe(e){const t=e.renderer.rules.image||function(n,o,s,i,r){const l=n,a=r;return a.renderToken?a.renderToken(l,o,s):""};e.renderer.rules.image=(n,o,s,i,r)=>{const l=n;return l[o].attrSet?.("loading","lazy"),t(l,o,s,i,r)},e.renderer.rules.fence=e.renderer.rules.fence||((n,o)=>{const s=n[o],i=String(s.info??"").trim();return`
      ${e.utils.escapeHtml(String(s.content??""))}
      `})}const noe=/^\s]/i,ooe=/^<\/a\s*>/i;function soe(e,t){if(e?.type!=="inline")return!1;const n=e.children;if(!Array.isArray(n)||n.length===0)return t.pretest(String(e.content??""));let o=0;for(let s=n.length-1;s>=0;s--){const i=n[s];if(i?.type==="link_close"){for(s--;s>=0&&n[s]?.level!==i.level&&n[s]?.type!=="link_open";)s--;continue}if(i?.type==="html_inline"){const r=String(i.content??"");noe.test(r)&&o>0&&o--,ooe.test(r)&&o++}if(!(o>0)&&i?.type==="text"&&t.pretest(String(i.content??"")))return!0}return!1}function ioe(e){const t=e.core?.ruler,n=t.getNamedRules?.().find(o=>o.name==="linkify")?.fn;typeof n=="function"&&t.at("linkify",o=>{if(!o.md?.options?.linkify)return;const s=Array.isArray(o.tokens)?o.tokens:[],i=o.md.linkify;if(!i)return;const r=s.filter(l=>soe(l,i));if(r.length)return n(Object.assign(Object.create(Object.getPrototypeOf(o)),o,{tokens:r}))})}function roe(e){const t=e.inline.ruler,n=t.getNamedRules?.(),o=n?.find(l=>l.name==="link")?.fn,s=n?.find(l=>l.name==="image")?.fn;if(typeof o!="function"||typeof s!="function")return;const i=e.validateLink,r=e;r.__markstreamOriginalValidateLink=i,t.at("link",(...l)=>{const a=l[0].md,c=a?.validateLink===i?a.options?.validateLink:a?.validateLink;if(!a||typeof c!="function")return o(...l);const u=a.validateLink;a.validateLink=c;try{return o(...l)}finally{a.validateLink=u}}),t.at("image",(...l)=>{const a=l[0].md;if(!a)return s(...l);const c=a.validateLink;a.validateLink=i;try{return s(...l)}finally{a.validateLink=c}})}function loe(e={}){const t=e.markdownItOptions??{},n=typeof t.experimental=="object"&&t.experimental!==null?t.experimental:{},o=Object.prototype.hasOwnProperty.call(t,"stream")?!!t.stream:!0,s=Object.prototype.hasOwnProperty.call(t,"validateLink"),i=new Pee({html:!0,linkify:!0,typographer:!0,...t,experimental:{stream:o,...n}});return s||i.set({validateLink:r=>!ou(r,{tagName:"a",attrName:"href"})}),roe(i),ioe(i),(e.enableMath??!0)&&eoe(i,{...e.mathOptions??{}}),(e.enableContainers??!0)&&ote(i),e.enableFixIndentedCodeBlock!==!1&&Ate(i),ine(i),cne(i),lne(i),pne(i),toe(i),xte(i,{customHtmlTags:e.customHtmlTags}),i}function su(e){const t=Object.assign(Object.create(Object.getPrototypeOf(e)),e);return Array.isArray(e.attrs)&&(t.attrs=e.attrs.map(n=>[...n])),Array.isArray(e.map)&&(t.map=[...e.map]),Array.isArray(e.children)&&(t.children=e.children.map(n=>su(n))),t}function aoe(e){const t=e.meta??{};return{type:"checkbox",checked:t.checked===!0,raw:t.checked?"[x]":"[ ]"}}function coe(e){const t=e,n=t.attrGet?t.attrGet("checked"):void 0,o=n===""||n==="true";return{type:"checkbox_input",checked:o,raw:o?"[x]":"[ ]"}}function uoe(e){const t=String(e.content??"");return{type:"emoji",name:t,markup:String(e.markup??""),raw:`:${t}:`}}function sh(e,t,n){const o=[];let s="",i=t+1;const r=[];for(;in.startsWith(t)||t.startsWith(n)):!1}function HC(e,t,n,o){n.length>0&&e.push(...n),o.length>0&&t.push(...o),n.length=0,o.length=0}function zC(e,t){return!t&&e.startsWith(" ")&&!e.startsWith(" ")?` ${e}`:e}function poe(e,t){const n=[],o=[],s=[],i=[],r=e.split(doe),l=/\r?\n$/.test(e),a=r.some(h=>h.startsWith("diff ")||h.startsWith("--- ")||h.startsWith("+++ ")||h.startsWith("@@ ")),c=h=>{const m=h;if(!fI.some(g=>m.startsWith(g)))if(m.startsWith("-")){const g=m.slice(1);s.push(zC(g,a))}else if(m.startsWith("+")){const g=m.slice(1);i.push(zC(g,a))}else{HC(n,o,s,i);const g=a&&m.startsWith(" ")?m.slice(1):m;n.push(g),o.push(g)}},u=l?Math.max(0,r.length-1):r.length;for(let h=0;h0||i.length>0)&&HC(n,o,s,i);const d=n.join(` -`),f=o.join(` -`);return{original:t&&l&&d?`${d} -`:d,updated:t&&l&&f?`${f} -`:f}}function B8(e){const t=Array.isArray(e.map)&&e.map.length===2,n=e.meta??{},o=typeof n.closed=="boolean"?n.closed:void 0,s=o===!0||o!==!1&&t,i=String(e.info??""),r=i.startsWith("diff"),l=r?(()=>{const c=i,u=c.indexOf(" ");return u===-1?"":String(c.slice(u+1)??"")})():i;let a=String(e.content??"");if(BC.test(a)&&(a=a.replace(BC,"")),r){const{original:c,updated:u}=poe(a,s===!0);return{type:"code_block",language:l,code:String(u??""),raw:String(a??""),diff:r,loading:o===!0?!1:o===!1?!0:!t,originalCode:c,updatedCode:u}}return{type:"code_block",language:l,code:String(a??""),raw:String(a??""),diff:r,loading:o===!0?!1:o===!1?!0:!t}}function hoe(e){const t=e.meta??{};return{type:"footnote_reference",id:String(t.label??""),raw:`[^${String(t.label??"")}]`}}function moe(){return{type:"hardbreak",raw:`\\ -`}}function goe(e,t,n){const o=[];let s="",i=t+1;const r=[];for(;i\s*$/.test(t)||Ya.has(e)}function voe(e){if(!e||e.length===0)return WC();const t=M9.get(e);if(t)return t;const n=e.map(wr).filter(Boolean);if(!n.length){const s=WC();return M9.set(e,s),s}const o={customTagSet:new Set(n),allowedTagSet:m2({customHtmlTags:e})};return M9.set(e,o),o}function gI(e){const t=e,n=t.raw??t.content??t.markup??"";return String(n??"")}function yoe(e){const t=e.meta,n=t?.markstreamCustomHtmlRaw,o=t?.markstreamCustomHtmlInner;return typeof n=="string"&&typeof o=="string"?{raw:n,inner:o}:null}function Vm(e,t){const n=t.toLowerCase();for(let o=e.length-1;o>=0;o--){const[s,i]=e[o];if(String(s).toLowerCase()===n)return i}}function koe(e,t,n){const o=e.slice();return Vm(o,"href")||o.push(["href",t]),n!=null&&!Vm(o,"title")&&o.push(["title",n]),o}function w3(e){return e.map(gI).join("")}function Ph(e){const t=[],n=o=>{const s=String(o??"");if(!s)return;const i=t[t.length-1];if(i?.type==="text"){i.content=`${i.content}${s}`,i.raw=`${i.raw}${s}`;return}t.push({type:"text",content:s,raw:s})};for(const o of e)if(o){if(o.type==="reference"||o.type==="footnote_reference"){n(String(o.raw??""));continue}if("children"in o&&Array.isArray(o.children)){t.push({...o,children:Ph(o.children)});continue}t.push(o)}return t}function boe(e,t,n){let o=0;for(let s=t;s`;g.toLowerCase().includes(x.toLowerCase())||(g+=x),_=!0,b=!0}const v=[],y=/\s([\w:-]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'>]+)))?/g;let w;for(;(w=y.exec(l))!==null;){const x=w[1],A=w[2]||w[3]||w[4]||"";v.push([x,A])}if(c?.has(a)){const x=yoe(e);return[{type:a,tag:a,attrs:v,content:x?x.inner:h.innerTokens.length?w3(h.innerTokens):"",children:h.innerTokens.length?o(h.innerTokens,s,i,r):[],raw:x?.raw??g,loading:e.loading||b,autoClosed:_},h.nextIndex]}return[{type:"html_inline",tag:a,attrs:v,content:g,children:m,raw:g,loading:b,autoClosed:_},h.nextIndex]}function vI(e){if(e.type==="math_inline"){if(e.raw)return String(e.raw);const t=e.markup==="$$"?"$$":"$";return`${t}${String(e.content??"")}${t}`}return Array.isArray(e.children)&&e.children.length>0?e.children.map(t=>vI(t)).join(""):String(e.content??"")}function woe(e){return!e||!Array.isArray(e.children)||e.children.length===0?"":e.children.map(t=>vI(t)).join("")}function UC(e,t=!1){let n=e.attrs??[],o=null;if((!n||n.length===0)&&Array.isArray(e.children))for(const d of e.children){const f=d.attrs;if(Array.isArray(f)&&f.length>0){n=f,o=d;break}}const s=String(n.find(d=>d[0]==="src")?.[1]??""),i=n.find(d=>d[0]==="alt")?.[1],r=woe(o??e);let l="";r?l=r:i!=null&&String(i).length>0?l=String(i):o?.content!=null&&String(o.content).length>0?l=String(o.content):Array.isArray(o?.children)&&o.children[0]?.content?l=String(o.children[0].content):Array.isArray(e.children)&&e.children[0]?.content?l=String(e.children[0].content):e.content!=null&&String(e.content).length>0&&(l=String(e.content));const a=n.find(d=>d[0]==="title")?.[1]??null,c=a===null?null:String(a),u=String(e.content??"");return{type:"image",src:s,alt:l,title:c,raw:u,loading:t}}function _oe(e){const t=String(e.content??"");return{type:"inline_code",code:t,raw:t}}function xoe(e,t,n){const o=[];let s="",i=t+1;const r=[];for(;i=0;o--){const[s,i]=e[o];if(String(s).toLowerCase()===n)return i}}function Aoe(e,t,n){const o=e.slice();return qm(o,"href")||o.push(["href",t]),n!=null&&!qm(o,"title")&&o.push(["title",n]),o}function ih(e,t,n){const o=e[t],s=Soe(o.attrs),i=String(qm(s,"href")??""),r=qm(s,"title"),l=r==null?null:String(r),a=Aoe(s,i,l);let c=t+1;const u=[];let d=!0;for(;cb.type==="strong_open")){const b=String(h.content??""),_=String(h.raw??b),v=su(h);v.content=b.slice(0,-2),v.raw=_.replace(/\*\*$/,""),f=u.slice(),f[f.length-1]=v}const m=So(f,void 0,void 0,n),g=m.map(b=>{const _=b;return"content"in b?String(_.content??""):String(_.raw??"")}).join("");return{node:{type:"link",href:i,title:l,text:g,children:m,raw:`[${g}](${i}${l?` "${l}"`:""})`,loading:d,attrs:a},nextIndex:c0?o:[{type:"text",content:a,raw:a}],raw:`~${a}~`},nextIndex:i0?o:[{type:"text",content:s||String(e[t].content??""),raw:s||String(e[t].content??"")}],raw:`^${s||String(e[t].content??"")}^`},nextIndex:i?@[\\\]^_`{|}~]/,Boe=/\p{P}/u,Hoe=/^[《「『【〔〖〘〚〈([{“‘﹁﹃﹙﹛﹝]$/u,zoe=/^[》」』】〕〗〙〛〉)]}”’﹂﹄﹚﹜﹞]$/u,Woe=/^(?:https?:\/\/|mailto:|ftp:\/\/)/i,Uoe=/:\/\//,_3=1,yI=2,joe=4,Voe=8,kI=16,_a=32,Dh=64,p1=128,bI=256,qoe=512,h1=1024,Koe=1982;function rh(e){let t=0;for(let n=0;n=t){n++,o++;continue}n++,o++;continue}if(s==="*"&&n>=t)return n;n++}return-1}function Xa(e){return!!e&&Poe.test(e)}function Ja(e){return!!e&&(Doe.test(e)||Boe.test(e))}function wI(e,t){return!!e&&!!t&&/^\p{Script=Han}$/u.test(t)&&Hoe.test(e)}function _I(e,t){return!!e&&!!t&&/^[\p{L}\p{N}]$/u.test(t)&&zoe.test(e)}function Goe(e,t){const n=t>0?e[t-1]:void 0,o=e[t+1];return!o||Xa(o)?!1:!(Ja(o)&&!wI(o,n)&&n&&!Xa(n)&&!Ja(n))}function Yoe(e,t){const n=t>0?e[t-1]:void 0,o=e[t+1];return!n||Xa(n)?!1:!(Ja(n)&&!_I(n,o)&&o&&!Xa(o)&&!Ja(o))}function Xoe(e,t,n=0){let o=n,s=!1;for(;o0?e[t-1]:void 0,o=e[t+2];return!o||Xa(o)?!1:!(Ja(o)&&!wI(o,n)&&n&&!Xa(n)&&!Ja(n))}function Qoe(e,t){const n=t>0?e[t-1]:void 0,o=e[t+2];return!n||Xa(n)?!1:!(Ja(n)&&!_I(n,o)&&o&&!Xa(o)&&!Ja(o))}function ese(e,t=0){let n=t,o=!1;for(;n=0&&e[i]==="\\";i--)s++;return s%2===1}const sse=/[\p{L}\p{N}]/u,ise=/^[\p{L}\p{N}]+$/u;function x3(e){return e?sse.test(e):!1}function xI(e){return e?ise.test(e):!1}function P1(e,t){let n=t;for(;n0?e[t-1]:void 0,s=n=2&&o.intraword&&t.push({start:n,end:s}),n=s}for(let n=0;n=3)return o;n=o+s.len}return-1}function cse(e){return e?Woe.test(e)||Uoe.test(e):!1}function use(e,t){if(!e||!t)return null;const n=e.match(/\[([^\]\n]+)\]\(([^)]*)$/);return n&&n[2]===t?n[1]:null}function So(e,t,n,o){if(!e||e.length===0)return[];const s=o?.__linkifyDemotionContext,i=Dp(t),r={filename:s?.filename||i.filename,explicitFilename:s?.explicitFilename||i.explicitFilename,marketTicker:s?.marketTicker||i.marketTicker};(r.filename||r.explicitFilename||r.marketTicker)&&(o={...o,__linkifyDemotionContext:r});const l=o,a=[];let c=null,u=0;const d=o?.requireClosingStrong,f=e;function h(){return e===f&&(e=e.slice()),e}function m(){c=null}function g(ne,ae){const j=e.length===1?t:String(ae.content??""),Y=[],fe=rse(ne);if(fe!==-1){x(ne.slice(0,fe),ne.slice(0,fe));const de=ne.slice(fe);return de&&(B({type:"text",content:de,raw:de}),u--),u++,!0}if(Noe.test(ne)){const de=ne.indexOf("~~");de!==-1&&Y.push({type:"strikethrough",index:de})}if(Ooe.test(ne)){const de=ne.indexOf("**");de!==-1&&Y.push({type:"strong",index:de})}if(/[^*]*\*[^*]+/.test(ne)){const de=j?CI(j,0):ne.indexOf("*");if(j&&de===-1)return!1;de!==-1&&Y.push({type:"emphasis",index:de})}Y.sort((de,J)=>de.index!==J.index?de.index-J.index:de.type===J.type?0:de.type==="strong"?-1:J.type==="strong"?1:0);const ue=Y[0];if(!ue)return!1;if(ue.type==="strikethrough"){const de=ue.index,J=de>-1?ne.slice(0,de):"";if(J&&x(J,J),de===-1)return u++,!0;const se=ne.indexOf("~~",de+2),ce=se===-1?ne.slice(de+2):ne.slice(de+2,se),he=se===-1?"":ne.slice(se+2),{node:Ie}=VC([{type:"s_open",tag:"s",content:"",markup:"~~",info:"",meta:null},{type:"text",tag:"",content:ce,markup:"",info:"",meta:null},{type:"s_close",tag:"s",content:"",markup:"~~",info:"",meta:null}],0,o);return m(),w(Ie),he&&(B({type:"text",content:he,raw:he}),u--),u++,!0}if(ue.type==="strong"){const de=ue.index,J=de>-1?ne.slice(0,de):"";if(J&&x(J,J),de===-1)return u++,!0;if(t&&de===0){let we=!1,Te=0;for(;Te=2)return x(ne,ne),u++,!0}}if(t&&(ne.match(/\*/g)||[]).length>Zoe(t))return x(ne.slice(J.length),ne.slice(J.length)),u++,!0;const se=P1(ne,de);if(se.len>=3){const we=ase(ne,de+se.len);if(we!==-1){const Te=ne.slice(de+se.len,we);if(lse(Te)){const{node:st}=Gf([{type:"strong_open",tag:"strong",content:"",markup:"**",info:"",meta:null},{type:"em_open",tag:"em",content:"",markup:"*",info:"",meta:null},{type:"text",tag:"",content:Te,markup:"",info:"",meta:null},{type:"em_close",tag:"em",content:"",markup:"*",info:"",meta:null},{type:"strong_close",tag:"strong",content:"",markup:"**",info:"",meta:null}],0,t,o);m(),w(st);const Ne=ne.slice(we+3);return Ne&&(B({type:"text",content:Ne,raw:Ne}),u--),u++,!0}}}if(!Joe(ne,de)){const we=ne.slice(de,de+se.len);x(we,we);const Te=ne.slice(de+se.len);return Te&&(B({type:"text",content:Te,raw:Te}),u--),u++,!0}const ce=ese(ne,de+2);let he="",Ie="";if(ce.index!==-1){he=ne.slice(de+2,ce.index),Ie=ne.slice(ce.index+2);const we=ce.index,Te=P1(ne,we);if(se.intraword&&Te.intraword&&!xI(he)||!he&&se.len>=4&&se.intraword)return x(ne.slice(J.length),ne.slice(J.length)),u++,!0}else{if(d||ce.sawInvalidClose||se.intraword)return x(ne.slice(J.length),ne.slice(J.length)),u++,!0;he=ne.slice(de+2),Ie=""}if(!he&&/^\*+$/.test(Ie))return x(ne,ne),u++,!0;const{node:Ge}=Gf([{type:"strong_open",tag:"strong",content:"",markup:"**",info:"",meta:null},{type:"text",tag:"",content:he,markup:"",info:"",meta:null},{type:"strong_close",tag:"strong",content:"",markup:"**",info:"",meta:null}],0,t,o);return m(),w(Ge),Ie&&(B({type:"text",content:Ie,raw:Ie}),u--),u++,!0}if(ue.type==="emphasis"){let de=ue.index;de===-1&&(de=0);const J=ne.slice(0,de);if(J&&x(J,J),!Goe(ne,de)){x(ne[de],ne[de]);const we=ne.slice(de+1);return we&&(B({type:"text",content:we,raw:we}),u--),u++,!0}const se=P1(ne,de),ce=Xoe(j,ne,de+1),he=ce.index,Ie=e[u+1];if(o?.final&&Ie?.type==="em_open"&&he!==-1&&ne.slice(de+1,he).trim()!==ne.slice(de+1,he)||he===-1&&(ce.sawInvalidClose||o?.final||se.intraword||!x3(ne[de+1])))return x(ne.slice(de),ne.slice(de)),u++,!0;const{node:Ge}=sh([{type:"em_open",tag:"em",content:"",markup:"*",info:"",meta:null},{type:"text",tag:"",content:he>-1?ne.slice(de+1,he):ne.slice(de+1),markup:"",info:"",meta:null},{type:"em_close",tag:"em",content:"",markup:"*",info:"",meta:null}],0,o);if(m(),w(Ge),he!==-1&&he{for(let Ge=0;Ge=0&&Ie[Te]==="\\";Te--)we++;if(we%2===0)return Ge}return-1})(ne);if(Y===-1)return!1;let fe=1;for(let Ie=Y+1;Ieue?.type==="math_inline")||!Foe.test(ne))return null;const j=ae.parseInline(ne,{__markstreamFinal:!!o?.final});if(!Array.isArray(j)||j.length===0)return null;const Y=(j.find(ue=>ue?.type==="inline")?.children??[]).filter(ue=>!(ue?.type==="text"&&String(ue.content??"")===""));if(!Y.length||!Y.some(ue=>ue?.type!=="text")||Y.length===1&&Y[0]?.type==="text"&&String(Y[0].content??"")===ne)return null;const fe=So(Y,ne,n,o);return fe.length?fe:null}function v(ne){m(),a.push(ne)}function y(ne){m();const ae=su(ne);a.push(ae)}function w(ne){v(ne)}function x(ne,ae){c?(c.content+=ne,c.raw+=ae??ne):(c={type:"text",content:String(ne??""),raw:String(ae??ne??"")},a.push(c))}function A(ne,ae){if(!ne)return;const j=So([{...ae,type:"text",content:ne,raw:ne}],ne,n,o);if(j.length===1&&j[0]?.type==="text"){const Y=j[0];x(String(Y.content??""),String(Y.raw??Y.content??""));return}for(const Y of j)w(Y)}function L(ne,ae){return String(ne.markup??"").startsWith(ae)}function S(ne){if(!c||ne.loading!==!0||ne.markup!=="\\(\\)")return;const ae=e[u-1];!ae||ae.type!=="text"||!L(ae,"\\(")||c.content.endsWith("(")&&(c.content=c.content.slice(0,-1),c.raw.endsWith("(")&&(c.raw=c.raw.slice(0,-1)),!c.content&&a[a.length-1]===c&&(a.pop(),c=null))}function T(ne){return ne.endsWith("](")?e[u+1]?.type==="link_open"&&e[u+1]?.markup==="linkify"&&e[u+2]?.type==="text"&&e[u+3]?.type==="link_close"&&e[u+4]?.type==="text"&&String(e[u+4]?.content??"").startsWith(")"):!1}function R(ne,ae,j=rh(ne)){let Y=ne;const fe=String(ae.content??"");return(j&_3)!==0&&Y.endsWith("\\")&&!L(ae,"\\\\")&&!fe.endsWith("\\\\")&&(Y=Y.slice(0,-1)),(j&h1)!==0&&Y.endsWith("(")&&!L(ae,"\\(")&&!fe.endsWith("\\(")&&(Y=Y.slice(0,-1)),(j&yI)!==0&&/\*+$/.test(Y)&&!L(ae,"\\*")&&!fe.endsWith("\\*")&&(Y=Y.replace(/\*+$/,"")),Y}for(;u=0;we--){const Te=a[we];if(Te.type!=="text")break;se=we,ce=String(Te.content??"")+ce}seJ==="href")?.[1],de=String(ue??"");if(t&&de){const J=t.indexOf("](");if(J!==-1){const se=t.indexOf(")",J+2);se===-1?ae.loading=!0:ae.loading&&t.slice(J+2,se).includes(de)&&(ae.loading=!1)}}P(ae)||v(ae)}function H(ne){if(ne.markup!=="linkify")return!1;const{node:ae,nextIndex:j}=ih(e,u,o);return W(ae,j)?(u=j,!0):!1}function O(ne){m(),w(Moe(ne)),u++}function P(ne){if(ne.type!=="link")return!1;const ae=a[a.length-1];if(!ae||ae.type!=="text")return!1;const j=String(ae.content??"").match(/^([^[]*)\[([^\]\n]+)\]\($/);if(!j)return!1;const Y=ne,fe=String(Y.href??""),ue=String(Y.text??""),de=String(j[2]??""),J=fe.replace(/^(?:https?:\/\/|mailto:|ftp:\/\/)/i,"");if(!fe||!(ue===fe||ue===J||cse(ue)))return!1;const se=String(j[1]??"");return se?(ae.content=se,ae.raw=se):a.pop(),v({...ne,text:de,children:[{type:"text",content:de,raw:de}],raw:`[${de}](${fe}${Y.title?` "${Y.title}"`:""})`}),!0}function z(ne){if(ne.type!=="link")return!1;const ae=ne,j=String(ae.href??"");return j?W({href:j,title:ae.title==null||ae.title===""?null:String(ae.title),loading:!!ae.loading},u+1):!1}function W(ne,ae){const j=a[a.length-1];if(j?.type!=="image"||j.src||!j.loading||!String(j.raw??"").endsWith("]("))return!1;const Y=e[ae],fe=String(Y?.content??"");if(Y?.type!=="text"||!fe.startsWith(")"))return!1;a.pop(),c=null;const ue=String(j.alt??"");v({type:"image",src:ne.href,alt:ue,title:ne.title,raw:`![${ue}](${ne.href}${ne.title?` "${ne.title}"`:""})`,loading:!!ne.loading});const de=fe.slice(1),J=su(Y);return J.content=de,J.raw=de,h()[ae]=J,!0}function U(ne){if(ne.type!=="link")return!1;const ae=a[a.length-1],j=e[u-1];if(!ae||ae.type!=="text"||j?.type!=="text")return!1;const Y=String(ae.content??""),fe=String(j.content??"");if(!Y.endsWith("!")||!fe.endsWith("!")||L(j,"\\!"))return!1;const ue=Y.slice(0,-1);ue?(ae.content=ue,ae.raw=ue,c=ae):(a.pop(),c=null);const de=ne,J=String(de.text??de.children?.map(he=>String(he?.content??he?.raw??"")).join("")??""),se=String(de.href??""),ce=de.title==null||de.title===""?null:String(de.title);return v({type:"image",src:se,alt:J,title:ce,raw:`![${J}](${se}${ce?` "${ce}"`:""})`,loading:!!de.loading}),!0}function G(ne,ae="",j=null){const Y=String(ne.alt??ne.raw??"");return{type:"link",href:ae,title:j,text:Y,children:[ne],raw:`[${Y}](${ae}${j?` "${j}"`:""})`,loading:!0}}function Z(ne){const ae=ne.startsWith("![")?ne:`![${ne}`,j=ae.slice(2),Y=j.indexOf("](");return{type:"image",src:"",alt:Y===-1?j.replace(/\]$/,""):j.slice(0,Y),title:null,raw:ae,loading:!0}}function ee(ne){const ae=ne.indexOf("[![");if(ae===-1||typeof t=="string"&&e.length===1&&ose(t,ae,"["))return!1;const j=ne.slice(0,ae);return j&&x(j,j),v(G(Z(ne.slice(ae+1)))),u++,!0}function Q(ne){if(o?.final)return!1;const ae=e[u-1];if(ae?.type!=="text"||!String(ae.content??"").endsWith("[")||L(ae,"\\["))return!1;const j=a[a.length-1];if(j?.type==="text"&&j.content.endsWith("[")){const Y=j.content.slice(0,-1);Y?(j.content=Y,j.raw=Y,c=j):(a.pop(),c=null)}return v(G(UC(ne))),u++,!0}function X(ne){if(ne.type!=="link")return!1;const ae=ne,j=String(ae.raw??""),Y=String(ae.text??"");if(!j.startsWith("[![")&&!Y.startsWith("!["))return!1;const fe=ae.title==null||ae.title===""?null:String(ae.title);return v(G({type:"image",src:String(ae.href??""),alt:Y.replace(/^!\[/,"").replace(/\]$/,""),title:fe,raw:j.startsWith("[![")?j.slice(1):j,loading:!0})),!0}function oe(ne){if(!ne.startsWith("]("))return!1;const ae=e[u-2];if(ae?.type==="text"&&String(ae.content??"").endsWith("[")&&L(ae,"\\["))return!1;const j=a[a.length-1];if(j?.type!=="image"&&j?.type!=="link")return!1;const Y=j,fe=j?.type==="link"&&Array.isArray(Y.children)&&Y.children.length===1&&Y.children[0]?.type==="image"?a.pop():null,ue=fe?fe.children[0]:a.pop();if(!ue||ue.type!=="image")return!1;const de=e[u+1];let J=String(fe?.href??""),se=fe?.title==null?null:String(fe.title),ce=!0;if(de?.type==="link_open"){const{node:Ie,nextIndex:Ge}=ih(e,u+1,o);J=Ie.href,se=Ie.title,ce=!0,u=Ge}else{if(J=ne.slice(2),J.includes('"')){const Ie=J.split('"');J=String(Ie[0]??"").trim(),se=Ie[1]==null?null:String(Ie[1]).trim()}u++}const he=G(ue,J,se);return he.loading=ce,v(he),!0}function xe(){const ne=e[u-3];return e[u-2]?.type==="image"&&e[u-1]?.type==="text"&&String(e[u-1].content??"")==="]("&&ne?.type==="text"&&String(ne.content??"").endsWith("[")&&L(ne,"\\[")}function pe(ne,ae){const j=ne.indexOf("[");if(j===-1)return!1;let Y=ne.slice(0,j);const fe=ne.indexOf("](",j);if(fe!==-1){const ue=e[u+2];let de=ne.slice(j+1,fe);if(de.includes("[")){const we=de.indexOf("[");Y+=ne.slice(0,j+we+1);const Te=j+we+1;de=ne.slice(Te+1,fe)}const J=e[u+1];if(ne.endsWith("](")&&J?.type==="link_open"&&ue){const we=e[u+4];let Te=4,st=!0;if(we?.type==="text"){const Re=String(we.content??"");if(Re.startsWith(")")){st=!1;const Ze=Re.slice(1);if(Ze){const gt=su(we);gt.content=Ze,gt.raw=Ze,h()[u+4]=gt}else Te++}else Re==="."&&Te++}A(Y,ae);const Ne=String(ue.content??"");return o?.validateLink&&!o.validateLink(Ne)?x(de,de):v({type:"link",href:Ne,title:null,text:de,children:[{type:"text",content:de,raw:de}],loading:st}),u+=Te,!0}const se=ne.indexOf(")",fe),ce=se!==-1?ne.slice(fe+2,se):"",he=se===-1;let Ie=Y.match(/\*+$/);if(Ie&&(Y=Y.replace(/\*+$/,"")),A(Y,ae),Ie||(Ie=de.match(/^\*+/)),!d&&Ie){const we=Ie[0].length;de=de.replace(/^\*+/,"").replace(/\*+$/,"");const Te=[];if(we===1?Te.push({type:"em_open",tag:"em",nesting:1}):we===2?Te.push({type:"strong_open",tag:"strong",nesting:1}):we===3&&(Te.push({type:"strong_open",tag:"strong",nesting:1}),Te.push({type:"em_open",tag:"em",nesting:1})),Te.push({type:"link",href:ce,title:null,text:de,children:[{type:"text",content:de,raw:de}],loading:he}),we===1){Te.push({type:"em_close",tag:"em",nesting:-1});const{node:st}=sh(Te,0,o);w(st)}else if(we===2){Te.push({type:"strong_close",tag:"strong",nesting:-1});const{node:st}=Gf(Te,0,void 0,o);w(st)}else if(we===3){Te.push({type:"em_close",tag:"em",nesting:-1}),Te.push({type:"strong_close",tag:"strong",nesting:-1});const{node:st}=Gf(Te,0,void 0,o);w(st)}else{const{node:st}=sh(Te,0,o);w(st)}}else o?.validateLink&&!o.validateLink(ce)?x(de,de):v({type:"link",href:ce,title:null,text:de,children:[{type:"text",content:de,raw:de}],loading:he});const Ge=se!==-1?ne.slice(se+1):"";return Ge&&(B({type:"text",content:Ge,raw:Ge}),u--),u++,!0}return!1}function ve(ne){const ae=ne.indexOf("![");if(ae===-1)return!1;const j=ne.slice(0,ae);return j&&!c?c={type:"text",content:j,raw:j}:j&&c&&(c.content+=j),c&&(a.push(c),c=null),v(Z(ne.slice(ae))),u++,!0}function ge(ne){if(!(ne?.startsWith("[")&&n?.type==="list_item_open"))return!1;const ae=ne.slice(1).match(/[^\s\]]/);if(ae===null)return u++,!0;if(ae&&/x/i.test(ae[0])){const j=ae[0]==="x"||ae[0]==="X";return v({type:"checkbox_input",checked:j,raw:j?"[x]":"[ ]"}),u++,!0}return!1}return a}function z8(e,t,n){const o=n?.__sourceLineMapper;if(!o)return{startLine:e,endLine:t};const s=o(e),i=t>e?o(t-1).endLine:o(t).startLine;return{startLine:s.startLine,endLine:Math.max(s.startLine,i)}}function qC(e,t){const n=Math.max(0,Math.min(e.length,Math.trunc(t)));let o=0;for(let s=0;so&&e[s-1]!==` -`&&r++,{startLine:i,endLine:r}}function bp(e,t,n,o){const s=dse(e,t,n);return z8(s.startLine,s.endLine,o)}function fse(e,t){const n=e?.map;if(!Array.isArray(n)||n.length<2)return null;const o=Number(n[0]),s=Number(n[1]);return!Number.isFinite(o)||!Number.isFinite(s)?null:z8(o,s,t)}function Ln(e,t,n){if(!n?.includeSourceMap)return e;const o=fse(t,n);if(!o)return e;if(e.sourceMap=o,e.type==="code_block"){const s=e;s.startLine=o.startLine,s.endLine=o.endLine}return e}function pse(e,t,n,o){if(!o?.includeSourceMap)return e;const s=t?.map;if(!Array.isArray(s)||s.length<2)return e;const i=Number(s[0]),r=Number(s[1]),l=Number(n);return!Number.isFinite(i)||!Number.isFinite(r)||!Number.isFinite(l)||(e.sourceMap=z8(i,Math.max(r,l),o)),e}function hse(e){const t=String(e.content??""),n=t.replace(/[ \t\r\n]+$/g,"");if(n===t)return;e.content=n;const o=e.children;if(!(!Array.isArray(o)||o.length===0))for(;o.length;){const s=o[o.length-1];if(!s){o.pop();continue}if(s.type==="softbreak"||s.type==="hardbreak"){o.pop();continue}if(s.type==="text"){const i=String(s.content??""),r=i.replace(/[ \t\r\n]+$/g,"");if(r===i)break;if(r){s.content=r;break}o.pop();continue}break}}function mse(e){const t=String(e.content??""),n=t.match(/\r?\n\s*\d+[.)]?\s*$/);if(!n||typeof n.index!="number")return;e.content=t.slice(0,n.index);const o=e.children;if(!(!Array.isArray(o)||o.length===0))for(;o.length;){const s=o[o.length-1];if(!s){o.pop();continue}if(s.type==="softbreak"||s.type==="hardbreak"){o.pop();continue}if(s.type==="text"){const i=String(s.content??"");if(/^[ \t\r\n\d.)]*$/.test(i)){o.pop();continue}const r=i.replace(/[ \t\r\n\d.)]+$/g,"");r!==i&&(r?s.content=r:o.pop())}break}}function gse(e){const t=String(e.content??"");return/[ \t\r\n]+$/.test(t)||/\r?\n\s*\d+[.)]?\s*$/.test(t)}function mf(e,t,n){const o=e[t],s=[],i=lc(n,!0);let r=t+1;for(;rd.raw).join("")};n?.includeSourceMap&&Ln(u,e[r],n),s.push(u),r=c+1}else r+=1;const l={type:"list",ordered:o.type==="ordered_list_open",start:(()=>{if(o.attrs&&o.attrs.length){const a=o.attrs.find(c=>c[0]==="start");if(a){const c=Number(a[1]);return Number.isFinite(c)&&c!==0?c:1}}})(),items:s,raw:s.map(a=>a.raw).join(` -`)};return n?.includeSourceMap&&Ln(l,o,n),[l,r+1]}function vse(e,t,n,o){const s=String(n[1]??"note"),i=String(n[2]??s.charAt(0).toUpperCase()+s.slice(1)),r=[],l=lc(o,!0);let a=t+1;for(;ac.raw).join(` -`)} -:::`},a+1]}const yse=new Set(["warning","info","note","tip","danger","caution"]);function kse(e){let t=0;for(;t=0;g--){const b=f[g];if(b.type==="text"&&/:+/.test(b.content)){h=g;break}}const m={type:"paragraph",children:So((h!==-1?f.slice(0,h):f)||[],void 0,void 0,a.options()),raw:String(d.content??"").replace(/\n:+$/,"").replace(/\n\s*:::\s*$/,"")};n?.includeSourceMap&&Ln(m,e[c],n),l.push(m),a.remember(m.raw)}c+=3}else if(e[c].type==="bullet_list_open"||e[c].type==="ordered_list_open"){const[d,f]=mf(e,c,a.options());n?.includeSourceMap&&Ln(d,e[c],n),l.push(d),a.remember(d.raw),c=f}else if(e[c].type==="blockquote_open"){const[d,f]=gf(e,c,a.options());n?.includeSourceMap&&Ln(d,e[c],n),l.push(d),a.remember(d.raw),c=f}else{const d=f2(e,c,a.options());d?(l.push(d[0]),a.remember(d[0].raw),c=d[1]):c++}return[{type:"admonition",kind:s,title:i,children:l,raw:`:::${s} ${i} -${l.map(d=>d.raw).join(` -`)} -:::`},c+1]}const Cse=/^::: ?(warning|info|note|tip|danger|caution|error) ?(.*)$/;function wse(e,t,n){const o=e[t];if(o.type!=="container_open")return null;const s=Cse.exec(String(o.info??""));return s?vse(e,t,s,n):null}const W8={parseContainer:(e,t,n)=>bse(e,t,n),matchAdmonition:wse};function gf(e,t,n){const o=[],s=lc(n,!0);let i=t+1;for(;il.raw).join(` -`)};return n?.includeSourceMap&&Ln(r,e[t],n),[r,i+1]}function _se(e){if(e.info?.startsWith("diff"))return B8(e);const t=String(e.content??""),n=t.match(/ type="application\/vnd\.ant\.([^"]+)"/);let o=t;n?.[1]&&(o=t.replace(/]*>/g,"").replace(/<\/antArtifact>/g,""));const s=Array.isArray(e.map)&&e.map.length===2;return{type:"code_block",language:n?n[1]:String(e.info??""),code:o,raw:o,loading:!s}}function xse(e,t,n){const o=[];let s=t+1,i=[],r=[];const l=lc(n,!0);for(;sc.raw).join("")),s+=3}else if(e[s].type==="dd_open"){let a=s+1;for(r=[];a0&&(o.push({type:"definition_item",term:i,definition:r,raw:`${i.map(c=>c.raw).join("")}: ${r.map(c=>c.raw).join(` -`)}`}),i=[]),s=a+1}else s++;return[{type:"definition_list",items:o,raw:o.map(a=>a.raw).join(` -`)},s+1]}function Sse(e,t,n){const o=e[t].meta??{},s=String(o?.label??"0"),i=[],r=lc(n,!0);let l=t+1;for(;la.raw).join(` -`)}`},l+1]}function Ase(e,t,n){const o=e[t],s=o.attrs,i=Array.isArray(s)&&s.length?Object.fromEntries(s.filter(u=>Array.isArray(u)&&u.length>=1&&u[0]).map(([u,d])=>[String(u),d==null||d===""?!0:String(d)])):void 0,r=String(o.tag?.substring(1)??"1"),l=Number.parseInt(r,10),a=e[t+1],c=String(a.content??"");return{type:"heading",level:l,text:c,...i?{attrs:i}:{},children:So(a.children||[],c,void 0,n),raw:c}}function Mse(e,t,n){const o=t.toLowerCase(),s=new RegExp(String.raw`^<\s*${o}(?=\s|>|/)`,"i"),i=new RegExp(String.raw`^<\s*\/\s*${o}(?=\s|>)`,"i");let r=0,l=Math.max(0,n);for(;l$/.test(d)||r++,l=a+u+1;continue}l=a+1}return-1}function SI(e){const t=String(e.content??"");if(/^\s*");else if(a)a=!b.includes(">");else if(c)c=!b.includes("?>");else if(b.startsWith("");else if(b.startsWith("");else if(b.startsWith("");else{const _=s(b);if(_)if(_.closing){for(let v=r.length-1;v>=0;v--)if(r[v]===_.tag){r.length=v;break}}else _.selfClosing||i(_.after,_.tag)||r.push(_.tag)}}if(d===-1||d>=t)break;u=d+1}return l||a||c||r.length>0}function uie(e,t,n){if(!n?.length)return!1;const o=new Set(Au(n));if(!o.size)return!1;const s=u=>{const d=u.charCodeAt(0);return d>=65&&d<=90||d>=97&&d<=122||d>=48&&d<=57||u==="_"||u==="-"||u===":"},i=u=>u===" "||u===" ",r=u=>{if(u[0]!=="<")return null;let d=1;for(;d"&&g!=="/")return null;const b=u.indexOf(">",d);if(b===-1)return null;let _=b-1;for(;_>=0&&i(u[_]);)_--;return{closing:f,tag:m,selfClosing:!f&&u[_]==="/",after:u.slice(b+1)}},l=(u,d)=>{const f=u.toLowerCase();let h=0;for(;h")return!0}}return!1},a=[];let c=0;for(;c=t?t:u,f=e.slice(c,d),h=f.endsWith("\r")?f.slice(0,-1):f,m=vf(h);if(m){const g=r(h.slice(m.index));if(g)if(g.closing){for(let b=a.length-1;b>=0;b--)if(a[b]===g.tag){a.length=b;break}}else g.selfClosing||l(g.after,g.tag)||a.push(g.tag)}if(u===-1||u>=t)break;c=u+1}return a.length>0}function die(e,t){const n=Use.exec(e);if(!n)return null;const o=n[1]??"",s=n.index+o.length,i=e.indexOf(` -`,s),r=e.slice(s,i===-1?e.length:i);return!vf(r.endsWith("\r")?r.slice(0,-1):r)||aie(e,s)||cie(e,s)||uie(e,s,t)?null:`${e.slice(0,n.index)}${o}`}function RI(e,t,n){let o=t;for(;oo&&(r=!0),t.inMath=!1,t.mathOpenOffset=null,i+=2;continue}i++;continue}if(t.inDollarMath){if(e.startsWith("$$",i)&&!Yf(e,l)){o!=null&&s&&n+i+2>o&&(r=!0),t.inDollarMath=!1,t.dollarMathOpenOffset=null,i+=2;continue}i++;continue}if(e[i]==="`"&&!Yf(e,l)){const a=RI(e,i,"`"),c=fie(e,i+a,a);if(c===-1)break;i=c+a;continue}if(e.startsWith("\\[",i)&&!Yf(e,l)){t.inMath=!0,t.mathOpenOffset=n+i,i+=2;continue}if(e.startsWith("$$",i)&&!Yf(e,l)){t.inDollarMath=!0,t.dollarMathOpenOffset=n+i,i+=2;continue}i++}return r}function pie(e,t){if(!P8(t))return e;const n=t,o=XC.get(n),s=o?.source===e?o.state:o&&e.startsWith(o.source)?PI(o.state,e.slice(o.source.length),o.source.length-o.state.lineBuffer.length).state:h2(e).state;XC.set(n,{source:e,state:s});const{context:i}=s,r=i.inMath?i.mathOpenOffset:i.inDollarMath?i.dollarMathOpenOffset:null;if(r==null)return e;const l=e.slice(r+2),a=e.lastIndexOf(` -`,r-1)+1;if(e.slice(a,r).trim()!==""&&!/^\r?\n/.test(l)||/^\s*!\[/.test(l))return e;const c=l.trim(),u=/^(?:[a-z]|pi)$/i.test(c);return La(l)&&!u?e:e.slice(0,r)}function hie(e,t,n,o,s){const i=V8(e),r=q8(e);if(t.inFence&&t.fenceInBlockquote&&e.trim()&&K8(e)==null&&N9(t),t.inFence&&t.fenceInList&&e.trim()&&i.column=t.fenceLen&&/^\s*$/.test(l.rest)&&N9(t):(t.inFence=!0,t.fenceChar=l.markerChar,t.fenceLen=l.markerLen,t.fenceInBlockquote=l.inBlockquote,t.fenceInList=l.inList||t.listContentIndent!=null&&!l.inBlockquote&&i.column>=t.listContentIndent,t.fenceListIndent=l.listIndent||t.listContentIndent||0);else if(!t.inFence)return tw(e,t,n,o,s)}else return tw(e,t,n,o,s);return!1}function h2(e,t=oie(),n=null,o=!1,s=0){const i=D1(t);let r=D1(t),l="",a=!1,c=0;for(;cc&&e[u-1]==="\r"?u-1:d?u:e.length,h=e.slice(c,f);hie(h,i,s+c,n,o)&&(a=!0),d?(r=D1(i),l=""):l=h,c=d?u+1:e.length}return{closedOpenMath:a,state:{committedContext:r,context:i,lineBuffer:l}}}function PI(e,t,n=0){return t&&!e.context.inMath&&!e.context.inDollarMath&&!e.context.inFence&&!e.committedContext.inFence&&!/[\\$`~\r\n]/.test(t)&&!(e.lineBuffer.endsWith("\\")&&(t[0]==="["||t[0]==="]"))?{closedOpenMath:!1,state:{committedContext:D1(e.committedContext),context:D1(e.context),lineBuffer:e.lineBuffer+t}}:h2(e.lineBuffer+t,e.committedContext,n+e.lineBuffer.length,e.context.inMath||e.context.inDollarMath,n)}function mie(e,t){if(!P8(e))return;const n=e.stream;if(typeof n?.reset!="function")return;const o=e,s=p2.get(o);if(s?.source===t)return;const i=s?t.startsWith(s.source):!1,r=i&&s?t.slice(s.source.length):"",l=i&&s?PI(s.explicitBracketMath,r,s.source.length-s.explicitBracketMath.lineBuffer.length):h2(t),a=l.state,c=i&&s?l.closedOpenMath:!1;if(s&&i&&s.key===null&&s.pendingCandidate===!1&&!c&&!lie(s.source,r)&&!iie(t)){s.source=t,s.explicitBracketMath=a;return}const u=Jne(t);(s&&(s&&!i||s.key!==u||c)||!s&&u)&&n.reset(),sie(e,t,u,a)}function gie(e){return typeof e.preTransformTokens=="function"||typeof e.postTransformTokens=="function"}function vie(e,t){const n=e?.map,o=t?.map;return n===o?!0:!Array.isArray(n)||!Array.isArray(o)?!1:n.length===o.length&&n.every((s,i)=>s===o[i])}function O9(e,t){return!!e&&!!t&&e.type===t.type&&e.tag===t.tag&&e.nesting===t.nesting&&e.markup===t.markup&&e.content===t.content&&vie(e,t)}function nw(e,t){return e[t]?.type==="paragraph_open"&&e[t+1]?.type==="inline"&&e[t+2]?.type==="paragraph_close"}function yie(e){for(let t=0;t+5":""}function sw(e){return{type:"paragraph",children:e,raw:e.map(Cie).join("")}}function iw(e,t){if(t.sourceMap)for(const n of e)n.sourceMap||(n.sourceMap=t.sourceMap)}function rw(e,t){if(e.type!=="paragraph")return null;const n=e.children,o=Array.isArray(n)?n:[];if(o.length===0)return null;const s=Jse(t);if(!s?.size)return null;let i=-1;for(let u=0;uh?.type==="hardbreak")){i=u;break}}if(i===-1)return null;const r=o.slice(0,i),l=o[i];if(!l)return null;const a=[];r.length&&a.push(sw(r)),a.push(l);const c=o.slice(i+1);return c.length&&a.push(sw(c)),a}function wie(e){const t=e.trim();if(!t)return null;const n=/^(?:]*>\s*)?]*)?>/i.test(t),o=/<\/html>\s*$/i.test(t);return!n||!o?null:[{type:"html_block",tag:"html",raw:e,content:e,loading:!1}]}function B1(e){const t=e.raw;if(typeof t=="string")return t;const n=e.content;return typeof n=="string"?n:""}function _ie(e,t){if(e.type!=="html_block"||!t)return!1;const n=String(e.raw??e.content??"");return new RegExp(String.raw`^\s*<\s*\/\s*${qr(t)}\s*>\s*$`,"i").test(n)}const F9=new Set(["iframe","script","style","textarea","title"]);function Hp(e,t,n){if(!e||!t)return null;const o=t.toLowerCase(),s=f=>{if(e.startsWith("",f+4);return{closing:!1,end:y===-1?e.length:y+3,selfClosing:!1,tag:""}}if(e.startsWith("",f+9);return{closing:!1,end:y===-1?e.length:y+3,selfClosing:!1,tag:""}}const h=Do(e.slice(f));if(h===-1)return null;const m=f+h+1,g=e.slice(f,m);if(/^<\s*[!?]/.test(g))return{closing:!1,end:m,selfClosing:!1,tag:""};let b=g.slice(1).trimStart();const _=b.startsWith("/");_&&(b=b.slice(1).trimStart());const v=b.match(/^([A-Z][\w:-]*)/i);return v?.[1]?{closing:_,end:m,selfClosing:/\/\s*>$/.test(g),tag:v[1].toLowerCase()}:{closing:!1,end:f+1,selfClosing:!1,tag:""}},i=(f,h)=>{const m=new RegExp(String.raw`<\s*\/\s*${qr(f)}(?=\s|>)`,"gi");m.lastIndex=h;const g=m.exec(e);if(!g||g.index==null)return null;const b=s(g.index);return b?{start:g.index,end:b.end}:null};let r=-1,l=-1,a=Math.max(0,n);for(;a$/.test(c))return{raw:c,start:r,end:l+1,closed:!0};if(F9.has(o)){const f=i(o,l+1);return f?{raw:e.slice(r,f.end),start:r,end:f.end,closeStart:f.start,closed:!0}:{raw:e.slice(r),start:r,end:e.length,closed:!1}}let u=1,d=l+1;for(;d]*$/,"")} -`}function lw(e){return e.replace(/\r\n/g,` -`).replace(/(^|\n)[ \t]{1,4}/g,"$1")}function Aie(e,t,n){return n?e.includes(n,t)?!0:lw(e.slice(Math.max(0,t))).includes(lw(n)):!1}function Mie(e,t){let n=Math.max(0,t);for(;n)`,"gi");let o=-1,s;for(;(s=n.exec(e))!==null;)o=s.index;return o}function BI(e,t){return{final:t,__disableStreamParse:!0,requireClosingStrong:e.requireClosingStrong,customHtmlTags:e.customHtmlTags,validateLink:e.validateLink}}const Eie=new Set(["admonition","blockquote","code_block","definition_list","footnote","heading","list","math_block","table","thematic_break"]),Iie=/(?:^|\n)\s{0,3}(?:#{1,6}\s+\S|[-+*]\s+\S|\d+[.)]\s+\S|>\s*\S|`{3,}|~{3,}|(?:\*{3,}|-{3,}|_{3,})(?:\s|$)|\|.*\|)/m;function Lie(e){return/\n\s*\n/.test(e)||Iie.test(e)}function $ie(e,t){if(!e.trim()||t.length===0)return!1;if(t.some(o=>Eie.has(String(o?.type??"").toLowerCase()))||t.some(o=>{if(o?.type!=="html_block")return!1;const s=o;return Array.isArray(s.children)&&s.children.length>0}))return!0;if(!Lie(e))return!1;if(t.length>1)return!0;const[n]=t;return!!(n&&n.type==="paragraph")}function Nie(e){const t=[];let n=0;for(;n=e.length)break;const o=e.slice(n).match(/^<([A-Z][\w:-]*)/i);if(!o?.[1])return null;const s=Hp(e,o[1],n);if(!s||s.start!==n)return null;t.push(s.raw),n=s.end}return t.length>1?t:null}function Oie(e,t,n,o){const s=n.customHtmlTags?.join("\0")??"",i=t,r=YC.get(i),l=r&&r.final===o&&r.customHtmlTags===s&&r.requireClosingStrong===n.requireClosingStrong&&r.validateLink===n.validateLink,a=e.map((c,u)=>l&&r.blocks[u]===c?r.children[u]:Dd(c,t,n));return YC.set(i,{blocks:e,children:a,customHtmlTags:s,final:o,requireClosingStrong:n.requireClosingStrong,validateLink:n.validateLink}),a.flat()}function Fie(e,t,n,o){return e.map(s=>{if(s?.type!=="html_block")return s;const i=s,r=String(i.tag??"").toLowerCase();if(!r||r==="details"||zE.has(r)||Array.isArray(i.children))return s;const l=String(s.raw??i.content??"");if(!l)return s;const a=Do(l);if(a===-1)return s;const c=Hp(l,r,0),u=c?.closeStart??-1,d=c?.closed===!0&&u>=a+1,f=d?l.slice(a+1,u):l.slice(a+1);if(!f.trim())return s;const h=BI(n,o),m=d?null:Nie(f),g=m?Oie(m,t,h,o):Dd(f,t,h);return $ie(f,g)?{...s,children:g}:s})}function Rie(e){for(const t of e)if(t?.type==="html_block")return!0;return!1}function Dd(e,t,n){return e.trim()?zI(e,t,{...n,__disableStreamParse:!0}):[]}function Pie(e,t,n){const o=Dd(e,t,n),s=o[0];return o.length===1&&s?.type==="paragraph"&&Array.isArray(s.children)?s.children:o}function Die(e,t,n){const o=SI({content:e}),s=Do(e),i=DI(e,"summary");if(s!==-1&&i!==-1&&i>=s+1){const r=Pie(e.slice(s+1,i),t,n);r.length>0&&(o.children=r)}return o.raw=e,o}function Bie(e,t,n){const o=Do(e);if(o===-1)return[];const s=e.slice(o+1);if(!s.trim())return[];const i=Hp(s,"summary",0);if(!i)return Dd(s,t,n);const r=s.slice(0,i.start),l=s.slice(i.end);return[...Dd(r,t,n),Die(i.raw,t,n),...Dd(l,t,n)]}function HI(e,t,n,o,s,i=0){const r=[];let l=i;for(let a=0;a{const U=DI(f,"details");return U!==-1?f.slice(0,U):f})():f,[y]=HI(_?[]:g===-1?e.slice(a+1):e.slice(a+1,g),t,n,o,s,h+f.length),w=Bie(v,n,BI(o,s)),x=g===-1?"":String(e[g].raw??B1(e[g])??""),A=_||g!==-1&&b?.closed===!0,L=x.replace(/[\t\r\n ]+$/,""),S=A?(()=>{const U=(b?.raw??"").lastIndexOf(L);return U===-1?t.length:h+U})():t.length,T=Do(f),R=_&&T!==-1?h+T+1:h+f.length,B=t.slice(R,S===-1?t.length:S),I=n.parse(B,{__markstreamFinal:s}),$=n.renderer.render(I,n.options,{__markstreamFinal:s}),D=S+L.length,H=A?Math.max(S+x.length,Mie(t,D)):t.length,O=A?t.slice(S,H):x,P=A?t.slice(h,H):t.slice(h),z=_&&T!==-1?f.slice(0,T+1):f,W={...c,tag:"details",attrs:d2(f.slice(0,T+1)),raw:P,content:`${z}${$}${O}`,children:[...w,...y],loading:!s&&!A};if(o.includeSourceMap&&(W.sourceMap=bp(t,h,A?H:t.length,o)),r.push(W),l=A?H:t.length,g===-1&&!_)break;g!==-1&&(a=g)}return[r,l]}function Hie(e,t,n,o){if(!n)return e;const s=e.slice();let i=0;for(let r=0;r=d.start&&T.end<=d.end){s.splice(A,1);continue}break}x=S+L.length,s.splice(A,1)}}return s}function zie(e){const t=l=>l===" "||l===" "||l===` -`||l==="\r",n=l=>{if(!l||l[0]!=="<"||l.includes(">"))return!1;let a=1;if(a{const b=g.charCodeAt(0);return b>=65&&b<=90||b>=97&&b<=122},u=g=>{const b=g.charCodeAt(0);return b>=48&&b<=57},d=g=>g==="!"||c(g),f=g=>c(g)||u(g)||g===":"||g==="-",h=g=>c(g)||u(g)||g==="_"||g==="."||g===":"||g==="-",m=h;if(a>=l.length||!d(l[a]))return!1;for(a++;a=l.length)return!0;if(l[a]==="/"){for(a++;a=l.length}if(!h(l[a]))return!1;for(a++;a=l.length)return!0;const g=l[a];if(g==='"'||g==="'"){for(a++;a=l.length)return!0;a++}else{for(;a"||b==='"'||b==="'"||b==="`")break;a++}if(a>=l.length)return!0}}}return!0},o=(l,a)=>{let c=!1,u="",d=0;const f=v=>v===" "||v===" ",h=v=>{let y=0;for(;y{let y=0;for(;y";)for(w=!0,y++;y{const y=h(v);if(y)return y;const w=m(v);return w==null?null:h(w)};let b=0;const _=l.split(/\r?\n/);for(const v of _){const y=b,w=b+v.length;if(a=d&&/^\s*$/.test(x.rest)&&(c=!1,u="",d=0):(c=!0,u=A,d=L)}if(a<=w)break;b=w+1}return c},s=String(e??""),i=s.lastIndexOf("<");if(i===-1||o(s,i))return s;if(i>0){const l=s[i-1],a=l===" "||l===" "||l===` -`||l==="\r",c=s[i-2];if(!a&&!((l==="n"||l==="r")&&c==="\\"))return s}const r=s.slice(i);return r.includes(">")||r.length>1&&(r[1]===" "||r[1]===" "||r[1]===` -`||r[1]==="\r")||!n(r)?s:s.slice(0,i)}function cw(e,t){if(e===t)return;const n=e.split(/\r?\n/),o=t.split(/\r?\n/),s=[];let i=0;for(let r=0;r{const l=Number.isFinite(r)?Math.max(0,Math.trunc(r)):0;if(lString(m??"").toLowerCase()).filter(Boolean));if(!n.size)return e;const o=m=>m===" "||m===" ",s=m=>{const g=m.charCodeAt(0);return g>=65&&g<=90||g>=97&&g<=122||g>=48&&g<=57||m==="_"||m==="-"||m===":"},i=m=>{if(!m)return!1;if(m[0]===" ")return!0;let g=0;for(let b=0;b=4)return!0;continue}if(_===" ")return!0;break}return!1},r=m=>{let g=!1,b=!1;for(let _=0;_")return _}return-1},l=m=>{let g=0;for(;g{if(i(m))return-1;const b=m.replace(/^[ \t]+/,"");if(!b||b.startsWith(">")||b.startsWith("|")||/^(?:[*+-]|\d+[.)])[\t ]+/.test(b))return-1;let _=!1,v=0;for(;v=x.length){_=!0,v++;continue}const L=x[A];if(L==="!"||L==="?"){_=!0,v+=w+1;continue}if(L==="/"){_=!0,v+=w+1;continue}const S=A;for(;A"&&R!=="/"){_=!0,v++;continue}const B=new RegExp(String.raw`<\s*\/\s*${T}\s*>`,"i"),I=/\/\s*>$/.test(x),$=B.test(m.slice(v+w+1)),D=B.test(e.slice(g+v+w+1)),H=/[\r\n]/.test(e.slice(g+v+w+1));if(_&&n.has(T)&&!I&&!$&&(D||H))return v;_=!0,v+=w+1}return-1};let c=!1,u="",d=0,f="",h=0;for(;hh&&e[m-1]==="\r",_=g?b?m-1:m:e.length,v=e.slice(h,_),y=g?b?`\r -`:` -`:"",w=l(v);let x=v;if(!c&&!w){const A=a(v,h);if(A!==-1){const L=y||` -`;x=`${v.slice(0,A).replace(/[ \t]+$/,"")}${L}${L}${v.slice(A).replace(/^[ \t]+/,"")}`}}f+=x,f+=y,w&&(c?w.markerChar===u&&w.markerLen>=d&&/^\s*$/.test(w.rest)&&(c=!1,u="",d=0):(c=!0,u=w.markerChar,d=w.markerLen)),h=g?m+1:e.length}return f}function Uie(e,t){if(!e||!t.length)return e;const n=new Set(t.map(d=>String(d??"").toLowerCase()));if(!n.size)return e;const o=d=>d===" "||d===" ",s=d=>{const f=d.charCodeAt(0);return f>=65&&f<=90||f>=97&&f<=122||f>=48&&f<=57||d==="_"||d==="-"},i=d=>{let f=0;for(;f{let f=!1,h=!1;for(let m=0;m")return m}return-1},l=(d,f,h)=>{const m=h.toLowerCase();let g=d.indexOf("<",f);for(;g!==-1;){let b=g+1;for(;b=d.length||d[b]!=="/"){g=d.indexOf("<",g+1);continue}for(b++;bd.length){g=d.indexOf("<",g+1);continue}let _=!0;for(let y=0;y="A"&&w<="Z"?String.fromCharCode(w.charCodeAt(0)+32):w)!==m[y]){_=!1;break}}if(!_){g=d.indexOf("<",g+1);continue}let v=b+m.length;if(v")return!0;g=d.indexOf("<",g+1)}return!1},a=d=>{let f=0;for(;f=d.length||d[f]!=="<")return d;for(f++;f=d.length||d[f]==="/")return d;const h=f;for(;fu&&e[d-1]==="\r",h=f?d-1:d,m=e.slice(u,h);c+=a(m),c+=f?`\r -`:` -`,u=d+1}return c}function jie(e,t){if(!e||!t.length)return e;const n=new Set(t.map(f=>String(f??"").toLowerCase()));if(!n.size)return e;const o=f=>f===" "||f===" ",s=f=>{let h=0,m=!1,g=0;for(;h=f.length||f[h]!==">")break;for(m=!0,h++;h{let h=0;for(;hnew RegExp(String.raw`(<\s*\/\s*${f}\s*>)${"(?=[\\t ]*(?:#{1,6}[\\t ]+|>|(?:[*+-]|\\d+[.)])[\\t ]+|(?:`{3,}|~{3,})|\\||\\$\\$|:{3,}|\\[\\^[^\\]]+\\]:|(?:-{3,}|\\*{3,}|_{3,})))"}`,"gi"));let l=!1,a="",c=0,u="",d=0;for(;dd&&e[f-1]==="\r",g=h?m?f-1:f:e.length,b=e.slice(d,g),_=h?m?`\r -`:` -`:"",v=s(b),y=v?.prefix??"",w=v?.content??b,x=i(w);x&&(l?x.markerChar===a&&x.markerLen>=c&&/^\s*$/.test(x.rest)&&(l=!1,a="",c=0):(l=!0,a=x.markerChar,c=x.markerLen));let A=w;if(!l&&A.includes("{if(B.replace(/^[\t ]+/,"").startsWith("|"))return S;const I=B.slice(0,R).replace(/^[\t ]+/,"");if(I.length>0){const $=T.match(/^<\s*\/\s*([A-Z][\w:-]*)/i)?.[1]?.toLowerCase()??"",D=I.match(/^<\s*([A-Z][\w:-]*)/i)?.[1]?.toLowerCase()??"";if(!$||!D||$!==D)return S}return`${T} - -`});if(y){const L=y+A.split(` -`).join(` -${y}`);u+=L}else u+=A;u+=_,d=h?f+1:e.length}return u}function Vie(e,t){if(!e||!t.length)return e;const n=new Set(t.map(I=>String(I??"").toLowerCase()));if(!n.size)return e;const o=I=>I===" "||I===" ",s=I=>{if(!I)return!1;if(I[0]===" ")return!0;let $=0;for(let D=0;D=4)return!0;continue}if(H===" ")return!0;break}return!1},i=I=>{const $=I.charCodeAt(0);return $>=65&&$<=90||$>=97&&$<=122||$>=48&&$<=57||I==="_"||I==="-"||I===":"},r=I=>{let $=0;for(;${let $=0,D=!1,H=0;for(;$=I.length||I[$]!==">")break;for(D=!0,$++;$r(I).startsWith("<"),c=I=>{for(let $=0;${if(s(I))return"";const $=r(I);if(!$.startsWith("<"))return"";let D=1;for(;D<$.length&&o($[D]);)D++;if(D>=$.length||$[D]==="/"||$[D]==="!"||$[D]==="?")return"";const H=D;for(;D<$.length&&i($[D]);)D++;if(D===H)return"";const O=$.slice(H,D).toLowerCase();if(!n.has(O))return"";const P=$[D];return P&&P!==" "&&P!==" "&&P!==">"&&P!=="/"?"":O},d=I=>{if(s(I))return null;const $=r(I);if(!$.startsWith("<"))return null;let D=1;for(;D<$.length&&o($[D]);)D++;if(D>=$.length)return null;const H=$[D]==="/";if(H)for(D++;D<$.length&&o($[D]);)D++;const O=$[D];if(!O||O==="!"||O==="?")return null;const P=D;for(;D<$.length&&i($[D]);)D++;if(D===P)return null;const z=$.slice(P,D).toLowerCase();if(!n.has(z))return null;const W=$[D];if(W&&W!==" "&&W!==" "&&W!==">"&&W!=="/")return null;if(H)return{type:"close",name:z};if(/\/\s*>\s*$/.test($))return{type:"open",name:z,complete:!0};const U=$.indexOf(">",D);if(U!==-1){const G=$.slice(U+1);if(new RegExp(`<\\s*\\/\\s*${z}\\s*>`,"i").test(G))return{type:"open",name:z,complete:!0}}return{type:"open",name:z,complete:!1}},f=I=>{if(s(I))return null;const $=r(I).replace(/[ \t]+$/,"");if(!$.startsWith("<")||/^<\s*(?:!--|!doctype\b|\?)/i.test($))return null;const D=$.match(/^<\s*([A-Z][\w:-]*)\b[^>]*\/\s*>\s*$/i);if(D?.[1])return D[1].toLowerCase();const H=$.match(/^<\s*([A-Z][\w:-]*)\b[^>]*>[\s\S]*<\s*\/\s*([A-Z][\w:-]*)\s*>\s*$/i);if(!H?.[1]||!H[2])return null;const O=H[1].toLowerCase();return O===H[2].toLowerCase()?O:null};let h=!1,m="",g=0;const b=I=>{let $=0;for(;$b(I),v=I=>{const $=r(I);return $?s(I)?!0:/^(?:#{1,6}[ \t]+|>|[*+-][ \t]+|\d+[.)][ \t]+|`{3,}|~{3,}|\||\$\$|:{3,}|\[\^[^\]]+\]:|-{3,}|\*{3,}|_{3,})/.test($):!1},y=(I,$,D)=>{let H=I,O=0;for(;HH&&e[P-1]==="\r",U=z?W?P-1:P:e.length,G=e.slice(H,U),Z=l(G),ee=Z?.key??"";if(O>0&&$&&ee!==$)break;const Q=Z?.content??G,X=d(Q);if(X?.name===D){if(X.type==="open")X.complete||O++;else if(O>0&&(O--,O===0))return!1}else if(O>0&&(c(Q)||v(Q)))return!0;if(z)H=P+1;else break}return!1};let w="",x=0,A=!0,L=!1,S=!1,T=` -`;const R=[];let B="";for(;xx&&e[I-1]==="\r",H=$?D?I-1:I:e.length,O=e.slice(x,H),P=$?D?`\r -`:` -`:"",z=l(O),W=z?.key??"",U=z?.content??O,G=_(U);G&&(h?G.markerChar===m&&G.markerLen>=g&&/^\s*$/.test(G.rest)&&(h=!1,m="",g=0):(h=!0,m=G.markerChar,g=G.markerLen));const Z=R.length>0;if(!h&&!Z){const Q=u(U),X=!!Q&&!A&&L&&S&&y(x,W,Q);Q&&!A&&(!L||X)&&(W&&B&&W===B?w+=`${W}${T}`:W||(w+=T))}if(w+=O,w+=P,P&&(T=P),!h){const Q=d(U);if(Q){if(Q.type==="open")Q.complete||R.push(Q.name);else for(let X=R.length-1;X>=0;X--)if(R[X]===Q.name){R.length=X;break}}}const ee=c(U);A=ee,L=!ee&&a(U),S=!ee&&!!f(U),B=W,x=$?I+1:e.length}return w}function zI(e,t,n={}){const o=EI(n),s=o?tf():0,i=!!n.final,r=(e??"").toString();let l=r.replace(/([^\\])\r(ight|ho)/g,"$1\\r$2").replace(/([^\\])\r?\n(abla|eq|ot|exists)/g,"$1\\n$2");if(tie(t,n)&&(t.stream.reset(),nie(t)),i||(l.endsWith("- *")&&(l=l.replace(/- \*$/,"- \\*")),/(?:^|\n)\s*-\s*$/.test(l)?l=l.replace(/(?:^|\n)\s*-\s*$/,v=>v.startsWith(` -`)?` -`:""):/(?:^|\n)\s*--\s*$/.test(l)?l=l.replace(/(?:^|\n)\s*--\s*$/,v=>v.startsWith(` -`)?` -`:""):/(?:^|\n)\s*>\s*$/.test(l)?l=l.replace(/(?:^|\n)\s*>\s*$/,v=>v.startsWith(` -`)?` -`:""):/\n\s*[*+]\s*$/.test(l)?l=l.replace(/\n\s*[*+]\s*$/,` -`):/(?:^|\n)\s*\d+\s*$/.test(l)?/^\d+$/.test(l.trim())||(l=l.replace(/(?:^|\n)\s*\d+\s*$/,v=>v.startsWith(` -`)?` -`:"")):/(?:^|\n)\s*\d+[.)]\s+\*{1,3}\s*$/.test(l)?l=l.replace(/((?:^|\n)\s*\d+[.)]\s+)(\*{1,3})\s*$/,(v,y,w)=>`${y}${w.split("").map(()=>"\\*").join("")}`):/(?:^|\n)\s*\d+[.)]\s*$/.test(l)?l=l.replace(/(?:^|\n)\s*\d+[.)]\s*$/,v=>v.startsWith(` -`)?` -`:""):/\n[[(]\n*$/.test(l)&&(l=l.replace(/(\n\[|\n\()+\n*$/g,` -`)),l=pie(l,t),l=die(l,n.customHtmlTags)??l),n.customHtmlTags?.length&&l.includes("<")){const v=Au(n.customHtmlTags);if(v.length&&(l=Wie(l,v),l=Uie(l,v),l=Vie(l,v),l=jie(l,v),l.includes("[\t ]*)(\r?\n)(?![\t ]*\r?\n|$)`,"gim");l=l.replace(w,"$1$2$2")}}i||(l=zie(l));const a=wie(l);if(a){if(n.includeSourceMap){const w={...n,__sourceLineMapper:cw(r,l)};a[0].sourceMap=bp(l,0,l.length,w)}const v=n.preTransformTokens,y=n.postTransformTokens;if(j8(t,n)||typeof v=="function"||typeof y=="function"){const w=ow(t,l,{__markstreamFinal:i},n),x=typeof v=="function"&&v(w)||w;typeof y=="function"&&y(x)}return JC(a,n,o,s)}const c=ow(t,l,{__markstreamFinal:i},n);if(!c||!Array.isArray(c))return JC([],n,o,s);const u=n.preTransformTokens,d=n.postTransformTokens;let f=c;u&&typeof u=="function"&&(f=u(f)||f);const h=t,m=typeof h.validateLink=="function"&&h.__markstreamOriginalValidateLink&&h.validateLink!==h.__markstreamOriginalValidateLink?h.validateLink:void 0,g=n.validateLink??m??h.options?.validateLink??(typeof h.validateLink=="function"?h.validateLink:void 0),b={...n,validateLink:g,__markdownIt:t,__sourceLineMapper:n.includeSourceMap===!0?cw(r,l):void 0,__sourceMarkdown:l,__customHtmlBlockCursor:0};let _=Xse(t,l,f,b,o);if(d&&typeof d=="function"){const v=d(f);if(Array.isArray(v)){const y=v[0],w=y?.type;y&&typeof w=="string"?_=Bh(v,{...b,__customHtmlBlockCursor:0},o):_=v}}if(Rie(_)&&(_=Hie(_,i,l,b),_=HI(_,l,t,b,i)[0],_=Fie(_,t,b,i)),i){const v=new WeakSet,y=w=>{if(!w||typeof w!="object"||v.has(w))return;if(v.add(w),Array.isArray(w)){for(const A of w)y(A);return}const x=w;x.type==="html_block"&&x.loading===!0&&(x.loading=!1);for(const A of Object.values(x))y(A)};y(_)}return _=LI(_,n),n.debug&&console.log("Parsed Markdown Tree Structure:",_),II(_,o,s)}function uw(e,t){if(!e||!Array.isArray(e))return[];const n=[],o=lc(t),s=t?.includeSourceMap===!0;let i=0;for(;iu.type==="html_block")){if(s)for(const u of c)Ln(u,l,t);for(const u of c)sl(u,l,t);n.push(...c)}else{const u={type:"paragraph",raw:a,children:c};s&&Ln(u,l,t);const d=rw(u,t);if(d){s&&iw(d,u);for(const f of d)sl(f,l,t);n.push(...d)}else sl(u,l,t),n.push(u)}o.remember(a)}i+=1;break;default:i+=1;break}}return n}const qie=/^([a-z][\w-]*)(?=[\t\n\f\r />]|$)/i,Kie=new Set([...Pp,"base","button","datalist","dialog","embed","fieldset","form","iframe","input","legend","link","meta","object","optgroup","option","output","param","select","style","template","textarea","title"]),Zie=new Set(["a","abbr","b","blockquote","br","caption","code","col","colgroup","dd","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","ins","kbd","li","mark","ol","p","picture","pre","s","small","source","span","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","ul"]);function dw(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Gie(e){return typeof e=="string"?e:e==null?"":String(e)}function WI(e){return/^[^\s"'<>`=]+$/.test(e)&&!/^on/i.test(e)}function $a(e){return Gie(e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function UI(e){return $a(e).replace(/`/g,"`")}function g2(e){return String(e??"").trim().toLowerCase()}function Z8(e,t="safe"){const n=g2(e);return n?t==="escape"?!0:t==="trusted"?Pp.has(n):!Zie.has(n):!1}function jI(e,t="safe"){const n=g2(e);return n?t==="escape"?!0:t==="trusted"?Pp.has(n):Kie.has(n):!1}function fw(e){const t=Object.entries(e);return t.length===0?"":t.map(([n,o])=>o===""?` ${n}`:` ${n}="${UI(o)}"`).join("")}function VI(e){const t=e.startsWith("/"),n=t?e.slice(1):e,o=n.match(qie);return o?{attrsStr:t?"":n.slice(o[0].length).trimStart(),isClosing:t,isSelfClosing:!t&&e.trimEnd().endsWith("/"),tagName:o[1]}:null}function Yie(e,t){const n=e.split(",").map(o=>o.trim()).filter(Boolean);return n.length===0?!1:n.some(o=>{const s=o.split(/\s+/,1)[0]??"";return!s||ou(s,{tagName:t,attrName:"srcset"})})}function qI(e,t,n,o){return Vee.has(e)||n==="safe"&&e==="style"?!0:e==="srcset"?Yie(t,o):!!(qee.has(e)&&t&&ou(t,{tagName:o,attrName:e}))}function Vc(e,t){const n=t.toLowerCase();return Object.keys(e).find(o=>o.toLowerCase()===n)}function KI(e,t,n,o=!1){if(t!=="safe"||g2(n)!=="a")return e;const s=Vc(e,"href");if(o&&(!s||!e[s])){const a=Vc(e,"target"),c=Vc(e,"rel");return a&&delete e[a],c&&delete e[c],e}const i=Vc(e,"target");if((i?String(e[i]).trim():"").toLowerCase()!=="_blank")return e;const r=Vc(e,"rel"),l=new Set(String(r?e[r]:"").split(/\s+/).map(a=>a.trim()).filter(Boolean).filter(a=>a.toLowerCase()!=="opener"));return l.add("noopener"),l.add("noreferrer"),r&&r!=="rel"&&delete e[r],e.rel=Array.from(l).join(" "),e}function pw(e,t="safe",n){const o={};for(const[s,i]of Object.entries(e)){const r=s.trim(),l=r.toLowerCase();!r||!WI(r)||qI(l,i,t,n)||(o[r]=i)}return KI(o,t,n,!!Vc(e,"href"))}function ZI(e,t){const n=e.toLowerCase();return HE.has(n)?!1:dw(t,n)||dw(t,e)}function G8(e,t="safe",n){const o={};for(const[s,i]of Object.entries(e)){const r=s.trim(),l=r.toLowerCase();!r||!WI(r)||qI(l,i,t,n)||(o[r]=i)}return KI(o,t,n,!!Vc(e,"href"))}function H1(e){const t={};if(!Array.isArray(e)||e.length===0)return t;for(const[n,o]of e)n&&(t[String(n)]=o==null?"":String(o));return t}function Hh(e,t="safe",n){const o=G8(H1(e),t,n),s=Object.entries(o).map(([i,r])=>[i,r]);return s.length>0?s:void 0}function Xie(e,t){const n=t.toLowerCase();if(["checked","disabled","readonly","required","autofocus","multiple","hidden"].includes(n))return e==="true"||e===""||e===t;if(["value","min","max","step","width","height","size","maxlength"].includes(n)){const o=Number(e);if(e!==""&&!Number.isNaN(o))return o}return e}function Jie(e){const t={};for(const[n,o]of Object.entries(e))t[n]=Xie(o,n);return t}function R9(e){return e.trim().length>0}function GI(e){const t=[];let n=0;for(;n",n);if(r!==-1){n=r+3;continue}break}const o=e.indexOf("<",n);if(o===-1){if(nn){const r=e.slice(n,o);R9(r)&&t.push({type:"text",content:r})}if(e.startsWith("![CDATA[",o+1)){const r=e.indexOf("]]>",o);if(r!==-1){t.push({type:"text",content:e.slice(o,r+3)}),n=r+3;continue}break}if(e.startsWith("!",o+1)){const r=e.indexOf(">",o);if(r!==-1){n=r+1;continue}break}const s=e.indexOf(">",o);if(s===-1)break;const i=VI(e.slice(o+1,s));if(!i){const r=e.slice(o,s+1);R9(r)&&t.push({type:"text",content:r}),n=s+1;continue}if(i.isClosing)t.push({type:"tag_close",tagName:i.tagName});else{const r={};if(i.attrsStr){const l=/([^\s=]+)(?:=(?:"([^"]*)"|'([^']*)'|(\S*)))?/g;let a;for(;(a=l.exec(i.attrsStr))!==null;){const c=a[1],u=a[2]??a[3]??a[4]??"";c&&!c.endsWith("/")&&(r[c]=u)}}t.push({type:i.isSelfClosing||Ya.has(i.tagName.toLowerCase())?"self_closing":"tag_open",tagName:i.tagName,attrs:r})}n=s+1}return t}function Qie(e){const t=[];let n=0;for(;n",n);if(l!==-1){n=l+3;continue}break}const o=e.indexOf("<",n);if(o===-1){nn&&t.push({type:"text",content:e.slice(n,o)}),e.startsWith("![CDATA[",o+1)){const l=e.indexOf("]]>",o);if(l!==-1){t.push({type:"text",content:e.slice(o,l+3)}),n=l+3;continue}break}if(e.startsWith("!",o+1)){const l=e.indexOf(">",o);if(l!==-1){n=l+1;continue}break}const s=e.indexOf(">",o);if(s===-1)break;const i=VI(e.slice(o+1,s));if(!i){t.push({type:"text",content:e.slice(o,s+1)}),n=s+1;continue}if(i.isClosing){t.push({type:"tag_close",tagName:i.tagName}),n=s+1;continue}const r={};if(i.attrsStr){const l=/([^\s=]+)(?:=(?:"([^"]*)"|'([^']*)'|(\S*)))?/g;let a;for(;(a=l.exec(i.attrsStr))!==null;){const c=a[1],u=a[2]??a[3]??a[4]??"";c&&!c.endsWith("/")&&(r[c]=u)}}t.push({type:i.isSelfClosing||Ya.has(i.tagName.toLowerCase())?"self_closing":"tag_open",tagName:i.tagName,attrs:r}),n=s+1}return t}function ere(e){const t=String(e.tagName??"").trim();if(!t)return"";if(e.type==="tag_close")return`</${$a(t)}>`;const n=Object.entries(e.attrs??{}).map(([o,s])=>s===""?` ${$a(o)}`:` ${$a(o)}="${UI(s)}"`).join("");return e.type==="self_closing"?`<${$a(t)}${n} />`:`<${$a(t)}${n}>`}function tre(e,t){if(!e||!e.includes("<")||!t||Object.keys(t).length===0)return!1;for(const n of GI(e))if((n.type==="tag_open"||n.type==="self_closing")&&ZI(n.tagName??"",t))return!0;return!1}function Bd(e,t="safe"){if(!e)return"";if(t==="escape")return $a(e);const n=Qie(e),o=[],s=[],i=[];for(const r of n){if(r.type==="text"){i.length===0&&s.push($a(r.content??""));continue}const l=g2(r.tagName);if(!l)continue;if(jI(l,t)){r.type==="tag_open"?i.push(l):r.type==="tag_close"&&i[i.length-1]===l&&i.pop();continue}if(i.length>0)continue;if(t==="safe"&&Z8(l,t)){s.push(ere(r));continue}if(r.type==="self_closing"){s.push(`<${l}${fw(pw(r.attrs??{},t,l))}>`);continue}if(r.type==="tag_open"){s.push(`<${l}${fw(pw(r.attrs??{},t,l))}>`),Ya.has(l)||o.push(l);continue}const a=o.lastIndexOf(l);if(a===-1)continue;for(;o.length>a+1;){const u=o.pop();u&&s.push(``)}const c=o.pop();c&&s.push(``)}for(;o.length>0;){const r=o.pop();r&&s.push(``)}return s.join("")}const nre=[/javascript:/i,/vbscript:/i,/data:text\/html/i,/expression\s*\(/i,/@import/i],hw="http://www.w3.org/2000/svg",ore=new Set(["script","style","iframe","object","embed","link","meta"]),sre=new Set(["svg","style","g","a","defs","marker","path","rect","circle","ellipse","line","polyline","polygon","text","tspan","title","desc","use","image","lineargradient","radialgradient","stop","clippath","mask","pattern"]),ire=new Set(["href","xlink:href","src","srcdoc","action","data","formaction","poster"]),rre=new Set(["clip-path","fill","filter","marker-end","marker-mid","marker-start","mask","stroke"]),lre=new Set(["circle","ellipse","image","line","path","polygon","polyline","rect","text","tspan","use"]);function are(e){return(e.getAttribute("href")||e.getAttribute("xlink:href"))?.startsWith("#")===!0}function cre(e){return!!(e.getAttribute("href")||e.getAttribute("xlink:href")||e.getAttribute("src"))}function ure(e){const t=e.nodeName.toLowerCase();return t==="use"?are(e):t==="image"?cre(e):t==="text"||t==="tspan"?!!e.textContent?.trim():lre.has(t)}function dre(e){return e.replace(/(["'])\s*javascript:/gi,"$1#").replace(/\bjavascript:/gi,"#").replace(/(["'])\s*vbscript:/gi,"$1#").replace(/\bvbscript:/gi,"#").replace(/\bdata:text\/html/gi,"#")}function fre(e,t,n){const o=e.toLowerCase(),s=t.toLowerCase(),i=String(n??"").trim();return i?(o==="use"||o==="marker"||o==="clippath"||o==="mask")&&(s==="href"||s==="xlink:href")?i.startsWith("#")?i:"":o==="a"&&(s==="href"||s==="xlink:href")?ou(i,{tagName:"a",attrName:"href"})?"":i:o==="image"&&(s==="href"||s==="xlink:href"||s==="src")?ou(i,{tagName:"img",attrName:"src"})?"":i:s==="href"||s==="xlink:href"?i.startsWith("#")?i:"":ou(i,{tagName:o,attrName:s})?"":i:""}function pre(e,t){let n=t+4;for(;n{const o=n.trim();if(/^[0-9a-f]+$/i.test(o)){const s=Number.parseInt(o,16);try{return Number.isFinite(s)?String.fromCodePoint(s):""}catch{return""}}return String(n).trim()})}function XI(e){const t=YI(e),n=t.toLowerCase();let o=0;for(;on.test(t))||XI(t)}function hre(e){if(e.tagName.toLowerCase()!=="a"||e.getAttribute("target")?.trim().toLowerCase()!=="_blank")return;const t=new Set(String(e.getAttribute("rel")??"").split(/\s+/).map(n=>n.trim()).filter(Boolean).filter(n=>n.toLowerCase()!=="opener"));t.add("noopener"),t.add("noreferrer"),e.setAttribute("rel",Array.from(t).join(" "))}function ah(e){const t=Number.parseFloat(String(e??""));return Number.isFinite(t)?t:0}function JI(e,t){if(e.nodeType===Node.TEXT_NODE){const s=e.textContent??"";s&&t.push(s);return}if(e.nodeType!==Node.ELEMENT_NODE)return;const n=e,o=n.tagName.toLowerCase();if(!ore.has(o)){if(o==="br"){t.push(` -`);return}for(const s of Array.from(n.childNodes))JI(s,t)}}function mre(e){for(const t of Array.from(e.querySelectorAll("foreignObject"))){const n=[];JI(t,n);const o=n.join("").split(/\r?\n/).map(u=>u.trim()).filter(Boolean);if(!o.length){t.remove();continue}const s=ah(t.getAttribute("width")),i=ah(t.getAttribute("height")),r=ah(t.getAttribute("x")),l=ah(t.getAttribute("y")),a=e.ownerDocument.createElementNS(hw,"text");a.setAttribute("x",String(r+s/2)),a.setAttribute("y",String(l+i/2)),a.setAttribute("text-anchor","middle"),a.setAttribute("dominant-baseline","central");const c=t.querySelector(".nodeLabel");if(c?.getAttribute("class")&&a.setAttribute("class",c.getAttribute("class")),o.length===1)a.textContent=o[0];else{const u=-.6*(o.length-1);for(const[d,f]of o.entries()){const h=e.ownerDocument.createElementNS(hw,"tspan");h.setAttribute("x",String(r+s/2)),h.setAttribute("dy",d===0?`${u}em`:"1.2em"),h.textContent=f,a.appendChild(h)}}t.parentNode?.replaceChild(a,t)}}function gre(e){mre(e);const t=[e,...Array.from(e.querySelectorAll("*"))];for(const n of t){const o=n.tagName.toLowerCase();if(!sre.has(o)){n.remove();continue}if(o==="style"&&mw(n.textContent??"")){n.remove();continue}const s=Array.from(n.attributes);for(const i of s){const r=i.name.toLowerCase();if(/^on/i.test(r)){n.removeAttribute(i.name);continue}if(r==="style"&&i.value&&mw(i.value)){n.removeAttribute(i.name);continue}if(r==="srcdoc"){n.removeAttribute(i.name);continue}if(ire.has(r)&&i.value){const l=fre(o,r,i.value);if(!l){n.removeAttribute(i.name);continue}l!==i.value&&n.setAttribute(i.name,l);continue}if(rre.has(r)&&i.value&&XI(i.value)){n.removeAttribute(i.name);continue}if(i.value){const l=dre(i.value);l!==i.value&&n.setAttribute(i.name,l)}}hre(n)}}function sje(e){if(typeof DOMParser>"u"||!e)return null;try{const t=new DOMParser().parseFromString(e,"image/svg+xml").documentElement;if(!t||t.nodeName.toLowerCase()!=="svg")return null;const n=t;return gre(n),vre(n)?null:n}catch{return null}}function vre(e){const t=e.getAttribute("viewBox");if(t){const s=t.trim().split(/[\s,]+/);if(s.length===4){const i=Number.parseFloat(s[2]||""),r=Number.parseFloat(s[3]||"");if(!Number.isFinite(i)||!Number.isFinite(r)||i<=0||r<=0)return!0}}const n=[e,...Array.from(e.querySelectorAll("*"))];let o=!1;for(const s of n){ure(s)&&(o=!0);for(const i of Array.from(s.attributes))if(/\bNaN\b/i.test(i.value)||i.name==="style"&&/max-width:\s*0(?:px)?/i.test(i.value))return!0}return!o}const ch=[];function P9(e){return String(e??"").replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function yre(e){return(String(e||"text").trim().split(/\s+/)[0]||"text").replace(/[^\w+.#:-]/g,"-").replace(/-+/g,"-")||"text"}function kre(e){return e.replace(/[^\w:.+-]/g,"-").replace(/-+/g,"-")}function gw(e=`editor-${Date.now()}`,t={}){const n=loe(t),o=n;o.__markstreamRegisteredPluginCount=ch.length,o.__markstreamHasCustomParserExtensions=!!(t.plugin?.length||t.apply?.length||ch.length);const s={"common.copy":"Copy"};let i;if(typeof t.i18n=="function")i=t.i18n;else if(t.i18n&&typeof t.i18n=="object"){const m=t.i18n;i=g=>m[g]??s[g]??g}else i=m=>s[m]??m;if(Array.isArray(t.plugin))for(const m of t.plugin){const g=m;if(Array.isArray(g)){const[b,..._]=g;typeof b=="function"&&n.use(b,..._)}else typeof g=="function"&&n.use(g)}if(Array.isArray(t.apply))for(const m of t.apply)try{m(n)}catch(g){console.error("[getMarkdown] apply function threw an error",g)}if(ch.length)for(const m of ch)if(Array.isArray(m)){const[g,...b]=m;typeof g=="function"&&n.use(g,...b)}else typeof m=="function"&&n.use(m);n.use(_Y),n.use(AY),n.use(bY);const r=HY,l=r.default??r;n.use(l),n.use(kY),n.use(yY),n.core.ruler.after("block","mark_fence_closed",m=>{const g=m,b=g.src,_=!!g.env?.__markstreamFinal,v=b.split(/\r?\n/);for(const y of g.tokens){if(y.type!=="fence"||!y.map||!y.markup)continue;const w=y.map[0],x=y.map[1],A=y.markup,L=A[0],S=A.length,T=v[Math.max(0,x-1)]??"";let R=0;for(;Rw+1&&B>=S&&I===T.length,D=y;D.meta=D.meta??{},D.meta.unclosed=!$,D.meta.closed=!!$}});const a=(m,g)=>{const b=m,_=b.pos;if(b.src[_]!=="~")return!1;const v=b.src[_-1],y=b.src[_+1];if(/\d/.test(v)&&/\d/.test(y)){if(!g){const w=b.push("text","",0);w.content="~"}return b.pos+=1,!0}return!1};n.inline.ruler.before("sub","wave",a),n.renderer.rules.fence=(m,g)=>{const b=m[g],_=String(b.info??"").trim(),v=String(b.content??""),y=btoa(unescape(encodeURIComponent(v))),w=yre(_),x=P9(w),A=kre(`editor-${e}-${g}-${w}`),L=P9(i("common.copy"));return`
      -
      - ${P9(w.toUpperCase())} - -
      -
      -
      `};const c=/^\[(\d+)\]/,u=/^\[([^\]\n]+)\]/,d=m=>{if(!m.startsWith("["))return!1;const g=u.exec(m);if(!g)return m!=="["&&!/^\[\d+$/.test(m);const b=String(g[1]??"");return m.slice(g[0].length).startsWith("(")?!1:!/^\d+$/.test(b)},f=(m,g)=>{const b=m;if(b.src[b.pos]!=="[")return!1;const _=c.exec(b.src.slice(b.pos));if(!_)return!1;const v=b.src.slice(Math.max(0,b.pos-120),b.pos);if(/"[^"\n]{1,80}"\s*:\s*$/.test(v))return!1;const y=b.src.slice(b.pos+_[0].length);if(y.startsWith("](")||y.startsWith("(")||d(y))return!1;if(!g){const w=_[1],x=b.push("reference","span",0);x.content=w,x.markup=_[0],x.raw=_[0]}return b.pos+=_[0].length,!0};n.inline.ruler.before("escape","reference",f),n.renderer.rules.reference=(m,g)=>{const _=String(m[g].content??"");return`${_}`};const h=n.use.bind(n);return n.use=((...m)=>(o.__markstreamHasCustomParserExtensions=!0,h(...m))),n}function bre({nextContent:e,previousContent:t,typewriterEnabled:n}){return n?e===t?{settledContent:e,streamedDelta:"",appended:!1}:t&&e.startsWith(t)&&e.length>t.length?{settledContent:t,streamedDelta:e.slice(t.length),appended:!0}:{settledContent:e,streamedDelta:"",appended:!1}:{settledContent:e,streamedDelta:"",appended:!1}}function QI({nextContent:e,persistedContent:t,currentState:n,typewriterEnabled:o,streamRenderVersionChanged:s=!1}){const i=`${n.settledContent}${n.streamedDelta}`;return o?n.streamedDelta&&i===e?s?{settledContent:i,streamedDelta:"",appended:!1}:{settledContent:n.settledContent,streamedDelta:n.streamedDelta,appended:!1}:bre({nextContent:e,previousContent:t??i,typewriterEnabled:o}):{settledContent:e,streamedDelta:"",appended:!1}}const Cre={plain:"plaintext",text:"plaintext",txt:"plaintext",js:"javascript",mjs:"javascript",cjs:"javascript",ts:"typescript",mts:"typescript",cts:"typescript",golang:"go",py:"python",rb:"ruby",rs:"rust",kt:"kotlin",kts:"kotlin",md:"markdown",yml:"yaml",sh:"shellscript",bash:"shellscript",zsh:"shellscript",shell:"shellscript",shellscript:"shellscript",ps:"powershell",ps1:"powershell",pwsh:"powershell","c++":"cpp","c#":"csharp",cs:"csharp",objc:"objective-c",objectivec:"objective-c","objective-c":"objective-c",objectivecpp:"objective-cpp","objective-c++":"objective-cpp","objective-cpp":"objective-cpp"};function wre(e){const t=String(e??"").trim();if(!t)return"";const[n=""]=t.split(/\s+/);return n.split(":")[0]?.trim().toLowerCase()??""}function eL(e){const t=wre(e);return Cre[t]??t}function _re(e){if(!Array.isArray(e))return;const t=e.filter(o=>typeof o=="string").map(o=>eL(o)).filter(Boolean),n=Array.from(new Set(t)).sort();return n.length>0?n:void 0}function xre(e){if(!Array.isArray(e))return;const t=[],n=new Set;for(const o of e){if(typeof o!="string")continue;const s=o.trim();!s||n.has(s)||(n.add(s),t.push(s))}return t.length>0?t:void 0}function Sre(e){return xre(e)?.join("\0")??""}function Are(e,t){return`${Sre(e)}\0\0${_re(t)?.join("\0")??""}`}function td(e,t,n=1){const o=Number(e);return Number.isFinite(o)?Math.max(n,o):t}function vw(e,t){const n=Number(e);return Number.isFinite(n)?Math.max(0,n):t}var Mre=class{constructor(e={},t){this.source="",this.visible="",this.done=!1,this.paused=!1,this.listeners=new Set,this.rafId=0,this.startedAt=0,this.lastTick=0,this.charBudget=0,this.hasStarted=!1,this.destroyed=!1,this.getSnapshot=()=>({source:this.source,visible:this.visible,done:this.done,paused:this.paused,pendingChars:this.pendingChars,caughtUp:this.caughtUp,final:this.final}),this.subscribe=d=>this.destroyed?()=>{}:(this.listeners.add(d),()=>{this.listeners.delete(d)}),this.enqueue=d=>{if(this.destroyed||!d)return;this.done&&(this.done=!1);const f=this.source.length>0,h=this.pendingChars<=0;if(this.source+=d,h){const m=yw();this.startedAt=f&&this.hasStarted?m-this.normalizedStartDelayMs:m,this.lastTick=m,this.charBudget=0}this.hasStarted=!0,this.emit(),this.ensureLoop()},this.finish=(d={})=>{if(!this.destroyed){if(this.done=!0,d.flush??this.flushOnFinish){this.visible=this.source,this.charBudget=0,this.currentCps=this.minCharsPerSecond,this.cancelLoop(),this.emit();return}this.emit(),this.ensureLoop()}},this.flush=()=>{this.destroyed||(this.visible=this.source,this.charBudget=0,this.currentCps=this.minCharsPerSecond,this.cancelLoop(),this.emit())},this.reset=(d="")=>{this.destroyed||(this.cancelLoop(),this.source=d,this.visible=d,this.done=!1,this.paused=!1,this.hasStarted=!1,this.startedAt=0,this.lastTick=0,this.charBudget=0,this.currentCps=this.minCharsPerSecond,this.emit())},this.pause=()=>{this.destroyed||this.paused||(this.paused=!0,this.cancelLoop(),this.emit())},this.resume=()=>{if(this.destroyed||!this.paused)return;this.paused=!1;const d=yw();this.lastTick=d,this.startedAt||=d,this.emit(),this.ensureLoop()},this.destroy=()=>{this.destroyed||(this.destroyed=!0,this.cancelLoop(),this.listeners.clear())},this.dispose=()=>{this.destroy()},this.tick=d=>{if(this.rafId=0,this.destroyed||this.paused)return;if(this.pendingChars<=0){this.startedAt=0,this.lastTick=0,this.charBudget=0,this.currentCps=this.minCharsPerSecond;return}if(d-this.startedAtthis.normalizedCatchUpThreshold?this.normalizedCatchUpLatencyMs:this.normalizedTargetLatencyMs,b=Lre(m/Math.max(.001,g/1e3),this.minCharsPerSecond,this.maxCharsPerSecond);if(this.currentCps+=(b-this.currentCps)*.2,this.charBudget+=this.currentCps*(h/1e3),this.charBudget<1){this.ensureLoop();return}const _=Math.min(Math.floor(this.charBudget),this.maxCharsPerCommit),v=Ire(this.source.slice(this.visible.length),_,this.segmenter);v.text&&(this.visible+=v.text,this.charBudget=Math.max(0,this.charBudget-v.graphemeCount),this.emit()),this.ensureLoop()};const{minCharsPerSecond:n=40,maxCharsPerSecond:o=1e3,targetLatencyMs:s=900,catchUpLatencyMs:i=350,catchUpThreshold:r=600,maxCommitFps:l=30,startDelayMs:a=80,maxCharsPerCommit:c=80,flushOnFinish:u=!1}=e;this.minCharsPerSecond=td(n,40,1),this.maxCharsPerSecond=Math.max(this.minCharsPerSecond,td(o,1e3,1)),this.normalizedTargetLatencyMs=td(s,900,1),this.normalizedCatchUpLatencyMs=td(i,350,1),this.normalizedCatchUpThreshold=vw(r,600),this.normalizedStartDelayMs=vw(a,80),this.maxCommitFps=Math.trunc(td(l,30,1)),this.maxCharsPerCommit=Math.trunc(td(c,80,1)),this.flushOnFinish=u,this.segmenter=Ere(),t&&this.listeners.add(t),this.currentCps=this.minCharsPerSecond}get pendingChars(){return Math.max(0,this.source.length-this.visible.length)}get caughtUp(){return this.pendingChars===0}get final(){return this.done&&this.caughtUp}ensureLoop(){if(!(this.destroyed||this.rafId||this.paused||this.pendingChars<=0)){if(typeof requestAnimationFrame!="function"){this.flush();return}this.rafId=requestAnimationFrame(this.tick)}}cancelLoop(){this.rafId&&(typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(this.rafId),this.rafId=0)}emit(){if(!this.destroyed)for(const e of this.listeners)e()}};function Tre(e={},t){const n=new Mre(e,t);return{getSnapshot:n.getSnapshot,subscribe:n.subscribe,enqueue:n.enqueue,finish:n.finish,flush:n.flush,reset:n.reset,pause:n.pause,resume:n.resume,destroy:n.destroy,dispose:n.dispose}}function Ere(){if(typeof Intl>"u")return null;const e=Intl.Segmenter;return e?new e(void 0,{granularity:"grapheme"}):null}function Ire(e,t,n){if(!e||t<=0)return{text:"",graphemeCount:0};if(!n){const i=Array.from(e).slice(0,t);return{text:i.join(""),graphemeCount:i.length}}let o="",s=0;for(const i of n.segment(e)){if(s>=t)break;o+=i.segment,s++}return{text:o,graphemeCount:s}}function yw(){return typeof performance<"u"?performance.now():Date.now()}function Lre(e,t,n){return Math.min(n,Math.max(t,e))}var $re=(e,t,n)=>new Promise((o,s)=>{var i=a=>{try{l(n.next(a))}catch(c){s(c)}},r=a=>{try{l(n.throw(a))}catch(c){s(c)}},l=a=>a.done?o(a.value):Promise.resolve(a.value).then(i,r);l((n=n.apply(e,t)).next())});const M3=Symbol.for("markstream-vue:node-lifecycle");function ije(){}const Y8=new Map;let tL="material";const Cd=new Map,kw=new Map;let T3=null;function Nre(e){Y8.set(e.id,e)}function Ore(e){const t=Y8.get(tL);if(!t)return;const n=t.core[e];if(n)return n;const o=Cd.get(t.id);if(o){const s=o[e];if(s)return s}t.loadExtended&&!Cd.has(t.id)&&Rre(t)}function Fre(){var e,t;return(t=(e=Y8.get(tL))==null?void 0:e.fallback)!=null?t:""}function Rre(e){return $re(this,null,function*(){var t,n,o;if(Cd.has(e.id))return(t=Cd.get(e.id))!=null?t:null;let s=kw.get(e.id);return s||(s=((o=(n=e.loadExtended)==null?void 0:n.call(e))!=null?o:Promise.resolve(null)).then(i=>(Cd.set(e.id,i),T3?.(),i)).catch(()=>(Cd.set(e.id,null),null)),kw.set(e.id,s)),s})}const bw='',Cw='',Pre={id:"material",core:{"":Cw,plain:'',text:Cw,javascript:'',typescript:'',jsx:'',tsx:'',html:'',css:'',scss:'',json:'',python:'',ruby:'',go:'',java:'',kotlin:'',c:'',cpp:'',cs:bw,csharp:bw,php:'',shell:'',powershell:'',sql:'',yaml:'',markdown:'',xml:'',rust:'',vue:'',mermaid:''},fallback:'',loadExtended:()=>Po(()=>import("./extended-p72mFE2C.js"),[]).then(e=>e.materialExtendedMap)},Dre=Kr(0);T3=()=>{Dre.value++},Nre(Pre);const Bre={"":"",javascript:"javascript",js:"javascript",mjs:"javascript",cjs:"javascript",typescript:"typescript",ts:"typescript",jsx:"jsx",tsx:"tsx",golang:"go",py:"python",rb:"ruby",sh:"shell",bash:"shell",zsh:"shell",shellscript:"shell",bat:"shell",batch:"shell",ps1:"powershell",plaintext:"plain",text:"plain",txt:"plain","c++":"cpp","c#":"csharp",cs:"csharp","objective-c":"objectivec","objective-c++":"objectivecpp",yml:"yaml",md:"markdown",rs:"rust",kt:"kotlin"};function v2(e){var t;const n=(function(o){if(!o)return"";const s=o.trim();if(!s)return"";const[i]=s.split(/\s+/),[r]=i.split(":");return r.toLowerCase()})(e);return(t=Bre[n])!=null?t:n}function rje(e){const t=v2(e);if(!t)return"plaintext";switch(t){case"plain":return"plaintext";case"jsx":return"javascript";case"tsx":return"typescript";case"objectivec":return"objective-c";case"objectivecpp":return"objective-cpp";default:return t}}function lje(e){return Ore(v2(e))||Fre()}const ww={js:"JavaScript",javascript:"JavaScript",ts:"TypeScript",jsx:"JSX",tsx:"TSX",html:"HTML",css:"CSS",scss:"SCSS",json:"JSON",py:"Python",python:"Python",rb:"Ruby",go:"Go",java:"Java",c:"C",cpp:"C++",cs:"C#",csharp:"C#",php:"PHP",sh:"Shell",bash:"Bash",sql:"SQL",yaml:"YAML",md:"Markdown",d2:"D2",d2lang:"D2","":"Plain Text",plain:"Plain Text"};var y2=(e,t,n)=>new Promise((o,s)=>{var i=a=>{try{l(n.next(a))}catch(c){s(c)}},r=a=>{try{l(n.throw(a))}catch(c){s(c)}},l=a=>a.done?o(a.value):Promise.resolve(a.value).then(i,r);l((n=n.apply(e,t)).next())});let ii=null,Yc=!1,Xc=null,k2=J8;function zp(e){var t;const n=(t=e?.default)!=null?t:e;return n&&typeof n.renderToString=="function"?n:null}function X8(){try{const e=globalThis;return zp(e?.katex)}catch{return null}}function J8(){return y2(null,null,function*(){const e=X8();if(e)return e;const t=yield Po(()=>import("./katex-DnlPpQZa.js"),[]);try{yield Po(()=>import("./mhchem-DtR62fUK.js"),__vite__mapDeps([0,1]))}catch{}return zp(t)})}function nL(e){const t=Promise.resolve(e).then(n=>{var o;return Xc===t&&n?(ii=(o=zp(n))!=null?o:n,ii):null}).catch(()=>null).finally(()=>{Xc===t&&(Xc=null)});return Xc=t,Yc=!0,t}function Hre(e){k2=e,ii=null,Yc=!1,Xc=null}function zre(e){Hre(J8)}function oL(){return typeof k2=="function"}function aje(){var e;const t=k2;if(!t||t===J8)return null;if(ii)return ii;const n=X8();if(n)return ii=n,ii;if(Yc)return null;try{const o=t();return o?typeof o?.then=="function"?(nL(o),null):(ii=(e=zp(o))!=null?e:o,ii):null}catch{return null}}function sL(){return y2(this,null,function*(){var e;const t=X8();if(t)return ii=t,ii;if(ii)return ii;if(Xc)return Xc;if(Yc)return null;const n=k2;if(!n)return Yc=!0,null;try{const o=n();if(typeof o?.then=="function")return nL(o);if(o)return ii=(e=zp(o))!=null?e:o,Yc=!0,ii}catch{}return Yc=!0,null})}function iL(e){return e?e.replace(/·/g,"⋅").replace(/℃/g,"°C"):""}let Fa=null,Ta=null;const Ns=new Map,Kl=new Map;let wp=5;const iu=new Set;function z1(){if(Ns.size{const{id:n,html:o,error:s}=t.data,i=Ns.get(n);if(i)if(Ns.delete(n),clearTimeout(i.timeoutId),i.cleanup(),z1(),s)i.aborted||i.reject(new Error(s));else{const{content:r,displayMode:l}=t.data;if(r){const a=`${l?"d":"i"}:${r}`;if(Kl.set(a,o),Kl.size>200){const c=Kl.keys().next().value;Kl.delete(c)}}i.aborted||i.resolve(o)}},Fa.onerror=t=>{console.error("[katexWorkerClient] Worker error:",t);for(const[n,o]of Ns.entries())clearTimeout(o.timeoutId),o.cleanup(),o.aborted||o.reject(new Error(`Worker error: ${t.message}`));Ns.clear(),rL()}}function Ure(){var e;for(const t of Ns.values())clearTimeout(t.timeoutId),t.cleanup(),t.aborted||t.reject(new Error("Worker cleared"));Ns.clear(),rL(),Fa&&((e=Fa.terminate)==null||e.call(Fa)),Fa=null,Ta=null}function jre(e,t=!0,n=2e3,o){return y2(this,null,function*(){performance.now();const s=iL(e);if(!oL()){const a=new Error("KaTeX rendering disabled");return a.name="KaTeXDisabled",a.code="KATEX_DISABLED",Promise.reject(a)}if(Ta)return Promise.reject(Ta);const i=`${t?"d":"i"}:${s}`,r=Kl.get(i);if(r)return z1(),Promise.resolve(r);const l=Fa||(Ta=new Error("[katexWorkerClient] No worker instance set. Please inject a Worker via setKaTeXWorker()."),Ta.name="WorkerInitError",Ta.code="WORKER_INIT_ERROR",null);if(!l)return Promise.reject(Ta);if(Ns.size>=wp){const a=new Error("Worker busy");return a.name="WorkerBusy",a.code="WORKER_BUSY",a.busy=!0,a.inFlight=Ns.size,a.max=wp,Promise.reject(a)}return new Promise((a,c)=>{if(o?.aborted){const g=new Error("Aborted");return g.name="AbortError",void c(g)}const u=Math.random().toString(36).slice(2);let d=null;const f=globalThis.setTimeout(()=>{const g=Ns.get(u);if(!g)return;Ns.delete(u),g.cleanup();const b=new Error("Worker render timed out");b.name="WorkerTimeout",b.code="WORKER_TIMEOUT",g.aborted||g.reject(b),z1()},n);d=()=>{const g=Ns.get(u);if(!g||g.aborted)return;g.aborted=!0,g.cleanup();const b=new Error("Aborted");b.name="AbortError",c(b)},o&&o.addEventListener("abort",d,{once:!0});const h=a,m=c;Ns.set(u,{resolve:g=>{h(g)},reject:g=>{m(g)},timeoutId:f,aborted:!1,cleanup:()=>{o&&d&&o.removeEventListener("abort",d),d=null}});try{l.postMessage({id:u,content:s,displayMode:t})}catch(g){const b=Ns.get(u);Ns.delete(u),clearTimeout(f),b?.cleanup(),b?.reject(g),z1()}})})}function cje(e,t=!0,n){const o=`${t?"d":"i"}:${iL(e)}`;if(Kl.set(o,n),Kl.size>200){const s=Kl.keys().next().value;Kl.delete(s)}}const Vre="WORKER_BUSY";function qre(e=2e3,t){return Ns.size{let s,i=!1,r=null,l=()=>{};const a=()=>{s&&globalThis.clearTimeout(s),iu.delete(l),t&&r&&t.removeEventListener("abort",r),r=null};l=()=>{i||(i=!0,a(),n())},iu.add(l),s=globalThis.setTimeout(()=>{if(i)return;i=!0,a();const c=new Error("Wait for worker slot timed out");c.name="WorkerBusyTimeout",c.code="WORKER_BUSY_TIMEOUT",o(c)},e),queueMicrotask(()=>z1()),t&&(r=()=>{if(i)return;i=!0,a();const c=new Error("Aborted");c.name="AbortError",o(c)},t.aborted?r():t.addEventListener("abort",r,{once:!0}))})}const Xf={timeout:2e3,waitTimeout:1500,backoffMs:30,maxRetries:1};function uje(e){return y2(this,arguments,function*(t,n=!0,o={}){var s,i,r,l;if(!oL()){const g=new Error("KaTeX rendering disabled");throw g.name="KaTeXDisabled",g.code="KATEX_DISABLED",g}const a=(s=o.timeout)!=null?s:Xf.timeout,c=(i=o.waitTimeout)!=null?i:Xf.waitTimeout,u=(r=o.backoffMs)!=null?r:Xf.backoffMs,d=(l=o.maxRetries)!=null?l:Xf.maxRetries,f=Number.isFinite(d)?Math.max(0,Math.min(Math.floor(d),8)):Xf.maxRetries,h=o.signal;let m=0;for(;;){if(h?.aborted){const g=new Error("Aborted");throw g.name="AbortError",g}try{return yield jre(t,n,a,h)}catch(g){if(g?.code!==Vre||m>=f)throw g;if(m++,yield qre(c,h).catch(()=>{}),h?.aborted){const b=new Error("Aborted");throw b.name="AbortError",b}u>0&&(yield new Promise(b=>globalThis.setTimeout(b,u*m)))}}})}function wd(e){const t=typeof e=="number"?e:Number.parseFloat(String(e??""));return Number.isFinite(t)&&t>0?t:null}function Kre(e){var t;for(const n of e.split(/\r?\n/)){const o=n.trim();if(!o||o.startsWith("%%"))continue;const s=o.match(/^([A-Z][\w-]*)\b/i);return((t=s?.[1])==null?void 0:t.toLowerCase())||""}return""}function Zm(e){const t=e.split(/\r?\n/).map(s=>s.trim()).filter(s=>s&&!s.startsWith("%%")),n=Math.max(1,t.length),o=Kre(e);return o==="gantt"?220+28*n:o==="sequencediagram"?180+26*n:o==="classdiagram"||o==="statediagram"||o==="erdiagram"?180+24*n:o==="flowchart"||o==="graph"?170+28*n:200+22*n}function Gm(e){const t=e.split(/\r?\n/).filter(n=>/^\s*-\s+/.test(n)).length;return t>=3?500:t>0?280+60*t:360}function lL(e,t=360,n=500){return n==null?Math.max(t,e):Math.min(Math.max(t,e),n)}function Ym(e,t=360,n=500){return lL(e,t,n)}function Xm(e,t=360,n=500){return lL(e,t,n)}var Zre=Object.defineProperty,Gre=Object.defineProperties,Yre=Object.getOwnPropertyDescriptors,_w=Object.getOwnPropertySymbols,Xre=Object.prototype.hasOwnProperty,Jre=Object.prototype.propertyIsEnumerable,xw=(e,t,n)=>t in e?Zre(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,aL=(e,t)=>{for(var n in t||(t={}))Xre.call(t,n)&&xw(e,n,t[n]);if(_w)for(var n of _w(t))Jre.call(t,n)&&xw(e,n,t[n]);return e},Sw=(e,t,n)=>new Promise((o,s)=>{var i=a=>{try{l(n.next(a))}catch(c){s(c)}},r=a=>{try{l(n.throw(a))}catch(c){s(c)}},l=a=>a.done?o(a.value):Promise.resolve(a.value).then(i,r);l((n=n.apply(e,t)).next())});const Jm=()=>Po(()=>import("./mermaid.core-BMAf1qng.js").then(e=>e.bp),__vite__mapDeps([2,3]));let Rl=null,_d=Jm,g1=null,E3=!1,I3=!1,v1=0;function Qre(e){_d=e,v1++,Rl=null,g1=null,E3=!1,I3=!1}function ele(e){Qre(Jm)}function Aw(){return typeof _d=="function"}function Mw(e){if(!e)return e;const t=e&&e.default?e.default:e;if(t&&(typeof t.render=="function"||typeof t.parse=="function"||typeof t.initialize=="function"))return t;if(t&&t.mermaidAPI&&(typeof t.mermaidAPI.render=="function"||typeof t.mermaidAPI.parse=="function")){const s=t.mermaidAPI;return n=aL({},t),o={render:s.render.bind(s),parse:s.parse?s.parse.bind(s):void 0,initialize:i=>typeof t.initialize=="function"?t.initialize(i):s.initialize?s.initialize(i):void 0},Gre(n,Yre(o))}var n,o;return e.mermaid&&typeof e.mermaid.render=="function"?e.mermaid:t}function Tw(e){if(e)try{const t=e?.initialize;e.initialize=n=>{const o=aL({suppressErrorRendering:!0},n||{});return typeof t=="function"?t.call(e,o):e?.mermaidAPI&&typeof e.mermaidAPI.initialize=="function"?e.mermaidAPI.initialize(o):void 0}}catch{}}function dje(){return Sw(this,null,function*(){if(Rl)return Rl;const e=(function(){try{const o=globalThis;return Mw(o?.mermaid)}catch{return null}})();if(e)return Rl=e,Tw(Rl),Rl;const t=_d,n=v1;return t?t===Jm&&E3?null:g1||(g1=Sw(null,null,function*(){let o;try{o=yield t()}catch(s){if(t===Jm)return n===v1&&t===_d&&(E3=!0,(function(i){I3||(I3=!0,console.warn('[markstream-vue] Optional dependency "mermaid" is not installed. Mermaid blocks will render as source.',i))})(s)),null;throw s}finally{n===v1&&t===_d&&(g1=null)}return n!==v1||t!==_d?null:o?(Rl=Mw(o),Tw(Rl),Rl):null}),g1):null})}let xi=null,Ea=null;const Or=new Map,Bc=new Map;function zh(e){for(const t of Or.values())t.reject(e);Or.clear(),Bc.clear()}let Ew=5,Iw=!1;const tle="WORKER_BUSY",Lw="MERMAID_DISABLED";function nle(e){if(xi&&xi!==e){const n=new Error("Worker replaced");n.code="WORKER_REPLACED",zh(n)}xi=e,Ea=null;const t=e;xi.onmessage=n=>{if(xi!==t)return;const{id:o,ok:s,result:i,error:r}=n.data,l=Or.get(o);l&&(s===!1||r?l.reject(new Error(r||"Unknown error")):l.resolve(i))},xi.onerror=n=>{var o,s;if(xi===t)if(Or.size!==0){try{Iw?console.error("[mermaidWorkerClient] Worker error:",n?.message||n):(s=console.debug)==null||s.call(console,"[mermaidWorkerClient] Worker error:",n?.message||n)}catch{}zh(new Error(`Worker error: ${n.message}`))}else(o=console.debug)==null||o.call(console,"[mermaidWorkerClient] Worker error (no pending):",n?.message||n)},xi.onmessageerror=n=>{var o,s;if(xi===t)if(Or.size!==0){try{Iw?console.error("[mermaidWorkerClient] Worker messageerror:",n):(s=console.debug)==null||s.call(console,"[mermaidWorkerClient] Worker messageerror:",n)}catch{}zh(new Error("Worker messageerror"))}else(o=console.debug)==null||o.call(console,"[mermaidWorkerClient] Worker messageerror (no pending):",n)}}function ole(){var e;if(xi)try{zh(new Error("Worker cleared")),(e=xi.terminate)==null||e.call(xi)}catch{}xi=null,Ea=null}function cL(e,t,n,o){if(!Aw()){const r=new Error("Mermaid rendering disabled");return r.name="MermaidDisabled",r.code=Lw,Promise.reject(r)}const s=`${e}\0${t.theme}\0${n}\0${t.code}`;let i=Bc.get(s);return i||(i=(function(r,l,a=1400){if(!Aw()){const u=new Error("Mermaid rendering disabled");return u.name="MermaidDisabled",u.code=Lw,Promise.reject(u)}if(Ea)return Promise.reject(Ea);const c=xi||(Ea=new Error("[mermaidWorkerClient] No worker instance set. Please inject a Worker via setMermaidWorker()."),Ea.name="WorkerInitError",Ea.code="WORKER_INIT_ERROR",null);if(!c)return Promise.reject(Ea);if(Or.size>=Ew){const u=new Error("Worker busy");return u.name="WorkerBusy",u.code=tle,u.inFlight=Or.size,u.max=Ew,Promise.reject(u)}return new Promise((u,d)=>{const f=Math.random().toString(36).slice(2);let h,m=!1;const g=()=>{m||(m=!0,h!=null&&globalThis.clearTimeout(h),Or.delete(f))},b={resolve:_=>{g(),u(_)},reject:_=>{g(),d(_)}};Or.set(f,b);try{c.postMessage({id:f,action:r,payload:l})}catch(_){return Or.delete(f),void d(_)}h=globalThis.setTimeout(()=>{const _=new Error("Worker call timed out");_.name="WorkerTimeout",_.code="WORKER_TIMEOUT";const v=Or.get(f);v&&v.reject(_)},a)})})(e,t,n),Bc.set(s,i),i.then(()=>{Bc.get(s)===i&&Bc.delete(s)},()=>{Bc.get(s)===i&&Bc.delete(s)})),(function(r,l){if(!l)return r;if(l.aborted){const a=new Error("Aborted");return a.name="AbortError",Promise.reject(a)}return new Promise((a,c)=>{let u=()=>{};const d=()=>l.removeEventListener("abort",u);u=()=>{d();const f=new Error("Aborted");f.name="AbortError",c(f)},l.addEventListener("abort",u,{once:!0}),r.then(f=>{d(),a(f)},f=>{d(),c(f)})})})(i,o)}function fje(e,t,n=1400,o){return cL("canParse",{code:e,theme:t},n,o)}function pje(e,t,n=1400,o){return cL("findPrefix",{code:e,theme:t},n,o)}var sle=Object.defineProperty,ile=Object.defineProperties,rle=Object.getOwnPropertyDescriptors,$w=Object.getOwnPropertySymbols,lle=Object.prototype.hasOwnProperty,ale=Object.prototype.propertyIsEnumerable,Nw=(e,t,n)=>t in e?sle(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,yt=(e,t)=>{for(var n in t||(t={}))lle.call(t,n)&&Nw(e,n,t[n]);if($w)for(var n of $w(t))ale.call(t,n)&&Nw(e,n,t[n]);return e},tn=(e,t)=>ile(e,rle(t)),co=(e,t,n)=>new Promise((o,s)=>{var i=a=>{try{l(n.next(a))}catch(c){s(c)}},r=a=>{try{l(n.throw(a))}catch(c){s(c)}},l=a=>a.done?o(a.value):Promise.resolve(a.value).then(i,r);l((n=n.apply(e,t)).next())});const cle="__global__",D9="__MARKSTREAM_VUE_CUSTOM_COMPONENTS_STORE__",L3=(()=>{const e=globalThis;if(e[D9])return e[D9];const t={scopedCustomComponents:{},revision:Kr(0)};return e[D9]=t,t})(),Ow=L3.revision,ule=Symbol("markstreamCustomComponents"),dle=new Set(["text","paragraph","heading","code_block","list","list_item","blockquote","table","table_row","table_cell","definition_list","definition_item","footnote","footnote_reference","footnote_anchor","admonition","hardbreak","link","image","thematic_break","math_inline","math_block","strong","emphasis","strikethrough","highlight","insert","subscript","superscript","emoji","checkbox","checkbox_input","inline_code","html_inline","html_block","reference","mermaid","infographic","d2","vmr_container"]);function Wp(e){return dle.has(String(e).trim().toLowerCase())}function fle(e){return e.trim().replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/[_\s]+/g,"-").toLowerCase()}function B9(e={}){const t={};for(const[n,o]of Object.entries(e))if(o!=null){t[n]=o;for(const s of new Set([wr(n),wr(fle(n))]))!s||Wp(s)||Object.prototype.hasOwnProperty.call(t,s)||(t[s]=o)}return t}function ls(e){const t=dn(ule,null);return F(()=>{var n;return Ow.value,(function(o,s={}){return Ow.value,yt(yt(yt({},B9(L3.scopedCustomComponents[cle]||{})),B9(s)),B9((function(i){return i&&L3.scopedCustomComponents[i]||{}})(o)))})(e?.(),(n=t?.value)!=null?n:{})})}const ple=["aria-label"],hle={key:0,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",class:"checkbox-icon checkbox-unchecked"},mle={key:1,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",class:"checkbox-icon checkbox-checked"},Vn=(e,t)=>{const n=e.__vccOpts||e;for(const[o,s]of t)n[o]=s;return n},qi=Vn(et({__name:"CheckboxNode",props:{node:{}},setup:e=>(t,n)=>(k(),M("span",{class:"checkbox-node",role:"img","aria-label":e.node.checked?"checked":"unchecked"},[e.node.checked?(k(),M("svg",mle,[...n[1]||(n[1]=[C("rect",{x:"3",y:"3",width:"18",height:"18",rx:"4",fill:"currentColor"},null,-1),C("path",{d:"M9 12l2 2 4-4",stroke:"hsl(var(--ms-background))","stroke-width":"2.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])):(k(),M("svg",hle,[...n[0]||(n[0]=[C("rect",{x:"3",y:"3",width:"18",height:"18",rx:"4",stroke:"currentColor","stroke-width":"2"},null,-1)])]))],8,ple))}),[["__scopeId","data-v-be21ab83"]]);qi.install=e=>{e.component(qi.__name,qi)};const gle={class:"emoji-node"},Ei=Vn(et({__name:"EmojiNode",props:{node:{}},setup:e=>(t,n)=>(k(),M("span",gle,N(e.node.name),1))}),[["__scopeId","data-v-de55dc97"]]);Ei.install=e=>{e.component(Ei.__name,Ei)};const vle=["id"],yle=["title"],Ki=Vn(et({__name:"FootnoteReferenceNode",props:{node:{}},setup(e){const t=`#fnref--${e.node.id}`;function n(){if(typeof document>"u")return;const o=document.querySelector(t);o?o.scrollIntoView({behavior:"smooth"}):console.warn(`Element with href: ${t} not found`)}return(o,s)=>(k(),M("sup",{id:`fnref-${e.node.id}`,class:"footnote-reference",onClick:n},[C("span",{href:t,title:`查看脚注 ${e.node.id}`,class:"footnote-link cursor-pointer"},"["+N(e.node.id)+"]",9,yle)],8,vle))}}),[["__scopeId","data-v-c1463a29"]]);Ki.install=e=>{e.component(Ki.__name,Ki)};const uL=(()=>{try{return!1}catch{}return!1})();function H9(e){uL&&console.warn(e)}function Fw(e,t="safe",n){return G8(e,t,n)}function dL(e){return Jie(e)}function z9(e){return e===!0?"":e===!1?"false":e==null?null:String(e)}function Q8(e,t="safe"){const n=String(e.tag||e.type||"").trim(),o=Hh((s=e.attrs)?Array.isArray(s)?s.every(Array.isArray)?s.map(([r,l])=>[String(r),z9(l)]):s.filter(r=>r&&typeof r=="object"&&!Array.isArray(r)&&"name"in r).map(r=>[String(r.name),z9(r.value)]):Object.entries(s).map(([r,l])=>[r,z9(l)]):null,t,n);var s;if(!o)return;const i=dL(H1(o));return Object.keys(i).length>0?i:void 0}function Rw(e,t,n=!1){const o=Object.entries(t??{}),s=o.length>0?o.map(([i,r])=>r===""?` ${i}`:` ${i}="${r}"`).join(""):"";return n?`<${e}${s} />`:`<${e}${s}>`}function Jf(e,t){Array.isArray(t)?e.push(...t):t!=null&&e.push(t)}function W9(e,t,n,o,s,i,r=!1){const l=(function(d,f){return ZI(d,f)})(e,o);if(Pp.has(e.toLowerCase())||!l&&jI(e,i))return null;if(!l&&Z8(e,i))return r?[Rw(e,t,!0)]:[Rw(e,t),...n,``];const a=G8(t,i,e),c=a.key,u=c!=null&&c!==""?c:s;if(l){const d=o[e]||o[e.toLowerCase()],f=dL(a);return Qt(d,tn(yt({},f),{key:u}),n.length>0?n:void 0)}return Qt(e,tn(yt({},a),{innerHTML:void 0,key:u}),n.length>0?n:void 0)}function fL(e,t){return tre(e,t)}function Qm(e,t,n="safe"){if(!e)return[];try{return(function(i,r,l="safe"){let a=0;const c=[],u=[];for(const d of i)if(d.type==="text")(c.length>0?c[c.length-1].children:u).push(d.content);else if(d.type==="self_closing"){const f=W9(d.tagName,d.attrs||{},[],r,"ms-html-"+a++,l,!0);Jf(c.length>0?c[c.length-1].children:u,f)}else if(d.type==="tag_open")c.push({tagName:d.tagName,children:[],attrs:d.attrs,autoKey:"ms-html-"+a++});else if(d.type==="tag_close"){const f=d.tagName.toLowerCase();let h=-1;for(let m=c.length-1;m>=0;m--)if(c[m].tagName.toLowerCase()===f){h=m;break}if(h!==-1)for(;c.length>h;){const m=c.pop(),g=W9(m.tagName,m.attrs||{},m.children,r,m.autoKey,l);c.length>0?Jf(c[c.length-1].children,g):Jf(u,g),m.tagName.toLowerCase()!==f&&c.length>h&&H9(`Auto-closing unclosed tag: <${m.tagName}>`)}else H9(`Ignoring closing tag with no matching opening tag: `)}for(;c.length>0;){const d=c.pop(),f=W9(d.tagName,d.attrs||{},d.children,r,d.autoKey,l);c.length>0?Jf(c[c.length-1].children,f):Jf(u,f),H9(`Auto-closing unclosed tag: <${d.tagName}>`)}return u})(GI(e),t,n)}catch(s){return o=s,uL&&console.error("Failed to parse HTML to VNodes:",o),null}var o}const kle=["innerHTML"],Zi=Vn(et({__name:"HtmlInlineNode",props:{node:{},customId:{},htmlPolicy:{}},setup(e){const t=e,n=dn("markstreamHtmlPolicy",void 0),o=F(()=>{var l,a;return(a=(l=t.htmlPolicy)!=null?l:n?.value)!=null?a:"safe"}),s=ls(()=>t.customId),i=et({name:"DynamicRenderer",props:{nodes:{type:Array,required:!0}},render(){return this.nodes}}),r=F(()=>{const l=t.node.content;if(!l)return{mode:"html",content:""};if(o.value==="escape")return{mode:"html",content:Bd(l,o.value)};if(t.node.loading&&!t.node.autoClosed)return{mode:"text",content:l};if(t.node.loading&&t.node.autoClosed){const c=Qm(l,s.value,o.value);if(c!==null)return{mode:"dynamic",nodes:c}}if(!fL(l,s.value))return{mode:"html",content:Bd(l,o.value)};const a=Qm(l,s.value,o.value);return a===null?{mode:"html",content:Bd(l,o.value)}:{mode:"dynamic",nodes:a}});return(l,a)=>r.value.mode==="dynamic"?(k(),M("span",{key:0,class:Fe(["html-inline-node",{"html-inline-node--loading":t.node.loading}])},[q(p(i),{nodes:r.value.nodes},null,8,["nodes"])],2)):r.value.mode==="text"?(k(),M("span",{key:1,class:Fe(["html-inline-node",{"html-inline-node--loading":t.node.loading}])},N(r.value.content),3)):(k(),M("span",{key:2,class:Fe(["html-inline-node",{"html-inline-node--loading":t.node.loading}]),innerHTML:r.value.content},null,10,kle))}}),[["__scopeId","data-v-d17f12b0"]]);Zi.install=e=>{e.component(Zi.__name,Zi)};const ble={class:"inline-code"},Cle={key:0},Gs=Vn(et({__name:"InlineCodeNode",props:{node:{}},setup(e){const t=e,n=cf(),o=dn("markstreamFade",void 0),s=dn("markstreamTextStreamState",void 0),i=dn("markstreamStreamVersion",void 0),r=F(()=>{const v=n.fade;return v===""||v===!0||v==="true"||v!==!1&&v!=="false"&&void 0}),l=F(()=>typeof r.value=="boolean"?r.value:typeof o?.value!="boolean"||o.value),a=F(()=>{var v;return String((v=t.node.code)!=null?v:"")}),c=F(()=>!l.value),u=F(()=>{var v;const y=(v=n["index-key"])!=null?v:n.indexKey;return y==null||y===""?"":String(y)}),d=K(t.node.code),f=K(""),h=K(0);let m;function g(){m?.(),m=void 0}function b(){g(),f.value&&(d.value=d.value+f.value,f.value="")}Je([()=>t.node.code,u,l],([v])=>{const y=String(v??""),w=u.value,x=QI({nextContent:y,persistedContent:w?s?.get(w):void 0,currentState:{settledContent:d.value,streamedDelta:f.value},typewriterEnabled:l.value});d.value=x.settledContent,f.value=x.streamedDelta,x.appended?(h.value+=1,(function(){if(!f.value||m||!i)return;const A=i.value;m=Je(()=>i.value,L=>{L!==A&&b()},{flush:"sync"})})()):f.value||g(),w&&s?.set(w,y)},{immediate:!0}),lf(g);const _=F(()=>h.value%2==0?"inline-code-stream-delta--a":"inline-code-stream-delta--b");return(v,y)=>(k(),M("code",ble,[c.value?(k(),M(De,{key:0},[Ve(N(a.value),1)],64)):(k(),M(De,{key:1},[d.value?(k(),M("span",Cle,N(d.value),1)):te("",!0),f.value?(k(),M("span",{key:1,class:Fe(["inline-code-stream-delta",[_.value]]),onAnimationend:b},N(f.value),35)):te("",!0)],64))]))}}),[["__scopeId","data-v-4e331c97"]]);Gs.install=e=>{e.component(Gs.__name,Gs)};const $3=K(!1),Pw=K(""),Dw=K("top"),W1=K(null),U1=K(null),N3=K(null),O3=K(null),Bw=K(null);let Wh=null,Uh=null,F3=0;function pL(){Wh&&(clearTimeout(Wh),Wh=null),Uh&&(clearTimeout(Uh),Uh=null)}let uh=!1,dh=null,Hw=!1;function wle(e,t,n="top",o=!1,s,i){if(!e)return;const r=++F3;pL();const l=()=>co(null,null,function*(){var a,c;if(yield(function(){return co(this,null,function*(){if(!uh&&!Hw&&typeof document<"u"){dh!=null||(dh=co(null,null,function*(){const[{createApp:u,h:d},{default:f}]=yield Promise.all([Po(()=>import("./vue.runtime.esm-bundler-0N7BeFaa.js"),[]),Po(()=>import("./Tooltip-DP9j1yrm.js"),[])]),h=document.createElement("div");h.setAttribute("data-singleton-tooltip","1"),document.body.appendChild(h),u({setup:()=>()=>{var m;return d(f,{visible:$3.value,"anchor-el":W1.value,content:Pw.value,placement:Dw.value,id:U1.value,originX:N3.value,originY:O3.value,isDark:(m=Bw.value)!=null?m:void 0})}}).mount(h),uh=!0}));try{yield dh}catch(u){uh=!1,dh=null,Hw=!0,console.warn("[markstream-vue] Failed to mount Tooltip component. Tooltips will be disabled.",u)}}})})(),uh&&r===F3){U1.value=`tooltip-${Date.now()}-${Math.floor(1e3*Math.random())}`,W1.value=e,Pw.value=t,Dw.value=n,N3.value=(a=s?.x)!=null?a:null,O3.value=(c=s?.y)!=null?c:null,Bw.value=typeof i=="boolean"?i:null,$3.value=!0;try{e.setAttribute("aria-describedby",U1.value)}catch{}}});o?l():Wh=setTimeout(l,80)}function _le(e=!1){F3+=1,pL();const t=()=>{if(W1.value&&U1.value)try{W1.value.removeAttribute("aria-describedby")}catch{}$3.value=!1,W1.value=null,U1.value=null,N3.value=null,O3.value=null};e?t():Uh=setTimeout(t,120)}const xle={"common.copy":"Copy","common.copied":"Copied","common.decrease":"Decrease","common.reset":"Reset","common.increase":"Increase","common.expand":"Expand","common.collapse":"Collapse","common.preview":"Preview","common.source":"Source","common.export":"Export","common.open":"Open","common.minimize":"Minimize","common.zoomIn":"Zoom in","common.zoomOut":"Zoom out","common.resetZoom":"Reset zoom","image.loadError":"Image failed to load","image.loading":"Loading image..."},Sle=Symbol("markstreamI18nFallback");function hL(e,t){var n;return(n=t?.[e])!=null?n:xle[e]}const R3=(e,t)=>{var n;return(n=hL(e,t))!=null?n:(function(o){return(o.split(".").pop()||o).replace(/[_-]/g," ").replace(/([A-Z])/g," $1").replace(/\s+/g," ").replace(/\b\w/g,s=>s.toUpperCase()).trim()})(e)};function zw(e,t){return{t(n){const o=hL(n,t);if(e.te&&o!=null&&!e.te(n))return R3(n,t);const s=e.t(n);return s===n&&o!=null?R3(n,t):s}}}function Ale(){const e=(function(){var n,o,s;try{const i=rs(),r=Sle,l=i?.provides,a=(n=i?.appContext)==null?void 0:n.provides;return(s=(o=l?.[r])!=null?o:a?.[r])!=null?s:null}catch{}return null})(),t=(function(){var n,o;try{const s=rs(),i=s?.proxy,r=i?.$t;if(typeof r=="function"){const c=i?.$te;return{t:r.bind(i),te:typeof c=="function"?c.bind(i):void 0}}const l=(o=(n=s?.appContext)==null?void 0:n.config)==null?void 0:o.globalProperties,a=l?.$t;if(typeof a=="function"){const c=l?.$te;return{t:a.bind(l),te:typeof c=="function"?c.bind(l):void 0}}}catch{}return null})();if(t)return zw(t,e);try{const n=globalThis.$vueI18nUse||null;if(n&&typeof n=="function")try{const o=n();if(o&&typeof o.t=="function")return zw({t:o.t.bind(o),te:typeof o.te=="function"?o.te.bind(o):void 0},e)}catch{}}catch{}return{t:n=>R3(n,e)}}const mL=Symbol("ViewportPriority"),gL=Symbol("ViewportPriorityOptions"),vL=Symbol("OffscreenHeavyNodeDeferral"),Mle=F(()=>!1),hu="400px";function e5(){return dn(gL,void 0)}function t5(){return dn(vL,Mle)}function Tle(e,t){var n,o;const s=typeof window<"u"&&typeof document<"u",i=typeof t=="boolean"?K(t):t,r=s?(n=window.requestIdleCallback)!=null?n:L=>window.setTimeout(()=>L({didTimeout:!0,timeRemaining:()=>0}),16):null,l=s?(o=window.cancelIdleCallback)!=null?o:L=>window.clearTimeout(L):null,a=new WeakMap;let c=1;const u=new Map,d=new Map,f=new Set;let h=null,m=null;function g(L){if(!L)return"viewport";let S=a.get(L);return S||(S=c++,a.set(L,S)),String(S)}function b(){if(h!=null){try{l?.(h)}catch{}h=null}}function _(L){if(L){const S=u.get(L);if(S&&!S.targets.size){try{S.io.disconnect()}catch{}u.delete(L)}}d.size||f.size||b()}function v(L){const S=d.get(L);if(!S)return;const T=u.get(S.bucketKey);if(!S.visible.value){S.visible.value=!0;try{S.resolve()}catch{}}try{T?.io.unobserve(L)}catch{}T?.targets.delete(L),d.delete(L),f.delete(L),_(S.bucketKey)}function y(){window.__MARKSTREAM_DISABLE_VIEWPORT_PRIORITY_IDLE_DRAIN__!==!0&&r&&h==null&&f.size&&(h=r(()=>{h=null;const L=f.values().next().value;L&&(f.delete(L),v(L),f.size&&y())},{timeout:1200}))}function w(L,S){if(!s||typeof IntersectionObserver>"u")return null;const T=(function(H,O){var P,z,W;return{root:(P=e?.(H??null))!=null?P:null,rootMargin:(z=O?.rootMargin)!=null?z:hu,threshold:(W=O?.threshold)!=null?W:0}})(L,S),R=[g((B=T).root),B.rootMargin,B.threshold].join("\0");var B;const I=u.get(R);if(I)return{key:R,bucket:I};let $;try{$=new IntersectionObserver(H=>{for(const O of H)(O.isIntersecting||O.intersectionRatio>0)&&v(O.target)},{root:T.root,rootMargin:T.rootMargin,threshold:T.threshold})}catch{return null}const D={io:$,targets:new Map};return u.set(R,D),{key:R,bucket:D}}function x(){if(s&&i.value)for(const[L,S]of Array.from(d.entries())){const T=w(L,S.opts);if(!T){v(L);continue}if(T.key===S.bucketKey)continue;const R=S.bucketKey,B=u.get(R);try{B?.io.unobserve(L)}catch{}B?.targets.delete(L),S.bucketKey=T.key,T.bucket.targets.set(L,S),T.bucket.io.observe(L),_(R)}}Je(i,L=>{if(!L){for(const S of Array.from(d.keys()))v(S);b()}},{flush:"sync"});const A=(L,S)=>{const T=K(!1);let R,B=!1;const I=new Promise(O=>{R=()=>{B||(B=!0,O())}}),$=()=>{const O=d.get(L);if(!O)return f.delete(L),void _();const P=u.get(O.bucketKey);try{P?.io.unobserve(L)}catch{}P?.targets.delete(L),d.delete(L),f.delete(L),_(O.bucketKey)};if(!s||!i.value)return T.value=!0,R(),{isVisible:T,whenVisible:I,destroy:$};const D=w(L,S);if(!D)return T.value=!0,R(),{isVisible:T,whenVisible:I,destroy:$};const H={resolve:R,visible:T,bucketKey:D.key,opts:S};return d.set(L,H),D.bucket.targets.set(L,H),D.bucket.io.observe(L),s&&m==null&&(m=window.requestAnimationFrame(()=>{m=null,x()})),S?.allowIdle!==!1&&(f.add(L),y()),{isVisible:T,whenVisible:I,destroy:$}};return A.refresh=x,Wn(mL,A),A}function n5(){var e,t;const n=dn(mL,void 0);if(n)return n;const o=new WeakMap,s=new Map,i=new Set;let r=null;const l=typeof window<"u"?(e=window.requestIdleCallback)!=null?e:h=>window.setTimeout(()=>h({didTimeout:!0,timeRemaining:()=>0}),16):null,a=typeof window<"u"?(t=window.cancelIdleCallback)!=null?t:h=>window.clearTimeout(h):null,c=()=>{if(r!=null){try{a?.(r)}catch{}r=null}},u=h=>{if(!h)return;const m=s.get(h);if(m&&!m.targets.size){try{m.io.disconnect()}catch{}s.delete(h)}},d=h=>{const m=o.get(h);if(!m)return;const g=s.get(m.bucketKey);if(!m.visible.value){m.visible.value=!0;try{m.resolve()}catch{}}try{g?.io.unobserve(h)}catch{}o.delete(h),g?.targets.delete(h),i.delete(h),u(m.bucketKey),i.size||c()},f=()=>{window.__MARKSTREAM_DISABLE_VIEWPORT_PRIORITY_IDLE_DRAIN__!==!0&&l&&r==null&&i.size&&(r=l(()=>{r=null;const h=i.values().next().value;h&&(i.delete(h),d(h),i.size&&f())},{timeout:1200}))};return(h,m)=>{const g=K(!1);let b,_=!1;const v=new Promise(x=>{b=()=>{_||(_=!0,x())}}),y=()=>{const x=o.get(h);if(!x)return i.delete(h),void(i.size||c());const A=s.get(x.bucketKey);try{A?.io.unobserve(h)}catch{}o.delete(h),A?.targets.delete(h),i.delete(h),u(x.bucketKey),i.size||c()},w=(x=>{var A,L;if(typeof window>"u"||typeof IntersectionObserver>"u")return null;const S=($=>{var D,H;return[(D=$?.rootMargin)!=null?D:hu,(H=$?.threshold)!=null?H:0].join("\0")})(x),T=s.get(S);if(T)return{key:S,bucket:T};const R=(A=x?.rootMargin)!=null?A:hu;let B;try{B=new IntersectionObserver($=>{for(const D of $)(D.isIntersecting||D.intersectionRatio>0)&&d(D.target)},{root:null,rootMargin:R,threshold:(L=x?.threshold)!=null?L:0})}catch{return null}const I={io:B,targets:new Set};return s.set(S,I),{key:S,bucket:I}})(m);return w?(o.set(h,{resolve:b,visible:g,bucketKey:w.key}),w.bucket.targets.add(h),w.bucket.io.observe(h),m?.allowIdle!==!1&&(i.add(h),f()),{isVisible:g,whenVisible:v,destroy:y}):(g.value=!0,b(),{isVisible:g,whenVisible:v,destroy:y})}}function Ele(e,t){var n,o;const s=(o=(n=e.indexKey)!=null?n:t["index-key"])!=null?o:t.indexKey;return s==null||s===""?"":String(s)}const Ile=["data-markstream-viewport-pending"],Lle=["src","alt","title","loading","fetchpriority","decoding","tabindex","aria-label"],$le={key:1,class:"image-placeholder"},Nle={key:1,class:"image-node__raw-text"},Ole={key:2,class:"image-shimmer-overlay"},Fle={key:1,class:"image-node__raw-text"},Rle={key:3,class:"image-error"},za=Vn(et({__name:"ImageNode",props:{node:{},fallbackSrc:{default:""},lazy:{type:Boolean,default:!1},usePlaceholder:{type:Boolean,default:!0}},emits:["load","error","click"],setup(e,{emit:t}){var n,o,s;const i=e,r=t,l=K(!1),a=K(!1),c=K(""),u=K("primary"),d=K(null),f=cf(),h=dn(M3,null),m=n5(),g=e5(),b=t5(),_=F(()=>dC(i.node.src)),v=F(()=>dC(i.fallbackSrc)),y=(s=(o=(n=rs())==null?void 0:n.vnode.el)==null?void 0:o.querySelector)==null?void 0:s.call(o,"img"),w=typeof window<"u"&&y?.getAttribute("src")===(_.value||v.value),x=K(typeof window>"u"||w||!b.value),A=Kr(null);let L="",S=null;const T=F(()=>c.value),R=F(()=>!i.lazy),B=F(()=>typeof window<"u"&&b.value&&!w),I=F(()=>!B.value||x.value),$=F(()=>I.value?T.value:""),D=F(()=>{var pe,ve;return(ve=(pe=g?.value.heavyBlockMargin)!=null?pe:g?.value.rootMargin)!=null?ve:hu}),H=F(()=>!i.node.loading&&u.value!=="failed"&&c.value.length>0),O=F(()=>u.value==="failed"),P=F(()=>(!R.value||B.value&&!x.value)&&!l.value&&!a.value&&u.value!=="failed"&&c.value.length>0),z=F(()=>Ele(i,f));function W(pe=z.value){pe&&d.value&&h?.reportHeight(pe,d.value.offsetHeight)}function U(pe=z.value){pe&&bt(()=>{W(pe)})}function G(){S&&(clearTimeout(S),S=null)}function Z(){const pe=z.value;pe&&L!==pe&&(L&&h?.markSettled(L),G(),L=pe,h?.markPending(pe),typeof window<"u"&&(S=window.setTimeout(()=>{L===pe&&(U(pe),ee())},8e3)))}function ee(){return co(this,null,function*(){const pe=L;pe&&(G(),L="",yield bt(),W(pe),h?.markSettled(pe))})}function Q(){if(u.value==="primary"&&v.value&&v.value!==c.value)return u.value="fallback",c.value=v.value,l.value=!1,a.value=!1,void U();u.value="failed",a.value=!0,r("error",c.value),U()}function X(){l.value=!0,a.value=!1,r("load",T.value),U()}function oe(pe){pe.preventDefault(),l.value&&!a.value&&r("click",[pe,T.value])}const{t:xe}=Ale();return Je([_,v,()=>i.node.loading],()=>(l.value=!1,a.value=!1,i.node.loading||_.value?(c.value=_.value,void(u.value="primary")):v.value?(c.value=v.value,void(u.value="fallback")):(c.value="",u.value="failed",void(a.value=!0))),{immediate:!0}),typeof window<"u"&&Je([d,B],([pe,ve],ge,ne)=>{var ae;if((ae=A.value)==null||ae.destroy(),A.value=null,!ve||x.value)return void(x.value=!0);if(!pe)return void(x.value=!1);let j=!0;const Y=m(pe,{rootMargin:D.value,allowIdle:!1});A.value=Y,x.value=Y.isVisible.value,Y.whenVisible.then(()=>{j&&A.value===Y&&(x.value=!0)}),ne(()=>{j=!1,Y.destroy(),A.value===Y&&(A.value=null)})},{immediate:!0}),Je([H,l,a,T,()=>i.lazy,I],([pe,ve,ge,ne,ae,j])=>pe&&ne&&!ge&&j?ve?(ee(),void U()):ae?(Z(),void U()):void(ve||ge||Z()):(ee(),void U()),{flush:"post",immediate:!0}),Dn(()=>{var pe;(pe=A.value)==null||pe.destroy(),A.value=null,(function(){const ve=L;ve&&(G(),L="",h?.markSettled(ve))})()}),(pe,ve)=>{var ge,ne,ae,j,Y;return k(),M("span",{ref_key:"rootRef",ref:d,class:"image-node-container","data-markstream-viewport-pending":B.value&&!x.value?"true":void 0},[H.value?(k(),M("img",{key:0,src:$.value||void 0,alt:String((ne=(ge=i.node.alt)!=null?ge:i.node.title)!=null?ne:""),title:String((j=(ae=i.node.title)!=null?ae:i.node.alt)!=null?j:""),class:Fe(["image-node__img",{"is-loading":!R.value&&!l.value,"is-loaded":R.value||l.value,"has-natural-size":l.value,"cursor-pointer":l.value}]),loading:i.lazy?"lazy":void 0,fetchpriority:R.value?"high":void 0,decoding:R.value?"sync":"async",tabindex:l.value?0:-1,"aria-label":(Y=i.node.alt)!=null?Y:p(xe)("image.preview"),onError:Q,onLoad:X,onClick:oe},null,42,Lle)):te("",!0),e.node.loading&&!a.value?(k(),M("span",$le,[i.usePlaceholder?Cn(pe.$slots,"placeholder",{key:0,node:i.node,displaySrc:T.value,imageLoaded:l.value,hasError:a.value,fallbackSrc:i.fallbackSrc,lazy:i.lazy},()=>[ve[0]||(ve[0]=C("span",{class:"image-shimmer"},null,-1))],!0):(k(),M("span",Nle,N(e.node.raw),1))])):te("",!0),P.value&&!e.node.loading?(k(),M("span",Ole,[i.usePlaceholder?Cn(pe.$slots,"placeholder",{key:0,node:i.node,displaySrc:T.value,imageLoaded:l.value,hasError:a.value,fallbackSrc:i.fallbackSrc,lazy:i.lazy},()=>[ve[1]||(ve[1]=C("span",{class:"image-shimmer"},null,-1))],!0):(k(),M("span",Fle,N(e.node.raw),1))])):te("",!0),O.value?(k(),M("span",Rle,[Cn(pe.$slots,"error",{node:i.node,displaySrc:T.value,imageLoaded:l.value,hasError:a.value,fallbackSrc:i.fallbackSrc,lazy:i.lazy},()=>[ve[2]||(ve[2]=C("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24"},[C("path",{fill:"currentColor",d:"M2 2h20v10h-2V4H4v9.586l5-5L14.414 14L13 15.414l-4-4l-5 5V20h8v2H2zm13.547 5a1 1 0 1 0 0 2a1 1 0 0 0 0-2m-3 1a3 3 0 1 1 6 0a3 3 0 0 1-6 0m3.625 6.757L19 17.586l2.828-2.829l1.415 1.415L20.414 19l2.829 2.828l-1.415 1.415L19 20.414l-2.828 2.829l-1.415-1.415L17.586 19l-2.829-2.828z"})],-1)),C("span",null,N(p(xe)("image.loadError")),1)],!0)])):te("",!0)],8,Ile)}}}),[["__scopeId","data-v-046e82ac"]]);za.install=e=>{e.component(za.__name,za)};const Ple={key:2},wl=et({__name:"NodeChildRenderer",props:{node:{},components:{},customId:{},indexKey:{},fallbackToText:{type:Boolean,default:!1}},setup(e){const t=e,n=ls(()=>t.customId),o=dn("markstreamHtmlPolicy",void 0),s=dn("markstreamNestedRendererProps",void 0),i=F(()=>{var m;return(m=o?.value)!=null?m:"safe"}),r=F(()=>{var m,g;const b=(m=s?.value)!=null?m:{};return tn(yt({},b),{customId:(g=t.customId)!=null?g:b.customId,htmlPolicy:i.value})}),l=Dr({loader:()=>Promise.resolve().then(()=>p5),suspensible:!1}),a=F(()=>t.components[String(t.node.type)]),c=F(()=>!!(a.value&&n.value[t.node.type]&&!Wp(String(t.node.type)))),u=F(()=>c.value?Q8(t.node,i.value):void 0),d=F(()=>Array.isArray(t.node.children)&&t.node.children.length>0),f=F(()=>{var m;return String((m=t.node.content)!=null?m:"")}),h=F(()=>{var m,g;return String((g=(m=t.node.content)!=null?m:t.node.raw)!=null?g:"")});return(m,g)=>a.value&&c.value?(k(),me(fs(a.value),Nn({key:0},u.value,{node:e.node,loading:e.node.loading,"index-key":e.indexKey,"custom-id":e.customId,"is-dark":r.value.isDark}),{default:be(()=>[d.value?(k(),me(p(l),Nn({key:0},r.value,{nodes:e.node.children,"index-key":e.indexKey,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes","index-key"])):f.value?(k(),me(p(l),Nn({key:1},r.value,{content:f.value,final:!e.node.loading,"index-key":`${e.indexKey||"child"}-content`,"smooth-streaming":!1,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["content","final","index-key"])):te("",!0)]),_:1},16,["node","loading","index-key","custom-id","is-dark"])):a.value?(k(),me(fs(a.value),{key:1,node:e.node,"custom-id":e.customId,"index-key":e.indexKey},null,8,["node","custom-id","index-key"])):e.fallbackToText?(k(),M("span",Ple,N(h.value),1)):te("",!0)}}),Ww=Object.freeze({enabled:!0,contextLineCount:2,minimumLineCount:4,revealLineCount:5});function Dle(e){var t;if(typeof e=="boolean")return e;if(e&&typeof e=="object"){const n=e;return tn(yt(yt({},Ww),n),{enabled:(t=n.enabled)==null||t})}return yt({},Ww)}function o5(e,t){if(e.renderSideBySide===!1)return!0;if(e.useInlineViewWhenSpaceIsLimited!==!0)return!1;const n=e.renderSideBySideInlineBreakpoint,o=typeof n=="number"&&Number.isFinite(n)?n:900;return t>0&&t<=o}function yL(e){var t,n;const o=(n=(t=String(e??"").split(/\r?\n/,1)[0])==null?void 0:t.trim())!=null?n:"";if(o.length<3)return"";const s=o[0];if(s!=="`"&&s!=="~"||o[1]!==s||o[2]!==s)return"";let i=3;for(;o[i]===s;)i+=1;return o.slice(i).trim()}function Uw(e){var t;return((t=String(e??"").trim().split(/\s+/,1)[0])!=null?t:"")==="diff"}function Ble(e){var t;return e.diff===!0||Uw(e.language)||Uw(yL(String((t=e.raw)!=null?t:"")))}function Hle(e,t,n){const o=(function(s){const i=yL(s);if(!i)return"";const r=i.split(/\s+/).filter(Boolean);if(!r.length)return"";const l=r[0]==="diff"?r.slice(1):r;for(const a of l){const c=a.includes(":")?a.slice(a.indexOf(":")+1):a;if(c&&/[./\\-]/.test(c))return c}return""})(e);return{title:o||t,caption:o?n?`Diff / ${t}`:t:""}}const zle=["aria-busy","aria-label","data-language","data-markstream-line-numbers"],Wle={key:0,translate:"no",class:"markstream-pre__diff-code"},Ule={class:"markstream-pre__diff-pane-content"},jle={class:"markstream-pre__diff-number","aria-hidden":"true"},Vle={class:"markstream-pre__diff-content"},qle={class:"markstream-pre__diff-content-inner"},Kle={key:0,class:"markstream-pre__line-numbers","aria-hidden":"true"},Zle=["textContent"],Gle=["textContent"],Si=et({__name:"PreCodeNode",props:{node:{},loading:{type:Boolean},showLineNumbers:{type:Boolean},diffInline:{type:Boolean},diffHideUnchangedRegions:{type:[Boolean,Object]},reservedHeightPx:{}},setup(e){const t=e;function n(X,oe){const xe=String(X??"");return oe?xe:xe.replace(/\r\n$|\n$|\r$/,"")}const o=F(()=>{var X,oe,xe;const pe=String((oe=(X=t.node)==null?void 0:X.language)!=null?oe:"");return String((xe=String(pe).split(/\s+/g)[0])!=null?xe:"").toLowerCase().replace(/[^\w-]/g,"")||"plaintext"}),s=F(()=>`language-${o.value}`),i=F(()=>{var X;return t.loading===!0||((X=t.node)==null?void 0:X.loading)===!0}),r=F(()=>{var X;return n((X=t.node)==null?void 0:X.code,i.value)});let l="",a=1;const c=F(()=>(function(X){let oe=0,xe=1;X.startsWith(l)&&(oe=l.length,xe=a,oe>0&&X[oe-1]==="\r"&&X[oe]===` -`&&oe++);for(let pe=oe;per.value.split(/\r\n|\n|\r/));let d=0,f="";const h=F(()=>{const X=c.value;X{var X;return t.showLineNumbers===!0&&((X=t.node)==null?void 0:X.diff)===!0}),g=F(()=>m.value&&t.diffInline===!0),b=F(()=>{const X=Number(t.reservedHeightPx);if(!Number.isFinite(X)||X<=0)return;const oe=`${Math.ceil(X)}px`;return i.value?{maxHeight:oe,overflow:"auto"}:{height:oe,minHeight:oe,maxHeight:oe,overflow:"auto"}}),_=["diff ","index ","--- ","+++ ","@@ "];function v(X){return String(X??"").trim().length===0}function y(X,oe="context",xe={}){const pe=v(X);return{code:X,kind:pe&&oe!=="hunk"&&oe!=="spacer"&&!xe.preserveBlankKind?"context":oe,empty:pe}}function w(X){const oe=n(X,i.value);return oe?oe.split(/\r\n|\n|\r/):[]}function x(X,oe){return!v(X[oe])||oe_.some(xe=>oe.startsWith(xe)))}function T(X,oe){return oe||!X.startsWith(" ")||X.startsWith(" ")?X:` ${X}`}function R(X,oe){const xe=X.length,pe=oe.length,ve=[];let ge=0;for(;ge=ge&&j>=ge&&X[ae]===oe[j];)ne.unshift({originalIndex:ae,modifiedIndex:j}),ae--,j--;const Y=ae-ge+1,fe=j-ge+1;if(Y<=0||fe<=0||i.value||(Y+1)*(fe+1)>15e5)return ve.concat(ne);const ue=fe+1,de=new Uint32Array((Y+1)*(fe+1));for(let he=Y-1;he>=0;he--)for(let Ie=fe-1;Ie>=0;Ie--){const Ge=he*ue+Ie;if(X[ge+he]===oe[ge+Ie])de[Ge]=de[(he+1)*ue+Ie+1]+1;else{const we=de[(he+1)*ue+Ie],Te=de[he*ue+Ie+1];de[Ge]=we>=Te?we:Te}}const J=[];let se=0,ce=0;for(;se=de[se*ue+ce+1]?se++:ce++;return ve.concat(J,ne)}function B(X){var oe;const xe=(function(){var j,Y;const fe=t.diffHideUnchangedRegions;if(fe==null||fe===!1)return null;const ue=fe===!0?{}:fe;return ue.enabled===!1?null:{contextLineCount:Math.max(0,Math.floor((j=ue.contextLineCount)!=null?j:2)),minimumLineCount:Math.max(1,Math.floor((Y=ue.minimumLineCount)!=null?Y:4))}})();if(!xe||X.length<1||X.length>2||X.length===2&&X[0].lines.length!==X[1].lines.length)return X;const pe=X[0].lines,ve=(oe=X[1])==null?void 0:oe.lines,ge=j=>pe[j].kind==="context"&&(ve===void 0||ve[j].kind==="context"&&pe[j].code===ve[j].code),ne=[];let ae=0;for(;ae=xe.minimumLineCount){const fe=j+(j===0?0:xe.contextLineCount),ue=Y-(Y===pe.length?0:xe.contextLineCount);ue-fe>=xe.minimumLineCount&&ne.push({start:fe,end:ue})}ae===j&&ae++}return ne.length?X.map((j,Y)=>{const fe=[];let ue=0;for(const de of ne)fe.push(...j.lines.slice(ue,de.start)),fe.push({code:Y===0?"Unmodified lines":"",kind:"collapsed",empty:!1,key:`${j.key}-collapsed-${de.start}-${de.end}`,number:""}),ue=de.end;return fe.push(...j.lines.slice(ue)),tn(yt({},j),{lines:fe})}):X}const I=F(()=>{var X,oe,xe,pe;if(!m.value)return[];const ve=(function(Y){const fe=Y.some(de=>A(de)),ue=Y.some(de=>L(de));return fe&&ue||(function(){var de,J,se,ce;if(o.value==="diff")return!0;const he=(ce=(se=String((J=(de=t.node)==null?void 0:de.raw)!=null?J:"").split(/\r?\n/,1)[0])==null?void 0:se.trim())!=null?ce:"";return/^`{3,}\s*diff(?:\s|$)|^~{3,}\s*diff(?:\s|$)/.test(he)})()&&(fe||ue)})(u.value),ge=(function(){var Y,fe;return((Y=t.node)==null?void 0:Y.originalCode)!=null||((fe=t.node)==null?void 0:fe.updatedCode)!=null})();if(g.value){const Y=ge?(function(fe,ue){const de=w(fe),J=w(ue),se=R(de,J);if(se.length>0){const Te=[];let st=0,Ne=0;for(const Re of se){for(;st=he&&Ge>=he&&de[Ie]===J[Ge];)we.unshift(tn(yt({},y(J[Ge])),{key:`inline-suffix-${Ge}`,number:Ge+1})),Ie--,Ge--;for(let Te=he;Te<=Ie;Te++)ce.push(tn(yt({},y(de[Te],"removed",{preserveBlankKind:x(de,Te)})),{key:`inline-removed-source-${Te}`,number:Te+1}));for(let Te=he;Te<=Ge;Te++)ce.push(tn(yt({},y(J[Te],"added",{preserveBlankKind:x(J,Te)})),{key:`inline-added-source-${Te}`,number:Te+1}));return ce.concat(we)})((X=t.node)==null?void 0:X.originalCode,(oe=t.node)==null?void 0:oe.updatedCode):(function(fe){const ue=[];let de=1,J=1;const se=S(fe);for(const[ce,he]of fe.entries())if(he.startsWith("@@")){const Ie=he.match(/^@@\s+-(\d+)(?:,\d+)?\s+\+(\d+)(?:,\d+)?\s+@@/);Ie&&(de=Number(Ie[1]),J=Number(Ie[2])),ue.push(tn(yt({},y(he,"hunk")),{key:`inline-hunk-${ce}`,number:""}))}else if(A(he))ue.push(tn(yt({},y(T(he.slice(1),se),"removed",{preserveBlankKind:!0})),{key:`inline-removed-${ce}`,number:de++}));else if(L(he))ue.push(tn(yt({},y(T(he.slice(1),se),"added",{preserveBlankKind:!0})),{key:`inline-added-${ce}`,number:J++}));else{const Ie=se&&he.startsWith(" ")?he.slice(1):he;ue.push(tn(yt({},y(Ie)),{key:`inline-context-${ce}`,number:J})),de++,J++}return ue})(u.value);return B([{key:"inline",className:"markstream-pre__diff-pane--inline",lines:Y}])}if(!ve&&ge)return(function(Y,fe){const ue=w(Y),de=w(fe),J=R(ue,de),se=[],ce=[];let he=0,Ie=0,Ge=0;const we=(Te,st)=>{const Ne=Math.max(Te-he,st-Ie);for(let Re=0;Retn(yt({},Y),{key:`original-${fe}`,number:fe+1}))},{key:"modified",className:"markstream-pre__diff-pane--modified",lines:ae.map((Y,fe)=>tn(yt({},Y),{key:`modified-${fe}`,number:fe+1}))}])}),$=F(()=>I.value.some(X=>X.lines.some(oe=>oe.kind==="collapsed"))),D=F(()=>{const X=o.value;return X?`Code block: ${X}`:"Code block"}),H=K(null),O=K([]);let P=null,z=!1,W=null;function U(X){const oe=Number.parseFloat(String(X??""));return Number.isFinite(oe)&&oe>0?oe:0}function G(X,oe){var xe;if(!X)return oe;if(X.classList.contains("markstream-pre__diff-line--collapsed"))return 32;const pe=X.querySelector(".markstream-pre__diff-content"),ve=pe?.getBoundingClientRect(),ge=(xe=ve?.height)!=null?xe:0;return Math.max(oe,Math.ceil(ge))}function Z(){z||typeof window>"u"||(P!=null&&window.cancelAnimationFrame(P),P=window.requestAnimationFrame(()=>{P=null,z||(function(){var X,oe;P=null;const xe=H.value;if(!xe||!m.value||g.value||!xe.classList.contains("is-wrap"))return void(O.value.length&&(O.value=[]));const pe=(function(fe){const ue=window.getComputedStyle(fe),de=U(ue.getPropertyValue("--markstream-pre-diff-line-height"));if(de>0)return de;const J=U(ue.lineHeight);return J>0?J:18})(xe),ve=Array.from(xe.querySelectorAll(".markstream-pre__diff-pane--original .markstream-pre__diff-line")),ge=Array.from(xe.querySelectorAll(".markstream-pre__diff-pane--modified .markstream-pre__diff-line")),ne=Math.max(ve.length,ge.length),ae=[];for(let fe=0;fe{const de=Y[ue];return de&&Math.abs(fe.rowHeight-de.rowHeight)<=.5&&Math.abs(fe.originalHeight-de.originalHeight)<=.5&&Math.abs(fe.modifiedHeight-de.modifiedHeight)<=.5})||(O.value=ae)})()}))}function ee(X){W?.disconnect(),W=null,X&&m.value&&!g.value&&typeof ResizeObserver<"u"&&(W=new ResizeObserver(()=>{Z()}),W.observe(X))}function Q(X,oe){const xe=O.value[X];if(!xe)return;const pe=oe==="original"?xe.originalHeight:xe.modifiedHeight;return{"--markstream-pre-diff-synced-row-height":`${Math.ceil(xe.rowHeight)}px`,"--markstream-pre-diff-content-height":`${Math.ceil(pe)}px`}}return Je(H,X=>{ee(X),bt(()=>Z())},{flush:"post"}),Je([m,g,I],()=>{ee(H.value),bt(()=>Z())},{flush:"post",immediate:!0}),Dn(()=>{z=!0,P!=null&&(window.cancelAnimationFrame(P),P=null),W?.disconnect(),W=null}),(X,oe)=>(k(),M("pre",{ref_key:"preRef",ref:H,style:Gt(b.value),class:Fe([s.value,{"markstream-pre--line-numbers":t.showLineNumbers,"markstream-pre--diff-preview":m.value,"markstream-pre--diff-inline":g.value,"markstream-pre--diff-collapsed":$.value}]),"aria-busy":i.value,"aria-label":D.value,"data-language":o.value,"data-markstream-line-numbers":t.showLineNumbers?"1":void 0,"data-markstream-pre":"1",tabindex:"0"},[m.value?(k(),M("code",Wle,[(k(!0),M(De,null,vt(I.value,xe=>(k(),M("span",{key:xe.key,class:Fe(["markstream-pre__diff-pane",xe.className])},[C("span",Ule,[(k(!0),M(De,null,vt(xe.lines,(pe,ve)=>(k(),M("span",{key:pe.key,class:Fe(["markstream-pre__diff-line",[`markstream-pre__diff-line--${pe.kind}`,{"markstream-pre__diff-line--empty":pe.empty}]]),style:Gt(Q(ve,xe.key))},[oe[0]||(oe[0]=C("span",{class:"markstream-pre__diff-rail","aria-hidden":"true"},null,-1)),C("span",jle,N(pe.number),1),C("span",Vle,[C("span",qle,N(pe.code),1)])],6))),128))])],2))),128))])):(k(),M(De,{key:1},[t.showLineNumbers?(k(),M("span",Kle,[C("span",{class:"markstream-pre__line-numbers-text",textContent:N(h.value)},null,8,Zle)])):te("",!0),C("code",{translate:"no",class:"markstream-pre__code",textContent:N(r.value)},null,8,Gle)],64))],14,zle))}});Si.install=e=>{e.component(Si.__name,Si)};const Yle={key:0},Bo=Vn(et({__name:"TextNode",props:{node:{}},emits:["copy"],setup(e){const t=e,n=cf(),o=dn("markstreamFade",void 0),s=dn("markstreamTextStreamState",void 0),i=dn("markstreamStreamVersion",void 0),r=F(()=>{const b=n.fade;return b===""||b===!0||b==="true"||b!==!1&&b!=="false"&&void 0}),l=F(()=>typeof r.value=="boolean"?r.value:typeof o?.value!="boolean"||o.value),a=F(()=>{var b;const _=(b=n["index-key"])!=null?b:n.indexKey;return _==null||_===""?"":String(_)}),c=K(t.node.content),u=K(""),d=K(0);let f;function h(){f?.(),f=void 0}function m(){h(),u.value&&(c.value=c.value+u.value,u.value="")}Je([()=>t.node.content,a,l],([b])=>{const _=String(b??""),v=a.value,y=QI({nextContent:_,persistedContent:v?s?.get(v):void 0,currentState:{settledContent:c.value,streamedDelta:u.value},typewriterEnabled:l.value});c.value=y.settledContent,u.value=y.streamedDelta,y.appended?(d.value+=1,(function(){if(!u.value||f||!i)return;const w=i.value;f=Je(()=>i.value,x=>{x!==w&&m()},{flush:"sync"})})()):u.value||h(),v&&s?.set(v,_)},{immediate:!0}),lf(h);const g=F(()=>d.value%2==0?"text-node-stream-delta--a":"text-node-stream-delta--b");return(b,_)=>(k(),M("span",{class:Fe([[e.node.center?"text-node-center":""],"text-node"])},[c.value?(k(),M("span",Yle,N(c.value),1)):te("",!0),u.value?(k(),M("span",{key:1,class:Fe(["text-node-stream-delta",[g.value]]),onAnimationend:m},N(u.value),35)):te("",!0)],2))}}),[["__scopeId","data-v-a7e90764"]]);function y1(e,t,n){return et({name:e,inheritAttrs:!1,setup(o,{attrs:s,slots:i}){var r,l;const a=n5(),c=e5(),u=t5(),d=typeof window<"u"&&((l=(r=rs())==null?void 0:r.vnode.el)==null?void 0:l.nodeType)===1,f=K(typeof window>"u"||d||!u.value),h=Kr(null);let m=null;function g(b){const _=b&&"$el"in b?b.$el:b;h.value=_ instanceof HTMLElement?_:null}return typeof window<"u"&&Je([h,u],([b,_],v,y)=>{if(m?.destroy(),m=null,!_||f.value)return void(f.value=!0);if(!b)return;let w=!0;const x=a(b,{rootMargin:c?.value.heavyBlockMargin,allowIdle:!1});m=x,f.value=x.isVisible.value,x.whenVisible.then(()=>{w&&m===x&&(f.value=!0)}),y(()=>{w=!1,x.destroy(),m===x&&(m=null)})},{immediate:!0}),Dn(()=>{m?.destroy(),m=null}),()=>Qt(f.value?t:n,tn(yt({},s),{ref:g}),i)}})}Bo.install=e=>{e.component(Bo.__name,Bo)};const eg=et({name:"CodeBlockNodeLoading",inheritAttrs:!1,props:["node","isDark","loading","stream","theme","darkTheme","lightTheme","isShowPreview","monacoOptions","enableFontSizeControl","minWidth","maxWidth","themes","showHeader","showCopyButton","showExpandButton","showPreviewButton","showCollapseButton","showFontSizeButtons","showTooltips","htmlPreviewAllowScripts","htmlPreviewSandbox","customId","estimatedHeightPx","estimatedContentHeightPx","estimatedDiffInline"],emits:["previewCode","copy"],setup(e,{attrs:t}){const n=e;return()=>{var o,s,i,r,l,a,c;const u=v2(String((s=(o=n.node)==null?void 0:o.language)!=null?s:"")),d=ww[u]||(u?u.charAt(0).toUpperCase()+u.slice(1):ww[""]),f=Ble(n.node),h=Hle(String((r=(i=n.node)==null?void 0:i.raw)!=null?r:""),d,f),m=n.monacoOptions,g=f&&((l=n.estimatedDiffInline)!=null?l:o5(m??{},typeof window>"u"?0:window.innerWidth)),b=m?.diffAppearance,_=b==="dark"||b!=="light"&&n.isDark===!0,v=typeof m?.fontSize=="number"&&Number.isFinite(m.fontSize)&&m.fontSize>0?m.fontSize:12,y=typeof m?.lineHeight=="number"&&Number.isFinite(m.lineHeight)&&m.lineHeight>0?m.lineHeight:v===12?18:Math.max(12,Math.round(1.5*v)),w=typeof m?.tabSize=="number"&&Number.isFinite(m.tabSize)&&m.tabSize>0?m.tabSize:4,x=f?0:8,A=typeof((a=m?.padding)==null?void 0:a.top)=="number"&&Number.isFinite(m.padding.top)&&m.padding.top>=0?m.padding.top:x,L=typeof((c=m?.padding)==null?void 0:c.bottom)=="number"&&Number.isFinite(m.padding.bottom)&&m.padding.bottom>=0?m.padding.bottom:x,S=typeof m?.fontFamily=="string"?m.fontFamily.trim():"",T=yt(yt({fontSize:`${v}px`,lineHeight:`${y}px`,tabSize:w,paddingTop:`${A}px`,paddingBottom:`${L}px`,"--markstream-pre-line-number-top":`${A}px`},f?{"--markstream-pre-diff-line-height":`${y}px`}:{}),S?{"--markstream-code-font-family":S}:{}),R=()=>Qt("button",{class:"code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0","aria-hidden":"true",disabled:!0,tabindex:-1,type:"button"},[Qt("svg",{class:"action-icon"})]),B=n.isShowPreview!==!1&&(u==="html"||u==="svg"),I=n.showFontSizeButtons!==!1&&n.enableFontSizeControl!==!1||n.showExpandButton!==!1||B&&n.showPreviewButton!==!1,$=H=>{if(H!=null)return typeof H=="number"?`${H}px`:String(H)},D=yt(yt(yt({"--markstream-code-layout-character-width":"1ch"},$(n.minWidth)?{minWidth:$(n.minWidth)}:{}),$(n.maxWidth)?{maxWidth:$(n.maxWidth)}:{}),f?{}:{color:"var(--vscode-editor-foreground, var(--markstream-code-fallback-fg, var(--code-fg)))",backgroundColor:"var(--vscode-editor-background, var(--markstream-code-fallback-bg, var(--code-bg)))",borderColor:"var(--markstream-code-border-color, var(--code-border))"});return Qt("div",tn(yt({},t),{class:["code-block-container","rounded-lg","border",{dark:n.isDark===!0,"is-rendering":n.loading!==!1,"is-dark":_,"is-diff":f,"is-plain-text":u===""||u==="plaintext"||u==="text"},t.class],style:[D,t.style],"data-markstream-code-block":"1","data-markstream-enhanced":"false","data-markstream-code-block-state":n.loading?"streaming":"settled","data-markstream-code-loading":"1"}),[n.showHeader===!1?null:Qt("div",{class:"code-block-header flex justify-between items-center border-b px-[var(--ms-inset-panel-x)] py-[var(--ms-inset-panel-y)] border-[var(--code-border)] bg-[var(--code-header-bg)] text-[var(--code-fg)]"},[Qt("div",{class:"code-header-main"},[Qt("span",{class:"icon-slot h-4 w-4 flex-shrink-0"}),Qt("div",{class:"code-header-copy"},[Qt("div",{class:"code-header-title"},h.title),h.caption?Qt("div",{class:"code-header-caption"},h.caption):null])]),Qt("div",{class:"flex items-center gap-0.5",style:{visibility:"hidden"}},[f?Qt("div",{class:"code-diff-stats","aria-hidden":"true"},[Qt("span",{class:"code-diff-stat removed"},"-0"),Qt("span",{class:"code-diff-stat added"},"+0")]):null,n.showCopyButton===!1?null:R(),n.showCollapseButton===!1?null:R(),I?Qt("div",{class:"relative"},[R()]):null])]),Qt("div",{class:"code-block-shell-content",style:n.stream!==!1||n.loading===!1?void 0:{display:"none"}},[Qt(Si,{node:n.node,loading:n.loading,showLineNumbers:!0,reservedHeightPx:f?void 0:n.estimatedContentHeightPx,diffInline:g,diffHideUnchangedRegions:f?Dle(m?.diffHideUnchangedRegions):void 0,class:"code-pre-fallback",style:T,"data-markstream-code-loading":"1"})]),Qt("div",{class:"code-loading-placeholder",style:n.stream===!1&&n.loading!==!1?void 0:{display:"none"}},[Qt("div",{class:"loading-skeleton"},[Qt("div",{class:"skeleton-line"}),Qt("div",{class:"skeleton-line"}),Qt("div",{class:"skeleton-line short"})])]),Qt("span",{class:"sr-only","aria-live":"polite",role:"status"})])}}}),U9=y1("ViewportDeferredCodeBlockNode",Dr({loader:()=>co(null,null,function*(){try{return(yield Po(()=>import("./CodeBlockNode-pVrDnT5M.js"),__vite__mapDeps([4,5]))).default}catch(e){return console.warn('[markstream-vue] Optional peer dependency stream-diffs is missing. Falling back to preformatted code rendering. To enable enhanced code block features, please install "stream-diffs".',e),Si}}),loadingComponent:eg,delay:0,suspensible:!1}),eg),Zr=Dr(()=>co(null,null,function*(){var e;if(((e=(function(){const t=Reflect.get(globalThis,"process");return t?.env})())==null?void 0:e.NODE_ENV)==="test"&&typeof window<"u")return t=>{var n,o,s,i;return Qt(Bo,tn(yt({},t),{node:{type:"text",content:(o=t.node.raw)!=null?o:`$${(n=t.node.content)!=null?n:""}$`,raw:(i=t.node.raw)!=null?i:`$${(s=t.node.content)!=null?s:""}$`}}))};try{return yield sL(),(yield Po(()=>import("./index7-BqOx7RWV.js"),[])).default}catch(t){console.warn('[markstream-vue] Optional peer dependencies for MathInlineNode are missing. Falling back to text rendering. To enable full math rendering features, please install "katex".',t)}return t=>{var n,o,s,i;return Qt(Bo,tn(yt({},t),{node:{type:"text",content:(o=t.node.raw)!=null?o:`$${(n=t.node.content)!=null?n:""}$`,raw:(i=t.node.raw)!=null?i:`$${(s=t.node.content)!=null?s:""}$`}}))}})),kL=Dr(()=>co(null,null,function*(){try{return yield sL(),(yield Po(()=>import("./index6-CHOJPToe.js"),[])).default}catch(e){console.warn('[markstream-vue] Optional peer dependencies for MathBlockNode are missing. Falling back to text rendering. To enable full math rendering features, please install "katex".',e)}return e=>{var t,n,o,s;return Qt(Bo,tn(yt({},e),{node:{type:"text",content:(n=e.node.raw)!=null?n:`$$${(t=e.node.content)!=null?t:""}$$`,raw:(s=e.node.raw)!=null?s:`$$${(o=e.node.content)!=null?o:""}$$`}}))}})),ui=Vn(et({__name:"ReferenceNode",props:{node:{},messageId:{},threadId:{}},emits:["click","mouseEnter","mouseLeave"],setup:e=>(t,n)=>(k(),M("span",{class:"reference-node cursor-pointer text-xs rounded-md px-1.5 mx-0.5",role:"button",tabindex:"0",onClick:n[0]||(n[0]=o=>t.$emit("click",o,e.node.id,e.messageId,e.threadId)),onMouseenter:n[1]||(n[1]=o=>t.$emit("mouseEnter",o,e.node.id,e.messageId,e.threadId)),onMouseleave:n[2]||(n[2]=o=>t.$emit("mouseLeave",o,e.node.id,e.messageId,e.threadId))},N(e.node.id),33))}),[["__scopeId","data-v-775c65e4"]]);ui.install=e=>{e.component(ui.__name,ui)};const Xle={class:"superscript-node"},Ii=Vn(et({__name:"SuperscriptNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=ls(()=>t.customId),o=F(()=>yt({text:Bo,inline_code:Gs,link:pi,html_inline:Zi,strong:di,emphasis:hi,footnote_reference:Ki,strikethrough:fi,highlight:Gi,insert:$i,subscript:Li,emoji:Ei,math_inline:Zr,reference:ui},n.value));return(s,i)=>(k(),M("sup",Xle,[(k(!0),M(De,null,vt(e.node.children,(r,l)=>(k(),me(p(wl),{key:`${e.indexKey||"superscript"}-${l}`,components:o.value,node:r,"custom-id":t.customId,"index-key":`${e.indexKey||"superscript"}-${l}`,"fallback-to-text":""},null,8,["components","node","custom-id","index-key"]))),128))]))}}),[["__scopeId","data-v-24160b22"]]);Ii.install=e=>{e.component(Ii.__name,Ii)};const Jle={class:"subscript-node"},Li=Vn(et({__name:"SubscriptNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=ls(()=>t.customId),o=F(()=>yt({text:Bo,inline_code:Gs,link:pi,html_inline:Zi,strong:di,emphasis:hi,footnote_reference:Ki,strikethrough:fi,highlight:Gi,insert:$i,superscript:Ii,emoji:Ei,math_inline:Zr,reference:ui},n.value));return(s,i)=>(k(),M("sub",Jle,[(k(!0),M(De,null,vt(e.node.children,(r,l)=>(k(),me(p(wl),{key:`${e.indexKey||"subscript"}-${l}`,components:o.value,node:r,"custom-id":t.customId,"index-key":`${e.indexKey||"subscript"}-${l}`,"fallback-to-text":""},null,8,["components","node","custom-id","index-key"]))),128))]))}}),[["__scopeId","data-v-197fa13b"]]);Li.install=e=>{e.component(Li.__name,Li)};const Qle={class:"strong-node"},di=Vn(et({__name:"StrongNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=ls(()=>t.customId),o=F(()=>yt({text:Bo,inline_code:Gs,link:pi,html_inline:Zi,emphasis:hi,strikethrough:fi,highlight:Gi,insert:$i,subscript:Li,superscript:Ii,emoji:Ei,footnote_reference:Ki,math_inline:Zr,reference:ui},n.value));return(s,i)=>(k(),M("strong",Qle,[(k(!0),M(De,null,vt(e.node.children,(r,l)=>(k(),me(p(wl),{key:`${e.indexKey||"strong"}-${l}`,components:o.value,node:r,"index-key":`${e.indexKey||"strong"}-${l}`,"custom-id":t.customId},null,8,["components","node","index-key","custom-id"]))),128))]))}}),[["__scopeId","data-v-a8647104"]]);di.install=e=>{e.component(di.__name,di)};const eae={class:"strikethrough-node"},fi=Vn(et({__name:"StrikethroughNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=ls(()=>t.customId),o=F(()=>yt({text:Bo,inline_code:Gs,link:pi,html_inline:Zi,strong:di,emphasis:hi,highlight:Gi,insert:$i,subscript:Li,superscript:Ii,emoji:Ei,footnote_reference:Ki,math_inline:Zr,reference:ui},n.value));return(s,i)=>(k(),M("del",eae,[(k(!0),M(De,null,vt(e.node.children,(r,l)=>(k(),me(p(wl),{key:`${e.indexKey||"strikethrough"}-${l}`,components:o.value,node:r,"custom-id":t.customId,"index-key":`${e.indexKey||"strikethrough"}-${l}`},null,8,["components","node","custom-id","index-key"]))),128))]))}}),[["__scopeId","data-v-b7a531fa"]]);fi.install=e=>{e.component(fi.__name,fi)};const tae=["href","title","aria-label","aria-hidden","target","rel"],nae=["aria-hidden"],oae={class:"link-text-wrapper relative inline-flex"},sae={class:"leading-[normal] link-text"},pi=Vn(et({__name:"LinkNode",props:{node:{},indexKey:{},customId:{},showTooltip:{type:Boolean,default:!0},color:{},underlineHeight:{},underlineBottom:{},animationDuration:{},animationOpacity:{},animationTiming:{},animationIteration:{}},setup(e){const t=e,n=dn("markstreamShowTooltips",void 0),o=F(()=>{const _=n?.value;return typeof _=="boolean"?_:t.showTooltip}),s=F(()=>{var _,v,y,w,x;const A=t.underlineBottom!==void 0?typeof t.underlineBottom=="number"?`${t.underlineBottom}px`:String(t.underlineBottom):"-3px",L=(_=t.animationOpacity)!=null?_:.35,S=Math.max(.12,Math.min(.5*L,L)),T={"--underline-height":`${(v=t.underlineHeight)!=null?v:2}px`,"--underline-bottom":A,"--underline-opacity":String(L),"--underline-rest-opacity":String(S),"--underline-duration":`${(y=t.animationDuration)!=null?y:1.6}s`,"--underline-timing":(w=t.animationTiming)!=null?w:"ease-in-out","--underline-iteration":typeof t.animationIteration=="number"?String(t.animationIteration):(x=t.animationIteration)!=null?x:"infinite"};return t.color&&(T["--link-color"]=t.color),T}),i=ls(()=>t.customId),r=F(()=>yt({text:Bo,strong:di,strikethrough:fi,emphasis:hi,image:za,html_inline:Zi,inline_code:Gs},i.value)),l=cf(),a=F(()=>{var _,v;const y=(_=t.node)==null?void 0:_.attrs;if(!y||typeof y!="object")return{};const w={};if(Array.isArray(y))for(const x of y)Array.isArray(x)&&x[0]&&(w[String(x[0])]=String((v=x[1])!=null?v:""));else for(const[x,A]of Object.entries(y))x&&A!=null&&A!==!1&&(w[x]=A===!0?"":String(A));return Fw(w,"safe","a")}),c=F(()=>yt(yt({},l),a.value)),u=F(()=>{var _,v;return Fw({href:String((v=(_=t.node)==null?void 0:_.href)!=null?v:"")},"safe","a").href}),d=F(()=>{if(!u.value)return;const _=c.value.target;return(typeof _=="string"?_.trim():String(_??"").trim())||(Qee(u.value)?"_blank":void 0)}),f=F(()=>{var _;return String((_=d.value)!=null?_:"").trim().toLowerCase()==="_blank"}),h=F(()=>{if(!u.value)return;const _=c.value.rel,v=new Set((typeof _=="string"?_:String(_??"")).split(/\s+/).filter(Boolean)),y=new Set(Array.from(v).filter(w=>w.toLowerCase()!=="opener"));return f.value&&(y.add("noopener"),y.add("noreferrer")),y.size>0?Array.from(y).join(" "):void 0}),m=F(()=>{const _=yt({},c.value);return delete _.title,delete _.href,delete _.target,delete _.rel,_});function g(){o.value&&_le()}const b=F(()=>{var _,v;const y=(_=t.node)==null?void 0:_.title;return typeof y=="string"&&y.trim().length>0?y:String((v=u.value)!=null?v:"")});return(_,v)=>{var y,w;return e.node.loading?(k(),M("span",Nn({key:1,class:"link-loading inline-flex items-baseline gap-1.5","aria-hidden":e.node.loading?"false":"true"},p(l),{style:s.value}),[C("span",oae,[C("span",sae,[q(p(Bo),{class:"leading-[normal] link-text",node:{type:"text",content:String((y=e.node.text)!=null?y:""),raw:String((w=e.node.text)!=null?w:"")},"index-key":`${e.indexKey||"link-text"}-loading`},null,8,["node","index-key"])]),v[1]||(v[1]=C("span",{class:"link-loading-indicator","aria-hidden":"true"},null,-1))])],16,nae)):(k(),M("a",Nn({key:0,class:"link-node",href:u.value,title:o.value?"":b.value,"aria-label":`Link: ${b.value}`,"aria-hidden":e.node.loading?"true":"false",target:d.value,rel:h.value},m.value,{style:s.value,onMouseenter:v[0]||(v[0]=x=>(function(A){var L,S,T,R;if(!o.value)return;const B=A,I=B?.clientX!=null&&B?.clientY!=null?{x:B.clientX,y:B.clientY}:void 0,$=((L=t.node)==null?void 0:L.title)||((S=u.value)!=null&&S.includes("xn--")&&((R=(T=t.node)==null?void 0:T.text)!=null&&R.includes("://"))?t.node.text:u.value)||"";wle(A.currentTarget,$,"top",!1,I)})(x)),onMouseleave:g}),[(k(!0),M(De,null,vt(e.node.children,(x,A)=>(k(),me(p(wl),{key:`${e.indexKey||"emphasis"}-${A}`,components:r.value,node:x,"custom-id":t.customId,"index-key":`${e.indexKey||"link-text"}-${A}`},null,8,["components","node","custom-id","index-key"]))),128))],16,tae))}}}),[["__scopeId","data-v-367e6ca4"]]);pi.install=e=>{e.component(pi.__name,pi)};const iae={class:"insert-node"},$i=Vn(et({__name:"InsertNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=ls(()=>t.customId),o=F(()=>yt({text:Bo,inline_code:Gs,link:pi,html_inline:Zi,strong:di,emphasis:hi,strikethrough:fi,highlight:Gi,subscript:Li,superscript:Ii,emoji:Ei,footnote_reference:Ki,math_inline:Zr,reference:ui},n.value));return(s,i)=>(k(),M("ins",iae,[(k(!0),M(De,null,vt(e.node.children,(r,l)=>(k(),me(p(wl),{key:`${e.indexKey||"insert"}-${l}`,components:o.value,node:r,"custom-id":t.customId,"index-key":`${e.indexKey||"insert"}-${l}`},null,8,["components","node","custom-id","index-key"]))),128))]))}}),[["__scopeId","data-v-1e2c29d4"]]);$i.install=e=>{e.component($i.__name,$i)};const rae={class:"highlight-node"},Gi=Vn(et({__name:"HighlightNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=ls(()=>t.customId),o=F(()=>yt({text:Bo,inline_code:Gs,link:pi,html_inline:Zi,strong:di,emphasis:hi,strikethrough:fi,insert:$i,subscript:Li,superscript:Ii,emoji:Ei,footnote_reference:Ki,math_inline:Zr,reference:ui},n.value));return(s,i)=>(k(),M("mark",rae,[(k(!0),M(De,null,vt(e.node.children,(r,l)=>(k(),me(p(wl),{key:`${e.indexKey||"highlight"}-${l}`,components:o.value,node:r,"custom-id":t.customId,"index-key":`${e.indexKey||"highlight"}-${l}`},null,8,["components","node","custom-id","index-key"]))),128))]))}}),[["__scopeId","data-v-7a62982a"]]);Gi.install=e=>{e.component(Gi.__name,Gi)};const lae={class:"emphasis-node"},hi=Vn(et({__name:"EmphasisNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=ls(()=>t.customId),o=F(()=>yt({text:Bo,inline_code:Gs,link:pi,html_inline:Zi,strong:di,strikethrough:fi,highlight:Gi,insert:$i,subscript:Li,superscript:Ii,emoji:Ei,footnote_reference:Ki,math_inline:Zr,reference:ui},n.value));return(s,i)=>(k(),M("em",lae,[(k(!0),M(De,null,vt(e.node.children,(r,l)=>(k(),me(p(wl),{key:`${e.indexKey||"emphasis"}-${l}`,components:o.value,node:r,"custom-id":t.customId,"index-key":`${e.indexKey||"emphasis"}-${l}`},null,8,["components","node","custom-id","index-key"]))),128))]))}}),[["__scopeId","data-v-2a5aafbf"]]);hi.install=e=>{e.component(hi.__name,hi)};const aae={class:"hard-break"},Wa=Vn(et({__name:"HardBreakNode",props:{node:{}},setup:e=>(t,n)=>(k(),M("br",aae))}),[["__scopeId","data-v-50c58f70"]]);Wa.install=e=>{e.component(Wa.__name,Wa)};const _p=et({__name:"SimpleInlineRenderer",props:{nodes:{},customId:{},indexKey:{}},setup(e){const t=e,n=wt({checkbox:qi,checkbox_input:qi,emoji:Ei,emphasis:hi,hardbreak:Wa,highlight:Gi,inline_code:Gs,insert:$i,link:pi,reference:ui,strikethrough:fi,strong:di,subscript:Li,superscript:Ii,text:Bo}),o=ls(()=>t.customId),s=F(()=>{const i=o.value;return Object.keys(i).length>0?yt(yt({},n),i):n});return(i,r)=>(k(!0),M(De,null,vt(e.nodes,(l,a)=>(k(),me(p(wl),{key:a,components:s.value,node:l,"custom-id":t.customId,"index-key":`${e.indexKey||"inline"}-${a}`},null,8,["components","node","custom-id","index-key"]))),128))}});function P3(e){if(!e||typeof e!="object")return!1;const t=`|${e.type}|`;if(!"|checkbox|checkbox_input|emoji|emphasis|hardbreak|highlight|inline_code|insert|link|reference|strikethrough|strong|subscript|superscript|text|".includes(t))return!1;if(!"|emphasis|highlight|insert|link|strikethrough|strong|subscript|superscript|".includes(t))return!0;const n=e.children;return Array.isArray(n)&&n.every(P3)}function tg(e,t=!0,n=!1){if(!e||!n&&e.length===0)return null;if(e.every(P3))return e;if(!t||e.length!==1)return null;const o=e[0];if(o?.type!=="paragraph"||!Array.isArray(o.children))return null;const s=o.children;return(n||s.length>0)&&s.every(P3)?s:null}function mu(e){var t,n;if(!e?.length)return null;let o="";for(const s of e){if(s?.type!=="text"||s.center===!0)return null;o+=String((n=(t=s.content)!=null?t:s.raw)!=null?n:"")}return o}const cae=["cite"],uae={key:0,dir:"auto",class:"paragraph-node"},dae=["custom-id"],jh=Vn(et({__name:"BlockquoteNode",props:{node:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},customId:{},showTooltips:{type:Boolean}},emits:["copy"],setup(e){const t=e,n=ls(()=>t.customId),o=F(()=>!!n.value.paragraph),s=F(()=>!!n.value.text),i=F(()=>tg(t.node.children,!o.value)),r=F(()=>t.fade!==!1||s.value?null:mu(i.value));return Wn("markstreamShowTooltips",F(()=>t.showTooltips)),Wn("markstreamFade",F(()=>t.fade)),(l,a)=>(k(),M("blockquote",{class:"blockquote blockquote-node",dir:"auto",cite:e.node.cite},[i.value?(k(),M("p",uae,[r.value!==null?(k(),M("span",{key:0,class:"text-node","custom-id":t.customId},N(r.value),9,dae)):(k(),me(p(_p),{key:1,nodes:i.value,"custom-id":t.customId,"index-key":`blockquote-${t.indexKey}-paragraph`},null,8,["nodes","custom-id","index-key"]))])):(k(),me(p(Ni),{key:1,"show-tooltips":t.showTooltips,"index-key":`blockquote-${t.indexKey}`,nodes:t.node.children||[],"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,onCopy:a[0]||(a[0]=c=>l.$emit("copy",c))},null,8,["show-tooltips","index-key","nodes","custom-id","typewriter","fade"]))],8,cae))}}),[["__scopeId","data-v-abfecebc"]]);jh.install=e=>{e.component(jh.__name,jh)};const fae={class:"definition-list"},pae={class:"definition-term"},hae={class:"definition-desc"},Vh=Vn(et({__name:"DefinitionListNode",props:{node:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},emits:["copy"],setup(e){const t=e;return(n,o)=>(k(),M("dl",fae,[(k(!0),M(De,null,vt(t.node.items,(s,i)=>(k(),M(De,{key:i},[C("dt",pae,[q(p(Ni),{"index-key":`definition-term-${t.indexKey}-${i}`,nodes:s.term,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,onCopy:o[0]||(o[0]=r=>n.$emit("copy",r))},null,8,["index-key","nodes","custom-id","typewriter","fade"])]),C("dd",hae,[q(p(Ni),{"index-key":`definition-desc-${t.indexKey}-${i}`,nodes:s.definition,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,onCopy:o[1]||(o[1]=r=>n.$emit("copy",r))},null,8,["index-key","nodes","custom-id","typewriter","fade"])])],64))),128))]))}}),[["__scopeId","data-v-4e103b30"]]);Vh.install=e=>{e.component(Vh.__name,Vh)};const mae=["href","title"],j1=Vn(et({__name:"FootnoteAnchorNode",props:{node:{}},setup(e){const t=e;function n(o){var s;if(o.preventDefault(),typeof document>"u")return;const i=`fnref-${String((s=t.node.id)!=null?s:"")}`,r=document.getElementById(i);r&&r.scrollIntoView({behavior:"smooth",block:"center"})}return(o,s)=>(k(),M("a",{class:"footnote-anchor text-sm hover:underline cursor-pointer",href:`#fnref-${e.node.id}`,title:`返回引用 ${e.node.id}`,onClick:n}," ↩︎ ",8,mae))}}),[["__scopeId","data-v-e1eb37b6"]]);j1.install=e=>{e.component(j1.__name,j1)};const gae=["id"],vae={class:"flex-1"},qh=et({__name:"FootnoteNode",props:{node:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},emits:["copy"],setup(e){const t=e;return(n,o)=>(k(),M("div",{id:`fnref--${e.node.id}`,class:"footnote-node flex text-sm leading-relaxed border-t border-[var(--footnote-border)] pt-2"},[C("div",vae,[q(p(Ni),{"index-key":`footnote-${t.indexKey}`,nodes:t.node.children,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,onCopy:o[0]||(o[0]=s=>n.$emit("copy",s))},null,8,["index-key","nodes","custom-id","typewriter","fade"])])],8,gae))}});qh.install=e=>{e.component(qh.__name,qh)};const yae=["custom-id"],D3=Vn(et({__name:"HeadingNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=ls(()=>t.customId),o=dn("markstreamFade",void 0),s=F(()=>o?.value!==!1||n.value.text?null:mu(t.node.children)),i=F(()=>yt({text:Bo,inline_code:Gs,link:pi,image:za,strong:di,emphasis:hi,strikethrough:fi,highlight:Gi,insert:$i,subscript:Li,superscript:Ii,emoji:Ei,checkbox:qi,checkbox_input:qi,footnote_reference:Ki,hardbreak:Wa,math_inline:Zr,reference:ui},n.value));return(r,l)=>(k(),me(fs(`h${e.node.level}`),Nn({class:["heading-node",[`heading-${e.node.level}`]],dir:"auto"},e.node.attrs),{default:be(()=>[s.value!==null?(k(),M("span",{key:0,class:"text-node","custom-id":t.customId},N(s.value),9,yae)):(k(!0),M(De,{key:1},vt(e.node.children,(a,c)=>(k(),me(p(wl),{key:c,components:i.value,"custom-id":t.customId,node:a,"index-key":`${e.indexKey||"heading"}-${c}`},null,8,["components","custom-id","node","index-key"]))),128))]),_:1},16,["class"]))}}),[["__scopeId","data-v-7122dbe1"]]),b2=D3;b2.install=e=>{e.component(D3.__name,D3)};const kae={key:0,dir:"auto",class:"paragraph-node"},bae=["custom-id"],Cae={dir:"auto",class:"paragraph-node"},wae=["custom-id"],Hd=Vn(et({__name:"ListItemNode",props:{node:{},item:{},indexKey:{},customId:{},typewriter:{type:Boolean},fade:{type:Boolean},showTooltips:{type:Boolean},value:{},isDark:{type:Boolean}},emits:["copy"],setup(e){const t=e,n=F(()=>{var h;return(h=t.node)!=null?h:t.item}),o=ls(()=>t.customId),s=F(()=>!!o.value.paragraph),i=F(()=>!!o.value.text),r=F(()=>{var h;return tg((h=n.value)==null?void 0:h.children,!s.value)}),l=F(()=>{var h;if(s.value)return null;const m=(h=n.value)==null?void 0:h.children;if(!Array.isArray(m)||m.length<2)return null;const g=m[0];if(g?.type!=="paragraph"||!Array.isArray(g.children))return null;const b=m.slice(1);if(!b.every(v=>v?.type==="list"))return null;const _=tg([g]);return _?{paragraphChildren:_,nestedLists:b}:null});function a(){return t.fade===!1&&!i.value}const c=F(()=>a()?mu(r.value):null),u=F(()=>{var h;return a()?mu((h=l.value)==null?void 0:h.paragraphChildren):null}),d=Object.freeze({}),f=F(()=>{const{value:h}=t;return typeof h=="number"&&Number.isFinite(h)?{value:h}:d});return Wn("markstreamShowTooltips",F(()=>t.showTooltips)),Wn("markstreamFade",F(()=>t.fade)),(h,m)=>{var g,b;return k(),M("li",Nn({class:"list-item",dir:"auto"},f.value),[r.value?(k(),M("p",kae,[c.value!==null?(k(),M("span",{key:0,class:"text-node","custom-id":t.customId},N(c.value),9,bae)):(k(),me(p(_p),{key:1,nodes:r.value,"custom-id":t.customId,"index-key":`list-item-${t.indexKey}-paragraph`},null,8,["nodes","custom-id","index-key"]))])):l.value?(k(),M(De,{key:1},[C("p",Cae,[u.value!==null?(k(),M("span",{key:0,class:"text-node","custom-id":t.customId},N(u.value),9,wae)):(k(),me(p(_p),{key:1,nodes:l.value.paragraphChildren,"custom-id":t.customId,"index-key":`list-item-${t.indexKey}-paragraph`},null,8,["nodes","custom-id","index-key"]))]),(k(!0),M(De,null,vt(l.value.nestedLists,(_,v)=>(k(),me(p(Ni),{key:v,nodes:[_],"custom-id":t.customId,"index-key":`list-item-${t.indexKey}-nested-${v}`,"show-tooltips":t.showTooltips,typewriter:t.typewriter,fade:t.fade,"is-dark":t.isDark,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0,onCopy:m[0]||(m[0]=y=>h.$emit("copy",y))},null,8,["nodes","custom-id","index-key","show-tooltips","typewriter","fade","is-dark"]))),128))],64)):(k(),me(p(Ni),{key:2,"show-tooltips":t.showTooltips,"index-key":`list-item-${t.indexKey}`,nodes:(b=(g=n.value)==null?void 0:g.children)!=null?b:[],"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,"is-dark":t.isDark,"batch-rendering":!1,onCopy:m[1]||(m[1]=_=>h.$emit("copy",_))},null,8,["show-tooltips","index-key","nodes","custom-id","typewriter","fade","is-dark"]))],16)}}}),[["__scopeId","data-v-617214f9"]]);Hd.install=e=>{e.component(Hd.__name,Hd)};const zd=Vn(et({__name:"ListNode",props:{node:{},customId:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},showTooltips:{type:Boolean},isDark:{type:Boolean}},emits:["copy"],setup(e){const t=ls(()=>e.customId),n=F(()=>t.value.list_item||Hd);return(o,s)=>(k(),me(fs(e.node.ordered?"ol":"ul"),{class:Fe(["list-node",{"list-decimal":e.node.ordered,"list-disc":!e.node.ordered}])},{default:be(()=>[(k(!0),M(De,null,vt(e.node.items,(i,r)=>{var l;return k(),me(fs(n.value),Nn({key:`${e.indexKey||"list"}-${r}`},{ref_for:!0},{showTooltips:e.showTooltips},{node:i,"custom-id":e.customId,"index-key":`${e.indexKey||"list"}-${r}`,typewriter:e.typewriter,fade:e.fade,"is-dark":e.isDark,value:e.node.ordered?((l=e.node.start)!=null?l:1)+r:void 0,onCopy:s[0]||(s[0]=a=>o.$emit("copy",a))}),null,16,["node","custom-id","index-key","typewriter","fade","is-dark","value"])}),128))]),_:1},8,["class"]))}}),[["__scopeId","data-v-99cb95e0"]]);zd.install=e=>{e.component(zd.__name,zd)};const _ae={key:2,class:"html-block-node__raw"},xae=["innerHTML"],Sae={key:1,class:"html-block-node__placeholder"},V1=Vn(et({__name:"HtmlBlockNode",props:{node:{},customId:{},htmlPolicy:{}},setup(e){const t=e,n=dn("markstreamHtmlPolicy",void 0),o=dn("markstreamNestedRendererProps",void 0),s=F(()=>{var I,$;return($=(I=t.htmlPolicy)!=null?I:n?.value)!=null?$:"safe"}),i=F(()=>{var I,$;const D=(I=o?.value)!=null?I:{};return tn(yt({},D),{customId:($=t.customId)!=null?$:D.customId,htmlPolicy:s.value})}),r=Dr({loader:()=>Promise.resolve().then(()=>p5),suspensible:!1}),l=F(()=>{const I=Hh(t.node.attrs,s.value);if(!I)return;const $=H1(I);return Object.keys($).length>0?$:void 0}),a=F(()=>{const I=String(t.node.tag||"").trim(),$=Hh(t.node.attrs,s.value,I);if(!$)return;const D=H1($);return Object.keys(D).length>0?D:void 0}),c=ls(()=>t.customId),u=et({name:"DynamicRenderer",props:{nodes:{type:Array,required:!0}},render(){return this.nodes}}),d=K(null),f=K(typeof window>"u"),h=K(t.node.content),m=F(()=>Array.isArray(t.node.children)?t.node.children:[]),g=F(()=>String(t.node.tag||"div")),b=F(()=>{var I;if(g.value.trim().toLowerCase()!=="details"||(I=t.node.attrs)!=null&&I.some(([D])=>String(D).toLowerCase()==="open"))return null;const $=m.value[0];return $?.type==="html_block"&&String($.tag||"").toLowerCase()==="summary"?$:null}),_=F(()=>{var I;return mu((I=b.value)==null?void 0:I.children)}),v=F(()=>{const I=b.value;if(!I)return;const $=Hh(I.attrs,s.value,"summary");if(!$)return;const D=H1($);return Object.keys(D).length>0?D:void 0}),y=F(()=>_.value==null?m.value:m.value.slice(1)),w=F(()=>{const I=g.value.trim().toLowerCase();return zE.has(I)||Z8(I,s.value)}),x=F(()=>m.value.length>0&&!!t.node.tag&&!w.value),A=F(()=>{var I,$,D;if(x.value)return{mode:"structured"};if(!f.value)return{mode:"html",content:(I=h.value)!=null?I:""};const H=($=h.value)!=null?$:t.node.content;if(!H)return{mode:"html",content:""};if(s.value==="escape")return{mode:"html",content:Bd(H,s.value)};if(t.node.loading){const P=Qm(H,c.value,s.value);return P===null?{mode:"text",content:(D=t.node.raw)!=null?D:H}:{mode:"dynamic",nodes:P}}if(!fL(H,c.value))return{mode:"html",content:Bd(H,s.value)};const O=Qm(H,c.value,s.value);return O===null?{mode:"html",content:Bd(H,s.value)}:{mode:"dynamic",nodes:O}}),L=n5(),S=e5(),T=t5(),R=Kr(null),B=!!t.node.loading;return typeof window<"u"?(Je([()=>d.value,()=>S?.value.heavyBlockMargin,()=>S?.value.rootMargin],([I],$,D)=>{var H,O,P,z;if((O=(H=R.value)==null?void 0:H.destroy)==null||O.call(H),R.value=null,!B)return f.value=!0,void(h.value=t.node.content);if(!I)return void(f.value=!1);let W=!0;const U=(z=(P=S?.value.heavyBlockMargin)!=null?P:S?.value.rootMargin)!=null?z:hu,G=L(I,{rootMargin:U,allowIdle:!T.value});R.value=G,f.value=f.value||G.isVisible.value,G.whenVisible.then(()=>{W&&R.value===G&&(f.value=!0)}),D(()=>{W=!1,G.destroy(),R.value===G&&(R.value=null)})},{immediate:!0}),Je(()=>t.node.content,I=>{B&&!f.value||(h.value=I)})):f.value=!0,Dn(()=>{var I,$;($=(I=R.value)==null?void 0:I.destroy)==null||$.call(I),R.value=null}),(I,$)=>(k(),me(fs(x.value?g.value:"div"),Nn({ref_key:"htmlRef",ref:d,class:"html-block-node","data-markstream-viewport-pending":p(T)&&!f.value?"true":void 0},x.value?a.value:void 0),{default:be(()=>[f.value?(k(),M(De,{key:0},[A.value.mode==="structured"?(k(),M(De,{key:0},[_.value!==null?(k(),M(De,{key:0},[C("summary",oF(bA(v.value)),N(_.value),17),y.value.length?(k(),me(p(r),Nn({key:0},i.value,{nodes:y.value,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes"])):te("",!0)],64)):(k(),me(p(r),Nn({key:1},i.value,{nodes:m.value,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes"]))],64)):A.value.mode==="dynamic"?(k(),me(p(u),{key:1,nodes:A.value.nodes},null,8,["nodes"])):A.value.mode==="text"?(k(),M("pre",_ae,N(A.value.content),1)):(k(),M("div",Nn({key:3},l.value,{innerHTML:A.value.content}),null,16,xae))],64)):(k(),M("div",Sae,[Cn(I.$slots,"placeholder",{node:e.node},()=>[$[0]||($[0]=C("span",{class:"html-block-node__placeholder-bar"},null,-1)),$[1]||($[1]=C("span",{class:"html-block-node__placeholder-bar w-4/5"},null,-1)),$[2]||($[2]=C("span",{class:"html-block-node__placeholder-bar w-2/3"},null,-1))],!0)]))]),_:3},16,["data-markstream-viewport-pending"]))}}),[["__scopeId","data-v-e140a874"]]);V1.install=e=>{e.component(V1.__name,V1)};const Aae={dir:"auto",class:"paragraph-node"},Mae=["custom-id"],ru=Vn(et({__name:"ParagraphNode",props:{node:{},customId:{},indexKey:{},customHtmlTags:{},parseOptions:{},customMarkdownIt:{type:Function}},setup(e){const t=e,n=ls(()=>t.customId),o=dn("markstreamHtmlPolicy",void 0),s=dn("markstreamFade",void 0),i=dn("markstreamParseOptions",void 0),r=dn("markstreamCustomMarkdownIt",void 0),l=dn("markstreamNestedRendererProps",void 0),a=F(()=>{var S;return(S=o?.value)!=null?S:"safe"}),c=F(()=>{var S;return(S=t.parseOptions)!=null?S:i?.value}),u=F(()=>{var S;return(S=t.customMarkdownIt)!=null?S:r?.value}),d=F(()=>{var S,T;return(T=t.customHtmlTags)!=null?T:(S=l?.value)==null?void 0:S.customHtmlTags}),f=F(()=>{var S,T;const R=(S=l?.value)!=null?S:{};return tn(yt({},R),{customId:(T=t.customId)!=null?T:R.customId,customHtmlTags:d.value,parseOptions:c.value,customMarkdownIt:u.value,htmlPolicy:a.value})}),h=Dr({loader:()=>Promise.resolve().then(()=>p5),suspensible:!1});function m(S){var T;return S.type==="text"&&String((T=S.content)!=null?T:"").trim()===""}const g=F(()=>t.node.children.filter(S=>!m(S))),b=F(()=>g.value.length>0&&g.value.every(S=>S.type==="image"||(function(T){var R;const B=(function(I){return I.type==="link"&&Array.isArray(I.children)?I.children.filter($=>!m($)):[]})(T);return B.length===1&&((R=B[0])==null?void 0:R.type)==="image"})(S))),_=F(()=>new Set(Au(d.value))),v=F(()=>{if(!b.value||g.value.length<=1)return t.node.children;const S=[];for(let T=0;T0,I=t.node.children.slice(T+1).some($=>!m($));B&&I&&S.push(tn(yt({},R),{content:" ",raw:" "}))}return S}),y=F(()=>s?.value===!1&&!n.value.text),w=F(()=>y.value?mu(v.value):null);function x(S,T){return{node:S,"index-key":`${t.indexKey}-${T}`,"custom-id":t.customId,"custom-html-tags":d.value}}const A=F(()=>yt({inline_code:Gs,image:za,link:pi,hardbreak:Wa,emphasis:hi,strong:di,strikethrough:fi,highlight:Gi,insert:$i,subscript:Li,superscript:Ii,html_inline:Zi,html_block:V1,emoji:Ei,checkbox:qi,math_inline:Zr,checkbox_input:qi,reference:ui,footnote_anchor:j1,footnote_reference:Ki,text:Bo},n.value)),L=F(()=>v.value.map((S,T)=>{var R;const B=(function(I){var $,D,H,O;if(I.type==="html_block"||I.type==="html_inline"){const P=String(($=I.tag)!=null?$:"").trim().toLowerCase()||qE(I.content);if(P&&!_.value.has(P)&&KE((D=I.content)!=null?D:I.raw,P)){const z=String((O=(H=I.content)!=null?H:I.raw)!=null?O:"");return{child:{type:"text",content:z,raw:z},component:Bo,isCustomComponent:!1}}}return{child:I,component:A.value[I.type],isCustomComponent:!!(n.value[I.type]&&!Wp(String(I.type)))}})(S);return tn(yt({},B),{index:T,key:`${t.indexKey||"paragraph"}-${T}`,customAttrs:B.isCustomComponent?Q8(B.child,a.value):void 0,hasSlotChildren:Array.isArray(B.child.children)&&B.child.children.length>0,slotContent:String((R=B.child.content)!=null?R:""),originalChild:S})}));return(S,T)=>(k(),M("p",Aae,[w.value!==null?(k(),M("span",{key:0,class:"text-node","custom-id":t.customId},N(w.value),9,Mae)):(k(!0),M(De,{key:1},vt(L.value,R=>{return k(),M(De,{key:R.key},[b.value&&m(R.originalChild)?(k(),M(De,{key:0},[Ve(N((B=R.originalChild,String((I=B.content)!=null?I:""))),1)],64)):R.isCustomComponent?(k(),me(fs(R.component),Nn({key:1,ref_for:!0},R.customAttrs,{node:R.child,loading:R.child.loading,"index-key":R.key,"custom-id":t.customId,"custom-html-tags":d.value,"is-dark":f.value.isDark}),{default:be(()=>[R.hasSlotChildren?(k(),me(p(h),Nn({key:0,ref_for:!0},f.value,{nodes:R.child.children,"index-key":R.key,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes","index-key"])):R.slotContent?(k(),me(p(h),Nn({key:1,ref_for:!0},f.value,{content:R.slotContent,final:!R.child.loading,"index-key":`${R.key}-content`,"smooth-streaming":!1,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["content","final","index-key"])):te("",!0)]),_:2},1040,["node","loading","index-key","custom-id","custom-html-tags","is-dark"])):(k(),me(fs(R.component),Nn({key:2,ref_for:!0},x(R.child,R.index)),null,16))],64);var B,I}),128))]))}}),[["__scopeId","data-v-c59ff506"]]);ru.install=e=>{e.component(ru.__name,ru)};const Tae={class:"table-node-wrapper"},Eae=["aria-busy"],Iae={key:0},Lae=["custom-id"],$ae=["aria-label","onPointerdown"],Nae=["custom-id"],Oae={key:0,class:"table-node__loading",role:"status","aria-live":"polite"},q1=Vn(et({__name:"TableNode",props:{node:{},indexKey:{},isDark:{type:Boolean},typewriter:{type:Boolean},fade:{type:Boolean},customId:{},showTooltips:{type:Boolean}},emits:["copy"],setup(e){const t=e,n=F(()=>{var _;return(_=t.node.loading)!=null&&_}),o=F(()=>{var _;return(_=t.node.rows)!=null?_:[]}),s=K(null),i=K([]);let r=null;const l=F(()=>t.node.header.cells.length),a=F(()=>i.value.some(_=>Number.isFinite(_)&&_>0)),c=F(()=>a.value?i.value.map(_=>_>0?{width:`${_}px`}:void 0):[]);Wn("markstreamShowTooltips",F(()=>t.showTooltips)),Wn("markstreamFade",F(()=>t.fade));const u=ls(()=>t.customId),d=F(()=>!!u.value.text),f=F(()=>!!u.value.paragraph),h=new WeakMap;function m(_){const v=t.fade===!1&&!d.value,y=!f.value,w=h.get(_);if(w?.children===_.children&&w.textFastPath===v&&w.paragraphFastPath===y)return w.info;const x=tg(_.children,y,!0),A={simpleChildren:x,plainText:x&&v?mu(x):null};return h.set(_,{children:_.children,textFastPath:v,paragraphFastPath:y,info:A}),A}function g(_){if(!r)return;_.preventDefault();const v=r.startWidth+r.nextStartWidth,y=Math.min(48,Math.floor(v/2)),w=Math.max(y,Math.min(v-y,Math.round(r.startWidth+_.clientX-r.startX))),x=[...r.widths];x[r.index]=w,x[r.index+1]=v-w,i.value=x}function b(){r&&(window.removeEventListener("pointermove",g),window.removeEventListener("pointerup",b),window.removeEventListener("pointercancel",b),r=null)}return Je(l,()=>{b(),i.value=[]}),Dn(b),(_,v)=>(k(),M("div",Tae,[C("table",{ref_key:"tableRef",ref:s,class:Fe(["table-node",{"table-node--loading":n.value}]),"aria-busy":n.value},[a.value?(k(),M("colgroup",Iae,[(k(!0),M(De,null,vt(e.node.header.cells,(y,w)=>(k(),M("col",{key:w,style:Gt(c.value[w])},null,4))),128))])):te("",!0),C("thead",null,[C("tr",null,[(k(!0),M(De,null,vt(e.node.header.cells,(y,w)=>(k(),M("th",{key:w,dir:"auto",class:Fe([y.align==="right"?"text-right":y.align==="center"?"text-center":"text-left"])},[m(y).plainText!==null?(k(),M("span",{key:0,class:"text-node","custom-id":t.customId},N(m(y).plainText),9,Lae)):m(y).simpleChildren?(k(),me(p(_p),{key:1,nodes:m(y).simpleChildren,"custom-id":t.customId,"index-key":`table-th-${t.indexKey}-${w}`},null,8,["nodes","custom-id","index-key"])):(k(),me(p(Ni),{key:2,nodes:y.children,"index-key":`table-th-${t.indexKey}`,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,"show-tooltips":t.showTooltips,onCopy:v[0]||(v[0]=x=>_.$emit("copy",x))},null,8,["nodes","index-key","custom-id","typewriter","fade","show-tooltips"])),w(function(A,L){if(L.button!==0)return;const S=(function(){var B;const I=(B=s.value)==null?void 0:B.querySelectorAll("thead th");return Array.from(I??[],$=>Math.round($.getBoundingClientRect().width))})(),T=S[A],R=S[A+1];T&&R&&(L.preventDefault(),r={index:A,startX:L.clientX,startWidth:T,nextStartWidth:R,widths:S},i.value=S,window.addEventListener("pointermove",g),window.addEventListener("pointerup",b),window.addEventListener("pointercancel",b))})(w,x)},null,40,$ae)):te("",!0)],2))),128))])]),C("tbody",null,[(k(!0),M(De,null,vt(o.value,(y,w)=>(k(),M("tr",{key:w},[(k(!0),M(De,null,vt(y.cells,(x,A)=>(k(),M("td",{key:A,class:Fe([x.align==="right"?"text-right":x.align==="center"?"text-center":"text-left"]),dir:"auto"},[m(x).plainText!==null?(k(),M("span",{key:0,class:"text-node","custom-id":t.customId},N(m(x).plainText),9,Nae)):m(x).simpleChildren?(k(),me(p(_p),{key:1,nodes:m(x).simpleChildren,"custom-id":t.customId,"index-key":`table-td-${t.indexKey}-${w}-${A}`},null,8,["nodes","custom-id","index-key"])):(k(),me(p(Ni),{key:2,nodes:x.children,"index-key":`table-td-${t.indexKey}`,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,"show-tooltips":t.showTooltips,onCopy:v[1]||(v[1]=L=>_.$emit("copy",L))},null,8,["nodes","index-key","custom-id","typewriter","fade","show-tooltips"]))],2))),128))]))),128))])],10,Eae),q(gs,{name:"table-node-fade"},{default:be(()=>[n.value?(k(),M("div",Oae,[Cn(_.$slots,"loading",{isLoading:n.value},()=>[v[2]||(v[2]=C("span",{class:"table-node__spinner animate-spin","aria-hidden":"true"},null,-1)),v[3]||(v[3]=C("span",{class:"sr-only"},"Loading",-1))],!0)])):te("",!0)]),_:3})]))}}),[["__scopeId","data-v-39f87b5d"]]);q1.install=e=>{e.component(q1.__name,q1)};const Fae={class:"hr-node"},Kh=Vn({},[["render",function(e,t){return k(),M("hr",Fae)}],["__scopeId","data-v-39b2349c"]]);Kh.install=e=>{e.component(Kh.__name,Kh)};const Rae={class:"unknown-node"},B3=et({__name:"FallbackComponent",props:{node:{}},setup:e=>(t,n)=>(k(),M("div",Rae,N(e.node.raw),1))}),Zh=Vn(et({__name:"VmrContainerNode",props:{node:{},indexKey:{},isDark:{type:Boolean},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},setup(e){const t=e,n=F(()=>`vmr-container vmr-container-${t.node.name}`),o=ls(()=>t.customId),s=F(()=>yt({text:Bo,paragraph:ru,heading:b2,inline_code:Gs,link:pi,image:za,strong:di,emphasis:hi,strikethrough:fi,insert:$i,subscript:Li,superscript:Ii,checkbox:qi,checkbox_input:qi,hardbreak:Wa,math_inline:Zr,reference:ui,list:zd,math_block:kL,table:q1},o.value));return(i,r)=>(k(),M("div",Nn({class:n.value},e.node.attrs),[(k(!0),M(De,null,vt(e.node.children,(l,a)=>{return k(),me(fs((c=l.type,s.value[c]||B3)),{key:`${e.indexKey||"vmr-container"}-${a}`,"custom-id":t.customId,node:l,"index-key":`${e.indexKey||"vmr-container"}-${a}`,typewriter:t.typewriter,fade:t.fade},null,8,["custom-id","node","index-key","typewriter","fade"]);var c}),128))],16))}}),[["__scopeId","data-v-911e41c4"]]);Zh.install=e=>{e.component(Zh.__name,Zh)};const Pae=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","ON","ON","ET","ET","ET","ON","ON","ON","ON","ON","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","ON","ET","ET","ET","ET","ON","ON","ON","ON","L","ON","ON","BN","ON","ON","ET","ET","EN","EN","ON","L","ON","ON","ON","EN","L","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L"],jw=[[697,698,"ON"],[706,719,"ON"],[722,735,"ON"],[741,749,"ON"],[751,767,"ON"],[768,879,"NSM"],[884,885,"ON"],[894,894,"ON"],[900,901,"ON"],[903,903,"ON"],[1014,1014,"ON"],[1155,1161,"NSM"],[1418,1418,"ON"],[1421,1422,"ON"],[1423,1423,"ET"],[1424,1424,"R"],[1425,1469,"NSM"],[1470,1470,"R"],[1471,1471,"NSM"],[1472,1472,"R"],[1473,1474,"NSM"],[1475,1475,"R"],[1476,1477,"NSM"],[1478,1478,"R"],[1479,1479,"NSM"],[1480,1535,"R"],[1536,1541,"AN"],[1542,1543,"ON"],[1544,1544,"AL"],[1545,1546,"ET"],[1547,1547,"AL"],[1548,1548,"CS"],[1549,1549,"AL"],[1550,1551,"ON"],[1552,1562,"NSM"],[1563,1610,"AL"],[1611,1631,"NSM"],[1632,1641,"AN"],[1642,1642,"ET"],[1643,1644,"AN"],[1645,1647,"AL"],[1648,1648,"NSM"],[1649,1749,"AL"],[1750,1756,"NSM"],[1757,1757,"AN"],[1758,1758,"ON"],[1759,1764,"NSM"],[1765,1766,"AL"],[1767,1768,"NSM"],[1769,1769,"ON"],[1770,1773,"NSM"],[1774,1775,"AL"],[1776,1785,"EN"],[1786,1808,"AL"],[1809,1809,"NSM"],[1810,1839,"AL"],[1840,1866,"NSM"],[1867,1957,"AL"],[1958,1968,"NSM"],[1969,1983,"AL"],[1984,2026,"R"],[2027,2035,"NSM"],[2036,2037,"R"],[2038,2041,"ON"],[2042,2044,"R"],[2045,2045,"NSM"],[2046,2069,"R"],[2070,2073,"NSM"],[2074,2074,"R"],[2075,2083,"NSM"],[2084,2084,"R"],[2085,2087,"NSM"],[2088,2088,"R"],[2089,2093,"NSM"],[2094,2136,"R"],[2137,2139,"NSM"],[2140,2143,"R"],[2144,2191,"AL"],[2192,2193,"AN"],[2194,2198,"AL"],[2199,2207,"NSM"],[2208,2249,"AL"],[2250,2273,"NSM"],[2274,2274,"AN"],[2275,2306,"NSM"],[2362,2362,"NSM"],[2364,2364,"NSM"],[2369,2376,"NSM"],[2381,2381,"NSM"],[2385,2391,"NSM"],[2402,2403,"NSM"],[2433,2433,"NSM"],[2492,2492,"NSM"],[2497,2500,"NSM"],[2509,2509,"NSM"],[2530,2531,"NSM"],[2546,2547,"ET"],[2555,2555,"ET"],[2558,2558,"NSM"],[2561,2562,"NSM"],[2620,2620,"NSM"],[2625,2626,"NSM"],[2631,2632,"NSM"],[2635,2637,"NSM"],[2641,2641,"NSM"],[2672,2673,"NSM"],[2677,2677,"NSM"],[2689,2690,"NSM"],[2748,2748,"NSM"],[2753,2757,"NSM"],[2759,2760,"NSM"],[2765,2765,"NSM"],[2786,2787,"NSM"],[2801,2801,"ET"],[2810,2815,"NSM"],[2817,2817,"NSM"],[2876,2876,"NSM"],[2879,2879,"NSM"],[2881,2884,"NSM"],[2893,2893,"NSM"],[2901,2902,"NSM"],[2914,2915,"NSM"],[2946,2946,"NSM"],[3008,3008,"NSM"],[3021,3021,"NSM"],[3059,3064,"ON"],[3065,3065,"ET"],[3066,3066,"ON"],[3072,3072,"NSM"],[3076,3076,"NSM"],[3132,3132,"NSM"],[3134,3136,"NSM"],[3142,3144,"NSM"],[3146,3149,"NSM"],[3157,3158,"NSM"],[3170,3171,"NSM"],[3192,3198,"ON"],[3201,3201,"NSM"],[3260,3260,"NSM"],[3276,3277,"NSM"],[3298,3299,"NSM"],[3328,3329,"NSM"],[3387,3388,"NSM"],[3393,3396,"NSM"],[3405,3405,"NSM"],[3426,3427,"NSM"],[3457,3457,"NSM"],[3530,3530,"NSM"],[3538,3540,"NSM"],[3542,3542,"NSM"],[3633,3633,"NSM"],[3636,3642,"NSM"],[3647,3647,"ET"],[3655,3662,"NSM"],[3761,3761,"NSM"],[3764,3772,"NSM"],[3784,3790,"NSM"],[3864,3865,"NSM"],[3893,3893,"NSM"],[3895,3895,"NSM"],[3897,3897,"NSM"],[3898,3901,"ON"],[3953,3966,"NSM"],[3968,3972,"NSM"],[3974,3975,"NSM"],[3981,3991,"NSM"],[3993,4028,"NSM"],[4038,4038,"NSM"],[4141,4144,"NSM"],[4146,4151,"NSM"],[4153,4154,"NSM"],[4157,4158,"NSM"],[4184,4185,"NSM"],[4190,4192,"NSM"],[4209,4212,"NSM"],[4226,4226,"NSM"],[4229,4230,"NSM"],[4237,4237,"NSM"],[4253,4253,"NSM"],[4957,4959,"NSM"],[5008,5017,"ON"],[5120,5120,"ON"],[5760,5760,"WS"],[5787,5788,"ON"],[5906,5908,"NSM"],[5938,5939,"NSM"],[5970,5971,"NSM"],[6002,6003,"NSM"],[6068,6069,"NSM"],[6071,6077,"NSM"],[6086,6086,"NSM"],[6089,6099,"NSM"],[6107,6107,"ET"],[6109,6109,"NSM"],[6128,6137,"ON"],[6144,6154,"ON"],[6155,6157,"NSM"],[6158,6158,"BN"],[6159,6159,"NSM"],[6277,6278,"NSM"],[6313,6313,"NSM"],[6432,6434,"NSM"],[6439,6440,"NSM"],[6450,6450,"NSM"],[6457,6459,"NSM"],[6464,6464,"ON"],[6468,6469,"ON"],[6622,6655,"ON"],[6679,6680,"NSM"],[6683,6683,"NSM"],[6742,6742,"NSM"],[6744,6750,"NSM"],[6752,6752,"NSM"],[6754,6754,"NSM"],[6757,6764,"NSM"],[6771,6780,"NSM"],[6783,6783,"NSM"],[6832,6877,"NSM"],[6880,6891,"NSM"],[6912,6915,"NSM"],[6964,6964,"NSM"],[6966,6970,"NSM"],[6972,6972,"NSM"],[6978,6978,"NSM"],[7019,7027,"NSM"],[7040,7041,"NSM"],[7074,7077,"NSM"],[7080,7081,"NSM"],[7083,7085,"NSM"],[7142,7142,"NSM"],[7144,7145,"NSM"],[7149,7149,"NSM"],[7151,7153,"NSM"],[7212,7219,"NSM"],[7222,7223,"NSM"],[7376,7378,"NSM"],[7380,7392,"NSM"],[7394,7400,"NSM"],[7405,7405,"NSM"],[7412,7412,"NSM"],[7416,7417,"NSM"],[7616,7679,"NSM"],[8125,8125,"ON"],[8127,8129,"ON"],[8141,8143,"ON"],[8157,8159,"ON"],[8173,8175,"ON"],[8189,8190,"ON"],[8192,8202,"WS"],[8203,8205,"BN"],[8207,8207,"R"],[8208,8231,"ON"],[8232,8232,"WS"],[8233,8233,"B"],[8234,8238,"BN"],[8239,8239,"CS"],[8240,8244,"ET"],[8245,8259,"ON"],[8260,8260,"CS"],[8261,8286,"ON"],[8287,8287,"WS"],[8288,8303,"BN"],[8304,8304,"EN"],[8308,8313,"EN"],[8314,8315,"ES"],[8316,8318,"ON"],[8320,8329,"EN"],[8330,8331,"ES"],[8332,8334,"ON"],[8352,8399,"ET"],[8400,8432,"NSM"],[8448,8449,"ON"],[8451,8454,"ON"],[8456,8457,"ON"],[8468,8468,"ON"],[8470,8472,"ON"],[8478,8483,"ON"],[8485,8485,"ON"],[8487,8487,"ON"],[8489,8489,"ON"],[8494,8494,"ET"],[8506,8507,"ON"],[8512,8516,"ON"],[8522,8525,"ON"],[8528,8543,"ON"],[8585,8587,"ON"],[8592,8721,"ON"],[8722,8722,"ES"],[8723,8723,"ET"],[8724,9013,"ON"],[9083,9108,"ON"],[9110,9257,"ON"],[9280,9290,"ON"],[9312,9351,"ON"],[9352,9371,"EN"],[9450,9899,"ON"],[9901,10239,"ON"],[10496,11123,"ON"],[11126,11263,"ON"],[11493,11498,"ON"],[11503,11505,"NSM"],[11513,11519,"ON"],[11647,11647,"NSM"],[11744,11775,"NSM"],[11776,11869,"ON"],[11904,11929,"ON"],[11931,12019,"ON"],[12032,12245,"ON"],[12272,12287,"ON"],[12288,12288,"WS"],[12289,12292,"ON"],[12296,12320,"ON"],[12330,12333,"NSM"],[12336,12336,"ON"],[12342,12343,"ON"],[12349,12351,"ON"],[12441,12442,"NSM"],[12443,12444,"ON"],[12448,12448,"ON"],[12539,12539,"ON"],[12736,12773,"ON"],[12783,12783,"ON"],[12829,12830,"ON"],[12880,12895,"ON"],[12924,12926,"ON"],[12977,12991,"ON"],[13004,13007,"ON"],[13175,13178,"ON"],[13278,13279,"ON"],[13311,13311,"ON"],[19904,19967,"ON"],[42128,42182,"ON"],[42509,42511,"ON"],[42607,42610,"NSM"],[42611,42611,"ON"],[42612,42621,"NSM"],[42622,42623,"ON"],[42654,42655,"NSM"],[42736,42737,"NSM"],[42752,42785,"ON"],[42888,42888,"ON"],[43010,43010,"NSM"],[43014,43014,"NSM"],[43019,43019,"NSM"],[43045,43046,"NSM"],[43048,43051,"ON"],[43052,43052,"NSM"],[43064,43065,"ET"],[43124,43127,"ON"],[43204,43205,"NSM"],[43232,43249,"NSM"],[43263,43263,"NSM"],[43302,43309,"NSM"],[43335,43345,"NSM"],[43392,43394,"NSM"],[43443,43443,"NSM"],[43446,43449,"NSM"],[43452,43453,"NSM"],[43493,43493,"NSM"],[43561,43566,"NSM"],[43569,43570,"NSM"],[43573,43574,"NSM"],[43587,43587,"NSM"],[43596,43596,"NSM"],[43644,43644,"NSM"],[43696,43696,"NSM"],[43698,43700,"NSM"],[43703,43704,"NSM"],[43710,43711,"NSM"],[43713,43713,"NSM"],[43756,43757,"NSM"],[43766,43766,"NSM"],[43882,43883,"ON"],[44005,44005,"NSM"],[44008,44008,"NSM"],[44013,44013,"NSM"],[64285,64285,"R"],[64286,64286,"NSM"],[64287,64296,"R"],[64297,64297,"ES"],[64298,64335,"R"],[64336,64450,"AL"],[64451,64466,"ON"],[64467,64829,"AL"],[64830,64847,"ON"],[64848,64911,"AL"],[64912,64913,"ON"],[64914,64967,"AL"],[64968,64975,"ON"],[64976,65007,"BN"],[65008,65020,"AL"],[65021,65023,"ON"],[65024,65039,"NSM"],[65040,65049,"ON"],[65056,65071,"NSM"],[65072,65103,"ON"],[65104,65104,"CS"],[65105,65105,"ON"],[65106,65106,"CS"],[65108,65108,"ON"],[65109,65109,"CS"],[65110,65118,"ON"],[65119,65119,"ET"],[65120,65121,"ON"],[65122,65123,"ES"],[65124,65126,"ON"],[65128,65128,"ON"],[65129,65130,"ET"],[65131,65131,"ON"],[65136,65278,"AL"],[65279,65279,"BN"],[65281,65282,"ON"],[65283,65285,"ET"],[65286,65290,"ON"],[65291,65291,"ES"],[65292,65292,"CS"],[65293,65293,"ES"],[65294,65295,"CS"],[65296,65305,"EN"],[65306,65306,"CS"],[65307,65312,"ON"],[65339,65344,"ON"],[65371,65381,"ON"],[65504,65505,"ET"],[65506,65508,"ON"],[65509,65510,"ET"],[65512,65518,"ON"],[65520,65528,"BN"],[65529,65533,"ON"],[65534,65535,"BN"],[65793,65793,"ON"],[65856,65932,"ON"],[65936,65948,"ON"],[65952,65952,"ON"],[66045,66045,"NSM"],[66272,66272,"NSM"],[66273,66299,"EN"],[66422,66426,"NSM"],[67584,67870,"R"],[67871,67871,"ON"],[67872,68096,"R"],[68097,68099,"NSM"],[68100,68100,"R"],[68101,68102,"NSM"],[68103,68107,"R"],[68108,68111,"NSM"],[68112,68151,"R"],[68152,68154,"NSM"],[68155,68158,"R"],[68159,68159,"NSM"],[68160,68324,"R"],[68325,68326,"NSM"],[68327,68408,"R"],[68409,68415,"ON"],[68416,68863,"R"],[68864,68899,"AL"],[68900,68903,"NSM"],[68904,68911,"AL"],[68912,68921,"AN"],[68922,68927,"AL"],[68928,68937,"AN"],[68938,68968,"R"],[68969,68973,"NSM"],[68974,68974,"ON"],[68975,69215,"R"],[69216,69246,"AN"],[69247,69290,"R"],[69291,69292,"NSM"],[69293,69311,"R"],[69312,69327,"AL"],[69328,69336,"ON"],[69337,69369,"AL"],[69370,69375,"NSM"],[69376,69423,"R"],[69424,69445,"AL"],[69446,69456,"NSM"],[69457,69487,"AL"],[69488,69505,"R"],[69506,69509,"NSM"],[69510,69631,"R"],[69633,69633,"NSM"],[69688,69702,"NSM"],[69714,69733,"ON"],[69744,69744,"NSM"],[69747,69748,"NSM"],[69759,69761,"NSM"],[69811,69814,"NSM"],[69817,69818,"NSM"],[69826,69826,"NSM"],[69888,69890,"NSM"],[69927,69931,"NSM"],[69933,69940,"NSM"],[70003,70003,"NSM"],[70016,70017,"NSM"],[70070,70078,"NSM"],[70089,70092,"NSM"],[70095,70095,"NSM"],[70191,70193,"NSM"],[70196,70196,"NSM"],[70198,70199,"NSM"],[70206,70206,"NSM"],[70209,70209,"NSM"],[70367,70367,"NSM"],[70371,70378,"NSM"],[70400,70401,"NSM"],[70459,70460,"NSM"],[70464,70464,"NSM"],[70502,70508,"NSM"],[70512,70516,"NSM"],[70587,70592,"NSM"],[70606,70606,"NSM"],[70608,70608,"NSM"],[70610,70610,"NSM"],[70625,70626,"NSM"],[70712,70719,"NSM"],[70722,70724,"NSM"],[70726,70726,"NSM"],[70750,70750,"NSM"],[70835,70840,"NSM"],[70842,70842,"NSM"],[70847,70848,"NSM"],[70850,70851,"NSM"],[71090,71093,"NSM"],[71100,71101,"NSM"],[71103,71104,"NSM"],[71132,71133,"NSM"],[71219,71226,"NSM"],[71229,71229,"NSM"],[71231,71232,"NSM"],[71264,71276,"ON"],[71339,71339,"NSM"],[71341,71341,"NSM"],[71344,71349,"NSM"],[71351,71351,"NSM"],[71453,71453,"NSM"],[71455,71455,"NSM"],[71458,71461,"NSM"],[71463,71467,"NSM"],[71727,71735,"NSM"],[71737,71738,"NSM"],[71995,71996,"NSM"],[71998,71998,"NSM"],[72003,72003,"NSM"],[72148,72151,"NSM"],[72154,72155,"NSM"],[72160,72160,"NSM"],[72193,72198,"NSM"],[72201,72202,"NSM"],[72243,72248,"NSM"],[72251,72254,"NSM"],[72263,72263,"NSM"],[72273,72278,"NSM"],[72281,72283,"NSM"],[72330,72342,"NSM"],[72344,72345,"NSM"],[72544,72544,"NSM"],[72546,72548,"NSM"],[72550,72550,"NSM"],[72752,72758,"NSM"],[72760,72765,"NSM"],[72850,72871,"NSM"],[72874,72880,"NSM"],[72882,72883,"NSM"],[72885,72886,"NSM"],[73009,73014,"NSM"],[73018,73018,"NSM"],[73020,73021,"NSM"],[73023,73029,"NSM"],[73031,73031,"NSM"],[73104,73105,"NSM"],[73109,73109,"NSM"],[73111,73111,"NSM"],[73459,73460,"NSM"],[73472,73473,"NSM"],[73526,73530,"NSM"],[73536,73536,"NSM"],[73538,73538,"NSM"],[73562,73562,"NSM"],[73685,73692,"ON"],[73693,73696,"ET"],[73697,73713,"ON"],[78912,78912,"NSM"],[78919,78933,"NSM"],[90398,90409,"NSM"],[90413,90415,"NSM"],[92912,92916,"NSM"],[92976,92982,"NSM"],[94031,94031,"NSM"],[94095,94098,"NSM"],[94178,94178,"ON"],[94180,94180,"NSM"],[113821,113822,"NSM"],[113824,113827,"BN"],[117760,117973,"ON"],[118e3,118009,"EN"],[118010,118012,"ON"],[118016,118451,"ON"],[118458,118480,"ON"],[118496,118512,"ON"],[118528,118573,"NSM"],[118576,118598,"NSM"],[119143,119145,"NSM"],[119155,119162,"BN"],[119163,119170,"NSM"],[119173,119179,"NSM"],[119210,119213,"NSM"],[119273,119274,"ON"],[119296,119361,"ON"],[119362,119364,"NSM"],[119365,119365,"ON"],[119552,119638,"ON"],[120513,120513,"ON"],[120539,120539,"ON"],[120571,120571,"ON"],[120597,120597,"ON"],[120629,120629,"ON"],[120655,120655,"ON"],[120687,120687,"ON"],[120713,120713,"ON"],[120745,120745,"ON"],[120771,120771,"ON"],[120782,120831,"EN"],[121344,121398,"NSM"],[121403,121452,"NSM"],[121461,121461,"NSM"],[121476,121476,"NSM"],[121499,121503,"NSM"],[121505,121519,"NSM"],[122880,122886,"NSM"],[122888,122904,"NSM"],[122907,122913,"NSM"],[122915,122916,"NSM"],[122918,122922,"NSM"],[123023,123023,"NSM"],[123184,123190,"NSM"],[123566,123566,"NSM"],[123628,123631,"NSM"],[123647,123647,"ET"],[124140,124143,"NSM"],[124398,124399,"NSM"],[124643,124643,"NSM"],[124646,124646,"NSM"],[124654,124655,"NSM"],[124661,124661,"NSM"],[124928,125135,"R"],[125136,125142,"NSM"],[125143,125251,"R"],[125252,125258,"NSM"],[125259,126063,"R"],[126064,126143,"AL"],[126144,126207,"R"],[126208,126287,"AL"],[126288,126463,"R"],[126464,126703,"AL"],[126704,126705,"ON"],[126706,126719,"AL"],[126720,126975,"R"],[126976,127019,"ON"],[127024,127123,"ON"],[127136,127150,"ON"],[127153,127167,"ON"],[127169,127183,"ON"],[127185,127221,"ON"],[127232,127242,"EN"],[127243,127247,"ON"],[127279,127279,"ON"],[127338,127343,"ON"],[127405,127405,"ON"],[127584,127589,"ON"],[127744,128728,"ON"],[128732,128748,"ON"],[128752,128764,"ON"],[128768,128985,"ON"],[128992,129003,"ON"],[129008,129008,"ON"],[129024,129035,"ON"],[129040,129095,"ON"],[129104,129113,"ON"],[129120,129159,"ON"],[129168,129197,"ON"],[129200,129211,"ON"],[129216,129217,"ON"],[129232,129240,"ON"],[129280,129623,"ON"],[129632,129645,"ON"],[129648,129660,"ON"],[129664,129674,"ON"],[129678,129734,"ON"],[129736,129736,"ON"],[129741,129756,"ON"],[129759,129770,"ON"],[129775,129784,"ON"],[129792,129938,"ON"],[129940,130031,"ON"],[130032,130041,"EN"],[130042,130042,"ON"],[131070,131071,"BN"],[196606,196607,"BN"],[262142,262143,"BN"],[327678,327679,"BN"],[393214,393215,"BN"],[458750,458751,"BN"],[524286,524287,"BN"],[589822,589823,"BN"],[655358,655359,"BN"],[720894,720895,"BN"],[786430,786431,"BN"],[851966,851967,"BN"],[917502,917759,"BN"],[917760,917999,"NSM"],[918e3,921599,"BN"],[983038,983039,"BN"],[1048574,1048575,"BN"],[1114110,1114111,"BN"]];function Dae(e){if(e<=255)return Pae[e];let t=0,n=jw.length-1;for(;t<=n;){const o=t+n>>1,s=jw[o];if(es[1]))return s[2];t=o+1}}return"L"}const Bae=/[ \t\n\r\f]+/g,Hae=/[\t\n\r\f]| {2,}|^ | $/;let j9=null;const zae=new RegExp("\\p{Script=Arabic}","u"),Qa=new RegExp("\\p{M}","u"),s5=new RegExp("\\p{Nd}","u");function Vw(e){return zae.test(e)}function qw(e){return e>=19968&&e<=40959||e>=13312&&e<=19903||e>=131072&&e<=173791||e>=173824&&e<=177983||e>=177984&&e<=178207||e>=178208&&e<=183983||e>=183984&&e<=191471||e>=191472&&e<=192093||e>=194560&&e<=195103||e>=196608&&e<=201551||e>=201552&&e<=205743||e>=205744&&e<=210041||e>=63744&&e<=64255||e>=12288&&e<=12351||e>=12352&&e<=12447||e>=12448&&e<=12543||e>=12592&&e<=12687||e>=44032&&e<=55215||e>=65280&&e<=65519}function pl(e){for(let t=0;t=55296&&n<=56319&&t+1=56320&&o<=57343){if(qw(o-56320+(n-55296<<10)+65536))return!0;t++;continue}}if(qw(n))return!0}}return!1}const Wae=new Set([" "," ","⁠","\uFEFF"]),Uae=new Set(["-","‐","–","—"]);function bL(e,t){return!((function(n){const o=K1(n);return o!==null&&Wae.has(o)})(e)||t&&((function(n){const o=K1(n);return o!==null&&(i5.has(o)||gu.has(o))})(e)||(function(n){const o=K1(n);return o!==null&&Uae.has(o)})(e)))}const i5=new Set([",",".","!",":",";","?","、","。","・",")","〕","〉","》","」","』","】","〗","〙","〛","ー","々","〻","ゝ","ゞ","ヽ","ヾ"]),C2=new Set(['"',"(","[","{","¡","¿","“","‘","‚","„","«","‹","⸘","(","〔","〈","《","「","『","【","〖","〘","〚"]),r5=new Set(["'","’"]),gu=new Set([".",",","!","?",":",";","،","؛","؟","।","॥","၊","။","၌","၍","၏",")","]","}","%",'"',"”","’","»","›","…"]),jae=new Set([":",".","،","؛"]),Vae=new Set(["၏"]),qae=new Set(["”","’","»","›","」","』","】","》","〉","〕",")"]);function Kae(e){if(l5(e))return!0;let t=!1;for(const n of e)if(gu.has(n)||og(n))t=!0;else if(!t||!Qa.test(n))return!1;return t}function Zae(e){for(const t of e)if(!i5.has(t)&&!gu.has(t))return!1;return e.length>0}function Gae(e){if(l5(e))return!0;for(const t of e)if(!(C2.has(t)||r5.has(t)||Qa.test(t)||og(t)))return!1;return e.length>0}function l5(e){let t=!1;for(const n of e)if(n!=="\\"&&!Qa.test(n)){if(!(C2.has(n)||gu.has(n)||r5.has(n)))return!1;t=!0}return t}function ng(e,t){const n=t-1;if(n<=0)return Math.max(n,0);const o=e.charCodeAt(n);if(o<56320||o>57343)return n;const s=n-1;if(s<0)return n;const i=e.charCodeAt(s);return i>=55296&&i<=56319?s:n}function K1(e){if(e.length===0)return null;const t=ng(e,e.length);return e.slice(t)}const Yae=[36,37,43,43,92,92,162,165,176,177,1423,1423,1545,1547,1642,1642,2046,2047,2546,2547,2553,2555,2801,2801,3065,3065,3449,3449,3647,3647,6107,6107,8240,8247,8279,8279,8352,8399,8451,8451,8457,8457,8470,8470,8722,8723,43064,43064,65020,65020,65129,65130,65284,65285,65504,65505,65509,65510,73693,73696,123647,123647,126124,126124,126128,126128];function og(e){const t=e.codePointAt(0);return t!==void 0&&(function(n,o){for(let s=0;s=o[s]&&n<=o[s+1])return!0;return!1})(t,Yae)}function Xae(e){const t=(function(n){for(const o of n)if(!Qa.test(o))return o;return null})(e);return t!==null&&s5.test(t)}function Jae(e){const t=Array.from(e);let n=t.length;for(;n>0;){const o=t[n-1];if(Qa.test(o))n--;else{if(!C2.has(o)&&!r5.has(o))break;n--}}return n<=0||n===t.length?null:{head:t.slice(0,n).join(""),tail:t.slice(n).join("")}}function Qae(e,t,n){return n!=="text"||t||e.length!==1||e==="-"||e==="—"?null:e}function Kw(e,t,n,o){const s=t[o],i=e[o];if(s==null)return i;const r=n[o];if(i.length===r)return i;const l=s.repeat(r);return e[o]=l,l}function Zw(e,t){return e&&t!==null&&jae.has(t)}function ece(e){const t=K1(e);return t!==null&&Vae.has(t)}function tce(e){if(e.length<2||e[0]!==" ")return null;const t=e.slice(1);return new RegExp("^\\p{M}+$","u").test(t)?{space:" ",marks:t}:null}function H3(e){let t=e.length;for(;t>0;){const n=ng(e,t),o=e.slice(n,t);if(qae.has(o))return!0;if(!gu.has(o))return!1;t=n}return!1}function nce(e,t){if(t.preserveOrdinarySpaces||t.preserveHardBreaks){if(e===" ")return"preserved-space";if(e===" ")return"tab";if(t.preserveHardBreaks&&e===` -`)return"hard-break"}return e===" "?"space":e===" "||e===" "||e==="⁠"||e==="\uFEFF"?"glue":e==="​"?"zero-width-break":e==="­"?"soft-hyphen":"text"}const oce=/[\x20\t\n\xA0\xAD\u200B\u202F\u2060\uFEFF]/;function Nr(e){return e.length===1?e[0]:e.join("")}function sce(e,t){const n=[];for(let o=e.length-1;o>=0;o--)n.push(e[o]);return n.push(t),Nr(n)}function ice(e,t,n,o){if(!oce.test(e))return[{text:e,isWordLike:t,kind:"text",start:n}];const s=[];let i=null,r=[],l=n,a=!1,c=0;for(const u of e){const d=nce(u,o),f=d==="text"&&t;i===null||d!==i||f!==a?(i!==null&&s.push({text:Nr(r),isWordLike:a,kind:i,start:l}),i=d,r=[u],l=n+c,a=f,c+=u.length):(r.push(u),c+=u.length)}return i!==null&&s.push({text:Nr(r),isWordLike:a,kind:i,start:l}),s}function V9(e){return e==="space"||e==="preserved-space"||e==="zero-width-break"||e==="hard-break"}const rce=/^[A-Za-z][A-Za-z0-9+.-]*:$/;function lce(e,t){const n=e.texts[t];return!!n.startsWith("www.")||rce.test(n)&&t+1=33&&n<=47&&n!==45||n>=58&&n<=64&&n!==63||n>=91&&n<=96||n>=123&&n<=126})(t):!fce.has(e)&&!dce.test(e)&&uce.test(e)}function Gw(e){let t=!1;for(const n of e)if(!Qa.test(n)){if(!CL(n))return!1;t=!0}return t}function pce(e,t,n,o){const s=!t&&Gw(e),i=!o&&Gw(n),r=(function(a){const c=(function(u){for(let d=u.length;d>0;){const f=ng(u,d),h=u.slice(f,d);if(!Qa.test(h))return h;d=f}return null})(a);return c!==null&&og(c)})(e),l=(t||r)&&(function(a){for(let c=a.length;c>0;){const u=ng(a,c),d=a.slice(u,c);if(!Qa.test(d))return CL(d)||og(d);c=u}return!1})(e);return!!(s||i||l)&&!pl(e)&&!pl(n)&&(t||s||r)&&(o||i)}function Yw(e){for(const t of e)if(s5.test(t))return!0;return!1}function Gh(e){if(e.length===0)return!1;for(const t of e)if(!s5.test(t)&&!cce.has(t))return!1;return!0}function hce(e,t){if(e.len===0)return[];if(!t.preserveHardBreaks)return[{startSegmentIndex:0,endSegmentIndex:e.len,consumedEndSegmentIndex:e.len}];const n=[];let o=0;for(let s=0;s0&&c.charCodeAt(c.length-1)===32&&(c=c.slice(0,-1)),c})(e);if(i.length===0)return{normalized:i,chunks:[],len:0,texts:[],isWordLike:[],kinds:[],starts:[]};const r=(function(a,c,u){var d,f,h;const m=(j9===null&&(j9=new Intl.Segmenter(void 0,{granularity:"word"})),j9);let g=0;const b=[],_=[],v=[],y=[],w=[],x=[],A=[],L=[],S=[],T=[],R=[],B=[];for(const O of m.segment(a))for(const P of ice(O.segment,(d=O.isWordLike)!=null&&d,O.index,u)){let z=function(){x[oe]!==null&&(_[oe]=[Kw(b,x,A,oe)],x[oe]=null),_[oe].push(P.text),v[oe]=v[oe]||P.isWordLike,L[oe]=L[oe]||G,S[oe]=S[oe]||Z,T[oe]=Q,R[oe]=X,B[oe]=Zw(S[oe],ee)};const W=P.kind==="text",U=Qae(P.text,P.isWordLike,P.kind),G=pl(P.text),Z=Vw(P.text),ee=K1(P.text),Q=H3(P.text),X=ece(P.text),oe=g-1;c.carryCJKAfterClosingQuote&&W&&g>0&&y[oe]==="text"&&G&&L[oe]&&T[oe]||W&&g>0&&y[oe]==="text"&&Zae(P.text)&&L[oe]||W&&g>0&&y[oe]==="text"&&R[oe]?z():W&&g>0&&y[oe]==="text"&&P.isWordLike&&Z&&B[oe]?(z(),v[oe]=!0):U!==null&&g>0&&y[oe]==="text"&&x[oe]===U?A[oe]=((f=A[oe])!=null?f:1)+1:W&&!P.isWordLike&&g>0&&y[oe]==="text"&&!L[oe]&&(Kae(P.text)||P.text==="-"&&v[oe])?z():(b[g]=P.text,_[g]=[P.text],v[g]=P.isWordLike,y[g]=P.kind,w[g]=P.start,x[g]=U,A[g]=U===null?0:1,L[g]=G,S[g]=Z,T[g]=Q,R[g]=X,B[g]=Zw(Z,ee),g++)}for(let O=0;Onull);let $=-1;for(let O=g-1;O>=0;O--){const P=b[O];if(P.length!==0){if(y[O]==="text"&&!v[O]&&$>=0&&y[$]==="text"&&(Gae(P)||P==="-"&&Xae(b[$]))){const z=(h=I[$])!=null?h:[];z.push(P),I[$]=z,w[$]=w[O],b[O]="";continue}$=O}}for(let O=0;OG+1){P.push(Nr(X)),z.push(xe),W.push("text"),U.push(O.starts[G]),G=oe;continue}}P.push(Z),z.push(Q),W.push(ee),U.push(O.starts[G]),G++}return{len:P.length,texts:P,isWordLike:z,kinds:W,starts:U}})((function(O){const P=[],z=[],W=[],U=[];for(let G=0;G1;for(let X=0;X=O.len||V9(O.kinds[ee]))continue;const Q=[],X=O.starts[ee];let oe=ee;for(;oe0&&(P.push(Nr(Q)),z.push(!0),W.push("text"),U.push(X),G=oe-1)}return{len:P.length,texts:P,isWordLike:z,kinds:W,starts:U}})((function(O){const P=O.texts.slice(),z=O.isWordLike.slice(),W=O.kinds.slice(),U=O.starts.slice();for(let Z=0;Z=0&&!bL(c.texts[y-1],u)&&v(y),g<0&&(g=y),b=b||pl(w))}return v(c.len),{len:d.length,texts:d,isWordLike:f,kinds:h,starts:m}})(i,r,t.breakKeepAllAfterPunctuation):r;return yt({normalized:i,chunks:hce(l,s)},l)}let nd=null;const Xw=new Map;let od=null;const gce=new RegExp("\\p{Emoji_Presentation}","u"),vce=/[\p{Emoji_Presentation}\p{Extended_Pictographic}\p{Regional_Indicator}\uFE0F\u20E3]/u;let q9=null;const Jw=new Map;function z3(){if(nd!==null)return nd;if(typeof OffscreenCanvas<"u")return nd=new OffscreenCanvas(1,1).getContext("2d"),nd;if(typeof document<"u")return nd=document.createElement("canvas").getContext("2d"),nd;throw new Error("Text measurement requires OffscreenCanvas or a DOM canvas context.")}function ba(e,t){let n=t.get(e);return n===void 0&&(n={width:z3().measureText(e).width,containsCJK:pl(e)},t.set(e,n)),n}function sg(){if(od!==null)return od;if(typeof navigator>"u")return od={lineFitEpsilon:.005,carryCJKAfterClosingQuote:!1,breakKeepAllAfterPunctuation:!0,preferPrefixWidthsForBreakableRuns:!1,preferEarlySoftHyphenBreak:!1},od;const e=navigator.userAgent,t=navigator.vendor==="Apple Computer, Inc."&&e.includes("Safari/")&&!e.includes("Chrome/")&&!e.includes("Chromium/")&&!e.includes("CriOS/")&&!e.includes("FxiOS/")&&!e.includes("EdgiOS/"),n=e.includes("Chrome/")||e.includes("Chromium/")||e.includes("CriOS/")||e.includes("Edg/");return od={lineFitEpsilon:t?1/64:.005,carryCJKAfterClosingQuote:n,breakKeepAllAfterPunctuation:!t,preferPrefixWidthsForBreakableRuns:t,preferEarlySoftHyphenBreak:t},od}function wL(){return q9===null&&(q9=new Intl.Segmenter(void 0,{granularity:"grapheme"})),q9}function yce(e){return gce.test(e)||e.includes("️")}function Lc(e,t,n){return n===0?t.width:t.width-(function(o,s){return s.emojiCount===void 0&&(s.emojiCount=(function(i){let r=0;const l=wL();for(const a of l.segment(i))yce(a.segment)&&r++;return r})(o)),s.emojiCount})(e,t)*n}function kce(e){return e==="space"||e==="zero-width-break"||e==="soft-hyphen"}function Qw(e){return e==="space"||e==="preserved-space"||e==="tab"||e==="zero-width-break"||e==="soft-hyphen"}function e_(e,t,n=e.widths.length){for(;t0?e.letterSpacing:0}function a5(e,t){return t===0?0:e+t}function wce(e,t,n,o,s){return a5(o,t==="tab"?s+(function(i,r){return i.letterSpacing!==0&&i.spacingGraphemeCounts[r]>0?i.letterSpacing:0})(e,n):e.lineEndFitAdvances[n])}function t_(e,t,n,o){return a5(o,t==="tab"?0:e.lineEndFitAdvances[n])}function n_(e,t,n,o,s){return a5(o,t==="tab"?s:e.lineEndPaintAdvances[n])}function _ce(e,t,n){return e.letterSpacing!==0&&t?n+e.letterSpacing:n}function xce(e,t){return e.letterSpacing===0?t:t+e.letterSpacing}function fh(e,t,n){let o=t;for(;oz){if(ue!==null&&J>j){oe(ae,J,se),ce=J,de=fh(ue,de,ce+1),J=-1,se=0;continue}oe(),pe(ae,ce,he)}else U+=he,Z=ae,ee=ce+1;else pe(ae,ce,he);const Ie=ce+1;ue!==null&&ue[de]===Ie&&(J=Ie,se=U,de++),ce++}G&&Z===ae&&ee===fe.length&&(Z=ae+1,ee=0)}let ne=0;for(;ne=D.length)));){const ae=D[ne],j=Qw(H[ne]);if(G)if(U+ae>z){if(j){ve(ne,ae),oe(ne+1,0,U-ae),ne++;continue}if(Q>=0){if(Z>Q||Z===Q&&ee>0){oe();continue}oe(Q,0,X);continue}if(ae>z&&O[ne]!==null){oe(),ge(ne,0),ne++;continue}oe()}else ve(ne,ae),j&&(Q=ne+1,X=U-ae),ne++;else ae>z&&O[ne]!==null?ge(ne,0):xe(ne,ae),j&&(Q=ne+1,X=U-ae),ne++}return G&&oe(),W})(n,o);const{widths:s,kinds:i,breakableFitAdvances:r,breakablePreferredBreaks:l,discretionaryHyphenWidth:a,chunks:c}=n;if(s.length===0||c.length===0)return 0;const u=sg(),d=o+u.lineFitEpsilon;let f=0,h=0,m=!1,g=0,b=0,_=-1,v=0,y=null;function w(){_=-1,v=0,y=null}function x(I=g,$=b,D){f++,h=0,m=!1,w()}function A(I,$){m=!0,g=I+1,b=0,h=$}function L(I,$,D){m=!0,g=I,b=$+1,h=D}function S(I,$){m?(h+=$,g=I+1,b=0):A(I,$)}function T(I,$,D,H,O,P){if(!$)return;const z=t_(n,I,D,O);n_(n,I,D,O,H),_=D+1,v=h-P+z,y=I}function R(I,$){var D;const H=r[I],O=(D=l[I])!=null?D:null;let P=O===null?-1:fh(O,0,$+1),z=-1,W=$;for(;Wd){if(O!==null&&z>$){x(I,z),W=z,P=fh(O,P,W+1),z=-1;continue}x(),L(I,W,U)}else h=ee,g=I,b=W+1}else L(I,W,U);const G=W+1;O!==null&&O[P]===G&&(z=G,P++),W++}m&&g===I&&b===H.length&&(g=I+1,b=0)}function B(I){f++,w()}for(let I=0;I=$.endSegmentIndex)));){const H=i[D],O=Qw(H),P=Cce(n,m,D),z=H==="tab"?bce(h+P,n.tabStopAdvance):s[D],W=P+z,U=wce(n,H,D,P,z);if(H!=="soft-hyphen")if(m){if(h+U>d){const G=h+t_(n,H,D,P);if(n_(n,H,D,P,z),y==="soft-hyphen"&&u.preferEarlySoftHyphenBreak&&v<=d){x(_,0);continue}if(O&&G<=d){S(D,W),x(D+1,0),D++;continue}if(_>=0&&v<=d){if(g>_||g===_&&b>0){x();continue}const Z=_;x(Z,0),D=Z;continue}if(U>d&&r[D]!==null){x(),R(D,0),D++;continue}x();continue}S(D,W),T(H,O,D,z,P,W),D++}else U>d&&r[D]!==null?R(D,0):A(D,z),T(H,O,D,z,P,W),D++;else m&&(g=D+1,b=0,_=D+1,v=h+a,y=H),D++}m&&($.consumedEndSegmentIndex,x($.consumedEndSegmentIndex,0))}return f})(e,t)}let K9=null;function c5(){return K9===null&&(K9=new Intl.Segmenter(void 0,{granularity:"grapheme"})),K9}function Ace(e,t){const n=[];let o=[],s=0,i=!1,r=!1,l=!1;function a(){o.length!==0&&(n.push({text:o.length===1?o[0]:o.join(""),start:s}),o=[],i=!1,r=!1,l=!1)}function c(d,f,h){o=[d],s=f,i=h,r=H3(d),l=C2.has(d)}function u(d,f){o.push(d),i=i||f;const h=H3(d);r=d.length===1&&gu.has(d)&&r||h,l=!1}for(const d of c5().segment(e)){const f=d.segment,h=pl(f);o.length!==0?l||i5.has(f)||gu.has(f)||t.carryCJKAfterClosingQuote&&h&&r?u(f,h):i||h?(a(),c(f,d.index,h)):u(f,h):c(f,d.index,h)}return a(),n}function Mce(e,t,n){if(t.length<=1)return t;const o=[];let s=-1,i=!1;function r(l){if(!(s<0)){if(i)s+1===l?o.push(t[s]):(function(a,c){const u=t[a].start,d=c=0&&!bL(t[l-1].text,n)&&r(l),s<0&&(s=l),i=i||pl(a.text)}return r(t.length),o}function o_(e,t){if(t==="zero-width-break"||t==="soft-hyphen"||t==="hard-break")return 0;if(t==="tab")return 1;let n=0;const o=c5();for(const s of o.segment(e))n++;return n}function Tce(e){return e==="-"||e==="֊"||e==="‐"||e==="‒"||e==="–"||e==="—"}function Ece(e,t,n,o,s){const i=sg(),{cache:r,emojiCorrection:l}=(function(B,I){z3().font=B;const $=(function(O){let P=Xw.get(O);return P||(P=new Map,Xw.set(O,P)),P})(B),D=(function(O){const P=O.match(/(\d+(?:\.\d+)?)\s*px/);return P?parseFloat(P[1]):16})(B),H=I?(function(O,P){let z=Jw.get(O);if(z!==void 0)return z;const W=z3();W.font=O;const U=W.measureText("😀").width;if(z=0,U>P+.5&&typeof document<"u"&&document.body!==null){const G=document.createElement("span");G.style.font=O,G.style.display="inline-block",G.style.visibility="hidden",G.style.position="absolute",G.textContent="😀",document.body.appendChild(G);const Z=G.getBoundingClientRect().width;document.body.removeChild(G),U-Z>.5&&(z=U-Z)}return Jw.set(O,z),z})(B,D):0;return{cache:$,fontSize:D,emojiCorrection:H}})(t,(a=e.normalized,vce.test(a)));var a;const c=Lc("-",ba("-",r),l)+(s===0?0:2*s),u=8*Lc(" ",ba(" ",r),l),d=s!==0;if(e.len===0)return{widths:[],lineEndFitAdvances:[],lineEndPaintAdvances:[],kinds:[],simpleLineWalkFastPath:!0,segLevels:null,breakableFitAdvances:[],breakablePreferredBreaks:[],letterSpacing:0,spacingGraphemeCounts:[],discretionaryHyphenWidth:0,tabStopAdvance:0,chunks:[]};const f=[],h=[],m=[],g=[];let b=e.chunks.length<=1&&!d;const _=null,v=[],y=[],w=[],x=null,A=Array.from({length:e.len});function L(B,I,$,D,H,O,P,z,W){H!=="text"&&H!=="space"&&H!=="zero-width-break"&&(b=!1),f.push(I),h.push($),m.push(D),g.push(H),v.push(P),y.push(z),d&&w.push(W)}function S(B,I,$,D,H){const O=ba(B,r),P=d?o_(B,I):0,z=(function(Z,ee,Q){return ee>1?Z+(ee-1)*Q:Z})(Lc(B,O,l),P,s),W=I==="space"||I==="preserved-space"||I==="zero-width-break"?0:z,U=W===0?0:W+(P>0?s:0),G=I==="space"||I==="zero-width-break"?0:z;if(H&&D&&B.length>1){let Z="sum-graphemes";s!==0?Z="segment-prefixes":Gh(B)?Z="pair-context":i.preferPrefixWidthsForBreakableRuns&&(Z="segment-prefixes");const ee=(function(X,oe,xe,pe,ve){if(oe.breakableFitAdvances!==void 0&&oe.breakableFitMode===ve)return oe.breakableFitAdvances;oe.breakableFitMode=ve;const ge=wL(),ne=[];for(const fe of ge.segment(X))ne.push(fe.segment);if(ne.length<=1)return oe.breakableFitAdvances=null,oe.breakableFitAdvances;if(ve==="sum-graphemes"){const fe=[];for(const ue of ne){const de=ba(ue,xe);fe.push(Lc(ue,de,pe))}return oe.breakableFitAdvances=fe,oe.breakableFitAdvances}if(ve==="pair-context"||ne.length>96){const fe=[];let ue=null,de=0;for(const J of ne){const se=Lc(J,ba(J,xe),pe);if(ue===null)fe.push(se);else{const ce=ue+J,he=ba(ce,xe);fe.push(Lc(ce,he,pe)-de)}ue=J,de=se}return oe.breakableFitAdvances=fe,oe.breakableFitAdvances}const ae=[];let j="",Y=0;for(const fe of ne){j+=fe;const ue=Lc(j,ba(j,xe),pe);ae.push(ue-Y),Y=ue}return oe.breakableFitAdvances=ae,oe.breakableFitAdvances})(B,O,r,l,Z),Q=ee===null||o==="keep-all"?null:(function(X){if(!/[-\u058A\u2010\u2012\u2013\u2014]/u.test(X))return null;const oe=[];let xe=0;for(const pe of c5().segment(X))xe++,Tce(pe.segment)&&oe.push(xe);return oe.length===0?null:oe})(B);return void L(B,z,U,G,I,$,ee,Q,P)}L(B,z,U,G,I,$,null,null,P)}for(let B=0;B=55296&&X<=56319&&Q+1=56320&&ve<=57343&&(oe=ve-56320+(X-55296<<10)+65536,xe=2)}const pe=Dae(oe);pe!=="R"&&pe!=="AL"&&pe!=="AN"||(z=!0);for(let ve=0;ve=0&&P[X]==="ET";X--)P[X]="EN";for(X=Q+1;X0?P[Q-1]:Z)!=="L"?"R":"L";if(oe===((X{const e=globalThis;if(e[Z9])return e[Z9];const t={configs:{},controllers:{},revision:Kr(0),preparedCache:new Map,blockEstimateCache:new Map};return e[Z9]=t,t})();let Qf=null;const G9=us.revision;function s_(e){var t;return e&&(t=us.configs[e])!=null?t:null}function i_(e,t){const n=Number.parseFloat(String(e??""));return Number.isFinite(n)&&n>0?n:t}function Lce(e){return e?.type==="text"||e?.type==="emoji"||e?.type==="hardbreak"}function Y9(e){var t,n,o;if(!Array.isArray(e)||e.length===0)return null;let s="";for(const i of e){if(!Lce(i))return null;i.type==="text"?s+=String((t=i.content)!=null?t:""):i.type==="emoji"?s+=String((o=(n=i.name)!=null?n:i.raw)!=null?o:""):i.type==="hardbreak"&&(s+=` -`)}return s.length>0?s:null}function X9(e,t,n){var o,s;if(!e||!Number.isFinite(t)||t<=0||!(function(){var i;if(Qf!=null)return Qf;if(typeof document>"u")return!1;try{const r=document.createElement("canvas");return Qf=!!((i=r.getContext)!=null&&i.call(r,"2d")),Qf}catch{return Qf=!1,!1}})())return null;try{const i=Math.round(100*t)/100,r=[(o=n.whiteSpace)!=null?o:"pre-wrap",n.font,n.lineHeight,n.wrapperOverhead,n.widthAdjustment,i,e].join("\0"),l=us.blockEstimateCache.get(r);if(l)return us.blockEstimateCache.delete(r),us.blockEstimateCache.set(r,l),{kind:"simple-text",height:l.height,contentHeight:l.contentHeight};const a=(s=n.whiteSpace)!=null?s:"pre-wrap",c=(function(h,m,g){const b=`${g}\0${m}\0${h}`,_=us.preparedCache.get(b);if(_)return us.preparedCache.delete(b),us.preparedCache.set(b,_),_.prepared;const v=(function(y,w,x){return(function(A,L,S,T){var R,B;const I=(R=T?.wordBreak)!=null?R:"normal",$=(B=T?.letterSpacing)!=null?B:0;return Ece(mce(A,sg(),T?.whiteSpace,I),L,!1,I,$)})(y,w,0,x)})(h,m,{whiteSpace:g});for(us.preparedCache.set(b,{prepared:v});us.preparedCache.size>240;){const y=us.preparedCache.keys().next().value;if(!y)break;us.preparedCache.delete(y)}return v})(e,n.font,a),u=(function(h,m,g){const b=Sce(h,m);return{lineCount:b,height:b*g}})(c,Math.max(24,i-n.widthAdjustment),n.lineHeight),d=Math.max(n.lineHeight,u.height),f=Math.max(n.lineHeight,Math.round(d+n.wrapperOverhead));for(us.blockEstimateCache.set(r,{height:f,contentHeight:Math.round(d)});us.blockEstimateCache.size>4e3;){const h=us.blockEstimateCache.keys().next().value;if(!h)break;us.blockEstimateCache.delete(h)}return{kind:"simple-text",height:f,contentHeight:Math.round(d)}}catch{return null}}function _L(e,t,n){var o,s;if(!n||!e||!Number.isFinite(t)||t<=0)return null;if(e.type==="paragraph"){const i=Y9(e.children);return i&&n.paragraph?X9(i,t,n.paragraph):null}if(e.type==="heading"){const i=Number(e.level||0),r=Y9(e.children),l=n.headings[i];return r&&l?X9(r,t,l):null}if(e.type==="list_item"){const i=Array.isArray(e.children)?e.children:[];if(i.length!==1||((o=i[0])==null?void 0:o.type)!=="paragraph"||!n.listItem)return null;const r=Y9((s=i[0])==null?void 0:s.children);return r?X9(r,t,n.listItem):null}if(e.type==="list"){const i=Array.isArray(e.items)?e.items:[];if(!i.length)return null;let r=Math.max(0,n.listWrapperOverhead);for(const l of i){const a=_L(l,t,n);if(!a)return null;r+=a.height}return{kind:"simple-text",height:Math.max(1,Math.round(r)),contentHeight:Math.max(1,Math.round(r))}}return null}function e1(e){if(!e)return 1;const t=String(e).split(/\r?\n/);return Math.max(1,t.length)}function $c(e,t){const n=String(e??"");return t?n:n.replace(/\r\n$|\n$|\r$/,"")}function J9(e,t,n=0){return e.diff?o5(t??{},n)?(function(o){const s=$c(o.raw);if(s){const i=s.split(/\r?\n/);return o.originalCode!=null||o.updatedCode!=null?Math.max(1,i.filter(r=>!Ice.some(l=>r.startsWith(l))).length):Math.max(1,i.length)}return e1($c(o.originalCode))+e1($c(o.updatedCode))})(e):(function(o){const s=o.originalCode,i=o.updatedCode;if(s!=null||i!=null)return Math.max(e1($c(s)),e1($c(i)));const r=$c(o.code).split(/\r?\n/);let l=0,a=0;for(const c of r)c.startsWith("+")&&!c.startsWith("+++")?a++:c.startsWith("-")&&!c.startsWith("---")?l++:(l++,a++);return Math.max(1,l,a)})(e):e1($c(e.code,e.loading===!0))}function $ce(e){return e?`${e.fontStyle||"normal"} ${e.fontWeight||"400"} ${e.fontSize||"16px"} ${e.fontFamily||"sans-serif"}`:""}function Q9(e,t,n="pre-wrap"){if(!e||!t||typeof window>"u")return null;const o=window.getComputedStyle(t),s=e.offsetHeight,i=i_(o.lineHeight,1.5*i_(o.fontSize,16)),r=e.getBoundingClientRect().width,l=t.getBoundingClientRect().width;return{font:$ce(o),lineHeight:i,wrapperOverhead:Math.max(0,s-i),widthAdjustment:Math.max(0,r-l),whiteSpace:n}}const Nce=new Set(["node","key","ref","ctx","renderNode","indexKey","__proto__","prototype","constructor"]);function r_(e,t={}){var n;const o={},s=new Set((n=t.omit)!=null?n:[]);if(!e||typeof e!="object")return o;const i=Object.getOwnPropertyDescriptors(e);for(const[r,l]of Object.entries(i))Nce.has(r)||s.has(r)||l.enumerable&&"value"in l&&(o[r]=l.value);return o}function l_(e,t,n,o){var s;const i=(function(f){return Math.max(0,Math.ceil(f.scrollHeight||0)-Math.ceil(f.clientHeight||0))})(e),r=(function(f,h){return Number.isFinite(f)?Math.min(Math.max(0,f),h):0})(n,i);if(!o.isReverseFlexScrollRoot(e))return void(e.scrollTop=r);const l=Math.max(0,i-r),a=[-l,l];let c=a[0],u=Number.POSITIVE_INFINITY;for(const f of a){e.scrollTop=f;const h=o.getNormalizedScrollTop(e,t,!1),m=Math.abs(h-r);md&&(e.scrollTop=c)}function a_(e,t){let n=0,o=null,s=null;const i=()=>{const r=s;s=null,o=null,r&&(n=Date.now(),e(...r))};return function(...r){const l=Date.now(),a=t-(l-n);s=r,a<=0?(o&&(clearTimeout(o),o=null),n=l,s=null,e(...r)):o||(o=setTimeout(i,a))}}function c_(e){return e==="simple"?"simple":e===!0||e==="true"||e==="precise"?"precise":"off"}const xL=Symbol("MarkstreamMathBlockMinHeightCache");function hje(){return dn(xL,null)}const Oce=new Set(["text","inline_code","emoji","footnote_reference"]),Fce=new Set(["strong","emphasis","strikethrough","highlight","insert","subscript","superscript","link"]);function t1(e){const t=Number(e);return!Number.isFinite(t)||t<=0?-1:Math.round(t/32)}function Nc(e,t,n,o=22){const s=String(e??"");if(!s)return n;const i=Math.max(18,Math.floor(Math.max(320,t)/8)),r=s.split(/\r?\n/).length,l=Math.ceil(s.length/i),a=Math.max(1,r,l);return Math.max(n,Math.ceil(a*o+12))}function SL(e){var t;if(!e||typeof e!="object")return!1;const n=e,o=String((t=n.type)!=null?t:"");if(Oce.has(o))return!0;if(!Fce.has(o))return!1;const s=n.children;return!Array.isArray(s)||!s.length||s.every(SL)}function W3(e){var t,n,o,s,i,r,l,a;if(!e||typeof e!="object")return"";const c=e,u=String((t=c.type)!=null?t:"");if(u==="text")return String((o=(n=c.content)!=null?n:c.raw)!=null?o:"");if(u==="inline_code")return String((r=(i=(s=c.code)!=null?s:c.content)!=null?i:c.raw)!=null?r:"");if(u==="emoji")return String((a=(l=c.name)!=null?l:c.raw)!=null?a:"");if(typeof c.text=="string")return c.text;const d=[];for(const f of["children","items","cells","rows"]){const h=c[f];if(Array.isArray(h)){const m=h.map(W3).filter(Boolean).join(" ");m&&d.push(m)}}return d.join(" ").replace(/\s+/g," ").trim()}function AL(e){if(!e||typeof e!="object")return!1;const t=e;return t.type==="inline_code"||["children","items","cells","rows"].some(n=>{const o=t[n];return Array.isArray(o)&&o.some(AL)})}function Rce(e,t){if(!e)return 30;const n=Math.max(18,Math.floor(Math.max(320,t)/8)),o=e.split(/\r?\n/).length,s=Math.ceil(e.length/n),i=Math.max(1,o,s);return 30+26*Math.max(0,i-1)}function Pce(e,t){var n,o,s,i,r,l,a,c,u,d,f,h,m,g;if(!e||typeof e!="object")return 32;const b=e,_=String((n=b.type)!=null?n:""),v=Number.isFinite(t)&&t>0?t:640;switch(_){case"heading":return(function(y){var w;const x=Number((w=y.level)!=null?w:y.depth);return x>=4?20:x===3?30:x===2?32:44})(b);case"paragraph":return(function(y,w){const x=String(y??"");if(!x)return 28;const A=Math.max(18,Math.floor(Math.max(320,w)/8)),L=x.split(/\r?\n/).length,S=Math.ceil(x.length/A);return Math.max(1,L,S)<=1?28:Nc(x,w,34)})(String((s=(o=b.raw)!=null?o:b.content)!=null?s:""),v);case"list":return(function(y,w){var x;const A=Array.isArray(y.items)?y.items:[];if(!A.length)return 48;const L=Math.max(48,30*A.length+12);let S=12;for(const B of A)S+=Rce(W3(B)||String((x=B.raw)!=null?x:""),w);const T=Math.max(0,S-L);if(A.length>20){const B=Math.round(2.4*A.length);return Math.round(L+Math.max(B,Math.min(T,3*A.length)))}if(T<=0)return L;const R=A.length>8?8*A.length:T;return Math.round(L+Math.min(T,R))})(b,v);case"list_item":return Nc(String((r=(i=b.raw)!=null?i:b.content)!=null?r:""),v,34);case"blockquote":return Nc(String((a=(l=b.raw)!=null?l:b.content)!=null?a:""),v,56);case"table":return(function(y,w){const x=[...y.header?[y.header]:[],...Array.isArray(y.rows)?y.rows:[]];if(!x.length){const A=Array.isArray(y.children)?y.children.length:3;return Math.max(120,38*A+48)}return Math.max(120,Math.round(4+x.reduce((A,L)=>A+(function(S,T){const R=Math.max(1,S.length),B=Math.max(80,(T-32)/R),I=Math.max(10,Math.floor(B/8)),$=Math.max(1,...S.map(D=>{var H;const O=W3(D)||String((H=D?.raw)!=null?H:"");return Math.ceil(O.length/I)||1}));return 54+34*Math.max(0,$-1)+(R<=3&&S.some(AL)?14:0)})((function(S){var T;return Array.isArray(S?.cells)&&(T=S.cells)!=null?T:[]})(L),w),0)))})(b,v);case"code_block":{const y=String((c=b.language)!=null?c:"").trim().toLowerCase(),w=String((d=(u=b.code)!=null?u:b.raw)!=null?d:"");return y==="mermaid"?Ym(Zm(w)):y==="infographic"?Xm(Gm(w)):Nc(w,v,96,20)}case"math_block":return 72;case"image":return 220;case"admonition":case"vmr_container":case"html_block":return(function(y,w){var x,A,L;const S=y.match(/^\s*]*)>/i);return S&&!/(?:^|\s)open(?:\s|=|$)/i.test((x=S[1])!=null?x:"")?Nc(((L=(A=y.match(/]*>([\s\S]*?)<\/summary>/i))==null?void 0:A[1])==null?void 0:L.replace(/<[^>]*>/g,"").trim())||"Details",w,28,28):Nc(y,w,96)})(String((h=(f=b.raw)!=null?f:b.content)!=null?h:""),v);case"thematic_break":return 24;default:return Nc(String((g=(m=b.raw)!=null?m:b.content)!=null?g:""),v,40)}}function u_(e,t,n){return Math.min(Math.max(e,t),n)}const Dce=["total","cacheHits","appendHits","tailHits","fullParses","chunkedParses"],Bce=["tokenCloneMs","processTokensInputTokens","processTokensReusedTopLevelNodes","processTokensMs","parseMarkdownToStructureTotalMs"],Hce=new Set(["attrs","data","items","header","payload","props","rows","cells","term","definition","sourceMap"]),ML=["raw","content","code","originalCode","updatedCode"],d_=new WeakMap,f_=new WeakMap;let zce=1;function $r(){return typeof performance<"u"?performance.now():Date.now()}function p_(e){const t=e.stream;return t&&typeof t.stats=="function"?t.stats():null}function Ui(e){if(typeof e!="object"&&typeof e!="function"||e===null)return"";const t=e;let n=d_.get(t);return n||(n=zce++,d_.set(t,n)),String(n)}function h_(e,t,n,o={}){var s,i;const r=o.includeFinal!==!1,l={md:Ui(t),customMarkdownIt:Ui(n),requireClosingStrong:e.requireClosingStrong===!0,customHtmlTags:(s=e.customHtmlTags)!=null?s:[],includeSourceMap:e.includeSourceMap===!0,streamParse:(i=e.streamParse)!=null?i:"auto",validateLink:Ui(e.validateLink),preTransformTokens:Ui(e.preTransformTokens),postTransformTokens:Ui(e.postTransformTokens),postTransformNodes:Ui(e.postTransformNodes)};return r&&(l.final=e.final===!0),JSON.stringify(l)}function m_(e){let t=e.length;for(;t>0&&e.charCodeAt(t-1)===10;)t-=1;const n=e.lastIndexOf(` -`,t-1)+1;return e.slice(n,t).trim()}function g_(e){const t=TL(e);return t.length>=2&&t.every(n=>{const o=n.trim();return o.length>=1&&o.replace(/^:/,"").replace(/:$/,"").split("").every(s=>s==="-")})}function TL(e){return e.includes("|")?e.replace(/^\|/,"").replace(/\|$/,"").split("|"):[]}function EL(e){let t=2166136261;for(let n=0;n>>0).toString(36)}function u5(e){const t=String(e??"");return`${t.length}:${EL(t)}`}function U3(e,t=new WeakMap,n=0){if(e==null||typeof e=="number"||typeof e=="boolean")return String(e);if(typeof e=="string")return`s:${(function(r){return r.length<=8192?u5(r):`${r.length}:${EL(r.slice(0,8192))}:truncated`})(e)}`;if(typeof e=="function")return`fn:${Ui(e)}`;if(typeof e!="object")return typeof e;const o=e,s=t.get(o);if(s)return`cycle:${s}`;if(n>=6)return`object:${Ui(o)}`;const i=Ui(o);if(t.set(o,i),Array.isArray(e)){const r=e.slice(0,200);return`a:${e.length}:${r.map(l=>U3(l,t,n+1)).join(",")}`}if(typeof e=="object"){const r=e,l=Object.keys(r).sort(),a=l.slice(0,80);return`o:${l.length}:${a.sort().map(c=>`${c}:${U3(r[c],t,n+1)}`).join(";")}`}return typeof e}function ig(e){return typeof e=="object"&&e!==null&&typeof e.type=="string"&&typeof e.raw=="string"}function IL(e,t=new WeakMap,n=0){return Array.isArray(e)?`a:${e.length}:${e.slice(0,200).map(o=>ig(o)?ec(o,t,n+1):IL(o,t,n+1)).join(",")}`:ig(e)?ec(e,t,n):U3(e,t,n)}function Wce(e,t,n){return Object.keys(e).sort().filter(o=>o!=="children"&&!ML.includes(o)).map(o=>{const s=e[o];return typeof s=="string"?`${o}=s:${u5(s)}`:typeof s=="number"||typeof s=="boolean"||s==null?`${o}=${String(s)}`:typeof s=="function"?`${o}=fn:${Ui(s)}`:Hce.has(o)&&(Array.isArray(s)||typeof s=="object")?`${o}=${IL(s,t,n+1)}`:s&&typeof s=="object"?`${o}=object:${Ui(s)}`:""}).filter(Boolean).join(";")}function Uce(e){return ML.map(t=>{const n=e[t];return typeof n=="string"?`${t}=s:${u5(n)}`:""}).filter(Boolean).join(";")}function ec(e,t=new WeakMap,n=0){const o=f_.get(e);if(o)return o;const s=e,i=t.get(s);if(i)return`node-cycle:${i}`;if(n>=6)return`node:${e.type}:${Ui(s)}`;const r=Ui(s);t.set(s,r);const l=(function(a,c,u){const d=a,f=Array.isArray(d.children)?d.children:[],h=f.length?f.slice(0,200).map(m=>ec(m,c,u+1)).join("|"):"";return[a.type,Uce(d),Wce(d,c,u),f.length,h].join(":")})(e,t,n);return f_.set(s,l),l}function LL(e,t){return ec(e)===ec(t)}function d5(e,t,n){const o=$r(),s=t==="stabilizeSignatureMs"?"stabilizeSignatureCallCount":"primeSignatureCallCount";try{return n()}finally{e[t]+=$r()-o,e[s]+=1,e.signatureMs=e.stabilizeSignatureMs+e.primeSignatureMs,e.signatureCallCount=e.stabilizeSignatureCallCount+e.primeSignatureCallCount}}function v_(e,t,n){return d5(t,n,()=>ec(e))}function $L(e,t,n){return v_(e,n,"stabilizeSignatureMs")===v_(t,n,"stabilizeSignatureMs")}function ph(e){return{reusedNodeCount:0,dirtyStartIndex:e>0?0:-1,stablePrefixNodeCount:0,dirtyTailNodeCount:e}}function y_(e,t,n){return e<0?0:Math.max(t.length,n.length)-e}function k_(e){return e.__markstreamHasCustomParserExtensions===!0||(function(t){var n;return Number((n=t.__markstreamRegisteredPluginCount)!=null?n:0)>0})(e)}function jce(e,t){return e.length===t.length&&e===t}function f5(e,t,n=0){if(n>=4)return null;if(e.type!==t.type)return!1;const o=e,s=t,i=Object.keys(o).filter(u=>u!=="type"&&u!=="children").sort(),r=Object.keys(s).filter(u=>u!=="type"&&u!=="children").sort();if(i.length!==r.length)return!1;for(let u=0;u{o=f5(e,t)}),o??$L(e,t,n)}function Kce(e,t){const n={};for(const o of Dce){const s=e[o],i=t?.[o];typeof s=="number"&&(n[o]=s-(typeof i=="number"?i:0))}return n}function Zce(e,t){var n;const o=gw(t.instanceMsgId),s=new Map,i=(n=t.smoothStreamingEnabled)!=null?n:F(()=>!1),r=K(t.renderContent.value);let l=[],a="",c="",u="",d=!1;const f=(function(){let D="",H=0,O=!1,P=!1,z=!1,W=!1;function U(){D="",H=0,O=!1,P=!1,z=!1,W=!1}function G(Z){let ee=!1;for(let Q=0;Q{if(!Z||!ee.startsWith(Z)||ee.length<=Z.length)return U(),[!0,0];let Q=0;D!==Z&&(U(),G(Z),Q=Z.length);const X=ee.slice(Z.length),oe=G(X);return D=ee,[oe,Q+X.length]}})();let h,m=0,g=0,b=$r(),_=-1,v=0;function y(D){_=Number.isInteger(D)?D:0,v+=1}function w(){h&&(clearTimeout(h),h=void 0)}function x(){w();const D=t.renderContent.value;r.value!==D&&(r.value=D),b=$r()}Je([t.renderContent,t.effectiveFinal,i],([D,H,O])=>{r.value!==D&&(!O||H||(function(P,z){if(!P&&z||z.length<=80||z.length\s*|`{3,}|~{3,})/.test(W))||W.endsWith(` -`)&&!(function(U){const G=m_(U);if(g_(G))return!1;const Z=TL(G);return Z.length>=2&&Z.some(ee=>ee.trim())})(z))})(r.value,D)?x():(function(){if(g+=1,h)return;const P=Math.max(0,(function(z){const W=z.parseCoalesceMs;return typeof W=="number"&&Number.isFinite(W)&&W>=0?W:80})(e)-($r()-b));P<=0?x():h=setTimeout(x,P)})())},{flush:"sync",immediate:!0}),lf(w);const A=F(()=>{var D,H,O,P;return ite(e.customHtmlTags,(D=e.parseOptions)==null?void 0:D.customHtmlTags,(P=(O=(H=t.customComponentsMap)==null?void 0:H.value)!=null?O:{},Object.entries(P).map(([z,W])=>{const U=wr(z);return W==null||!U||Wp(U)||HE.has(U)||Pp.has(U)?"":U}).filter(Boolean)))}),L=F(()=>{const{key:D,tags:H}=rte(A.value);if(!D)return o;const O=s.get(D);if(O)return O;const P=gw(t.instanceMsgId,{customHtmlTags:H});return s.set(D,P),P}),S=F(()=>{const D=L.value;if(!e.customMarkdownIt)return D;const H=e.customMarkdownIt(D);return D.__markstreamHasCustomParserExtensions=!0,H.__markstreamHasCustomParserExtensions=!0,H}),T=F(()=>{var D,H;const O=(D=e.parseOptions)!=null?D:{},P=t.effectiveFinal.value,z=A.value,W=P!=null,U=z.length>0;return W||U||O.streamParse==null?yt(yt(tn(yt({},O),{streamParse:(H=O.streamParse)==null||H}),W?{final:P}:{}),U?{customHtmlTags:z}:{}):O}),R=F(()=>{var D;return new Set(((D=T.value.customHtmlTags)!=null?D:[]).map(H=>String(H).trim().toLowerCase()).filter(Boolean))}),B=F(()=>h_(T.value,S.value,e.customMarkdownIt,{includeFinal:!0})),I=F(()=>h_(T.value,S.value,e.customMarkdownIt,{includeFinal:!1}));Je([B,I],([D,H],[O,P])=>{O&&(D===O&&H===P||(x(),H!==P&&(l=[],u="")))},{flush:"sync"});const $=F(()=>{var D,H,O,P,z,W,U,G,Z,ee,Q;if((D=e.nodes)!=null&&D.length)return l=[],u="",y(0),wt(e.nodes.slice());const X=r.value;if(!X)return l=[],u="",y(-1),[];const oe=t.debugPerformanceEnabled.value,xe=oe?$r():0,pe=S.value,ve=B.value,ge=I.value;a&&ve!==a&&(function(Ne){var Re,Ze;(Ze=(Re=Ne.stream)==null?void 0:Re.reset)==null||Ze.call(Re)})(pe),c&&ge!==c&&(l=[],u="");const ne=Object.keys((O=(H=t.customComponentsMap)==null?void 0:H.value)!=null?O:{}).length>0||typeof T.value.postTransformNodes=="function";ne!==d&&(l=[],u="");const ae=!ne&&l.length>0&&X.startsWith(u)&&ge===c,j=oe?p_(pe):null,Y=oe?{}:void 0,fe=k_(pe),ue=!fe&&!ne,de=yt(yt(tn(yt({},T.value),{__reuseStableTopLevelNodes:ue}),fe?{__disableStreamParse:!0}:{}),Y?{__timing:Y}:{}),J=zI(X,pe,de),se=oe?$r():0,ce=oe?{signatureMs:0,stabilizeSignatureMs:0,primeSignatureMs:0,signatureCallCount:0,stabilizeSignatureCallCount:0,primeSignatureCallCount:0}:void 0;let he,Ie=oe?ph(J.length):void 0,Ge=0,we=0,Te=0;if(ae){const Ne=oe?$r():0,[Re,Ze]=(function(Pt){var Tt,He;const[tt,qe]=Pt.scanGlobalReferenceAppend(Pt.previousContent,Pt.content),Et=Pt.parseOptions;return[Pt.previousDirtyStartIndex>0&&Et.final!==!0&&!Pt.customMarkdownIt&&!k_(Pt.md)&&!tt&&typeof Et.preTransformTokens!="function"&&typeof Et.postTransformTokens!="function"&&typeof Et.postTransformNodes!="function"&&((He=(Tt=Et.customHtmlTags)==null?void 0:Tt.length)!=null?He:0)===0?Pt.previousDirtyStartIndex:0,qe]})({content:X,previousContent:u,previousDirtyStartIndex:_,parseOptions:T.value,customMarkdownIt:e.customMarkdownIt,md:pe,scanGlobalReferenceAppend:f});Te=Ze;const gt=Re<=0;if(ce){const Pt=(function(Tt,He,tt,qe={}){var Et;if(!He.length)return{nodes:Tt,metrics:ph(Tt.length)};const ft=(Et=qe.scanStartIndex)!=null?Et:0,en=qe.reuseDirtyTail!==!1,Vt=(function(rn,Sn,Gn,bo=0){const po=Math.min(rn.length,Sn.length);for(let zt=Math.min(po,Math.max(0,bo));ztec(Ne[gt]))})(he,ce,we):(function(Ne,Re=0){for(let Ze=Math.max(0,Re);Ze((z=j?.total)!=null?z:0);t.logPerf(Re?"parse(stream)":"parse(sync)",yt(yt(yt({rendererId:t.instanceMsgId,ms:Math.round($r()-xe),nodes:he.length,contentLength:X.length,parseCommitCount:m,parseCoalescedCount:g,nodeReuseMs:st,referenceDefinitionScanChars:Te,signatureMs:(W=ce?.signatureMs)!=null?W:0,stabilizeSignatureMs:(U=ce?.stabilizeSignatureMs)!=null?U:0,primeSignatureMs:(G=ce?.primeSignatureMs)!=null?G:0,signatureCallCount:(Z=ce?.signatureCallCount)!=null?Z:0,stabilizeSignatureCallCount:(ee=ce?.stabilizeSignatureCallCount)!=null?ee:0,primeSignatureCallCount:(Q=ce?.primeSignatureCallCount)!=null?Q:0,stabilizeMs:Ge},Ie??{}),Y?Object.fromEntries(Bce.map(Ze=>{var gt;return[Ze,(gt=Y[Ze])!=null?gt:0]})):{}),Ne?{streamMode:Ne.lastMode,streamDelta:Kce(Ne,j),streamStats:Ne}:{}))}return wt(he)});return{effectiveCustomHtmlTags:A,effectiveCustomHtmlTagsSet:R,mdBase:L,mdInstance:S,mergedParseOptions:T,getParsedNodesDirtyStartIndex:()=>_,getParsedNodesRevision:()=>v,parsedNodes:$}}function Gce(e){const{isClient:t}=e,n=K(new Set),o=new Map,s=new Map,i=new Map;function r(c){if(!t)return;const u=i.get(c);u!=null&&(window.clearTimeout(u),i.delete(c))}function l(){if(t)for(const c of i.values())window.clearTimeout(c);i.clear()}function a(){n.value=new Set}return{visibleNodeIndices:n,nodeVisibilityHandles:o,nodeVisibilityWatchStops:s,nodeVisibilityFallbackTimers:i,clearVisibilityFallback:r,clearAllVisibilityFallbacks:l,markNodeVisible:function(c,u=!0){var d;u&&r(c),(function(f,h){if((g=(m=e.shouldTrackVisibleNodeIndices)==null?void 0:m.call(e))!=null&&!g)return;var m,g;const b=n.value,_=b.has(f);if(h){if(_)return;const y=new Set(b);return y.add(f),void(n.value=y)}if(!_)return;const v=new Set(b);v.delete(f),n.value=v})(c,u),u&&((d=e.onNodeMarkedVisible)==null||d.call(e,c))},resetNodeVisibleState:a,cleanupNodeVisibility:function(c){var u;if(e.shouldCleanupNodeVisibility&&!e.shouldCleanupNodeVisibility())return;for(const[f,h]of s.entries())f{const u=s.getSnapshot();t.value=u.source,n.value=u.visible,o.value=u.done},r=s.subscribe(i);i();const l=F(()=>Math.max(0,t.value.length-n.value.length)),a=F(()=>l.value===0),c=F(()=>o.value&&a.value);return Dg()&&lf(()=>{r(),s.destroy()}),{source:t,visible:n,done:o,final:c,caughtUp:a,pendingChars:l,enqueue:u=>s.enqueue(u),finish:u=>s.finish(u),flush:()=>s.flush(),reset:u=>s.reset(u),pause:()=>s.pause(),resume:()=>s.resume()}}const Xce={maxCharsPerSecond:3e3,maxCommitFps:20,maxCharsPerCommit:160,catchUpLatencyMs:220,catchUpThreshold:400},b_=/auto|scroll|overlay/i;function Jce(e){if(!e)return!1;const t=(e.overflowY||"").toLowerCase(),n=(e.overflow||"").toLowerCase();return b_.test(t)||b_.test(n)}function Qce(e){const t=Math.ceil(e.scrollHeight)>Math.ceil(e.clientHeight)+1,n=Math.ceil(e.scrollWidth)>Math.ceil(e.clientWidth)+1;return t||n}const eue={class:"m-0 p-0"},tue=["data-probe"],nue=Vn(et(tn(yt({},{name:"HeightEstimationProbes"}),{__name:"HeightEstimationProbes",props:{width:{},flowRoot:{type:Boolean},paragraphNode:{},listItemNode:{},listNode:{},headingNodes:{},setParagraphWrapper:{type:Function},setListItemWrapper:{type:Function},setListWrapper:{type:Function},setHeadingWrapper:{type:Function}},setup(e){const t=e;function n(o){var s,i;return(i=(s=t.headingNodes)==null?void 0:s[o])!=null?i:null}return(o,s)=>(k(),M("div",{class:"height-estimation-probes",style:Gt({width:`${e.width}px`}),"aria-hidden":"true"},[C("div",{ref:i=>e.setParagraphWrapper(i),class:Fe(["node-content",{"node-content-flow-root":e.flowRoot}]),"data-probe":"paragraph"},[q(p(ru),{node:e.paragraphNode,"index-key":"probe-paragraph"},null,8,["node"])],2),C("div",{ref:i=>e.setListItemWrapper(i),class:Fe(["node-content",{"node-content-flow-root":e.flowRoot}]),"data-probe":"list-item"},[C("ul",eue,[q(p(Hd),{node:e.listItemNode,"index-key":"probe-list-item"},null,8,["node"])])],2),C("div",{ref:i=>e.setListWrapper(i),class:Fe(["node-content",{"node-content-flow-root":e.flowRoot}]),"data-probe":"list"},[q(p(zd),{node:e.listNode,"index-key":"probe-list"},null,8,["node"])],2),(k(),M(De,null,vt(6,i=>C("div",{key:`probe-heading-${i}`,ref_for:!0,ref:r=>e.setHeadingWrapper(i,r),class:Fe(["node-content",{"node-content-flow-root":e.flowRoot}]),"data-probe":`heading-${i}`},[q(p(b2),{node:n(i),"index-key":`probe-heading-${i}`},null,8,["node","index-key"])],10,tue)),64))],4))}})),[["__scopeId","data-v-3e0766e2"]]),C_=et({name:"InfographicBlockNodeLoading",props:{node:{type:Object,required:!0},showHeader:{type:Boolean,default:!0},estimatedPreviewHeightPx:{type:Number,default:void 0}},setup(e){const t=F(()=>{var n,o;return Xm((o=wd(e.estimatedPreviewHeightPx))!=null?o:Gm(String((n=e.node.code)!=null?n:"")))});return()=>{var n;return Qt("div",{class:"infographic-block-container rounded-lg border overflow-hidden",style:{margin:"var(--ms-flow-diagram-y) 0",background:"var(--diagram-bg)",borderColor:"var(--diagram-border)",color:"hsl(var(--ms-foreground))"},"data-markstream-infographic":"1","data-markstream-mode":"pending"},[e.showHeader?Qt("div",{class:"infographic-block-header flex justify-between items-center border-b",style:{padding:"var(--ms-inset-panel-y) var(--ms-inset-panel-x)",background:"var(--diagram-header-bg)",borderColor:"var(--diagram-border)",minHeight:"calc(var(--ms-action-btn-icon) + var(--ms-action-btn-padding) + var(--ms-action-btn-padding) + var(--ms-inset-panel-y) + var(--ms-inset-panel-y) + 1px)"}},[Qt("div",{class:"flex items-center gap-x-2 overflow-hidden"},[Qt("span",{class:"icon-slot action-icon shrink-0",style:{display:"inline-flex",width:"var(--ms-action-btn-icon)",height:"var(--ms-action-btn-icon)"}}),Qt("span",{class:"infographic-label font-medium font-mono truncate",style:{fontSize:"var(--ms-text-label)",color:"hsl(var(--ms-muted-foreground))"}},"Infographic")]),Qt("div",{class:"infographic-header-actions flex items-center opacity-0 pointer-events-none",style:{gap:"var(--ms-gap-header-actions)"},"aria-hidden":"true"},Array.from({length:4},()=>Qt("span",{class:"infographic-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded",style:{width:"calc(var(--ms-action-btn-icon) + var(--ms-action-btn-padding) + var(--ms-action-btn-padding))",height:"calc(var(--ms-action-btn-icon) + var(--ms-action-btn-padding) + var(--ms-action-btn-padding))"}})))]):null,Qt("div",{class:"infographic-preview relative overflow-hidden block",style:{height:`${t.value}px`,minHeight:"var(--ms-size-diagram-min-height)",background:"var(--diagram-bg)"}},[Qt("pre",{class:"infographic-pending-source text-sm font-mono whitespace-pre-wrap",style:{position:"absolute",inset:"0",zIndex:"1",margin:"0",padding:"var(--ms-inset-panel-body)",overflow:"auto",textAlign:"left"}},String((n=e.node.code)!=null?n:"")),Qt("div",{class:"absolute inset-0"},[Qt("div",{class:"w-full text-center flex items-center justify-center min-h-full"})])])])}}}),w_=et({name:"MermaidBlockNodeLoading",props:{node:{type:Object,required:!0},showHeader:{type:Boolean,default:!0},estimatedPreviewHeightPx:{type:Number,default:void 0}},setup(e){const t=F(()=>{var n,o;return Ym((o=wd(e.estimatedPreviewHeightPx))!=null?o:Zm(String((n=e.node.code)!=null?n:"")))});return()=>{var n;return Qt("div",{class:"mermaid-block-container rounded-lg border overflow-hidden",style:{margin:"var(--ms-flow-diagram-y) 0",borderColor:"var(--diagram-border)"},"data-markstream-mermaid":"1","data-markstream-mode":"pending"},[e.showHeader?Qt("div",{class:"mermaid-block-header flex justify-between items-center border-b px-[var(--ms-inset-panel-x)] py-[var(--ms-inset-panel-y)]",style:{background:"var(--diagram-header-bg)",borderColor:"var(--diagram-border)"}},[Qt("div",{class:"flex items-center gap-x-2 overflow-hidden"},[Qt("span",{class:"mermaid-label-text text-[length:var(--ms-text-label)] font-medium font-mono truncate",style:{color:"var(--code-action-fg)"}},"Mermaid")]),Qt("div",{class:"mermaid-header-actions flex items-center gap-[var(--ms-gap-header-actions)] opacity-0 pointer-events-none","aria-hidden":"true"},Array.from({length:4},()=>Qt("span",{class:"mermaid-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded"},[Qt("span",{class:"action-icon block"})])))]):null,Qt("div",{class:"mermaid-preview-area relative overflow-hidden block",style:{height:`${t.value}px`,minHeight:"var(--ms-size-diagram-min-height)",background:"var(--diagram-bg)"}},[Qt("pre",{class:"mermaid-source-code text-sm font-mono whitespace-pre-wrap",style:{position:"absolute",inset:"0",margin:"0",padding:"var(--ms-inset-panel-body)",overflow:"auto",textAlign:"left"}},String((n=e.node.code)!=null?n:"")),Qt("div",{class:"_mermaid w-full text-center flex items-center justify-center min-h-full",style:{fontFamily:"inherit",contentVisibility:"auto",contain:"content",containIntrinsicSize:"var(--ms-size-diagram-min-height) 240px"}})])])}}}),oue={docs:{showTooltips:!0,fade:!0,batchRendering:!0,initialRenderBatchSize:40,renderBatchSize:80,renderBatchDelay:16,renderBatchBudgetMs:6,renderBatchIdleTimeoutMs:120,deferNodesUntilVisible:!0,maxLiveNodes:220,liveNodeBuffer:60,nodeVirtual:"auto"},chat:{showTooltips:!1,fade:!1,batchRendering:!0,initialRenderBatchSize:32,renderBatchSize:48,renderBatchDelay:6,renderBatchBudgetMs:8,renderBatchIdleTimeoutMs:60,deferNodesUntilVisible:!0,maxLiveNodes:0,liveNodeBuffer:0,nodeVirtual:"auto"},minimal:{showTooltips:!1,fade:!1,batchRendering:!0,initialRenderBatchSize:32,renderBatchSize:48,renderBatchDelay:6,renderBatchBudgetMs:8,renderBatchIdleTimeoutMs:60,deferNodesUntilVisible:!0,maxLiveNodes:0,liveNodeBuffer:0,nodeVirtual:"auto"}};function bs(e){if(e==null)return"";if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return String(e);try{return JSON.stringify(e)}catch{return String(e)}}const sue=["data-custom-id"],iue=["data-node-index","data-node-type"],__="typewriter-simple-cursor-target",NL=Vn(et(tn(yt({},{name:"NodeRenderer"}),{__name:"NodeRenderer",props:{content:{},nodes:{},final:{type:Boolean},parseOptions:{},customMarkdownIt:{},debugPerformance:{type:Boolean,default:!1},customHtmlTags:{},mode:{},domMode:{},htmlPolicy:{},viewportPriority:{type:Boolean,default:void 0},viewportPriorityOptions:{},codeBlockStream:{type:Boolean,default:!0},codeBlockDarkTheme:{},codeBlockLightTheme:{},codeBlockMonacoOptions:{},codeRenderer:{},renderCodeBlocksAsPre:{type:Boolean,default:void 0},codeBlockMinWidth:{},codeBlockMaxWidth:{},codeBlockProps:{},mermaidProps:{},d2Props:{},infographicProps:{},showTooltips:{type:Boolean,default:void 0},themes:{},langs:{},isDark:{type:Boolean},customId:{},indexKey:{},typewriter:{type:[Boolean,String],default:!1},smoothStreaming:{type:[Boolean,String],default:"auto"},smoothStreamingOptions:{},parseCoalesceMs:{},fade:{type:Boolean,default:void 0},batchRendering:{type:Boolean,default:void 0},initialRenderBatchSize:{},renderBatchSize:{},renderBatchDelay:{},renderBatchBudgetMs:{},renderBatchIdleTimeoutMs:{},deferNodesUntilVisible:{type:Boolean,default:void 0},maxLiveNodes:{},liveNodeBuffer:{},nodeVirtual:{type:[Boolean,String],default:void 0},virtualScroll:{},renderAsFragment:{type:Boolean}},emits:["copy","copy-code","handleArtifactClick","click","mouseover","mouseout","virtual-state-change","height-change","render-settled","render-final","anchor-change"],setup(e,{expose:t,emit:n}){const o=e,s=n;function i(E){if(!(typeof Event<"u"&&E instanceof Event))return typeof E=="string"&&s("copy-code",E),void s("copy",E)}const r=rs(),l=dn("markstreamNestedRendererProps",void 0);function a(E){const V=r?.vnode.props;return!!V&&(Object.prototype.hasOwnProperty.call(V,E)||Object.prototype.hasOwnProperty.call(V,String(E).replace(/[A-Z]/g,ie=>`-${ie.toLowerCase()}`)))}function c(E){var V,ie;const le=o[E];return a(E)?le:(ie=(V=l?.value)==null?void 0:V[E])!=null?ie:le}const u=F(()=>{return(E=c("mode"))==="chat"||E==="minimal"||E==="docs"?E:"docs";var E}),d=F(()=>c_(c("typewriter"))),f=F(()=>d.value!=="off"),h=F(()=>c("domMode")==="minimal"?"minimal":"full"),m=F(()=>{return(E={mode:u.value,codeRenderer:c("codeRenderer"),renderCodeBlocksAsPre:c("renderCodeBlocksAsPre")}).renderCodeBlocksAsPre===!0?"pre":E.codeRenderer==="pre"||E.codeRenderer==="shiki"||E.codeRenderer==="monaco"?E.codeRenderer:E.renderCodeBlocksAsPre===!1||E.mode==="docs"?"monaco":"pre";var E}),g=F(()=>oue[u.value]),b=F(()=>{var E;return(E=c("showTooltips"))!=null?E:g.value.showTooltips}),_=F(()=>{var E;return(E=c("fade"))!=null?E:g.value.fade}),v=F(()=>{var E;return(E=c("batchRendering"))!=null?E:g.value.batchRendering}),y=F(()=>{var E;return(E=c("initialRenderBatchSize"))!=null?E:g.value.initialRenderBatchSize}),w=F(()=>{var E;return(E=c("renderBatchSize"))!=null?E:g.value.renderBatchSize}),x=F(()=>{var E;return(E=c("renderBatchDelay"))!=null?E:g.value.renderBatchDelay}),A=F(()=>{var E;return(E=c("renderBatchBudgetMs"))!=null?E:g.value.renderBatchBudgetMs}),L=F(()=>{var E;return(E=c("renderBatchIdleTimeoutMs"))!=null?E:g.value.renderBatchIdleTimeoutMs}),S=F(()=>{var E;return(E=c("deferNodesUntilVisible"))!=null?E:g.value.deferNodesUntilVisible}),T=F(()=>{var E;return(E=c("maxLiveNodes"))!=null?E:g.value.maxLiveNodes}),R=F(()=>{var E;return(E=c("liveNodeBuffer"))!=null?E:g.value.liveNodeBuffer}),B=F(()=>{var E;return(E=c("nodeVirtual"))!=null?E:g.value.nodeVirtual}),I={get content(){return o.content},get nodes(){return o.nodes},get final(){return o.final},get parseOptions(){return c("parseOptions")},get customMarkdownIt(){return c("customMarkdownIt")},get debugPerformance(){return o.debugPerformance},get customHtmlTags(){return c("customHtmlTags")},get mode(){return c("mode")},get domMode(){return h.value},get htmlPolicy(){return c("htmlPolicy")},get viewportPriority(){return c("viewportPriority")},get viewportPriorityOptions(){return c("viewportPriorityOptions")},get codeBlockStream(){return c("codeBlockStream")},get codeBlockDarkTheme(){return c("codeBlockDarkTheme")},get codeBlockLightTheme(){return c("codeBlockLightTheme")},get codeBlockMonacoOptions(){return c("codeBlockMonacoOptions")},get codeRenderer(){return c("codeRenderer")},get renderCodeBlocksAsPre(){return c("renderCodeBlocksAsPre")},get codeBlockMinWidth(){return c("codeBlockMinWidth")},get codeBlockMaxWidth(){return c("codeBlockMaxWidth")},get codeBlockProps(){return c("codeBlockProps")},get mermaidProps(){return c("mermaidProps")},get d2Props(){return c("d2Props")},get infographicProps(){return c("infographicProps")},get showTooltips(){return b.value},get themes(){return c("themes")},get langs(){return c("langs")},get isDark(){return c("isDark")},get customId(){return c("customId")},get indexKey(){return o.indexKey},get typewriter(){return c("typewriter")},get smoothStreaming(){return o.smoothStreaming},get smoothStreamingOptions(){return c("smoothStreamingOptions")},get parseCoalesceMs(){return c("parseCoalesceMs")},get fade(){return _.value},get batchRendering(){return v.value},get initialRenderBatchSize(){return y.value},get renderBatchSize(){return w.value},get renderBatchDelay(){return x.value},get renderBatchBudgetMs(){return A.value},get renderBatchIdleTimeoutMs(){return L.value},get deferNodesUntilVisible(){return S.value},get maxLiveNodes(){return T.value},get liveNodeBuffer(){return R.value},get nodeVirtual(){return B.value},get virtualScroll(){return o.virtualScroll},get renderAsFragment(){return o.renderAsFragment}};function $(E){s("height-change",E)}function D(E){s("virtual-state-change",E)}function H(E){s("anchor-change",E)}const O=K(),P=K(null),z=K(null),W=K(null),U=Uo({1:null,2:null,3:null,4:null,5:null,6:null}),G=K(!1),Z=new Map,ee=K(0),Q=K(0),X=K({paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}});function oe(E,V){return typeof E!="string"?V:E.trim()||V}function xe(E){const V=Number(E);return Number.isFinite(V)&&V>0?Math.max(1,Math.trunc(V)):640}const pe=F(()=>{var E;const V=(E=I.viewportPriorityOptions)!=null?E:{},ie=oe(V.rootMargin,hu);return{rootMargin:ie,heavyBlockMargin:oe(V.heavyBlockMargin,ie),maxTargets:xe(V.maxTargets)}}),ve=F(()=>{var E;return(E=pe.value.rootMargin)!=null?E:hu}),ge=F(()=>{var E;return(E=pe.value.maxTargets)!=null?E:640});function ne(){var E,V;if(((E=o.virtualScroll)==null?void 0:E.enabled)!==!0)return null;const ie=(V=o.virtualScroll)==null?void 0:V.scrollRoot;return ae(typeof ie=="function"?ie():ie)}function ae(E){return E?typeof HTMLElement<"u"&&E instanceof HTMLElement?E:typeof E=="object"&&"value"in E?ae(E.value):typeof E=="object"&&"$el"in E?ae(E.$el):null:null}Wn(gL,pe);const{isClient:j,renderAsFragment:Y,debugPerformanceEnabled:fe,resolvedShowTooltips:ue,resolvedHtmlPolicy:de,inheritedSmoothStreaming:J,ownsTypewriterCursor:se}=(function(E){const V=typeof window<"u",ie=cf(),le=dn("markstreamHtmlPolicy",void 0),ke=dn("markstreamTypewriterCursor",void 0),$e=dn("markstreamSmoothStreaming",void 0),Pe=F(()=>E.renderAsFragment===!0),ze=F(()=>!!(E.debugPerformance&&V&&typeof console<"u")),ot=F(()=>{var nt;if(typeof E.showTooltips=="boolean")return E.showTooltips;const Be=(nt=ie.showTooltips)!=null?nt:ie["show-tooltips"];return Be===""||Be===!0||Be==="true"||Be!==!1&&Be!=="false"&&void 0}),We=F(()=>{var nt,Be;return(Be=(nt=E.htmlPolicy)!=null?nt:le?.value)!=null?Be:"safe"}),Ye=F(()=>ke?.value!==!0);return{isClient:V,renderAsFragment:Pe,debugPerformanceEnabled:ze,resolvedShowTooltips:ot,resolvedHtmlPolicy:We,inheritedSmoothStreaming:$e,inheritedTypewriterCursor:ke,ownsTypewriterCursor:Ye}})(I),{resolveViewportRoot:ce,resolveScrollContainer:he,isReverseFlexScrollRoot:Ie,getNormalizedScrollTop:Ge,getOffsetTopWithinRoot:we}=(function(E,V){function ie(){var ze,ot;return(ot=(ze=V.scrollRoot)==null?void 0:ze.call(V))!=null?ot:null}function le(ze){if(typeof window>"u")return null;const ot=ie();if(ot)return ot;const We=ze??E.value;if(!We)return null;const Ye=We.ownerDocument||document,nt=Ye.scrollingElement||Ye.documentElement;let Be=We;for(;Be&&Be!==Ye.body&&Be!==nt;){if(Jce(window.getComputedStyle(Be))&&Qce(Be))return Be;Be=Be.parentElement}return null}function ke(ze){if(!V.isClient)return!1;try{const ot=window.getComputedStyle(ze);return!!(ot.display||"").toLowerCase().includes("flex")&&(ot.flexDirection||"").toLowerCase().endsWith("reverse")}catch{return!1}}function $e(ze,ot,We){var Ye,nt;if(We)return Pe(ot);const Be=ze.scrollTop;if(!ke(ze))return Be;const Xe=Be<0?-Be:Be;return Math.max(0,((Ye=ze.scrollHeight)!=null?Ye:0)-((nt=ze.clientHeight)!=null?nt:0))-Xe}function Pe(ze){var ot,We,Ye,nt,Be;const Xe=Number((ot=ze.scrollingElement)==null?void 0:ot.scrollTop),at=Number((Ye=(We=ze.documentElement)==null?void 0:We.scrollTop)!=null?Ye:0),rt=Number((Be=(nt=ze.body)==null?void 0:nt.scrollTop)!=null?Be:0);return Math.max(0,Number.isFinite(Xe)?Xe:0,Number.isFinite(at)?at:0,Number.isFinite(rt)?rt:0)}return{resolveViewportRoot:le,resolveScrollContainer:function(ze){var ot,We,Ye,nt;const Be=ie();if(Be)return Be;const Xe=le((ot=ze??E.value)!=null?ot:null);if(Xe)return Xe;const at=(nt=(Ye=ze?.ownerDocument)!=null?Ye:(We=E.value)==null?void 0:We.ownerDocument)!=null?nt:typeof document<"u"?document:null;return at?.scrollingElement||at?.documentElement||null},isReverseFlexScrollRoot:ke,getNormalizedScrollTop:$e,getOffsetTopWithinRoot:function(ze,ot){const We=ot.ownerDocument||ze.ownerDocument||document;if((function(Xe,at){return Xe===at.documentElement||Xe===at.body||Xe===at.scrollingElement})(ot,We))return ze.getBoundingClientRect().top+Pe(We);const Ye=ot.getBoundingClientRect(),nt=ze.getBoundingClientRect(),Be=$e(ot,We,!1);return nt.top-Ye.top+Be}}})(O,{isClient:j,scrollRoot:ne});Wn("markstreamShowTooltips",ue),Wn("markstreamHtmlPolicy",de),Wn("markstreamTypewriter",f),Wn("markstreamFade",F(()=>I.fade!==!1)),Wn("markstreamTypewriterCursor",F(()=>!0)),Wn("markstreamTextStreamState",Z),Wn("markstreamStreamVersion",ee),Wn("markstreamParseOptions",F(()=>I.parseOptions)),Wn("markstreamCustomMarkdownIt",F(()=>I.customMarkdownIt));const{smoothStreamingEnabled:Te,renderContent:st,requestedFinal:Ne,effectiveFinal:Re}=(function(E,V){const ie=Yce(yt(yt({},Xce),E.smoothStreamingOptions)),le=F(()=>{var Be,Xe,at;return E.smoothStreaming!==!1&&!((Be=E.nodes)!=null&&Be.length)&&(E.smoothStreaming===!0||!((Xe=V.inheritedSmoothStreaming)!=null&&Xe.value))&&(E.smoothStreaming===!0||c_(E.typewriter)!=="off"||((at=E.maxLiveNodes)!=null?at:0)<=0)}),ke=K(!V.isClient||E.smoothStreaming===!0);cn(()=>{ke.value=!0});const $e=F(()=>ke.value&&le.value),Pe=F(()=>{var Be;return $e.value?ie.visible.value:(Be=E.content)!=null?Be:""}),ze=F(()=>{var Be,Xe;const at=(Be=E.parseOptions)!=null?Be:{};return(Xe=E.final)!=null?Xe:at.final}),ot=F(()=>{const Be=ze.value;return $e.value&&Be!=null?!!Be&&ie.caughtUp.value:Be});let We=0,Ye=!1;function nt(){We=0,Ye=!1}return Je([()=>E.content,()=>E.nodes,$e,ze],([Be,Xe,at,rt])=>{if(Xe?.length)return nt(),void ie.reset("");const _t=Be??"";if(!at)return nt(),ie.reset(_t),void(rt&&ie.finish({flush:!0}));const ht=ie.source.value;if(_t){if(_t!==ht)if(_t.startsWith(ht)){const Ft=_t.slice(ht.length),Bt=ie.pendingChars.value;Ft.length<=8?(We++,Ye||We>=2&&Bt<=8?(Ye=!0,ie.reset(_t)):ie.enqueue(Ft)):(nt(),ie.enqueue(Ft))}else nt(),ie.reset(_t)}else nt(),ie.reset("");rt&&ie.finish()},{immediate:!0}),{smoothStream:ie,smoothStreamingEligible:le,smoothStreamingEnabled:$e,renderContent:Pe,requestedFinal:ze,effectiveFinal:ot}})(I,{isClient:j,inheritedSmoothStreaming:J}),Ze=Ne.value===!0;Wn("markstreamSmoothStreaming",Te);const gt=K(!1),Pt=K(!1),Tt=K(!1);let He="",tt=!1,qe=null;function Et(){j&&qe!=null&&(window.clearTimeout(qe),qe=null)}function ft(){gt.value=!1,Et()}function en(E,V){if(!fe.value)return;const ie=(function(){if(!fe.value)return null;const le=Sn(Vt),ke=Sn(qn),$e=Math.max(rn,ke);if(le<=0&&$e<=0)return null;const Pe={total:le,maxPerFrame:$e,byLabel:(ze=Vt,Object.fromEntries(Array.from(ze.entries()).sort((ot,We)=>We[1]-ot[1]||ot[0].localeCompare(We[0]))))};var ze;return Vt.clear(),qn.clear(),rn=0,Pe})();console.info(`[markstream-vue][perf] ${E}`,ie?tn(yt({},V),{layoutReads:ie}):V)}Je([()=>I.indexKey,()=>I.customId],()=>{var E,V;ft(),Pt.value=!1,Tt.value=!((E=o.nodes)!=null&&E.length)&&Ne.value!==!0&&!!o.content,He=(V=st.value)!=null?V:"",tt=He.length>0},{flush:"sync"}),Je([()=>o.content,()=>o.nodes,Ne],([E,V,ie])=>{!V?.length&&ie!==!0&&E&&(Tt.value=!0)},{flush:"sync",immediate:!0}),Je([st,()=>o.nodes,Ne],([E,V,ie])=>{const le=E??"";return V?.length||ie===!0?(ft(),Pt.value=!1,He=le,void(tt=!0)):(le.length>0&&(Tt.value=!0),tt?(He&&le.length>He.length&&le.startsWith(He)?(gt.value=!0,Pt.value=!0,j&&(Et(),qe=window.setTimeout(()=>{var ke;qe=null,Re.value===!0||(ke=o.nodes)!=null&&ke.length||(zu(),gt.value=!1,El())},1200))):(le.length"u")return null;const $e=window;if($e.__markstreamLayoutReadPerformance)return $e.__markstreamLayoutReadPerformance;const Pe={total:0,maxPerFrame:0,byLabel:{}};return $e.__markstreamLayoutReadPerformance=Pe,Pe})();ke&&(ke.total=Number(ke.total||0)+1,ke.byLabel[le]=Number(ke.byLabel[le]||0)+1,ke.currentFrameTotal=Number(ke.currentFrameTotal||0)+1,ke.frameScheduled||(ke.frameScheduled=!0,typeof window.requestAnimationFrame!="function"?typeof queueMicrotask!="function"?setTimeout(()=>bo(ke),0):queueMicrotask(()=>bo(ke)):window.requestAnimationFrame(()=>bo(ke))))})(E),nn||(nn=!0,j&&typeof window<"u"&&typeof window.requestAnimationFrame=="function"?window.requestAnimationFrame(Gn):typeof queueMicrotask!="function"?setTimeout(Gn,0):queueMicrotask(Gn)))}function zt(E,V){return po(E),V()}const Io=I.customId?`renderer-${I.customId}`:`renderer-${Date.now()}-${Math.random().toString(36).slice(2)}`,ho=(function(E){const V=new Map;return{scope:E,cache:V,clear:()=>V.clear()}})(Io),Vo=Io;Wn(xL,ho);const yn=ls(()=>I.customId),{effectiveCustomHtmlTagsSet:qo,mergedParseOptions:Co,parsedNodes:At,getParsedNodesDirtyStartIndex:it,getParsedNodesRevision:ut}=Zce(I,{instanceMsgId:Io,renderContent:st,effectiveFinal:Re,smoothStreamingEnabled:Te,debugPerformanceEnabled:fe,customComponentsMap:yn,logPerf:en});Je(At,()=>{gt.value||ho.clear(),ee.value+=1},{immediate:!0});const Zt=F(()=>({customId:I.customId,customHtmlTags:Co.value.customHtmlTags,parseOptions:I.parseOptions,customMarkdownIt:I.customMarkdownIt,htmlPolicy:de.value,viewportPriority:I.viewportPriority,viewportPriorityOptions:pe.value,mode:u.value,domMode:I.domMode,codeRenderer:m.value,codeBlockStream:I.codeBlockStream,codeBlockDarkTheme:I.codeBlockDarkTheme,codeBlockLightTheme:I.codeBlockLightTheme,codeBlockMonacoOptions:I.codeBlockMonacoOptions,renderCodeBlocksAsPre:I.renderCodeBlocksAsPre,codeBlockMinWidth:I.codeBlockMinWidth,codeBlockMaxWidth:I.codeBlockMaxWidth,codeBlockProps:I.codeBlockProps,mermaidProps:I.mermaidProps,d2Props:I.d2Props,infographicProps:I.infographicProps,showTooltips:ue.value,themes:I.themes,langs:I.langs,isDark:I.isDark,typewriter:f.value,smoothStreamingOptions:I.smoothStreamingOptions,parseCoalesceMs:I.parseCoalesceMs,fade:I.fade}));Wn("markstreamNestedRendererProps",Zt);const vn=F(()=>At.value),eo=F(()=>At.value.length),uo=K(null),Lo=K(null),Ho=K(null),Xs=K(null),io=o.indexKey!=null&&String(o.indexKey).startsWith("list-item-"),Yn=!io&&I.customId?s_(I.customId):null,ro=F(()=>Yn?(G9.value,s_(I.customId)):null),$o=F(()=>{var E;return!!(!Y.value&&I.customId&&!io&&((E=ro.value)!=null&&E.enabled))}),as=F(()=>!!(j&&$o.value)),mo=F(()=>{var E;return!!(!Y.value&&((E=o.virtualScroll)!=null&&E.enabled))}),Ko=F(()=>mo.value),Hs=K(!1);cn(()=>{Hs.value=!0});const bn=F(()=>!!(j&&mo.value));Wn("markstreamHostScrollManaged",bn);const Fi=F(()=>!!(Hs.value&&bn.value)),Hn=F(()=>as.value||bn.value),nr=F(()=>as.value||Fi.value),Ri=F(()=>{var E;return Hn.value&&((E=ro.value)==null?void 0:E.textEstimation)!==!1});function or(){const E=Q.value||zt("getMeasuredContainerWidth.clientWidth",()=>{var V;return((V=O.value)==null?void 0:V.clientWidth)||0});return Number.isFinite(E)&&E>0?E:0}const Js=F(()=>{const E=or();return E>0?Math.max(1,Math.round(E)):640}),As=F(()=>{var E,V;return!(Re.value!==!0||mo.value||u.value!=="chat"&&u.value!=="minimal"||a("maxLiveNodes")||a("liveNodeBuffer")||(E=o.nodes)!=null&&E.length||Tt.value||!(((V=I.maxLiveNodes)!=null?V:0)<=0))}),Zo=F(()=>{var E;return As.value?50:Math.max(1,(E=I.maxLiveNodes)!=null?E:320)}),wo=F(()=>{var E;return As.value?16:Math.max(0,(E=I.liveNodeBuffer)!=null?E:60)}),an=F(()=>{var E;return!Y.value&&I.nodeVirtual!==!1&&!(((E=I.maxLiveNodes)!=null?E:0)<=0&&!As.value)&&(I.nodeVirtual===!0?At.value.length>0:At.value.length>Zo.value)}),gi=F(()=>an.value||as.value||bn.value),Ms=F(()=>I.viewportPriority!==!1),Pi=F(()=>!!Ms.value&&!G.value);var sr;sr=F(()=>Ms.value),Wn(vL,sr);const Sr=F(()=>{var E;return!(Y.value||I.deferNodesUntilVisible===!1||((E=I.maxLiveNodes)!=null?E:0)<=0||an.value||At.value.length>900||I.viewportPriority===!1)}),vi=Tle(E=>{var V;return ce((V=E??O.value)!=null?V:null)},Ms),{requestFrame:zo,cancelFrame:No,hasIdleCallback:yi,isTestEnv:_o}=(function(E){const V=E.isClient&&typeof window.requestAnimationFrame=="function"?window.requestAnimationFrame.bind(window):null,ie=E.isClient&&typeof window.cancelAnimationFrame=="function"?window.cancelAnimationFrame.bind(window):null,le=E.isClient&&typeof window.requestIdleCallback=="function",ke=(function(){var $e;if(typeof globalThis>"u"||!("process"in globalThis))return;const Pe=($e=Object.getOwnPropertyDescriptor(globalThis,"process"))==null?void 0:$e.value;return Pe?.env})();return{requestFrame:V,cancelFrame:ie,hasIdleCallback:le,isTestEnv:ke?.NODE_ENV==="test"}})({isClient:j}),Wo=F(()=>Re.value===!0&&!mo.value),{resolvedBatchSize:cs,resolvedInitialBatch:vs,batchingEnabled:ir,incrementalRenderingActive:dt,renderedCount:Le,previousRenderContext:Ke,adaptiveBatchSize:_n,previousBatchConfig:ys}=(function(E,V){var ie;const le=F(()=>{var nt;const Be=Math.trunc((nt=E.renderBatchSize)!=null?nt:80);return Number.isFinite(Be)?Math.max(0,Be):0}),ke=F(()=>{var nt;const Be=Math.trunc((nt=E.initialRenderBatchSize)!=null?nt:le.value);return Number.isFinite(Be)?Math.max(0,Be):le.value}),$e=F(()=>!V.renderAsFragment.value&&E.batchRendering!==!1&&le.value>0&&V.isClient&&!V.isTestEnv),Pe=K(0),ze=K({key:E.indexKey,total:0}),ot=K(Math.max(1,le.value||1)),We=F(()=>{var nt,Be,Xe;return $e.value&&!((nt=V.continuousStreaming)!=null&&nt.value)&&!((Be=V.forceFullRenderFinalContent)!=null&&Be.value)&&((Xe=E.maxLiveNodes)!=null?Xe:0)<=0}),Ye=K({batchSize:le.value,initial:ke.value,delay:(ie=E.renderBatchDelay)!=null?ie:16,enabled:We.value});return{resolvedBatchSize:le,resolvedInitialBatch:ke,batchingEnabled:$e,incrementalRenderingActive:We,renderedCount:Pe,previousRenderContext:ze,adaptiveBatchSize:ot,previousBatchConfig:Ye}})(I,{isClient:j,isTestEnv:_o,renderAsFragment:Y,forceFullRenderFinalContent:Wo,continuousStreaming:F(()=>Pt.value&&Re.value!==!0)}),rr=F(()=>{var E;return!Y.value&&I.batchRendering!==!1&&cs.value>0&&!_o&&((E=I.maxLiveNodes)!=null?E:0)<=0&&!Wo.value}),Ar=F(()=>rr.value),Di=F(()=>Hn.value||Ar.value),Mr=F(()=>{var E;return Di.value&&((E=ro.value)==null?void 0:E.codeBlockEstimation)!==!1}),Go=new Map,lr=new Map,Bi=new WeakMap;let Qs=null;const re=new WeakMap,Ce=new Map,Ae=[];let Ue=[],Qe=[],lt=-1;const Se=Kr(Ae),Oe=new Set,ct=K(0);let kt=0;const Xt=K(0),zn=F(()=>(Xt.value,Array.from(Go.entries()).sort((E,V)=>E[0]-V[0]))),Dt=K(null),Nt=K(null);let on,so=null,Yo=0,_l=null;function zs(){on.markFallbackHeightPrefixDirty()}function ra(E){return on.getFallbackNodeHeight(E)}function Xr(E,V){return on.estimateHeightRange(E,V)}function Eu(E){return on.estimateIndexForOffset(E)}const{activeRestoreAnchor:la,getRelativeScrollTopWithinContainer:yf,setRelativeScrollTopWithinContainer:kf,resolveAnchorOffset:B2,clearRestoreReconcile:pc,scheduleRestoreReconcile:aa,captureRestoreAnchor:Jp,restoreAnchor:bf,getAnchorDrift:Qp}=(function(E){const{isClient:V,containerRef:ie,parsedNodeCount:le,requestFrame:ke,cancelFrame:$e,resolveScrollContainer:Pe,getNormalizedScrollTop:ze,getOffsetTopWithinRoot:ot,isReverseFlexScrollRoot:We,estimateIndexForOffset:Ye,estimateHeightRange:nt,getFallbackNodeHeight:Be,clamp:Xe}=E,at=K(null);let rt=null,_t=[];function ht(){const Kt=Pe(),un=ie.value;if(!Kt||!un)return null;const gn=Kt.ownerDocument||un.ownerDocument||document;if(Kt===gn.documentElement||Kt===gn.body||Kt===gn.scrollingElement){const Xn=un.getBoundingClientRect();return Math.max(0,-Xn.top)}return Math.max(0,ze(Kt,gn,!1)-ot(un,Kt))}function Ft(Kt){var un;const gn=Pe(),Xn=ie.value;if(!gn||!Xn)return;const Ls=Math.max(0,Kt),ks=gn.ownerDocument||Xn.ownerDocument||document,Er=ks.defaultView||(typeof window<"u"?window:null);if(gn===ks.documentElement||gn===ks.body||gn===ks.scrollingElement){const tl=ze(gn,ks,!0)+Xn.getBoundingClientRect().top;return void((un=Er?.scrollTo)==null||un.call(Er,0,Math.max(0,tl+Ls)))}l_(gn,ks,ot(Xn,gn)+Ls,{isReverseFlexScrollRoot:tl=>{var zf;return(zf=We?.(tl))!=null&&zf},getNormalizedScrollTop:ze})}function Bt(Kt){const un=le.value,gn=Xe(Kt.nodeIndex,0,Math.max(0,un-1));return nt(0,gn)+Math.max(0,Kt.offsetWithinNodePx)}function qt(){if(rt!=null&&($e?.(rt),rt=null),V)for(const Kt of _t)window.clearTimeout(Kt);_t=[]}function Wt(Kt){const un=Bt(Kt),gn=ht();gn!=null&&Math.abs(gn-un)<=.5||Ft(un)}return{activeRestoreAnchor:at,getRelativeScrollTopWithinContainer:ht,setRelativeScrollTopWithinContainer:Ft,resolveAnchorOffset:Bt,clearRestoreReconcile:qt,applyRestoreAnchor:Wt,scheduleRestoreReconcile:function(){at.value&&V&&rt==null&&(rt=ke?ke(()=>{rt=null,at.value&&Wt(at.value)}):null,rt==null&&at.value&&Wt(at.value))},captureRestoreAnchor:function(){const Kt=ht(),un=le.value;if(Kt==null||un<=0)return null;const gn=Xe(Ye(Kt+1),0,un-1),Xn=nt(0,gn),Ls=Be(gn);return{nodeIndex:gn,offsetWithinNodePx:Xe(Kt-Xn,0,Math.max(0,Ls-1))}},restoreAnchor:function(Kt){const un=le.value;if(at.value={nodeIndex:Xe(Kt.nodeIndex,0,Math.max(0,un-1)),offsetWithinNodePx:Math.max(0,Kt.offsetWithinNodePx)},qt(),Wt(at.value),V)for(const gn of[0,120,280,480])_t.push(window.setTimeout(()=>{at.value&&Wt(at.value)},gn))},getAnchorDrift:function(Kt){const un=ht();return un==null?null:un-Bt(Kt)}}})({isClient:j,containerRef:O,parsedNodeCount:eo,requestFrame:zo,cancelFrame:No,resolveScrollContainer:()=>Dt.value||he(),getNormalizedScrollTop:Ge,getOffsetTopWithinRoot:we,isReverseFlexScrollRoot:Ie,estimateIndexForOffset:Eu,estimateHeightRange:Xr,getFallbackNodeHeight:ra,clamp:Is}),{nodeHeights:xl,heightStats:ei,heightTreeSize:Iu,heightSumTree:H2,heightKnownTree:z2,averageNodeHeight:e0,resetHeightMeasurements:ye,pruneHeightMeasurements:_e,rebuildHeightTrees:je,recordNodeHeight:It,removeNodeHeights:Jt,exportHeightCache:fn,importHeightCache:to,fenwickRangeSum:fo}=(function(E={}){const V=Uo({}),ie=Uo({total:0,count:0}),le=K(0),ke=K([]),$e=K([]);function Pe(){for(const Be of Object.keys(V))delete V[Number(Be)];ie.total=0,ie.count=0,le.value=0,ke.value=[],$e.value=[]}function ze(Be,Xe,at){for(let rt=Xe+1;rt0;rt-=rt&-rt)at+=Be[rt];return at}function We(Be){le.value=Be;const Xe=new Array(Be+1).fill(0),at=new Array(Be+1).fill(0);for(const[rt,_t]of Object.entries(V)){const ht=Number(rt),Ft=Number(_t);!Number.isFinite(ht)||ht<0||ht>=Be||!Number.isFinite(Ft)||Ft<=0||(ze(Xe,ht,Ft),ze(at,ht,1))}ke.value=Xe,$e.value=at}function Ye(Be){if(!Number.isInteger(Be)||Be<0)return!1;const Xe=V[Be];if(!Number.isFinite(Xe)||Xe<=0)return!1;if(delete V[Be],ie.total=Math.max(0,ie.total-Xe),ie.count=Math.max(0,ie.count-1),le.value>Be){const at=ke.value,rt=$e.value;at.length&&rt.length&&(ze(at,Be,-Xe),ze(rt,Be,-1))}return!0}const nt=F(()=>ie.count>0?Math.max(12,ie.total/ie.count):32);return{nodeHeights:V,heightStats:ie,heightTreeSize:le,heightSumTree:ke,heightKnownTree:$e,averageNodeHeight:nt,resetHeightMeasurements:Pe,pruneHeightMeasurements:function(Be){if(Be<=0)return void Pe();let Xe=0,at=0;for(const[rt,_t]of Object.entries(V)){const ht=Number(rt),Ft=Number(_t);!Number.isFinite(ht)||ht<0||ht>=Be||!Number.isFinite(Ft)||Ft<=0?delete V[ht]:(Xe+=Ft,at++)}ie.total=Xe,ie.count=at},rebuildHeightTrees:We,recordNodeHeight:function(Be,Xe,at={}){(function(rt,_t,ht={}){var Ft;if(!Number.isFinite(_t)||_t<=0)return!1;const Bt=V[rt];if(Bt&&(ht.allowShrink===!1&&_trt){const qt=ke.value,Wt=$e.value;if(qt.length&&Wt.length)if(Bt){const Kt=_t-Bt;Kt!==0&&ze(qt,rt,Kt)}else ze(qt,rt,_t),ze(Wt,rt,1)}ht.notify!==!1&&((Ft=E.onHeightRecorded)==null||Ft.call(E))})(Be,Xe,tn(yt({},at),{notify:!0}))},removeNodeHeight:function(Be,Xe={}){var at;const rt=Ye(Be);return rt&&Xe.notify!==!1&&((at=E.onHeightRecorded)==null||at.call(E)),rt},removeNodeHeights:function(Be,Xe={}){var at;let rt=0;for(const _t of Be)Ye(Number(_t))&&rt++;return rt>0&&Xe.notify!==!1&&((at=E.onHeightRecorded)==null||at.call(E)),rt},exportHeightCache:function(){return Object.entries(V).map(([Be,Xe])=>({index:Number(Be),height:Number(Xe)})).filter(Be=>Number.isFinite(Be.index)&&Be.index>=0&&Number.isFinite(Be.height)&&Be.height>0).sort((Be,Xe)=>Be.index-Xe.index)},importHeightCache:function(Be,Xe={}){var at;if(!Array.isArray(Be))return;const rt=le.value;let _t=!1;if(Xe.mode!=="merge"){const ht=Object.keys(V);if(ht.length>0){for(const Ft of ht)delete V[Number(Ft)];_t=!0}}for(const ht of Be){const Ft=Number(ht.index),Bt=Number(ht.height);if(!Number.isInteger(Ft)||Ft<0||rt>0&&Ft>=rt||!Number.isFinite(Bt)||Bt<=0)continue;const qt=V[Ft];qt&&Math.abs(qt-Bt)<=1||(V[Ft]=Bt,_t=!0)}_t&&((function(){let ht=0,Ft=0;const Bt=le.value;for(const[qt,Wt]of Object.entries(V)){const Kt=Number(qt),un=Number(Wt);!Number.isFinite(Kt)||Kt<0||Bt>0&&Kt>=Bt||!Number.isFinite(un)||un<=0?delete V[Kt]:(ht+=un,Ft++)}ie.total=ht,ie.count=Ft})(),rt>0&&We(rt),(at=E.onHeightRecorded)==null||at.call(E))},fenwickRangeSum:function(Be,Xe,at){if(at<=Xe)return 0;const rt=ot(Be,at-1);return Xe<=0?rt:rt-ot(Be,Xe-1)}}})({onHeightRecorded:()=>{zs(),bn.value&&Ff(),la.value&&aa(),Nt.value&&Du(),lo("node-resize")}});function Ts(E){Number.isInteger(E)&&E>=0&&Oe.add(E)}function hc(E){for(const V of E)Ts(Number(V))}function Sl(E){kt++;let V=!0;try{const ie=E();return V=ie!==!1,ie}finally{kt--,kt===0&&V&&ct.value++}}function W2(){Ue=[],Qe=[],lt=-1,Oe.clear(),Se.value=Ae}function t0(){W2(),Sl(()=>ye()),Ce.clear()}function K5(E){!Number.isInteger(E)||E<0||E>=At.value.length||Ce.set(E,xf(E))}function Z5(E,V,ie={}){const le=xl[E];Ts(E),It(E,V,ie);const ke=xl[E];return Object.is(le,ke)?(Oe.delete(E),!1):(ke&&ke>0?K5(E):le&&Ce.delete(E),!0)}function G5(E,V){const ie=zt("getNodeLayoutHeight.slot.offsetHeight",()=>{var le,ke;return(ke=(le=Go.get(E))==null?void 0:le.offsetHeight)!=null?ke:0});return ie>0?ie:zt("getNodeLayoutHeight.content.offsetHeight",()=>V.offsetHeight)}function Y5(E,V={}){V.mode!=="merge"?W2():hc(E.map(ie=>ie.index)),Sl(()=>to(E,V)),gv()}const Jr=F(()=>Sr.value&&Pi.value),tO=F(()=>{var E;return!Y.value&&I.batchRendering!==!1&&cs.value>0&&((E=I.maxLiveNodes)!=null?E:0)<=0}),nO=F(()=>!Y.value&&Ze&&Re.value===!0&&!an.value&&!mo.value&&!$o.value&&!Jr.value&&!tO.value),X5=F(()=>!!vi&&Jr.value),J5=F(()=>an.value||bn.value),{focusIndex:Al,liveRange:Es,updateLiveRange:Cf}=(function(E,V){const{parsedNodeCount:ie,virtualizationEnabled:le,maxLiveNodesResolved:ke,liveNodeBufferResolved:$e,clamp:Pe}=V,ze=$e??F(()=>{var Ye;return Math.max(0,(Ye=E.liveNodeBuffer)!=null?Ye:60)}),ot=K(0),We=Uo({start:0,end:0});return{liveNodeBufferResolved:ze,focusIndex:ot,liveRange:We,updateLiveRange:function(){const Ye=ie.value;if(!le.value||Ye===0)return We.start=0,void(We.end=Ye);const nt=Math.min(ke.value,Ye),Be=ze.value,Xe=Pe(ot.value-Be,0,Math.max(0,Ye-nt));We.start=Xe,We.end=Math.min(Ye,Xe+nt)}}})(I,{parsedNodeCount:eo,virtualizationEnabled:an,maxLiveNodesResolved:Zo,liveNodeBufferResolved:wo,clamp:Is}),Qr=new Map,mc=new Map,ca=new Map,n0=[],Ml=new Map,ua=new Set,Q5=K(0);let U2=!1;const e6=F(()=>(Q5.value,ua.size)),Hi=new Map,el=new Map,t6=K(0),j2=F(()=>{t6.value;let E=0;for(const V of Hi.values())E+=Math.max(0,V);return E});let zi=null;const o0=F(()=>{if(!an.value)return At.value.length;const E=wo.value,V=Math.max(Es.end+E,vs.value),ie=Math.min(At.value.length,V);return Math.max(Le.value,ie)});function s0(){U2||(U2=!0,queueMicrotask(()=>{U2=!1,Q5.value+=1}))}function n6(E,V,ie="node-resize"){if(!j||typeof window>"u")return null;const le=window.setTimeout(()=>{ua.delete(le)&&s0();try{V()}finally{lo(ie)}},Math.max(0,E));return ua.add(le),s0(),le}function i0(E){j&&E!=null&&(ua.delete(E)&&s0(),window.clearTimeout(E))}function o6(){if(j&&typeof window<"u")for(const E of ua)window.clearTimeout(E);ua.size&&(ua.clear(),s0()),n0.length=0,ca.clear()}function oO(E){P.value=E}function sO(E){z.value=E}function iO(E){W.value=E}const{cancelScheduledFocusSync:V2,scheduleFocusSync:Tr}=(function(E){const{isClient:V,containerRef:ie,virtualizationEnabled:le,requestFrame:ke,cancelFrame:$e,syncFocusToScroll:Pe}=E;let ze=null;function ot(){var Ye,nt,Be;return(Be=(nt=(Ye=ie.value)==null?void 0:Ye.ownerDocument)==null?void 0:nt.defaultView)!=null?Be:typeof window<"u"?window:null}function We(){if(!ze)return;const Ye=ot();ze.viaTimeout?Ye?Ye.clearTimeout(ze.id):clearTimeout(ze.id):$e?.(ze.id),ze=null}return{cancelScheduledFocusSync:We,scheduleFocusSync:function(Ye={}){if(!le.value)return;if(!V)return void Pe(!0);if(Ye.immediate)return We(),void Pe(!0);if(ze)return;const nt=()=>{ze=null,Pe()};if(ke)return void(ze={id:ke(nt),viaTimeout:!1});const Be=ot();ze={id:Be?Be.setTimeout(nt,16):setTimeout(nt,16),viaTimeout:!0}}}})({isClient:j,containerRef:O,virtualizationEnabled:an,requestFrame:zo,cancelFrame:No,syncFocusToScroll:function(E=!1){var V;if(!an.value)return;const ie=Dt.value||he();if(!ie)return;const le=ie.ownerDocument||((V=O.value)==null?void 0:V.ownerDocument)||document,ke=le?.defaultView||(typeof window<"u"?window:null),$e=ie===le?.documentElement||ie===le?.body,Pe=At.value.length;if(Pe<=0)return;if(!$e&&Pe>0&&Ie(ie)){const rt=zt("syncFocusToScroll.clientHeight",()=>ie.clientHeight||0),_t=zt("syncFocusToScroll.scrollTop",()=>ie.scrollTop),ht=_t<0?-_t:_t;return void a0(Is((ze=Math.max(0,ht)+.5*Math.max(0,rt),on.estimateIndexForOffsetFromEnd(ze)),0,Math.max(0,Pe-1)),E)}var ze;const ot=(function(rt,_t,ht,Ft){const Bt=O.value;if(!Bt)return null;const qt=Ft?0:zt("syncFocusToScroll.model.root.getBoundingClientRect",()=>rt.getBoundingClientRect().top),Wt=zt("syncFocusToScroll.model.container.getBoundingClientRect",()=>Bt.getBoundingClientRect().top),Kt=Math.max(0,qt-Wt),un=Ft?zt("syncFocusToScroll.model.viewport.clientHeight",()=>{var gn,Xn,Ls,ks;return(ks=(Ls=(Xn=ht?.innerHeight)!=null?Xn:(gn=_t.documentElement)==null?void 0:gn.clientHeight)!=null?Ls:rt.clientHeight)!=null?ks:0}):zt("syncFocusToScroll.model.root.clientHeight",()=>rt.clientHeight);return Is(Eu(Kt+.5*Math.max(0,un)),0,Math.max(0,At.value.length-1))})(ie,le,ke,$e);if(ot!=null)return void a0(ot,E);const We=$e?null:zt("syncFocusToScroll.root.getBoundingClientRect",()=>ie.getBoundingClientRect()),Ye=$e?0:We.top,nt=$e?zt("syncFocusToScroll.viewport.clientHeight",()=>{var rt,_t;return(_t=(rt=ke?.innerHeight)!=null?rt:ie.clientHeight)!=null?_t:0}):We.bottom,Be=zn.value;let Xe=null,at=null;for(const[rt,_t]of Be){if(!_t)continue;const ht=zt("syncFocusToScroll.slot.getBoundingClientRect",()=>_t.getBoundingClientRect());ht.bottom<=Ye||ht.top>=nt||(Xe==null&&(Xe=rt),at=rt)}if(Xe==null||at==null){const rt=O.value;if(!rt)return;const _t=$e?{top:0}:zt("syncFocusToScroll.fallback.root.getBoundingClientRect",()=>ie.getBoundingClientRect()),ht=zt("syncFocusToScroll.fallback.scrollTop",()=>Ge(ie,le,$e)),Ft=$e?(()=>{const qt=zt("syncFocusToScroll.fallback.container.getBoundingClientRect",()=>rt.getBoundingClientRect()),Wt=($e?0:_t.top)-qt.top;return Math.max(0,Wt)})():(()=>{const qt=we(rt,ie);return Math.max(0,ht-qt)})(),Bt=$e?zt("syncFocusToScroll.fallback.viewport.clientHeight",()=>{var qt,Wt,Kt,un;return(un=(Kt=(Wt=ke?.innerHeight)!=null?Wt:(qt=le?.documentElement)==null?void 0:qt.clientHeight)!=null?Kt:ie.clientHeight)!=null?un:0}):zt("syncFocusToScroll.fallback.root.clientHeight",()=>ie.clientHeight);return void a0(Is(Eu(Ft+.5*Math.max(0,Bt)),0,Math.max(0,At.value.length-1)),!0)}a0(Math.round((Xe+at)/2),E)}}),{visibleNodeIndices:q2,nodeVisibilityHandles:Lu,nodeVisibilityWatchStops:r0,nodeVisibilityFallbackTimers:s6,clearVisibilityFallback:l0,markNodeVisible:da,cleanupNodeVisibility:rO,destroyNodeVisibilityState:K2}=Gce({isClient:j,shouldTrackVisibleNodeIndices:()=>Jr.value,shouldCleanupNodeVisibility:()=>an.value,onNodeMarkedVisible:E=>{an.value?Tr():Al.value=Is(E,0,Math.max(0,At.value.length-1))},onNodeVisibilityCleaned:E=>{Go.delete(E)&&$6()}}),{cleanupScrollListener:i6,setupScrollListener:lO}=(function(E){const{isClient:V,virtualizationEnabled:ie,listenerEnabled:le,scrollRootElement:ke,resolveScrollContainer:$e,scheduleFocusSync:Pe,onScroll:ze}=E;let ot=null,We=null;function Ye(){ot&&(ot(),ot=null),We=null,ke.value=null}function nt(Be){const Xe=E.getScrollTop?E.getScrollTop(Be):Be.scrollTop;return Math.max(0,Number.isFinite(Xe)?Math.abs(Xe):0)}return{cleanupScrollListener:Ye,setupScrollListener:function(){if(!V)return;if(!((Be=le?.value)!=null?Be:ie.value))return void Ye();var Be;const Xe=$e();if(!Xe)return void Ye();if(ke.value===Xe&&ot)return;Ye(),We=nt(Xe);const at=()=>{if(ze?.(),ie.value){const rt=(function(_t){const ht=nt(_t),Ft=We;We=ht;const Bt=Math.max(480,.75*(_t.clientHeight||0));return Ft==null?ht>Bt?{immediate:!0}:void 0:Math.abs(ht-Ft)>Bt?{immediate:!0}:void 0})(Xe);rt?Pe(rt):Pe()}};Xe.addEventListener("scroll",at,{passive:!0}),ke.value=Xe,ot=()=>{Xe.removeEventListener("scroll",at)}}}})({isClient:j,virtualizationEnabled:an,listenerEnabled:J5,scrollRootElement:Dt,resolveScrollContainer:he,scheduleFocusSync:Tr,onScroll:function(){const E=Nt.value;if(!E)return;const V=_f();if(!V||(function(le){if(Ef()>=Yo)return _l=null,!1;const ke=_l;if(ke==null)return!0;const $e=Math.abs(le.scrollTop-ke)<=2;return $e||(_l=null),$e})(V))return;const ie=b6(V);ie!=null?(ie<-32||Math.abs(Math.max(0,ie)-Math.max(0,E.distanceFromBottomPx))>32)&&Pu("restore"):Pu("restore")},getScrollTop:E=>{var V;const ie=E.ownerDocument||((V=O.value)==null?void 0:V.ownerDocument)||document,le=E===ie.documentElement||E===ie.body||E===ie.scrollingElement;return zt("scrollListener.getScrollTop",()=>Ge(E,ie,le))}});function a0(E,V=!1){const ie=Is(E,0,Math.max(0,At.value.length-1));!V&&Math.abs(ie-Al.value)<=1||(Al.value=ie,Cf())}function Is(E,V,ie){return Math.min(Math.max(E,V),ie)}function Z2(E=At.value.length){const V=it();return!Number.isInteger(V)||V<0?E:Is(V,0,E)}function G2(E){return E?.firstElementChild}function r6(E,V){var ie;return E?(ie=E.matches)!=null&&ie.call(E,V)?E:E.querySelector(V):null}function aO(E,V){E<1||E>6||(U[E]=V)}function l6(){if(!Hn.value)return void(Q.value=0);const E=zt("updateExperimentContainerWidth.clientWidth",()=>{var V,ie;return(ie=(V=O.value)==null?void 0:V.clientWidth)!=null?ie:0});Q.value=E>0?E:0}let wf=null;function Y2(){wf?.disconnect(),wf=null}const a6=y1("ViewportDeferredMarkdownCodeBlockNode",Dr({loader:()=>co(null,null,function*(){return(yield Po(()=>import("./index5-RZzprraT.js"),__vite__mapDeps([6,4,5]))).default}),loadingComponent:eg,delay:0,suspensible:!1}),eg);function c6(E){return E===a6}const u6=F(()=>m.value==="pre"?Si:m.value==="shiki"?a6:U9);function d6(){var E;return((E=I.codeBlockProps)==null?void 0:E.showHeader)!==!1}function f6(E,V,ie){const le=xl[V],ke=typeof le=="number"&&le>0;if(Ri.value&&!ke&&!(function($e){return!!yn.value.paragraph&&($e.type==="paragraph"||$e.type==="list_item"||$e.type==="list")})(E)){const $e=_L(E,ie,X.value);if($e)return $e}if(Mr.value&&E.type==="code_block"){const $e=(function(Pe){if(Pe.type!=="code_block")return null;const ze=j6(Pe,y0(Pe));return c6(ze)?"markdown":ze===Si?"pre":ze===u6.value||ze===U9?"monaco":null})(E);if($e==="monaco"||$e==="markdown"||$e==="pre")return(function(Pe,ze){var ot,We,Ye;if(!Pe||Pe.type!=="code_block")return null;const nt=ze.rendererKind,Be=nt!=="pre"&&ze.showHeader!==!1,Xe=!!Pe.diff;let at=0,rt=500;if(nt==="monaco"){const ht=(ot=ze.monacoOptions)!=null?ot:{},Ft=J9(Pe,ht,ze.width),Bt=(function(Wt){const Kt=typeof Wt?.fontSize=="number"&&Wt.fontSize>0?Wt.fontSize:12;return typeof Wt?.lineHeight=="number"&&Wt.lineHeight>0?Wt.lineHeight:Math.round(1.5*Kt)})(ht),qt=(function(Wt,Kt){var un,gn;const Xn=typeof((un=Wt?.padding)==null?void 0:un.top)=="number"?Wt.padding.top:Kt?0:8,Ls=typeof((gn=Wt?.padding)==null?void 0:gn.bottom)=="number"?Wt.padding.bottom:Kt?0:8;return Math.max(0,Xn)+Math.max(0,Ls)})(ht,Xe);rt=typeof ht.MAX_HEIGHT=="number"&&ht.MAX_HEIGHT>0?ht.MAX_HEIGHT:500,at=Math.round(Ft*Bt+qt)}else if(nt==="markdown"){const ht=J9(Pe);at=Math.round(21*ht+32)}else{const ht=J9(Pe);at=Math.round(28*ht),rt=Number.POSITIVE_INFINITY}const _t=Math.max(1,Math.min(at,rt));return yt({kind:"code-block",height:Math.round(_t+(Be?40:0)),contentHeight:_t,rendererKind:nt},Xe&&nt==="monaco"?{diffInline:o5((We=ze.monacoOptions)!=null?We:{},(Ye=ze.width)!=null?Ye:0)}:{})})(E,{rendererKind:$e,monacoOptions:I.codeBlockMonacoOptions,showHeader:d6(),width:ie})}return null}DS(()=>{if(ct.value,kt>0)return;const E=At.value,V=ut();if(!E.length||!Di.value)return Ue=[],Qe=[],lt=-1,Oe.clear(),void(Se.value=Ae);const ie=Q.value||zt("estimatedNodeHeights.clientWidth",()=>{var We;return((We=O.value)==null?void 0:We.clientWidth)||0});if(!Number.isFinite(ie)||ie<=0)return Ue=[],Qe=[],lt=-1,Oe.clear(),void(Se.value=Ae);const le=(function(We){return[Math.round(We),Ri.value,Mr.value,X.value,I.codeBlockMonacoOptions,d6(),m.value,yn.value,G9.value]})(ie),ke=Ue.length<=E.length&&(Pe=le,($e=Qe).length===Pe.length&&$e.every((We,Ye)=>Object.is(We,Pe[Ye])));var $e,Pe;const ze=ke&<===V?E.length:ke?Z2(E.length):0,ot=ke?Array.from(Oe):[];Ue.length=E.length;for(let We=ze;We=0&&WeSe.value);on=(function(E){let V=!0,ie=[0],le="";function ke(Ye){var nt;const Be=E.nodeHeights[Ye];if(Number.isFinite(Be)&&Be>0)return Be;const Xe=E.parsedNodes.value[Ye],at=Xe?.type,rt=!!((nt=E.hasCustomParagraphComponent)!=null&&nt.call(E)),_t=E.estimatedNodeHeights.value[Ye],ht=_t?.height;if(!(function(Bt,qt,Wt){return!!(Wt&&qt?.kind==="simple-text"&&(Bt==="paragraph"||Bt==="list_item"||Bt==="list"))})(at,_t,rt)&&Number.isFinite(ht)&&ht>0)return ht;const Ft=Pce(Xe,E.getContainerWidth()||640);return at==="heading"||at==="paragraph"&&Ft<=28&&(function(Bt,qt){if(qt)return!1;const Wt=Bt.children;return!Array.isArray(Wt)||!Wt.length||Wt.every(SL)})(Xe,rt)?Ft:Math.max(E.averageNodeHeight.value,Ft)}function $e(){var Ye;const nt=E.parsedNodes.value.length,Be=E.getPrefixCacheKeyParts().join(":");if(!V&&le===Be)return ie;const Xe=new Array(nt+1);Xe[0]=0;for(let at=0;at=((nt=at[Xe])!=null?nt:0))return Xe-1;let rt=0,_t=Xe-1,ht=Xe-1;for(;rt<=_t;){const Ft=rt+_t>>1;((Be=at[Ft+1])!=null?Be:0)>=Ye?(ht=Ft,_t=Ft-1):rt=Ft+1}return ht}function ze(Ye,nt){var Be,Xe;if(Ye>=nt)return 0;if(E.heightEstimationActive.value)return(function(_t,ht){var Ft,Bt;const qt=E.parsedNodes.value.length,Wt=u_(Math.trunc(_t),0,qt),Kt=u_(Math.trunc(ht),Wt,qt);if(Wt>=Kt)return 0;const un=$e();return((Ft=un[Kt])!=null?Ft:0)-((Bt=un[Wt])!=null?Bt:0)})(Ye,nt);if(E.heightTreeSize.value!==E.parsedNodes.value.length){let _t=0;for(let ht=Ye;htWt<=0?0:E.fenwickRangeSum(rt,0,Wt)+(Wt-E.fenwickRangeSum(_t,0,Wt))*at;let Ft=0,Bt=Be.length-1,qt=Be.length-1;for(;Ft<=Bt;){const Wt=Ft+Bt>>1;ht(Wt+1)>=Ye?(qt=Wt,Bt=Wt-1):Ft=Wt+1}return qt}let Xe=Ye;for(let at=0;at0||Ye++}return Ye}return{markFallbackHeightPrefixDirty:function(){V=!0},getFallbackNodeHeight:ke,estimateHeightRange:ze,estimateIndexForOffset:ot,estimateIndexForOffsetFromEnd:function(Ye){var nt,Be;const Xe=E.parsedNodes.value;if(!Xe.length)return 0;if(Ye<=0)return Math.max(0,Xe.length-1);if(E.heightEstimationActive.value){const rt=(nt=$e()[Xe.length])!=null?nt:0;return Pe(Math.max(0,rt-Ye))}if(E.heightTreeSize.value===Xe.length){const rt=ze(0,Xe.length);return ot(Math.max(0,rt-Ye))}let at=Ye;for(let rt=Xe.length-1;rt>=0;rt--){const _t=(Be=E.nodeHeights[rt])!=null?Be:E.averageNodeHeight.value;if(at<=_t)return rt;at-=_t}return 0},getEstimatedNodeHeightCount:We,buildVirtualHeightSummary:function(Ye){var nt;const Be=E.parsedNodes.value.length;return{totalNodes:Be,measuredCount:E.heightStats.count,estimatedCount:We(),averageNodeHeight:E.averageNodeHeight.value,topSpacerHeight:Ye.topSpacerHeight,bottomSpacerHeight:Ye.bottomSpacerHeight,estimatedTotalHeight:ze(0,Be),width:(nt=Ye.width)!=null?nt:E.getContainerWidth()}}}})({parsedNodes:At,nodeHeights:xl,heightStats:ei,heightTreeSize:Iu,heightSumTree:H2,heightKnownTree:z2,averageNodeHeight:e0,heightEstimationActive:Hn,estimatedNodeHeights:$u,getContainerWidth:or,hasCustomParagraphComponent:()=>!!yn.value.paragraph,getPrefixCacheKeyParts:()=>{var E;const V=t1(Q.value||zt("getFallbackHeightPrefix.clientWidth",()=>{var le;return((le=O.value)==null?void 0:le.clientWidth)||0})),ie=((E=o.virtualScroll)==null?void 0:E.measurementKey)==null?"":String(o.virtualScroll.measurementKey);return[At.value.length,ei.count,Math.round(ei.total),Math.round(100*e0.value),ie,V,Hn.value?1:0,G9.value,ee.value,yn.value.paragraph?1:0]},fenwickRangeSum:fo}),Je(()=>At.value.length,E=>{var V;zs(),E<=0?t0():(E_e(V))),E!==Iu.value&&je(E))},{immediate:!0});const cO=F(()=>{if(!an.value)return At.value.map((le,ke)=>({node:le,index:ke}));const E=At.value.length,V=Is(Es.start,0,E),ie=Is(Es.end,V,E);return At.value.slice(V,ie).map((le,ke)=>({node:le,index:V+ke}))}),X2=F(()=>an.value?Xr(0,Math.min(Es.start,At.value.length)):0),J2=F(()=>{if(!an.value)return 0;const E=At.value.length;return Xr(Math.min(Es.end,E),E)});function p6(){return on.buildVirtualHeightSummary({topSpacerHeight:X2.value,bottomSpacerHeight:J2.value,width:gc()})}function uO(){const E=At.value,V=p6();return tn(yt({},V),{probe:{paragraphReady:!!X.value.paragraph,listItemReady:!!X.value.listItem,listWrapperOverhead:X.value.listWrapperOverhead,headingReadyLevels:Object.entries(X.value.headings).filter(([,ie])=>!!ie).map(([ie])=>Number(ie))},nodes:E.map((ie,le)=>{var ke,$e,Pe,ze,ot,We,Ye,nt,Be;return{index:le,type:ie.type,estimateKind:($e=(ke=$u.value[le])==null?void 0:ke.kind)!=null?$e:null,rendererKind:(ze=(Pe=$u.value[le])==null?void 0:Pe.rendererKind)!=null?ze:null,estimatedHeight:(We=(ot=$u.value[le])==null?void 0:ot.height)!=null?We:null,estimatedContentHeight:(nt=(Ye=$u.value[le])==null?void 0:Ye.contentHeight)!=null?nt:null,measuredHeight:(Be=xl[le])!=null?Be:null}})})}function Q2(){return o.indexKey!=null?String(o.indexKey):mo.value?`virtual-${go()}`:"markdown-renderer"}function h6(E){const V=String(E),ie=`${Q2()}-`;if(!V.startsWith(ie))return null;const le=V.slice(ie.length).match(/^(\d+)(?:$|-)/);if(!le)return null;const ke=Number(le[1]);return!Number.isInteger(ke)||ke<0||ke>=At.value.length?null:ke}function go(){var E,V,ie;const le=(E=o.virtualScroll)==null?void 0:E.sessionKey;return String(le!=null&&le!==""?le:(ie=(V=o.indexKey)!=null?V:I.customId)!=null?ie:Io)}function Xo(){var E;const V=(E=o.virtualScroll)==null?void 0:E.threadKey;return V==null||V===""?void 0:String(V)}const dO=F(()=>{var E,V,ie;return(ie=Xo())!=null?ie:String((V=(E=o.indexKey)!=null?E:I.customId)!=null?V:Io)});function ev(E){var V;return(E??"")===((V=Xo())!=null?V:"")}function Tl(){var E,V,ie;return V=(E=o.virtualScroll)==null?void 0:E.measurementKey,ie=(function(){const le=m.value;return(function(ke){var $e,Pe;const ze=ke.renderer,ot=ze==="monaco"?ke.codeBlockMonacoOptions:void 0,We=ke.codeBlockProps,Ye=ze==="shiki";return[ke.isDark?"dark":"light",ze==="monaco"?"code-rich":ze==="pre"?"code-pre":"code-shiki",ke.codeBlockStream===!1?"code-static":"code-stream",bs(ke.codeBlockMinWidth),bs(ke.codeBlockMaxWidth),...Ye?[Are(($e=We?.themes)!=null?$e:ke.themes,(Pe=We?.langs)!=null?Pe:ke.langs)]:[],bs(ot?.fontSize),bs(ot?.lineHeight),bs(ot?.fontFamily),bs(ot?.tabSize),bs(ot?.MAX_HEIGHT),bs(ot?.wordWrap),bs(ot?.wrappingIndent),bs(ot?.padding),bs(We?.showHeader),bs(We?.showCopyButton),bs(We?.showExpandButton),bs(We?.showPreviewButton),bs(We?.showCollapseButton),bs(We?.showFontSizeButtons)].join("\0")})({renderer:le,isDark:I.isDark,codeBlockStream:I.codeBlockStream,codeBlockMinWidth:I.codeBlockMinWidth,codeBlockMaxWidth:I.codeBlockMaxWidth,codeBlockMonacoOptions:le==="monaco"?I.codeBlockMonacoOptions:void 0,codeBlockProps:I.codeBlockProps,themes:le==="shiki"?I.themes:void 0,langs:le==="shiki"?I.langs:void 0})})(),[V==null?"":String(V),ie].join("\0")}function gc(){return or()}const c0=F(()=>t1(gc())),Wi=F(()=>[Tl(),c0.value].join("\0")),fO=F(()=>{var E;return mo.value?["virtual",(E=Xo())!=null?E:"",go(),Wi.value].join("\0"):o.indexKey});function Nu(){t6.value+=1}function tv(E){return!(!E||!Number.isInteger(E.index)||E.index<0||E.index>=At.value.length||E.sessionKey!==go()||E.threadKey!==Xo()||E.layoutEpochKey!==Wi.value)}function m6(E){const V=String(E),ie=el.get(V);return ie?tv(ie)?ie.index:null:h6(V)}function g6(E="async-node"){(Hi.size||el.size)&&(Hi.clear(),el.clear(),Nu(),lo(E))}const Ou=dn(M3,null),nv={reportHeight(E,V){if(!bn.value)return;const ie=m6(E);if(ie==null)return;const le=Qr.get(ie);if(!le)return;const ke=Number(V),$e=G5(ie,le);(function(Pe,ze,ot={}){Sl(()=>Z5(Pe,ze,ot))})(ie,Number.isFinite(ke)&&ke>0?Math.max(ke,$e||0):$e)},markPending(E){if(!bn.value)return;const V=h6(E);V!=null&&(function(ie,le){var ke;const $e=el.get(ie);if($e&&tv($e))return Hi.set(ie,Math.max(0,(ke=Hi.get(ie))!=null?ke:0)+1),Nu(),void lo("async-node");Hi.set(ie,1),el.set(ie,(function(Pe){return{index:Pe,sessionKey:go(),threadKey:Xo(),layoutEpochKey:Wi.value}})(le)),Nu(),lo("async-node")})(String(E),V)},markSettled(E){if(!bn.value)return;const V=String(E),ie=m6(E);(ie!=null||(function(le){return Hi.has(String(le))})(V))&&(function(le){var ke;const $e=(ke=Hi.get(le))!=null?ke:0;return!($e<=0||($e<=1?(Hi.delete(le),el.delete(le)):Hi.set(le,$e-1),Nu(),$e===1&&lo("async-node"),0))})(V)&&ie!=null&&El()}};function pO(){let E=0;for(const V of Qr.values())E+=zt("getVisibleDomHeight.offsetHeight",()=>{var ie;return(ie=V?.offsetHeight)!=null?ie:0});return Math.ceil(Math.max(0,E))}Wn(M3,{reportHeight(E,V){nv.reportHeight(E,V),Ou?.reportHeight(E,V)},markPending(E){nv.markPending(E),Ou?.markPending(E)},markSettled(E){nv.markSettled(E),Ou?.markSettled(E)}});let ov,sv=null,Fu=null;function u0(E){return E!==!1&&E!=null&&E!==""}function v6(){return an.value?(function(){if(!an.value)return!0;const E=At.value.length,V=Is(Es.start,0,E),ie=Is(Es.end,V,E);if(V>=ie)return!0;for(let le=V;le=o0.value}function iv(){return Re.value===!0&&!gt.value&&j2.value===0&&ua.size===0&&Ml.size===0&&zi==null&&v6()}function y6(){var E,V;if(((E=o.virtualScroll)==null?void 0:E.settleMode)!=="manual"||sv===go()&&ov===Xo())return!0;const ie=(V=o.virtualScroll)==null?void 0:V.settledToken;return!!u0(ie)&&Fu===Rf(ie)}function rv(){return iv()&&y6()}function hO(E,V){return V.totalNodes<=0?E==="final"?"final":"estimate":V.measuredCount>=V.totalNodes?E==="final"?"final":"measured":V.measuredCount>0||V.estimatedCount>0?"mixed":"estimate"}function vc(E="manual",V){const ie=p6(),le=(function(ke){return ke||(Re.value!==!0?At.value.length>0?"streaming":"estimating":!v6()||Ml.size>0||zi!=null?"measuring":rv()?"settled":"settling")})(V);return{sessionKey:go(),threadKey:Xo(),phase:le,nodeCount:ie.totalNodes,liveRange:{start:Es.start,end:Es.end},renderedCount:Le.value,measuredCount:ie.measuredCount,estimatedCount:ie.estimatedCount,averageNodeHeight:ie.averageNodeHeight,topSpacerHeight:ie.topSpacerHeight,bottomSpacerHeight:ie.bottomSpacerHeight,visibleDomHeight:pO(),totalHeight:k6(),width:ie.width,final:Re.value===!0,stable:rv(),confidence:hO(le,ie),reason:E}}function _f(){const E=Dt.value||he(),V=O.value;if(!E||!V)return null;const ie=E.ownerDocument||V.ownerDocument||document,le=E===ie.documentElement||E===ie.body||E===ie.scrollingElement,ke=zt("getScrollBox.scrollTop",()=>Ge(E,ie,le)),$e=zt("getScrollBox.scrollHeight",()=>{var ze,ot,We,Ye,nt;return le?Math.max((ot=(ze=ie.documentElement)==null?void 0:ze.scrollHeight)!=null?ot:0,(Ye=(We=ie.body)==null?void 0:We.scrollHeight)!=null?Ye:0,(nt=E.scrollHeight)!=null?nt:0):E.scrollHeight}),Pe=zt("getScrollBox.clientHeight",()=>{var ze;return le?((ze=ie.documentElement)==null?void 0:ze.clientHeight)||E.clientHeight||0:E.clientHeight});return{root:E,doc:ie,isViewportRoot:le,scrollTop:ke,scrollHeight:$e,clientHeight:Pe}}function k6(){const E=At.value.length,V=Math.max(0,Xr(0,E)),ie=zt("getRendererLogicalHeight.offsetHeight",()=>{var ke,$e;return($e=(ke=O.value)==null?void 0:ke.offsetHeight)!=null?$e:0}),le=Math.max(0,ie>0?ie:zt("getRendererLogicalHeight.scrollHeight",()=>{var ke,$e;return($e=(ke=O.value)==null?void 0:ke.scrollHeight)!=null?$e:0}));return E<=0?Math.ceil(ie):an.value?V>0?Math.max(1,Math.ceil(V),(function(){let ke=X2.value+J2.value;for(const $e of Go.values())$e&&(ke+=Math.max(0,zt("getVirtualizedDomLogicalHeight.offsetHeight",()=>$e.offsetHeight||0)));return Math.ceil(Math.max(0,ke))})(),(function(ke,$e){return ke<=0||$e<=0?0:$e<=ke+Math.max(512,.05*ke)?Math.ceil($e):0})(V,le)):Math.max(1,Math.ceil(le)):bn.value?V>0||ei.count>0||on.getEstimatedNodeHeightCount()>0?(dt.value&&Le.value,Math.max(1,Math.ceil(le),Math.ceil(V))):Math.ceil(le):Math.max(1,Math.ceil(le),Math.ceil(V))}function b6(E){const V=O.value;if(!V)return null;const ie=zt("getRendererBottomDistanceFromViewport.getBoundingClientRect",()=>V.getBoundingClientRect());return(function(ke){return ke.isViewportRoot?ke.clientHeight:zt("getViewportBottomInRoot.getBoundingClientRect",()=>ke.root.getBoundingClientRect().bottom)})(E)-ie.bottom}function mO(E={}){const V=E.requireViewport!==!1,ie=(function($e=64){const Pe=_f(),ze=O.value;if(!Pe||!ze)return!1;const ot=(function(Ye){if(Ye.isViewportRoot)return{top:0,bottom:Ye.clientHeight};const nt=zt("getVirtualViewportRect.getBoundingClientRect",()=>Ye.root.getBoundingClientRect());return{top:nt.top,bottom:nt.bottom}})(Pe),We=zt("isRendererNearVirtualViewport.getBoundingClientRect",()=>ze.getBoundingClientRect());return We.bottom>=ot.top-$e&&We.top<=ot.bottom+$e})();if(V&&!ie)return null;const le=(function(){const $e=_f(),Pe=O.value;if(!$e||!Pe||Math.max(0,$e.scrollHeight-$e.scrollTop-$e.clientHeight)>64)return null;const ze=b6($e);return ze==null?null:ze>=-8&&ze<=160?{type:"bottom",distanceFromBottomPx:Math.max(0,ze)}:null})();if(le)return{anchor:le,captured:!0};const ke=Jp();if(ke)return{anchor:{type:"node",nodeIndex:ke.nodeIndex,offsetWithinNodePx:ke.offsetWithinNodePx},captured:ie};if(E.allowFallback===!0){const $e=(function(){const Pe=At.value.length;return Pe<=0?null:{type:"node",nodeIndex:Is(Al.value,0,Math.max(0,Pe-1)),offsetWithinNodePx:0}})();return $e?{anchor:$e,captured:!1}:null}return null}function lv(E){let V=2166136261;for(let ie=0;ie>>0).toString(36)}function gO(E,V){let ie=E;for(let le=0;le8192?`${le.slice(0,8192)}...${le.length}`:le;return`${le.length}:${lv(ke)}`})(E)}`;if(typeof E=="function")return"fn";if(typeof E!="object")return typeof E;if(V.has(E))return"cycle";if(ie>=6)return"max-depth";V.add(E);try{if(Array.isArray(E)){if(E.length<=160){const We=[];for(let Ye=0;Ye=ze&&Pe.push(Ye)}return[`a:${E.length}`,`h=${$e.join(",")}`,`t=${Pe.join(",")}`,`all=${(ot>>>0).toString(36)}`].join(":")}const le=E,ke=Object.keys(le).filter($e=>{const Pe=le[$e];return $e!=="parent"&&$e!=="el"&&$e!=="component"&&(Pe==null||typeof Pe=="string"||typeof Pe=="number"||typeof Pe=="boolean"||vO.has($e))}).sort();return`o:${ke.length}:${ke.map($e=>`${$e}=${d0(le[$e],V,ie+1)}`).join(";")}`}finally{V.delete(E)}}let av=-1,cv="",yc=[2166136261];function xf(E){const V=At.value[E];return V?lv(d0(V)):""}function yO(E,V){let ie=E;for(let le=0;le>>0}function uv(){var E,V;const ie=ee.value;if(av===ie)return cv;const le=At.value.length;let ke=Z2(le);(av!==ie-1||ke>le||yc.length>>0).toString(36),av=ie,cv}function Ru(E,V={}){var ie;const le=V.includeHeightCache===!0,ke=(ie=V.includeContentHash)!=null?ie:le,$e=le?(function(ze){const ot=(function(){var rt,_t;const ht=Number((_t=(rt=o.virtualScroll)==null?void 0:rt.heightCacheLimit)!=null?_t:5e3);return!Number.isFinite(ht)||ht<=0?Number.POSITIVE_INFINITY:Math.max(1,Math.trunc(ht))})();if(!Number.isFinite(ot)||ze.length<=ot)return ze;const We=new Map,Ye=rt=>{!rt||We.size>=ot||We.set(rt.index,rt)},nt=At.value.length,Be=Is(Es.start-2*wo.value,0,nt),Xe=Is(Es.end+2*wo.value,Be,nt);for(const rt of ze)rt.index>=Be&&rt.index=0&&We.sizert.index-_t.index).slice(0,ot)})(fn().map(ze=>{var ot;const We=At.value[ze.index];return We?tn(yt({},ze),{nodeType:String((ot=We.type)!=null?ot:""),signature:xf(ze.index)}):null}).filter(ze=>!!ze)):[],Pe=mO({allowFallback:V.allowAnchorFallback===!0,requireViewport:V.requireViewport});return Pe||$e.length||V.includeEmptyState===!0?tn(yt({sessionKey:E.sessionKey,threadKey:E.threadKey},Pe?{anchor:Pe.anchor,anchorCaptured:Pe.captured}:{anchorCaptured:!1}),{metrics:E,width:E.width,contentHash:ke?uv():void 0,measurementKey:Tl()||void 0,heightCache:$e.length?$e:void 0}):null}function dv(E){var V,ie;const le=_f();if(!le)return;const ke=(function(ze){const ot=O.value;if(!ot)return null;const We=we(ot,ze.root),Ye=At.value.length,nt=zt("getRendererBottomOffsetWithinRoot.offsetHeight",()=>ot.offsetHeight||0),Be=Math.max(0,nt>0?nt:Ye>0?zt("getRendererBottomOffsetWithinRoot.scrollHeight",()=>ot.scrollHeight||0):0),Xe=k6();return We+Math.max(Be,Xe)})(le);if(ke==null)return;const $e=Math.max(0,E.distanceFromBottomPx),Pe=Math.max(0,ke-le.clientHeight-$e);(function(ze){Yo=Ef()+120,_l=ze})(Pe),le.isViewportRoot?(ie=(V=le.doc.defaultView)==null?void 0:V.scrollTo)==null||ie.call(V,0,Pe):l_(le.root,le.doc,Pe,{isReverseFlexScrollRoot:Ie,getNormalizedScrollTop:Ge})}const fv=[];function C6(){if(j)for(so!=null&&(No?.(so),so=null);fv.length;){const E=fv.pop();E!=null&&window.clearTimeout(E)}}function Pu(E){const V=!!Nt.value;Nt.value=null,Yo=0,_l=null,C6(),V&&E&&lo(E)}function Du(){if(!Nt.value||!j||so!=null)return;const E=()=>{so=null;const V=Nt.value;V&&dv(V)};so=zo?zo(E):null,so==null&&E()}function w6(E,V={}){const ie=At.value.length;return ie<=0?[]:E.filter(le=>!(!Number.isInteger(le.index)||le.index<0||le.index>=ie)&&!(!Number.isFinite(le.height)||le.height<=0)&&!(V.requireSignature&&!le.signature)&&!(V.requireCompatibilityMetadata&&!le.nodeType&&!le.signature)&&(function(ke){var $e;const Pe=At.value[ke.index];return!(!Pe||ke.nodeType&&ke.nodeType!==String(($e=Pe.type)!=null?$e:"")||ke.signature&&ke.signature!==xf(ke.index))})(le))}function _6(E){const V=t1(gc()),ie=t1(E);return V!==-1&&ie!==-1&&V===ie}function pv(E){var V;const ie=Number(E?.width);if(Number.isFinite(ie)&&ie>0)return ie;const le=Number((V=E?.metrics)==null?void 0:V.width);return Number.isFinite(le)&&le>0?le:null}function x6(E){var V;return E.sessionKey===go()&&!!ev(E.threadKey)&&((V=E.measurementKey)!=null?V:"")===Tl()&&!!_6(pv(E))&&!!(function(ie){const le=ie.heightCache;return!!le?.length&&(S6(ie)?le.some(ke=>!!(ke.nodeType||ke.signature)):le.some(ke=>!!ke.signature))})(E)}function S6(E){return!!(E.contentHash&&E.contentHash===uv())}function kO(E){return!S6(E)}let kc=null,bc=null,f0=null,Sf=null,Af=null;function hv(E){var V;const ie=E.map(ke=>{var $e,Pe;return[ke.index,Math.round(10*ke.height),($e=ke.nodeType)!=null?$e:"",(Pe=ke.signature)!=null?Pe:""].join("")}).join(""),le=t1(gc());return[(V=Xo())!=null?V:"",go(),Tl(),At.value.length,le,E.length,lv(ie)].join(":")}function A6(E=(V=>(V=o.virtualScroll)==null?void 0:V.heightCache)()){if(!bn.value||!E?.length||At.value.length<=0||!_6((V=o.virtualScroll)==null?void 0:V.heightCacheWidth))return!1;var V;const ie=w6(E,{requireSignature:!0});if(!ie.length)return!1;const le=hv(ie);return le===kc?(bc="standalone",!0):(Y5(ie,{mode:"merge"}),zs(),kc=le,bc="standalone",Lf(),lo("restore"),!0)}function mv(E,V={}){var ie,le,ke;if(!bn.value||!E||E.sessionKey!==go()||!ev(E.threadKey)||At.value.length<=0)return!1;const $e=!!((ie=E.heightCache)!=null&&ie.length)&&!p0(),Pe=!E.anchor||E.anchorCaptured===!1&&V.allowUncapturedAnchor!==!0?null:E.anchor,ze=V.restoreAnchor===!0&&!!Pe&&!p0()&&Number(pv(E))>0;let ot=!1;if((le=E.heightCache)!=null&&le.length&&x6(E)){const Ye=w6(E.heightCache,{requireCompatibilityMetadata:!E.contentHash,requireSignature:kO(E)});Ye.length&&(Y5(Ye,{mode:"merge"}),zs(),kc=hv(Ye),bc="restore",Lf(),ot=!0)}if($e||ze)return!1;if(!V.restoreAnchor||!Pe)return ot&&lo("restore"),!0;const We=(function(Ye,nt){var Be;const Xe=Ye.anchor,at=Xe?Xe.type==="bottom"?`bottom:${Math.round(Xe.distanceFromBottomPx)}`:`node:${Xe.nodeIndex}:${Math.round(Xe.offsetWithinNodePx)}`:"none";return[(Be=Xo())!=null?Be:"",go(),Tl(),c0.value,nt,at].join(":")})(E,(ke=V.restoreToken)!=null?ke:"imperative");return f0===We?(ot&&lo("restore"),!0):(f0=We,(function(Ye){const nt=()=>{if(Ye.type==="node")return Pu(),void bf({nodeIndex:Ye.nodeIndex,offsetWithinNodePx:Ye.offsetWithinNodePx});if(pc(),la.value=null,Nt.value=Ye,C6(),dv(Ye),j)for(const Be of[0,120,280,480])fv.push(window.setTimeout(()=>{const Xe=Nt.value;Xe&&dv(Xe)},Be))};(function(Be){if(!an.value)return!1;const Xe=At.value.length;return!(Xe<=0||(Al.value=Be.type==="node"?Is(Be.nodeIndex,0,Xe-1):Xe-1,Cf(),0))})(Ye)?bt(nt):nt()})(Pe),lo("restore"),!0)}function p0(){const E=gc();return Number.isFinite(E)&&E>0}function M6(E){var V;return E.sessionKey===go()&&!!ev(E.threadKey)&&(At.value.length<=0||!(!((V=E.heightCache)!=null&&V.length)||p0())||!(!(E.anchor&&Number(pv(E))>0)||p0()))}function gv(){Ce.clear();for(const E of Object.keys(xl)){const V=Number(E);Number.isInteger(V)&&V>=0&&V{let V=!1,ie=null;const le=()=>{V||(V=!0,ie!=null&&window.clearTimeout(ie),E())};if(zo)return zo(le),void(ie=window.setTimeout(le,50));ie=window.setTimeout(le,0)})}function vv(E,V=Xo(),ie=Wi.value){return go()===E&&Xo()===V&&Wi.value===ie}function yv(){return co(this,arguments,function*(E={}){var V,ie,le,ke,$e;const Pe=go(),ze=Xo(),ot=Wi.value,We=(V=E.frames)!=null?V:2,Ye=(ie=E.timeoutMs)!=null?ie:120,nt=(le=E.reason)!=null?le:"manual",Be=E.expectedSettledTokenKey,Xe=E.flushPendingTimers===!0,at=vc(nt),rt=()=>tn(yt({},at),{phase:at.final?"settling":at.phase,stable:!1,confidence:at.confidence==="final"?"mixed":at.confidence,reason:nt}),_t=()=>vv(Pe,ze,ot)&&(Be==null||If()===Be);for(let qt=0;qtwindow.setTimeout(Wt,qt))})(Ye),!_t()||(Xe&&o6(),El(),Mf(),!_t()))return rt();const ht=iv();ht&&(sv=Pe,ov=ze,((ke=o.virtualScroll)==null?void 0:ke.settleMode)==="manual"&&Be!=null&&u0(($e=o.virtualScroll)==null?void 0:$e.settledToken)&&If()===Be&&(Fu=Rf(o.virtualScroll.settledToken)));const Ft=_t()&&ht&&y6(),Bt=vc(nt,Ft?"final":void 0);return _v(Bt,!0),Bt})}let kv="content",Cc=null,wc=null,bv=0,Tf=null,Bu=null,Cv=null,wv=null;function Ef(){return typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now()}function E6(E){var V,ie;const le=Tf;if(!le)return!0;const ke=(ie=(V=o.virtualScroll)==null?void 0:V.heightDiffThresholdPx)!=null?ie:1;return Math.abs(E.totalHeight-le.totalHeight)>ke||E.sessionKey!==le.sessionKey||E.phase!==le.phase||E.stable!==le.stable||E.final!==le.final||E.threadKey!==le.threadKey||E.nodeCount!==le.nodeCount||E.measuredCount!==le.measuredCount||E.width!==le.width}function If(E=(V=>(V=o.virtualScroll)==null?void 0:V.settledToken)()){return bs(E)}function I6(E,V){var ie,le;return[E,V.sessionKey,(ie=V.threadKey)!=null?ie:"",Tl(),uv(),bs((le=o.virtualScroll)==null?void 0:le.settledToken),Math.round(V.totalHeight),Math.round(V.width)].join("\0")}function Lf(){Cv=null,wv=null,Bu=null}function bO(E){const V=E.heightCache;return V?.length?hv(V):""}function $f(E){var V,ie,le;const ke=E.metrics,$e=E.anchor?(Pe=E.anchor).type==="bottom"?`bottom:${Math.round(Pe.distanceFromBottomPx)}`:`node:${Pe.nodeIndex}:${Math.round(Pe.offsetWithinNodePx)}`:"none";var Pe;return[E.sessionKey,(V=E.threadKey)!=null?V:"",(ie=E.measurementKey)!=null?ie:Tl(),(le=E.contentHash)!=null?le:"",bO(E),$e,E.anchorCaptured?1:0,ke.liveRange.start,ke.liveRange.end,ke.renderedCount,ke.nodeCount,Math.round(ke.totalHeight),Math.round(ke.width),ke.phase,ke.stable?1:0].join("\0")}function _v(E,V=!1){if(!bn.value||(function(Pe=!1){return!Pe&&mo.value&&!Fi.value})(V))return;const ie=V||E6(E),le=(function(Pe,ze=!1){return ze||Pe.stable||Pe.phase==="final"?{state:Ru(Pe,{includeHeightCache:!0})}:{state:Ru(Pe)}})(E,V),ke=le.state,$e=!!(ke&&(ie||(function(Pe,ze=!1){return!!ze||$f(Pe)!==Bu})(ke,V)));if(ie&&($(E),Tf=E,bv=Ef()),ke&&$e&&(D(ke),ke.anchor&&H(ke.anchor),Bu=$f(ke)),E.stable){const Pe=I6("settled",E);if(Pe!==Cv){Cv=Pe;const ze=Ru(E,{includeHeightCache:!0});ze&&(D(ze),Bu=$f(ze)),(function(ot){s("render-settled",ot)})(E)}}if(E.phase==="final"){const Pe=I6("final",E);if(Pe!==wv){wv=Pe;const ze=Ru(E,{includeHeightCache:!0});ze&&(D(ze),Bu=$f(ze)),(function(ot){s("render-final",ot)})(E)}}}function xv(){Cc!=null&&(No?.(Cc),Cc=null),wc!=null&&j&&(window.clearTimeout(wc),wc=null)}function L6(){Cc=null,wc=null,(function(E){if(Ml.size>0||zi!=null)return!0;switch(E){case"node-resize":case"async-node":case"resize":case"restore":case"final":case"manual":return!0;default:return!1}})(kv)&&(El(),Mf()),_v(vc(kv))}function lo(E){var V,ie;if(!bn.value||(kv=E,Cc!=null||wc!=null))return;const le=Math.max(0,(ie=(V=o.virtualScroll)==null?void 0:V.emitIntervalMs)!=null?ie:32),ke=Math.max(0,le-(Ef()-bv)),$e=()=>{wc=null,Cc=zo?zo(L6):null,Cc==null&&L6()};j&&ke>0?wc=window.setTimeout($e,ke):$e()}function $6(){Xt.value+=1}function h0(E){if(dt.value&&E>=Le.value){const V=At.value[E],ie=Ne.value===!0&&Re.value!==!0&&E>=At.value.length-2,le=V?.type==="code_block"||V?.type==="image"||V?.type==="mermaid"||V?.type==="infographic";if(!ie||le)return!1}return!Jr.value||E=ge.value&&(G.value||(G.value=!0,K2()),!X5.value||!vi))return Hu(E),void(V&&da(E,!0));if(E{if(s6.delete($e),!Jr.value||q2.value.has($e))return;const ot=Go.get($e);if(!ot)return;const We=he(ot),Ye=ot.ownerDocument||document,nt=Ye.defaultView||window,Be=!We||We===Ye.documentElement||We===Ye.body,Xe=!Be&&We?zt("nodeVisibilityFallback.root.getBoundingClientRect",()=>We.getBoundingClientRect()):null,at=Be?0:Xe.top,rt=Be?zt("nodeVisibilityFallback.clientHeight",()=>{var ht,Ft;return(Ft=(ht=nt.innerHeight)!=null?ht:We?.clientHeight)!=null?Ft:0}):Xe.bottom,_t=zt("nodeVisibilityFallback.node.getBoundingClientRect",()=>ot.getBoundingClientRect());_t.bottom>=at-500&&_t.top<=rt+500&&da($e,!0)},1800+Pe);s6.set($e,ze)})(E);let ke=null;ke=Je(()=>le.isVisible.value,$e=>{if($e){l0(E),da(E,!0),ke?.(),r0.delete(E),Lu.get(E)===le&&Lu.delete(E);try{le.destroy()}catch{}}},{immediate:!0}),r0.set(E,ke),an.value&&Tr()}function Sv(){zi=null,Sl(()=>{let E=!1;for(const[V,ie]of Ml)Ml.delete(V),Qr.get(V)===ie.el&&mc.get(V)===ie.version&&(E=Z5(V,ie.height,{allowShrink:ie.allowShrink})||E);return E})}function zu(){zi!=null&&(No?.(zi),zi=null),Ml.clear()}function g0(E,V){(function(ie,le,ke){var $e;if(!Number.isFinite(ke)||ke<=0||Qr.get(ie)!==le)return;const Pe=mc.get(ie);if(Pe==null)return;const ze=At.value[ie],ot=gt.value&&Re.value!==!0&&!(($e=o.nodes)!=null&&$e.length)&&ie>=At.value.length-2,We=!(ze?.loading===!0||ot),Ye=Ml.get(ie),nt=Ye?Ye.allowShrink&&We:We,Be=Ye&&!nt?Math.max(Ye.height,ke):ke;Ml.set(ie,{height:Be,allowShrink:nt,version:Pe,el:le}),zi==null&&(zi=zo?zo(Sv):null,zi==null&&Sv())})(E,V,G5(E,V))}function El(){for(const[E,V]of Qr)V&&g0(E,V)}function N6(){Qs?.disconnect(),Qs=null,lr.clear()}function Av(){for(;n0.length;)i0(n0.pop())}Je(Fi,E=>{E&&lo("content")},{flush:"post"}),t({getVirtualMetrics:vc,captureVirtualState:function(E={}){var V;return Ru(vc("manual"),{includeHeightCache:!0,includeContentHash:!0,allowAnchorFallback:E.allowFallbackAnchor===!0,requireViewport:E.requireViewport===!0,includeEmptyState:(V=E.includeEmptyState)==null||V})},restoreVirtualState:function(E,V={}){const ie=V.restoreAnchor===!0,le=V.restoreToken==null?"imperative":String(V.restoreToken);Sf=E,Af={restoreAnchor:ie,restoreToken:le,allowUncapturedAnchor:V.allowUncapturedAnchor===!0},!mv(E,{restoreAnchor:ie,restoreToken:le,allowUncapturedAnchor:V.allowUncapturedAnchor===!0})&&M6(E)||(Sf=null,Af=null)},forceMeasure:function(E="manual"){return co(this,null,function*(){yield bt(),yield T6(),El(),Mf(),yield bt();const V=vc(E);return _v(V,!0),V})},settle:yv,scrollToNode:function(E,V="start"){Pu(),pc();const ie=At.value.length;if(ie<=0)return;const le=Is(E,0,ie-1),ke=()=>{var $e;const Pe=B2({nodeIndex:le,offsetWithinNodePx:0}),ze=ra(le),ot=_f(),We=($e=ot?.clientHeight)!=null?$e:0,Ye=yf();let nt=Pe;if(V==="center")nt=Pe-We/2+ze/2;else if(V==="end")nt=Pe-We+ze;else if(V==="nearest"&&Ye!=null){if(Pe>=Ye&&Pe+ze<=Ye+We)return;nt=Pegi.value,E=>{if(!E){N6();for(const V of ca.values())for(const ie of V)i0(ie);ca.clear(),mc.clear(),Av(),zu()}},{immediate:!0}),Je(Re,E=>{E&&(function(){if(j&&Re.value&&Qr.size){Av();for(const V of[80,240,640]){const ie=n6(V,()=>{for(const[le,ke]of Qr)ke&&g0(le,ke)},"final");ie!=null&&n0.push(ie)}}})(),lo(E?"final":"content")});const CO=a_(()=>lo("content"),16),wO=a_(()=>lo("batch"),16);Je([()=>At.value.length,()=>Le.value],()=>{Nt.value&&Du(),CO()},{flush:"post",immediate:!0}),Je([()=>Es.start,()=>Es.end],()=>{wO()},{flush:"post"});const{cleanupBatchScheduler:_O}=(function(E){const{props:V,isClient:ie,isTestEnv:le,parsedNodesIdentity:ke,parsedNodeCount:$e,desiredRenderedCount:Pe,datasetKey:ze,batchingEnabled:ot,incrementalRenderingActive:We,resolvedBatchSize:Ye,resolvedInitialBatch:nt,renderedCount:Be,adaptiveBatchSize:Xe,previousRenderContext:at,previousBatchConfig:rt,requestFrame:_t,cancelFrame:ht,hasIdleCallback:Ft,cleanupNodeVisibility:Bt,onDatasetKeyChanged:qt,onDatasetChanged:Wt}=E;let Kt=null,un="raf",gn=null,Xn=0,Ls=!1,ks=!1;const Er=new Set,tl=new Set;function zf(){if(ie){Kt!=null&&(un==="raf"&&ht?ht(Kt):un==="idle"&&typeof window.cancelIdleCallback=="function"?window.cancelIdleCallback(Kt):un==="timeout"&&window.clearTimeout(Kt),Kt=null),Xn+=1;for(const Ws of Er)ht&&ht(Ws);for(const Ws of tl)window.clearTimeout(Ws);Er.clear(),tl.clear(),gn=null,Ls=!1,ks=!1}}function S0(){return typeof performance<"u"?performance.now():Date.now()}function X6(Ws){(function(Il){var pa;if(!We.value)return;const Ll=Math.max(2,(pa=V.renderBatchBudgetMs)!=null?pa:6),$l=Math.max(1,Ye.value||1),Ir=Math.max(1,Math.floor($l/4));Il>1.5*Ll?Xe.value=Math.max(Ir,Math.floor(.8*Xe.value)):Il<.6*Ll&&Xe.value<$l&&(Xe.value=Math.min($l,Math.ceil(1.2*Xe.value)))})(Ws),Ls=!1;const bi=ks||Be.value=Ll)return;const $l=Math.max(1,Ws),Ir=()=>{const ju=S0();Kt=null;const Wf=gn??$l;gn=null;const Vu=S0();Be.value=Math.min(Ll,Be.value+Wf),Bt(Be.value),(function(Nv,A0){if(!ie)return void X6(A0);Ls=!0;const t7=++Xn;bt().then(()=>{var n7;if(t7!==Xn)return;const jO=S0(),VO=Math.max(A0,jO-Nv),o7=()=>{t7===Xn&&X6(VO)};if(_t){let xc=null,qu=null,i7=!1;const r7=()=>{i7||(i7=!0,xc!==null&&(Er.delete(xc),xc=null),qu!==null&&(tl.delete(qu),window.clearTimeout(qu),qu=null),o7())};return xc=_t(()=>{r7()}),Er.add(xc),qu=window.setTimeout(()=>{xc!==null&&ht&&ht(xc),r7()},Math.max(32,(n7=V.renderBatchIdleTimeoutMs)!=null?n7:120)),void tl.add(qu)}const s7=window.setTimeout(()=>{tl.delete(s7),o7()},0);tl.add(s7)})})(ju,S0()-Vu)};if(!ie||bi.immediate)return void Ir();const ha=Math.max(0,(Il=V.renderBatchDelay)!=null?Il:16);if(gn=gn!=null?Math.max(gn,$l):$l,Kt==null){if(!le&&Ft&&window.requestIdleCallback){const ju=Math.max(0,(pa=V.renderBatchIdleTimeoutMs)!=null?pa:120);return un="idle",void(Kt=window.requestIdleCallback(()=>Ir(),{timeout:ju}))}if(_t&&!le)return un="raf",void(Kt=_t(()=>{ha===0?Ir():(un="timeout",Kt=window.setTimeout(()=>Ir(),ha))}));un="timeout",Kt=window.setTimeout(()=>Ir(),ha)}}function Q6(Ws,bi={}){Ls?ks=!0:Ws==null?e7():J6(Ws,bi)}function e7(){We.value&&J6(ot.value?Math.max(1,Math.round(Xe.value)):Math.max(1,Ye.value))}return Je([ke,$e,ze,We,Ye,nt,()=>V.renderBatchDelay],()=>{var Ws;const bi=$e.value,Il=at.value,pa=ze.value,Ll=!Object.is(pa,Il.key),$l=bi!==Il.total,Ir=Ll||$l;at.value={key:pa,total:bi};const ha=rt.value,ju=(Ws=V.renderBatchDelay)!=null?Ws:16,Wf=ha.batchSize!==Ye.value||ha.initial!==nt.value||ha.delay!==ju||ha.enabled!==We.value;rt.value={batchSize:Ye.value,initial:nt.value,delay:ju,enabled:We.value},Ll&&qt(bi),(Ir||Wf||!We.value)&&zf(),(Ir||Wf)&&(Xe.value=Math.max(1,Ye.value||1)),Ir&&Wt();const Vu=Pe.value;if(!bi)return Be.value=0,void Bt(0);if(!We.value)return Be.value=Vu,void Bt(Be.value);const Nv=Ll||Il.total===0;Be.value=Nv||Wf?Math.min(Vu,nt.value):Math.min(Be.value,Vu);const A0=Math.max(1,nt.value||Ye.value||bi);Be.value{We.value&&(typeof bi=="number"&&Ws<=bi||Ws>Be.value&&Q6())}),{cleanupBatchScheduler:zf}})({props:I,isClient:j,isTestEnv:_o,parsedNodesIdentity:vn,parsedNodeCount:eo,desiredRenderedCount:o0,datasetKey:fO,batchingEnabled:ir,incrementalRenderingActive:dt,resolvedBatchSize:cs,resolvedInitialBatch:vs,renderedCount:Le,adaptiveBatchSize:_n,previousRenderContext:Ke,previousBatchConfig:ys,requestFrame:zo,cancelFrame:No,hasIdleCallback:yi,cleanupNodeVisibility:rO,onDatasetKeyChanged:E=>{zu(),t0(),zs(),Lf(),E>0&&je(E)},onDatasetChanged:()=>{an.value&&Tr({immediate:!0})}});Je([J5,an,()=>O.value,()=>ne()],([E,V])=>{if(!E)return i6(),void V2();lO(),V?Tr({immediate:!0}):V2()},{flush:"post",immediate:!0}),Je([()=>At.value.length,()=>an.value],E=>co(null,[E],function*([V,ie]){ie&&V&&j&&(yield bt(),Tr({immediate:!0}))}),{flush:"post"}),Je(Hn,E=>{E&&(function(){var V;if(uo.value&&Lo.value&&Ho.value&&((V=Xs.value)!=null&&V[1]))return;const ie=wt({type:"paragraph",children:[{type:"text",content:"Probe paragraph text",raw:"Probe paragraph text"}],raw:"Probe paragraph text"}),le=wt({type:"list_item",children:[ie],raw:"- Probe paragraph text"}),ke=wt({type:"list",ordered:!1,items:[le],raw:"- Probe paragraph text"});uo.value=ie,Lo.value=le,Ho.value=ke;const $e={1:null,2:null,3:null,4:null,5:null,6:null};for(let Pe=1;Pe<=6;Pe++)$e[Pe]=wt({type:"heading",level:Pe,text:"Probe heading",children:[{type:"text",content:"Probe heading",raw:"Probe heading"}],raw:`${"#".repeat(Pe)} Probe heading`});Xs.value=$e})()},{immediate:!0}),Je([()=>O.value,Hn],()=>{if(!Hn.value)return Y2(),void(Q.value=0);l6(),Y2(),Hn.value&&O.value&&typeof ResizeObserver<"u"&&(wf=new ResizeObserver(()=>{l6(),la.value&&aa(),Nt.value&&Du(),lo("resize")}),wf.observe(O.value))},{immediate:!0}),Je([Hn,Js,Wi],()=>co(null,null,function*(){if(!Hn.value)return X.value={paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}},void zs();yield bt(),(function(){if(!Hn.value||typeof window>"u")return X.value={paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}},void zs();const E={paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}},V=r6(G2(P.value),".paragraph-node");E.paragraph=Q9(P.value,V,"pre-wrap");const ie=G2(z.value),le=ie?.querySelector(".paragraph-node");E.listItem=Q9(z.value,le,"pre-wrap");const ke=zt("readSimpleTextProbeProfile.list.offsetHeight",()=>{var Pe,ze;return(ze=(Pe=W.value)==null?void 0:Pe.offsetHeight)!=null?ze:0}),$e=zt("readSimpleTextProbeProfile.listItem.offsetHeight",()=>{var Pe,ze;return(ze=(Pe=z.value)==null?void 0:Pe.offsetHeight)!=null?ze:0});E.listWrapperOverhead=Math.max(0,ke-$e);for(let Pe=1;Pe<=6;Pe++){const ze=r6(G2(U[Pe]),`h${Pe}`);E.headings[Pe]=Q9(U[Pe],ze,"pre-wrap")}X.value=E,zs()})()}),{flush:"post",immediate:!0}),Je(()=>At.value.length,()=>{an.value&&Tr({immediate:!0})}),Je([Hn,Q],()=>{zs(),an.value&&Tr({immediate:!0}),la.value&&aa(),Nt.value&&Du(),lo("resize")},{immediate:!1}),Je(()=>Jr.value,E=>{if(E)for(const[V,ie]of Go)m0(V,ie);else if(K2(),an.value)Tr({immediate:!0});else for(const[V,ie]of Go)ie&&da(V,!0)},{immediate:!1}),Je([ve,ge,()=>ne()],()=>{var E;(E=vi.refresh)==null||E.call(vi);for(const[V,ie]of Go)m0(V,ie)},{immediate:!1}),Je([()=>I.viewportPriority,()=>At.value.length,ge],([E,V,ie])=>{if(E!==!1){if(G.value&&(V<=200||V<=ie)){G.value=!1;for(const[le,ke]of Go)m0(le,ke)}}else G.value=!1}),Je(()=>Le.value,()=>{an.value&&Tr({immediate:!0})}),Je([Al,Zo,wo,()=>At.value.length,an],()=>{Cf()},{immediate:!0});let Nf=null,Of=!1,Wu=null;function Ff(){Nf=null,sv=null,ov=void 0,Fu=null,Lf()}function Mv(){zu(),t0(),zs(),Ce.clear();const E=At.value.length;E>0&&je(E),gv()}function Tv(){xv(),o6(),Tf=null,kc=null,bc=null,f0=null,Sf=null,Af=null,Of=!1,Ff(),g6("restore"),pc(),Pu()}function Rf(E){var V;return[(V=Xo())!=null?V:"",go(),Tl(),c0.value,If(E),At.value.length,Math.round(Xr(0,At.value.length)),Math.round(gc()),ei.count,Math.round(ei.total)].join(":")}function O6(){return co(this,null,function*(){var E,V,ie,le;const ke=(E=o.virtualScroll)==null?void 0:E.settledToken,$e=If(ke),Pe=go(),ze=Xo(),ot=Wi.value;if(bn.value&&((V=o.virtualScroll)==null?void 0:V.settleMode)==="manual"&&u0(ke))if(iv()){if(Rf(ke)!==Fu&&!Of){Of=!0;try{const We=yield yv({reason:"manual",expectedSettledTokenKey:$e}),Ye=If()===$e;vv(Pe,ze,ot)&&We.sessionKey===Pe&&We.threadKey===ze&&Ye&&We.stable&&We.phase==="final"&&(Fu=Rf((ie=o.virtualScroll)==null?void 0:ie.settledToken))}finally{Of=!1,yield bt();const We=(le=o.virtualScroll)==null?void 0:le.settledToken,Ye=u0(We)?Rf(We):"";vv(Pe,ze,ot)&&Ye&&Fu!==Ye&&O6()}}}else lo("manual")})}Je(bn,(E,V)=>{if(E!==V){if(!E)return Tv(),void xv();Tv(),Mv(),Wu=Wi.value,lo("content")}},{flush:"post"}),Je([bn,Wi],([E,V])=>{E?Wu!=null?Wu!==V&&(Wu=V,(function(ie="resize"){zu(),t0(),zs(),Ce.clear();const le=At.value.length;le>0&&je(le),gv(),kc=null,bc=null,f0=null,Tf=null,Of=!1,Ff(),A6(),bt(()=>{El(),la.value&&aa(),Nt.value&&Du(),lo(ie)})})("resize")):Wu=V:Wu=null},{flush:"post",immediate:!0}),Je([bn,()=>go(),()=>Xo()],([E])=>{E&&(Tv(),Mv(),g6("content"),lo("content"))}),Je([bn,()=>go(),()=>Xo(),Wi,()=>At.value.length],([E])=>{E&&(function(V="async-node"){let ie=!1;for(const[le,ke]of Array.from(el.entries()))tv(ke)||(el.delete(le),Hi.delete(le),ie=!0);ie&&(Nu(),lo(V))})("async-node")},{flush:"post"}),Je([bn,()=>{var E;return(E=o.virtualScroll)==null?void 0:E.sessionKey},()=>{var E;return(E=o.virtualScroll)==null?void 0:E.measurementKey},()=>o.indexKey,()=>ee.value],([E])=>{E&&(Lf(),(function(V="content"){if(!bn.value)return;const ie=[],le=At.value.length,ke=Z2(le);for(const $e of Array.from(Ce.keys())){if($e>=le){ie.push($e);continue}if($e=le&&Ce.delete($e);ie.length&&((function($e,Pe={}){const ze=Array.from($e,Number);hc(ze);let ot=0;if(Sl(()=>(ot=Jt(ze,Pe),ot>0)),ot>0)(function(We){for(const Ye of We)Ce.delete(Ye)})(ze);else for(const We of ze)Oe.delete(We)})(ie,{notify:!1}),zs(),Ff(),la.value&&aa(),Nt.value&&Du(),lo(V))})("content"))},{flush:"post",immediate:!0}),Je([bn,()=>At.value.length,()=>go(),()=>Xo()],([E,V,ie,le],[ke,$e,Pe,ze])=>{E&&ke&&ie===Pe&&le===ze&&V!==$e&&Ff()},{flush:"post"}),Je([bn,()=>{var E;return(E=o.virtualScroll)==null?void 0:E.heightCache},()=>{var E;return(E=o.virtualScroll)==null?void 0:E.heightCacheWidth},()=>{var E;return(E=o.virtualScroll)==null?void 0:E.restoreState},()=>{var E;return(E=o.virtualScroll)==null?void 0:E.measurementKey},()=>At.value.length,()=>go(),Q],()=>{A6()},{flush:"post",immediate:!0}),Je([bn,()=>{var E;return(E=o.virtualScroll)==null?void 0:E.restoreState},()=>{var E;return(E=o.virtualScroll)==null?void 0:E.restoreAnchor},()=>{var E;return(E=o.virtualScroll)==null?void 0:E.measurementKey},()=>At.value.length,()=>go(),Q],E=>co(null,[E],function*([V,ie]){if(!V||!ie)return;yield bt();const le=(function(){var ke;const $e=(ke=o.virtualScroll)==null?void 0:ke.restoreAnchor;return $e==null||$e===!1?null:$e===!0?"true":String($e)})();mv(ie,{restoreAnchor:le!=null,restoreToken:le??void 0})}),{flush:"post",immediate:!0}),Je([bn,Q,()=>{var E;return(E=o.virtualScroll)==null?void 0:E.restoreState},()=>{var E;return(E=o.virtualScroll)==null?void 0:E.measurementKey}],([E])=>{var V;if(!E)return;const ie=(V=o.virtualScroll)==null?void 0:V.restoreState;ie&&kc&&bc==="restore"&&(x6(ie)||(Mv(),kc=null,bc=null,lo("resize")))},{flush:"post"}),Je([bn,()=>At.value.length,()=>go(),Q],E=>co(null,[E],function*([V]){var ie;const le=Sf,ke=Af;V&&le&&(yield bt(),!mv(le,{restoreAnchor:ke?.restoreAnchor===!0,restoreToken:(ie=ke?.restoreToken)!=null?ie:"imperative",allowUncapturedAnchor:ke?.allowUncapturedAnchor===!0})&&M6(le)||(Sf=null,Af=null))}),{flush:"post",immediate:!0}),Je([bn,Re,()=>{var E;return(E=o.virtualScroll)==null?void 0:E.settleMode},()=>go(),()=>Xo(),Wi,j2,e6,()=>Le.value,o0,()=>ei.count,()=>ei.total],([E,V,ie])=>{if(!E||V!==!0||ie==="manual"||!rv())return;const le=(function(){var ke;const $e=At.value.length;return[(ke=Xo())!=null?ke:"",go(),Tl(),c0.value,$e,Math.round(Xr(0,$e)),Math.round(gc()),ei.count,Math.round(ei.total)].join(":")})();Nf!==le&&(Nf=le,yv({reason:"final"}).then(ke=>{ke.stable||Nf!==le||(Nf=null)}))},{flush:"post",immediate:!0}),Je([bn,Re,()=>{var E;return(E=o.virtualScroll)==null?void 0:E.settleMode},()=>{var E;return(E=o.virtualScroll)==null?void 0:E.settledToken},()=>go(),()=>Xo(),Wi,j2,e6,()=>Le.value,o0,()=>At.value.length,()=>ei.count,()=>ei.total],()=>{O6()},{flush:"post",immediate:!0}),Je([()=>At.value.length,an,Zo,wo,()=>Es.start,()=>Es.end],([E,V,ie,le,ke,$e])=>{fe.value&&en("virtualization",{nodes:E,virtualization:V,maxLiveNodes:ie,buffer:le,focusIndex:Al.value,scroll:V?(()=>{const Pe=Dt.value||he();return Pe?{reverse:Ie(Pe),scrollTop:Math.round(Pe.scrollTop),scrollTopAbs:Math.round(Math.abs(Pe.scrollTop)),scrollHeight:Math.round(Pe.scrollHeight),clientHeight:Math.round(Pe.clientHeight)}:null})():null,liveRange:{start:ke,end:$e},rendered:Le.value})}),Je([()=>I.customId],([E],V,ie)=>{if(!E||io)return;const le=(function(ke,$e){return ke?(us.controllers[ke]=$e,()=>{us.controllers[ke]===$e&&delete us.controllers[ke]}):()=>{}})(E,{captureRestoreAnchor:Jp,restoreAnchor:bf,getAnchorDrift:Qp,getReport:uO});ie(()=>{le()})},{immediate:!0}),Dn(()=>{(function(){if(bn.value)try{El(),Mf();const E=vc("manual");E6(E)&&($(E),Tf=E,bv=Ef());const V=Ru(E,{includeHeightCache:!0,includeContentHash:!0,allowAnchorFallback:!1,requireViewport:!0,includeEmptyState:!0});V&&(D(V),V.anchor&&H(V.anchor),Bu=$f(V))}catch{}})(),_O(),K2(),Et(),N6();for(const E of ca.values())for(const V of E)i0(V);ca.clear(),mc.clear(),Ce.clear(),Av(),zu(),Y2(),pc(),Pu(),xv(),i6(),V2()});const xO=y1("ViewportDeferredMermaidBlockNode",Dr({loader:()=>co(null,null,function*(){try{return(yield Po(()=>import("./index11-BTFBrOND.js"),__vite__mapDeps([7,5]))).default}catch(E){return console.warn('[markstream-vue] Optional peer dependencies for MermaidBlockNode are missing. Falling back to preformatted code rendering. To enable Mermaid rendering, please install "mermaid".',E),Si}}),loadingComponent:w_,delay:0}),w_),SO=y1("ViewportDeferredInfographicBlockNode",Dr({loader:()=>co(null,null,function*(){try{return(yield Po(()=>import("./index10-BA5VPLT7.js"),[])).default}catch(E){return console.warn('[markstream-vue] Failed to load InfographicBlockNode. Falling back to preformatted code rendering. To enable Infographic rendering, install "@antv/infographic" and configure setInfographicLoader with a dynamic loader.',E),Si}}),loadingComponent:C_,delay:0}),C_),AO=y1("ViewportDeferredD2BlockNode",Dr(()=>co(null,null,function*(){try{return(yield Po(()=>import("./index8-CNrUHH_V.js"),[])).default}catch(E){return console.warn('[markstream-vue] Optional peer dependencies for D2BlockNode are missing. Falling back to preformatted code rendering. To enable D2 rendering, please install "@terrastruct/d2".',E),Si}})),Si),F6={text:Bo,paragraph:ru,heading:b2,code_block:U9,list:zd,list_item:Hd,blockquote:jh,table:q1,definition_list:Vh,footnote:qh,footnote_reference:Ki,footnote_anchor:j1,admonition:Yh,vmr_container:Zh,hardbreak:Wa,link:pi,image:za,thematic_break:Kh,math_inline:Zr,math_block:kL,strong:di,emphasis:hi,strikethrough:fi,highlight:Gi,insert:$i,subscript:Li,superscript:Ii,emoji:Ei,checkbox:qi,checkbox_input:qi,inline_code:Gs,html_inline:Zi,reference:ui,html_block:V1},MO=F(()=>Q2()),R6=F(()=>r_(I.codeBlockProps)),TO=F(()=>r_(I.codeBlockProps,{omit:["langs"]})),P6=F(()=>yt(yt({stream:I.codeBlockStream,darkTheme:I.codeBlockDarkTheme,lightTheme:I.codeBlockLightTheme,monacoOptions:I.codeBlockMonacoOptions,themes:I.themes,langs:m.value==="shiki"?I.langs:void 0,minWidth:I.codeBlockMinWidth,maxWidth:I.codeBlockMaxWidth},typeof ue.value=="boolean"?{showTooltips:ue.value}:{}),TO.value)),D6=F(()=>yt(tn(yt({},P6.value),{langs:I.langs}),R6.value));function B6(E){return typeof E=="boolean"?E:void 0}const EO=F(()=>{const E=I.codeBlockProps||{},V={},ie=B6(E.showLineNumbers);ie!==void 0&&(V.showLineNumbers=ie);const le=B6(E.diffInline);le!==void 0&&(V.diffInline=le);const ke=(function($e){const Pe=Number($e);return Number.isFinite(Pe)&&Pe>0?Pe:void 0})(E.reservedHeightPx);return ke!==void 0&&(V.reservedHeightPx=ke),V}),IO=F(()=>yt(yt({stream:I.codeBlockStream,darkTheme:I.codeBlockDarkTheme,lightTheme:I.codeBlockLightTheme,themes:I.themes,langs:I.langs,minWidth:I.codeBlockMinWidth,maxWidth:I.codeBlockMaxWidth},typeof ue.value=="boolean"?{showTooltips:ue.value}:{}),R6.value)),LO=F(()=>yt({},I.mermaidProps||{})),H6=F(()=>yt({},I.d2Props||{})),$O=F(()=>yt({},I.infographicProps||{})),Pf=F(()=>({typewriter:f.value,fade:I.fade,customHtmlTags:Co.value.customHtmlTags})),NO=F(()=>yt(yt({},Pf.value),typeof ue.value=="boolean"?{showTooltip:ue.value}:{})),OO=F(()=>yt(yt({},Pf.value),typeof ue.value=="boolean"?{showTooltips:ue.value}:{})),FO=F(()=>yt(yt({},Pf.value),typeof ue.value=="boolean"?{showTooltips:ue.value}:{})),RO=F(()=>yt(yt({},Pf.value),typeof ue.value=="boolean"?{showTooltips:ue.value}:{}));function PO(E){return Array.isArray(E.children)&&E.children.length>0}const v0=F(()=>cO.value.map(E=>{var V,ie,le,ke,$e,Pe,ze,ot;let We=(function(ht){var Ft,Bt,qt,Wt,Kt,un,gn;if(ht.type!=="code_block")return ht;const Xn=ht,Ls=[String((Ft=Xn.language)!=null?Ft:""),String((Bt=Xn.loading)!=null?Bt:""),String((qt=Xn.diff)!=null?qt:""),String((Wt=Xn.code)!=null?Wt:""),String((Kt=Xn.originalCode)!=null?Kt:""),String((un=Xn.updatedCode)!=null?un:""),String((gn=Xn.raw)!=null?gn:"")].join("\0"),ks=re.get(Xn);if(ks&&ks.signature===Ls)return ks.node;const Er=yt({},Xn);return re.set(Xn,{signature:Ls,node:Er}),Er})(E.node);const Ye=y0(We);let nt=j6(We,Ye);if((We.type==="html_block"||We.type==="html_inline")&&nt===F6[We.type]){const ht=We,Ft=String((V=ht.tag)!=null?V:"").trim().toLowerCase()||qE(ht.content);if(Ft){const Bt=yn.value[Ft];if(qo.value.has(Ft)&&Bt)nt=Bt,We=tn(yt({},ht),{type:Ft,tag:Ft,content:ate(ht.content,Ft)});else if(KE((ie=ht.content)!=null?ie:ht.raw,Ft)){const qt=String((ke=(le=ht.content)!=null?le:ht.raw)!=null?ke:"");We.type==="html_inline"?(nt=Bo,We={type:"text",content:qt,raw:qt}):(nt=ru,We={type:"paragraph",children:[{type:"text",content:qt,raw:qt}],raw:qt})}}}const Be=We.type==="code_block"&&m.value==="pre"&&nt===Si&&!Ev(yn.value,Ye);let Xe=yt({},(function(ht,Ft,Bt){const qt=Ft??y0(ht);if(ht.type==="code_block"){const Wt=qt?Ev(yn.value,qt):void 0;if(Bt&&m.value==="pre"&&!Wt&&Bt===Si)return EO.value;if(Bt&&qt&&Bt===Wt)return qt==="mermaid"?W6(ht):qt==="infographic"?U6(ht):qt==="d2"||qt==="d2lang"?H6.value:D6.value;if(Bt&&Bt===yn.value.code_block)return D6.value;if(c6(Bt))return IO.value}return qt==="mermaid"?W6(ht):qt==="infographic"?U6(ht):qt==="d2"||qt==="d2lang"?H6.value:ht.type==="link"?NO.value:ht.type==="list"?OO.value:ht.type==="blockquote"?FO.value:ht.type==="table"?RO.value:ht.type==="code_block"?P6.value:Pf.value})(We,Ye,nt));const at=Hn.value?$u.value[E.index]:null;We.type==="code_block"&&at?.kind==="code-block"&&(Xe=tn(yt({},Xe),Be?{reservedHeightPx:($e=at.height)!=null?$e:at.contentHeight}:{estimatedHeightPx:at.height,estimatedContentHeightPx:at.contentHeight,estimatedDiffInline:at.diffInline})),Be||We.type!=="code_block"||Ye!=="mermaid"||wd(Xe.estimatedPreviewHeightPx)!=null||(Xe=tn(yt({},Xe),{estimatedPreviewHeightPx:Ym(Zm(String((Pe=We.code)!=null?Pe:"")))})),Be||We.type!=="code_block"||Ye!=="infographic"||wd(Xe.estimatedPreviewHeightPx)!=null||(Xe=tn(yt({},Xe),{estimatedPreviewHeightPx:Xm(Gm(String((ze=We.code)!=null?ze:"")))})),We.type==="math_block"&&(Xe=tn(yt({},Xe),{cacheScope:Vo}));const rt=(function(ht,Ft){const Bt=String(ht.type);return!Wp(Bt)&&yn.value[Bt]===Ft})(We,nt),_t=rt?Q8(We,de.value):void 0;return tn(yt({},E),{node:We,component:nt,bindings:Xe,customBindings:yt(yt({},_t??{}),Xe),rendersCustomNode:rt,hasSlotChildren:PO(We),slotContent:String((ot=We.content)!=null?ot:""),isCodeBlock:We.type==="code_block",indexKey:`${MO.value}-${E.index}`,vnodeKey:`${dO.value}\0${E.index}\0${We.type}`})}));function y0(E){var V;return E?.type==="code_block"?String((V=E.language)!=null?V:"").trim().toLowerCase():""}function Ev(E,V){const ie=V.trim().toLowerCase();if(ie)for(const le of[ie,v2(ie),eL(ie)]){const ke=le&&E[le];if(ke)return ke}}function z6(E,V,ie,le){var ke,$e;const Pe=yt({},E.value);return wd(Pe.estimatedPreviewHeightPx)==null&&(Pe.estimatedPreviewHeightPx=le(ie(String((ke=V?.code)!=null?ke:"")),void 0,Pe.maxHeight==="none"?null:($e=wd(Pe.maxHeight))!=null?$e:void 0)),Pe}function W6(E){return z6(LO,E,Zm,Ym)}function U6(E){return z6($O,E,Gm,Xm)}function j6(E,V){if(!E)return B3;const ie=yn.value,le=ie[String(E.type)];if(E.type==="code_block"){const ke=V??y0(E),$e=ke?Ev(ie,ke):void 0;return $e||(m.value==="pre"?ie.code_block||Si:ke==="mermaid"?ie.mermaid||xO:ke==="infographic"?ie.infographic||SO:ke==="d2"||ke==="d2lang"?ie.d2||AO:le||ie.code_block||u6.value)}return le||F6[String(E.type)]||B3}function Iv(E){s("click",E)}function DO(E){var V;(V=E.target)!=null&&V.closest("[data-node-index]")&&s("mouseover",E)}function BO(E){var V;(V=E.target)!=null&&V.closest("[data-node-index]")&&s("mouseout",E)}function V6(E){s("mouseover",E)}function q6(E){s("mouseout",E)}const _c=K(null),ki=K(!1),Df=K(null),HO=F(()=>!(I.domMode!=="minimal"||Y.value||I.fade!==!1||f.value||ki.value||rr.value||an.value||Ko.value||$o.value||Sr.value||Object.keys(yn.value).length!==0));let Bf,Uu=null,Lv=0,k0=0,b0=0;const K6=["code_block","admonition","table","math_block","html_block","image","thematic_break"],zO=new Set(K6),Z6=[".typewriter-cursor",".height-estimation-probes",...K6.map(E=>`[data-node-type="${E}"]`),"script","style"].join(",");function G6(E){if(!E||typeof E!="object")return!1;const V=E.type;return typeof V=="string"&&zO.has(V)}function C0(E){var V,ie;if(!E||typeof E!="object")return 0;const le=E,ke=(ie=(V=le.raw)!=null?V:le.content)!=null?ie:le.code;if(typeof ke=="string")return ke.length;const $e=le.children;if(Array.isArray($e))return $e.reduce((ze,ot)=>ze+C0(ot),0);const Pe=le.items;return Array.isArray(Pe)?Pe.reduce((ze,ot)=>ze+C0(ot),0):0}function w0(){Bf&&(clearTimeout(Bf),Bf=void 0)}function $v(){Lv+=1,Uu!=null&&(No?.(Uu),Uu=null)}function Hf(){$v(),fa(),_c.value&&(_c.value.style.visibility="hidden")}function WO(E){var V;if(E.nodeType!==Node.TEXT_NODE||!((V=E.textContent)!=null?V:"").trim())return!1;const ie=E.parentElement;return!!ie&&!ie.closest(Z6)}function UO(E){let V=E.lastChild;for(;V;){if(WO(V))return V;if(V.nodeType===Node.ELEMENT_NODE){const ie=V;if(!ie.matches(Z6)&&ie.lastChild){V=ie.lastChild;continue}}for(;V&&V!==E&&!V.previousSibling;)V=V.parentNode;if(!V||V===E)break;V=V.previousSibling}return null}function Y6(){const E=v0.value;for(let V=E.length-1;V>=0;V--){const ie=E[V];if(!ie||G6(ie.node)||!h0(ie.index))continue;const le=Go.get(ie.index);if(!le)continue;const ke=UO(le);if(ke)return ke}return null}function fa(){Df.value&&(Df.value.classList.remove(__),Df.value=null)}function _0(){if(d.value!=="simple"||!j||!ki.value||!O.value)return void fa();const E=Y6(),V=E?(function(ie){var le;const ke=(le=ie.parentElement)==null?void 0:le.closest(".text-node");return ke instanceof HTMLElement?ke:ie.parentElement})(E):null;V!==Df.value&&(fa(),V&&(V.classList.add(__),Df.value=V))}function x0(){if(d.value!=="precise"||!j||!ki.value||Uu!=null)return;const E=Lv,V=()=>{Uu=null,E===Lv&&(function(){var ie,le;if(d.value!=="precise"||!(j&&ki.value&&O.value&&_c.value))return;const ke=O.value,$e=_c.value;$e.style.visibility="hidden";const Pe=Y6();if(!Pe)return;let ze=0,ot=0,We=20,Ye=!1;if(Pe?.textContent){const nt=Pe.textContent.length,Be=document.createRange();Be.setStart(Pe,Math.max(0,nt-1)),Be.setEnd(Pe,nt);const Xe=typeof Be.getClientRects=="function"?Be.getClientRects():void 0,at=(le=Xe?.[Xe.length-1])!=null?le:(ie=Pe.parentElement)==null?void 0:ie.getBoundingClientRect();if(at){const rt=zt("typewriterCursor.root.getBoundingClientRect",()=>ke.getBoundingClientRect());ze=at.right-rt.left+ke.scrollLeft,ot=at.top-rt.top+ke.scrollTop,We=at.height||We,Ye=!0}Be.detach()}Ye&&($e.style.transform=`translate(${Math.max(0,ze)}px, ${Math.max(0,ot)}px)`,$e.style.height=`${We}px`,$e.style.visibility="visible")})()};zo?Uu=zo(V):V()}return Je([st,()=>o.content,()=>o.nodes,()=>I.typewriter,Re],()=>co(null,null,function*(){var E,V;if(!j||Y.value||!se.value)return;if(Re.value)return ki.value=!1,w0(),void Hf();if((E=o.nodes)!=null&&E.length)return ki.value=!1,w0(),Hf(),k0=((V=o.content)!=null?V:"").length,void(b0=st.value.length);const ie=(function(){var ze,ot;return(ze=o.nodes)!=null&&ze.length?o.nodes.reduce((We,Ye)=>We+C0(Ye),0):((ot=o.content)!=null?ot:"").length})(),le=(function(){var ze;return(ze=o.nodes)!=null&&ze.length?o.nodes.reduce((ot,We)=>ot+C0(We),0):st.value.length})(),ke=!G6(At.value[At.value.length-1]),$e=ie>k0,Pe=le>b0;if(!f.value||!ke||!$e&&!Pe)return f.value&&ke||(ki.value=!1,Hf()),k0=ie,void(b0=le);k0=ie,b0=le,ki.value=!0,d.value==="precise"&&_c.value&&(_c.value.style.visibility="hidden"),w0(),yield bt(),d.value==="simple"?_0():(fa(),x0()),Bf=setTimeout(()=>{Bf=void 0,ki.value=!1},3e3)}),{flush:"post",immediate:!0}),Je(ki,E=>co(null,null,function*(){E?(yield bt(),d.value!=="simple"?(fa(),d.value==="precise"&&x0()):_0()):Hf()}),{flush:"post"}),Je(d,()=>co(null,null,function*(){if(j&&!Y.value&&se.value&&ki.value){if(yield bt(),d.value==="simple")return $v(),void _0();fa(),d.value!=="precise"?Hf():x0()}}),{flush:"post"}),Je([()=>Le.value,()=>Es.start,()=>Es.end],()=>co(null,null,function*(){j&&!Y.value&&se.value&&ki.value&&(yield bt(),d.value!=="simple"?(fa(),d.value==="precise"&&x0()):_0())}),{flush:"post"}),Dn(()=>{w0(),$v(),fa(),ho.clear()}),(E,V)=>{const ie=bR("NodeRenderer",!0);return p(Y)?(k(!0),M(De,{key:0},vt(v0.value,le=>(k(),M(De,{key:le.vnodeKey},[le.rendersCustomNode?(k(),me(fs(le.component),Nn({key:0,ref_for:!0},le.customBindings,{node:le.node,loading:le.node.loading,"index-key":le.indexKey,"custom-id":I.customId,"is-dark":I.isDark,onClick:Iv,onMouseover:V6,onMouseout:q6,onCopy:V[0]||(V[0]=ke=>i(ke)),onHandleArtifactClick:V[1]||(V[1]=ke=>s("handleArtifactClick",ke))}),{default:be(()=>[le.hasSlotChildren?(k(),me(ie,Nn({key:0,ref_for:!0},Zt.value,{nodes:le.node.children,"index-key":le.indexKey,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes","index-key"])):le.slotContent?(k(),me(ie,Nn({key:1,ref_for:!0},Zt.value,{content:le.slotContent,final:!le.node.loading,"index-key":`${le.indexKey}-content`,"smooth-streaming":!1,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["content","final","index-key"])):te("",!0)]),_:2},1040,["node","loading","index-key","custom-id","is-dark"])):(k(),me(fs(le.component),Nn({key:1,node:le.node,loading:le.node.loading,"index-key":le.indexKey},{ref_for:!0},le.bindings,{"custom-id":I.customId,"is-dark":I.isDark,onClick:Iv,onMouseover:V6,onMouseout:q6,onCopy:V[2]||(V[2]=ke=>i(ke)),onHandleArtifactClick:V[3]||(V[3]=ke=>s("handleArtifactClick",ke))}),null,16,["node","loading","index-key","custom-id","is-dark"]))],64))),128)):(k(),M("div",{key:1,ref_key:"containerRef",ref:O,class:Fe(["markstream-vue markdown-renderer",[{dark:I.isDark},{virtualized:an.value},{"virtual-scroll-coordinated":Fi.value},{"stable-layout":nO.value},{"typewriter-simple-cursor":ki.value&&d.value==="simple"}]]),"data-custom-id":I.customId,onClick:Iv,onMouseover:DO,onMouseout:BO},[nr.value||an.value?(k(),M(De,{key:0},[nr.value?(k(),me(nue,{key:0,width:Js.value,"flow-root":an.value||Fi.value,"paragraph-node":uo.value,"list-item-node":Lo.value,"list-node":Ho.value,"heading-nodes":Xs.value,"set-paragraph-wrapper":oO,"set-list-item-wrapper":sO,"set-list-wrapper":iO,"set-heading-wrapper":aO},null,8,["width","flow-root","paragraph-node","list-item-node","list-node","heading-nodes"])):te("",!0),an.value?(k(),M("div",{key:1,class:"node-spacer",style:Gt({height:`${X2.value}px`}),"aria-hidden":"true"},null,4)):te("",!0)],64)):te("",!0),HO.value?(k(!0),M(De,{key:1},vt(v0.value,le=>(k(),M(De,{key:le.vnodeKey},[h0(le.index)?(k(),me(fs(le.component),Nn({key:0,node:le.node,loading:le.node.loading,"index-key":le.indexKey},{ref_for:!0},le.bindings,{"custom-id":I.customId,"is-dark":I.isDark,onMouseover:V[4]||(V[4]=ke=>s("mouseover",ke)),onMouseout:V[5]||(V[5]=ke=>s("mouseout",ke)),onCopy:V[6]||(V[6]=ke=>i(ke)),onHandleArtifactClick:V[7]||(V[7]=ke=>s("handleArtifactClick",ke))}),null,16,["node","loading","index-key","custom-id","is-dark"])):te("",!0)],64))),128)):(k(!0),M(De,{key:2},vt(v0.value,le=>(k(),M("div",{key:le.vnodeKey,ref_for:!0,ref:ke=>m0(le.index,ke),class:"node-slot","data-node-index":le.index,"data-node-type":le.node.type},[h0(le.index)?(k(),M("div",{key:0,ref_for:!0,ref:ke=>(function($e,Pe){var ze;Pe||(function(nt){const Be=`${Q2()}-${nt}`;let Xe=!1;for(const at of Array.from(Hi.keys())){const rt=el.get(at);(rt?.index===nt||at===Be||at.startsWith(`${Be}-`))&&(Hi.delete(at),el.delete(at),Xe=!0)}Xe&&(Nu(),lo("async-node"))})($e),Ml.delete($e),(function(nt){var Be;const Xe=((Be=mc.get(nt))!=null?Be:0)+1;mc.set(nt,Xe)})($e);const ot=ca.get($e);if(ot){for(const nt of ot)i0(nt);ca.delete($e)}if((function(nt){const Be=lr.get(nt);Be&&(Qs?.unobserve(Be),Bi.delete(Be),lr.delete(nt))})($e),!Pe||!gi.value)return Qr.delete($e),void mc.delete($e);Qr.set($e,Pe);const We=()=>{g0($e,Pe)};queueMicrotask(We);const Ye=(Qs||typeof ResizeObserver>"u"||(Qs=new ResizeObserver(nt=>{if(nt.length)for(const Be of nt){const Xe=Bi.get(Be.target),at=lr.get(Xe??-1);Xe!=null&&at&&g0(Xe,at)}else El()})),Qs);if(Ye&&(lr.set($e,Pe),Bi.set(Pe,$e),Ye.observe(Pe)),typeof window<"u"){const nt=((ze=At.value[$e])==null?void 0:ze.type)==="code_block"?[16,80,240,800]:Re.value?[80]:[];if(nt.length){const Be=nt.map(Xe=>n6(Xe,We,"node-resize")).filter(Xe=>Xe!=null);Be.length&&ca.set($e,Be)}}})(le.index,ke),class:"node-content"},[le.isCodeBlock?le.rendersCustomNode?(k(),me(fs(le.component),Nn({key:1,ref_for:!0},le.customBindings,{node:le.node,loading:le.node.loading,"index-key":le.indexKey,"custom-id":I.customId,"is-dark":I.isDark,onCopy:V[12]||(V[12]=ke=>i(ke)),onHandleArtifactClick:V[13]||(V[13]=ke=>s("handleArtifactClick",ke))}),{default:be(()=>[le.hasSlotChildren?(k(),me(ie,Nn({key:0,ref_for:!0},Zt.value,{nodes:le.node.children,"index-key":le.indexKey,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes","index-key"])):le.slotContent?(k(),me(ie,Nn({key:1,ref_for:!0},Zt.value,{content:le.slotContent,final:!le.node.loading,"index-key":`${le.indexKey}-content`,"smooth-streaming":!1,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["content","final","index-key"])):te("",!0)]),_:2},1040,["node","loading","index-key","custom-id","is-dark"])):(k(),me(fs(le.component),Nn({key:2,node:le.node,loading:le.node.loading,"index-key":le.indexKey},{ref_for:!0},le.bindings,{"custom-id":I.customId,"is-dark":I.isDark,onCopy:V[14]||(V[14]=ke=>i(ke)),onHandleArtifactClick:V[15]||(V[15]=ke=>s("handleArtifactClick",ke))}),null,16,["node","loading","index-key","custom-id","is-dark"])):(k(),me(gs,{key:0,name:"fade",css:I.fade!==!1,appear:I.fade!==!1},{default:be(()=>[le.rendersCustomNode?(k(),me(fs(le.component),Nn({key:0,ref_for:!0},le.customBindings,{node:le.node,loading:le.node.loading,"index-key":le.indexKey,"custom-id":I.customId,"is-dark":I.isDark,onCopy:V[8]||(V[8]=ke=>i(ke)),onHandleArtifactClick:V[9]||(V[9]=ke=>s("handleArtifactClick",ke))}),{default:be(()=>[le.hasSlotChildren?(k(),me(ie,Nn({key:0,ref_for:!0},Zt.value,{nodes:le.node.children,"index-key":le.indexKey,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes","index-key"])):le.slotContent?(k(),me(ie,Nn({key:1,ref_for:!0},Zt.value,{content:le.slotContent,final:!le.node.loading,"index-key":`${le.indexKey}-content`,"smooth-streaming":!1,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["content","final","index-key"])):te("",!0)]),_:2},1040,["node","loading","index-key","custom-id","is-dark"])):(k(),me(fs(le.component),Nn({key:1,node:le.node,loading:le.node.loading,"index-key":le.indexKey},{ref_for:!0},le.bindings,{"custom-id":I.customId,"is-dark":I.isDark,onCopy:V[10]||(V[10]=ke=>i(ke)),onHandleArtifactClick:V[11]||(V[11]=ke=>s("handleArtifactClick",ke))}),null,16,["node","loading","index-key","custom-id","is-dark"]))]),_:2},1032,["css","appear"]))],512)):(k(),M("div",{key:1,class:"node-placeholder",style:Gt({height:`${ra(le.index)}px`})},null,4))],8,iue))),128)),ki.value&&d.value==="precise"?(k(),M("span",{key:3,ref_key:"typewriterCursorRef",ref:_c,class:"typewriter-cursor","aria-hidden":"true"},null,512)):te("",!0),an.value?(k(),M("div",{key:4,class:"node-spacer",style:Gt({height:`${J2.value}px`}),"aria-hidden":"true"},null,4)):te("",!0)],42,sue))}}})),[["__scopeId","data-v-a9489508"]]),Ni=NL;Ni.install=e=>{const t=new Set(["MarkdownRender","NodeRenderer",Ni.__name,Ni.name].filter(n=>!!n));for(const n of t)e.component(n,NL)};const p5=Object.freeze(Object.defineProperty({__proto__:null,default:Ni},Symbol.toStringTag,{value:"Module"})),rue={key:0,xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"admonition-icon"},lue={key:1,xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"admonition-icon"},aue={key:2,xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"admonition-icon"},cue={key:3,xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"admonition-icon"},uue={class:"admonition-title"},due=["aria-expanded","aria-controls"],fue=["id"],Yh=Vn(et({__name:"AdmonitionNode",props:{node:{},indexKey:{},isDark:{type:Boolean},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},emits:["copy"],setup(e,{emit:t}){var n;const o=e,s=t,i=F(()=>{if(o.node.title&&o.node.title.trim().length)return o.node.title;const c=o.node.kind||"note";return c.charAt(0).toUpperCase()+c.slice(1)}),r=K(!!o.node.collapsible&&!((n=o.node.open)==null||n));function l(){o.node.collapsible&&(r.value=!r.value)}const a=`admonition-${Math.random().toString(36).slice(2,9)}`;return(c,u)=>(k(),M("div",{class:Fe(["admonition",[`admonition-${o.node.kind}`]])},[C("div",{id:a,class:"admonition-legend"},[o.node.kind==="note"||o.node.kind==="info"?(k(),M("svg",rue,[...u[1]||(u[1]=[C("circle",{cx:"12",cy:"12",r:"10"},null,-1),C("path",{d:"M12 16v-4"},null,-1),C("path",{d:"M12 8h.01"},null,-1)])])):o.node.kind==="tip"?(k(),M("svg",lue,[...u[2]||(u[2]=[C("path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5"},null,-1),C("path",{d:"M9 18h6"},null,-1),C("path",{d:"M10 22h4"},null,-1)])])):o.node.kind==="warning"||o.node.kind==="caution"?(k(),M("svg",aue,[...u[3]||(u[3]=[C("path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"},null,-1),C("path",{d:"M12 9v4"},null,-1),C("path",{d:"M12 17h.01"},null,-1)])])):o.node.kind==="danger"||o.node.kind==="error"?(k(),M("svg",cue,[...u[4]||(u[4]=[C("polygon",{points:"7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2"},null,-1),C("path",{d:"M12 8v4"},null,-1),C("path",{d:"M12 16h.01"},null,-1)])])):te("",!0),C("span",uue,N(i.value),1),o.node.collapsible?(k(),M("button",{key:4,class:"admonition-toggle","aria-expanded":!r.value,"aria-controls":`${a}-content`,onClick:l},[(k(),M("svg",{style:Gt({rotate:r.value?"0deg":"90deg"}),xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[...u[5]||(u[5]=[C("path",{d:"m9 18 6-6-6-6"},null,-1)])],4))],8,due)):te("",!0)]),An(C("div",{id:`${a}-content`,class:"admonition-content","aria-labelledby":a},[q(p(Ni),{"index-key":`admonition-${e.indexKey}`,nodes:o.node.children,"custom-id":o.customId,typewriter:o.typewriter,fade:o.fade,onCopy:u[0]||(u[0]=d=>s("copy",d))},null,8,["index-key","nodes","custom-id","typewriter","fade"])],8,fue),[[xs,!r.value]])],2))}}),[["__scopeId","data-v-a83480e1"]]);Yh.install=e=>{e.component(Yh.__name,Yh)};const j3=()=>Po(()=>import("./d2_markstream-vue-yoD6TSFD.js"),[]);let hh=null,mh=j3,gh=null,x_=!1,S_=!1;function mje(){return co(this,null,function*(){if(hh)return hh;const e=mh;return e?e===j3&&x_?null:gh||(gh=co(null,null,function*(){let t;try{t=yield e()}catch(n){if(e===j3)return e===mh&&(x_=!0,(function(o){S_||(S_=!0,console.warn('[markstream-vue] Optional dependency "@terrastruct/d2" is not installed. D2 blocks will render as source.',o))})(n)),null;throw n}finally{e===mh&&(gh=null)}return e!==mh?null:t?(hh=(function(n){var o;if(!n)return n;if(n.D2&&typeof n.D2=="function")return n.D2;if(n.default&&n.default.D2&&typeof n.default.D2=="function")return n.default.D2;const s=(o=n.default)!=null?o:n;return typeof s=="function"?s:s?.D2&&typeof s.D2=="function"?s.D2:s})(t),hh):null}),gh):null})}let vh=null,OL=null,yh=null;function gje(){return typeof OL=="function"}function vje(){return co(this,null,function*(){if(vh)return vh;const e=OL;return e?yh||(yh=co(null,null,function*(){const t=yield e(),n=(function(o){var s,i,r;if(!o)return null;const l=(s=o.default)!=null?s:o,a=typeof l=="function"&&typeof((i=l.prototype)==null?void 0:i.render)=="function"?l:(r=o.Infographic)!=null?r:l?.Infographic;return typeof a=="function"?a:null})(t);return n?(vh=n,vh):null}).finally(()=>{yh=null}),yh):null})}const yje=Symbol("markstreamLanguageIconResolver"),FL=["cjs","css","csv","gif","htm","html","jpeg","jpg","js","json","jsx","log","md","mjs","pdf","png","scss","svg","ts","tsx","txt","vue","webp","xml","yaml","yml"],pue=new Set(["AGENTS.md","CHANGELOG.md","Dockerfile","LICENSE","Makefile","README.md","package.json","pnpm-lock.yaml","pnpm-workspace.yaml","tsconfig.json","vite.config.ts"]),V3=[...FL].sort((e,t)=>t.length-e.length).join("|"),e4=new RegExp([String.raw`(?:^|[\s([{"'`+"`"+String.raw`])`,String.raw`(`,String.raw`(?:~|\.{1,2}|/)?(?:[A-Za-z0-9_.@+()[\]-]+/)+[A-Za-z0-9_.@+()[\]-]+(?:\.(?:${V3}))?`,String.raw`|`,String.raw`[A-Za-z0-9_.@+()[\]-]+\.(?:${V3})`,String.raw`)`,String.raw`(?:#L?(\d+)|:(\d+))?`,String.raw`(?=$|[\s)"'\]}>.,;!?,。;!?)])`].join(""),"gi"),RL=/[),.;!?,。;!?)]+$/;function hue(e){const t=e.toLowerCase();return FL.some(n=>t.endsWith(`.${n}`))}function mue(e){const t=new Map,n=new RegExp(String.raw`\b(?:path|src)=["'](\/[^"']+\.(?:${V3}))["']`,"gi");let o;for(;(o=n.exec(e))!==null;){const s=o[1];if(!s)continue;const i=s.split("/").pop();i&&t.set(i,s)}return t}function gue(e,t={}){const n=e.trim();if(!n||/^[a-z][a-z0-9+.-]*:\/\//i.test(n))return null;const o=n.match(/^(.*?)(?:#L?(\d+)|:(\d+))?$/i);if(!o)return null;let s=(o[1]??"").replace(RL,"");if(!s)return null;const i=s.split("/").pop()??s,r=s.includes("/"),l=pue.has(i),a=hue(i);if(r&&!l&&!a)return null;if(!r&&!l){const d=t.aliases?.get(i);if(!d)return null;s=d}const c=o[2]??o[3],u=c?Number(c):void 0;return{path:s,line:u!==void 0&&Number.isFinite(u)&&u>0?u:void 0}}function vue(e,t={}){const n=[];e4.lastIndex=0;let o;for(;(o=e4.exec(e))!==null;){const s=o[0]??"",i=o[1]??"",r=s.indexOf(i);if(r<0)continue;const l=o[2]??o[3];let a=i+(l?s.slice(r+i.length):"");const c=a.replace(RL,""),u=a.length-c.length;a=c;const d=gue(a,t);if(!d)continue;const f=o.index+r,h=f+a.length;n.push({...d,start:f,end:h,text:a}),u>0&&(e4.lastIndex-=u)}return n}function t4(e,t){let n=0,o=t-1;for(;o>=0&&e[o]==="\\";)n++,o--;return n%2===1}const yue=/\s/,kue=/\p{Nd}/u;function vu(e,t){const n=e.codePointAt(t);return n===void 0?void 0:String.fromCodePoint(n)}function bue(e,t){if(t<=0)return;const n=e.charCodeAt(t-1),o=n>=56320&&n<=57343&&t>1?t-2:t-1,s=e.codePointAt(o);return s===void 0?void 0:String.fromCodePoint(s)}function A_(e){return e!==void 0&&yue.test(e)}function nf(e){return e!==void 0&&kue.test(e)}function Cue(e,t){const n=e[t+1];return nf(vu(e,t+1))?!0:(n==="-"||n==="+"||n==="."||n==="−"||n==="+"||n==="-")&&nf(vu(e,t+2))}function rg(e){return e!==void 0&&e>="A"&&e<="Z"}const PL=new RegExp(String.raw`^(?:AED|AFN|ALL|AMD|ANG|AOA|ARS|AUD|AWG|AZN|BAM|BBD|BDT|BGN|BHD|BIF|BMD|BND|BOB|BRL|BSD|BTN|BWP|BYN|BZD|CAD|CDF|CHF|CLF|CLP|CNY|COP|CRC|CUC|CUP|CVE|CZK|DJF|DKK|DOP|DZD|EGP|ERN|ETB|EUR|FJD|FKP|GBP|GEL|GHS|GIP|GMD|GNF|GTQ|GYD|HKD|HNL|HRK|HTG|HUF|IDR|ILS|INR|IQD|IRR|ISK|JMD|JOD|JPY|KES|KGS|KHR|KMF|KPW|KRW|KWD|KYD|KZT|LAK|LBP|LKR|LRD|LSL|LYD|MAD|MDL|MGA|MKD|MMK|MNT|MOP|MRU|MUR|MVR|MWK|MXN|MYR|MZN|NAD|NGN|NIO|NOK|NPR|NZD|OMR|PAB|PEN|PGK|PHP|PKR|PLN|PYG|QAR|RON|RSD|RUB|RWF|SAR|SBD|SCR|SDG|SEK|SGD|SHP|SLE|SLL|SOS|SRD|SSP|STN|SVC|SYP|SZL|THB|TJS|TMT|TND|TOP|TRY|TTD|TWD|TZS|UAH|UGX|USD|UYU|UZS|VED|VES|VND|VUV|WST|XAF|XCD|XOF|XPF|YER|ZAR|ZMW|ZWL|HK|US|SG|AU|CA|NZ|NT|TW|RMB|MEX|TT|BZ|EU|UK)$`);function wue(e,t){if(!rg(e[t-1]))return!1;let n=t-1;for(;n>0&&rg(e[n-1]);)n--;return PL.test(e.slice(n,t))||nf(vu(e,t+1))?!0:t-n<=2&&!/[\p{L}\p{Nd}]/u.test(e[n-1]??"")&&!/\p{L}/u.test(vu(e,t+1)??"")}function _ue(e,t){if(!rg(e[t-1]))return!1;let n=t-1;for(;n>0&&rg(e[n-1]);)n--;return PL.test(e.slice(n,t))?!0:t-n<=2&&!/[\p{L}\p{Nd}]/u.test(e[n-1]??"")}const xue=/^[-–—,,、;;::~~(([【//]$/;function Sue(e,t){const n=e[t+1];if(n!=="-"&&n!=="+"&&n!=="."||!nf(vu(e,t+2)))return!1;const o=e[t-1];return o!==void 0&&xue.test(o)}function Aue(e){const t=String.raw`[、,,;;::~~\-–—至到//\s()()=*×=]|和|跟|与|及|或|and|or`;let n=e.replace(new RegExp(String.raw`^(?:${t})+`,"u"),"");for(;;){const s=n.replace(new RegExp(String.raw`^\p{L}+(?:${t})+`,"u"),"").replace(/^[\p{L}][\p{L} ]*(?=\p{Nd})/u,"");if(s===n)break;n=s}if(!/\p{Nd}/u.test(n))return!1;const o=String.raw`[-+]?[\p{Nd}][\p{Nd},.'’]*`;return new RegExp(String.raw`^${o}(?:\p{L}+)?(?:(?:${t})+${o}(?:\p{L}+)?)*$`,"u").test(n)}const il=-1,M_=1,T_=2,E_=3;function Mue(e){const t=e.length,n=new Uint8Array(t),o=new Int32Array(t+1).fill(il),s=new Int32Array(t+1),i=new Int32Array(t+1),r=[],l=[];{const P=[];for(let G=0;G{for(;a=(l[a]?.[1]??0);)a++;const z=l[a];return z!==void 0&&P>=z[0]},u=new Set(' \n\r)。,、;:!?"<>`「」『』【】〔〕()*—–“”‘’'),d=[];for(const P of e.matchAll(/\b(?:https?:\/\/|ftp:\/\/|mailto:|www\.)/gi))d.push(P.index);for(const P of e.matchAll(/\b(?:localhost|(?:\d{1,3}\.){3}\d{1,3}|[\w-]+(?:\.[\w-]+)*\.[a-zA-Z]{2,})(?=(?:\/|\?|:\d))/gi))d.push(P.index);for(const P of e.matchAll(/(?:\.{1,2})?\/[\p{L}\p{Nd}._-]+(?:\/[\p{L}\p{Nd}._-]*)*\?/gu))(P.index===0||!/[\w~/.-]/.test(e[P.index-1]))&&d.push(P.index);d.sort((P,z)=>P-z);let f=-1;for(const P of d){if(PP+7&&!/[\w/?#@~.+&=%-]/.test(e[z+1]??""))break}z++}r.push([P,z]),f=z}const h=[];for(let P=0;P]/.test(G))continue;let Z=z,ee=il,Q=il;for(;Z"){Q=Z;break}if(!W&&X==="/"&&e[Z+1]===">"){Q=Z+1;break}if(!/\s/.test(X)){ee=Z;break}for(;Z"){Q=Z;break}if(W){ee=Z;break}if(oe==="/"&&e[Z+1]===">"){Q=Z+1;break}const xe=/^[a-zA-Z_:][\w:.-]*/.exec(e.slice(Z));if(!xe){ee=Z;break}Z+=xe[0].length;let pe=Z;for(;pe`]+/.exec(e.slice(pe));if(!ge){ee=pe;break}Z=pe+ge[0].length}}}if(Q!==il)h.push([P,Q+1]),P=Q;else if(ee!==il){const X=e.indexOf("<",P+1);P=(X!==-1&&X",P+2);ee===-1?g=!1:(h.push([P,ee+2]),P=ee+1,W=!0)}else if(z==="!"){if(e[P+2]==="-"&&e[P+3]==="-"){if(m){const ee=e.indexOf("-->",P+4);ee===-1?m=!1:(h.push([P,ee+3]),P=ee+2,W=!0)}}else if(e.startsWith("[CDATA[",P+2)){if(b){const ee=e.indexOf("]]>",P+9);ee===-1?b=!1:(h.push([P,ee+3]),P=ee+2,W=!0)}}else if(_&&/[A-Z]/.test(e[P+2]??"")){const ee=e.indexOf(">",P+3);ee===-1?_=!1:(h.push([P,ee+1]),P=ee,W=!0)}}if(W)continue;if(z!==void 0&&/[a-zA-Z]/.test(z)){const ee=/^[a-zA-Z][a-zA-Z0-9+.-]{1,31}:/.exec(e.slice(P+1));if(ee){let Q=P+1+ee[0].length;for(;Q"&&e[Q]!=="<"&&!/\s/.test(e[Q]);)Q++;if(e[Q]===">"){h.push([P,Q+1]),P=Q;continue}}}if(z===void 0||!/[\w.!#$%&'*+/=?^`{|}~-]/.test(z))continue;let U=P+1;for(;U"&&(h.push([P,U+1]),P=U)}}h.sort((P,z)=>P[0]-z[0]);const v=[];for(const[P,z]of h){const W=v[v.length-1];W&&P<=W[1]?W[1]=Math.max(W[1],z):v.push([P,z])}r.push(...v);let y=0;const w=P=>{for(;y=(v[y]?.[1]??0);)y++;const z=v[y];return z!==void 0&&P>=z[0]},x=[];let A=null,L=0,S=!1;for(let P=0;P"&&(S=!1);else if(!(c(P)||w(P))){if(A!==null)e[P]===A&&(A=null);else if(x.length>0&&(e[P]==='"'||e[P]==="'")&&P>0&&/\s/.test(e[P-1]))A=e[P];else if(e[P]==="[")L++;else if(e[P]==="]")L>0&&e[P+1]==="("&&(x.push(P),S=e[P+2]==="<",P++),L=Math.max(0,L-1);else if(e[P]==="("&&x.length>0)x.push(-1);else if(e[P]===")"&&x.length>0){const z=x.pop();if(z!==void 0&&z>=0){const W=e.slice(z+2,P);(/\s/.exec(W)===null||W.startsWith("<")&&/^<(?:\\[<>]|[^<>])*>$/.test(W)||/^[^\s]*\s+("([^"\\]|\\.)*"|'([^'\\]|\\.)*'|\(([^()\\]|\\.)*\))$/.test(W))&&r.push([z,P+1])}}}r.sort((P,z)=>P[0]-z[0]);const T=[];for(const[P,z]of r){const W=T[T.length-1];W&&P<=W[1]?W[1]=Math.max(W[1],z):T.push([P,z])}const R=P=>{let z=0,W=T.length-1;for(;z<=W;){const U=z+W>>1,G=T[U];if(G===void 0)return!1;if(P=G[1])z=U+1;else return!0}return!1};for(let P=0;P=0;P--)n[P]===E_&&(B=P),o[P]=B;const I=/^[\p{L}\p{Nd}\\|{([+.¬°-±×÷′-″←-⇿∀-⋿^_<>=-]$/u,$=/[^\p{L}\p{Nd}\s]$/u,D=/[^\s\u0020-\u007E\u0370-\u03FF\u{1D400}-\u{1D7FF}\p{Nd}¬°-±×÷′-″←-⇿∀-⋿]/u,H=/(?:^|\s)[a-z]{2,}/,O=(P,z)=>{const W=vu(e,P+1);if(W===void 0||!I.test(W))return!1;const U=o[P+1]??il;if(U!==il){const G=e.slice(P+1,U);return!(G.length===((G.codePointAt(0)??0)>65535?2:1))&&D.test(G)||/[,;:!?]$/.test(G)||/^[a-z]{2,}$/.test(G)?!1:(s[U]??0)-(s[P+1]??0)===0&&(i[U]??0)-(i[P+1]??0)===0}return $.test(z)||D.test(z)||H.test(z)};return(P,z=-1)=>{if(e[P]!=="$"||n[P]===M_||e[P+1]==="$"||e[P-1]==="$"&&z!==P||wue(e,P)||P+1>=t||A_(e[P+1]))return null;const W=o[P+1]??il;if(W===il||(s[W]??0)-(s[P+1]??0)>0||(i[W]??0)-(i[P+1]??0)>0)return null;const U=e.slice(P+1,W);return/^\{[A-Z_][A-Z0-9_]*(?:\}$|[:-])/.test(U)||e[W+1]==="{"&&/^\{[A-Za-z_][A-Za-z0-9_]*(?:[:-][^{}]*)?\}$/.test(U)||nf(bue(e,P))&&Aue(U)||Cue(e,P)&&(O(W,U)||_ue(e,W)||/\s/.test(U)&&/\p{Nd}$/u.test(U)&&!/[+\-*/^=_<>|\\¬°-±×÷′-″←-⇿∀-⋿]/.test(U)||e[W+1]==="$"&&!/\p{L}/u.test(U)&&/[^\p{L}\p{Nd}\s]$/u.test(U))?null:{content:U,end:W+1}}}const I_=new WeakMap;function Tue(e,t){if(e.src[e.pos]!=="$")return!1;let n=I_.get(e);(!n||n.src!==e.src)&&(n={src:e.src,match:Mue(e.src),lastEnd:-1},I_.set(e,n));const o=n.match(e.pos,n.lastEnd);if(!o||o.end>e.posMax)return!1;if(n.lastEnd=o.end,t)return e.pos=o.end,!0;const s=e.push("math_inline","math",0);return s.content=o.content,s.markup="$",s.raw=e.src.slice(e.pos,o.end),s.loading=!1,e.pos=o.end,!0}function Eue(e){return e.inline.ruler.disable("math"),e.inline.ruler.before("escape","math",Tue),e}const Iue=12e4,Lue=6e4,$ue=32,Nue=3e4,L_=/(^|\n)(`{3,}|~{3,})[^\n]*\n([\s\S]*?)(?:\n)?\2(?=\n|$)/g;function Oue(e){let t=0,n=0,o=0;L_.lastIndex=0;let s;for(;(s=L_.exec(e))!==null;){const r=s[3]??"";t+=1,n+=r.length,o=Math.max(o,r.length)}return{codeRenderer:e.length>=Iue||n>=Lue||t>=$ue||o>=Nue?"pre":"shiki",codeFenceCount:t,codeChars:n}}async function DL(e){const t=typeof navigator<"u"?navigator.clipboard:void 0;if(t&&typeof t.writeText=="function")try{return await t.writeText(e),!0}catch{}return Rue(e)}function Fue(e){if(typeof e!="string")return;const t=typeof navigator<"u"?navigator.clipboard:void 0;t&&typeof t.writeText=="function"||DL(e)}function Rue(e){if(typeof document>"u"||typeof document.execCommand!="function")return!1;const t=document.createElement("textarea");t.value=e,t.setAttribute("readonly",""),t.style.position="fixed",t.style.top="-9999px",t.style.left="-9999px",t.style.opacity="0",document.body.appendChild(t);let n=!1;try{t.focus(),t.select(),n=document.execCommand("copy")}catch{n=!1}finally{document.body.removeChild(t)}return n}const BL="md-table-wide",HL="md-table-toggle",zL="md-table-fade",$_="md-table-toggle--show",Pue="md-table-at-end",Due="kimi-table-layout",WL='',Bue='';function Up(e){return e.querySelector(`button.${HL}`)}function UL(e){return e.querySelector(`.${zL}`)}const Hue=26;function zue(e){const t=Up(e);if(!t)return;const n=e.querySelector("thead tr")??e.querySelector("tr");if(!n)return;const o=n.getBoundingClientRect(),s=e.getBoundingClientRect().top,i=Math.max(2,Math.round(o.top-s+(o.height-Hue)/2));t.style.top=`${i}px`,t.style.right=`${i}px`}function Wue(e){return e.closest(".a-msg .msg")!==null}function Uue(e){const t=e.querySelector("table");return t!==null&&t.scrollWidth>e.clientWidth+1}function jL(e){const t=`translateX(${e.scrollLeft}px)`,n=UL(e);n&&(n.style.transform=t);const o=Up(e);o&&(o.style.transform=t);const s=e.scrollLeft+e.clientWidth>=e.scrollWidth-2;e.classList.toggle(Pue,s)}function jue(e,t){const n=Up(e);if(n)return n;if(!Wue(e))return null;const o=document.createElement("div");o.className=zL,o.setAttribute("aria-hidden","true");const s=document.createElement("button");return s.type="button",s.className=HL,s.innerHTML=WL,s.setAttribute("aria-label",t.widen),s.title=t.widen,s.addEventListener("click",i=>{i.preventDefault(),i.stopPropagation(),Vue(e,t)}),e.appendChild(o),e.appendChild(s),e.addEventListener("scroll",()=>jL(e),{passive:!0}),h5(e),s}function Vue(e,t){const n=e.classList.toggle(BL),o=Up(e);if(o){o.innerHTML=n?Bue:WL;const s=n?t.restore:t.widen;o.setAttribute("aria-label",s),o.title=s}h5(e),e.dispatchEvent(new CustomEvent(Due,{bubbles:!0}))}function h5(e){const t=Up(e);if(!t)return;const n=Uue(e),o=e.classList.contains(BL);t.classList.toggle($_,n||o);const s=UL(e);s&&s.classList.toggle($_,n),zue(e),jL(e)}function que(e){return new Worker("/assets/katexRenderer.worker-CO_gEm4q.js",{type:"module",name:e?.name})}function Kue(e){return new Worker("/assets/mermaidParser.worker-BFSlSHEW.js",{type:"module",name:e?.name})}const Zue={key:1,class:"diff-wrap"},Gue={class:"diff-bar"},Yue=["aria-label","onClick"],Xue={class:"diff-pre"},Jue={key:0,class:"diff-sign"},Que={class:"diff-text"},ede="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",N_="github-light",O_="github-dark",tde=et({__name:"Markdown",props:{text:{},openFile:{},streaming:{type:Boolean,default:!1}},setup(e){zre(),ele(),Ure(),ole(),Wre(new que),nle(new Kue);const{t}=df(),n=dn("resolveImage"),o=K(null),s=e,i=F(()=>!s.streaming),r=F(()=>mue(s.text??"")),l=F(()=>s.streaming?{codeRenderer:"shiki",codeFenceCount:0,codeChars:0}:Oue(s.text??"")),a=o2(),c=F(()=>!s.streaming),u=Uo(new Map),d=new Set,f=/(!\[[^\]]*\]\()\s*([^)\s]+)([^)]*\))/g,h=/(]*?\bsrc=")([^"]+)(")/gi;function m(P){return!/^(https?:|data:|blob:)/i.test(P)}function g(P){if(!n)return;const z=[];for(const W of[f,h]){W.lastIndex=0;let U;for(;(U=W.exec(P))!==null;)z.push(U[2]??"")}for(const W of z)!W||!m(W)||u.has(W)||d.has(W)||(d.add(W),n(W).then(U=>{u.set(W,U!==W?U:"")}).catch(()=>{u.set(W,"")}).finally(()=>{d.delete(W)}))}function b(P){if(!n)return P;const z=W=>{if(!m(W))return null;const U=u.get(W);return U===void 0?ede:U===""?null:U};return P.replace(f,(W,U,G,Z)=>{const ee=z(G);return ee===null?W:`${U}${ee}${Z}`}).replace(h,(W,U,G,Z)=>{const ee=z(G);return ee===null?W:`${U}${ee}${Z}`})}Je(()=>s.text,P=>g(P??""),{immediate:!0});function _(){if(!o.value||!s.openFile||s.streaming)return;const P=document.createTreeWalker(o.value,NodeFilter.SHOW_TEXT),z=[];let W=P.nextNode();for(;W;){const U=W,G=U.parentElement;G&&!G.closest("a, pre, .md-file-link, svg")&&U.data.trim().length>0&&z.push(U),W=P.nextNode()}for(const U of z){const G=vue(U.data,{aliases:r.value});if(G.length===0||!U.parentNode)continue;const Z=document.createDocumentFragment();let ee=0;for(const Q of G){Q.start>ee&&Z.append(document.createTextNode(U.data.slice(ee,Q.start)));const X=document.createElement("button");X.type="button",X.className="md-file-link",X.textContent=Q.text,X.title=Q.line?`${Q.path}:${Q.line}`:Q.path,X.addEventListener("click",oe=>{oe.preventDefault(),oe.stopPropagation(),s.openFile?.({path:Q.path,line:Q.line})}),Z.append(X),ee=Q.end}ee{U.preventDefault(),U.stopPropagation(),s.openFile?.({path:y(W)})}))}}function x(){return{widen:t("conversation.widenTable"),restore:t("conversation.restoreTableWidth")}}function A(){if(!o.value||s.streaming)return;const P=x();for(const z of o.value.querySelectorAll(".table-node-wrapper"))jue(z,P)}function L(){if(!(!o.value||s.streaming))for(const P of o.value.querySelectorAll(".table-node-wrapper"))h5(P)}function S(){bt().then(()=>{_(),w(),A()})}Je(()=>s.text,S),Je(()=>s.streaming,S);let T=null,R=null;cn(()=>{S(),o.value&&(T=new MutationObserver(S),T.observe(o.value,{childList:!0,subtree:!0}),R=new ResizeObserver(L),R.observe(o.value))}),kn(()=>{T?.disconnect(),R?.disconnect()});const B={showHeader:!0,showCopyButton:!0,showExpandButton:!1,showPreviewButton:!1,showCollapseButton:!1,showFontSizeButtons:!1,loading:!1,monacoOptions:{lineNumbers:!1,fontSize:13,fontFamily:"var(--font-mono)",padding:{top:12,bottom:12}}},I=/(^|\n)(?:```|~~~)diff\b[^\n]*\n([\s\S]*?)(?:\n)?(?:```|~~~)(?=\n|$)/g,$=F(()=>{const P=b(s.text??""),z=[];let W=0;I.lastIndex=0;let U;for(;(U=I.exec(P))!==null;){const Z=U[1]??"",ee=P.slice(W,U.index)+(Z||"");ee.trim()&&z.push({kind:"md",text:ee}),z.push({kind:"diff",code:U[2]??""}),W=I.lastIndex}const G=P.slice(W);return(G.trim()||z.length===0)&&z.push({kind:"md",text:G}),z});function D(P){return P.split(` -`).map(z=>z.startsWith("@@")?{type:"hunk",sign:"",text:z}:/^\+(?!\+\+)/.test(z)?{type:"add",sign:"+",text:z.slice(1)}:/^-(?!--)/.test(z)?{type:"del",sign:"-",text:z.slice(1)}:z.startsWith(" ")?{type:"ctx",sign:"",text:z.slice(1)}:{type:"ctx",sign:"",text:z})}const H=K(null);function O(P,z){DL(P).then(W=>{W&&(H.value=z,setTimeout(()=>{H.value=null},1400))})}return(P,z)=>(k(),M("div",{ref_key:"mdRef",ref:o,class:"md"},[(k(!0),M(De,null,vt($.value,(W,U)=>(k(),M(De,{key:U},[W.kind==="md"?(k(),me(p(Ni),{key:0,content:W.text,"custom-markdown-it":p(Eue),mode:"chat","code-renderer":l.value.codeRenderer,"is-dark":p(a),"code-block-light-theme":N_,"code-block-dark-theme":O_,themes:[N_,O_],"code-block-props":B,final:i.value,"smooth-streaming":e.streaming,"batch-rendering":c.value,"defer-nodes-until-visible":!1,onCopy:p(Fue)},null,8,["content","custom-markdown-it","code-renderer","is-dark","themes","final","smooth-streaming","batch-rendering","onCopy"])):(k(),M("div",Zue,[C("div",Gue,[z[0]||(z[0]=C("span",{class:"diff-lang"},"diff",-1)),q(p($n),{text:p(t)("filePreview.copyCode")},{default:be(()=>[C("button",{class:"diff-copy","aria-label":p(t)("filePreview.copyCode"),onClick:G=>O(W.code,U)},[q(p(Me),{name:H.value===U?"check":"copy",size:"sm"},null,8,["name"])],8,Yue)]),_:2},1032,["text"])]),C("pre",Xue,[C("code",null,[(k(!0),M(De,null,vt(D(W.code),(G,Z)=>(k(),M("span",{key:Z,class:Fe(["diff-line",`diff-${G.type}`])},[G.type!=="hunk"?(k(),M("span",Jue,N(G.sign),1)):te("",!0),C("span",Que,N(G.text),1)],2))),128))])])]))],64))),128))],512))}}),Mu=mt(tde,[["__scopeId","data-v-2ec518c1"]]),nde={state:"idle"};function ode(e){const t=K(nde),n=K(mi(ln.updateSkippedVersion)),o=K(!1);if(typeof e?.getUpdateAutoDownload=="function"&&e.getUpdateAutoDownload().then(i=>{o.value=i}).catch(()=>{}),e!==void 0){let i=!1;e.onUpdateStatus(r=>{i=!0,t.value=r}),e.getUpdateStatus().then(r=>{i||(t.value=r)}).catch(()=>{})}const s=F(()=>{const i=t.value;return!(i.state==="idle"||i.state==="available"&&i.version!==void 0&&i.version===n.value)});return{status:t,visible:s,canCheck:typeof e?.checkForUpdates=="function",autoDownload:o,canToggleAutoDownload:typeof e?.getUpdateAutoDownload=="function"&&typeof e?.setUpdateAutoDownload=="function",setAutoDownload:i=>{o.value=i,e?.setUpdateAutoDownload?.(i).catch(()=>{})},skipVersion:()=>{const i=t.value.version;t.value.state==="available"&&i!==void 0&&(n.value=i,Ds(ln.updateSkippedVersion,i))},check:async()=>{if(typeof e?.checkForUpdates!="function")return Promise.resolve({outcome:"unsupported"});const i=await e.checkForUpdates().catch(()=>({outcome:"error",message:"bridge call failed"}));return i.outcome==="available"&&i.version!==void 0&&i.version===n.value&&(n.value=null,Qi(ln.updateSkippedVersion)),i},download:()=>{e?.downloadUpdate().catch(()=>{})},install:()=>{e?.installUpdate().catch(()=>{})}}}let n4=null;function VL(){return n4===null&&(n4=ode(window.kimiDesktop)),n4}const sde=["data-state"],ide=["aria-label"],rde={class:"upd-pill-text"},lde={key:0,class:"upd-meta"},ade={key:1,class:"upd-notes"},cde={class:"upd-notes-title"},ude={key:2,class:"upd-progress"},dde={key:3,class:"upd-message"},fde={class:"upd-foot"},pde={class:"upd-foot-actions"},hde=et({__name:"UpdateIndicator",setup(e){const{t,locale:n}=$t(),{status:o,visible:s,skipVersion:i,download:r,install:l,autoDownload:a,setAutoDownload:c,canToggleAutoDownload:u}=VL(),d=K(!1),f="0.32.0".trim()?"0.32.0":"",h=F(()=>{switch(o.value.state){case"available":return t("sidebar.update");case"downloading":return`${o.value.percent??0}%`;case"downloaded":return t("sidebar.updateDone");case"error":return t("sidebar.updateFailed");default:return""}}),m=F(()=>{switch(o.value.state){case"available":return t("sidebar.updateAvailable",{version:o.value.version??""});case"downloading":return t("sidebar.updateDownloading",{percent:o.value.percent??0});case"downloaded":return t("sidebar.updateReady",{version:o.value.version??""});case"error":return t("sidebar.updateFailed");default:return""}}),g=F(()=>{const L=o.value.releaseDate;if(L===void 0||L==="")return"";const S=new Date(L),T=Number.isNaN(S.getTime())?L:S.toLocaleDateString();return t("sidebar.updateReleaseDate",{date:T})}),b=F(()=>{const L=[];return g.value!==""&&L.push(g.value),f!==""&&L.push(t("sidebar.updateCurrentVersion",{version:f})),L.join(" · ")}),_=F(()=>o.value.percent??0),v=F(()=>{const L=o.value.releaseNotes;return L===void 0?"":((n.value.toLowerCase().startsWith("zh")?L.zh:L.en)??L.zh??L.en??"").trim()}),y=F(()=>{switch(o.value.state){case"error":return"alert-triangle";default:return"download"}});function w(){r()}function x(){i(),d.value=!1}function A(){l(),d.value=!1}return(L,S)=>p(s)?(k(),M("span",{key:0,class:"upd","data-state":p(o).state},[C("button",{class:"upd-pill",type:"button","aria-label":h.value,onClick:S[0]||(S[0]=T=>d.value=!0)},[q(p(Me),{class:"upd-pill-icon",name:y.value,size:"sm"},null,8,["name"]),C("span",rde,N(h.value),1)],8,ide),q(p(sa),{open:d.value,title:m.value,size:"lg","onUpdate:open":S[4]||(S[4]=T=>d.value=T)},{foot:be(()=>[C("div",fde,[C("div",pde,[p(o).state==="available"?(k(),M(De,{key:0},[q(p(Rt),{variant:"ghost",onClick:x},{default:be(()=>[Ve(N(p(t)("sidebar.updateSkip")),1)]),_:1}),q(p(Rt),{onClick:w},{default:be(()=>[Ve(N(p(t)("sidebar.updateDownloadNow")),1)]),_:1})],64)):p(o).state==="downloading"?(k(),me(p(Rt),{key:1,variant:"secondary",onClick:S[1]||(S[1]=T=>d.value=!1)},{default:be(()=>[Ve(N(p(t)("sidebar.updateBackground")),1)]),_:1})):p(o).state==="downloaded"?(k(),M(De,{key:2},[q(p(Rt),{variant:"ghost",onClick:S[2]||(S[2]=T=>d.value=!1)},{default:be(()=>[Ve(N(p(t)("sidebar.updateRestartLater")),1)]),_:1}),q(p(Rt),{onClick:A},{default:be(()=>[Ve(N(p(t)("sidebar.updateRestartNow")),1)]),_:1})],64)):p(o).state==="error"?(k(),me(p(Rt),{key:3,variant:"danger-soft",onClick:w},{default:be(()=>[Ve(N(p(t)("sidebar.updateRetry")),1)]),_:1})):te("",!0)]),p(u)?(k(),me(p(Pz),{key:0,class:"upd-auto","model-value":p(a),"onUpdate:modelValue":S[3]||(S[3]=T=>p(c)(T))},{default:be(()=>[Ve(N(p(t)("sidebar.updateAutoDownload")),1)]),_:1},8,["model-value"])):te("",!0)])]),default:be(()=>[(p(o).state==="available"||p(o).state==="downloaded")&&b.value?(k(),M("p",lde,N(b.value),1)):te("",!0),v.value?(k(),M("section",ade,[C("h4",cde,N(p(t)("sidebar.updateWhatsNew")),1),q(p(Mu),{text:v.value},null,8,["text"])])):te("",!0),p(o).state==="downloading"?(k(),M("div",ude,[C("div",{class:"upd-progress-fill",style:Gt({width:`${_.value}%`})},null,4)])):te("",!0),p(o).state==="error"&&p(o).message?(k(),M("p",dde,N(p(o).message),1)):te("",!0)]),_:1},8,["open","title"])],8,sde)):te("",!0)}}),mde=mt(hde,[["__scopeId","data-v-fdb68462"]]),lg=[{code:"en",label:"English"},{code:"zh",label:"简体中文"}],Pn=rz({locale:gM()});function m5(e){Pn.global.locale.value=e,Ds(ln.locale,e)}function gde(){return window.kimiDesktop}function qL(e,t,n){const o=n.length===0?void 0:n.length===1?n[0]:n;try{gde()?.log?.(e,t,o)}catch{}}function fl(e,...t){console.warn(e,...t),qL("warn",e,t)}function jl(e,...t){console.error(e,...t),qL("error",e,t)}const vde=["app:load:start","app:load:complete","export:start","export:accepted","export:failed","prompt:start","prompt:accepted","prompt:failed","session:snapshot:start","session:snapshot:accepted","session:snapshot:failed","operation:failed","window:error","window:unhandled-rejection","ws:connection","ws:error","ws:resync","ws:stale-reconnect"],KL=500,ag=256*1024,F_=200,o4=16384,s4=500,i4=50,r4=50,yde=6,kde=/api[_-]?key|authorization|token|secret|password|cookie|credential|email|phone|nickname|avatar/i,bde=/^[A-Za-z0-9+/=_-]{200,}$/;let l4=null;function Gr(){if(l4!==null)return l4;let e=!1;try{if(typeof location<"u"){const t=new URLSearchParams(location.search).get("debug");(t==="1"||t==="true")&&(e=!0)}}catch{}return e||(e=mi(ln.debug)==="1"),l4=e,e}const Ua=[],xd=[];let k1=0;const qc=[];let b1=0,Cde=1;const cg=new TextEncoder,wde=new Set(vde),g5=K(0),C1=Kr(!1);function _de(){return Ua}function xde(){Ua.length=0,xd.length=0,k1=0,qc.length=0,b1=0,g5.value++}function ia(e){if(!C1.value){try{const t={id:Cde++,ts:Date.now(),source:e.source,kind:String(Wd(e.kind)),label:String(Wd(e.label)),sessionId:e.sessionId===void 0?void 0:String(Wd(e.sessionId)),method:e.method,path:e.path,eventType:e.eventType,seq:e.seq,offset:e.offset,status:e.status,code:e.code,requestId:e.requestId,durationMs:e.durationMs,detail:ac(e.detail)},n=JSON.stringify(t),o=cg.encode(n).byteLength;if(o>ag)return;for(Ua.push(t),xd.push(n),k1+=o+(xd.length>1?1:0);Ua.length>KL||k1>ag;){const s=xd.shift();Ua.shift(),s!==void 0&&(k1-=cg.encode(s).byteLength,xd.length>0&&(k1-=1))}}catch{return}g5.value++}}function Oc(e){if(typeof e=="string")return e.length<=F_?e:e.slice(0,F_)}function ur(e){return typeof e=="number"&&Number.isFinite(e)?e:void 0}function Sde(e,t){if(wde.has(e))try{const n={ts:Date.now(),event:e,sessionId:Oc(t?.sessionId),status:Oc(t?.status),operation:Oc(t?.operation),seq:ur(t?.seq),durationMs:ur(t?.durationMs),messageCount:ur(t?.messageCount),contentCount:ur(t?.contentCount),mediaCount:ur(t?.mediaCount),sessionCount:ur(t?.sessionCount),workspaceCount:ur(t?.workspaceCount),promptId:Oc(t?.promptId),zipBytes:ur(t?.zipBytes),errorName:Oc(t?.errorName),errorCode:ur(t?.errorCode),requestId:Oc(t?.requestId),phase:Oc(t?.phase),httpStatus:ur(t?.httpStatus),fatal:typeof t?.fatal=="boolean"?t.fatal:void 0,line:ur(t?.line),col:ur(t?.col)},o=JSON.stringify(n),s=cg.encode(o).byteLength;if(s>ag)return;for(qc.push(o),b1+=s+(qc.length>1?1:0);qc.length>KL||b1>ag;){const i=qc.shift();i!==void 0&&(b1-=cg.encode(i).byteLength,qc.length>0&&(b1-=1))}}catch{return}}function Wd(e,t=0){if(e==null)return e;const n=typeof e;if(n==="number"||n==="boolean")return e;if(n==="string"){const i=e;return bde.test(i)?`[base64-like, ${i.length} chars omitted]`:i.length>s4?`${i.slice(0,s4)}… [+${i.length-s4} chars]`:i}if(n!=="object")return String(e);if(t>=yde)return"[max depth]";if(Array.isArray(e)){const i=e.slice(0,i4).map(r=>Wd(r,t+1));return e.length>i4&&i.push(`[+${e.length-i4} more items]`),i}const o={},s=Object.entries(e);for(const[i,r]of s.slice(0,r4))o[i]=kde.test(i)?"[redacted]":Wd(r,t+1);return s.length>r4&&(o._truncatedKeys=s.length-r4),o}function ac(e){if(e===void 0)return;const t=Wd(e);try{const n=JSON.stringify(t);if(n!==void 0&&n.length>o4)return{_truncated:`detail JSON was ${n.length} chars; first ${o4} kept`,preview:n.slice(0,o4)}}catch{return"[unserializable detail]"}return t}function Ade(e){Gr()&&ia({source:"rest",kind:"rest:request",label:`→ ${e.method} ${e.path}`,method:e.method,path:e.path,requestId:e.requestId,detail:{url:e.url,body:ac(e.body)}})}function Mde(e){if(!Gr())return;const t=e.code!==0;ia({source:"rest",kind:t?"rest:error":"rest:response",label:`← ${e.method} ${e.path} ${e.status} code=${e.code}${t?` "${e.msg}"`:""} ${Math.round(e.durationMs)}ms`,method:e.method,path:e.path,requestId:e.requestId,status:e.status,code:e.code,durationMs:e.durationMs,detail:{envelope:{code:e.code,msg:e.msg,request_id:e.envelopeRequestId},data:ac(e.data)}})}function Tde(e){Gr()&&ia({source:"rest",kind:"rest:error",label:`✕ ${e.method} ${e.path} ${e.phase} error${e.status!==void 0?` (HTTP ${e.status})`:""} ${Math.round(e.durationMs)}ms`,method:e.method,path:e.path,requestId:e.requestId,status:e.status,durationMs:e.durationMs,detail:{phase:e.phase,error:String(e.error)}})}function Ede(e,t){Gr()&&ia({source:"ws",kind:"ws:lifecycle",eventType:e,label:`ws ${e}`,detail:ac(t)})}function Ide(e){if(!Gr())return;const t=e??{},n=typeof t.type=="string"?t.type:"(unknown)",o=t.payload,s=typeof o?.session_id=="string"?o.session_id:void 0;ia({source:"ws",kind:"ws:out",eventType:n,sessionId:s,label:`→ ${n}`,detail:ac(e)})}function Lde(e){if(!Gr())return;const t=e??{},n=typeof t.type=="string"?t.type:"(unknown)",o=typeof t.session_id=="string"?t.session_id:typeof t.payload?.session_id=="string"?t.payload.session_id:void 0,s=typeof t.seq=="number"?t.seq:void 0,i=typeof t.offset=="number"?t.offset:void 0,r=[o,s!==void 0?`seq=${s}`:void 0,i!==void 0?`offset=${i}`:void 0,t.volatile===!0?"volatile":void 0].filter(Boolean);ia({source:"ws",kind:"ws:in",eventType:n,sessionId:o,seq:s,offset:i,label:`← ${n}${r.length>0?` (${r.join(" ")})`:""}`,detail:ac(t.payload)})}const $de={error:"✕",warn:"⚠",info:"ℹ",debug:"·",log:"·"};function Nde(e,t,n){Gr()&&ia({source:"client",kind:`client:${e}`,label:`${$de[e]} ${t}`,detail:ac(n)})}function Ode(e,t){Gr()&&ia({source:"client",kind:"client:event",label:`· ${e}`,detail:ac(t)})}function ri(e,t){Sde(e,t),ia({source:"client",kind:"client:key",label:e,sessionId:typeof t?.sessionId=="string"?t.sessionId:void 0,seq:typeof t?.seq=="number"?t.seq:void 0,durationMs:typeof t?.durationMs=="number"?t.durationMs:void 0,detail:t})}let a4=!1,kh=null;function Fde(){if(a4)return()=>kh?.();a4=!0;const e=[];try{if(typeof window<"u"){const n=s=>{ri("window:error",{status:"failed",errorName:s.error instanceof Error?s.error.name:"Error",line:s.lineno,col:s.colno}),jl(`[kimi-web] window error: ${s.message}`,s.error instanceof Error?s.error.stack:void 0)},o=s=>{const i=s.reason;ri("window:unhandled-rejection",{status:"failed",errorName:i instanceof Error?i.name:typeof i}),jl(`[kimi-web] unhandled rejection: ${Pde(i)}`,i instanceof Error?i.stack:void 0)};window.addEventListener("error",n),window.addEventListener("unhandledrejection",o),e.push(()=>{window.removeEventListener("error",n)}),e.push(()=>{window.removeEventListener("unhandledrejection",o)})}}catch{}if(Gr())for(const n of["error","warn","log","info","debug"]){const o=console[n];if(typeof o!="function")continue;const s=(...i)=>{try{Nde(n,i.map(Rde).join(" "),i.length>1?i:i[0])}catch{}o.apply(console,i)};console[n]=s,e.push(()=>{console[n]===s&&(console[n]=o)})}const t=()=>{if(kh===t){for(const n of e.toReversed())n();kh=null,a4=!1}};return kh=t,t}function Rde(e){if(typeof e=="string")return e;if(e instanceof Error)return`${e.name}: ${e.message}`;try{return JSON.stringify(e)}catch{return String(e)}}function Pde(e){if(e instanceof Error)return e.message;try{return String(e)}catch{return"[unstringifiable reason]"}}function ZL(e=Ua){if(typeof document>"u")return;const t=new Blob([Dde(e)],{type:"application/x-ndjson"}),n=URL.createObjectURL(t);let o;try{o=document.createElement("a"),o.href=n,o.download=`kimi-web-log-${new Date().toISOString().replaceAll(/[:.]/g,"-")}.jsonl`,document.body.append(o),o.click()}finally{o?.remove(),setTimeout(()=>{try{URL.revokeObjectURL(n)}catch{}},0)}}function Dde(e=Ua){return e===Ua?xd.join(` -`):e.map(t=>JSON.stringify(t)).join(` -`)}function Bde(){return qc.join(` -`)}const $s="kimi-web.server-credential",Hde="token",zde=10080*60*1e3;let hl;const q3=new Set;function Wde(){if(typeof window>"u")return;const e=window.location.hash??"";if(!e.startsWith("#"))return;const n=new URLSearchParams(e.slice(1)).get(Hde);if(!n)return;const o=new URL(window.location.href);return o.hash="",window.history.replaceState(window.history.state,"",`${o.pathname}${o.search}`),n}function K3(e){return{version:1,credential:e,expiresAt:Date.now()+zde}}function Ude(e){return JSON.stringify(e)}function v5(e){try{const t=JSON.parse(e);if(typeof t!="object"||t===null)return;const n=t;return n.version!==1||typeof n.credential!="string"||n.credential.length===0||typeof n.expiresAt!="number"||!Number.isFinite(n.expiresAt)?void 0:{version:1,credential:n.credential,expiresAt:n.expiresAt}}catch{return}}function Z3(e){globalThis.localStorage?.setItem($s,Ude(e))}function jde(){try{const e=globalThis.localStorage?.getItem($s);if(e){const n=v5(e);if(n===void 0){const o=K3(e);let s=!1;try{Z3(o),s=!0}catch{}if(!s)try{globalThis.localStorage?.getItem($s)===e&&globalThis.localStorage?.removeItem($s),s=!0}catch{}try{globalThis.sessionStorage?.removeItem($s)}catch{}return s?o:void 0}if(n.expiresAt>Date.now())return n;globalThis.sessionStorage?.removeItem($s),globalThis.localStorage?.getItem($s)===e&&globalThis.localStorage?.removeItem($s);return}const t=globalThis.sessionStorage?.getItem($s);if(t){const n=K3(t);let o=!1;try{Z3(n),o=!0}catch{}try{globalThis.sessionStorage?.removeItem($s),o=!0}catch{}return o?n:void 0}return}catch{return}}function Vde(){const e=Wde();return e?(GL(e),!0):(hl=jde(),hl!==void 0)}function qde(){if(hl!==void 0){if(hl.expiresAt<=Date.now()){Kde(hl);return}return hl.credential}}function Kde(e){hl=void 0;try{globalThis.sessionStorage?.removeItem($s);const t=globalThis.localStorage?.getItem($s),n=t==null?void 0:v5(t);(n===void 0?t===e.credential:n.credential===e.credential&&n.expiresAt===e.expiresAt)&&globalThis.localStorage?.removeItem($s)}catch{}}function GL(e){const t=K3(e);hl=t;try{Z3(t)}catch{}try{globalThis.sessionStorage?.removeItem($s)}catch{}}function Zde(){const e=hl;hl=void 0;try{const t=globalThis.localStorage?.getItem($s),o=(t==null?void 0:v5(t))?.credential??t;e!==void 0&&o===e.credential&&globalThis.localStorage?.removeItem($s),globalThis.sessionStorage?.removeItem($s)}catch{}}function Gde(e){return q3.add(e),()=>{q3.delete(e)}}function Yde(){Zde();for(const e of q3)try{e()}catch{}}const R_=ln.clientId,Xde="kimi-code-web",Jde="web";function Qde(){return{serverHttpUrl:tfe(),clientId:ofe(),clientName:Xde,clientVersion:sfe(),clientUiMode:Jde}}function efe(){return typeof window<"u"&&window.location?.origin?window.location.origin:"http://127.0.0.1:58627"}function tfe(){const e=YL();return G3(e||void 0)}const P_="kimi-desktop-server-origin";function YL(){if(typeof window>"u")return;const e=new URLSearchParams(window.location.search).get("kimi_origin");try{return e?(window.sessionStorage.setItem(P_,e),e):window.sessionStorage.getItem(P_)??void 0}catch{return e??void 0}}function G3(e){const t=e&&e.trim()?e:efe(),n=new URL(t);return n.pathname=n.pathname.replace(/\/v1\/?$/,"").replace(/\/$/,""),n.search="",n.hash="",n.toString().replace(/\/$/,"")}function D_(e){return e.replace(/^https?:\/\//,"").replace(/\/$/,"")}function nfe(){if(typeof window<"u"){const t=YL();if(t)return D_(G3(t))}const e=typeof window<"u"&&window.location?.origin?window.location.origin:"";return D_(e)}function ofe(){const e=mi(R_);if(e)return e;const t=`web_${globalThis.crypto?.randomUUID?.()||Math.random().toString(36).slice(2)}`;return Ds(R_,t),t}function sfe(){return"0.32.0".trim()?"0.32.0":"0.0.0-dev"}const ife={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function rfe(e,t){return k(),M("svg",ife,[...t[0]||(t[0]=[C("path",{d:"M12.0684 2.03418C12.5654 2.03421 12.9687 2.43755 12.9688 2.93457V11.0996H21.0654C21.5625 11.0996 21.9658 11.503 21.9658 12C21.9658 12.497 21.5625 12.9004 21.0654 12.9004H12.9688V21.0654C12.9687 21.5624 12.5654 21.9658 12.0684 21.9658C11.5713 21.9658 11.168 21.5625 11.168 21.0654V12.9004H2.93457C2.43751 12.9004 2.03418 12.4971 2.03418 12C2.03418 11.5029 2.43751 11.0996 2.93457 11.0996H11.168V2.93457C11.168 2.43753 11.5713 2.03418 12.0684 2.03418Z",fill:"currentColor"},null,-1)])])}const lfe=wt({name:"kimi-add",render:rfe}),afe={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function cfe(e,t){return k(),M("svg",afe,[...t[0]||(t[0]=[C("path",{id:"p0",d:"M 0 -9.9 C -5.468 -9.9 -9.9 -5.468 -9.9 0 C -9.9 1.923 -9.351 3.719 -8.402 5.239 C -8.402 5.239 -9.483 7.821 -9.483 7.821 C -9.896 8.809 -9.171 9.9 -8.099 9.9 C -8.099 9.9 0 9.9 0 9.9 C 5.468 9.9 9.9 5.468 9.9 0 C 9.9 -5.468 5.468 -9.9 0 -9.9 Z M -8.1 0 C -8.1 -4.474 -4.474 -8.1 0 -8.1 C 4.473 -8.1 8.1 -4.474 8.1 0 C 8.1 4.473 4.473 8.1 -0.001 8.1 C -0.001 8.1 -7.648 8.1 -7.648 8.1 L -6.365 5.035 C -6.365 5.035 -6.648 4.629 -6.648 4.629 C -7.563 3.317 -8.1 1.723 -8.1 0 Z",transform:"matrix(1 0 0 1 12 12)",fill:"currentColor","fill-rule":"evenodd"},null,-1),C("path",{id:"p1",d:"M 3.6 0.5 L -2.6 0.5 M 0.5 -2.573 L 0.5 3.573",transform:"translate(11.5 11.5)",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round"},null,-1)])])}const ufe=wt({name:"kimi-add-conversation",render:cfe}),dfe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function ffe(e,t){return k(),M("svg",dfe,[...t[0]||(t[0]=[C("path",{d:"M15.0996 12C15.5967 12 16 12.4033 16 12.9004C15.9998 13.3973 15.5965 13.7998 15.0996 13.7998H8.90039C8.40346 13.7998 8.00021 13.3973 8 12.9004C8 12.4033 8.40333 12 8.90039 12H15.0996Z",fill:"currentColor"},null,-1),C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M19 3.2002C20.5464 3.2002 21.7998 4.4536 21.7998 6V7C21.7998 8.03565 21.2363 8.93754 20.4004 9.42188V17C20.4004 19.1539 18.6539 20.9004 16.5 20.9004H7.5C5.34609 20.9004 3.59961 19.1539 3.59961 17V9.42188C2.76374 8.93754 2.2002 8.03565 2.2002 7V6C2.2002 4.4536 3.4536 3.2002 5 3.2002H19ZM5.40039 17C5.40039 18.1598 6.3402 19.0996 7.5 19.0996H16.5C17.6598 19.0996 18.5996 18.1598 18.5996 17V9.7998H5.40039V17ZM4.89746 5.00488C4.39333 5.05621 4 5.48232 4 6V7L4.00488 7.10254C4.05278 7.57297 4.42703 7.94722 4.89746 7.99512L5 8H19C19.5523 8 20 7.55228 20 7V6C20 5.44772 19.5523 5 19 5H5L4.89746 5.00488Z",fill:"currentColor"},null,-1)])])}const pfe=wt({name:"kimi-archive",render:ffe}),hfe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function mfe(e,t){return k(),M("svg",hfe,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.386 21.6387C11.7378 21.988 12.3059 21.987 12.6565 21.6364L18.1949 16.098C18.5464 15.7465 18.5464 15.1766 18.1949 14.8252C17.8434 14.4737 17.2736 14.4737 16.9221 14.8252L12.9201 18.8272V3.00002C12.9201 2.50297 12.5171 2.10003 12.0201 2.10003C11.523 2.10003 11.1201 2.50297 11.1201 3.00002V18.8383L7.07554 14.8229C6.7228 14.4727 6.15295 14.4747 5.80275 14.8275C5.45255 15.1802 5.45461 15.7501 5.80735 16.1003L11.386 21.6387Z",fill:"currentColor"},null,-1)])])}const gfe=wt({name:"kimi-arrow-down",render:mfe}),vfe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function yfe(e,t){return k(),M("svg",vfe,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.16127 12.814C1.81197 12.4622 1.81299 11.8941 2.16357 11.5435L7.70203 6.00506C8.0535 5.65359 8.62335 5.65359 8.97482 6.00506C9.32629 6.35653 9.32629 6.92638 8.97482 7.27785L4.97276 11.2799H20.8C21.297 11.2799 21.7 11.6829 21.7 12.1799C21.7 12.677 21.297 13.0799 20.8 13.0799H4.96171L8.97712 17.1244C9.32732 17.4772 9.32526 18.047 8.97252 18.3972C8.61978 18.7474 8.04993 18.7454 7.69973 18.3926L2.16127 12.814Z",fill:"currentColor"},null,-1)])])}const kfe=wt({name:"kimi-arrow-left",render:yfe}),bfe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Cfe(e,t){return k(),M("svg",bfe,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M21.4387 12.814C21.788 12.4622 21.787 11.8941 21.4364 11.5436L15.8979 6.0051C15.5464 5.65363 14.9766 5.65363 14.6251 6.0051C14.2737 6.35657 14.2737 6.92642 14.6251 7.27789L18.6272 11.28H2.79998C2.30293 11.28 1.89998 11.6829 1.89998 12.18C1.89998 12.677 2.30293 13.08 2.79998 13.08H18.6382L14.6228 17.1245C14.2726 17.4772 14.2747 18.0471 14.6274 18.3973C14.9802 18.7475 15.55 18.7454 15.9002 18.3927L21.4387 12.814Z",fill:"currentColor"},null,-1)])])}const wfe=wt({name:"kimi-arrow-right",render:Cfe}),_fe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function xfe(e,t){return k(),M("svg",_fe,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.386 2.36129C11.7378 2.01198 12.3059 2.013 12.6565 2.36358L18.1949 7.90204C18.5464 8.25351 18.5464 8.82336 18.1949 9.17483C17.8434 9.52631 17.2736 9.52631 16.9221 9.17483L12.9201 5.17277V21C12.9201 21.497 12.5171 21.9 12.0201 21.9C11.523 21.9 11.1201 21.497 11.1201 21V5.16172L7.07554 9.17713C6.7228 9.52733 6.15295 9.52527 5.80275 9.17253C5.45255 8.81979 5.45461 8.24995 5.80735 7.89975L11.386 2.36129Z",fill:"currentColor"},null,-1)])])}const Sfe=wt({name:"kimi-arrow-up",render:xfe}),Afe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Mfe(e,t){return k(),M("svg",Afe,[...t[0]||(t[0]=[C("path",{d:"M19.3027 5.9053C19.6542 5.55397 20.2247 5.55388 20.5761 5.9053C20.9273 6.25675 20.9273 6.82734 20.5761 7.17874L9.65911 18.0948C9.30773 18.4461 8.73814 18.446 8.38665 18.0948L3.42376 13.1328C3.0726 12.7814 3.07263 12.2118 3.42376 11.8604C3.77524 11.509 4.34575 11.5089 4.6972 11.8604L9.02239 16.1856L19.3027 5.9053Z",fill:"currentColor"},null,-1)])])}const Tfe=wt({name:"kimi-check",render:Mfe}),Efe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Ife(e,t){return k(),M("svg",Efe,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.3912 16.7134C11.743 17.0627 12.3111 17.0617 12.6617 16.7111L19.6364 9.73641C19.9878 9.38494 19.9878 8.81509 19.6364 8.46362C19.2849 8.11215 18.7151 8.11215 18.3636 8.46362L12.023 14.8042L5.63407 8.46132C5.28133 8.11112 4.71149 8.11318 4.36129 8.46592C4.01109 8.81866 4.01314 9.3885 4.36588 9.73871L11.3912 16.7134Z",fill:"currentColor"},null,-1)])])}const Lfe=wt({name:"kimi-chevron-down",render:Ife}),$fe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Nfe(e,t){return k(),M("svg",$fe,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M16.1261 12.6088C16.4754 12.257 16.4743 11.6889 16.1238 11.3383L9.14904 4.36363C8.79757 4.01216 8.22772 4.01216 7.87625 4.36363C7.52477 4.7151 7.52477 5.28495 7.87625 5.63642L14.2169 11.977L7.87395 18.3659C7.52375 18.7187 7.52581 19.2885 7.87855 19.6387C8.23129 19.9889 8.80113 19.9869 9.15133 19.6341L16.1261 12.6088Z",fill:"currentColor"},null,-1)])])}const Ofe=wt({name:"kimi-chevron-right",render:Nfe}),Ffe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Rfe(e,t){return k(),M("svg",Ffe,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.3912 8.46132C11.743 8.11202 12.3111 8.11304 12.6617 8.46362L19.6364 15.4383C19.9878 15.7898 19.9878 16.3597 19.6364 16.7111C19.2849 17.0626 18.7151 17.0626 18.3636 16.7111L12.023 10.3705L5.63407 16.7134C5.28133 17.0636 4.71149 17.0616 4.36129 16.7088C4.01109 16.3561 4.01314 15.7862 4.36588 15.436L11.3912 8.46132Z",fill:"currentColor"},null,-1)])])}const Pfe=wt({name:"kimi-chevron-up",render:Rfe}),Dfe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Bfe(e,t){return k(),M("svg",Dfe,[...t[0]||(t[0]=[C("path",{d:"M11.8999 6.79965C12.397 6.79965 12.7997 7.20235 12.7997 7.69941V11.7266L14.7359 13.6629C15.0873 14.0143 15.0879 14.584 14.7366 14.9355C14.3852 15.287 13.8148 15.287 13.4633 14.9355L11.2632 12.7355C11.0947 12.5668 11.0002 12.338 11.0001 12.0995V7.69941C11.0001 7.20238 11.4029 6.7997 11.8999 6.79965Z",fill:"currentColor"},null,-1),C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12 1.89893C17.4677 1.89893 21.9001 6.33147 21.9002 11.7991C21.9002 17.2669 17.4678 21.6993 12 21.6993C6.53228 21.6993 2.09985 17.2669 2.09985 11.7991C2.09998 6.33147 6.53236 1.89893 12 1.89893ZM20.1 11.7998C20.1 7.32616 16.4737 3.69984 12 3.69984C7.5264 3.69984 3.90008 7.32616 3.90008 11.7998C3.90032 16.2732 7.52655 19.8998 12 19.8998C16.4735 19.8998 20.0998 16.2732 20.1 11.7998Z",fill:"currentColor"},null,-1)])])}const Hfe=wt({name:"kimi-clock",render:Bfe}),zfe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Wfe(e,t){return k(),M("svg",zfe,[...t[0]||(t[0]=[C("path",{d:"M17.9542 4.77253C18.3056 4.42106 18.8761 4.42106 19.2276 4.77253C19.579 5.12401 19.579 5.69452 19.2276 6.04597L13.2735 12.0001L19.2276 17.9542C19.5791 18.3056 19.5791 18.8761 19.2276 19.2276C18.8761 19.5791 18.3056 19.5791 17.9542 19.2276L12.0001 13.2735L6.04595 19.2276C5.69451 19.5791 5.12399 19.579 4.77252 19.2276C4.42104 18.8761 4.42104 18.3056 4.77252 17.9542L10.7266 12.0001L4.77252 6.04597C4.42104 5.6945 4.42104 5.124 4.77252 4.77253C5.12399 4.42107 5.69448 4.42106 6.04595 4.77253L12.0001 10.7266L17.9542 4.77253Z",fill:"currentColor"},null,-1)])])}const Ufe=wt({name:"kimi-close",render:Wfe}),jfe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Vfe(e,t){return k(),M("svg",jfe,[...t[0]||(t[0]=[C("path",{d:"M9.85815 11.957C10.9074 11.957 11.7583 12.8083 11.7585 13.8574V19.8574C11.7585 20.3545 11.3552 20.7578 10.8582 20.7578C10.3611 20.7578 9.95776 20.3545 9.95776 19.8574V13.8574C9.95755 13.8024 9.91325 13.7578 9.85815 13.7578H3.85815C3.3611 13.7578 2.95776 13.3545 2.95776 12.8574C2.95798 12.3605 3.36123 11.957 3.85815 11.957H9.85815Z",fill:"currentColor"},null,-1),C("path",{d:"M12.8582 2.95703C13.3551 2.95703 13.7583 3.36054 13.7585 3.85742V9.85742C13.7585 9.91265 13.8029 9.95703 13.8582 9.95703H19.8582C20.3551 9.95703 20.7583 10.3605 20.7585 10.8574C20.7585 11.3545 20.3552 11.7578 19.8582 11.7578H13.8582C12.8088 11.7578 11.9578 10.9068 11.9578 9.85742V3.85742C11.958 3.36054 12.3612 2.95703 12.8582 2.95703Z",fill:"currentColor"},null,-1)])])}const qfe=wt({name:"kimi-collapse",render:Vfe}),Kfe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Zfe(e,t){return k(),M("svg",Kfe,[...t[0]||(t[0]=[C("path",{d:"M11.9004 2.19995C17.3678 2.20016 21.7998 6.63285 21.7998 12.1003C21.7996 17.5677 17.3677 21.9995 11.9004 21.9998H3.80078C2.72946 21.9996 2.00334 20.9089 2.41699 19.9207L3.49805 17.3386C2.54871 15.8189 2.00007 14.0226 2 12.1003C2 6.63272 6.43277 2.19995 11.9004 2.19995ZM11.9004 3.99976C7.42688 3.99976 3.7998 7.62684 3.7998 12.1003C3.79989 13.8228 4.33669 15.4175 5.25195 16.7292L5.53516 17.1345L4.25195 20.2H11.8994C16.3727 20.1999 19.9998 16.5736 20 12.1003C20 7.62697 16.3737 3.99997 11.9004 3.99976ZM8.9541 10.8005C9.75473 10.8006 10.4041 11.4491 10.4043 12.2498C10.4043 13.0505 9.75482 13.6998 8.9541 13.7C8.15329 13.7 7.50391 13.0506 7.50391 12.2498C7.50406 11.4491 8.15339 10.8005 8.9541 10.8005ZM15.1533 10.8005C15.9539 10.8006 16.6034 11.4491 16.6035 12.2498C16.6035 13.0505 15.954 13.6998 15.1533 13.7C14.3525 13.7 13.7031 13.0506 13.7031 12.2498C13.7033 11.4491 14.3526 10.8005 15.1533 10.8005Z",fill:"currentColor"},null,-1)])])}const Gfe=wt({name:"kimi-comment",render:Zfe}),Yfe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Xfe(e,t){return k(),M("svg",Yfe,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M17 7.09961C19.1539 7.09961 20.9004 8.84609 20.9004 11V17C20.9004 19.1539 19.1539 20.9004 17 20.9004H11C8.84609 20.9004 7.09961 19.1539 7.09961 17V11C7.09961 8.84609 8.84609 7.09961 11 7.09961H17ZM11 8.90039C9.8402 8.90039 8.90039 9.8402 8.90039 11V17C8.90039 18.1598 9.8402 19.0996 11 19.0996H17C18.1598 19.0996 19.0996 18.1598 19.0996 17V11C19.0996 9.8402 18.1598 8.90039 17 8.90039H11Z",fill:"currentColor"},null,-1),C("path",{d:"M13 3.09961C14.4447 3.09961 15.705 3.88644 16.3779 5.0498C16.6265 5.47999 16.4789 6.03049 16.0488 6.2793C15.6186 6.52781 15.0681 6.38029 14.8193 5.9502C14.4548 5.32041 13.776 4.90039 13 4.90039H7C5.8402 4.90039 4.90039 5.8402 4.90039 7V13C4.90039 13.776 5.32041 14.4548 5.9502 14.8193C6.38029 15.0681 6.52781 15.6186 6.2793 16.0488C6.03049 16.4789 5.47999 16.6265 5.0498 16.3779C3.88644 15.705 3.09961 14.4447 3.09961 13V7C3.09961 4.84609 4.84609 3.09961 7 3.09961H13Z",fill:"currentColor"},null,-1)])])}const Jfe=wt({name:"kimi-copy",render:Xfe}),Qfe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function e1e(e,t){return k(),M("svg",Qfe,[...t[0]||(t[0]=[C("path",{d:"M12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 10.2797 2.43414 8.66074 3.19922 7.24707C3.20172 7.24246 3.20453 7.23801 3.20703 7.2334C3.33385 6.99995 3.47181 6.77351 3.61621 6.55176C3.73214 6.37355 3.85079 6.19744 3.97754 6.02734C5.35905 4.17471 7.36856 2.81959 9.68945 2.27051C9.69952 2.26813 9.70965 2.26602 9.71973 2.26367C9.85224 2.23276 9.98563 2.2043 10.1201 2.17871C10.1542 2.17221 10.1884 2.16631 10.2227 2.16016C10.3466 2.13791 10.4712 2.11724 10.5967 2.09961C10.6301 2.09489 10.6637 2.0913 10.6973 2.08691C10.8216 2.07073 10.9465 2.05552 11.0723 2.04395C11.1125 2.04022 11.153 2.0384 11.1934 2.03516C11.4595 2.0139 11.7284 2 12 2ZM11.9941 3.7998C11.9968 3.86623 12 3.93292 12 4C12 6.76142 9.76142 9 7 9C6.14209 9 5.33517 8.78324 4.62988 8.40234C4.09862 9.48861 3.7998 10.7093 3.7998 12C3.7998 12.4438 3.83644 12.8791 3.9043 13.3037C4.52807 12.5673 5.45945 12.0996 6.5 12.0996C8.37777 12.0996 9.90039 13.6222 9.90039 15.5C9.90039 17.0702 8.83532 18.3903 7.38867 18.7812C8.70267 19.6765 10.2901 20.2002 12 20.2002C12.468 20.2002 12.9264 20.1583 13.373 20.083C13.1323 19.4342 13 18.7327 13 18C13 14.6863 15.6863 12 19 12C19.4098 12 19.8098 12.0416 20.1963 12.1201C20.1969 12.0801 20.2002 12.0401 20.2002 12C20.2002 7.47126 16.5287 3.7998 12 3.7998H11.9941ZM19 13.7998C16.6804 13.7998 14.7998 15.6804 14.7998 18C14.7998 18.5617 14.9112 19.0972 15.1113 19.5869C17.5225 18.597 19.3558 16.4929 19.9727 13.9141C19.6605 13.8399 19.3349 13.7998 19 13.7998ZM6.5 13.9004C5.61634 13.9004 4.90039 14.6163 4.90039 15.5C4.90039 16.3837 5.61634 17.0996 6.5 17.0996C7.38366 17.0996 8.09961 16.3837 8.09961 15.5C8.09961 14.6163 7.38366 13.9004 6.5 13.9004ZM15.5 6.09961C16.8255 6.09961 17.9004 7.17452 17.9004 8.5C17.9004 9.82548 16.8255 10.9004 15.5 10.9004C14.1745 10.9004 13.0996 9.82548 13.0996 8.5C13.0996 7.17452 14.1745 6.09961 15.5 6.09961ZM15.5 7.90039C15.1686 7.90039 14.9004 8.16863 14.9004 8.5C14.9004 8.83137 15.1686 9.09961 15.5 9.09961C15.8314 9.09961 16.0996 8.83137 16.0996 8.5C16.0996 8.16863 15.8314 7.90039 15.5 7.90039ZM10.1992 4C8.35326 4.41375 6.74333 5.44923 5.59961 6.87598C6.02235 7.08306 6.49716 7.2002 7 7.2002C8.76731 7.2002 10.1992 5.76731 10.1992 4Z",fill:"currentColor"},null,-1)])])}const t1e=wt({name:"kimi-dark-mode",render:e1e}),n1e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function o1e(e,t){return k(),M("svg",n1e,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12 2.90002C12.4971 2.90002 12.9 3.30297 12.9 3.80002V12.2939L15.8081 9.38585C16.1595 9.03438 16.7294 9.03438 17.0808 9.38585C17.4323 9.73732 17.4323 10.3072 17.0808 10.6586L12.6364 15.1031C12.4676 15.2719 12.2387 15.3667 12 15.3667C11.7613 15.3667 11.5324 15.2719 11.3636 15.1031L6.91917 10.6586C6.5677 10.3072 6.5677 9.73732 6.91917 9.38585C7.27064 9.03438 7.84049 9.03438 8.19196 9.38585L11.1 12.2939V3.80002C11.1 3.30297 11.503 2.90002 12 2.90002ZM4.00001 13.5874C4.49706 13.5874 4.90001 13.9903 4.90001 14.4874V18.043C4.90001 18.2758 4.99249 18.499 5.1571 18.6636C5.32172 18.8282 5.54498 18.9207 5.77778 18.9207H18.2222C18.455 18.9207 18.6783 18.8283 18.8429 18.6636C19.0075 18.499 19.1 18.2758 19.1 18.043V14.4874C19.1 13.9903 19.5029 13.5874 20 13.5874C20.4971 13.5874 20.9 13.9903 20.9 14.4874V18.043C20.9 18.7531 20.6179 19.4342 20.1157 19.9364C19.6135 20.4386 18.9324 20.7207 18.2222 20.7207H5.77778C5.06759 20.7207 4.38649 20.4386 3.88431 19.9364C3.38213 19.4342 3.10001 18.7531 3.10001 18.043V14.4874C3.10001 13.9903 3.50295 13.5874 4.00001 13.5874Z",fill:"currentColor"},null,-1)])])}const s1e=wt({name:"kimi-download",render:o1e}),i1e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function r1e(e,t){return k(),M("svg",i1e,[...t[0]||(t[0]=[C("path",{d:"M18.0179 3.09998C18.3963 3.10003 18.7709 3.17491 19.1205 3.31971C19.4701 3.46454 19.7884 3.67614 20.056 3.94373C20.3237 4.21144 20.5362 4.52965 20.681 4.87928C20.8258 5.22887 20.8997 5.60423 20.8997 5.9828C20.8997 6.36118 20.8257 6.73591 20.681 7.08533C20.5362 7.43497 20.3237 7.75317 20.056 8.02088L17.639 10.4379L9.15756 18.9183C8.5296 19.5463 7.74274 19.992 6.8812 20.2074L4.21811 20.8734C3.91148 20.95 3.5871 20.8596 3.36362 20.6361C3.14017 20.4126 3.05063 20.0883 3.12729 19.7816L3.79233 17.1185C4.00771 16.257 4.45344 15.4701 5.08139 14.8422L15.9798 3.94373C16.5203 3.40346 17.2536 3.09998 18.0179 3.09998ZM19.0003 19.1C19.4972 19.1002 19.8997 19.5034 19.8997 20.0004C19.8995 20.4971 19.4971 20.8996 19.0003 20.8998H12.0003C11.5034 20.8998 11.1001 20.4973 11.0999 20.0004C11.0999 19.5033 11.5033 19.1 12.0003 19.1H19.0003ZM18.0179 4.89979C17.7309 4.89979 17.4553 5.01417 17.2523 5.21717L6.35385 16.1146C5.95661 16.5119 5.67469 17.01 5.53842 17.5551L5.23666 18.7631L6.44467 18.4613C6.98971 18.3251 7.48782 18.0431 7.8851 17.6459L18.7826 6.74744C18.883 6.64702 18.9635 6.52821 19.0179 6.39686C19.0723 6.26558 19.0999 6.1247 19.0999 5.9828C19.0999 5.84075 19.0723 5.69916 19.0179 5.56776C18.9635 5.43645 18.883 5.31757 18.7826 5.21717C18.6821 5.11678 18.5631 5.03716 18.432 4.9828C18.3008 4.92845 18.16 4.89983 18.0179 4.89979Z",fill:"currentColor"},null,-1)])])}const l1e=wt({name:"kimi-edit",render:r1e}),a1e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function c1e(e,t){return k(),M("svg",a1e,[...t[0]||(t[0]=[C("path",{d:"M5 11.0996C5.49693 11.0996 5.90018 11.5031 5.90039 12V18C5.90039 18.0552 5.94477 18.0996 6 18.0996H12C12.4969 18.0996 12.9002 18.5031 12.9004 19C12.9004 19.4971 12.4971 19.9004 12 19.9004H6C4.95066 19.9004 4.09961 19.0493 4.09961 18V12C4.09982 11.5031 4.50307 11.0996 5 11.0996ZM18 4.09961C19.0492 4.09961 19.9002 4.95084 19.9004 6V12C19.9004 12.4971 19.4971 12.9004 19 12.9004C18.5029 12.9004 18.0996 12.4971 18.0996 12V6C18.0994 5.94495 18.0551 5.90039 18 5.90039H12C11.5029 5.90039 11.0996 5.49706 11.0996 5C11.0998 4.50312 11.5031 4.09961 12 4.09961H18Z",fill:"currentColor"},null,-1)])])}const u1e=wt({name:"kimi-expand",render:c1e}),d1e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function f1e(e,t){return k(),M("svg",d1e,[...t[0]||(t[0]=[C("g",null,[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13.1723 2.1001C13.9413 2.10018 14.6793 2.40592 15.2231 2.94971L19.0512 6.77783C19.595 7.32162 19.9007 8.0596 19.9008 8.82861V18.0005C19.9008 20.1544 18.1543 21.9009 16.0004 21.9009H8.0004C5.84649 21.9009 4.10001 20.1544 4.10001 18.0005V6.00049C4.10001 3.84658 5.84649 2.1001 8.0004 2.1001H13.1723ZM8.0004 3.90088C6.8406 3.90088 5.90079 4.84069 5.90079 6.00049V18.0005C5.90079 19.1603 6.8406 20.1001 8.0004 20.1001H16.0004C17.1602 20.1001 18.1 19.1603 18.1 18.0005V9.90088H15.0004C13.3988 9.90088 12.1 8.60211 12.1 7.00049V3.90088H8.0004ZM13.9008 7.00049C13.9008 7.608 14.3929 8.1001 15.0004 8.1001H17.8217C17.8072 8.08375 17.7933 8.06681 17.7777 8.05127L13.9496 4.22314C13.9339 4.20745 13.9173 4.19286 13.9008 4.17822V7.00049Z",fill:"currentColor"})],-1)])])}const B_=wt({name:"kimi-file",render:f1e}),p1e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function h1e(e,t){return k(),M("svg",p1e,[...t[0]||(t[0]=[C("path",{d:"M15.4795 15.4971C15.9765 15.4971 16.3799 15.9004 16.3799 16.3975C16.3799 16.8945 15.9765 17.2978 15.4795 17.2979H8.52051C8.02345 17.2979 7.62012 16.8945 7.62012 16.3975C7.62012 15.9004 8.02345 15.4971 8.52051 15.4971H15.4795Z",fill:"currentColor"},null,-1),C("path",{d:"M12.3359 11.0996C12.8329 11.0997 13.2354 11.503 13.2354 12C13.2354 12.497 12.8329 12.9003 12.3359 12.9004H8.52051C8.02345 12.9004 7.62012 12.4971 7.62012 12C7.62012 11.5029 8.02345 11.0996 8.52051 11.0996H12.3359Z",fill:"currentColor"},null,-1),C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13.1719 2.09961C13.9408 2.09969 14.6789 2.40555 15.2227 2.94922L19.0508 6.77734C19.5946 7.32113 19.9003 8.05911 19.9004 8.82812V18C19.9004 20.1539 18.1539 21.9004 16 21.9004H8C5.84626 21.9002 4.09961 20.1538 4.09961 18V6C4.09961 3.84621 5.84626 2.09981 8 2.09961H13.1719ZM8 3.90039C6.84037 3.90059 5.90039 4.84032 5.90039 6V18C5.90039 19.1597 6.84037 20.0994 8 20.0996H16C17.1598 20.0996 18.0996 19.1598 18.0996 18V9.90039H15C13.3985 9.90019 12.0996 8.6015 12.0996 7V3.90039H8ZM13.9004 7C13.9004 7.60739 14.3927 8.09941 15 8.09961H17.8213C17.8068 8.08333 17.7928 8.06626 17.7773 8.05078L13.9492 4.22266C13.9335 4.20696 13.9169 4.19237 13.9004 4.17773V7Z",fill:"currentColor"},null,-1)])])}const m1e=wt({name:"kimi-file-text",render:h1e}),g1e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function v1e(e,t){return k(),M("svg",g1e,[...t[0]||(t[0]=[C("path",{d:"M9.2373 3.7002C10.4169 3.7002 11.5297 4.24779 12.249 5.18262L12.4424 5.43359H18C20.0987 5.43359 21.7998 7.13472 21.7998 9.2334V16.5C21.7998 18.5987 20.0987 20.2998 18 20.2998H6C3.90132 20.2998 2.2002 18.5987 2.2002 16.5V7.5C2.2002 5.40132 3.90132 3.7002 6 3.7002H9.2373ZM6 5.5C4.89543 5.5 4 6.39543 4 7.5V16.5C4 17.6046 4.89543 18.5 6 18.5H18C19.0357 18.5 19.887 17.7128 19.9893 16.7041L20 16.5V9.2334C20 8.19775 19.2128 7.34641 18.2041 7.24414L18 7.2334H12.0479L11.9326 7.22656C11.666 7.19561 11.4205 7.05812 11.2549 6.84277L10.8223 6.28027C10.4437 5.78834 9.85808 5.5 9.2373 5.5H6ZM16 9.59961C16.4971 9.59961 16.9004 10.0029 16.9004 10.5C16.9004 10.9971 16.4971 11.4004 16 11.4004H8C7.50294 11.4004 7.09961 10.9971 7.09961 10.5C7.09961 10.0029 7.50294 9.59961 8 9.59961H16Z",fill:"currentColor"},null,-1)])])}const y1e=wt({name:"kimi-folder",render:v1e}),k1e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function b1e(e,t){return k(),M("svg",k1e,[...t[0]||(t[0]=[C("g",null,[C("path",{d:"M18.3623 9.99976L18.209 8.48999C18.2031 8.43161 18.2004 8.37289 18.2002 8.31421C18.1988 8.31196 18.1956 8.30842 18.1904 8.30347C18.1718 8.28559 18.1302 8.26245 18.0713 8.26245H11C10.261 8.26245 9.59753 7.81016 9.32617 7.1228L8.9082 6.06421C8.88101 5.9953 8.85737 5.92501 8.83887 5.85327C8.83778 5.85099 8.833 5.84268 8.81836 5.83179C8.79454 5.81475 8.7549 5.79939 8.70605 5.80054H3.92871C3.86986 5.80054 3.82825 5.82368 3.80957 5.84155C3.80816 5.8429 3.80675 5.84428 3.80566 5.84546L4.47559 14.0955L3.62109 17.5154L5.12109 11.5154C5.34367 10.6251 6.1438 9.99977 7.06152 9.99976H18.3623ZM7.06152 11.7996C6.96976 11.7996 6.88944 11.8629 6.86719 11.9519L5.36719 17.9519C5.33598 18.078 5.43158 18.1999 5.56152 18.2H19.4385C19.5302 18.1999 19.6106 18.1376 19.6328 18.0486L21.1328 12.0486C21.1644 11.9224 21.0686 11.7996 20.9385 11.7996H7.06152ZM20.9385 9.99976C22.2396 9.99977 23.1945 11.2228 22.8789 12.4851L21.3789 18.4851C21.1563 19.3754 20.3562 19.9997 19.4385 19.9998H4.92871C4.41722 19.9998 3.92613 19.8059 3.56445 19.4597C3.20281 19.1135 3.00004 18.6436 3 18.1541L2 5.84644C2.00006 5.35711 2.20311 4.88786 2.56445 4.54175C2.92613 4.19554 3.41722 4.00073 3.92871 4.00073H8.66406C9.10133 3.99051 9.5296 4.1225 9.87793 4.37573C10.2285 4.63118 10.4767 4.99457 10.582 5.40405L11 6.46167H18.0713C18.5828 6.46167 19.0739 6.65648 19.4355 7.00269C19.7971 7.34888 20 7.81883 20 8.30835L20.1719 9.99976H20.9385Z",fill:"currentColor"})],-1)])])}const C1e=wt({name:"kimi-folder-open",render:b1e}),w1e={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function _1e(e,t){return k(),M("svg",w1e,[...t[0]||(t[0]=[C("path",{id:"af-p0",d:"M -2.619 -8.3 C -1.815 -8.3 -1.048 -7.97 -0.499 -7.39 C -0.499 -7.39 0.141 -6.712 0.141 -6.712 C 0.141 -6.712 5.75 -6.712 5.75 -6.712 C 7.904 -6.712 9.65 -4.986 9.65 -2.858 C 9.65 -2.858 9.65 -1.71 9.65 -1.71 C 9.65 -1.219 9.247 -0.821 8.75 -0.821 C 8.253 -0.821 7.85 -1.219 7.85 -1.71 C 7.85 -1.71 7.85 -2.858 7.85 -2.858 C 7.849 -4.004 6.91 -4.934 5.75 -4.934 C 5.75 -4.934 -0.207 -4.934 -0.207 -4.934 C -0.484 -4.934 -0.749 -5.047 -0.938 -5.247 C -0.938 -5.247 -1.815 -6.177 -1.815 -6.177 C -2.023 -6.397 -2.315 -6.521 -2.619 -6.521 C -2.619 -6.521 -6.25 -6.521 -6.25 -6.521 C -7.41 -6.521 -8.35 -5.592 -8.35 -4.446 C -8.35 -4.446 -8.35 4.446 -8.35 4.446 C -8.35 5.592 -7.41 6.521 -6.25 6.521 C -6.25 6.521 1.25 6.521 1.25 6.521 C 1.747 6.521 2.15 6.919 2.15 7.41 C 2.15 7.901 1.747 8.3 1.25 8.3 C 1.25 8.3 -6.25 8.3 -6.25 8.3 C -8.404 8.3 -10.15 6.574 -10.15 4.446 C -10.15 4.446 -10.15 -4.446 -10.15 -4.446 C -10.15 -6.574 -8.404 -8.3 -6.25 -8.3 C -6.25 -8.3 -2.619 -8.3 -2.619 -8.3 Z M 3.75 -2.5 C 4.247 -2.5 4.65 -2.097 4.65 -1.6 C 4.65 -1.103 4.247 -0.699 3.75 -0.699 C 3.75 -0.699 -4.25 -0.699 -4.25 -0.699 C -4.747 -0.699 -5.15 -1.103 -5.15 -1.6 C -5.15 -2.097 -4.747 -2.5 -4.25 -2.5 C -4.25 -2.5 3.75 -2.5 3.75 -2.5 Z",transform:"matrix(1 0 0 1 11.75 12)",fill:"currentColor"},null,-1),C("g",{id:"af-p1"},[C("path",{d:"M 2.635 0 L -2.635 0 M 0 -2.635 L 0 2.635",transform:"matrix(1 0 0 1 18.4 16.3)",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round"})],-1)])])}const x1e=wt({name:"kimi-folder-plus",render:_1e}),S1e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function A1e(e,t){return k(),M("svg",S1e,[...t[0]||(t[0]=[C("path",{d:"M12 3C16.9706 3 21 7.02944 21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3ZM12 19.2002C15.9764 19.2002 19.2002 15.9764 19.2002 12C19.2002 8.02355 15.9764 4.7998 12 4.7998V19.2002Z",fill:"currentColor"},null,-1)])])}const M1e=wt({name:"kimi-follow-system",render:A1e}),T1e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function E1e(e,t){return k(),M("svg",T1e,[...t[0]||(t[0]=[C("path",{d:"M17 2C19.2091 2 21 3.79086 21 6V15.7646C21 17.2361 20.192 18.5884 18.8965 19.2861L13.8965 21.9785C12.7126 22.616 11.2874 22.616 10.1035 21.9785L5.10352 19.2861C3.80802 18.5884 3 17.2361 3 15.7646V6C3 3.79086 4.79086 2 7 2H17ZM7 3.7998C5.78498 3.7998 4.79981 4.78497 4.7998 6V15.7646C4.7998 16.574 5.24443 17.3184 5.95703 17.7021L10.957 20.3936C11.6082 20.7442 12.3918 20.7442 13.043 20.3936L18.043 17.7021C18.7556 17.3184 19.2002 16.574 19.2002 15.7646V6C19.2002 4.78497 18.215 3.7998 17 3.7998H7ZM12 15.6992C12.4968 15.6992 12.8994 16.1028 12.8994 16.5996C12.8994 17.0964 12.4968 17.5 12 17.5C11.5024 17.5 11.0996 17.0964 11.0996 16.5996C11.0996 16.1028 11.5024 15.6992 12 15.6992ZM12 6.49902C12.4969 6.49922 12.8994 6.86908 12.8994 7.3252V13.6729C12.8994 14.129 12.4969 14.4988 12 14.499C11.5029 14.499 11.0996 14.1291 11.0996 13.6729V7.3252C11.0996 6.86896 11.5029 6.49902 12 6.49902Z",fill:"currentColor"},null,-1)])])}const I1e=wt({name:"kimi-full-access",render:E1e}),L1e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function $1e(e,t){return k(),M("svg",L1e,[...t[0]||(t[0]=[C("path",{d:"M12.5092 2.11279C17.7402 2.37781 21.8998 6.70364 21.8998 12.0005C21.8996 17.4153 17.5524 21.8108 12.1576 21.895C12.1056 21.898 12.0532 21.8999 12.0004 21.8999C11.948 21.8999 11.8954 21.8968 11.8432 21.896L11.8422 21.895C6.44751 21.8107 2.10022 17.4152 2.10001 12.0005C2.10001 6.53287 6.53278 2.1001 12.0004 2.1001L12.5092 2.11279ZM8.92715 13.0005C9.02896 14.9787 9.42581 16.721 9.99356 17.9985C10.3249 18.7441 10.6971 19.292 11.0639 19.6411C11.4259 19.9855 11.741 20.1001 12.0004 20.1001C12.2598 20.1 12.5749 19.9856 12.9369 19.6411C13.3037 19.292 13.6749 18.7441 14.0063 17.9985C14.574 16.721 14.9718 14.9788 15.0736 13.0005H8.92715ZM3.96329 13.0005C4.31462 15.8522 6.14714 18.2427 8.66837 19.3823C8.55544 19.1733 8.44916 18.9552 8.34903 18.73C7.66574 17.1926 7.22657 15.1926 7.12344 13.0005H3.96329ZM16.8764 13.0005C16.7732 15.1926 16.3341 17.1926 15.6508 18.73C15.5506 18.9554 15.4435 19.1732 15.3305 19.3823C17.8522 18.2429 19.6851 15.8525 20.0365 13.0005H16.8764ZM8.66934 4.6167C6.08869 5.78266 4.22826 8.25964 3.93985 11.1997H7.11661C7.20176 8.92954 7.64512 6.85497 8.34903 5.271C8.4494 5.04516 8.5561 4.82619 8.66934 4.6167ZM12.0004 3.8999C11.7411 3.8999 11.4259 4.01454 11.0639 4.35889C10.6971 4.70797 10.3249 5.25587 9.99356 6.00146C9.40671 7.32188 9.00186 9.13885 8.91739 11.1997H15.0834C14.9989 9.13884 14.5931 7.32189 14.0063 6.00146C13.6749 5.2559 13.3037 4.70796 12.9369 4.35889C12.5749 4.0144 12.2598 3.90002 12.0004 3.8999ZM15.3295 4.61572C15.443 4.82559 15.5502 5.04471 15.6508 5.271C16.3547 6.85498 16.799 8.92949 16.8842 11.1997H20.06C19.7715 8.25914 17.9108 5.78143 15.3295 4.61572Z",fill:"currentColor"},null,-1)])])}const N1e=wt({name:"kimi-globe",render:$1e}),O1e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function F1e(e,t){return k(),M("svg",O1e,[...t[0]||(t[0]=[C("path",{d:"M8 17C8.82834 17 9.5 17.6717 9.5 18.5C9.5 19.3283 8.82834 20 8 20C7.17166 20 6.5 19.3283 6.5 18.5C6.5 17.6717 7.17166 17 8 17ZM16 17C16.8283 17 17.5 17.6717 17.5 18.5C17.5 19.3283 16.8283 20 16 20C15.1717 20 14.5 19.3283 14.5 18.5C14.5 17.6717 15.1717 17 16 17ZM8 10.5C8.82834 10.5 9.5 11.1717 9.5 12C9.5 12.8283 8.82834 13.5 8 13.5C7.17166 13.5 6.5 12.8283 6.5 12C6.5 11.1717 7.17166 10.5 8 10.5ZM16 10.5C16.8283 10.5 17.5 11.1717 17.5 12C17.5 12.8283 16.8283 13.5 16 13.5C15.1717 13.5 14.5 12.8283 14.5 12C14.5 11.1717 15.1717 10.5 16 10.5ZM8 4C8.82834 4 9.5 4.67166 9.5 5.5C9.5 6.32834 8.82834 7 8 7C7.17166 7 6.5 6.32834 6.5 5.5C6.5 4.67166 7.17166 4 8 4ZM16 4C16.8283 4 17.5 4.67166 17.5 5.5C17.5 6.32834 16.8283 7 16 7C15.1717 7 14.5 6.32834 14.5 5.5C14.5 4.67166 15.1717 4 16 4Z",fill:"currentColor"},null,-1)])])}const R1e=wt({name:"kimi-grip",render:F1e}),P1e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function D1e(e,t){return k(),M("svg",P1e,[...t[0]||(t[0]=[C("path",{d:"M7.22264 6.10352C7.22264 5.5078 7.48259 4.95449 7.91405 4.56055C8.34271 4.16918 8.90831 3.96198 9.48241 3.96191C9.64155 3.96191 9.80001 3.97936 9.95507 4.01074C10.0127 3.5042 10.2586 3.04178 10.6338 2.69922C11.0625 2.30778 11.6279 2.09961 12.2021 2.09961C12.7763 2.09966 13.3418 2.30783 13.7705 2.69922C13.9947 2.90401 14.1709 3.15244 14.29 3.42676C14.4947 3.37044 14.7071 3.34182 14.9209 3.3418C15.4951 3.3418 16.0605 3.549 16.4892 3.94043C16.8644 4.28293 17.1093 4.74548 17.167 5.25195C17.3223 5.22045 17.4812 5.20312 17.6406 5.20312C18.2147 5.20318 18.7803 5.41135 19.209 5.80273C19.6402 6.19663 19.9004 6.74922 19.9004 7.34473V14.6543C19.9004 17.413 19.2914 19.0434 18.0137 20.21C16.82 21.2998 15.2175 21.9004 13.5615 21.9004C11.7538 21.9004 10.2315 21.5696 8.95702 20.8535C7.67664 20.1341 6.71683 19.0652 5.97362 17.708L3.3496 12.916C3.18848 12.6213 3.10112 12.2914 3.0996 11.9531C3.09812 11.6147 3.18309 11.2835 3.34179 10.9873C3.5001 10.692 3.72639 10.4416 3.99706 10.251C4.26771 10.0604 4.57776 9.93235 4.90136 9.87305C5.56617 9.75102 6.25934 9.84517 6.86425 10.1445C6.9942 10.2088 7.11461 10.2788 7.22264 10.3477V6.10352ZM9.02343 12.7969C9.02336 13.1912 8.76624 13.5395 8.38964 13.6562C8.0129 13.773 7.60387 13.6309 7.38085 13.3057L6.53514 12.0723C6.51218 12.0529 6.48411 12.0282 6.45018 12.002C6.34595 11.9213 6.20986 11.8289 6.06639 11.7578C5.81525 11.6335 5.51637 11.5904 5.22655 11.6436H5.22557C5.15055 11.6573 5.08558 11.6865 5.03417 11.7227C4.98289 11.7588 4.94815 11.7998 4.92772 11.8379C4.90762 11.8755 4.90023 11.9122 4.90038 11.9453C4.90057 11.9782 4.9084 12.0144 4.9287 12.0518L7.55272 16.8438C8.16912 17.9693 8.90989 18.7622 9.83886 19.2842C10.7737 19.8094 11.9704 20.0996 13.5615 20.0996C14.7902 20.0996 15.9536 19.6533 16.7998 18.8809C17.5619 18.185 18.0996 17.1383 18.0996 14.6543V7.34473C18.0996 7.28204 18.0734 7.20342 17.9951 7.13184C17.9139 7.05771 17.7875 7.00396 17.6406 7.00391C17.4937 7.00391 17.3674 7.05771 17.2861 7.13184C17.2077 7.20347 17.1807 7.28199 17.1807 7.34473V11.0693C17.1805 11.5661 16.778 11.9685 16.2812 11.9688C15.7843 11.9688 15.381 11.5662 15.3808 11.0693V5.48242C15.3808 5.41973 15.3537 5.34107 15.2754 5.26953C15.1941 5.19547 15.0677 5.1416 14.9209 5.1416C14.774 5.14166 14.6476 5.19541 14.5664 5.26953C14.4881 5.34105 14.462 5.41974 14.4619 5.48242V11.0693C14.4617 11.5662 14.0584 11.9688 13.5615 11.9688C13.0646 11.9687 12.6613 11.5662 12.6611 11.0693V4.24121C12.6611 4.17852 12.635 4.09989 12.5566 4.02832C12.4754 3.95419 12.349 3.90045 12.2021 3.90039C12.0552 3.90039 11.9289 3.95421 11.8476 4.02832C11.7692 4.09992 11.7422 4.17849 11.7422 4.24121V11.0693C11.742 11.5661 11.3395 11.9685 10.8428 11.9688C10.3458 11.9688 9.94257 11.5662 9.94237 11.0693V6.10352L9.93651 6.05371C9.92534 6.00177 9.89573 5.94433 9.8369 5.89062C9.75567 5.81647 9.62938 5.76172 9.48241 5.76172C9.33554 5.76179 9.2091 5.81651 9.12792 5.89062C9.04964 5.96222 9.02343 6.04084 9.02343 6.10352V12.7969Z",fill:"currentColor"},null,-1)])])}const B1e=wt({name:"kimi-hand",render:D1e}),H1e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function z1e(e,t){return k(),M("svg",H1e,[...t[0]||(t[0]=[C("path",{d:"M4 3.33203C4.55224 3.33203 4.99993 3.7798 5 4.33203V18.0908H20.0674C20.6195 18.0908 21.0671 18.5388 21.0674 19.0908C21.0674 19.6431 20.6197 20.0908 20.0674 20.0908H5C3.89543 20.0908 3 19.1954 3 18.0908V4.33203C3.00007 3.7798 3.44776 3.33203 4 3.33203ZM8.19922 9.28418C8.7515 9.28418 9.19922 9.73189 9.19922 10.2842V15.6045C9.19908 16.1567 8.75142 16.6045 8.19922 16.6045C7.64719 16.6043 7.19936 16.1565 7.19922 15.6045V10.2842C7.19922 9.73202 7.6471 9.28438 8.19922 9.28418ZM17.2227 6.85645C17.7748 6.85658 18.2226 7.3043 18.2227 7.85645V15.6045C18.2225 16.1566 17.7747 16.6044 17.2227 16.6045C16.6705 16.6045 16.2228 16.1566 16.2227 15.6045V7.85645C16.2227 7.30422 16.6704 6.85645 17.2227 6.85645ZM12.7109 3.96387C13.2631 3.96387 13.7107 4.41175 13.7109 4.96387V15.6035C13.7109 16.1558 13.2632 16.6035 12.7109 16.6035C12.1587 16.6035 11.7109 16.1558 11.7109 15.6035V4.96387C11.7111 4.41175 12.1588 3.96387 12.7109 3.96387Z",fill:"currentColor"},null,-1)])])}const W1e=wt({name:"kimi-histogram",render:z1e}),U1e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function j1e(e,t){return k(),M("svg",U1e,[...t[0]||(t[0]=[C("path",{d:"M8.00916 7.50488C8.47326 7.50488 8.91828 7.68943 9.24646 8.01758C9.57465 8.34577 9.75916 8.79075 9.75916 9.25488C9.75916 9.71901 9.57465 10.164 9.24646 10.4922C8.91828 10.8203 8.47326 11.0049 8.00916 11.0049C7.54507 11.0049 7.10001 10.8203 6.77185 10.4922C6.4437 10.164 6.25916 9.71898 6.25916 9.25488C6.25916 8.79078 6.4437 8.34576 6.77185 8.01758C7.10001 7.68942 7.54507 7.50492 8.00916 7.50488Z",fill:"currentColor"},null,-1),C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M17.8998 4.09961C20.0537 4.09961 21.8002 5.84609 21.8002 8V16C21.8002 18.1539 20.0537 19.9004 17.8998 19.9004H5.89978C3.74598 19.9003 1.99939 18.1538 1.99939 16V8C1.99939 5.84617 3.74598 4.09974 5.89978 4.09961H17.8998ZM15.4867 12.2539C15.448 12.2184 15.3885 12.2192 15.351 12.2559L11.7338 15.8027C11.0146 16.5079 9.87305 16.5222 9.13708 15.835L6.98669 13.8262C6.95049 13.7924 6.89516 13.791 6.85681 13.8223L3.82361 16.2988C3.96873 17.3168 4.84165 18.0995 5.89978 18.0996H17.8998C18.9375 18.0996 19.7964 17.3466 19.9662 16.3574L15.4867 12.2539ZM5.89978 5.90039C4.74009 5.90052 3.80017 6.84028 3.80017 8V14.002L5.73181 12.4238C6.46046 11.8286 7.51253 11.8634 8.20056 12.5059L10.351 14.5146C10.3897 14.5508 10.4498 14.5497 10.4877 14.5127L14.1049 10.9658C14.819 10.2656 15.9506 10.2466 16.6879 10.9219L19.9994 13.9551V8C19.9994 6.8402 19.0596 5.90039 17.8998 5.90039H5.89978Z",fill:"currentColor"},null,-1)])])}const V1e=wt({name:"kimi-image",render:j1e}),q1e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function K1e(e,t){return k(),M("svg",q1e,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.09375 2.81174C5.4825 2.50796 6.04376 2.56488 6.34766 2.93869L20.1855 19.9602C20.4895 20.3341 20.421 20.8836 20.0322 21.1877C19.6435 21.4917 19.0823 21.4355 18.7783 21.0617L17.9971 20.1008H5.99609C3.84224 20.1008 2.0958 18.3552 2.0957 16.2014V8.13889C2.09589 6.26755 3.41429 4.70428 5.17285 4.32639L4.93945 4.03928C4.63577 3.66536 4.7051 3.11573 5.09375 2.81174ZM7.13184 14.1096C7.09416 14.0738 7.03659 14.0713 6.99609 14.1037L3.92871 16.5569C4.09761 17.5472 4.95753 18.301 5.99609 18.301H16.5342L13.373 14.4133L11.9072 15.9455C11.1531 16.7324 9.92202 16.7621 9.13281 16.0119L7.13184 14.1096ZM5.99609 6.03928C4.83643 6.03928 3.89669 6.97927 3.89648 8.13889V14.1408L5.83496 12.5901C6.60469 11.9742 7.69929 12.022 8.41504 12.7024L10.416 14.6037C10.4575 14.6431 10.5218 14.642 10.5615 14.6008L12.1641 12.926L9.78906 10.0051C9.70282 10.2646 9.55682 10.5038 9.35645 10.7004C9.02202 11.0285 8.56767 11.2131 8.09473 11.2131C7.62195 11.213 7.1683 11.0284 6.83398 10.7004C6.49961 10.3724 6.31152 9.92701 6.31152 9.46311C6.3116 8.99941 6.49981 8.55474 6.83398 8.22678C7.12986 7.93654 7.51931 7.75901 7.93262 7.7219L6.56543 6.03928H5.99609Z",fill:"currentColor"},null,-1),C("path",{d:"M18.0049 4.31272C20.1587 4.31288 21.9043 6.0593 21.9043 8.21311V13.718C21.9039 15.4743 19.7248 16.2906 18.5713 14.966L14.9141 10.7658C14.5882 10.3912 14.6278 9.82271 15.002 9.49631C15.3768 9.16994 15.9451 9.20948 16.2715 9.5842L19.9287 13.7844C19.9528 13.812 19.9696 13.8167 19.9775 13.8186C19.9908 13.8216 20.0141 13.8213 20.04 13.8117C20.0655 13.8021 20.0826 13.7875 20.0908 13.7766C20.0955 13.7702 20.1044 13.7552 20.1045 13.718V8.21311C20.1045 7.05341 19.1645 6.11366 18.0049 6.1135H10.6328C10.1361 6.11327 9.73267 5.70981 9.73242 5.21311C9.73242 4.71619 10.136 4.31295 10.6328 4.31272H18.0049Z",fill:"currentColor"},null,-1)])])}const Z1e=wt({name:"kimi-image-failed",render:K1e}),G1e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Y1e(e,t){return k(),M("svg",G1e,[...t[0]||(t[0]=[C("path",{d:"M12 2.1001C17.4676 2.10031 21.8994 6.53286 21.8994 12.0005C21.8992 17.4679 17.4674 21.8997 12 21.8999C6.53237 21.8999 2.09982 17.4681 2.09961 12.0005C2.09961 6.53273 6.53224 2.1001 12 2.1001ZM12 3.8999C7.52636 3.8999 3.89941 7.52684 3.89941 12.0005C3.89963 16.474 7.52649 20.1001 12 20.1001C16.4733 20.0999 20.0994 16.4738 20.0996 12.0005C20.0996 7.52697 16.4735 3.90011 12 3.8999ZM12 9.50049C12.4969 9.50068 12.8994 9.87055 12.8994 10.3267V16.6743C12.8992 17.1303 12.4968 17.5003 12 17.5005C11.503 17.5005 11.0998 17.1304 11.0996 16.6743V10.3267C11.0996 9.87043 11.5029 9.50049 12 9.50049ZM12 6.49951C12.4968 6.49951 12.8994 6.90313 12.8994 7.3999C12.8992 7.8965 12.4966 8.30029 12 8.30029C11.5025 8.30028 11.0998 7.8965 11.0996 7.3999C11.0996 6.90313 11.5024 6.49952 12 6.49951Z",fill:"currentColor"},null,-1)])])}const X1e=wt({name:"kimi-info",render:Y1e}),J1e={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function Q1e(e,t){return k(),M("svg",J1e,[...t[0]||(t[0]=[C("path",{id:"bar-divider",d:"M 9.3 18.951 L 9.3 4.3",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),C("path",{id:"bar-box",d:"M -7.9 -4.8 C -7.9 -6.512 -6.512 -7.9 -4.8 -7.9 L 4.8 -7.9 C 6.512 -7.9 7.9 -6.512 7.9 -4.8 L 7.9 4.8 C 7.9 6.512 6.512 7.9 4.8 7.9 L -4.8 7.9 C -6.512 7.9 -7.9 6.512 -7.9 4.8 L -7.9 -4.8 Z",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"butt","stroke-linejoin":"miter",transform:"matrix(1 0 0 1 11.8 11.8)"},null,-1),C("path",{id:"bar-arrow",d:"M -1.25 -2.5 L 1.25 0 L -1.25 2.5",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])}const epe=wt({name:"kimi-left-panel",render:Q1e}),tpe={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function npe(e,t){return k(),M("svg",tpe,[...t[0]||(t[0]=[C("path",{id:"bar-divider",d:"M 9.3 18.951 L 9.3 4.3",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),C("path",{id:"bar-box",d:"M -7.9 -4.8 C -7.9 -6.512 -6.512 -7.9 -4.8 -7.9 L 4.8 -7.9 C 6.512 -7.9 7.9 -6.512 7.9 -4.8 L 7.9 4.8 C 7.9 6.512 6.512 7.9 4.8 7.9 L -4.8 7.9 C -6.512 7.9 -7.9 6.512 -7.9 4.8 L -7.9 -4.8 Z",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"butt","stroke-linejoin":"miter",transform:"matrix(1 0 0 1 11.8 11.8)"},null,-1),C("path",{id:"bar-arrow-expand",d:"M -1.25 -2.5 L 1.25 0 L -1.25 2.5",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])}const ope=wt({name:"kimi-left-panel-expand",render:npe}),spe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function ipe(e,t){return k(),M("svg",spe,[...t[0]||(t[0]=[_u('',1)])])}const rpe=wt({name:"kimi-light-mode",render:ipe}),lpe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function ape(e,t){return k(),M("svg",lpe,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.97427 8.06961C4.99348 7.33581 6.18946 7.1 7.00001 7.1H9.00001C9.49706 7.1 9.90001 7.50294 9.90001 8C9.90001 8.49706 9.49706 8.9 9.00001 8.9H7.00001C6.47755 8.9 5.67353 9.06419 5.02599 9.53039C4.42434 9.96356 3.90001 10.6934 3.90001 12C3.90001 13.3066 4.42434 14.0364 5.02599 14.4696C5.67353 14.9358 6.47755 15.1 7.00001 15.1H9.00001C9.49706 15.1 9.90001 15.5029 9.90001 16C9.90001 16.4971 9.49706 16.9 9.00001 16.9H7.00001C6.18946 16.9 4.99348 16.6642 3.97427 15.9304C2.90917 15.1636 2.10001 13.8934 2.10001 12C2.10001 10.1066 2.90917 8.83644 3.97427 8.06961ZM14.1 8C14.1 7.50294 14.5029 7.1 15 7.1H17C17.8105 7.1 19.0065 7.33581 20.0257 8.06961C21.0908 8.83644 21.9 10.1066 21.9 12C21.9 13.8934 21.0908 15.1636 20.0257 15.9304C19.0065 16.6642 17.8105 16.9 17 16.9H15C14.5029 16.9 14.1 16.4971 14.1 16C14.1 15.5029 14.5029 15.1 15 15.1H17C17.5225 15.1 18.3265 14.9358 18.974 14.4696C19.5757 14.0364 20.1 13.3066 20.1 12C20.1 10.6934 19.5757 9.96356 18.974 9.53039C18.3265 9.06419 17.5225 8.9 17 8.9H15C14.5029 8.9 14.1 8.49706 14.1 8ZM7.10001 12C7.10001 11.5029 7.50295 11.1 8.00001 11.1H16C16.4971 11.1 16.9 11.5029 16.9 12C16.9 12.4971 16.4971 12.9 16 12.9H8.00001C7.50295 12.9 7.10001 12.4971 7.10001 12Z",fill:"currentColor"},null,-1)])])}const cpe=wt({name:"kimi-link",render:ape}),upe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function dpe(e,t){return k(),M("svg",upe,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4.10001 5.99998C4.10001 5.50292 4.50295 5.09998 5.00001 5.09998H19C19.4971 5.09998 19.9 5.50292 19.9 5.99998C19.9 6.49703 19.4971 6.89998 19 6.89998H5.00001C4.50295 6.89998 4.10001 6.49703 4.10001 5.99998ZM4.10001 12C4.10001 11.5029 4.50295 11.1 5.00001 11.1H19C19.4971 11.1 19.9 11.5029 19.9 12C19.9 12.497 19.4971 12.9 19 12.9H5.00001C4.50295 12.9 4.10001 12.497 4.10001 12ZM4.10001 18C4.10001 17.5029 4.50295 17.1 5.00001 17.1H19C19.4971 17.1 19.9 17.5029 19.9 18C19.9 18.497 19.4971 18.9 19 18.9H5.00001C4.50295 18.9 4.10001 18.497 4.10001 18Z",fill:"currentColor"},null,-1)])])}const fpe=wt({name:"kimi-list",render:dpe}),ppe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function hpe(e,t){return k(),M("svg",ppe,[...t[0]||(t[0]=[C("g",null,[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M18 4.09961C20.1539 4.09961 21.9004 5.84609 21.9004 8V16C21.9004 18.1539 20.1539 19.9004 18 19.9004H6C3.84609 19.9004 2.09961 18.1539 2.09961 16V8C2.09961 5.84609 3.84609 4.09961 6 4.09961H18ZM3.90039 16C3.90039 17.1598 4.8402 18.0996 6 18.0996H18C19.1598 18.0996 20.0996 17.1598 20.0996 16V9.49805L13.5361 13.5361C12.5955 14.1147 11.4075 14.1084 10.4727 13.5205L3.90039 9.38672V16ZM6 5.90039C5.0746 5.90039 4.29039 6.49909 4.01074 7.33008L11.4316 11.9971C11.7861 12.2199 12.2361 12.2222 12.5928 12.0029L20.0195 7.43457C19.7725 6.54993 18.9636 5.90039 18 5.90039H6Z",fill:"currentColor"})],-1)])])}const mpe=wt({name:"kimi-mail",render:hpe}),gpe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function vpe(e,t){return k(),M("svg",gpe,[...t[0]||(t[0]=[C("path",{d:"M17 11.0996C17.4971 11.0996 17.9004 11.5029 17.9004 12C17.9004 12.4971 17.4971 12.9004 17 12.9004H7C6.50294 12.9004 6.09961 12.4971 6.09961 12C6.09961 11.5029 6.50294 11.0996 7 11.0996H17Z",fill:"currentColor"},null,-1)])])}const ype=wt({name:"kimi-minus",render:vpe}),kpe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function bpe(e,t){return k(),M("svg",kpe,[...t[0]||(t[0]=[C("path",{d:"M15.182 3.32802C15.9304 2.72235 17.0309 2.76978 17.724 3.46767L18.5424 4.29189L18.6722 4.43642C19.2377 5.13495 19.234 6.1404 18.6635 6.83486L18.5326 6.97841L18.0248 7.48232C17.9549 7.55172 17.8793 7.61254 17.8021 7.66884C17.9794 8.18027 17.9316 8.7498 17.6595 9.22841C17.6847 9.24522 17.7091 9.2635 17.7328 9.2831L17.8002 9.3456L17.9847 9.53798C19.8515 11.5442 20.4549 14.0022 19.6224 16.2196C19.1921 17.3657 18.4025 18.3827 17.2992 19.203H19.0873L19.1801 19.2079C19.6337 19.2542 19.9877 19.6375 19.9877 20.1034C19.9876 20.5692 19.6337 20.9527 19.1801 20.9989L19.0873 21.0028H13.0385C13.0244 21.0033 13.0104 21.0031 12.9965 21.0028H4.9115C4.41448 21.0028 4.01117 20.6004 4.01111 20.1034C4.01111 19.6064 4.41444 19.203 4.9115 19.203H12.9047C15.7614 18.5471 17.3679 17.1023 17.9369 15.5868C18.4678 14.1726 18.179 12.4782 16.807 10.9188L16.5189 10.6093L16.4574 10.5399C16.4549 10.5368 16.453 10.5333 16.4506 10.5302L12.3011 14.6522C11.6031 15.3454 10.5023 15.3845 9.75818 14.7733L9.61365 14.6425L7.31091 12.3231C6.5717 11.5786 6.57617 10.376 7.32068 9.63662L12.3676 4.62392L12.5121 4.49404C13.0358 4.06988 13.7318 3.96755 14.3402 4.18251C14.3969 4.10597 14.4591 4.03197 14.5287 3.96279L15.0365 3.45791L15.182 3.32802ZM4.83044 12.9335C5.16112 12.6052 5.68305 12.5863 6.03552 12.8759L6.10291 12.9384L9.07361 15.9286L9.13513 15.997C9.42218 16.3514 9.3992 16.8727 9.06873 17.2011C8.7381 17.5294 8.21712 17.5482 7.86462 17.2587L7.79626 17.1972L4.82654 14.2069L4.76501 14.1376C4.47792 13.7831 4.49979 13.2619 4.83044 12.9335ZM13.6693 5.87978L13.6361 5.90126L8.58826 10.914C8.54935 10.9529 8.54943 11.0165 8.58826 11.0556L10.891 13.3739L10.9242 13.3964C10.9602 13.4111 11.0032 13.404 11.0326 13.3749L16.0795 8.3622L16.1019 8.329C16.1117 8.3049 16.1117 8.2779 16.1019 8.2538L16.0804 8.2206L13.7777 5.90224C13.7486 5.87289 13.7054 5.86535 13.6693 5.87978ZM16.3383 4.71376L16.3051 4.73525L15.7972 5.24013C15.7584 5.27904 15.7585 5.34166 15.7972 5.38076L16.6146 6.20498L16.6478 6.22744C16.6838 6.24221 16.7268 6.23487 16.7562 6.20595L17.264 5.70107L17.2865 5.66787C17.2962 5.64382 17.2963 5.61672 17.2865 5.59267L17.265 5.55947L16.4467 4.73623C16.4174 4.70681 16.3744 4.6992 16.3383 4.71376Z",fill:"currentColor"},null,-1)])])}const Cpe=wt({name:"kimi-microscope",render:bpe}),wpe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function _pe(e,t){return k(),M("svg",wpe,[...t[0]||(t[0]=[C("path",{d:"M6 12C6 12.8283 5.32834 13.5 4.5 13.5C3.67166 13.5 3 12.8283 3 12C3 11.1717 3.67166 10.5 4.5 10.5C5.32834 10.5 6 11.1717 6 12Z",fill:"currentColor"},null,-1),C("path",{d:"M13.5 12C13.5 12.8283 12.8283 13.5 12 13.5C11.1717 13.5 10.5 12.8283 10.5 12C10.5 11.1717 11.1717 10.5 12 10.5C12.8283 10.5 13.5 11.1717 13.5 12Z",fill:"currentColor"},null,-1),C("path",{d:"M19.5002 13.5C20.3287 13.5 21 12.8287 21 12.0002C21 11.1718 20.3287 10.5 19.5002 10.5C18.6718 10.5 18 11.1718 18 12.0002C18 12.8287 18.6718 13.5 19.5002 13.5Z",fill:"currentColor"},null,-1)])])}const xpe=wt({name:"kimi-more",render:_pe}),Spe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Ape(e,t){return k(),M("svg",Spe,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8 12.0993C8.49691 12.0993 8.90016 12.5028 8.90039 12.9997V17.9997C8.90039 19.6013 7.60163 20.9001 6 20.9001C4.39837 20.9001 3.09961 19.6013 3.09961 17.9997C3.09984 16.3982 4.39852 15.0993 6 15.0993C6.38939 15.0993 6.76033 15.1778 7.09961 15.317V12.9997C7.09984 12.5028 7.50309 12.0993 8 12.0993ZM6 16.9001C5.39263 16.9001 4.90062 17.3923 4.90039 17.9997C4.90039 18.6072 5.39249 19.0993 6 19.0993C6.60751 19.0993 7.09961 18.6072 7.09961 17.9997C7.09938 17.3923 6.60737 16.9001 6 16.9001Z",fill:"currentColor"},null,-1),C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M18.627 3.35611C19.8025 3.12106 20.9001 4.02068 20.9004 5.21939V15.9997C20.9004 17.6013 19.6016 18.9001 18 18.9001C16.3984 18.9001 15.0996 17.6013 15.0996 15.9997C15.0998 14.3982 16.3985 13.0993 18 13.0993C18.3894 13.0993 18.7603 13.1778 19.0996 13.317V9.21939C19.0993 9.15657 19.0421 9.10946 18.9805 9.12173L12.6768 10.3825C12.1894 10.4799 11.7148 10.1637 11.6172 9.67642C11.52 9.18922 11.8361 8.71439 12.3232 8.61685L18.627 7.35611C18.7868 7.32415 18.9452 7.31502 19.0996 7.32291V5.21939C19.0993 5.15657 19.0421 5.10946 18.9805 5.12173L12.6768 6.38248C12.1894 6.47994 11.7148 6.16372 11.6172 5.67642C11.52 5.18922 11.8361 4.71439 12.3232 4.61685L18.627 3.35611ZM18 14.9001C17.3926 14.9001 16.9006 15.3923 16.9004 15.9997C16.9004 16.6072 17.3925 17.0993 18 17.0993C18.6075 17.0993 19.0996 16.6072 19.0996 15.9997C19.0994 15.3923 18.6074 14.9001 18 14.9001Z",fill:"currentColor"},null,-1),C("path",{d:"M7.32422 5.38931C7.61669 4.87032 8.38346 4.87015 8.67578 5.38931L8.73047 5.50845L8.89551 5.95376L8.97949 6.1481C9.19937 6.58817 9.57968 6.93145 10.0459 7.10415L10.4912 7.26919C11.127 7.50461 11.1666 8.36217 10.6104 8.67544L10.4912 8.73013L10.0459 8.89517C9.5799 9.06783 9.19939 9.41141 8.97949 9.85123L8.89551 10.0456L8.73047 10.4909C8.49495 11.1267 7.63737 11.1665 7.32422 10.61L7.26953 10.4909L7.10449 10.0456C6.93172 9.57931 6.58767 9.19898 6.14746 8.97916L5.9541 8.89517L5.50879 8.73013C4.83054 8.47903 4.83061 7.52037 5.50879 7.26919L5.9541 7.10415L6.14746 7.02017C6.58757 6.80032 6.93176 6.41995 7.10449 5.95376L7.26953 5.50845L7.32422 5.38931Z",fill:"currentColor"},null,-1)])])}const Mpe=wt({name:"kimi-music",render:Ape}),Tpe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Epe(e,t){return k(),M("svg",Tpe,[...t[0]||(t[0]=[C("path",{d:"M17.9551 6.32648C17.955 5.82951 17.5517 5.42706 17.0547 5.42706H15.4844C14.9875 5.42717 14.5851 5.82958 14.585 6.32648V17.6732C14.585 18.1701 14.9874 18.5734 15.4844 18.5735H17.0547C17.5518 18.5735 17.9551 18.1702 17.9551 17.6732V6.32648ZM19.7549 17.6732C19.7549 19.1643 18.5459 20.3734 17.0547 20.3734H15.4844C13.9933 20.3732 12.7842 19.1643 12.7842 17.6732V6.32648C12.7843 4.83546 13.9934 3.62639 15.4844 3.62628H17.0547C18.5458 3.62628 19.7548 4.8354 19.7549 6.32648V17.6732Z",fill:"currentColor"},null,-1),C("path",{d:"M9.41571 6.32648C9.41561 5.82951 9.01231 5.42706 8.51532 5.42706H6.94501C6.44811 5.42717 6.0457 5.82958 6.04559 6.32648V17.6732C6.04559 18.1701 6.44804 18.5734 6.94501 18.5735H8.51532C9.01238 18.5735 9.41571 18.1702 9.41571 17.6732V6.32648ZM11.2155 17.6732C11.2155 19.1643 10.0065 20.3734 8.51532 20.3734H6.94501C5.45393 20.3732 4.24481 19.1643 4.24481 17.6732V6.32648C4.24492 4.83546 5.45399 3.62639 6.94501 3.62628H8.51532C10.0064 3.62628 11.2154 4.8354 11.2155 6.32648V17.6732Z",fill:"currentColor"},null,-1)])])}const Ipe=wt({name:"kimi-pause",render:Epe}),Lpe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function $pe(e,t){return k(),M("svg",Lpe,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M18.0176 4.89998C17.7305 4.89998 17.4552 5.014 17.2522 5.217L6.35429 16.1149C5.957 16.5122 5.67517 17.01 5.53889 17.5551L5.23691 18.763L6.44486 18.4611C6.98994 18.3248 7.48773 18.0429 7.88502 17.6456L18.783 6.74773C18.8834 6.64728 18.9631 6.52797 19.0176 6.39658C19.072 6.26517 19.1 6.12441 19.1 5.98236C19.1 5.84031 19.072 5.69956 19.0176 5.56815C18.9631 5.43676 18.8834 5.31745 18.783 5.217C18.6825 5.11649 18.5631 5.03676 18.4318 4.98237C18.3005 4.92798 18.1597 4.89998 18.0176 4.89998ZM15.9794 3.94421C16.52 3.40366 17.2531 3.09998 18.0176 3.09998C18.3961 3.09998 18.7709 3.17452 19.1207 3.31938C19.4704 3.46424 19.7881 3.67656 20.0558 3.94421C20.3235 4.21192 20.5357 4.52969 20.6805 4.87932C20.8254 5.22895 20.9 5.60375 20.9 5.98236C20.9 6.36098 20.8254 6.73578 20.6805 7.08541C20.5357 7.43504 20.3235 7.75281 20.0558 8.02052L17.6385 10.4378L9.15781 18.9184C8.52984 19.5464 7.74301 19.9919 6.88142 20.2073L4.21828 20.8731C3.91158 20.9498 3.58714 20.8599 3.3636 20.6364C3.14006 20.4128 3.05019 20.0884 3.12686 19.7817L3.79264 17.1185C4.00803 16.257 4.45351 15.4701 5.0815 14.8421L15.9794 3.94421Z",fill:"currentColor"},null,-1)])])}const Npe=wt({name:"kimi-pencil",render:$pe}),Ope={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Fpe(e,t){return k(),M("svg",Ope,[...t[0]||(t[0]=[C("path",{d:"M7.76251 3.10547C8.25776 3.10552 8.74422 3.23849 9.17072 3.49023L19.533 9.60742C20.8536 10.3869 21.2922 12.0901 20.5174 13.4121C20.2785 13.8195 19.9398 14.1604 19.533 14.4004L9.16974 20.5156C7.84721 21.2958 6.14595 20.8511 5.36993 19.5273C5.1196 19.1003 4.98719 18.6142 4.98712 18.1191V5.88672C4.98716 4.3537 6.2273 3.10547 7.76251 3.10547ZM6.7879 18.1191C6.78797 18.2945 6.8343 18.4664 6.92267 18.6172C7.19638 19.0841 7.79336 19.2377 8.25568 18.9648L18.618 12.8496C18.7607 12.7654 18.8803 12.6458 18.9647 12.502C19.2393 12.0334 19.082 11.4311 18.618 11.1572L8.25568 5.04102C8.1061 4.95273 7.93562 4.9063 7.76251 4.90625C7.22703 4.90625 6.78794 5.34218 6.7879 5.88672V18.1191Z",fill:"currentColor"},null,-1)])])}const Rpe=wt({name:"kimi-play",render:Fpe}),Ppe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Dpe(e,t){return k(),M("svg",Ppe,[...t[0]||(t[0]=[C("path",{d:"M11.999 15.0049C12.6208 15.0049 13.1259 15.5091 13.126 16.1309C13.126 16.7528 12.6209 17.2578 11.999 17.2578C11.3773 17.2576 10.873 16.7526 10.873 16.1309C10.8732 15.5092 11.3774 15.0051 11.999 15.0049Z",fill:"currentColor"},null,-1),C("path",{d:"M10.1611 7.37109C10.9017 6.79576 11.8605 6.60385 12.7881 6.8457C13.808 7.10861 14.6385 7.93756 14.9014 8.95898C15.2694 10.3845 14.5793 11.8629 13.2598 12.4736C13.0803 12.557 12.75 12.9552 12.75 13.3525V13.502C12.75 13.9172 12.4142 14.2527 11.999 14.2529C11.5837 14.2529 11.248 13.9173 11.248 13.502V13.3525C11.248 12.313 11.9587 11.4215 12.6279 11.1113C13.1777 10.8567 13.6681 10.192 13.4473 9.33496C13.3195 8.84253 12.9038 8.42684 12.4121 8.2998C11.9292 8.17289 11.4573 8.26727 11.0811 8.55859C10.71 8.84626 10.4971 9.28012 10.4971 9.74805C10.4968 10.1632 10.1613 10.499 9.74609 10.499C9.33092 10.499 8.99536 10.1632 8.99512 9.74805C8.99512 8.81152 9.41918 7.94493 10.1611 7.37109Z",fill:"currentColor"},null,-1),C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2ZM12 3.7998C7.47126 3.7998 3.7998 7.47126 3.7998 12C3.7998 16.5287 7.47126 20.2002 12 20.2002C16.5287 20.2002 20.2002 16.5287 20.2002 12C20.2002 7.47126 16.5287 3.7998 12 3.7998Z",fill:"currentColor"},null,-1)])])}const Bpe=wt({name:"kimi-question",render:Dpe}),Hpe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function zpe(e,t){return k(),M("svg",Hpe,[...t[0]||(t[0]=[C("path",{d:"M12 2C13.1046 2 14 2.89543 14 4C14 4.78019 13.552 5.45353 12.9004 5.7832V7H16.5C18.1569 7 19.5 8.34315 19.5 10V17C19.5 18.6051 18.2394 19.9158 16.6543 19.9961L16.5 20H7.5L7.3457 19.9961C5.81166 19.9184 4.58163 18.6883 4.50391 17.1543L4.5 17V10C4.5 8.34315 5.84315 7 7.5 7H11.0996V5.7832C10.448 5.45353 10 4.78019 10 4C10 2.89543 10.8954 2 12 2ZM7.5 8.7998C6.83726 8.7998 6.2998 9.33726 6.2998 10V17C6.2998 17.6627 6.83726 18.2002 7.5 18.2002H16.5C17.1627 18.2002 17.7002 17.6627 17.7002 17V10C17.7002 9.33726 17.1627 8.7998 16.5 8.7998H7.5ZM3 10.7666C3.49706 10.7666 3.90039 11.1699 3.90039 11.667V15C3.90039 15.4971 3.49706 15.9004 3 15.9004C2.50294 15.9004 2.09961 15.4971 2.09961 15V11.667C2.09961 11.1699 2.50294 10.7666 3 10.7666ZM21 10.7666C21.4971 10.7666 21.9004 11.1699 21.9004 11.667V15C21.9004 15.4971 21.4971 15.9004 21 15.9004C20.5029 15.9004 20.0996 15.4971 20.0996 15V11.667C20.0996 11.1699 20.5029 10.7666 21 10.7666ZM9.5 11.0996C9.99706 11.0996 10.4004 11.5029 10.4004 12V14.5C10.4004 14.9971 9.99706 15.4004 9.5 15.4004C9.00294 15.4004 8.59961 14.9971 8.59961 14.5V12C8.59961 11.5029 9.00294 11.0996 9.5 11.0996ZM14.5 11.0996C14.9971 11.0996 15.4004 11.5029 15.4004 12V14.5C15.4004 14.9971 14.9971 15.4004 14.5 15.4004C14.0029 15.4004 13.5996 14.9971 13.5996 14.5V12C13.5996 11.5029 14.0029 11.0996 14.5 11.0996ZM12 3.5C11.7239 3.5 11.5 3.72386 11.5 4C11.5 4.27614 11.7239 4.5 12 4.5C12.2761 4.5 12.5 4.27614 12.5 4C12.5 3.72386 12.2761 3.5 12 3.5Z",fill:"currentColor"},null,-1)])])}const Wpe=wt({name:"kimi-robot",render:zpe}),Upe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function jpe(e,t){return k(),M("svg",Upe,[...t[0]||(t[0]=[C("path",{d:"M11.5 3C16.1944 3 20 6.80558 20 11.5C20 13.523 19.2933 15.381 18.1132 16.8404L21.1364 19.8636C21.4879 20.2151 21.4879 20.7849 21.1364 21.1364C20.7849 21.4879 20.2151 21.4879 19.8636 21.1364L16.8404 18.1132C15.381 19.2933 13.523 20 11.5 20C6.80558 20 3 16.1944 3 11.5C3 6.80558 6.80558 3 11.5 3ZM11.5 18.2C15.2003 18.2 18.2 15.2003 18.2 11.5C18.2 7.79969 15.2003 4.8 11.5 4.8C7.79969 4.8 4.8 7.79969 4.8 11.5C4.8 15.2003 7.79969 18.2 11.5 18.2Z",fill:"currentColor"},null,-1)])])}const Vpe=wt({name:"kimi-search",render:jpe}),qpe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Kpe(e,t){return k(),M("svg",qpe,[...t[0]||(t[0]=[C("path",{d:"M16.5364 10.1636C16.8879 10.5151 16.8879 11.0849 16.5364 11.4364C16.1849 11.7879 15.6151 11.7879 15.2636 11.4364L12.9 9.07281V17.1C12.9 17.597 12.4971 18 12 18C11.503 18 11.1 17.597 11.1 17.1V9.07281L8.73641 11.4364C8.38494 11.7879 7.81509 11.7879 7.46362 11.4364C7.11214 11.0849 7.11214 10.5151 7.46362 10.1636L11.3636 6.2636C11.7151 5.91211 12.2849 5.91211 12.6364 6.2636L16.5364 10.1636Z",fill:"currentColor"},null,-1)])])}const Zpe=wt({name:"kimi-send",render:Kpe}),Gpe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Ype(e,t){return k(),M("svg",Gpe,[...t[0]||(t[0]=[C("path",{d:"M16.0404 12C16.0404 9.76874 14.2313 7.9596 12.0001 7.9596C9.76883 7.9596 7.95972 9.76874 7.95972 12C7.95972 14.2313 9.76883 16.0404 12.0001 16.0404C14.2313 16.0404 16.0404 14.2313 16.0404 12ZM14.2222 12C14.2222 13.2271 13.2271 14.2222 12 14.2222C10.7729 14.2222 9.77783 13.2271 9.77783 12C9.77783 10.7729 10.7729 9.77778 12 9.77778C13.2271 9.77778 14.2222 10.7729 14.2222 12Z",fill:"currentColor"},null,-1),C("path",{d:"M9.91145 21.8009C9.29001 21.6797 8.76914 21.2612 8.50632 20.6922L8.07372 19.7556C7.88838 19.3544 7.43553 19.1048 6.95371 19.1549L5.89572 19.2647C5.2733 19.3293 4.64823 19.114 4.22298 18.6611C3.74343 18.1504 3.32454 17.6037 2.97033 17.0181C2.61571 16.4318 2.32839 15.8106 2.10407 15.1566C1.89769 14.5549 2.02148 13.8954 2.4089 13.3902L3.0376 12.5704C3.30043 12.2277 3.30042 11.7722 3.03758 11.4295L2.40413 10.6035C2.01474 10.0958 1.891 9.43198 2.10208 8.82826C2.55037 7.54612 3.27017 6.35997 4.22 5.34259C4.64518 4.8872 5.27275 4.67067 5.89701 4.73544L6.95383 4.84514C7.43561 4.89515 7.88844 4.6456 8.07377 4.24441L8.50266 3.31593C8.76494 2.74818 9.28448 2.33019 9.90423 2.20761C11.2916 1.9332 12.7148 1.93127 14.0885 2.19913C14.7099 2.32029 15.2308 2.73881 15.4937 3.3078L15.9263 4.24441C16.1116 4.6456 16.5644 4.89514 17.0462 4.84514L18.1043 4.73532C18.7267 4.67072 19.3518 4.88603 19.777 5.33886C20.2566 5.84953 20.6755 6.3963 21.0297 6.98193C21.3843 7.56823 21.6716 8.18942 21.8959 8.84339C22.1023 9.44509 21.9785 10.1046 21.5911 10.6098L20.9624 11.4295C20.6996 11.7722 20.6996 12.2278 20.9624 12.5705L21.5959 13.3964C21.9853 13.9042 22.109 14.568 21.8979 15.1717C21.4497 16.4538 20.7299 17.6399 19.7801 18.6573C19.3549 19.1128 18.7273 19.3294 18.103 19.2646L17.0462 19.1549C16.5645 19.1049 16.1116 19.3544 15.9263 19.7556L15.4974 20.6841C15.2351 21.2518 14.7156 21.6698 14.0958 21.7924C12.7083 22.0668 11.2852 22.0687 9.91145 21.8009ZM13.7432 20.0088C13.7844 20.0006 13.8259 19.9673 13.847 19.9216L14.2758 18.9931C14.7915 17.8768 15.9886 17.2171 17.2341 17.3464L18.2909 17.4561C18.3649 17.4638 18.4272 17.4423 18.4512 17.4166C19.2296 16.5828 19.8171 15.6146 20.1817 14.5716C20.1845 14.5636 20.1796 14.5373 20.1532 14.5029L19.5198 13.677C18.7564 12.6815 18.7564 11.3185 19.5198 10.323L20.1485 9.5033C20.1746 9.46927 20.1795 9.4429 20.1762 9.43327C19.9932 8.89965 19.7603 8.39623 19.4741 7.92293C19.1873 7.4489 18.846 7.00333 18.4517 6.58351C18.4272 6.55739 18.3656 6.53616 18.2921 6.54378L17.234 6.65361C15.9886 6.78287 14.7915 6.12317 14.2758 5.00689L13.8432 4.07027C13.822 4.02448 13.7811 3.9916 13.7406 3.98371C12.5983 3.76097 11.4132 3.76258 10.2571 3.99124C10.2158 3.99941 10.1744 4.03271 10.1533 4.07842L9.72441 5.00689C9.20875 6.12317 8.01164 6.7829 6.76619 6.6536L5.70942 6.54391C5.63535 6.53623 5.573 6.55774 5.54905 6.5834C4.77067 7.41713 4.18312 8.38534 3.81845 9.42835C3.81564 9.43637 3.82054 9.46265 3.84693 9.49706L4.48038 10.323C5.24381 11.3185 5.24383 12.6815 4.48041 13.6769L3.85171 14.4967C3.82561 14.5307 3.82066 14.5571 3.82396 14.5667C4.00701 15.1004 4.23986 15.6038 4.52613 16.0771C4.81284 16.5511 5.15421 16.9967 5.54845 17.4165C5.57298 17.4426 5.63461 17.4638 5.70811 17.4562L6.76608 17.3464C8.01157 17.2171 9.20871 17.8768 9.72438 18.9932L10.157 19.9297C10.1781 19.9755 10.2191 20.0084 10.2595 20.0163C11.4018 20.239 12.587 20.2374 13.7432 20.0088Z",fill:"currentColor"},null,-1)])])}const Xpe=wt({name:"kimi-setting",render:Ype}),Jpe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Qpe(e,t){return k(),M("svg",Jpe,[...t[0]||(t[0]=[C("path",{d:"M17 2C19.2091 2 21 3.79086 21 6V15.7646C21 17.2361 20.192 18.5884 18.8965 19.2861L13.8965 21.9785C12.7126 22.616 11.2874 22.616 10.1035 21.9785L5.10352 19.2861C3.80802 18.5884 3 17.2361 3 15.7646V6C3 3.79086 4.79086 2 7 2H17ZM7 3.7998C5.78498 3.7998 4.79981 4.78497 4.7998 6V15.7646C4.7998 16.574 5.24443 17.3184 5.95703 17.7021L10.957 20.3936C11.6082 20.7442 12.3918 20.7442 13.043 20.3936L18.043 17.7021C18.7556 17.3184 19.2002 16.574 19.2002 15.7646V6C19.2002 4.78497 18.215 3.7998 17 3.7998H7Z",fill:"currentColor"},null,-1),C("path",{d:"M10.1611 7.37109C10.9017 6.79576 11.8605 6.60385 12.7881 6.8457C13.808 7.10861 14.6385 7.93756 14.9014 8.95898C15.2694 10.3845 14.5793 11.8629 13.2598 12.4736C13.0803 12.557 12.75 12.9552 12.75 13.3525V13.502C12.75 13.9172 12.4142 14.2527 11.999 14.2529C11.5837 14.2529 11.248 13.9173 11.248 13.502V13.3525C11.248 12.313 11.9587 11.4215 12.6279 11.1113C13.1777 10.8567 13.6681 10.192 13.4473 9.33496C13.3195 8.84253 12.9038 8.42684 12.4121 8.2998C11.9292 8.17289 11.4573 8.26727 11.0811 8.55859C10.71 8.84626 10.4971 9.28012 10.4971 9.74805C10.4968 10.1632 10.1613 10.499 9.74609 10.499C9.33092 10.499 8.99536 10.1632 8.99512 9.74805C8.99512 8.81152 9.41918 7.94493 10.1611 7.37109Z",fill:"currentColor"},null,-1),C("path",{d:"M11.999 15.0049C12.6208 15.0049 13.1259 15.5091 13.126 16.1309C13.126 16.7528 12.6209 17.2578 11.999 17.2578C11.3773 17.2576 10.873 16.7526 10.873 16.1309C10.8732 15.5092 11.3774 15.0051 11.999 15.0049Z",fill:"currentColor"},null,-1)])])}const e0e=wt({name:"kimi-shield-question",render:Qpe}),t0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function n0e(e,t){return k(),M("svg",t0e,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.90005 12C2.90005 11.503 3.303 11.1 3.80005 11.1H12.2939L9.38588 8.19197C9.03441 7.8405 9.03441 7.27065 9.38588 6.91918C9.73735 6.56771 10.3072 6.56771 10.6587 6.91918L15.1031 11.3636C15.2719 11.5324 15.3667 11.7613 15.3667 12C15.3667 12.2387 15.2719 12.4676 15.1031 12.6364L10.6587 17.0809C10.3072 17.4323 9.73735 17.4323 9.38588 17.0809C9.03441 16.7294 9.03441 16.1595 9.38588 15.8081L12.2939 12.9H3.80005C3.303 12.9 2.90005 12.4971 2.90005 12ZM13.5874 20C13.5874 19.503 13.9904 19.1 14.4874 19.1H18.043C18.2758 19.1 18.4991 19.0075 18.6637 18.8429C18.8283 18.6783 18.9208 18.455 18.9208 18.2222V5.7778C18.9208 5.545 18.8283 5.32174 18.6637 5.15712C18.499 4.9925 18.2758 4.90002 18.043 4.90002H14.4874C13.9904 4.90002 13.5874 4.49708 13.5874 4.00002C13.5874 3.50297 13.9904 3.10003 14.4874 3.10003H18.043C18.7532 3.10003 19.4343 3.38215 19.9365 3.88433C20.4386 4.38651 20.7208 5.06761 20.7208 5.7778V18.2222C20.7208 18.9324 20.4386 19.6135 19.9365 20.1157C19.4343 20.6179 18.7532 20.9 18.043 20.9H14.4874C13.9904 20.9 13.5874 20.4971 13.5874 20Z",fill:"currentColor"},null,-1)])])}const o0e=wt({name:"kimi-sign-in",render:n0e}),s0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function i0e(e,t){return k(),M("svg",s0e,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M20.6364 11.3636C20.9879 11.7151 20.9879 12.2849 20.6364 12.6364L16.1919 17.0808C15.8405 17.4323 15.2706 17.4323 14.9192 17.0808C14.5677 16.7293 14.5677 16.1595 14.9192 15.808L17.8272 12.9H9.33333C8.83627 12.9 8.43333 12.497 8.43333 12C8.43333 11.5029 8.83627 11.1 9.33333 11.1H17.8272L14.9192 8.19193C14.5677 7.84046 14.5677 7.27061 14.9192 6.91914C15.2706 6.56766 15.8405 6.56766 16.1919 6.91914L20.6364 11.3636ZM10.2333 3.99998C10.2333 4.49703 9.83038 4.89998 9.33333 4.89998H5.77777C5.54497 4.89998 5.3217 4.99246 5.15709 5.15707C4.99247 5.32169 4.89999 5.54495 4.89999 5.77775V18.2222C4.89999 18.455 4.99247 18.6783 5.15709 18.8429C5.32171 19.0075 5.54497 19.1 5.77777 19.1H9.33333C9.83038 19.1 10.2333 19.5029 10.2333 20C10.2333 20.497 9.83038 20.9 9.33333 20.9H5.77777C5.06758 20.9 4.38648 20.6179 3.8843 20.1157C3.38212 19.6135 3.09999 18.9324 3.09999 18.2222V5.77775C3.09999 5.06756 3.38212 4.38646 3.8843 3.88428C4.38648 3.3821 5.06758 3.09998 5.77777 3.09998H9.33333C9.83038 3.09998 10.2333 3.50292 10.2333 3.99998Z",fill:"currentColor"},null,-1)])])}const r0e=wt({name:"kimi-sign-out",render:i0e}),l0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function a0e(e,t){return k(),M("svg",l0e,[...t[0]||(t[0]=[_u('',9)])])}const c0e=wt({name:"kimi-sliders",render:a0e}),u0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function d0e(e,t){return k(),M("svg",u0e,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7.78027 8.90405C7.5 9.45411 7.5 10.1742 7.5 11.6144V12.3856C7.5 13.8258 7.5 14.5459 7.78027 15.096C8.02681 15.5798 8.42019 15.9732 8.90405 16.2197C9.45411 16.5 10.1742 16.5 11.6144 16.5H12.3856C13.8258 16.5 14.5459 16.5 15.096 16.2197C15.5798 15.9732 15.9732 15.5798 16.2197 15.096C16.5 14.5459 16.5 13.8258 16.5 12.3856V11.6144C16.5 10.1742 16.5 9.45411 16.2197 8.90405C15.9732 8.42019 15.5798 8.02681 15.096 7.78027C14.5459 7.5 13.8258 7.5 12.3856 7.5H11.6144C10.1742 7.5 9.45411 7.5 8.90405 7.78027C8.42019 8.02681 8.02681 8.42019 7.78027 8.90405Z",fill:"currentColor"},null,-1)])])}const f0e=wt({name:"kimi-stop",render:d0e}),p0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function h0e(e,t){return k(),M("svg",p0e,[...t[0]||(t[0]=[C("path",{d:"M7.01562 3.41459C7.4446 3.16449 7.9954 3.30924 8.24609 3.73784C8.49645 4.167 8.35189 4.71868 7.92285 4.96928C5.51497 6.37506 3.90054 8.98498 3.90039 11.9703C3.90076 16.4435 7.52672 20.0699 12 20.0699C16.4733 20.0699 20.0992 16.4435 20.0996 11.9703C20.0996 11.2291 20 10.5116 19.8145 9.83159C19.6838 9.35222 19.967 8.85702 20.4463 8.72612C20.9256 8.59541 21.4207 8.87778 21.5518 9.35698C21.7792 10.1901 21.9004 11.0674 21.9004 11.9703C21.9 17.4376 17.4674 21.8697 12 21.8697C6.53261 21.8697 2.09998 17.4376 2.09961 11.9703C2.09976 8.31904 4.07782 5.12972 7.01562 3.41459ZM8.39258 8.24077C8.75015 7.89591 9.3199 7.90591 9.66504 8.26323C10.01 8.62076 9.99985 9.19051 9.64258 9.53569C9.00203 10.1541 8.60558 11.02 8.60547 11.979C8.60584 13.8536 10.1253 15.3736 12 15.3736C13.8746 15.3735 15.3942 13.8536 15.3945 11.979C15.3945 11.6847 15.3577 11.3989 15.2881 11.1285C15.1646 10.6474 15.4536 10.1568 15.9346 10.0328C16.4158 9.9089 16.9071 10.1991 17.0312 10.6802C17.1383 11.096 17.1943 11.5321 17.1943 11.979C17.194 14.8477 14.8688 17.1733 12 17.1734C9.1312 17.1734 6.80506 14.8478 6.80469 11.979C6.8048 10.5117 7.41519 9.18431 8.39258 8.24077ZM11.5459 1.12651C11.8216 0.965605 12.1631 0.963306 12.4414 1.11967L19.1953 4.91752C19.4859 5.08108 19.662 5.39277 19.6533 5.72612C19.6443 6.05972 19.4515 6.36154 19.1523 6.50932L12.9004 9.5933V12.2583C12.9004 12.7554 12.4971 13.1587 12 13.1587C11.5029 13.1587 11.0996 12.7554 11.0996 12.2583V1.90385C11.0999 1.58444 11.2702 1.2878 11.5459 1.12651ZM12.9004 7.58549L16.8252 5.64897L12.9004 3.44194V7.58549Z",fill:"currentColor"},null,-1)])])}const m0e=wt({name:"kimi-target",render:h0e}),g0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function v0e(e,t){return k(),M("svg",g0e,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M18.9893 6.60743C20.5897 6.60757 21.8877 7.8926 21.8877 9.47736C21.8877 10.7416 21.0607 11.8129 19.9141 12.1955V14.257C19.914 15.8428 18.6152 17.1288 17.0137 17.1289H12.8438V20.1381C12.8437 20.6301 12.4412 21.0293 11.9443 21.0296C11.4473 21.0296 11.044 20.6302 11.0439 20.1381V16.4356C11.0441 15.8343 11.5363 15.3461 12.1436 15.3458H17.0137C17.6211 15.3457 18.1133 14.8585 18.1133 14.257V12.2129C16.9408 11.8451 16.0909 10.7598 16.0908 9.47736C16.0908 7.89251 17.3887 6.60743 18.9893 6.60743ZM18.9893 8.38953C18.3828 8.38953 17.8906 8.87684 17.8906 9.47736C17.8907 10.0778 18.3828 10.5642 18.9893 10.5642C19.5956 10.5641 20.0869 10.0777 20.0869 9.47736C20.0869 8.87693 19.5956 8.38967 18.9893 8.38953Z",fill:"currentColor"},null,-1),C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4.89844 6.60743C6.49899 6.60747 7.79688 7.89254 7.79688 9.47736C7.79684 10.7388 6.97371 11.8078 5.83105 12.1926V14.4021C5.83105 15.0036 6.32315 15.4918 6.93066 15.4918H8.37109C8.86789 15.492 9.27038 15.8905 9.27051 16.3824C9.27051 16.8744 8.86797 17.2737 8.37109 17.2739H6.93066C5.32904 17.2739 4.03027 15.9879 4.03027 14.4021V12.2158C2.85382 11.8504 2.00004 10.7627 2 9.47736C2 7.89251 3.29784 6.60743 4.89844 6.60743ZM4.89844 8.38953C4.29196 8.38953 3.7998 8.87684 3.7998 9.47736C3.79985 10.0778 4.29198 10.5642 4.89844 10.5642C5.50485 10.5642 5.99605 10.0778 5.99609 9.47736C5.99609 8.87687 5.50488 8.38958 4.89844 8.38953Z",fill:"currentColor"},null,-1),C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.9434 2.9707C13.5439 2.97075 14.8418 4.25581 14.8418 5.84063C14.8418 7.11413 14.0035 8.1923 12.8438 8.56745V13.0135C12.8436 13.5056 12.4403 13.9041 11.9434 13.9041C11.4466 13.9039 11.0431 13.5055 11.043 13.0135V8.56745C9.8836 8.19209 9.04496 7.11387 9.04492 5.84063C9.04492 4.25592 10.343 2.97093 11.9434 2.9707ZM11.9434 4.75281C11.3371 4.75303 10.8447 5.24026 10.8447 5.84063C10.8448 6.44097 11.3371 6.92726 11.9434 6.92749C12.5498 6.92745 13.041 6.44108 13.041 5.84063C13.041 5.24014 12.5498 4.75285 11.9434 4.75281Z",fill:"currentColor"},null,-1)])])}const y0e=wt({name:"kimi-task",render:v0e}),k0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function b0e(e,t){return k(),M("svg",k0e,[...t[0]||(t[0]=[C("path",{d:"M16.5293 15.0596C16.9496 15.1021 17.2772 15.4572 17.2773 15.8887C17.2773 16.3202 16.9497 16.6753 16.5293 16.7178L16.4443 16.7217H12C11.5399 16.7216 11.167 16.3488 11.167 15.8887C11.1671 15.4286 11.54 15.0558 12 15.0557H16.4443L16.5293 15.0596Z",fill:"currentColor"},null,-1),C("path",{d:"M6.96582 7.52246C7.27077 7.21751 7.75375 7.1983 8.08105 7.46484L8.14453 7.52246L10.8232 10.2002C11.5102 10.8872 11.5102 12.0014 10.8232 12.6885L8.14453 15.3672L8.08105 15.4248C7.75377 15.6913 7.27075 15.6721 6.96582 15.3672C6.66114 15.0621 6.64234 14.5791 6.90918 14.252L6.96582 14.1885L9.64453 11.5098C9.68057 11.4736 9.68062 11.415 9.64453 11.3789L6.96582 8.7002C6.64116 8.37488 6.6411 7.84774 6.96582 7.52246Z",fill:"currentColor"},null,-1),C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M17 3.09961C19.1539 3.09966 20.9004 4.84612 20.9004 7V17C20.9004 19.1539 19.1539 20.9003 17 20.9004H7C4.84609 20.9004 3.09961 19.1539 3.09961 17V7C3.09961 4.84609 4.84609 3.09961 7 3.09961H17ZM7 4.90039C5.8402 4.90039 4.90039 5.8402 4.90039 7V17C4.90039 18.1598 5.8402 19.0996 7 19.0996H17C18.1598 19.0996 19.0996 18.1598 19.0996 17V7C19.0996 5.84024 18.1598 4.90044 17 4.90039H7Z",fill:"currentColor"},null,-1)])])}const C0e=wt({name:"kimi-terminal",render:b0e}),w0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function _0e(e,t){return k(),M("svg",w0e,[...t[0]||(t[0]=[C("path",{d:"M16.9971 3.90597C15.9799 2.99725 14.7342 2.38312 13.394 2.12966C12.0538 1.8762 10.6699 1.99301 9.39111 2.46751C8.11236 2.94202 6.98721 3.75626 6.13676 4.82261C5.2863 5.88896 4.74274 7.16703 4.56457 8.5193C4.40455 9.70501 4.53253 10.9118 4.93767 12.0376C5.34281 13.1634 6.01318 14.175 6.89207 14.9868C7.43557 15.4634 7.87413 16.0477 8.17997 16.7027C8.48581 17.3577 8.65224 18.0691 8.66873 18.7918V18.926C8.66962 19.7412 8.99387 20.5229 9.57035 21.0993C10.1468 21.6758 10.9285 22.0001 11.7437 22.001H12.2604C13.0757 22.0001 13.8573 21.6758 14.4338 21.0993C15.0103 20.5229 15.3345 19.7412 15.3354 18.926V18.4685C15.3479 17.8297 15.4982 17.2011 15.7761 16.6258C16.0539 16.0505 16.4528 15.542 16.9454 15.1351C17.7442 14.4355 18.3853 13.5741 18.826 12.608C19.2668 11.642 19.4973 10.5932 19.5022 9.53136C19.5071 8.46948 19.2863 7.41869 18.8544 6.4486C18.4225 5.4785 17.7894 4.61125 16.9971 3.9043V3.90597ZM12.2604 20.3343H11.7437C11.3704 20.3339 11.0124 20.1853 10.7484 19.9213C10.4844 19.6573 10.3358 19.2993 10.3354 18.926C10.3354 18.926 10.3296 18.7093 10.3287 18.6676H13.6687V18.926C13.6683 19.2993 13.5198 19.6573 13.2558 19.9213C12.9917 20.1853 12.6338 20.3339 12.2604 20.3343ZM15.8437 13.8835C14.8949 14.7064 14.2097 15.7908 13.8737 17.001H12.8354V11.0143C13.3212 10.8426 13.742 10.5249 14.0403 10.1049C14.3387 9.68482 14.4999 9.18285 14.5021 8.66763C14.5021 8.44662 14.4143 8.23466 14.258 8.07838C14.1017 7.9221 13.8897 7.8343 13.6687 7.8343C13.4477 7.8343 13.2358 7.9221 13.0795 8.07838C12.9232 8.23466 12.8354 8.44662 12.8354 8.66763C12.8354 8.88865 12.7476 9.10061 12.5913 9.25689C12.435 9.41317 12.2231 9.50097 12.0021 9.50097C11.7811 9.50097 11.5691 9.41317 11.4128 9.25689C11.2565 9.10061 11.1687 8.88865 11.1687 8.66763C11.1687 8.44662 11.0809 8.23466 10.9247 8.07838C10.7684 7.9221 10.5564 7.8343 10.3354 7.8343C10.1144 7.8343 9.90242 7.9221 9.74614 8.07838C9.58986 8.23466 9.50207 8.44662 9.50207 8.66763C9.5042 9.18285 9.66547 9.68482 9.96381 10.1049C10.2621 10.5249 10.683 10.8426 11.1687 11.0143V17.001H10.0671C9.69123 15.7586 8.98633 14.6411 8.02707 13.7668C7.21286 13.0081 6.63267 12.0324 6.35496 10.9547C6.07725 9.87703 6.1136 8.7424 6.45974 7.68471C6.80588 6.62702 7.44735 5.69042 8.30846 4.98543C9.16956 4.28045 10.2144 3.83649 11.3196 3.70597C11.5487 3.68039 11.779 3.66759 12.0096 3.66763C13.4409 3.66338 14.8226 4.19149 15.8862 5.1493C16.5026 5.69896 16.9952 6.37337 17.3312 7.12782C17.6672 7.88227 17.839 8.69952 17.8352 9.5254C17.8314 10.3513 17.6522 11.1669 17.3092 11.9183C16.9663 12.6696 16.4677 13.3395 15.8462 13.8835H15.8437Z",fill:"currentColor"},null,-1)])])}const x0e=wt({name:"kimi-thinking",render:_0e}),S0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function A0e(e,t){return k(),M("svg",S0e,[...t[0]||(t[0]=[_u('',6)])])}const M0e=wt({name:"kimi-todo",render:A0e}),T0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function E0e(e,t){return k(),M("svg",T0e,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.09752 2.19507C8.5421 1.97278 9.08271 2.15298 9.305 2.59756L10.0562 4.10005H13.5C13.9971 4.10005 14.4 4.50299 14.4 5.00005C14.4 5.49711 13.9971 5.90005 13.5 5.90005H12.3106C12.2556 6.2319 12.1667 6.64073 12.0226 7.0987C11.7254 8.04355 11.191 9.20402 10.2334 10.3239C11.4166 11.196 12.5606 11.7524 13.4512 12.0987C13.978 12.3036 14.4136 12.434 14.7124 12.5122L14.7348 12.5181L15.695 10.5976C15.8475 10.2927 16.1591 10.1 16.5 10.1C16.8409 10.1 17.1525 10.2927 17.305 10.5976L20.7969 17.5814L20.8044 17.5959L20.8137 17.615L21.805 19.5976C22.0273 20.0421 21.8471 20.5827 21.4025 20.805C20.9579 21.0273 20.4173 20.8471 20.195 20.4025L19.4438 18.9H13.5562L12.805 20.4025C12.5827 20.8471 12.0421 21.0273 11.5975 20.805C11.1529 20.5827 10.9727 20.0421 11.195 19.5976L12.1863 17.615C12.1917 17.6036 12.1973 17.5924 12.2031 17.5814L13.9146 14.1583C13.6034 14.0667 13.2256 13.9423 12.7988 13.7764C11.7294 13.3605 10.3442 12.6802 8.92538 11.5924C7.79753 12.5167 6.69473 13.0764 5.83285 13.4112C5.33899 13.603 4.92286 13.7216 4.62401 13.7931C4.47449 13.8288 4.35399 13.8529 4.26741 13.8684C4.2241 13.8762 4.18924 13.8818 4.16343 13.8858L4.13156 13.8904L4.12084 13.8919L4.11682 13.8924L4.11514 13.8927C4.11514 13.8927 4.11368 13.8928 4.00001 13L4.11368 13.8928C3.62061 13.9556 3.17 13.6068 3.10722 13.1137C3.0446 12.6219 3.39148 12.1723 3.88256 12.1077L3.94947 12.0967C4.00428 12.0869 4.09114 12.0698 4.20543 12.0424C4.43422 11.9877 4.77156 11.8924 5.18106 11.7334C5.84103 11.477 6.68484 11.0564 7.56458 10.3753C7.15054 9.93496 6.78945 9.48388 6.50421 9.10102C6.26672 8.78224 6.07517 8.50172 5.94227 8.29973C5.87571 8.19858 5.82359 8.11671 5.78748 8.05909C5.76942 8.03027 5.75535 8.00749 5.74545 7.99135L5.73377 7.9722L5.73032 7.96651L5.72864 7.96371C5.71133 7.9349 5.69582 7.9055 5.68208 7.87566C5.49265 7.46416 5.6393 6.96717 6.03659 6.72853C6.09037 6.69623 6.14617 6.6702 6.20315 6.65023C6.59739 6.51205 7.04758 6.66421 7.27129 7.03623L7.27266 7.0385L7.28001 7.05054C7.28695 7.06186 7.29793 7.07964 7.31274 7.10328C7.34239 7.15059 7.38731 7.2212 7.44595 7.31032C7.56343 7.48886 7.73484 7.73997 7.94765 8.02562C8.21085 8.37889 8.52772 8.77187 8.8756 9.14201C9.64226 8.24147 10.0681 7.3133 10.3056 6.55854C10.381 6.3186 10.4372 6.09683 10.4791 5.90005H9.51951C9.50696 5.90031 9.49442 5.90031 9.48191 5.90005H4.00001C3.50296 5.90005 3.10001 5.49711 3.10001 5.00005C3.10001 4.50299 3.50296 4.10005 4.00001 4.10005H8.04378L7.69503 3.40254C7.67314 3.35877 7.65516 3.31407 7.64094 3.26883C7.51078 2.8546 7.69671 2.39547 8.09752 2.19507ZM16.5 13.0125L18.5438 17.1H14.4562L16.5 13.0125Z",fill:"currentColor"},null,-1),C("path",{d:"M15.1 4.00007C15.1 3.50301 15.5029 3.10007 16 3.10007H18C19.6016 3.10007 20.9 4.39844 20.9 6.00007V8.00007C20.9 8.49712 20.497 8.90007 20 8.90007C19.5029 8.90007 19.1 8.49712 19.1 8.00007V6.00007C19.1 5.39255 18.6075 4.90007 18 4.90007H16C15.5029 4.90007 15.1 4.49712 15.1 4.00007Z",fill:"currentColor"},null,-1),C("path",{d:"M3.99998 15.1001C4.49703 15.1001 4.89998 15.503 4.89998 16.0001V18.0001C4.89998 18.6076 5.39246 19.1001 5.99998 19.1001H7.99998C8.49703 19.1001 8.89998 19.503 8.89998 20.0001C8.89998 20.4971 8.49703 20.9001 7.99998 20.9001H5.99998C4.39835 20.9001 3.09998 19.6017 3.09998 18.0001V16.0001C3.09998 15.503 3.50292 15.1001 3.99998 15.1001Z",fill:"currentColor"},null,-1)])])}const I0e=wt({name:"kimi-translate",render:E0e}),L0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function $0e(e,t){return k(),M("svg",L0e,[...t[0]||(t[0]=[C("path",{d:"M8.10001 3C8.10001 2.50294 8.50295 2.1 9.00001 2.1H15C15.4971 2.1 15.9 2.50294 15.9 3C15.9 3.49706 15.4971 3.9 15 3.9H9.00001C8.50295 3.9 8.10001 3.49706 8.10001 3Z",fill:"currentColor"},null,-1),C("path",{d:"M10 15.9C9.50295 15.9 9.10001 15.4971 9.10001 15L9.10001 10C9.10001 9.50294 9.50295 9.1 10 9.1C10.4971 9.1 10.9 9.50294 10.9 10L10.9 15C10.9 15.4971 10.4971 15.9 10 15.9Z",fill:"currentColor"},null,-1),C("path",{d:"M13.1 15C13.1 15.4971 13.5029 15.9 14 15.9C14.4971 15.9 14.9 15.4971 14.9 15L14.9 10C14.9 9.50294 14.4971 9.1 14 9.1C13.5029 9.1 13.1 9.50294 13.1 10V15Z",fill:"currentColor"},null,-1),C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.10001 6C2.10001 5.50294 2.50295 5.1 3.00001 5.1H4.99152C4.99785 5.09993 5.00417 5.09993 5.01048 5.1H18.9895C18.9958 5.09993 19.0021 5.09993 19.0085 5.1H21C21.4971 5.1 21.9 5.50294 21.9 6C21.9 6.49706 21.4971 6.9 21 6.9H19.8281L18.8448 18.6993C18.7412 19.9432 17.7013 20.9 16.4531 20.9H7.54686C6.29865 20.9 5.25881 19.9432 5.15515 18.6993L4.17188 6.9H3.00001C2.50295 6.9 2.10001 6.49706 2.10001 6ZM5.97811 6.9L18.0219 6.9L17.0511 18.5498C17.0251 18.8608 16.7652 19.1 16.4531 19.1H7.54686C7.23481 19.1 6.97485 18.8608 6.94893 18.5498L5.97811 6.9Z",fill:"currentColor"},null,-1)])])}const N0e=wt({name:"kimi-trash",render:$0e}),O0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function F0e(e,t){return k(),M("svg",O0e,[...t[0]||(t[0]=[C("path",{d:"M7.36336 3.3634C7.71483 3.01192 8.28533 3.01192 8.6368 3.3634C8.98817 3.71488 8.98824 4.2854 8.6368 4.63683L6.17391 7.09972H15.0001C18.2585 7.09977 20.9005 9.74166 20.9005 13.0001C20.9004 16.2585 18.2585 18.9005 15.0001 18.9005H7.00008C6.50307 18.9005 6.09976 18.4971 6.09969 18.0001C6.09969 17.5031 6.50302 17.0997 7.00008 17.0997H15.0001C17.2644 17.0997 19.0996 15.2644 19.0997 13.0001C19.0997 10.7358 17.2644 8.90055 15.0001 8.90051H6.17391L8.6368 11.3634L8.69832 11.4318C8.98668 11.7853 8.96632 12.3073 8.6368 12.6368C8.30728 12.9663 7.78521 12.9867 7.43172 12.6984L7.36336 12.6368L3.36336 8.63683C3.33098 8.60445 3.30286 8.56908 3.27645 8.53332C3.25597 8.50559 3.23607 8.47741 3.21883 8.44738C3.20492 8.42311 3.19221 8.39837 3.18074 8.37316C3.1764 8.36365 3.17109 8.35453 3.16707 8.34484C3.1627 8.33427 3.1593 8.32331 3.15535 8.31261C3.12946 8.24274 3.11237 8.16872 3.10457 8.09191C3.09258 7.97426 3.10262 7.85446 3.1368 7.74035C3.14281 7.72035 3.15094 7.70114 3.15828 7.68176C3.16165 7.67283 3.16341 7.66325 3.16707 7.65441C3.17216 7.64216 3.17806 7.63025 3.18367 7.61828C3.19055 7.60356 3.19744 7.58874 3.20516 7.57433C3.24709 7.49624 3.3012 7.42556 3.36336 7.3634L7.36336 3.3634Z",fill:"currentColor"},null,-1)])])}const R0e=wt({name:"kimi-undo",render:F0e}),P0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function D0e(e,t){return k(),M("svg",P0e,[...t[0]||(t[0]=[C("path",{d:"M11.9997 12.8779C16.0197 12.878 19.4393 15.3848 20.7048 18.8828C21.0812 19.9234 20.2782 20.8962 19.2038 21.0137L18.9861 21.0264H5.0134L4.79562 21.0137C3.7213 20.8961 2.91743 19.9233 3.29367 18.8828C4.55905 15.3847 7.9797 12.8781 11.9997 12.8779ZM11.9997 14.6777C8.84467 14.6779 6.17462 16.5794 5.09152 19.2256H18.9079C17.8248 16.5793 15.1549 14.6778 11.9997 14.6777ZM12.2312 3.00586C14.6088 3.1264 16.4997 5.09239 16.4997 7.5L16.4939 7.73145C16.3734 10.1091 14.4073 11.9999 11.9997 12C9.59225 11.9998 7.62604 10.109 7.50558 7.73145L7.49973 7.5C7.49973 5.01485 9.51462 3.00021 11.9997 3L12.2312 3.00586ZM11.9997 4.7998C10.5087 4.80001 9.29953 6.00896 9.29953 7.5C9.29953 8.99104 10.5087 10.2 11.9997 10.2002C13.4908 10.2001 14.6999 8.99112 14.6999 7.5C14.6999 6.00888 13.4908 4.79989 11.9997 4.7998Z",fill:"currentColor"},null,-1)])])}const B0e=wt({name:"kimi-user",render:D0e}),H0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function z0e(e,t){return k(),M("svg",H0e,[...t[0]||(t[0]=[C("path",{d:"M11.9996 7C11.5026 7 11.0996 7.36985 11.0996 7.82609V14.1739C11.0996 14.6301 11.5026 15 11.9996 15C12.4967 15 12.8996 14.6301 12.8996 14.1739V7.82609C12.8996 7.36985 12.4967 7 11.9996 7Z",fill:"currentColor"},null,-1),C("path",{d:"M12.8996 17.1006C12.8996 17.5974 12.4968 18.001 11.9992 18.001C11.5024 18.001 11.0996 17.5974 11.0996 17.1006C11.0996 16.6038 11.5024 16.2002 11.9992 16.2002C12.4968 16.2002 12.8996 16.6038 12.8996 17.1006Z",fill:"currentColor"},null,-1),C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M14.5108 3.5501C13.3946 1.61676 10.6041 1.61676 9.48786 3.5501L1.69363 17.0501C0.577423 18.9834 1.97269 21.4001 4.20511 21.4001H19.7936C22.026 21.4001 23.4212 18.9834 22.305 17.0501L14.5108 3.5501ZM11.0467 4.4501C11.4701 3.71676 12.5286 3.71676 12.952 4.4501L20.7462 17.9501C21.1696 18.6834 20.6403 19.6001 19.7936 19.6001H4.20511C3.35833 19.6001 2.82909 18.6834 3.25248 17.9501L11.0467 4.4501Z",fill:"currentColor"},null,-1)])])}const W0e=wt({name:"kimi-warning",render:z0e}),U0e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function j0e(e,t){return k(),M("svg",U0e,[...t[0]||(t[0]=[C("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[C("path",{d:"M4 6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2zm11-2v16"}),C("path",{d:"m9 10l2 2l-2 2"})],-1)])])}const V0e=wt({name:"tabler-layout-sidebar-right-collapse",render:j0e}),q0e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function K0e(e,t){return k(),M("svg",q0e,[...t[0]||(t[0]=[C("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m15 7l-6.5 6.5a1.5 1.5 0 0 0 3 3L18 10a3 3 0 0 0-6-6l-6.5 6.5a4.5 4.5 0 0 0 9 9L21 13"},null,-1)])])}const Z0e=wt({name:"tabler-paperclip",render:K0e}),G0e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Y0e(e,t){return k(),M("svg",G0e,[...t[0]||(t[0]=[C("path",{fill:"currentColor",d:"M4 18v-3.7a1.5 1.5 0 0 0-1.5-1.5H2v-1.6h.5A1.5 1.5 0 0 0 4 9.7V6a3 3 0 0 1 3-3h1v2H7a1 1 0 0 0-1 1v4.1A2 2 0 0 1 4.626 12A2 2 0 0 1 6 13.9V18a1 1 0 0 0 1 1h1v2H7a3 3 0 0 1-3-3m16-3.7V18a3 3 0 0 1-3 3h-1v-2h1a1 1 0 0 0 1-1v-4.1a2 2 0 0 1 1.374-1.9A2 2 0 0 1 18 10.1V6a1 1 0 0 0-1-1h-1V3h1a3 3 0 0 1 3 3v3.7a1.5 1.5 0 0 0 1.5 1.5h.5v1.6h-.5a1.5 1.5 0 0 0-1.5 1.5"},null,-1)])])}const X0e=wt({name:"ri-braces-line",render:Y0e}),J0e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Q0e(e,t){return k(),M("svg",J0e,[...t[0]||(t[0]=[C("path",{fill:"currentColor",d:"M9 3V1H7v2H3a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1h18a1 1 0 0 0 1-1V4a1 1 0 0 0-1-1h-4V1h-2v2zm-5 7h16v9H4zm0-5h3v1h2V5h6v1h2V5h3v3H4zm5.879 5.964L12 13.086l2.121-2.122l1.415 1.415l-2.122 2.121l2.121 2.121l-1.414 1.414L12 15.915l-2.121 2.12l-1.415-1.414l2.122-2.12l-2.122-2.122z"},null,-1)])])}const ehe=wt({name:"ri-calendar-close-line",render:Q0e}),the={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function nhe(e,t){return k(),M("svg",the,[...t[0]||(t[0]=[C("path",{fill:"currentColor",d:"M7 3V1h2v2h6V1h2v2h4a1 1 0 0 1 1 1v5h-2V5h-3v2h-2V5H9v2H7V5H4v14h6v2H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1zm10 9a4 4 0 1 0 0 8a4 4 0 0 0 0-8m-6 4a6 6 0 1 1 12 0a6 6 0 0 1-12 0m5-3v3.414l2.293 2.293l1.414-1.414L18 15.586V13z"},null,-1)])])}const ohe=wt({name:"ri-calendar-schedule-line",render:nhe}),she={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function ihe(e,t){return k(),M("svg",she,[...t[0]||(t[0]=[C("path",{fill:"currentColor",d:"M9 1v2h6V1h2v2h4a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h4V1zm11 10H4v8h16zM8 14v2H6v-2zm10 0v2h-8v-2zM7 5H4v4h16V5h-3v2h-2V5H9v2H7z"},null,-1)])])}const rhe=wt({name:"ri-calendar-todo-line",render:ihe}),lhe={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function ahe(e,t){return k(),M("svg",lhe,[...t[0]||(t[0]=[C("path",{fill:"currentColor",d:"m23 12l-7.071 7.071l-1.414-1.414L20.172 12l-5.657-5.657l1.414-1.414zM3.828 12l5.657 5.657l-1.414 1.414L1 12l7.071-7.071l1.414 1.414z"},null,-1)])])}const che=wt({name:"ri-code-line",render:ahe}),uhe={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function dhe(e,t){return k(),M("svg",uhe,[...t[0]||(t[0]=[C("path",{fill:"currentColor",d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10s-4.477 10-10 10m0-2a8 8 0 1 0 0-16a8 8 0 0 0 0 16m-4-7h8a4 4 0 0 1-8 0m0-2a1.5 1.5 0 1 1 0-3a1.5 1.5 0 0 1 0 3m8 0a1.5 1.5 0 1 1 0-3a1.5 1.5 0 0 1 0 3"},null,-1)])])}const fhe=wt({name:"ri-emotion-line",render:dhe}),phe={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function hhe(e,t){return k(),M("svg",phe,[...t[0]||(t[0]=[C("path",{fill:"currentColor",d:"M10 6v2H5v11h11v-5h2v6a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1zm11-3v8h-2V6.413l-7.793 7.794l-1.414-1.414L17.585 5H13V3z"},null,-1)])])}const mhe=wt({name:"ri-external-link-line",render:hhe}),ghe={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function vhe(e,t){return k(),M("svg",ghe,[...t[0]||(t[0]=[C("path",{fill:"currentColor",d:"M12 3c5.392 0 9.878 3.88 10.819 9c-.94 5.12-5.427 9-10.819 9s-9.878-3.88-10.818-9C2.122 6.88 6.608 3 12 3m0 16a9.005 9.005 0 0 0 8.778-7a9.005 9.005 0 0 0-17.555 0A9.005 9.005 0 0 0 12 19m0-2.5a4.5 4.5 0 1 1 0-9a4.5 4.5 0 0 1 0 9m0-2a2.5 2.5 0 1 0 0-5a2.5 2.5 0 0 0 0 5"},null,-1)])])}const yhe=wt({name:"ri-eye-line",render:vhe}),khe={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function bhe(e,t){return k(),M("svg",khe,[...t[0]||(t[0]=[C("path",{fill:"currentColor",d:"M17.883 19.297A10.95 10.95 0 0 1 12 21c-5.392 0-9.878-3.88-10.818-9A11 11 0 0 1 4.52 5.935L1.394 2.808l1.414-1.414l19.799 19.798l-1.414 1.415zM5.936 7.35A8.97 8.97 0 0 0 3.223 12a9.005 9.005 0 0 0 13.201 5.838l-2.028-2.028A4.5 4.5 0 0 1 8.19 9.604zm6.978 6.978l-3.242-3.241a2.5 2.5 0 0 0 3.241 3.241m7.893 2.265l-1.431-1.431A8.9 8.9 0 0 0 20.778 12A9.005 9.005 0 0 0 9.552 5.338L7.974 3.76C9.221 3.27 10.58 3 12 3c5.392 0 9.878 3.88 10.819 9a10.95 10.95 0 0 1-2.012 4.593m-9.084-9.084Q11.86 7.5 12 7.5a4.5 4.5 0 0 1 4.492 4.778z"},null,-1)])])}const Che=wt({name:"ri-eye-off-line",render:bhe}),whe={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function _he(e,t){return k(),M("svg",whe,[...t[0]||(t[0]=[C("path",{fill:"currentColor",d:"M15 4H5v16h14V8h-4zM3 2.992C3 2.444 3.447 2 3.999 2H16l5 5v13.993A1 1 0 0 1 20.007 22H3.993A1 1 0 0 1 3 21.008zM11 11V8h2v3h3v2h-3v3h-2v-3H8v-2z"},null,-1)])])}const xhe=wt({name:"ri-file-add-line",render:_he}),She={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Ahe(e,t){return k(),M("svg",She,[...t[0]||(t[0]=[C("path",{fill:"currentColor",d:"M13 9h8L11 24v-9H4l9-15zm-2 2V7.22L7.532 13H13v4.394L17.263 11z"},null,-1)])])}const Mhe=wt({name:"ri-flashlight-line",render:Ahe}),The={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Ehe(e,t){return k(),M("svg",The,[...t[0]||(t[0]=[C("path",{fill:"currentColor",d:"M12.414 5H21a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h7.414z"},null,-1)])])}const Ihe=wt({name:"ri-folder-fill",render:Ehe}),Lhe={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function $he(e,t){return k(),M("svg",Lhe,[...t[0]||(t[0]=[C("path",{fill:"currentColor",d:"M6 5a1 1 0 1 0 0 2a1 1 0 0 0 0-2M3 6a3 3 0 1 1 4 2.83V9a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2v-.17a3.001 3.001 0 1 1 2 0V9a4 4 0 0 1-4 4h-2v2.17a3.001 3.001 0 1 1-2 0V13H9a4 4 0 0 1-4-4v-.17A3 3 0 0 1 3 6m15-1a1 1 0 1 0 0 2a1 1 0 0 0 0-2m-6 12a1 1 0 1 0 0 2a1 1 0 0 0 0-2"},null,-1)])])}const Nhe=wt({name:"ri-git-fork-line",render:$he}),Ohe={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Fhe(e,t){return k(),M("svg",Ohe,[...t[0]||(t[0]=[C("path",{fill:"currentColor",d:"M15 5h2a2 2 0 0 1 2 2v8.17a3.001 3.001 0 1 1-2 0V7h-2v3l-4.5-4L15 2zM5 8.83a3.001 3.001 0 1 1 2 0v6.34a3.001 3.001 0 1 1-2 0zM6 7a1 1 0 1 0 0-2a1 1 0 0 0 0 2m0 12a1 1 0 1 0 0-2a1 1 0 0 0 0 2m12 0a1 1 0 1 0 0-2a1 1 0 0 0 0 2"},null,-1)])])}const Rhe=wt({name:"ri-git-pull-request-line",render:Fhe}),Phe={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Dhe(e,t){return k(),M("svg",Phe,[...t[0]||(t[0]=[C("path",{fill:"currentColor",d:"M10 2a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1H8v2h5V9a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1h-6a1 1 0 0 1-1-1v-1H8v6h5v-1a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1h-6a1 1 0 0 1-1-1v-1H7a1 1 0 0 1-1-1V8H4a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1zm9 16h-4v2h4zm0-8h-4v2h4zM9 4H5v2h4z"},null,-1)])])}const Bhe=wt({name:"ri-node-tree",render:Dhe}),Hhe={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function zhe(e,t){return k(),M("svg",Hhe,[...t[0]||(t[0]=[C("path",{fill:"currentColor",d:"m13.827 1.69l8.486 8.485l-1.415 1.414l-.707-.707l-4.242 4.243l-.707 3.536l-1.415 1.414l-4.242-4.243l-4.95 4.95l-1.414-1.414l4.95-4.95l-4.243-4.243l1.414-1.414l3.536-.707l4.242-4.243l-.707-.707zm.707 3.536l-4.67 4.67l-2.822.565l6.5 6.5l.564-2.822l4.671-4.67z"},null,-1)])])}const Whe=wt({name:"ri-pushpin-line",render:zhe}),Uhe={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function jhe(e,t){return k(),M("svg",Uhe,[...t[0]||(t[0]=[C("path",{fill:"currentColor",d:"M20 4v12h3l-4 5l-4-5h3V4zm-8 14v2H3v-2zm2-7v2H3v-2zm0-7v2H3V4z"},null,-1)])])}const Vhe=wt({name:"ri-sort-desc",render:jhe}),qhe={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Khe(e,t){return k(),M("svg",qhe,[...t[0]||(t[0]=[C("path",{fill:"currentColor",d:"m12 18.26l-7.053 3.948l1.575-7.928L.588 8.792l8.027-.952L12 .5l3.385 7.34l8.027.952l-5.934 5.488l1.575 7.928z"},null,-1)])])}const Zhe=wt({name:"ri-star-fill",render:Khe}),Ghe={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Yhe(e,t){return k(),M("svg",Ghe,[...t[0]||(t[0]=[C("path",{fill:"currentColor",d:"m12 18.26l-7.053 3.948l1.575-7.928L.588 8.792l8.027-.952L12 .5l3.385 7.34l8.027.952l-5.934 5.488l1.575 7.928zm0-2.292l4.247 2.377l-.948-4.773l3.573-3.305l-4.833-.573l-2.038-4.419l-2.039 4.42l-4.833.572l3.573 3.305l-.948 4.773z"},null,-1)])])}const Xhe=wt({name:"ri-star-line",render:Yhe}),Jhe={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Qhe(e,t){return k(),M("svg",Jhe,[...t[0]||(t[0]=[C("path",{fill:"currentColor",d:"M5.33 3.272a3.5 3.5 0 0 1 4.254 4.962l10.709 10.71l-1.414 1.414l-10.71-10.71a3.502 3.502 0 0 1-4.962-4.255L5.444 7.63a1.5 1.5 0 0 0 2.121-2.121zm10.367 1.883l3.182-1.768l1.414 1.415l-1.768 3.182l-1.768.353l-2.12 2.121l-1.415-1.414l2.121-2.121zm-6.718 8.132l1.415 1.414l-5.304 5.303a1 1 0 0 1-1.492-1.327l.078-.087z"},null,-1)])])}const eme=wt({name:"ri-tools-line",render:Qhe}),tme={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function nme(e,t){return k(),M("svg",tme,[...t[0]||(t[0]=[C("path",{fill:"currentColor",d:"m20.97 17.172l-1.414 1.414l-3.535-3.535l-.073.074l-.707 3.536l-1.415 1.414l-4.242-4.243l-4.95 4.95l-1.414-1.414l4.95-4.95l-4.243-4.243L5.34 8.761l3.536-.707l.073-.074l-3.536-3.536L6.828 3.03zM10.365 9.394l-.502.502l-2.822.565l6.5 6.5l.564-2.822l.502-.502zm8.411.074l-1.34 1.34l1.414 1.415l1.34-1.34l.707.707l1.415-1.415l-8.486-8.485l-1.414 1.414l.707.707l-1.34 1.34l1.414 1.415l1.34-1.34z"},null,-1)])])}const ome=wt({name:"ri-unpin-line",render:nme}),sme=` - - -`,ime=` - - - -`,rme=` - - - -`,lme=` - - -`,ame=` - - -`,cme=` - - -`,ume=` - - -`,dme=` - - -`,fme=` - - -`,pme=` - - -`,hme=` - - -`,mme=` - - - -`,gme=` - - -`,vme=` - - - -`,yme=` - - -`,kme=` - - - -`,bme=` - - -`,Cme=` - - -`,wme=` - - -`,_me=` - - -`,H_=` - - - - -`,xme=` - - - - -`,Sme=` - - -`,Ame=` - - - - -`,Mme=` - - - - - -`,Tme=` - - -`,Eme=` - - -`,Ime=` - - -`,Lme=` - - -`,$me=` - - -`,Nme=` - - -`,Ome=` - - - -`,Fme=` - - - -`,Rme=` - - -`,Pme=` - - - - -`,Dme=` - - - - -`,Bme=` - - - - - - - - - - - - -`,Hme=` - - -`,zme=` - - -`,Wme=` - - - - -`,Ume=` - - -`,jme=` - - -`,Vme=` - - - - -`,qme=` - - - - -`,Kme=` - - - -`,Zme=` - - -`,Gme=` - - -`,Yme=` - - - - -`,Xme=` - - -`,Jme=` - - -`,Qme=` - - -`,ege=` - - - -`,tge=` - - - - -`,nge=` - - -`,oge=` - - -`,sge='',ige=` - - -`,rge=` - - -`,lge=` - - - - -`,age=` - - - - -`,cge=` - - -`,uge=` - - - - - - - -`,dge=` - - - - -`,fge=` - - - - - -`,pge=` - - -`,hge=` - - -`,mge=` - - - - -`,gge='',vge='',yge='',kge='',bge='',Cge='',wge='',_ge='',xge='',Sge='',Age='',Mge='',Tge='',Ege='',Ige='',Lge='',$ge='',Nge='',Oge='',Fge='',Rge='',Pge='',Dge='',Bge={sm:14,md:16,lg:20};function St(e,t){return{component:e,svg:t}}const XL={plus:St(lfe,sme),"chat-new":St(ufe,ime),"calendar-close":St(ehe,kge),"calendar-schedule":St(ohe,bge),"calendar-todo":St(rhe,Cge),close:St(Ufe,gme),check:St(Tfe,dme),archive:St(pfe,rme),search:St(Vpe,Jme),copy:St(Jfe,kme),link:St(cpe,Hme),"external-link":St(mhe,xge),download:St(s1e,Cme),undo:St(R0e,pge),send:St(Zpe,Qme),image:St(V1e,Ome),settings:St(Xpe,ege),sliders:St(c0e,sge),"light-mode":St(rpe,Bme),"dark-mode":St(t1e,bme),"follow-system":St(M1e,Tme),"log-in":St(o0e,nge),"log-out":St(r0e,oge),hand:St(B1e,$me),"full-access":St(I1e,Eme),"shield-question":St(e0e,tge),"chevron-down":St(Lfe,fme),"chevron-right":St(Ofe,pme),"chevron-up":St(Pfe,hme),"arrow-up":St(Sfe,ume),"arrow-down":St(gfe,lme),"arrow-right":St(wfe,cme),"arrow-left":St(kfe,ame),minus:St(ype,Ume),microscope:St(Cpe,jme),"panel-collapse":St(epe,Pme),"panel-collapse-right":St(V0e,gge),"panel-expand":St(ope,Dme),expand:St(u1e,_me),collapse:St(qfe,vme),list:St(fpe,zme),"tree-view":St(Bhe,$ge),sort:St(Vhe,Oge),grip:St(R1e,Lme),folder:St(C1e,Ame),"folder-closed":St(y1e,Sme),"folder-plus":St(x1e,Mme),"folder-solid":St(Ihe,Ege),file:St(B_,H_),"file-text":St(m1e,xme),"file-edit":St(l1e,wme),"file-plus":St(xhe,Mge),"file-off":St(B_,H_),attachment:St(Z0e,vge),"image-off":St(Z1e,Fme),eye:St(yhe,Sge),"eye-off":St(Che,Age),code:St(che,wge),terminal:St(C0e,age),pencil:St(Npe,Zme),tool:St(eme,Pge),glob:St(X0e,yge),globe:St(N1e,Ime),translate:St(I0e,dge),"check-list":St(M0e,uge),bolt:St(Mhe,Tge),trash:St(N0e,fge),"git-fork":St(Nhe,Ige),"git-pull-request":St(Rhe,Lge),message:St(Gfe,yme),mail:St(mpe,Wme),user:St(B0e,hge),info:St(X1e,Rme),"help-circle":St(Bpe,Yme),"alert-triangle":St(W0e,mge),clock:St(Hfe,mme),robot:St(Wpe,Xme),sparkles:St(y0e,lge),histogram:St(W1e,Nme),music:St(Mpe,qme),emoji:St(fhe,_ge),target:St(m0e,rge),pause:St(Ipe,Kme),play:St(Rpe,Gme),pin:St(Whe,Nge),stop:St(f0e,ige),star:St(Zhe,Fge),"star-outline":St(Xhe,Rge),unpin:St(ome,Dge),"dots-horizontal":St(xpe,Vme),thinking:St(x0e,cge)};function Hge(e){return XL[e]}function zge(e,t){return e.replace(/]*>/,n=>n.replace(/\s(?:width|height)="[^"]*"/g,"")).replace(/^
      ([\s\S]*?)<\/summary>/,u7e=/([\s\S]*?)<\/resume_hint>/,m4=/]*)>|<\/subagent>/g,d7e="",bx=/(completed|failed|aborted):\s*(\d+)/g,Cx=/([a-z_]+)="([^"]*)"/g;function f7e(e){return e.replaceAll(""",'"').replaceAll("<","<").replaceAll(">",">").replaceAll("&","&")}function p7e(e){const t={};Cx.lastIndex=0;let n;for(;(n=Cx.exec(e))!==null;)t[n[1]]=f7e(n[2]);return t}function h7e(e){const t={completed:0,failed:0,aborted:0};bx.lastIndex=0;let n;for(;(n=bx.exec(e))!==null;){const o=n[1];t[o]=Number(n[2])}return t}function m7e(e,t){const n=p7e(e);return{outcome:n.outcome??"completed",item:n.item,agentId:n.agent_id,mode:n.mode,state:n.state,body:t.trim()}}function g7e(e){const t=[],n=[];m4.lastIndex=0;let o;for(;(o=m4.exec(e))!==null;)if(o[0]===d7e){if(n.length===0)continue;const s=n.pop();s&&n.length===0&&t.push(m7e(s.attrs,e.slice(s.bodyStart,o.index)))}else n.length===0?n.push({attrs:o[1]??"",bodyStart:m4.lastIndex}):n.push(null);return t}function v7e(e){if(e==null)return null;const t=Array.isArray(e)?e.join(` -`):e;if(!t.includes(""))return null;const n=c7e.exec(t)?.[1]?.trim()??"",{completed:o,failed:s,aborted:i}=h7e(n),r=u7e.exec(t)?.[1]?.trim(),l=g7e(t),a=o+s+i;return{summary:n,completed:o,failed:s,aborted:i,total:a>0?a:l.length,subagents:l,resumeHint:r}}function wx(e){return e?e.split(` -`).map(t=>t.trimEnd()).filter(Boolean).at(-1)??"":""}function y7e(e){return e.suspendedReason||wx(e.text)||wx(e.outputLines?.join(` -`))||e.summary||""}function k7e(e){return e.suspendedReason?e.suspendedReason:e.text?e.text:e.outputLines&&e.outputLines.length>0?e.outputLines.join(` -`):e.summary??""}function b7e(e){return e==="completed"?"completed":e==="failed"||e==="aborted"?"failed":"working"}function _x(e,t){return{id:e.agentId??e.item??`result-${t}`,agentId:e.agentId,name:e.item??`subagent ${t+1}`,activity:e.body.split(` -`)[0]??"",phase:b7e(e.outcome),body:e.body}}function C7e(e,t){return!!(t.agentId&&e.agentId===t.agentId||t.item&&e.name.includes(t.item))}function w7e(e,t){const n=e.map(s=>({id:s.id,agentId:s.agentId,name:s.name,activity:y7e(s),phase:s.phase,body:k7e(s)}));if(!t)return n;const o=t.subagents.filter(s=>(s.outcome==="aborted"||s.state==="not_started")&&!e.some(i=>C7e(i,s))).map((s,i)=>_x(s,i));return n.length>0?[...n,...o]:t.subagents.map((s,i)=>_x(s,i))}const _7e=["aria-expanded"],x7e={class:"title"},S7e={key:0,class:"meta"},A7e={key:1,class:"sum-txt"},M7e={class:"rt"},T7e={class:"status"},E7e={key:0,class:"chip"},I7e={key:1,class:"tm"},L7e={class:"body"},$7e={class:"overview"},N7e={class:"overview-line"},O7e={class:"big"},F7e={key:0,class:"lbl"},R7e={key:1,class:"lbl"},P7e={key:2,class:"lbl"},D7e={key:0,class:"seg","aria-hidden":"true"},B7e={key:1,class:"legend"},H7e=["disabled","aria-label","aria-expanded","onClick"],z7e={class:"mname"},W7e={class:"mact"},U7e={class:"mphase"},j7e=["aria-expanded","onClick"],V7e={key:1,class:"fallback-output"},q7e={key:2,class:"waiting"},K7e=et({__name:"SwarmTool",props:{tool:{},mobile:{type:Boolean,default:!1}},emits:["openMedia","openFile","openAgent"],setup(e,{emit:t}){const{t:n}=$t(),o=e,s=t;function i(D){if(!D)return{};try{const H=JSON.parse(D),O=Array.isArray(H.items)?H.items:void 0;return{description:typeof H.description=="string"?H.description:void 0,itemCount:O?.length}}catch{return{}}}const r=dn("resolveSwarmMembers"),l=F(()=>i(o.tool.arg)),a=F(()=>Tu(o.tool.name)),c=F(()=>l.value.description??""),u=F(()=>r?.(o.tool.id)??[]),d=F(()=>v7e(o.tool.output)),f=F(()=>o.tool.status),h=F(()=>f.value==="running"?"running":f.value==="error"||(d.value?.failed??0)>0||(d.value?.aborted??0)>0?"error":"ok"),m=F(()=>w7e(u.value,d.value)),g=F(()=>{const D={completed:0,working:0,suspended:0,queued:0,failed:0};for(const H of m.value)D[H.phase]++;return D}),b=F(()=>m.value.length||l.value.itemCount||0),_=F(()=>g.value.completed+g.value.failed),v=F(()=>g.value.working+g.value.suspended+g.value.queued),y=[{phase:"completed",cls:"s-ok"},{phase:"working",cls:"s-run"},{phase:"suspended",cls:"s-warn"},{phase:"failed",cls:"s-fail"},{phase:"queued",cls:"s-queue"}],w=F(()=>y.map(({phase:D,cls:H})=>({phase:D,count:g.value[D],cls:H})).filter(D=>D.count>0)),x=K(f.value==="running"||v.value>0);function A(){x.value=!x.value}const L=F(()=>m.value.length>0||d.value||f.value==="running"?"":(o.tool.output??[]).join(` -`).trim()),S=K(new Set);function T(D){return S.value.has(D)}function R(D){const H=new Set(S.value);H.has(D)?H.delete(D):H.add(D),S.value=H}function B(D){if(D.agentId){s("openAgent",D.agentId);return}D.body&&R(D.id)}function I(D){return D.agentId!==void 0&&D.body.length>0&&(D.phase==="completed"||D.phase==="failed")}function $(D){return n(`tools.swarm.phase${D[0].toUpperCase()}${D.slice(1)}`)}return(D,H)=>(k(),M("div",{class:Fe(["swarm-card",{open:x.value,err:h.value==="error"}])},[C("button",{class:"head",type:"button","aria-expanded":x.value,onClick:A},[q(p(Me),{class:"ic",name:"sparkles",size:"sm"}),C("span",x7e,N(a.value),1),c.value?(k(),M("span",S7e,"·")):te("",!0),c.value?(k(),M("span",A7e,N(c.value),1)):te("",!0),C("span",M7e,[C("span",T7e,[h.value==="ok"?(k(),me(p(Me),{key:0,name:"check",size:"sm"})):h.value==="error"?(k(),me(p(Me),{key:1,name:"close",size:"sm"})):(k(),me(p(du),{key:2,status:"running"}))]),_.value>0||b.value>0?(k(),M("span",E7e,N(_.value)+" / "+N(b.value),1)):te("",!0),e.tool.timing?(k(),M("span",I7e,N(e.tool.timing),1)):te("",!0)]),q(p(Me),{class:"car",name:"chevron-right",size:"sm"})],8,_7e),An(C("div",L7e,[C("div",$7e,[C("div",N7e,[C("span",O7e,N(p(n)("tools.swarm.progress",{done:_.value,total:b.value})),1),h.value==="running"&&b.value>0?(k(),M("span",F7e,N(p(n)("tools.swarm.runningSub",{count:v.value})),1)):d.value?(k(),M("span",R7e,N(p(n)("tools.swarm.doneSub",{completed:d.value.completed,failed:d.value.failed+d.value.aborted})),1)):(k(),M("span",P7e,N(p(n)("tools.swarm.waiting")),1))]),b.value>0&&w.value.length>0?(k(),M("div",D7e,[(k(!0),M(De,null,vt(w.value,O=>(k(),M("span",{key:O.phase,class:Fe(O.cls),style:Gt({flex:O.count})},null,6))),128))])):te("",!0),w.value.length>1?(k(),M("div",B7e,[(k(!0),M(De,null,vt(w.value,O=>(k(),M("span",{key:O.phase},[C("i",{class:Fe(["lg-dot",O.cls])},null,2),Ve(N($(O.phase))+" "+N(O.count),1)]))),128))])):te("",!0)]),m.value.length>0?(k(!0),M(De,{key:0},vt(m.value,O=>(k(),M("div",{key:O.id,class:Fe(["member",[`phase-${O.phase}`,{open:!O.agentId&&T(O.id)}]])},[C("button",{class:"member-head",type:"button",disabled:!O.agentId&&!O.body,"aria-label":O.agentId?p(n)("tasks.openDetail"):void 0,"aria-expanded":!O.agentId&&O.body?T(O.id):void 0,onClick:P=>B(O)},[q(p(du),{class:"row-dot",status:O.phase},null,8,["status"]),q(p($n),{text:O.name},{default:be(()=>[C("span",z7e,N(O.name),1)]),_:2},1032,["text"]),O.activity?(k(),me(p($n),{key:0,text:O.activity},{default:be(()=>[C("span",W7e,N(O.activity),1)]),_:2},1032,["text"])):te("",!0),C("span",U7e,N($(O.phase)),1),O.agentId?(k(),me(p(Me),{key:1,class:"mcar",name:"arrow-right",size:"sm"})):O.body?(k(),me(p(Me),{key:2,class:"mcar",name:"chevron-right",size:"sm"})):te("",!0)],8,H7e),I(O)?(k(),M("button",{key:0,class:"member-saved",type:"button","aria-expanded":T(O.id),onClick:P=>R(O.id)},[q(p(Me),{class:Fe(["member-saved-car",{open:T(O.id)}]),name:"chevron-right",size:"sm","aria-hidden":"true"},null,8,["class"]),C("span",null,N(p(n)("tools.output.saved")),1)],8,j7e)):te("",!0),O.body&&(!O.agentId||I(O))?An((k(),M("div",{key:1,class:"member-body"},N(O.body),513)),[[xs,T(O.id)]]):te("",!0)],2))),128)):L.value?(k(),M("div",V7e,N(L.value),1)):(k(),M("div",q7e,N(p(n)("tools.swarm.waiting")),1))],512),[[xs,x.value]])],2))}}),Z7e=mt(K7e,[["__scopeId","data-v-e93ea6c8"]]),G7e=et({__name:"StatusGlyph",props:{status:{}},setup(e){const t=e;return(n,o)=>(k(),M("span",{class:Fe(["status-glyph",`s-${t.status}`]),"aria-hidden":"true"},[t.status==="run"?(k(),me(p(du),{key:0,status:"running"})):t.status==="pending"?(k(),me(p(du),{key:1,status:"idle"})):t.status==="done"?(k(),me(p(Me),{key:2,name:"check",size:"sm"})):(k(),me(p(Me),{key:3,name:"close",size:"sm"}))],2))}}),R5=mt(G7e,[["__scopeId","data-v-5e37bd5c"]]),Y7e={class:"tl-name"},X7e={key:0,class:"tl-dim"},J7e={key:0,class:"tl-chip"},Q7e={key:1,class:"todo-bar","aria-hidden":"true"},eke={key:0,class:"todo-list"},tke={class:"todo-title"},nke=et({__name:"TodoTool",props:{tool:{},mobile:{type:Boolean,default:!1}},setup(e){const t=e,{t:n}=$t();function o(m){const g=dc(m),b=g&&Array.isArray(g.todos)?g.todos:g&&Array.isArray(g.items)?g.items:void 0;if(!b)return[];const _=[];for(const v of b){if(!v||typeof v!="object")continue;const y=v,w=Rn(y.title)??Rn(y.content)??Rn(y.activeForm)??Rn(y.text);if(!w)continue;const x=Rn(y.status)??"pending";_.push({title:w,status:x==="in_progress"?"in_progress":x==="done"||x==="completed"?"done":"pending"})}return _}const s=F(()=>t.tool.status),i=F(()=>o(t.tool.arg)),r=F(()=>i.value.filter(m=>m.status==="done").length),l=F(()=>i.value.length),a=F(()=>i.value.find(m=>m.status==="in_progress")),c=F(()=>l.value>0?r.value/l.value:0),u=F(()=>!!t.tool.output&&t.tool.output.length>0),d=F(()=>l.value>0||u.value),f=K(t.tool.defaultExpanded===!0&&d.value);Je(()=>[t.tool.defaultExpanded,t.tool.status],()=>{t.tool.defaultExpanded===!0&&d.value&&(f.value=!0)});function h(m){return m.status==="in_progress"?"run":m.status}return(m,g)=>(k(),me(Yr,{status:s.value,open:f.value,expandable:d.value,onToggle:g[0]||(g[0]=b=>f.value=!f.value)},{leading:be(()=>[q(p(Me),{name:"check-list",size:"sm"})]),trailing:be(()=>[l.value>0?(k(),M("span",J7e,N(r.value)+"/"+N(l.value),1)):te("",!0),l.value>0?(k(),M("span",Q7e,[C("span",{class:"todo-fill",style:Gt({width:`${c.value*100}%`})},null,4)])):te("",!0)]),body:be(()=>[l.value>0?(k(),M("div",eke,[(k(!0),M(De,null,vt(i.value,(b,_)=>(k(),M("div",{key:_,class:Fe(["todo-row",`s-${b.status}`])},[q(R5,{status:h(b)},null,8,["status"]),C("span",tke,N(b.title),1)],2))),128))])):u.value?(k(),me(tr,{key:1,lines:e.tool.output},null,8,["lines"])):te("",!0)]),default:be(()=>[C("span",Y7e,N(p(n)("tools.label.todo")),1),a.value?(k(),M("span",X7e,N(a.value.title),1)):te("",!0)]),_:1},8,["status","open","expandable"]))}}),oke=mt(nke,[["__scopeId","data-v-461db4c2"]]),ske={class:"tl-name"},ike={key:0},rke={key:1,class:"tl-dim"},lke={key:0,class:"fetch-url"},ake=et({__name:"WebFetchTool",props:{tool:{},mobile:{type:Boolean,default:!1}},setup(e){const t=e,{t:n}=$t(),o=F(()=>t.tool.status),s=F(()=>{const c=dc(t.tool.arg);return Rn(c?.url)??Rn(c?.uri)??""}),i=F(()=>s.value?v5e(s.value):""),r=F(()=>!!t.tool.output&&t.tool.output.length>0),l=F(()=>r.value),a=K(t.tool.defaultExpanded===!0&&l.value);return Je(()=>[t.tool.defaultExpanded,t.tool.output?.length,t.tool.status],()=>{t.tool.defaultExpanded===!0&&l.value&&(a.value=!0)}),(c,u)=>(k(),me(Yr,{status:o.value,open:a.value,expandable:l.value,onToggle:u[0]||(u[0]=d=>a.value=!a.value)},{leading:be(()=>[q(p(Me),{name:"globe",size:"sm"})]),body:be(()=>[s.value?(k(),M("div",lke,N(s.value),1)):te("",!0),q(tr,{lines:e.tool.output,"empty-text":p(n)("tools.output.waiting")},null,8,["lines","empty-text"])]),default:be(()=>[C("span",ske,N(p(n)("tools.label.web_fetch")),1),i.value?(k(),M("span",ike,N(i.value),1)):(k(),M("span",rke,N(e.tool.arg),1))]),_:1},8,["status","open","expandable"]))}}),cke=mt(ake,[["__scopeId","data-v-d6dc5dd3"]]);function uke(e){if(e.media&&e.status==="ok")return B6e;switch(Bs(e.name)){case"bash":return _5e;case"read":return a7e;case"edit":case"write":case"multi_edit":return K5e;case"grep":case"search":return I6e;case"glob":case"ls":return d6e;case"web_fetch":return cke;case"todo":return oke;case"task":return H8e;case"agentswarm":return Z7e;case"askuserquestion":return g5e;case"exitplanmode":return Q6e;case"creategoal":case"getgoal":case"setgoalbudget":case"updategoal":return k6e;default:return t6e}}const P5=et({__name:"ToolCall",props:{tool:{},mobile:{type:Boolean,default:!1}},emits:["openMedia","openFile","openAgent"],setup(e,{emit:t}){const n=e,o=t,s=F(()=>uke(n.tool));return(i,r)=>(k(),me(fs(s.value),{tool:e.tool,mobile:e.mobile,onOpenMedia:r[0]||(r[0]=l=>o("openMedia",l)),onOpenFile:r[1]||(r[1]=l=>o("openFile",l)),onOpenAgent:r[2]||(r[2]=l=>o("openAgent",l))},null,40,["tool","mobile"]))}});function bl(e){if(e>=1024*1024)return`${xx(e/(1024*1024))}M`;if(e>=1024){const t=e/1024;return`${t>=100?Math.round(t):xx(t)}k`}return String(e)}function xx(e){const t=e.toFixed(1);return t.endsWith(".0")?t.slice(0,-2):t}function bu(e){const t=Math.max(0,Math.floor(e/1e3));if(t<60)return t===0?"":`${t}s`;const n=Math.floor(t/60);if(n<60){const i=t%60;return i===0?`${n}m`:`${n}m${i}s`}const o=Math.floor(n/60),s=n%60;return s===0?`${o}h`:`${o}h${s}m`}function Zl(e){if(e.blocks)return e.blocks;const t=[];e.thinking&&t.push({kind:"thinking",thinking:e.thinking}),e.text&&t.push({kind:"text",text:e.text});for(const n of e.tools??[])t.push({kind:"tool",tool:n});return t}function rN(e){return!(e.tool.status==="ok"&&e.tool.media)}function dke(e){const t=Zl(e),n=[];let o=[],s=null;const i=()=>{const[l]=o;o.length===1&&l?n.push(l):o.length>1&&n.push({kind:"activity-run",items:o}),o=[]},r=()=>{s&&n.push({kind:"notification",items:s.items,sourceIndex:s.sourceIndex}),s=null};return t.forEach((l,a)=>{if(l.kind==="notification"){i(),s?s.items.push(l.notification):s={items:[l.notification],sourceIndex:a};return}if(r(),l.kind==="thinking"){o.push({kind:"thinking",thinking:l.thinking,startedAt:l.startedAt,durationMs:l.durationMs,sourceIndex:a});return}if(l.kind==="tool"&&rN(l)){o.push({kind:"tool",tool:l.tool,sourceIndex:a});return}i(),l.kind==="text"?n.push({kind:"text",text:l.text,sourceIndex:a}):l.kind==="tool"&&n.push({kind:"tool",tool:l.tool,sourceIndex:a})}),i(),r(),n}function lN(e){const t=dke(e);let n=-1;for(let r=t.length-1;r>=0;r--){const l=t[r];if(l?.kind==="text"&&l.text.trim().length>0){n=r;break}}if(n===-1){for(let r=0;rr.kind==="notification");return i.length>0?{folded:o.filter(r=>r.kind!=="notification"),visible:[...i,...s]}:{folded:o,visible:s}}function fke(e){let t;for(const n of e){if(n.kind!=="thinking"||n.startedAt===void 0)continue;const o=Date.parse(n.startedAt);Number.isNaN(o)||(t===void 0||ot.kind==="text"&&t.text?[t.text]:[]).join(` - -`)}function mke(e){const t=[];for(const n of Zl(e))if(n.kind==="thinking"&&n.thinking)t.push(`> **Thinking** -> ${n.thinking.split(` -`).join(` -> `)}`);else if(n.kind==="text"&&n.text)t.push(n.text);else if(n.kind==="tool"&&n.tool.output&&n.tool.output.length>0){const o=n.tool.output.join(` -`);t.push(`\`\`\` -[${n.tool.name}] -${o} -\`\`\``)}else if(n.kind==="notification"){const o=n.notification,s=[o.title,o.type,...o.body.split(` -`)].filter(i=>i!=="");s.length>0&&t.push(`> **Notification** -> ${s.join(` -> `)}`)}return t.join(` - -`)}function aN(e){return e.tool.id||`tool-${e.sourceIndex}`}function cN(e,t){return e.kind==="activity-run"?`activity-run-${e.items[0]?.sourceIndex??t}`:e.kind==="tool"?aN({tool:e.tool,sourceIndex:e.sourceIndex}):`${e.kind}-${e.sourceIndex}`}function gke(e){const t=new Map;for(const n of Zl(e)){if(n.kind!=="tool"||n.tool.status==="error")continue;const o=n.tool,s=Bs(o.name);if(s!=="edit"&&s!=="multi_edit"&&s!=="write")continue;let i,r=0,l=0,a=!1,c=!1,u=null;if(s==="write")i=kx(o),a=!0,c=!0;else if(u=iN(o),i=kx(o),u){const h=n$(u);r=h.added,l=h.removed}else c=!0;if(!i)continue;const d=vke(i),f=t.get(d);if(f)if(f.added+=r,f.removed+=l,f.hasWrite||=a,f.statsIncomplete||=c,f.diff!==null&&u!==null){let h=0,m=0;for(const b of f.diff)b.oldNo!==void 0&&b.oldNo>h&&(h=b.oldNo),b.newNo!==void 0&&b.newNo>m&&(m=b.newNo);const g=u.map(b=>({...b,oldNo:b.oldNo!==void 0?b.oldNo+h:void 0,newNo:b.newNo!==void 0?b.newNo+m:void 0}));f.diff=[...f.diff,{type:"hunk",text:"···"},...g]}else f.diff=null;else t.set(d,{path:i,added:r,removed:l,hasWrite:a,statsIncomplete:c,diff:u})}return[...t.values()]}function vke(e){const t=e.replace(/\\/g,"/");let n="",o=t,s=!1;const i=/^\/\/([^/]+\/[^/]+)(\/|$)/.exec(t);i?(n=`//${i[1].toLowerCase()}/`,o=t.slice(i[0].length-(i[0].endsWith("/")?1:0)),s=!0):/^[a-zA-Z]:\//.test(t)?(n=`${t[0].toLowerCase()}:/`,o=t.slice(3),s=!0):t.startsWith("/")&&(n="/",o=t.slice(1));const r=n!=="",l=[];for(const u of o.split("/"))if(!(!u||u===".")){if(u===".."){l.length>0&&l[l.length-1]!==".."?l.pop():r||l.push(u);continue}l.push(u)}const a=l.join("/"),c=n+a;return s?c.toLowerCase():c}const yke=2e3,o1=new Map;function kke(e){const t=[];for(const n of Zl(e)){if(n.kind!=="tool")continue;const o=n.tool,s=Bs(o.name);s!=="edit"&&s!=="multi_edit"&&s!=="write"||t.push(`${o.id}:${o.status}:${o.arg.length}`)}return t.join("|")}function bke(e){const t=kke(e),n=o1.get(e.id);if(n&&n.key===t)return n.changes;const o=gke(e);if(o1.set(e.id,{key:t,changes:o}),o1.size>yke){const s=o1.keys().next().value;s!==void 0&&o1.delete(s)}return o}const Cke=["aria-expanded"],wke={class:"think-title"},_ke={key:0,class:"think-time"},xke=["inert"],Ske={class:"think-text"},Ake=et({__name:"ThinkingBlock",props:{text:{},mobile:{type:Boolean,default:!1},streaming:{type:Boolean,default:!1},startedAt:{default:void 0},durationMs:{default:void 0}},setup(e){const t=e,n=K(!1),{t:o}=$t();Je(()=>t.streaming,(d,f)=>{f&&!d&&(n.value=!1)});const s=K(Date.now());Je(()=>[t.streaming,t.startedAt],([d,f],h,m)=>{if(!d||!f)return;s.value=Date.now();const g=setInterval(()=>{s.value=Date.now()},1e3);m(()=>clearInterval(g))},{immediate:!0});const i=F(()=>{if(t.streaming&&t.startedAt){const d=Date.parse(t.startedAt);return Number.isFinite(d)?bu(s.value-d):""}if(t.durationMs!==void 0){const d=bu(t.durationMs);return d?`· ${d}`:""}return""}),r=dn("pinScroll",()=>{}),l=K(null),a=K(null),c=K(!1);function u(){if(!n.value){const f=(a.value?.scrollHeight??0)>(typeof window<"u"?window.innerHeight:0);c.value=t.streaming&&f}if(n.value=!n.value,t.streaming)return;const d=l.value;d&&bt(()=>r(d))}return(d,f)=>(k(),M("div",{class:Fe(["think",{mob:e.mobile,open:n.value,streaming:e.streaming}])},[C("button",{ref_key:"headEl",ref:l,class:"think-head",type:"button","aria-expanded":n.value,onClick:u},[q(p(Me),{class:"think-bulb",name:"thinking",size:"sm"}),C("span",wke,N(e.streaming?p(o)("thinking.streaming"):p(o)("thinking.panelTitle")),1),i.value?(k(),M("span",_ke,N(i.value),1)):te("",!0),q(p(Me),{class:"think-car",name:"chevron-right",size:"sm"})],8,Cke),C("div",{class:Fe(["think-body",{open:n.value,instant:c.value}]),inert:!n.value},[C("div",{ref_key:"bodyInnerEl",ref:a,class:"think-body-inner"},[C("pre",Ske,N(e.text),1)],512)],10,xke)],2))}}),D5=mt(Ake,[["__scopeId","data-v-eddcd6b9"]]),Ra=Pn.global.t,uN=new Set(["read","bash","grep","search","glob","ls","web_fetch","edit","write"]);function dN(e){const t=Bs(e);return t==="multi_edit"?"edit":t}function fN(e){const t=[],n=new Map;for(const o of e){if(o.kind==="thinking")continue;const s=dN(o.tool.name);let i=n.get(s);i||(i={count:0,errors:0},n.set(s,i),t.push(s)),i.count++,o.tool.status==="error"&&i.errors++}return{order:t,byKind:n}}function pN(e,t){return uN.has(e)?Ra(`tools.group.typed.${e}.done`,{count:t}):Ra("tools.group.countOther",{count:t})}function hN(e){return{text:Ra("tools.activity.failedClause",{count:e}),tone:"danger"}}function mN(e){return e.map(t=>t.fragments.map(n=>n.text).join("")).join(" · ")}function Mke(e,t={}){const{order:n,byKind:o}=fN(e),s=[];let i=!1;for(const r of n){const l=o.get(r);if(!l)continue;const a=[{text:pN(r,l.count),tone:"normal"}];l.errors>0&&(i=!0,a.push(hN(l.errors))),s.push({fragments:a})}if(t.durationMs!==void 0){const r=bu(t.durationMs);r&&s.push({fragments:[{text:r,tone:"faint"}]})}return{clauses:s,plain:mN(s),hasError:i}}function Tke(e){if(e.kind==="thinking")return{fragments:[{text:Ra("thinking.streaming"),tone:"normal"}]};const t=dN(e.tool.name);let n=ug(e.tool.name,e.tool.arg);if(t==="write"&&n){const s=Ra("tools.chip.created");n.endsWith(s)&&(n=n.slice(0,n.length-s.length).trimEnd())}return{fragments:[{text:n&&uN.has(t)?Ra(`tools.activity.doing.${t}`,{subject:n}):Ra("tools.activity.busy"),tone:"normal"}]}}function Eke(e,t){const n=e.filter(c=>c!==t&&!(c.kind==="tool"&&c.tool.status==="running")),{order:o,byKind:s}=fN(n),i=Ra("tools.activity.liveDonePrefix"),r=[];for(const c of o){const u=s.get(c);if(!u)continue;const d=[{text:`${i}${pN(c,u.count)}`,tone:"faint"}];u.errors>0&&d.push(hN(u.errors)),r.push({fragments:d})}const l=t===null?null:Tke(t),a=l?[l,...r]:r;return{current:l,done:r,plain:mN(a)}}const Ike=["aria-expanded"],Lke=["aria-label"],$ke=["title"],Nke={key:0,class:"ar-sep"},Oke=["inert"],Fke={class:"ar-body-inner"},Rke=et({__name:"ActivityRun",props:{items:{},mobile:{type:Boolean,default:!1},streaming:{type:Boolean,default:!1}},emits:["openMedia","openFile","openAgent"],setup(e,{emit:t}){const n=e,o=t,s=F(()=>n.items.at(-1)),i=F(()=>{const S=s.value;if(n.streaming&&S?.kind==="thinking")return S;for(let T=n.items.length-1;T>=0;T--){const R=n.items[T];if(R?.kind==="tool"&&R.tool.status==="running")return R}return null}),r=F(()=>{if(n.streaming)return"running";for(const S of n.items)if(S.kind==="tool"&&S.tool.status==="running")return"running";for(const S of n.items)if(S.kind==="tool"&&S.tool.status==="error")return"error";return"done"}),l=K(r.value==="running"),a=dn("pinScroll",()=>{}),c=K(null),u=K(null),d=K(void 0),f=K(Date.now()),h=F(()=>{let S=null;for(const T of n.items)if(T.kind==="thinking"&&T.startedAt!==void 0){const R=Date.parse(T.startedAt);Number.isFinite(R)&&(S===null||R{if(S==="running"){T!==void 0&&T!=="running"&&(l.value=!0),u.value===null&&(u.value=h.value??Date.now()),d.value=void 0,f.value=Date.now();const B=setInterval(()=>{f.value=Date.now()},1e3);R(()=>clearInterval(B));return}T==="running"&&(l.value=!1,u.value!==null&&(d.value=Date.now()-u.value),u.value=null)},{immediate:!0});function m(){if(l.value=!l.value,n.streaming)return;const S=c.value;S&&bt(()=>a(S))}const g=F(()=>{if(r.value==="done")return"check";if(r.value==="error")return"close";const S=i.value??s.value;return S?S.kind==="thinking"?"thinking":JL(S.tool.name):"tool"}),b=F(()=>Eke(n.items,i.value)),_=F(()=>Mke(n.items,{durationMs:d.value})),v=F(()=>r.value!=="running"||u.value===null?"":bu(f.value-u.value)),y=F(()=>{if(r.value!=="running")return _.value.clauses;const S=[];return b.value.current&&S.push(b.value.current),S.push(...b.value.done),v.value&&S.push({fragments:[{text:v.value,tone:"faint"}]}),S}),w=F(()=>r.value!=="running"?_.value.plain:[b.value.plain,v.value].filter(Boolean).join(" · "));function x(S){if(S==="danger")return"ar-danger";if(S==="faint")return"ar-faint"}function A(S){return S.kind==="tool"?aN(S):`thinking-${S.sourceIndex}`}function L(S){return n.streaming&&S.kind==="thinking"&&S.durationMs===void 0&&S.sourceIndex===s.value?.sourceIndex}return(S,T)=>(k(),M("div",{class:Fe(["activity-run",{open:l.value}])},[C("button",{ref_key:"headEl",ref:c,class:"ar-head",type:"button","aria-expanded":l.value,onClick:m},[C("span",{class:Fe(["ar-glyph",{run:r.value==="running",err:r.value==="error",ok:r.value==="done"}]),role:"status","aria-label":r.value},[q(p(Me),{name:g.value,size:"sm","aria-hidden":"true"},null,8,["name"])],10,Lke),C("span",{class:"ar-sum",title:w.value},[(k(!0),M(De,null,vt(y.value,(R,B)=>(k(),M(De,{key:B},[B>0?(k(),M("span",Nke," · ")):te("",!0),(k(!0),M(De,null,vt(R.fragments,(I,$)=>(k(),M("span",{key:$,class:Fe(x(I.tone))},N(I.text),3))),128))],64))),128))],8,$ke),q(p(Me),{class:"ar-car",name:"chevron-right",size:"sm","aria-hidden":"true"})],8,Ike),C("div",{class:Fe(["ar-body",{open:l.value}]),inert:!l.value},[C("div",Fke,[(k(!0),M(De,null,vt(e.items,R=>(k(),M(De,{key:A(R)},[R.kind==="thinking"?(k(),me(D5,{key:0,text:R.thinking,mobile:e.mobile,streaming:L(R),"started-at":R.startedAt,"duration-ms":R.durationMs},null,8,["text","mobile","streaming","started-at","duration-ms"])):(k(),me(P5,{key:1,tool:R.tool,mobile:e.mobile,onOpenMedia:T[0]||(T[0]=B=>o("openMedia",B)),onOpenFile:T[1]||(T[1]=B=>o("openFile",B)),onOpenAgent:T[2]||(T[2]=B=>o("openAgent",B))},null,8,["tool","mobile"]))],64))),128))])],10,Oke)],2))}}),gN=mt(Rke,[["__scopeId","data-v-ad9927a0"]]);function Pke(e,t){try{const n=new Date(e);if(Number.isNaN(n.getTime()))return e;const o=new Date,s=u=>String(u).padStart(2,"0"),i=`${s(n.getHours())}:${s(n.getMinutes())}`,r=n.getFullYear()===o.getFullYear(),l=n.getMonth()===o.getMonth(),a=n.getDate()===o.getDate();if(r&&l&&a)return i;const c=new Date(o);return c.setDate(o.getDate()-1),n.getFullYear()===c.getFullYear()&&n.getMonth()===c.getMonth()&&n.getDate()===c.getDate()?`${t} ${i}`:r?`${s(n.getMonth()+1)}-${s(n.getDate())} ${i}`:`${n.getFullYear()}-${s(n.getMonth()+1)}-${s(n.getDate())} ${i}`}catch{return e}}const Dke={class:"msg-time"},Bke=et({__name:"MessageTime",props:{time:{}},setup(e){const t=e,{t:n}=$t(),o=F(()=>Pke(t.time,n("conversation.yesterday")));return(s,i)=>(k(),M("span",Dke,N(o.value),1))}}),_g=mt(Bke,[["__scopeId","data-v-c6ad4629"]]),Hke=["aria-expanded"],zke={class:"ntf-chip"},Wke={class:"ntf-main"},Uke={class:"ntf-title"},jke={class:"ntf-sub"},Vke={class:"ntf-side"},qke={class:"ng-dots"},Kke={class:"ng-list"},Zke=["aria-expanded","onClick"],Gke={class:"ntf-chip"},Yke={class:"ntf-main"},Xke={class:"ntf-title"},Jke={class:"ntf-sub"},Qke={class:"ntf-side"},ebe={class:"st"},tbe={class:"ntf-body"},nbe={class:"ntf-body-in"},obe={class:"nd-fields"},sbe={class:"k"},ibe={class:"v"},rbe={class:"k"},lbe={class:"v"},abe={class:"k"},cbe={class:"v"},ube={key:0,class:"nd-body"},dbe={key:1,class:"nd-out"},fbe=["title"],pbe=["onClick"],hbe={class:"nd-raw"},mbe=["aria-expanded"],gbe={class:"ntf-chip"},vbe={class:"ntf-main"},ybe={class:"ntf-title"},kbe={class:"ntf-sub"},bbe={class:"ntf-side"},Cbe={class:"st"},wbe={class:"ntf-body"},_be={class:"ntf-body-in"},xbe={class:"nd-fields"},Sbe={class:"k"},Abe={class:"v"},Mbe={class:"k"},Tbe={class:"v"},Ebe={class:"k"},Ibe={class:"v"},Lbe={key:0,class:"nd-body"},$be={key:1,class:"nd-out"},Nbe=["title"],Obe={class:"nd-raw"},Fbe=et({__name:"NotificationCard",props:{items:{}},setup(e){const t=e,{t:n}=$t(),o=F(()=>t.items.length>1),s=K(!1),i=K(new Set);function r(y,w){return y.id!==""?`${y.id}#${w}`:`ntf-${w}`}function l(y){const w=new Set(i.value);w.has(y)?w.delete(y):w.add(y),i.value=w}const a={completed:"check",failed:"alert-triangle",timed_out:"clock",killed:"stop",lost:"alert-triangle",info:"info"};function c(y){const w=Qh(y);return w==="info"&&y.sourceKind==="subagent"?"robot":a[w]}function u(y){return y.sourceKind==="subagent"?n("conversation.notification.kindSubagent"):n("conversation.notification.kindTask")}function d(y){return n(`conversation.notification.title.${Qh(y)}`,{kind:u(y)})}function f(y){return n(`conversation.notification.status.${Qh(y)}`)}function h(y){return zve(y)}function m(y){return y==="ok"?"done":y==="err"?"error":y==="warn"?"warn":""}const g=F(()=>t.items.map(y=>y.title).filter(y=>y!=="").join(" · ")),b=K(null);let _=null;async function v(y,w){await Ps(y)&&(b.value=w,_!==null&&clearTimeout(_),_=setTimeout(()=>{_=null,b.value=null},1200))}return(y,w)=>o.value?(k(),M("div",{key:0,class:Fe(["ntf-group-card",{open:s.value}])},[C("button",{class:"ntf-head",type:"button","aria-expanded":s.value,onClick:w[0]||(w[0]=x=>s.value=!s.value)},[C("span",zke,[q(p(Me),{name:"terminal",size:"sm"})]),C("span",Wke,[C("span",Uke,N(p(n)("conversation.notification.groupTitle",{n:e.items.length})),1),C("span",jke,N(g.value),1)]),C("span",Vke,[C("span",qke,[(k(!0),M(De,null,vt(e.items,(x,A)=>(k(),M("span",{key:r(x,A),class:Fe(["dot",m(h(x))])},null,2))),128))]),q(p(Me),{class:"ntf-car",name:"chevron-right",size:"sm"})])],8,Hke),An(C("div",Kke,[(k(!0),M(De,null,vt(e.items,(x,A)=>(k(),M("div",{key:r(x,A),class:Fe(["ng-item",[h(x),{open:i.value.has(r(x,A))}]])},[C("button",{class:"ntf-head",type:"button","aria-expanded":i.value.has(r(x,A)),onClick:L=>l(r(x,A))},[C("span",Gke,[q(p(Me),{name:c(x),size:"sm"},null,8,["name"])]),C("span",Yke,[C("span",Xke,N(d(x)),1),C("span",Jke,N(x.title),1)]),C("span",Qke,[C("span",ebe,N(f(x)),1),x.createdAt?(k(),me(_g,{key:0,time:x.createdAt},null,8,["time"])):te("",!0),q(p(Me),{class:"ntf-car",name:"chevron-right",size:"sm"})])],8,Zke),An(C("div",tbe,[C("div",nbe,[C("div",obe,[C("span",sbe,N(p(n)("conversation.notification.fields.type")),1),C("span",ibe,N(x.type),1),C("span",rbe,N(p(n)("conversation.notification.fields.source")),1),C("span",lbe,N(x.sourceKind)+" · "+N(x.sourceId),1),C("span",abe,N(p(n)("conversation.notification.fields.severity")),1),C("span",cbe,N(x.severity||"—"),1)]),x.body?(k(),M("div",ube,N(x.body),1)):te("",!0),x.outputFile?(k(),M("div",dbe,[q(p(Me),{class:"nd-out-ic",name:"file-text",size:"sm"}),C("span",{class:"path",title:x.outputFile.path},N(x.outputFile.path),9,fbe),C("button",{class:"nd-act",type:"button",onClick:Ot(L=>v(x.outputFile.path,r(x,A)),["stop"])},N(b.value===r(x,A)?p(n)("conversation.notification.copied"):p(n)("conversation.notification.copyPath")),9,pbe)])):te("",!0),C("details",hbe,[C("summary",null,[q(p(Me),{class:"nd-raw-car",name:"chevron-right",size:"sm"}),C("span",null,N(p(n)("conversation.notification.rawPayload")),1)]),C("pre",null,N(x.raw),1)])])],512),[[xs,i.value.has(r(x,A))]])],2))),128))],512),[[xs,s.value]])],2)):e.items[0]?(k(),M("div",{key:1,class:Fe(["ntf",[h(e.items[0]),{open:i.value.has(r(e.items[0],0))}]])},[C("button",{class:"ntf-head",type:"button","aria-expanded":i.value.has(r(e.items[0],0)),onClick:w[1]||(w[1]=x=>l(r(e.items[0],0)))},[C("span",gbe,[q(p(Me),{name:c(e.items[0]),size:"sm"},null,8,["name"])]),C("span",vbe,[C("span",ybe,N(d(e.items[0])),1),C("span",kbe,N(e.items[0].title),1)]),C("span",bbe,[C("span",Cbe,N(f(e.items[0])),1),e.items[0].createdAt?(k(),me(_g,{key:0,time:e.items[0].createdAt},null,8,["time"])):te("",!0),q(p(Me),{class:"ntf-car",name:"chevron-right",size:"sm"})])],8,mbe),An(C("div",wbe,[C("div",_be,[C("div",xbe,[C("span",Sbe,N(p(n)("conversation.notification.fields.type")),1),C("span",Abe,N(e.items[0].type),1),C("span",Mbe,N(p(n)("conversation.notification.fields.source")),1),C("span",Tbe,N(e.items[0].sourceKind)+" · "+N(e.items[0].sourceId),1),C("span",Ebe,N(p(n)("conversation.notification.fields.severity")),1),C("span",Ibe,N(e.items[0].severity||"—"),1)]),e.items[0].body?(k(),M("div",Lbe,N(e.items[0].body),1)):te("",!0),e.items[0].outputFile?(k(),M("div",$be,[q(p(Me),{class:"nd-out-ic",name:"file-text",size:"sm"}),C("span",{class:"path",title:e.items[0].outputFile.path},N(e.items[0].outputFile.path),9,Nbe),C("button",{class:"nd-act",type:"button",onClick:w[2]||(w[2]=Ot(x=>v(e.items[0].outputFile.path,r(e.items[0],0)),["stop"]))},N(b.value===r(e.items[0],0)?p(n)("conversation.notification.copied"):p(n)("conversation.notification.copyPath")),1)])):te("",!0),C("details",Obe,[C("summary",null,[q(p(Me),{class:"nd-raw-car",name:"chevron-right",size:"sm"}),C("span",null,N(p(n)("conversation.notification.rawPayload")),1)]),C("pre",null,N(e.items[0].raw),1)])])],512),[[xs,i.value.has(r(e.items[0],0))]])],2)):te("",!0)}}),vN=mt(Fbe,[["__scopeId","data-v-56e1f5ac"]]),Rbe=["aria-expanded"],Pbe=["title"],Dbe=["inert"],Bbe={class:"tf-body-inner"},Hbe={key:1,class:"msg"},zbe=et({__name:"TurnFold",props:{items:{},mobile:{type:Boolean,default:!1},streamingTailIndex:{default:null},live:{type:Boolean,default:!1},parked:{type:Boolean,default:!1},seedMs:{default:void 0},createdMs:{default:void 0},endedMs:{default:void 0},durationMs:{default:void 0}},emits:["openMedia","openFile","openAgent"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=F(()=>n.streamingTailIndex!==null),r=F(()=>n.live?n.parked?"parked":"live":"settled"),l=K(!1),a=F(()=>i.value||l.value),c=dn("pinScroll",()=>{}),u=K(null),d=K(Date.now());let f=null;function h(){f!==null&&(clearInterval(f),f=null)}kn(h),Je(r,(w,x)=>{w!=="settled"?(d.value=Date.now(),f===null&&(f=setInterval(()=>{d.value=Date.now()},1e3))):h(),x==="live"&&w!=="live"&&(l.value=!1)},{immediate:!0});const m=F(()=>n.seedMs===void 0?n.createdMs:n.createdMs===void 0?n.seedMs:Math.min(n.seedMs,n.createdMs)),g=F(()=>pke({startMs:m.value,endedMs:n.endedMs,durationMs:n.durationMs,state:r.value==="settled"?{phase:"settled"}:{phase:"live",nowMs:d.value}}));function b(){l.value=!l.value,bt(()=>{const w=u.value;w&&c(w)})}const _=F(()=>{const w=g.value===void 0?"":bu(g.value);return w?s("conversation.fold.worked",{duration:w}):s("conversation.fold.workedUnknown")});function v(w){return n.streamingTailIndex===null||w.kind==="thinking"&&w.durationMs!==void 0?!1:w.sourceIndex===n.streamingTailIndex}function y(w){if(n.streamingTailIndex===null)return!1;const x=w.items.at(-1);return x?.kind==="thinking"&&x.durationMs!==void 0?!1:x!==void 0&&x.sourceIndex===n.streamingTailIndex}return(w,x)=>e.items.length>0?(k(),M("div",{key:0,class:Fe(["turn-fold",{open:a.value,streaming:i.value}])},[i.value?te("",!0):(k(),M("button",{key:0,ref_key:"headEl",ref:u,class:"tf-head",type:"button","aria-expanded":l.value,onClick:b},[C("span",{class:"tf-sum",title:_.value},N(_.value),9,Pbe),q(p(Me),{class:"tf-car",name:"chevron-right",size:"sm","aria-hidden":"true"})],8,Rbe)),C("div",{class:Fe(["tf-body",{open:a.value}]),inert:!a.value},[C("div",Bbe,[(k(!0),M(De,null,vt(e.items,(A,L)=>(k(),M(De,{key:p(cN)(A,L)},[A.kind==="thinking"?(k(),me(D5,{key:0,text:A.thinking,mobile:e.mobile,streaming:v(A),"started-at":A.startedAt,"duration-ms":A.durationMs},null,8,["text","mobile","streaming","started-at","duration-ms"])):A.kind==="text"&&A.text?(k(),M("div",Hbe,[q(p(Mu),{text:A.text,streaming:v(A),"open-file":S=>o("openFile",S)},null,8,["text","streaming","open-file"])])):A.kind==="activity-run"?(k(),me(gN,{key:2,items:A.items,mobile:e.mobile,streaming:y(A),onOpenMedia:x[0]||(x[0]=S=>o("openMedia",S)),onOpenFile:x[1]||(x[1]=S=>o("openFile",S)),onOpenAgent:x[2]||(x[2]=S=>o("openAgent",S))},null,8,["items","mobile","streaming"])):A.kind==="tool"?(k(),me(P5,{key:3,tool:A.tool,mobile:e.mobile,onOpenMedia:x[3]||(x[3]=S=>o("openMedia",S)),onOpenFile:x[4]||(x[4]=S=>o("openFile",S)),onOpenAgent:x[5]||(x[5]=S=>o("openAgent",S))},null,8,["tool","mobile"])):A.kind==="notification"?(k(),me(vN,{key:4,items:A.items},null,8,["items"])):te("",!0)],64))),128))])],10,Dbe)],2)):te("",!0)}}),Wbe=mt(zbe,[["__scopeId","data-v-56d78783"]]),Ube={class:"turn-files"},jbe={class:"tf-ic","aria-hidden":"true"},Vbe={class:"tf-title"},qbe={key:0,class:"tf-stats"},Kbe={key:0,class:"tf-add"},Zbe={key:1,class:"tf-del"},Gbe={class:"diffbar","aria-hidden":"true"},Ybe={class:"tf-list"},Xbe={key:0,class:"tf-dir"},Jbe={class:"tf-base"},Qbe={key:0,class:"tf-stats"},eCe={key:0,class:"tf-add"},tCe={key:1,class:"tf-del"},g4=3,nCe=et({__name:"TurnFilesSummary",props:{changes:{},cwd:{},interactive:{type:Boolean,default:!0}},emits:["openDiff","openFile"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=F(()=>n.interactive!==!1),r=F(()=>{const w=n.changes.length;return s(w===1?"conversation.turnFiles.titleOne":"conversation.turnFiles.titleOther",{number:w})}),l=F(()=>n.changes.some(w=>w.statsIncomplete)),a=F(()=>{let w=0,x=0;for(const A of n.changes)w+=A.added,x+=A.removed;return{added:w,removed:x}}),c=F(()=>!l.value&&(a.value.added>0||a.value.removed>0)),u=K(!1),d=F(()=>u.value?n.changes:n.changes.slice(0,g4)),f=F(()=>Math.max(0,n.changes.length-g4)),h=F(()=>n.changes.length>g4),m=F(()=>u.value?s("conversation.turnFiles.showLess"):f.value===1?s("conversation.turnFiles.moreOne"):s("conversation.turnFiles.more",{number:f.value}));function g(w){const x=n.cwd?S2(w,n.cwd):null;return x!==null?x||w2(w):w}function b(w){const x=g(w),A=Math.max(x.lastIndexOf("/"),x.lastIndexOf("\\"));return A>0?x.slice(0,A+1):""}function _(w){const x=g(w),A=Math.max(x.lastIndexOf("/"),x.lastIndexOf("\\"));return A>=0?x.slice(A+1):x}function v(w){return w.statsIncomplete||w.added===0&&w.removed===0?null:{added:w.added,removed:w.removed}}function y(w){w.hasWrite?o("openFile",{path:w.path}):o("openDiff",w)}return(w,x)=>(k(),M("div",Ube,[q(p($z),null,YS({head:be(()=>[C("span",jbe,[q(p(Me),{name:"pencil",size:"sm"})]),C("span",Vbe,N(r.value),1),c.value?(k(),M("span",qbe,[a.value.added>0?(k(),M("span",Kbe,"+"+N(a.value.added),1)):te("",!0),a.value.removed>0?(k(),M("span",Zbe,"−"+N(a.value.removed),1)):te("",!0),C("span",Gbe,[C("span",{class:"seg-add",style:Gt({flexGrow:a.value.added})},null,4),C("span",{class:"seg-del",style:Gt({flexGrow:a.value.removed})},null,4)])])):te("",!0)]),default:be(()=>[C("ul",Ybe,[(k(!0),M(De,null,vt(d.value,A=>(k(),M("li",{key:A.path,class:"tf-row"},[(k(),me(fs(i.value?"button":"span"),{class:"tf-file",type:i.value?"button":void 0,onClick:L=>i.value&&y(A)},{default:be(()=>[b(A.path)?(k(),M("span",Xbe,N(b(A.path)),1)):te("",!0),C("span",Jbe,N(_(A.path)),1)]),_:2},1032,["type","onClick"])),v(A)?(k(),M("span",Qbe,[v(A).added>0?(k(),M("span",eCe,"+"+N(v(A).added),1)):te("",!0),v(A).removed>0?(k(),M("span",tCe,"−"+N(v(A).removed),1)):te("",!0)])):te("",!0)]))),128))])]),_:2},[h.value?{name:"foot",fn:be(()=>[q(p(Rt),{variant:"ghost",size:"sm",class:"tf-more","aria-expanded":u.value,onClick:x[0]||(x[0]=A=>u.value=!u.value)},{default:be(()=>[Ve(N(m.value)+" ",1),q(p(Me),{class:Fe(["tf-more-car",{open:u.value}]),name:"chevron-right",size:"sm","aria-hidden":"true"},null,8,["class"])]),_:1},8,["aria-expanded"])]),key:"0"}:void 0]),1024)]))}}),oCe=mt(nCe,[["__scopeId","data-v-5c856998"]]),sCe={class:"activity-notice",role:"status"},iCe={"aria-hidden":"true"},rCe={class:"an-label"},lCe=et({__name:"ActivityNotice",props:{label:{}},setup(e){return(t,n)=>(k(),M("div",sCe,[C("span",iCe,[q(p(Ao),{size:"sm"})]),C("span",rCe,N(e.label),1)]))}}),aCe=mt(lCe,[["__scopeId","data-v-13694e23"]]),cCe=["data-turn-id"],uCe=["title"],dCe={class:"cn-head-text"},fCe={key:0,class:"cn-bubble"},pCe={class:"cn-prompt"},hCe={key:1,class:"cn-meta"},mCe=et({__name:"CronNotice",props:{text:{},cron:{},turnId:{},createdAt:{}},setup(e){const t=e,{t:n}=$t(),o=F(()=>t.cron),s=F(()=>o.value?.missedCount!==void 0),i=F(()=>s.value?n("conversation.cron.missed"):n("conversation.cron.fired")),r=F(()=>{const f=o.value;return!f?.cron||f.recurring===!1?"":f.cron}),l=F(()=>s.value?"error":"ok"),a=F(()=>{const f=o.value;if(!f)return"";const h=[];return f.recurring===!1&&h.push(n("conversation.cron.oneShot")),typeof f.coalescedCount=="number"&&f.coalescedCount>1&&h.push(n("conversation.cron.coalesced",{n:f.coalescedCount})),f.missedCount!==void 0&&h.push(n("conversation.cron.missedCount",{n:f.missedCount})),f.stale===!0&&h.push(n("conversation.cron.finalDelivery")),h.join(" · ")}),c=F(()=>{const f=[i.value];return r.value&&f.push(r.value),a.value&&f.push(a.value),f.join(" · ")}),u=F(()=>{const f=o.value?.jobId;return f?n("conversation.cron.job",{id:f}):void 0}),d=F(()=>t.text??"");return(f,h)=>(k(),M("div",{class:Fe(["cn cron-notice",{"turn-anchor":!!e.turnId}]),"data-turn-id":e.turnId,role:"status"},[C("div",{class:Fe(["cn-head",l.value]),title:u.value},[q(p(Me),{name:"clock",size:"sm",class:"cn-head-ico","aria-hidden":"true"}),C("span",dCe,N(c.value),1)],10,uCe),d.value?(k(),M("div",fCe,[C("span",pCe,N(d.value),1)])):te("",!0),e.createdAt?(k(),M("div",hCe,[q(_g,{time:e.createdAt},null,8,["time"])])):te("",!0)],10,cCe))}}),gCe=mt(mCe,[["__scopeId","data-v-945035a6"]]);/*! - * PhotoSwipe 5.4.4 - https://photoswipe.com - * (c) 2024 Dmytro Semenov - */function ji(e,t,n){const o=document.createElement(t);return e&&(o.className=e),n&&n.appendChild(o),o}function es(e,t){return e.x=t.x,e.y=t.y,t.id!==void 0&&(e.id=t.id),e}function yN(e){e.x=Math.round(e.x),e.y=Math.round(e.y)}function uy(e,t){const n=Math.abs(e.x-t.x),o=Math.abs(e.y-t.y);return Math.sqrt(n*n+o*o)}function Y1(e,t){return e.x===t.x&&e.y===t.y}function Yp(e,t,n){return Math.min(Math.max(e,t),n)}function Sp(e,t,n){let o=`translate3d(${e}px,${t||0}px,0)`;return n!==void 0&&(o+=` scale3d(${n},${n},1)`),o}function Jc(e,t,n,o){e.style.transform=Sp(t,n,o)}const vCe="cubic-bezier(.4,0,.22,1)";function kN(e,t,n,o){e.style.transition=t?`${t} ${n}ms ${o||vCe}`:"none"}function dy(e,t,n){e.style.width=typeof t=="number"?`${t}px`:t,e.style.height=typeof n=="number"?`${n}px`:n}function yCe(e){kN(e)}function kCe(e){return"decode"in e?e.decode().catch(()=>{}):e.complete?Promise.resolve(e):new Promise((t,n)=>{e.onload=()=>t(e),e.onerror=n})}const fr={IDLE:"idle",LOADING:"loading",LOADED:"loaded",ERROR:"error"};function bCe(e){return"button"in e&&e.button===1||e.ctrlKey||e.metaKey||e.altKey||e.shiftKey}function CCe(e,t,n=document){let o=[];if(e instanceof Element)o=[e];else if(e instanceof NodeList||Array.isArray(e))o=Array.from(e);else{const s=typeof e=="string"?e:t;s&&(o=Array.from(n.querySelectorAll(s)))}return o}function Ax(){return!!(navigator.vendor&&navigator.vendor.match(/apple/i))}let bN=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>{bN=!0}}))}catch{}class wCe{constructor(){this._pool=[]}add(t,n,o,s){this._toggleListener(t,n,o,s)}remove(t,n,o,s){this._toggleListener(t,n,o,s,!0)}removeAll(){this._pool.forEach(t=>{this._toggleListener(t.target,t.type,t.listener,t.passive,!0,!0)}),this._pool=[]}_toggleListener(t,n,o,s,i,r){if(!t)return;const l=i?"removeEventListener":"addEventListener";n.split(" ").forEach(c=>{if(c){r||(i?this._pool=this._pool.filter(d=>d.type!==c||d.listener!==o||d.target!==t):this._pool.push({target:t,type:c,listener:o,passive:s}));const u=bN?{passive:s||!1}:!1;t[l](c,o,u)}})}}function CN(e,t){if(e.getViewportSizeFn){const n=e.getViewportSizeFn(e,t);if(n)return n}return{x:document.documentElement.clientWidth,y:window.innerHeight}}function x1(e,t,n,o,s){let i=0;if(t.paddingFn)i=t.paddingFn(n,o,s)[e];else if(t.padding)i=t.padding[e];else{const r="padding"+e[0].toUpperCase()+e.slice(1);t[r]&&(i=t[r])}return Number(i)||0}function wN(e,t,n,o){return{x:t.x-x1("left",e,t,n,o)-x1("right",e,t,n,o),y:t.y-x1("top",e,t,n,o)-x1("bottom",e,t,n,o)}}class _Ce{constructor(t){this.slide=t,this.currZoomLevel=1,this.center={x:0,y:0},this.max={x:0,y:0},this.min={x:0,y:0}}update(t){this.currZoomLevel=t,this.slide.width?(this._updateAxis("x"),this._updateAxis("y"),this.slide.pswp.dispatch("calcBounds",{slide:this.slide})):this.reset()}_updateAxis(t){const{pswp:n}=this.slide,o=this.slide[t==="x"?"width":"height"]*this.currZoomLevel,i=x1(t==="x"?"left":"top",n.options,n.viewportSize,this.slide.data,this.slide.index),r=this.slide.panAreaSize[t];this.center[t]=Math.round((r-o)/2)+i,this.max[t]=o>r?Math.round(r-o)+i:this.center[t],this.min[t]=o>r?i:this.center[t]}reset(){this.center.x=0,this.center.y=0,this.max.x=0,this.max.y=0,this.min.x=0,this.min.y=0}correctPan(t,n){return Yp(n,this.max[t],this.min[t])}}const Mx=4e3;class _N{constructor(t,n,o,s){this.pswp=s,this.options=t,this.itemData=n,this.index=o,this.panAreaSize=null,this.elementSize=null,this.fit=1,this.fill=1,this.vFill=1,this.initial=1,this.secondary=1,this.max=1,this.min=1}update(t,n,o){const s={x:t,y:n};this.elementSize=s,this.panAreaSize=o;const i=o.x/s.x,r=o.y/s.y;this.fit=Math.min(1,ir?i:r),this.vFill=Math.min(1,r),this.initial=this._getInitial(),this.secondary=this._getSecondary(),this.max=Math.max(this.initial,this.secondary,this._getMax()),this.min=Math.min(this.fit,this.initial,this.secondary),this.pswp&&this.pswp.dispatch("zoomLevelsUpdate",{zoomLevels:this,slideData:this.itemData})}_parseZoomLevelOption(t){const n=t+"ZoomLevel",o=this.options[n];if(o)return typeof o=="function"?o(this):o==="fill"?this.fill:o==="fit"?this.fit:Number(o)}_getSecondary(){let t=this._parseZoomLevelOption("secondary");return t||(t=Math.min(1,this.fit*3),this.elementSize&&t*this.elementSize.x>Mx&&(t=Mx/this.elementSize.x),t)}_getInitial(){return this._parseZoomLevelOption("initial")||this.fit}_getMax(){return this._parseZoomLevelOption("max")||Math.max(1,this.fit*4)}}class xCe{constructor(t,n,o){this.data=t,this.index=n,this.pswp=o,this.isActive=n===o.currIndex,this.currentResolution=0,this.panAreaSize={x:0,y:0},this.pan={x:0,y:0},this.isFirstSlide=this.isActive&&!o.opener.isOpen,this.zoomLevels=new _N(o.options,t,n,o),this.pswp.dispatch("gettingData",{slide:this,data:this.data,index:n}),this.content=this.pswp.contentLoader.getContentBySlide(this),this.container=ji("pswp__zoom-wrap","div"),this.holderElement=null,this.currZoomLevel=1,this.width=this.content.width,this.height=this.content.height,this.heavyAppended=!1,this.bounds=new _Ce(this),this.prevDisplayedWidth=-1,this.prevDisplayedHeight=-1,this.pswp.dispatch("slideInit",{slide:this})}setIsActive(t){t&&!this.isActive?this.activate():!t&&this.isActive&&this.deactivate()}append(t){this.holderElement=t,this.container.style.transformOrigin="0 0",this.data&&(this.calculateSize(),this.load(),this.updateContentSize(),this.appendHeavy(),this.holderElement.appendChild(this.container),this.zoomAndPanToInitial(),this.pswp.dispatch("firstZoomPan",{slide:this}),this.applyCurrentZoomPan(),this.pswp.dispatch("afterSetContent",{slide:this}),this.isActive&&this.activate())}load(){this.content.load(!1),this.pswp.dispatch("slideLoad",{slide:this})}appendHeavy(){const{pswp:t}=this;this.heavyAppended||!t.opener.isOpen||t.mainScroll.isShifted()||!this.isActive&&!1||this.pswp.dispatch("appendHeavy",{slide:this}).defaultPrevented||(this.heavyAppended=!0,this.content.append(),this.pswp.dispatch("appendHeavyContent",{slide:this}))}activate(){this.isActive=!0,this.appendHeavy(),this.content.activate(),this.pswp.dispatch("slideActivate",{slide:this})}deactivate(){this.isActive=!1,this.content.deactivate(),this.currZoomLevel!==this.zoomLevels.initial&&this.calculateSize(),this.currentResolution=0,this.zoomAndPanToInitial(),this.applyCurrentZoomPan(),this.updateContentSize(),this.pswp.dispatch("slideDeactivate",{slide:this})}destroy(){this.content.hasSlide=!1,this.content.remove(),this.container.remove(),this.pswp.dispatch("slideDestroy",{slide:this})}resize(){this.currZoomLevel===this.zoomLevels.initial||!this.isActive?(this.calculateSize(),this.currentResolution=0,this.zoomAndPanToInitial(),this.applyCurrentZoomPan(),this.updateContentSize()):(this.calculateSize(),this.bounds.update(this.currZoomLevel),this.panTo(this.pan.x,this.pan.y))}updateContentSize(t){const n=this.currentResolution||this.zoomLevels.initial;if(!n)return;const o=Math.round(this.width*n)||this.pswp.viewportSize.x,s=Math.round(this.height*n)||this.pswp.viewportSize.y;!this.sizeChanged(o,s)&&!t||this.content.setDisplayedSize(o,s)}sizeChanged(t,n){return t!==this.prevDisplayedWidth||n!==this.prevDisplayedHeight?(this.prevDisplayedWidth=t,this.prevDisplayedHeight=n,!0):!1}getPlaceholderElement(){var t;return(t=this.content.placeholder)===null||t===void 0?void 0:t.element}zoomTo(t,n,o,s){const{pswp:i}=this;if(!this.isZoomable()||i.mainScroll.isShifted())return;i.dispatch("beforeZoomTo",{destZoomLevel:t,centerPoint:n,transitionDuration:o}),i.animations.stopAllPan();const r=this.currZoomLevel;s||(t=Yp(t,this.zoomLevels.min,this.zoomLevels.max)),this.setZoomLevel(t),this.pan.x=this.calculateZoomToPanOffset("x",n,r),this.pan.y=this.calculateZoomToPanOffset("y",n,r),yN(this.pan);const l=()=>{this._setResolution(t),this.applyCurrentZoomPan()};o?i.animations.startTransition({isPan:!0,name:"zoomTo",target:this.container,transform:this.getCurrentTransform(),onComplete:l,duration:o,easing:i.options.easing}):l()}toggleZoom(t){this.zoomTo(this.currZoomLevel===this.zoomLevels.initial?this.zoomLevels.secondary:this.zoomLevels.initial,t,this.pswp.options.zoomAnimationDuration)}setZoomLevel(t){this.currZoomLevel=t,this.bounds.update(this.currZoomLevel)}calculateZoomToPanOffset(t,n,o){if(this.bounds.max[t]-this.bounds.min[t]===0)return this.bounds.center[t];n||(n=this.pswp.getViewportCenterPoint()),o||(o=this.zoomLevels.initial);const i=this.currZoomLevel/o;return this.bounds.correctPan(t,(this.pan[t]-n[t])*i+n[t])}panTo(t,n){this.pan.x=this.bounds.correctPan("x",t),this.pan.y=this.bounds.correctPan("y",n),this.applyCurrentZoomPan()}isPannable(){return!!this.width&&this.currZoomLevel>this.zoomLevels.fit}isZoomable(){return!!this.width&&this.content.isZoomable()}applyCurrentZoomPan(){this._applyZoomTransform(this.pan.x,this.pan.y,this.currZoomLevel),this===this.pswp.currSlide&&this.pswp.dispatch("zoomPanUpdate",{slide:this})}zoomAndPanToInitial(){this.currZoomLevel=this.zoomLevels.initial,this.bounds.update(this.currZoomLevel),es(this.pan,this.bounds.center),this.pswp.dispatch("initialZoomPan",{slide:this})}_applyZoomTransform(t,n,o){o/=this.currentResolution||this.zoomLevels.initial,Jc(this.container,t,n,o)}calculateSize(){const{pswp:t}=this;es(this.panAreaSize,wN(t.options,t.viewportSize,this.data,this.index)),this.zoomLevels.update(this.width,this.height,this.panAreaSize),t.dispatch("calcSlideSize",{slide:this})}getCurrentTransform(){const t=this.currZoomLevel/(this.currentResolution||this.zoomLevels.initial);return Sp(this.pan.x,this.pan.y,t)}_setResolution(t){t!==this.currentResolution&&(this.currentResolution=t,this.updateContentSize(),this.pswp.dispatch("resolutionChanged"))}}const SCe=.35,ACe=.6,Tx=.4,Ex=.5;function MCe(e,t){return e*t/(1-t)}class TCe{constructor(t){this.gestures=t,this.pswp=t.pswp,this.startPan={x:0,y:0}}start(){this.pswp.currSlide&&es(this.startPan,this.pswp.currSlide.pan),this.pswp.animations.stopAll()}change(){const{p1:t,prevP1:n,dragAxis:o}=this.gestures,{currSlide:s}=this.pswp;if(o==="y"&&this.pswp.options.closeOnVerticalDrag&&s&&s.currZoomLevel<=s.zoomLevels.fit&&!this.gestures.isMultitouch){const i=s.pan.y+(t.y-n.y);if(!this.pswp.dispatch("verticalDrag",{panY:i}).defaultPrevented){this._setPanWithFriction("y",i,ACe);const r=1-Math.abs(this._getVerticalDragRatio(s.pan.y));this.pswp.applyBgOpacity(r),s.applyCurrentZoomPan()}}else this._panOrMoveMainScroll("x")||(this._panOrMoveMainScroll("y"),s&&(yN(s.pan),s.applyCurrentZoomPan()))}end(){const{velocity:t}=this.gestures,{mainScroll:n,currSlide:o}=this.pswp;let s=0;if(this.pswp.animations.stopAll(),n.isShifted()){const r=(n.x-n.getCurrSlideX())/this.pswp.viewportSize.x;t.x<-Ex&&r<0||t.x<.1&&r<-.5?(s=1,t.x=Math.min(t.x,0)):(t.x>Ex&&r>0||t.x>-.1&&r>.5)&&(s=-1,t.x=Math.max(t.x,0)),n.moveIndexBy(s,!0,t.x)}o&&o.currZoomLevel>o.zoomLevels.max||this.gestures.isMultitouch?this.gestures.zoomLevels.correctZoomPan(!0):(this._finishPanGestureForAxis("x"),this._finishPanGestureForAxis("y"))}_finishPanGestureForAxis(t){const{velocity:n}=this.gestures,{currSlide:o}=this.pswp;if(!o)return;const{pan:s,bounds:i}=o,r=s[t],l=this.pswp.bgOpacity<1&&t==="y",c=r+MCe(n[t],.995);if(l){const m=this._getVerticalDragRatio(r),g=this._getVerticalDragRatio(c);if(m<0&&g<-Tx||m>0&&g>Tx){this.pswp.close();return}}const u=i.correctPan(t,c);if(r===u)return;const d=u===c?1:.82,f=this.pswp.bgOpacity,h=u-r;this.pswp.animations.startSpring({name:"panGesture"+t,isPan:!0,start:r,end:u,velocity:n[t],dampingRatio:d,onUpdate:m=>{if(l&&this.pswp.bgOpacity<1){const g=1-(u-m)/h;this.pswp.applyBgOpacity(Yp(f+(1-f)*g,0,1))}s[t]=Math.floor(m),o.applyCurrentZoomPan()}})}_panOrMoveMainScroll(t){const{p1:n,dragAxis:o,prevP1:s,isMultitouch:i}=this.gestures,{currSlide:r,mainScroll:l}=this.pswp,a=n[t]-s[t],c=l.x+a;if(!a||!r)return!1;if(t==="x"&&!r.isPannable()&&!i)return l.moveTo(c,!0),!0;const{bounds:u}=r,d=r.pan[t]+a;if(this.pswp.options.allowPanToNext&&o==="x"&&t==="x"&&!i){const f=l.getCurrSlideX(),h=l.x-f,m=a>0,g=!m;if(d>u.min[t]&&m){if(u.min[t]<=this.startPan[t])return l.moveTo(c,!0),!0;this._setPanWithFriction(t,d)}else if(d0)return l.moveTo(Math.max(c,f),!0),!0;if(h<0)return l.moveTo(Math.min(c,f),!0),!0}else this._setPanWithFriction(t,d)}else t==="y"?!l.isShifted()&&u.min.y!==u.max.y&&this._setPanWithFriction(t,d):this._setPanWithFriction(t,d);return!1}_getVerticalDragRatio(t){var n,o;return(t-((n=(o=this.pswp.currSlide)===null||o===void 0?void 0:o.bounds.center.y)!==null&&n!==void 0?n:0))/(this.pswp.viewportSize.y/3)}_setPanWithFriction(t,n,o){const{currSlide:s}=this.pswp;if(!s)return;const{pan:i,bounds:r}=s;if(r.correctPan(t,n)!==n||o){const a=Math.round(n-i[t]);i[t]+=a*(o||SCe)}else i[t]=n}}const ECe=.05,ICe=.15;function Ix(e,t,n){return e.x=(t.x+n.x)/2,e.y=(t.y+n.y)/2,e}class LCe{constructor(t){this.gestures=t,this._startPan={x:0,y:0},this._startZoomPoint={x:0,y:0},this._zoomPoint={x:0,y:0},this._wasOverFitZoomLevel=!1,this._startZoomLevel=1}start(){const{currSlide:t}=this.gestures.pswp;t&&(this._startZoomLevel=t.currZoomLevel,es(this._startPan,t.pan)),this.gestures.pswp.animations.stopAllPan(),this._wasOverFitZoomLevel=!1}change(){const{p1:t,startP1:n,p2:o,startP2:s,pswp:i}=this.gestures,{currSlide:r}=i;if(!r)return;const l=r.zoomLevels.min,a=r.zoomLevels.max;if(!r.isZoomable()||i.mainScroll.isShifted())return;Ix(this._startZoomPoint,n,s),Ix(this._zoomPoint,t,o);let c=1/uy(n,s)*uy(t,o)*this._startZoomLevel;if(c>r.zoomLevels.initial+r.zoomLevels.initial/15&&(this._wasOverFitZoomLevel=!0),ca&&(c=a+(c-a)*ECe);r.pan.x=this._calculatePanForZoomLevel("x",c),r.pan.y=this._calculatePanForZoomLevel("y",c),r.setZoomLevel(c),r.applyCurrentZoomPan()}end(){const{pswp:t}=this.gestures,{currSlide:n}=t;(!n||n.currZoomLevelo.zoomLevels.max?i=o.zoomLevels.max:(r=!1,i=s);const l=n.bgOpacity,a=n.bgOpacity<1,c=es({x:0,y:0},o.pan);let u=es({x:0,y:0},c);t&&(this._zoomPoint.x=0,this._zoomPoint.y=0,this._startZoomPoint.x=0,this._startZoomPoint.y=0,this._startZoomLevel=s,es(this._startPan,c)),r&&(u={x:this._calculatePanForZoomLevel("x",i),y:this._calculatePanForZoomLevel("y",i)}),o.setZoomLevel(i),u={x:o.bounds.correctPan("x",u.x),y:o.bounds.correctPan("y",u.y)},o.setZoomLevel(s);const d=!Y1(u,c);if(!d&&!r&&!a){o._setResolution(i),o.applyCurrentZoomPan();return}n.animations.stopAllPan(),n.animations.startSpring({isPan:!0,start:0,end:1e3,velocity:0,dampingRatio:1,naturalFrequency:40,onUpdate:f=>{if(f/=1e3,d||r){if(d&&(o.pan.x=c.x+(u.x-c.x)*f,o.pan.y=c.y+(u.y-c.y)*f),r){const h=s+(i-s)*f;o.setZoomLevel(h)}o.applyCurrentZoomPan()}a&&n.bgOpacity<1&&n.applyBgOpacity(Yp(l+(1-l)*f,0,1))},onComplete:()=>{o._setResolution(i),o.applyCurrentZoomPan()}})}}function Lx(e){return!!e.target.closest(".pswp__container")}class $Ce{constructor(t){this.gestures=t}click(t,n){const o=n.target.classList,s=o.contains("pswp__img"),i=o.contains("pswp__item")||o.contains("pswp__zoom-wrap");s?this._doClickOrTapAction("imageClick",t,n):i&&this._doClickOrTapAction("bgClick",t,n)}tap(t,n){Lx(n)&&this._doClickOrTapAction("tap",t,n)}doubleTap(t,n){Lx(n)&&this._doClickOrTapAction("doubleTap",t,n)}_doClickOrTapAction(t,n,o){var s;const{pswp:i}=this.gestures,{currSlide:r}=i,l=t+"Action",a=i.options[l];if(!i.dispatch(l,{point:n,originalEvent:o}).defaultPrevented){if(typeof a=="function"){a.call(i,n,o);return}switch(a){case"close":case"next":i[a]();break;case"zoom":r?.toggleZoom(n);break;case"zoom-or-close":r!=null&&r.isZoomable()&&r.zoomLevels.secondary!==r.zoomLevels.initial?r.toggleZoom(n):i.options.clickToCloseNonZoomable&&i.close();break;case"toggle-controls":(s=this.gestures.pswp.element)===null||s===void 0||s.classList.toggle("pswp--ui-visible");break}}}}const NCe=10,OCe=300,FCe=25;class RCe{constructor(t){this.pswp=t,this.dragAxis=null,this.p1={x:0,y:0},this.p2={x:0,y:0},this.prevP1={x:0,y:0},this.prevP2={x:0,y:0},this.startP1={x:0,y:0},this.startP2={x:0,y:0},this.velocity={x:0,y:0},this._lastStartP1={x:0,y:0},this._intervalP1={x:0,y:0},this._numActivePoints=0,this._ongoingPointers=[],this._touchEventEnabled="ontouchstart"in window,this._pointerEventEnabled=!!window.PointerEvent,this.supportsTouch=this._touchEventEnabled||this._pointerEventEnabled&&navigator.maxTouchPoints>1,this._numActivePoints=0,this._intervalTime=0,this._velocityCalculated=!1,this.isMultitouch=!1,this.isDragging=!1,this.isZooming=!1,this.raf=null,this._tapTimer=null,this.supportsTouch||(t.options.allowPanToNext=!1),this.drag=new TCe(this),this.zoomLevels=new LCe(this),this.tapHandler=new $Ce(this),t.on("bindEvents",()=>{t.events.add(t.scrollWrap,"click",this._onClick.bind(this)),this._pointerEventEnabled?this._bindEvents("pointer","down","up","cancel"):this._touchEventEnabled?(this._bindEvents("touch","start","end","cancel"),t.scrollWrap&&(t.scrollWrap.ontouchmove=()=>{},t.scrollWrap.ontouchend=()=>{})):this._bindEvents("mouse","down","up")})}_bindEvents(t,n,o,s){const{pswp:i}=this,{events:r}=i,l=s?t+s:"";r.add(i.scrollWrap,t+n,this.onPointerDown.bind(this)),r.add(window,t+"move",this.onPointerMove.bind(this)),r.add(window,t+o,this.onPointerUp.bind(this)),l&&r.add(i.scrollWrap,l,this.onPointerUp.bind(this))}onPointerDown(t){const n=t.type==="mousedown"||t.pointerType==="mouse";if(n&&t.button>0)return;const{pswp:o}=this;if(!o.opener.isOpen){t.preventDefault();return}o.dispatch("pointerDown",{originalEvent:t}).defaultPrevented||(n&&(o.mouseDetected(),this._preventPointerEventBehaviour(t,"down")),o.animations.stopAll(),this._updatePoints(t,"down"),this._numActivePoints===1&&(this.dragAxis=null,es(this.startP1,this.p1)),this._numActivePoints>1?(this._clearTapTimer(),this.isMultitouch=!0):this.isMultitouch=!1)}onPointerMove(t){this._preventPointerEventBehaviour(t,"move"),this._numActivePoints&&(this._updatePoints(t,"move"),!this.pswp.dispatch("pointerMove",{originalEvent:t}).defaultPrevented&&(this._numActivePoints===1&&!this.isDragging?(this.dragAxis||this._calculateDragDirection(),this.dragAxis&&!this.isDragging&&(this.isZooming&&(this.isZooming=!1,this.zoomLevels.end()),this.isDragging=!0,this._clearTapTimer(),this._updateStartPoints(),this._intervalTime=Date.now(),this._velocityCalculated=!1,es(this._intervalP1,this.p1),this.velocity.x=0,this.velocity.y=0,this.drag.start(),this._rafStopLoop(),this._rafRenderLoop())):this._numActivePoints>1&&!this.isZooming&&(this._finishDrag(),this.isZooming=!0,this._updateStartPoints(),this.zoomLevels.start(),this._rafStopLoop(),this._rafRenderLoop())))}_finishDrag(){this.isDragging&&(this.isDragging=!1,this._velocityCalculated||this._updateVelocity(!0),this.drag.end(),this.dragAxis=null)}onPointerUp(t){this._numActivePoints&&(this._updatePoints(t,"up"),!this.pswp.dispatch("pointerUp",{originalEvent:t}).defaultPrevented&&(this._numActivePoints===0&&(this._rafStopLoop(),this.isDragging?this._finishDrag():!this.isZooming&&!this.isMultitouch&&this._finishTap(t)),this._numActivePoints<2&&this.isZooming&&(this.isZooming=!1,this.zoomLevels.end(),this._numActivePoints===1&&(this.dragAxis=null,this._updateStartPoints()))))}_rafRenderLoop(){(this.isDragging||this.isZooming)&&(this._updateVelocity(),this.isDragging?Y1(this.p1,this.prevP1)||this.drag.change():(!Y1(this.p1,this.prevP1)||!Y1(this.p2,this.prevP2))&&this.zoomLevels.change(),this._updatePrevPoints(),this.raf=requestAnimationFrame(this._rafRenderLoop.bind(this)))}_updateVelocity(t){const n=Date.now(),o=n-this._intervalTime;o<50&&!t||(this.velocity.x=this._getVelocity("x",o),this.velocity.y=this._getVelocity("y",o),this._intervalTime=n,es(this._intervalP1,this.p1),this._velocityCalculated=!0)}_finishTap(t){const{mainScroll:n}=this.pswp;if(n.isShifted()){n.moveIndexBy(0,!0);return}if(t.type.indexOf("cancel")>0)return;if(t.type==="mouseup"||t.pointerType==="mouse"){this.tapHandler.click(this.startP1,t);return}const o=this.pswp.options.doubleTapAction?OCe:0;this._tapTimer?(this._clearTapTimer(),uy(this._lastStartP1,this.startP1){this.tapHandler.tap(this.startP1,t),this._clearTapTimer()},o))}_clearTapTimer(){this._tapTimer&&(clearTimeout(this._tapTimer),this._tapTimer=null)}_getVelocity(t,n){const o=this.p1[t]-this._intervalP1[t];return Math.abs(o)>1&&n>5?o/n:0}_rafStopLoop(){this.raf&&(cancelAnimationFrame(this.raf),this.raf=null)}_preventPointerEventBehaviour(t,n){this.pswp.applyFilters("preventPointerEvent",!0,t,n)&&t.preventDefault()}_updatePoints(t,n){if(this._pointerEventEnabled){const o=t,s=this._ongoingPointers.findIndex(i=>i.id===o.pointerId);n==="up"&&s>-1?this._ongoingPointers.splice(s,1):n==="down"&&s===-1?this._ongoingPointers.push(this._convertEventPosToPoint(o,{x:0,y:0})):s>-1&&this._convertEventPosToPoint(o,this._ongoingPointers[s]),this._numActivePoints=this._ongoingPointers.length,this._numActivePoints>0&&es(this.p1,this._ongoingPointers[0]),this._numActivePoints>1&&es(this.p2,this._ongoingPointers[1])}else{const o=t;this._numActivePoints=0,o.type.indexOf("touch")>-1?o.touches&&o.touches.length>0&&(this._convertEventPosToPoint(o.touches[0],this.p1),this._numActivePoints++,o.touches.length>1&&(this._convertEventPosToPoint(o.touches[1],this.p2),this._numActivePoints++)):(this._convertEventPosToPoint(t,this.p1),n==="up"?this._numActivePoints=0:this._numActivePoints++)}}_updatePrevPoints(){es(this.prevP1,this.p1),es(this.prevP2,this.p2)}_updateStartPoints(){es(this.startP1,this.p1),es(this.startP2,this.p2),this._updatePrevPoints()}_calculateDragDirection(){if(this.pswp.mainScroll.isShifted())this.dragAxis="x";else{const t=Math.abs(this.p1.x-this.startP1.x)-Math.abs(this.p1.y-this.startP1.y);if(t!==0){const n=t>0?"x":"y";Math.abs(this.p1[n]-this.startP1[n])>=NCe&&(this.dragAxis=n)}}}_convertEventPosToPoint(t,n){return n.x=t.pageX-this.pswp.offset.x,n.y=t.pageY-this.pswp.offset.y,"pointerId"in t?n.id=t.pointerId:t.identifier!==void 0&&(n.id=t.identifier),n}_onClick(t){this.pswp.mainScroll.isShifted()&&(t.preventDefault(),t.stopPropagation())}}const PCe=.35;class DCe{constructor(t){this.pswp=t,this.x=0,this.slideWidth=0,this._currPositionIndex=0,this._prevPositionIndex=0,this._containerShiftIndex=-1,this.itemHolders=[]}resize(t){const{pswp:n}=this,o=Math.round(n.viewportSize.x+n.viewportSize.x*n.options.spacing),s=o!==this.slideWidth;s&&(this.slideWidth=o,this.moveTo(this.getCurrSlideX())),this.itemHolders.forEach((i,r)=>{s&&Jc(i.el,(r+this._containerShiftIndex)*this.slideWidth),t&&i.slide&&i.slide.resize()})}resetPosition(){this._currPositionIndex=0,this._prevPositionIndex=0,this.slideWidth=0,this._containerShiftIndex=-1}appendHolders(){this.itemHolders=[];for(let t=0;t<3;t++){const n=ji("pswp__item","div",this.pswp.container);n.setAttribute("role","group"),n.setAttribute("aria-roledescription","slide"),n.setAttribute("aria-hidden","true"),n.style.display=t===1?"block":"none",this.itemHolders.push({el:n})}}canBeSwiped(){return this.pswp.getNumItems()>1}moveIndexBy(t,n,o){const{pswp:s}=this;let i=s.potentialIndex+t;const r=s.getNumItems();if(s.canLoop()){i=s.getLoopedIndex(i);const a=(t+r)%r;a<=r/2?t=a:t=a-r}else i<0?i=0:i>=r&&(i=r-1),t=i-s.potentialIndex;s.potentialIndex=i,this._currPositionIndex-=t,s.animations.stopMainScroll();const l=this.getCurrSlideX();if(!n)this.moveTo(l),this.updateCurrItem();else{s.animations.startSpring({isMainScroll:!0,start:this.x,end:l,velocity:o||0,naturalFrequency:30,dampingRatio:1,onUpdate:c=>{this.moveTo(c)},onComplete:()=>{this.updateCurrItem(),s.appendHeavy()}});let a=s.potentialIndex-s.currIndex;if(s.canLoop()){const c=(a+r)%r;c<=r/2?a=c:a=c-r}Math.abs(a)>1&&this.updateCurrItem()}return!!t}getCurrSlideX(){return this.slideWidth*this._currPositionIndex}isShifted(){return this.x!==this.getCurrSlideX()}updateCurrItem(){var t;const{pswp:n}=this,o=this._prevPositionIndex-this._currPositionIndex;if(!o)return;this._prevPositionIndex=this._currPositionIndex,n.currIndex=n.potentialIndex;let s=Math.abs(o),i;s>=3&&(this._containerShiftIndex+=o+(o>0?-3:3),s=3,this.itemHolders.forEach(r=>{var l;(l=r.slide)===null||l===void 0||l.destroy(),r.slide=void 0}));for(let r=0;r0?(i=this.itemHolders.shift(),i&&(this.itemHolders[2]=i,this._containerShiftIndex++,Jc(i.el,(this._containerShiftIndex+2)*this.slideWidth),n.setContent(i,n.currIndex-s+r+2))):(i=this.itemHolders.pop(),i&&(this.itemHolders.unshift(i),this._containerShiftIndex--,Jc(i.el,this._containerShiftIndex*this.slideWidth),n.setContent(i,n.currIndex+s-r-2)));Math.abs(this._containerShiftIndex)>50&&!this.isShifted()&&(this.resetPosition(),this.resize()),n.animations.stopAllPan(),this.itemHolders.forEach((r,l)=>{r.slide&&r.slide.setIsActive(l===1)}),n.currSlide=(t=this.itemHolders[1])===null||t===void 0?void 0:t.slide,n.contentLoader.updateLazy(o),n.currSlide&&n.currSlide.applyCurrentZoomPan(),n.dispatch("change")}moveTo(t,n){if(!this.pswp.canLoop()&&n){let o=(this.slideWidth*this._currPositionIndex-t)/this.slideWidth;o+=this.pswp.currIndex;const s=Math.round(t-this.x);(o<0&&s>0||o>=this.pswp.getNumItems()-1&&s<0)&&(t=this.x+s*PCe)}this.x=t,this.pswp.container&&Jc(this.pswp.container,t),this.pswp.dispatch("moveMainScroll",{x:t,dragging:n??!1})}}const BCe={Escape:27,z:90,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Tab:9},Pc=(e,t)=>t?e:BCe[e];class HCe{constructor(t){this.pswp=t,this._wasFocused=!1,t.on("bindEvents",()=>{t.options.trapFocus&&(t.options.initialPointerPos||this._focusRoot(),t.events.add(document,"focusin",this._onFocusIn.bind(this))),t.events.add(document,"keydown",this._onKeyDown.bind(this))});const n=document.activeElement;t.on("destroy",()=>{t.options.returnFocus&&n&&this._wasFocused&&n.focus()})}_focusRoot(){!this._wasFocused&&this.pswp.element&&(this.pswp.element.focus(),this._wasFocused=!0)}_onKeyDown(t){const{pswp:n}=this;if(n.dispatch("keydown",{originalEvent:t}).defaultPrevented||bCe(t))return;let o,s,i=!1;const r="key"in t;switch(r?t.key:t.keyCode){case Pc("Escape",r):n.options.escKey&&(o="close");break;case Pc("z",r):o="toggleZoom";break;case Pc("ArrowLeft",r):s="x";break;case Pc("ArrowUp",r):s="y";break;case Pc("ArrowRight",r):s="x",i=!0;break;case Pc("ArrowDown",r):i=!0,s="y";break;case Pc("Tab",r):this._focusRoot();break}if(s){t.preventDefault();const{currSlide:l}=n;n.options.arrowKeys&&s==="x"&&n.getNumItems()>1?o=i?"next":"prev":l&&l.currZoomLevel>l.zoomLevels.fit&&(l.pan[s]+=i?-80:80,l.panTo(l.pan.x,l.pan.y))}o&&(t.preventDefault(),n[o]())}_onFocusIn(t){const{template:n}=this.pswp;n&&document!==t.target&&n!==t.target&&!n.contains(t.target)&&n.focus()}}const zCe="cubic-bezier(.4,0,.22,1)";class WCe{constructor(t){var n;this.props=t;const{target:o,onComplete:s,transform:i,onFinish:r=()=>{},duration:l=333,easing:a=zCe}=t;this.onFinish=r;const c=i?"transform":"opacity",u=(n=t[c])!==null&&n!==void 0?n:"";this._target=o,this._onComplete=s,this._finished=!1,this._onTransitionEnd=this._onTransitionEnd.bind(this),this._helperTimeout=setTimeout(()=>{kN(o,c,l,a),this._helperTimeout=setTimeout(()=>{o.addEventListener("transitionend",this._onTransitionEnd,!1),o.addEventListener("transitioncancel",this._onTransitionEnd,!1),this._helperTimeout=setTimeout(()=>{this._finalizeAnimation()},l+500),o.style[c]=u},30)},0)}_onTransitionEnd(t){t.target===this._target&&this._finalizeAnimation()}_finalizeAnimation(){this._finished||(this._finished=!0,this.onFinish(),this._onComplete&&this._onComplete())}destroy(){this._helperTimeout&&clearTimeout(this._helperTimeout),yCe(this._target),this._target.removeEventListener("transitionend",this._onTransitionEnd,!1),this._target.removeEventListener("transitioncancel",this._onTransitionEnd,!1),this._finished||this._finalizeAnimation()}}const UCe=12,jCe=.75;class VCe{constructor(t,n,o){this.velocity=t*1e3,this._dampingRatio=n||jCe,this._naturalFrequency=o||UCe,this._dampedFrequency=this._naturalFrequency,this._dampingRatio<1&&(this._dampedFrequency*=Math.sqrt(1-this._dampingRatio*this._dampingRatio))}easeFrame(t,n){let o=0,s;n/=1e3;const i=Math.E**(-this._dampingRatio*this._naturalFrequency*n);if(this._dampingRatio===1)s=this.velocity+this._naturalFrequency*t,o=(t+s*n)*i,this.velocity=o*-this._naturalFrequency+s*i;else if(this._dampingRatio<1){s=1/this._dampedFrequency*(this._dampingRatio*this._naturalFrequency*t+this.velocity);const r=Math.cos(this._dampedFrequency*n),l=Math.sin(this._dampedFrequency*n);o=i*(t*r+s*l),this.velocity=o*-this._naturalFrequency*this._dampingRatio+i*(-this._dampedFrequency*t*l+this._dampedFrequency*s*r)}return o}}class qCe{constructor(t){this.props=t,this._raf=0;const{start:n,end:o,velocity:s,onUpdate:i,onComplete:r,onFinish:l=()=>{},dampingRatio:a,naturalFrequency:c}=t;this.onFinish=l;const u=new VCe(s,a,c);let d=Date.now(),f=n-o;const h=()=>{this._raf&&(f=u.easeFrame(f,Date.now()-d),Math.abs(f)<1&&Math.abs(u.velocity)<50?(i(o),r&&r(),this.onFinish()):(d=Date.now(),i(f+o),this._raf=requestAnimationFrame(h)))};this._raf=requestAnimationFrame(h)}destroy(){this._raf>=0&&cancelAnimationFrame(this._raf),this._raf=0}}class KCe{constructor(){this.activeAnimations=[]}startSpring(t){this._start(t,!0)}startTransition(t){this._start(t)}_start(t,n){const o=n?new qCe(t):new WCe(t);return this.activeAnimations.push(o),o.onFinish=()=>this.stop(o),o}stop(t){t.destroy();const n=this.activeAnimations.indexOf(t);n>-1&&this.activeAnimations.splice(n,1)}stopAll(){this.activeAnimations.forEach(t=>{t.destroy()}),this.activeAnimations=[]}stopAllPan(){this.activeAnimations=this.activeAnimations.filter(t=>t.props.isPan?(t.destroy(),!1):!0)}stopMainScroll(){this.activeAnimations=this.activeAnimations.filter(t=>t.props.isMainScroll?(t.destroy(),!1):!0)}isPanRunning(){return this.activeAnimations.some(t=>t.props.isPan)}}class ZCe{constructor(t){this.pswp=t,t.events.add(t.element,"wheel",this._onWheel.bind(this))}_onWheel(t){t.preventDefault();const{currSlide:n}=this.pswp;let{deltaX:o,deltaY:s}=t;if(n&&!this.pswp.dispatch("wheel",{originalEvent:t}).defaultPrevented)if(t.ctrlKey||this.pswp.options.wheelToZoom){if(n.isZoomable()){let i=-s;t.deltaMode===1?i*=.05:i*=t.deltaMode?1:.002,i=2**i;const r=n.currZoomLevel*i;n.zoomTo(r,{x:t.clientX,y:t.clientY})}}else n.isPannable()&&(t.deltaMode===1&&(o*=18,s*=18),n.panTo(n.pan.x-o,n.pan.y-s))}}function GCe(e){if(typeof e=="string")return e;if(!e||!e.isCustomSVG)return"";const t=e;let n='",n}class YCe{constructor(t,n){var o;const s=n.name||n.className;let i=n.html;if(t.options[s]===!1)return;typeof t.options[s+"SVG"]=="string"&&(i=t.options[s+"SVG"]),t.dispatch("uiElementCreate",{data:n});let r="";n.isButton?(r+="pswp__button ",r+=n.className||`pswp__button--${n.name}`):r+=n.className||`pswp__${n.name}`;let l=n.isButton?n.tagName||"button":n.tagName||"div";l=l.toLowerCase();const a=ji(r,l);if(n.isButton){l==="button"&&(a.type="button");let{title:d}=n;const{ariaLabel:f}=n;typeof t.options[s+"Title"]=="string"&&(d=t.options[s+"Title"]),d&&(a.title=d);const h=f||d;h&&a.setAttribute("aria-label",h)}a.innerHTML=GCe(i),n.onInit&&n.onInit(a,t),n.onClick&&(a.onclick=d=>{typeof n.onClick=="string"?t[n.onClick]():typeof n.onClick=="function"&&n.onClick(d,a,t)});const c=n.appendTo||"bar";let u=t.element;c==="bar"?(t.topBar||(t.topBar=ji("pswp__top-bar pswp__hide-on-close","div",t.scrollWrap)),u=t.topBar):(a.classList.add("pswp__hide-on-close"),c==="wrapper"&&(u=t.scrollWrap)),(o=u)===null||o===void 0||o.appendChild(t.applyFilters("uiElement",a,n))}}function xN(e,t,n){e.classList.add("pswp__button--arrow"),e.setAttribute("aria-controls","pswp__items"),t.on("change",()=>{t.options.loop||(n?e.disabled=!(t.currIndex0))})}const XCe={name:"arrowPrev",className:"pswp__button--arrow--prev",title:"Previous",order:10,isButton:!0,appendTo:"wrapper",html:{isCustomSVG:!0,size:60,inner:'',outlineID:"pswp__icn-arrow"},onClick:"prev",onInit:xN},JCe={name:"arrowNext",className:"pswp__button--arrow--next",title:"Next",order:11,isButton:!0,appendTo:"wrapper",html:{isCustomSVG:!0,size:60,inner:'',outlineID:"pswp__icn-arrow"},onClick:"next",onInit:(e,t)=>{xN(e,t,!0)}},QCe={name:"close",title:"Close",order:20,isButton:!0,html:{isCustomSVG:!0,inner:'',outlineID:"pswp__icn-close"},onClick:"close"},ewe={name:"zoom",title:"Zoom",order:10,isButton:!0,html:{isCustomSVG:!0,inner:'',outlineID:"pswp__icn-zoom"},onClick:"toggleZoom"},twe={name:"preloader",appendTo:"bar",order:7,html:{isCustomSVG:!0,inner:'',outlineID:"pswp__icn-loading"},onInit:(e,t)=>{let n,o=null;const s=(l,a)=>{e.classList.toggle("pswp__preloader--"+l,a)},i=l=>{n!==l&&(n=l,s("active",l))},r=()=>{var l;if(!((l=t.currSlide)!==null&&l!==void 0&&l.content.isLoading())){i(!1),o&&(clearTimeout(o),o=null);return}o||(o=setTimeout(()=>{var a;i(!!(!((a=t.currSlide)===null||a===void 0)&&a.content.isLoading())),o=null},t.options.preloaderDelay))};t.on("change",r),t.on("loadComplete",l=>{t.currSlide===l.slide&&r()}),t.ui&&(t.ui.updatePreloaderVisibility=r)}},nwe={name:"counter",order:5,onInit:(e,t)=>{t.on("change",()=>{e.innerText=t.currIndex+1+t.options.indexIndicatorSep+t.getNumItems()})}};function $x(e,t){e.classList.toggle("pswp--zoomed-in",t)}class owe{constructor(t){this.pswp=t,this.isRegistered=!1,this.uiElementsData=[],this.items=[],this.updatePreloaderVisibility=()=>{},this._lastUpdatedZoomLevel=void 0}init(){const{pswp:t}=this;this.isRegistered=!1,this.uiElementsData=[QCe,XCe,JCe,ewe,twe,nwe],t.dispatch("uiRegister"),this.uiElementsData.sort((n,o)=>(n.order||0)-(o.order||0)),this.items=[],this.isRegistered=!0,this.uiElementsData.forEach(n=>{this.registerElement(n)}),t.on("change",()=>{var n;(n=t.element)===null||n===void 0||n.classList.toggle("pswp--one-slide",t.getNumItems()===1)}),t.on("zoomPanUpdate",()=>this._onZoomPanUpdate())}registerElement(t){this.isRegistered?this.items.push(new YCe(this.pswp,t)):this.uiElementsData.push(t)}_onZoomPanUpdate(){const{template:t,currSlide:n,options:o}=this.pswp;if(this.pswp.opener.isClosing||!t||!n)return;let{currZoomLevel:s}=n;if(this.pswp.opener.isOpen||(s=n.zoomLevels.initial),s===this._lastUpdatedZoomLevel)return;this._lastUpdatedZoomLevel=s;const i=n.zoomLevels.initial-n.zoomLevels.secondary;if(Math.abs(i)<.01||!n.isZoomable()){$x(t,!1),t.classList.remove("pswp--zoom-allowed");return}t.classList.add("pswp--zoom-allowed");const r=s===n.zoomLevels.initial?n.zoomLevels.secondary:n.zoomLevels.initial;$x(t,r<=s),(o.imageClickAction==="zoom"||o.imageClickAction==="zoom-or-close")&&t.classList.add("pswp--click-to-zoom")}}function swe(e){const t=e.getBoundingClientRect();return{x:t.left,y:t.top,w:t.width}}function iwe(e,t,n){const o=e.getBoundingClientRect(),s=o.width/t,i=o.height/n,r=s>i?s:i,l=(o.width-t*r)/2,a=(o.height-n*r)/2,c={x:o.left+l,y:o.top+a,w:t*r};return c.innerRect={w:o.width,h:o.height,x:l,y:a},c}function rwe(e,t,n){const o=n.dispatch("thumbBounds",{index:e,itemData:t,instance:n});if(o.thumbBounds)return o.thumbBounds;const{element:s}=t;let i,r;if(s&&n.options.thumbSelector!==!1){const l=n.options.thumbSelector||"img";r=s.matches(l)?s:s.querySelector(l)}return r=n.applyFilters("thumbEl",r,t,e),r&&(t.thumbCropped?i=iwe(r,t.width||t.w||0,t.height||t.h||0):i=swe(r)),n.applyFilters("thumbBounds",i,t,e)}class lwe{constructor(t,n){this.type=t,this.defaultPrevented=!1,n&&Object.assign(this,n)}preventDefault(){this.defaultPrevented=!0}}class awe{constructor(){this._listeners={},this._filters={},this.pswp=void 0,this.options=void 0}addFilter(t,n,o=100){var s,i,r;this._filters[t]||(this._filters[t]=[]),(s=this._filters[t])===null||s===void 0||s.push({fn:n,priority:o}),(i=this._filters[t])===null||i===void 0||i.sort((l,a)=>l.priority-a.priority),(r=this.pswp)===null||r===void 0||r.addFilter(t,n,o)}removeFilter(t,n){this._filters[t]&&(this._filters[t]=this._filters[t].filter(o=>o.fn!==n)),this.pswp&&this.pswp.removeFilter(t,n)}applyFilters(t,...n){var o;return(o=this._filters[t])===null||o===void 0||o.forEach(s=>{n[0]=s.fn.apply(this,n)}),n[0]}on(t,n){var o,s;this._listeners[t]||(this._listeners[t]=[]),(o=this._listeners[t])===null||o===void 0||o.push(n),(s=this.pswp)===null||s===void 0||s.on(t,n)}off(t,n){var o;this._listeners[t]&&(this._listeners[t]=this._listeners[t].filter(s=>n!==s)),(o=this.pswp)===null||o===void 0||o.off(t,n)}dispatch(t,n){var o;if(this.pswp)return this.pswp.dispatch(t,n);const s=new lwe(t,n);return(o=this._listeners[t])===null||o===void 0||o.forEach(i=>{i.call(this,s)}),s}}class cwe{constructor(t,n){if(this.element=ji("pswp__img pswp__img--placeholder",t?"img":"div",n),t){const o=this.element;o.decoding="async",o.alt="",o.src=t,o.setAttribute("role","presentation")}this.element.setAttribute("aria-hidden","true")}setDisplayedSize(t,n){this.element&&(this.element.tagName==="IMG"?(dy(this.element,250,"auto"),this.element.style.transformOrigin="0 0",this.element.style.transform=Sp(0,0,t/250)):dy(this.element,t,n))}destroy(){var t;(t=this.element)!==null&&t!==void 0&&t.parentNode&&this.element.remove(),this.element=null}}class uwe{constructor(t,n,o){this.instance=n,this.data=t,this.index=o,this.element=void 0,this.placeholder=void 0,this.slide=void 0,this.displayedImageWidth=0,this.displayedImageHeight=0,this.width=Number(this.data.w)||Number(this.data.width)||0,this.height=Number(this.data.h)||Number(this.data.height)||0,this.isAttached=!1,this.hasSlide=!1,this.isDecoding=!1,this.state=fr.IDLE,this.data.type?this.type=this.data.type:this.data.src?this.type="image":this.type="html",this.instance.dispatch("contentInit",{content:this})}removePlaceholder(){this.placeholder&&!this.keepPlaceholder()&&setTimeout(()=>{this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0)},1e3)}load(t,n){if(this.slide&&this.usePlaceholder())if(this.placeholder){const o=this.placeholder.element;o&&!o.parentElement&&this.slide.container.prepend(o)}else{const o=this.instance.applyFilters("placeholderSrc",this.data.msrc&&this.slide.isFirstSlide?this.data.msrc:!1,this);this.placeholder=new cwe(o,this.slide.container)}this.element&&!n||this.instance.dispatch("contentLoad",{content:this,isLazy:t}).defaultPrevented||(this.isImageContent()?(this.element=ji("pswp__img","img"),this.displayedImageWidth&&this.loadImage(t)):(this.element=ji("pswp__content","div"),this.element.innerHTML=this.data.html||""),n&&this.slide&&this.slide.updateContentSize(!0))}loadImage(t){var n,o;if(!this.isImageContent()||!this.element||this.instance.dispatch("contentLoadImage",{content:this,isLazy:t}).defaultPrevented)return;const s=this.element;this.updateSrcsetSizes(),this.data.srcset&&(s.srcset=this.data.srcset),s.src=(n=this.data.src)!==null&&n!==void 0?n:"",s.alt=(o=this.data.alt)!==null&&o!==void 0?o:"",this.state=fr.LOADING,s.complete?this.onLoaded():(s.onload=()=>{this.onLoaded()},s.onerror=()=>{this.onError()})}setSlide(t){this.slide=t,this.hasSlide=!0,this.instance=t.pswp}onLoaded(){this.state=fr.LOADED,this.slide&&this.element&&(this.instance.dispatch("loadComplete",{slide:this.slide,content:this}),this.slide.isActive&&this.slide.heavyAppended&&!this.element.parentNode&&(this.append(),this.slide.updateContentSize(!0)),(this.state===fr.LOADED||this.state===fr.ERROR)&&this.removePlaceholder())}onError(){this.state=fr.ERROR,this.slide&&(this.displayError(),this.instance.dispatch("loadComplete",{slide:this.slide,isError:!0,content:this}),this.instance.dispatch("loadError",{slide:this.slide,content:this}))}isLoading(){return this.instance.applyFilters("isContentLoading",this.state===fr.LOADING,this)}isError(){return this.state===fr.ERROR}isImageContent(){return this.type==="image"}setDisplayedSize(t,n){if(this.element&&(this.placeholder&&this.placeholder.setDisplayedSize(t,n),!this.instance.dispatch("contentResize",{content:this,width:t,height:n}).defaultPrevented&&(dy(this.element,t,n),this.isImageContent()&&!this.isError()))){const o=!this.displayedImageWidth&&t;this.displayedImageWidth=t,this.displayedImageHeight=n,o?this.loadImage(!1):this.updateSrcsetSizes(),this.slide&&this.instance.dispatch("imageSizeChange",{slide:this.slide,width:t,height:n,content:this})}}isZoomable(){return this.instance.applyFilters("isContentZoomable",this.isImageContent()&&this.state!==fr.ERROR,this)}updateSrcsetSizes(){if(!this.isImageContent()||!this.element||!this.data.srcset)return;const t=this.element,n=this.instance.applyFilters("srcsetSizesWidth",this.displayedImageWidth,this);(!t.dataset.largestUsedSize||n>parseInt(t.dataset.largestUsedSize,10))&&(t.sizes=n+"px",t.dataset.largestUsedSize=String(n))}usePlaceholder(){return this.instance.applyFilters("useContentPlaceholder",this.isImageContent(),this)}lazyLoad(){this.instance.dispatch("contentLazyLoad",{content:this}).defaultPrevented||this.load(!0)}keepPlaceholder(){return this.instance.applyFilters("isKeepingPlaceholder",this.isLoading(),this)}destroy(){this.hasSlide=!1,this.slide=void 0,!this.instance.dispatch("contentDestroy",{content:this}).defaultPrevented&&(this.remove(),this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0),this.isImageContent()&&this.element&&(this.element.onload=null,this.element.onerror=null,this.element=void 0))}displayError(){if(this.slide){var t,n;let o=ji("pswp__error-msg","div");o.innerText=(t=(n=this.instance.options)===null||n===void 0?void 0:n.errorMsg)!==null&&t!==void 0?t:"",o=this.instance.applyFilters("contentErrorElement",o,this),this.element=ji("pswp__content pswp__error-msg-container","div"),this.element.appendChild(o),this.slide.container.innerText="",this.slide.container.appendChild(this.element),this.slide.updateContentSize(!0),this.removePlaceholder()}}append(){if(this.isAttached||!this.element)return;if(this.isAttached=!0,this.state===fr.ERROR){this.displayError();return}if(this.instance.dispatch("contentAppend",{content:this}).defaultPrevented)return;const t="decode"in this.element;this.isImageContent()?t&&this.slide&&(!this.slide.isActive||Ax())?(this.isDecoding=!0,this.element.decode().catch(()=>{}).finally(()=>{this.isDecoding=!1,this.appendImage()})):this.appendImage():this.slide&&!this.element.parentNode&&this.slide.container.appendChild(this.element)}activate(){this.instance.dispatch("contentActivate",{content:this}).defaultPrevented||!this.slide||(this.isImageContent()&&this.isDecoding&&!Ax()?this.appendImage():this.isError()&&this.load(!1,!0),this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","false"))}deactivate(){this.instance.dispatch("contentDeactivate",{content:this}),this.slide&&this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","true")}remove(){this.isAttached=!1,!this.instance.dispatch("contentRemove",{content:this}).defaultPrevented&&(this.element&&this.element.parentNode&&this.element.remove(),this.placeholder&&this.placeholder.element&&this.placeholder.element.remove())}appendImage(){this.isAttached&&(this.instance.dispatch("contentAppendImage",{content:this}).defaultPrevented||(this.slide&&this.element&&!this.element.parentNode&&this.slide.container.appendChild(this.element),(this.state===fr.LOADED||this.state===fr.ERROR)&&this.removePlaceholder()))}}const dwe=5;function SN(e,t,n){const o=t.createContentFromData(e,n);let s;const{options:i}=t;if(i){s=new _N(i,e,-1);let r;t.pswp?r=t.pswp.viewportSize:r=CN(i,t);const l=wN(i,r,e,n);s.update(o.width,o.height,l)}return o.lazyLoad(),s&&o.setDisplayedSize(Math.ceil(o.width*s.initial),Math.ceil(o.height*s.initial)),o}function fwe(e,t){const n=t.getItemData(e);if(!t.dispatch("lazyLoadSlide",{index:e,itemData:n}).defaultPrevented)return SN(n,t,e)}class pwe{constructor(t){this.pswp=t,this.limit=Math.max(t.options.preload[0]+t.options.preload[1]+1,dwe),this._cachedItems=[]}updateLazy(t){const{pswp:n}=this;if(n.dispatch("lazyLoad").defaultPrevented)return;const{preload:o}=n.options,s=t===void 0?!0:t>=0;let i;for(i=0;i<=o[1];i++)this.loadSlideByIndex(n.currIndex+(s?i:-i));for(i=1;i<=o[0];i++)this.loadSlideByIndex(n.currIndex+(s?-i:i))}loadSlideByIndex(t){const n=this.pswp.getLoopedIndex(t);let o=this.getContentByIndex(n);o||(o=fwe(n,this.pswp),o&&this.addToCache(o))}getContentBySlide(t){let n=this.getContentByIndex(t.index);return n||(n=this.pswp.createContentFromData(t.data,t.index),this.addToCache(n)),n.setSlide(t),n}addToCache(t){if(this.removeByIndex(t.index),this._cachedItems.push(t),this._cachedItems.length>this.limit){const n=this._cachedItems.findIndex(o=>!o.isAttached&&!o.hasSlide);n!==-1&&this._cachedItems.splice(n,1)[0].destroy()}}removeByIndex(t){const n=this._cachedItems.findIndex(o=>o.index===t);n!==-1&&this._cachedItems.splice(n,1)}getContentByIndex(t){return this._cachedItems.find(n=>n.index===t)}destroy(){this._cachedItems.forEach(t=>t.destroy()),this._cachedItems=[]}}class hwe extends awe{getNumItems(){var t;let n=0;const o=(t=this.options)===null||t===void 0?void 0:t.dataSource;o&&"length"in o?n=o.length:o&&"gallery"in o&&(o.items||(o.items=this._getGalleryDOMElements(o.gallery)),o.items&&(n=o.items.length));const s=this.dispatch("numItems",{dataSource:o,numItems:n});return this.applyFilters("numItems",s.numItems,o)}createContentFromData(t,n){return new uwe(t,this,n)}getItemData(t){var n;const o=(n=this.options)===null||n===void 0?void 0:n.dataSource;let s={};Array.isArray(o)?s=o[t]:o&&"gallery"in o&&(o.items||(o.items=this._getGalleryDOMElements(o.gallery)),s=o.items[t]);let i=s;i instanceof Element&&(i=this._domElementToItemData(i));const r=this.dispatch("itemData",{itemData:i||{},index:t});return this.applyFilters("itemData",r.itemData,t)}_getGalleryDOMElements(t){var n,o;return(n=this.options)!==null&&n!==void 0&&n.children||(o=this.options)!==null&&o!==void 0&&o.childSelector?CCe(this.options.children,this.options.childSelector,t)||[]:[t]}_domElementToItemData(t){const n={element:t},o=t.tagName==="A"?t:t.querySelector("a");if(o){n.src=o.dataset.pswpSrc||o.href,o.dataset.pswpSrcset&&(n.srcset=o.dataset.pswpSrcset),n.width=o.dataset.pswpWidth?parseInt(o.dataset.pswpWidth,10):0,n.height=o.dataset.pswpHeight?parseInt(o.dataset.pswpHeight,10):0,n.w=n.width,n.h=n.height,o.dataset.pswpType&&(n.type=o.dataset.pswpType);const i=t.querySelector("img");if(i){var s;n.msrc=i.currentSrc||i.src,n.alt=(s=i.getAttribute("alt"))!==null&&s!==void 0?s:""}(o.dataset.pswpCropped||o.dataset.cropped)&&(n.thumbCropped=!0)}return this.applyFilters("domItemData",n,t,o)}lazyLoadData(t,n){return SN(t,this,n)}}const s1=.003;class mwe{constructor(t){this.pswp=t,this.isClosed=!0,this.isOpen=!1,this.isClosing=!1,this.isOpening=!1,this._duration=void 0,this._useAnimation=!1,this._croppedZoom=!1,this._animateRootOpacity=!1,this._animateBgOpacity=!1,this._placeholder=void 0,this._opacityElement=void 0,this._cropContainer1=void 0,this._cropContainer2=void 0,this._thumbBounds=void 0,this._prepareOpen=this._prepareOpen.bind(this),t.on("firstZoomPan",this._prepareOpen)}open(){this._prepareOpen(),this._start()}close(){if(this.isClosed||this.isClosing||this.isOpening)return;const t=this.pswp.currSlide;this.isOpen=!1,this.isOpening=!1,this.isClosing=!0,this._duration=this.pswp.options.hideAnimationDuration,t&&t.currZoomLevel*t.width>=this.pswp.options.maxWidthToAnimate&&(this._duration=0),this._applyStartProps(),setTimeout(()=>{this._start()},this._croppedZoom?30:0)}_prepareOpen(){if(this.pswp.off("firstZoomPan",this._prepareOpen),!this.isOpening){const t=this.pswp.currSlide;this.isOpening=!0,this.isClosing=!1,this._duration=this.pswp.options.showAnimationDuration,t&&t.zoomLevels.initial*t.width>=this.pswp.options.maxWidthToAnimate&&(this._duration=0),this._applyStartProps()}}_applyStartProps(){const{pswp:t}=this,n=this.pswp.currSlide,{options:o}=t;if(o.showHideAnimationType==="fade"?(o.showHideOpacity=!0,this._thumbBounds=void 0):o.showHideAnimationType==="none"?(o.showHideOpacity=!1,this._duration=0,this._thumbBounds=void 0):this.isOpening&&t._initialThumbBounds?this._thumbBounds=t._initialThumbBounds:this._thumbBounds=this.pswp.getThumbBounds(),this._placeholder=n?.getPlaceholderElement(),t.animations.stopAll(),this._useAnimation=!!(this._duration&&this._duration>50),this._animateZoom=!!this._thumbBounds&&n?.content.usePlaceholder()&&(!this.isClosing||!t.mainScroll.isShifted()),!this._animateZoom)this._animateRootOpacity=!0,this.isOpening&&n&&(n.zoomAndPanToInitial(),n.applyCurrentZoomPan());else{var s;this._animateRootOpacity=(s=o.showHideOpacity)!==null&&s!==void 0?s:!1}if(this._animateBgOpacity=!this._animateRootOpacity&&this.pswp.options.bgOpacity>s1,this._opacityElement=this._animateRootOpacity?t.element:t.bg,!this._useAnimation){this._duration=0,this._animateZoom=!1,this._animateBgOpacity=!1,this._animateRootOpacity=!0,this.isOpening&&(t.element&&(t.element.style.opacity=String(s1)),t.applyBgOpacity(1));return}if(this._animateZoom&&this._thumbBounds&&this._thumbBounds.innerRect){var i;this._croppedZoom=!0,this._cropContainer1=this.pswp.container,this._cropContainer2=(i=this.pswp.currSlide)===null||i===void 0?void 0:i.holderElement,t.container&&(t.container.style.overflow="hidden",t.container.style.width=t.viewportSize.x+"px")}else this._croppedZoom=!1;this.isOpening?(this._animateRootOpacity?(t.element&&(t.element.style.opacity=String(s1)),t.applyBgOpacity(1)):(this._animateBgOpacity&&t.bg&&(t.bg.style.opacity=String(s1)),t.element&&(t.element.style.opacity="1")),this._animateZoom&&(this._setClosedStateZoomPan(),this._placeholder&&(this._placeholder.style.willChange="transform",this._placeholder.style.opacity=String(s1)))):this.isClosing&&(t.mainScroll.itemHolders[0]&&(t.mainScroll.itemHolders[0].el.style.display="none"),t.mainScroll.itemHolders[2]&&(t.mainScroll.itemHolders[2].el.style.display="none"),this._croppedZoom&&t.mainScroll.x!==0&&(t.mainScroll.resetPosition(),t.mainScroll.resize()))}_start(){this.isOpening&&this._useAnimation&&this._placeholder&&this._placeholder.tagName==="IMG"?new Promise(t=>{let n=!1,o=!0;kCe(this._placeholder).finally(()=>{n=!0,o||t(!0)}),setTimeout(()=>{o=!1,n&&t(!0)},50),setTimeout(t,250)}).finally(()=>this._initiate()):this._initiate()}_initiate(){var t,n;(t=this.pswp.element)===null||t===void 0||t.style.setProperty("--pswp-transition-duration",this._duration+"ms"),this.pswp.dispatch(this.isOpening?"openingAnimationStart":"closingAnimationStart"),this.pswp.dispatch("initialZoom"+(this.isOpening?"In":"Out")),(n=this.pswp.element)===null||n===void 0||n.classList.toggle("pswp--ui-visible",this.isOpening),this.isOpening?(this._placeholder&&(this._placeholder.style.opacity="1"),this._animateToOpenState()):this.isClosing&&this._animateToClosedState(),this._useAnimation||this._onAnimationComplete()}_onAnimationComplete(){const{pswp:t}=this;if(this.isOpen=this.isOpening,this.isClosed=this.isClosing,this.isOpening=!1,this.isClosing=!1,t.dispatch(this.isOpen?"openingAnimationEnd":"closingAnimationEnd"),t.dispatch("initialZoom"+(this.isOpen?"InEnd":"OutEnd")),this.isClosed)t.destroy();else if(this.isOpen){var n;this._animateZoom&&t.container&&(t.container.style.overflow="visible",t.container.style.width="100%"),(n=t.currSlide)===null||n===void 0||n.applyCurrentZoomPan()}}_animateToOpenState(){const{pswp:t}=this;this._animateZoom&&(this._croppedZoom&&this._cropContainer1&&this._cropContainer2&&(this._animateTo(this._cropContainer1,"transform","translate3d(0,0,0)"),this._animateTo(this._cropContainer2,"transform","none")),t.currSlide&&(t.currSlide.zoomAndPanToInitial(),this._animateTo(t.currSlide.container,"transform",t.currSlide.getCurrentTransform()))),this._animateBgOpacity&&t.bg&&this._animateTo(t.bg,"opacity",String(t.options.bgOpacity)),this._animateRootOpacity&&t.element&&this._animateTo(t.element,"opacity","1")}_animateToClosedState(){const{pswp:t}=this;this._animateZoom&&this._setClosedStateZoomPan(!0),this._animateBgOpacity&&t.bgOpacity>.01&&t.bg&&this._animateTo(t.bg,"opacity","0"),this._animateRootOpacity&&t.element&&this._animateTo(t.element,"opacity","0")}_setClosedStateZoomPan(t){if(!this._thumbBounds)return;const{pswp:n}=this,{innerRect:o}=this._thumbBounds,{currSlide:s,viewportSize:i}=n;if(this._croppedZoom&&o&&this._cropContainer1&&this._cropContainer2){const r=-i.x+(this._thumbBounds.x-o.x)+o.w,l=-i.y+(this._thumbBounds.y-o.y)+o.h,a=i.x-o.w,c=i.y-o.h;t?(this._animateTo(this._cropContainer1,"transform",Sp(r,l)),this._animateTo(this._cropContainer2,"transform",Sp(a,c))):(Jc(this._cropContainer1,r,l),Jc(this._cropContainer2,a,c))}s&&(es(s.pan,o||this._thumbBounds),s.currZoomLevel=this._thumbBounds.w/s.width,t?this._animateTo(s.container,"transform",s.getCurrentTransform()):s.applyCurrentZoomPan())}_animateTo(t,n,o){if(!this._duration){t.style[n]=o;return}const{animations:s}=this.pswp,i={duration:this._duration,easing:this.pswp.options.easing,onComplete:()=>{s.activeAnimations.length||this._onAnimationComplete()},target:t};i[n]=o,s.startTransition(i)}}const gwe={allowPanToNext:!0,spacing:.1,loop:!0,pinchToClose:!0,closeOnVerticalDrag:!0,hideAnimationDuration:333,showAnimationDuration:333,zoomAnimationDuration:333,escKey:!0,arrowKeys:!0,trapFocus:!0,returnFocus:!0,maxWidthToAnimate:4e3,clickToCloseNonZoomable:!0,imageClickAction:"zoom-or-close",bgClickAction:"close",tapAction:"toggle-controls",doubleTapAction:"zoom",indexIndicatorSep:" / ",preloaderDelay:2e3,bgOpacity:.8,index:0,errorMsg:"The image cannot be loaded",preload:[1,2],easing:"cubic-bezier(.4,0,.22,1)"};class vwe extends hwe{constructor(t){super(),this.options=this._prepareOptions(t||{}),this.offset={x:0,y:0},this._prevViewportSize={x:0,y:0},this.viewportSize={x:0,y:0},this.bgOpacity=1,this.currIndex=0,this.potentialIndex=0,this.isOpen=!1,this.isDestroying=!1,this.hasMouse=!1,this._initialItemData={},this._initialThumbBounds=void 0,this.topBar=void 0,this.element=void 0,this.template=void 0,this.container=void 0,this.scrollWrap=void 0,this.currSlide=void 0,this.events=new wCe,this.animations=new KCe,this.mainScroll=new DCe(this),this.gestures=new RCe(this),this.opener=new mwe(this),this.keyboard=new HCe(this),this.contentLoader=new pwe(this)}init(){if(this.isOpen||this.isDestroying)return!1;this.isOpen=!0,this.dispatch("init"),this.dispatch("beforeOpen"),this._createMainStructure();let t="pswp--open";return this.gestures.supportsTouch&&(t+=" pswp--touch"),this.options.mainClass&&(t+=" "+this.options.mainClass),this.element&&(this.element.className+=" "+t),this.currIndex=this.options.index||0,this.potentialIndex=this.currIndex,this.dispatch("firstUpdate"),this.scrollWheel=new ZCe(this),(Number.isNaN(this.currIndex)||this.currIndex<0||this.currIndex>=this.getNumItems())&&(this.currIndex=0),this.gestures.supportsTouch||this.mouseDetected(),this.updateSize(),this.offset.y=window.pageYOffset,this._initialItemData=this.getItemData(this.currIndex),this.dispatch("gettingData",{index:this.currIndex,data:this._initialItemData,slide:void 0}),this._initialThumbBounds=this.getThumbBounds(),this.dispatch("initialLayout"),this.on("openingAnimationEnd",()=>{const{itemHolders:n}=this.mainScroll;n[0]&&(n[0].el.style.display="block",this.setContent(n[0],this.currIndex-1)),n[2]&&(n[2].el.style.display="block",this.setContent(n[2],this.currIndex+1)),this.appendHeavy(),this.contentLoader.updateLazy(),this.events.add(window,"resize",this._handlePageResize.bind(this)),this.events.add(window,"scroll",this._updatePageScrollOffset.bind(this)),this.dispatch("bindEvents")}),this.mainScroll.itemHolders[1]&&this.setContent(this.mainScroll.itemHolders[1],this.currIndex),this.dispatch("change"),this.opener.open(),this.dispatch("afterInit"),!0}getLoopedIndex(t){const n=this.getNumItems();return this.options.loop&&(t>n-1&&(t-=n),t<0&&(t+=n)),Yp(t,0,n-1)}appendHeavy(){this.mainScroll.itemHolders.forEach(t=>{var n;(n=t.slide)===null||n===void 0||n.appendHeavy()})}goTo(t){this.mainScroll.moveIndexBy(this.getLoopedIndex(t)-this.potentialIndex)}next(){this.goTo(this.potentialIndex+1)}prev(){this.goTo(this.potentialIndex-1)}zoomTo(...t){var n;(n=this.currSlide)===null||n===void 0||n.zoomTo(...t)}toggleZoom(){var t;(t=this.currSlide)===null||t===void 0||t.toggleZoom()}close(){!this.opener.isOpen||this.isDestroying||(this.isDestroying=!0,this.dispatch("close"),this.events.removeAll(),this.opener.close())}destroy(){var t;if(!this.isDestroying){this.options.showHideAnimationType="none",this.close();return}this.dispatch("destroy"),this._listeners={},this.scrollWrap&&(this.scrollWrap.ontouchmove=null,this.scrollWrap.ontouchend=null),(t=this.element)===null||t===void 0||t.remove(),this.mainScroll.itemHolders.forEach(n=>{var o;(o=n.slide)===null||o===void 0||o.destroy()}),this.contentLoader.destroy(),this.events.removeAll()}refreshSlideContent(t){this.contentLoader.removeByIndex(t),this.mainScroll.itemHolders.forEach((n,o)=>{var s,i;let r=((s=(i=this.currSlide)===null||i===void 0?void 0:i.index)!==null&&s!==void 0?s:0)-1+o;if(this.canLoop()&&(r=this.getLoopedIndex(r)),r===t&&(this.setContent(n,t,!0),o===1)){var l;this.currSlide=n.slide,(l=n.slide)===null||l===void 0||l.setIsActive(!0)}}),this.dispatch("change")}setContent(t,n,o){if(this.canLoop()&&(n=this.getLoopedIndex(n)),t.slide){if(t.slide.index===n&&!o)return;t.slide.destroy(),t.slide=void 0}if(!this.canLoop()&&(n<0||n>=this.getNumItems()))return;const s=this.getItemData(n);t.slide=new xCe(s,n,this),n===this.currIndex&&(this.currSlide=t.slide),t.slide.append(t.el)}getViewportCenterPoint(){return{x:this.viewportSize.x/2,y:this.viewportSize.y/2}}updateSize(t){if(this.isDestroying)return;const n=CN(this.options,this);!t&&Y1(n,this._prevViewportSize)||(es(this._prevViewportSize,n),this.dispatch("beforeResize"),es(this.viewportSize,this._prevViewportSize),this._updatePageScrollOffset(),this.dispatch("viewportSize"),this.mainScroll.resize(this.opener.isOpen),!this.hasMouse&&window.matchMedia("(any-hover: hover)").matches&&this.mouseDetected(),this.dispatch("resize"))}applyBgOpacity(t){this.bgOpacity=Math.max(t,0),this.bg&&(this.bg.style.opacity=String(this.bgOpacity*this.options.bgOpacity))}mouseDetected(){if(!this.hasMouse){var t;this.hasMouse=!0,(t=this.element)===null||t===void 0||t.classList.add("pswp--has_mouse")}}_handlePageResize(){this.updateSize(),/iPhone|iPad|iPod/i.test(window.navigator.userAgent)&&setTimeout(()=>{this.updateSize()},500)}_updatePageScrollOffset(){this.setScrollOffset(0,window.pageYOffset)}setScrollOffset(t,n){this.offset.x=t,this.offset.y=n,this.dispatch("updateScrollOffset")}_createMainStructure(){this.element=ji("pswp","div"),this.element.setAttribute("tabindex","-1"),this.element.setAttribute("role","dialog"),this.template=this.element,this.bg=ji("pswp__bg","div",this.element),this.scrollWrap=ji("pswp__scroll-wrap","section",this.element),this.container=ji("pswp__container","div",this.scrollWrap),this.scrollWrap.setAttribute("aria-roledescription","carousel"),this.container.setAttribute("aria-live","off"),this.container.setAttribute("id","pswp__items"),this.mainScroll.appendHolders(),this.ui=new owe(this),this.ui.init(),(this.options.appendToEl||document.body).appendChild(this.element)}getThumbBounds(){return rwe(this.currIndex,this.currSlide?this.currSlide.data:this._initialItemData,this)}canLoop(){return this.options.loop&&this.getNumItems()>2}_prepareOptions(t){return window.matchMedia("(prefers-reduced-motion), (update: slow)").matches&&(t.showHideAnimationType="none",t.zoomAnimationDuration=0),{...gwe,...t}}}function ywe(e){return new Promise(t=>{const n=new Image;n.onload=()=>t(n.naturalWidth>0?{w:n.naturalWidth,h:n.naturalHeight}:null),n.onerror=()=>t(null),n.src=e})}async function kwe(e,t){if(t?.currentSrc&&t.naturalWidth>0)return{src:t.currentSrc,w:t.naturalWidth,h:t.naturalHeight,objectUrl:null};let n=e.url,o=null;if(e.fileId)try{const i=await xt().getFileBlob(e.fileId);o=URL.createObjectURL(i),n=o}catch{}const s=await ywe(n);return s?{src:n,...s,objectUrl:o}:(o&&URL.revokeObjectURL(o),null)}function bwe(e){let t=!1,n=!1,o=null;return(async()=>{const s=await kwe(e.media,e.thumbImg);if(t){s?.objectUrl&&URL.revokeObjectURL(s.objectUrl);return}if(!s){e.onClose();return}const i=e.thumbImg?.currentSrc===s.src?e.thumbImg:null;o=new vwe({dataSource:[{src:s.src,w:s.w,h:s.h,thumbCropped:!0,...i?{msrc:i.currentSrc,element:i}:{}}],index:0,showHideAnimationType:i?"zoom":"fade",arrowPrev:!1,arrowNext:!1,counter:!1,close:!0,zoom:!0,wheelToZoom:!0,escKey:!0,closeTitle:e.labels.close,zoomTitle:e.labels.zoom,bgOpacity:1}),o.addFilter("thumbEl",l=>l?.isConnected?l:null);const r=e.media.path;o.on("uiRegister",()=>{const l=o?.ui;!l||!r||l.registerElement({name:"caption",className:"media-preview-caption",isButton:!1,appendTo:"root",onInit:a=>{a.textContent=r}})}),o.on("openingAnimationStart",()=>{li.value+=1}),o.on("destroy",()=>{n=!0,li.value=Math.max(0,li.value-1),s.objectUrl&&URL.revokeObjectURL(s.objectUrl),e.onClose()}),o.init()})(),()=>{t=!0,o&&!n&&o.close()}}const Cwe=["aria-label"],wwe={class:"media-lightbox-card"},_we=["aria-label"],xwe={class:"media-lightbox-frame"},Swe={key:0,class:"media-lightbox-name"},Awe='button:not([disabled]), video[controls], [tabindex]:not([tabindex="-1"])',Mwe=et({__name:"MediaLightbox",props:{media:{},originImg:{}},emits:["close"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=F(()=>n.media.kind==="image"),r=F(()=>n.media.path??null),l=F(()=>r.value??(n.media.kind==="video"?s("composer.attachmentVideo"):s("composer.attachmentImage"))),a=K(null),c=K(null);let u=null,d=null;function f(h){if(h.key==="Escape"){h.preventDefault(),o("close");return}if(h.key!=="Tab"||!a.value)return;const m=a.value.querySelectorAll(Awe),g=m[0],b=m[m.length-1];!g||!b||(a.value.contains(document.activeElement)?h.shiftKey&&document.activeElement===g?(h.preventDefault(),b.focus()):!h.shiftKey&&document.activeElement===b&&(h.preventDefault(),g.focus()):(h.preventDefault(),(h.shiftKey?b:g).focus()))}return cn(()=>{if(i.value){d=bwe({media:n.media,thumbImg:n.originImg??null,labels:{close:s("model.close"),zoom:s("composer.previewZoom")},onClose:()=>o("close")});return}li.value+=1,u=document.activeElement instanceof HTMLElement?document.activeElement:null,window.addEventListener("keydown",f),c.value?.focus()}),Dn(()=>{if(d){d(),d=null;return}li.value=Math.max(0,li.value-1),window.removeEventListener("keydown",f),u?.focus()}),(h,m)=>i.value?te("",!0):(k(),me(Vr,{key:0,to:"body"},[C("div",{ref_key:"overlayRef",ref:a,class:"media-lightbox",role:"dialog","aria-modal":"true","aria-label":l.value,onMousedown:m[1]||(m[1]=Ot(g=>o("close"),["self"]))},[C("div",wwe,[q(p($n),{text:p(s)("model.close")},{default:be(()=>[C("button",{ref_key:"closeRef",ref:c,type:"button",class:"media-lightbox-close","aria-label":p(s)("model.close"),onClick:m[0]||(m[0]=g=>o("close"))},[q(p(Me),{name:"close",size:"sm"})],8,_we)]),_:1},8,["text"]),C("div",xwe,[q(Gp,{url:e.media.url,kind:e.media.kind==="video"?"video":"image","file-id":e.media.fileId,"media-class":"media-lightbox-media",controls:e.media.kind==="video"},null,8,["url","kind","file-id","controls"])]),r.value?(k(),M("div",Swe,N(r.value),1)):te("",!0)])],40,Cwe)]))}}),AN=mt(Mwe,[["__scopeId","data-v-00e2f879"]]),Twe=["title","aria-label"],Ewe={key:1,class:"media-thumb-media media-thumb-tile","aria-hidden":"true"},Iwe={key:2,class:"media-thumb-badge","aria-hidden":"true"},Lwe={key:3,class:"media-thumb-badge is-error","aria-hidden":"true"},$we={key:4,class:"media-thumb-badge","aria-hidden":"true"},Nwe=["aria-label"],Owe=et({__name:"MediaThumb",props:{kind:{},name:{},url:{},fileId:{},uploading:{type:Boolean,default:!1},error:{type:Boolean,default:!1},removable:{type:Boolean,default:!1},removeLabel:{}},emits:["activate","remove"],setup(e,{emit:t}){const n=e,o=t;function s(c){o("activate",c.currentTarget.querySelector("img"))}const{t:i}=$t(),r=F(()=>n.name?n.name:n.kind==="video"?i("composer.attachmentVideo"):i("composer.attachmentImage")),l=F(()=>n.url?.startsWith("blob:")??!1),a=F(()=>!n.url||n.kind==="video"&&n.fileId!==void 0&&!l.value);return(c,u)=>(k(),M("span",{class:Fe(["media-thumb",{"is-error":e.error,uploading:e.uploading}])},[C("button",{type:"button",class:"media-thumb-btn",title:r.value,"aria-label":r.value,onClick:s},[a.value?(k(),M("span",Ewe)):(k(),me(Gp,{key:0,url:e.url,kind:e.kind,"file-id":l.value?void 0:e.fileId,"media-class":"media-thumb-media",controls:!1,muted:""},null,8,["url","kind","file-id"])),e.uploading?(k(),M("span",Iwe,[q(p(Ao),{size:"sm",label:p(i)("composer.uploading")},null,8,["label"])])):e.error?(k(),M("span",Lwe,[q(p(Me),{name:"info",size:"sm"})])):e.kind==="video"?(k(),M("span",$we,[q(p(Me),{name:"play",size:"sm"})])):te("",!0)],8,Twe),e.removable?(k(),me(p($n),{key:0,text:e.removeLabel??p(i)("composer.remove")},{default:be(()=>[C("button",{type:"button",class:"media-thumb-rm","aria-label":e.removeLabel??p(i)("composer.remove"),onClick:u[0]||(u[0]=d=>o("remove"))},[q(p(Me),{name:"close",size:"sm"})],8,Nwe)]),_:1},8,["text"])):te("",!0)],2))}}),MN=mt(Owe,[["__scopeId","data-v-7a9b91d0"]]),Fwe=["title","data-kind"],Rwe=["aria-label"],Pwe={class:"att-tile"},Dwe={class:"att-name"},Bwe={key:1,class:"att-err"},Hwe=["aria-label"],zwe=et({__name:"AttachmentChip",props:{kind:{},name:{},url:{},fileId:{},mediaType:{},size:{},uploading:{type:Boolean,default:!1},error:{type:Boolean,default:!1},removable:{type:Boolean,default:!1},removeLabel:{}},emits:["activate","remove"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=F(()=>{const d=n.name?.match(/\.([A-Za-z0-9]{1,8})$/)?.[1]??n.mediaType?.split("/")[1]?.split("+")[0];return d?d.toUpperCase():void 0}),r=F(()=>{const u=i.value??"";return/^(txt|md|doc|docx|rtf|log)$/i.test(u)?"file-text":"file"}),l=F(()=>n.name?n.name:n.kind==="image"?s("composer.attachmentImage"):n.kind==="video"?s("composer.attachmentVideo"):s("composer.attachmentFile"));function a(u){return u<1024?`${u} B`:u<1024*1024?`${Math.round(u/1024)} KB`:`${(u/(1024*1024)).toFixed(1)} MB`}const c=F(()=>{const u=[l.value];return n.size!==void 0&&u.push(a(n.size)),u.join(" · ")});return(u,d)=>(k(),M("span",{class:Fe(["att-chip",{"is-error":e.error,uploading:e.uploading}]),title:c.value,"data-kind":e.kind},[C("button",{type:"button",class:"att-activate","aria-label":c.value,onClick:d[0]||(d[0]=f=>o("activate"))},[C("span",Pwe,[e.kind==="image"&&e.url?(k(),me(Gp,{key:0,url:e.url,kind:"image",alt:e.name,"file-id":e.fileId,"media-class":"att-thumb"},null,8,["url","alt","file-id"])):e.kind==="video"?(k(),me(p(Me),{key:1,name:"play",size:"sm"})):e.kind==="image"?(k(),me(p(Me),{key:2,name:"image",size:"sm"})):(k(),me(p(Me),{key:3,name:r.value,size:"sm"},null,8,["name"]))]),C("span",Dwe,N(l.value),1),e.uploading?(k(),me(p(Ao),{key:0,size:"sm",label:p(s)("composer.uploading")},null,8,["label"])):e.error?(k(),M("span",Bwe,[q(p(Me),{name:"info",size:"sm"})])):te("",!0)],8,Rwe),e.removable?(k(),me(p($n),{key:0,text:e.removeLabel??p(s)("composer.remove")},{default:be(()=>[C("button",{type:"button",class:"att-rm","aria-label":e.removeLabel??p(s)("composer.remove"),onClick:d[1]||(d[1]=f=>o("remove"))},[q(p(Me),{name:"close",size:"sm"})],8,Hwe)]),_:1},8,["text"])):te("",!0)],10,Fwe))}}),TN=mt(zwe,[["__scopeId","data-v-d3ab6f87"]]),Wwe="/assets/kimi_avatar_default-srYjF2HV.riv";function EN(e,t){for(const n of e.stateMachineNames){const o=(e.stateMachineInputs(n)??[]).find(s=>s.name===t);if(o!==void 0)return o}return null}function Uwe(e,t){const n=EN(e,t);return n!==null&&typeof n.fire=="function"?(n.fire(),!0):!1}function Nx(e,t,n){const o=EN(e,t);return o!==null&&typeof o.value==typeof n?(o.value=n,!0):!1}const jwe={key:0,class:"mascot-fallback",viewBox:"5 0 240.776 240.776","aria-hidden":"true"},Vwe="light/dark",qwe="click_avator",Kwe="hoverspace",Zwe=et({__name:"KimiMascot",setup(e){const t=K(!1),n=K(null),o=o2();let s=null,i=null;function r(){s!==null&&Nx(s,Vwe,o.value?1:0)}cn(async()=>{if(!window.matchMedia("(prefers-reduced-motion: reduce)").matches)try{const[{Rive:c,RuntimeLoader:u},d,f]=await Promise.all([Po(()=>import("./rive-CeXCFBdn.js").then(_=>_.r),__vite__mapDeps([10,3])),Po(()=>import("./rive-BxcgqsjB.js"),[]).then(_=>_.default),Po(()=>import("./rive_fallback-ByshBW-N.js"),[]).then(_=>_.default)]),h=n.value;if(!h)return;u.setWasmUrl(d),u.setWasmFallbackUrl(f);const m=new c({canvas:h,src:Wwe,autoplay:!0,onLoad(){const _=m.stateMachineNames[0];_!==void 0&&m.play(_),requestAnimationFrame(()=>{n.value&&(r(),m.resizeDrawingSurfaceToCanvas(),t.value=!0)})}});s=m;const g=Je(o,r),b=()=>m.resizeDrawingSurfaceToCanvas();window.addEventListener("resize",b),i=()=>{g(),window.removeEventListener("resize",b),m.cleanup(),s=null}}catch{}}),Dn(()=>{i?.(),i=null});function l(c){s!==null&&Nx(s,Kwe,c)}function a(){s!==null&&Uwe(s,qwe)}return(c,u)=>(k(),M("div",{class:"mascot-host",role:"img","aria-label":"Kimi mascot",onPointerenter:u[0]||(u[0]=d=>l(!0)),onPointerleave:u[1]||(u[1]=d=>l(!1)),onClick:a},[t.value?te("",!0):(k(),M("svg",jwe,[...u[2]||(u[2]=[_u('',3)])])),C("canvas",{ref_key:"canvasRef",ref:n,class:Fe(["mascot-canvas",{ready:t.value}])},null,2)],32))}}),Gwe=mt(Zwe,[["__scopeId","data-v-0ec625c2"]]),Ywe={class:"working-indicator",role:"status"},Xwe={class:"wi-mascot","aria-hidden":"true"},Jwe={class:"wi-label"},Qwe=et({__name:"WorkingIndicator",props:{label:{}},setup(e){return(t,n)=>(k(),M("div",Ywe,[C("span",Xwe,[q(Gwe)]),C("span",Jwe,N(e.label),1)]))}}),IN=mt(Qwe,[["__scopeId","data-v-8abb44ef"]]),e_e=/^(application\/pdf|image\/(png|jpe?g|gif|webp|avif|bmp|x-icon|vnd\.microsoft\.icon)|video\/[\w.+-]+|audio\/[\w.+-]+)$/i,t_e=/^(txt|md|markdown|log|json|ya?ml|csv|tsv|ts|mts|tsx|jsx|css|py|go|rs|java|c|h|cc|cpp|hpp|sh|zsh|sql|toml|ini|cfg|conf|vue)$/i,n_e=/^(png|jpe?g|gif|webp|avif|bmp|ico)$/i,Ox="text/plain;charset=utf-8";function o_e(e,t){const n=(t??"").toLowerCase();if(e_e.test(n))return n;if(n.startsWith("text/"))return n==="text/html"?null:Ox;const o=e?.match(/\.([A-Za-z0-9]{1,8})$/)?.[1]?.toLowerCase();return o===void 0?null:t_e.test(o)?Ox:n_e.test(o)?`image/${o==="jpg"?"jpeg":o==="ico"?"x-icon":o}`:o==="pdf"?"application/pdf":null}async function LN(e,t,n){const o=o_e(t,n);if(o===null)return"unsupported";const s=window.open("","_blank");s!==null&&(s.opener=null);const i=await xt().getFileBlob(e).catch(()=>null);if(i===null)return s?.close(),"failed";const r=URL.createObjectURL(new Blob([i],{type:o}));if(s!==null)s.location.href=r;else{const l=document.createElement("a");l.href=r,l.download=t??e,l.click()}return setTimeout(()=>{URL.revokeObjectURL(r)},6e4),"previewed"}const s_e={class:"chat"},i_e={key:0,class:"chat-loading"},r_e={class:"chat-loading-text"},l_e={key:1,class:"chat-empty"},a_e={key:1,class:"top-sentinel-text"},c_e={key:0,class:"u-turn"},u_e=["data-turn-id"],d_e={key:0,class:"u-media"},f_e={key:1,class:"u-atts"},p_e={key:2,class:"skill-act"},h_e={class:"skill-act-head"},m_e={key:3,class:"skill-act"},g_e={class:"skill-act-head"},v_e=["aria-expanded","onClick"],y_e={key:0,class:"u-meta"},k_e=["aria-label","onClick"],b_e={class:"u-edit-hint"},C_e=["aria-label","onClick"],w_e=["aria-label","onClick"],__e=["data-turn-id"],x_e=["onClick"],S_e={class:"cd-view"},A_e={key:1,class:"cd-label"},M_e=["data-turn-id"],T_e={key:0,class:"goal-prov"},E_e={key:1,class:"msg"},I_e={key:3,class:"a-msg-ft"},L_e={key:0,class:"a-duration"},$_e=["aria-label","onClick"],N_e={key:4,class:"compact-divider",role:"separator"},O_e={class:"cd-label",role:"status"},F_e={key:4,class:"sending-placeholder"},R_e={key:5,class:"q-stack"},P_e={class:"q-head"},D_e={class:"q-title"},B_e={class:"q-hint"},H_e=["onDragover","onDrop"],z_e={class:"u-bub q-bub"},W_e=["title","onDragstart"],U_e=["title","onClick"],j_e={key:0,class:"u-text q-text"},V_e={key:1,class:"q-text q-text-placeholder"},q_e=["aria-expanded","onClick"],K_e={key:0,class:"q-imgs"},Z_e={key:0,class:"q-file"},G_e={key:1,class:"q-tag q-tag-next"},Y_e={key:2,class:"q-tag q-tag-idx"},X_e=["aria-label","onClick"],J_e={key:0,class:"open-unsupported",role:"status"},Q_e=2500,exe=10,txe=et({__name:"ChatPane",props:{turns:{},cwd:{},turnFilesInteractive:{type:Boolean,default:!0},approvals:{default:()=>[]},questions:{default:()=>[]},turnActive:{type:Boolean,default:!1},working:{type:Boolean,default:!1},sessionLoading:{type:Boolean},compaction:{default:null},hasMoreMessages:{type:Boolean,default:!1},loadingMore:{type:Boolean,default:!1},loadingMoreError:{type:Boolean,default:!1},isFollowing:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},queued:{default:()=>[]},undoHintTurnId:{default:null},interruptedTurnId:{default:null}},emits:["openFile","openMedia","openTurnDiff","copyConversationCopied","openCompaction","openAgent","editMessage","armedUndo","loadOlderMessages","unqueue","editQueued","reorderQueue"],setup(e,{expose:t,emit:n}){const{t:o}=$t(),{confirm:s}=cc();kn(()=>{ee!==null&&(clearTimeout(ee),ee=null),O!==null&&(clearTimeout(O),O=null),I!==null&&(clearTimeout(I),I=null),we!==null&&(clearTimeout(we),we=null)});const i=e,r=K(null);let l=null;function a(){!r.value||typeof IntersectionObserver>"u"||(l?.disconnect(),l=new IntersectionObserver(He=>{He[0]?.isIntersecting&&i.hasMoreMessages&&!i.loadingMore&&!i.loadingMoreError&&!i.sessionLoading&&!i.isFollowing&&h("loadOlderMessages")},{root:null,rootMargin:"200px 0px 0px 0px",threshold:0}),l.observe(r.value))}cn(a),kn(()=>{l?.disconnect(),l=null}),Je(()=>[i.hasMoreMessages,i.loadingMore,i.loadingMoreError],()=>{bt().then(a)});const c=F(()=>{if(!i.turnActive||i.turns.length===0)return null;const He=i.turns.at(-1);return He.role==="assistant"?He.id:null}),u=F(()=>{const He=new Map;for(const tt of i.turns){if(tt.role!=="assistant"||tt.id===c.value)continue;const qe=bke(tt);qe.length>0&&He.set(tt.id,qe)}return He}),d=F(()=>i.working),f=F(()=>{const He=i.turns.at(-1),tt=He?.role==="assistant"&&(He.text.trim().length>0||(He.thinking?.trim().length??0)>0||(He.tools?.length??0)>0);return o(tt?"conversation.working":"conversation.requesting")}),h=n,m=K(null),g=K(null);function b(He){return(He.attachments?.length??0)>0}function _(He){h("editQueued",He)}function v(He,tt){if(m.value=He,!tt.dataTransfer)return;tt.dataTransfer.effectAllowed="move",tt.dataTransfer.setData("text/plain",String(He));const qe=tt.currentTarget?.closest(".q-turn");qe&&tt.dataTransfer.setDragImage(qe,24,24)}function y(He,tt){if(m.value===null)return;tt.preventDefault(),tt.dataTransfer&&(tt.dataTransfer.dropEffect="move");const qe=tt.currentTarget.getBoundingClientRect(),Et=tt.clientY{for(let He=i.turns.length-1;He>=0;He--){const tt=i.turns[He];if(tt.goalContinuation)return null;if(tt.role==="user")return tt.id}return null});function L(He){return!i.readOnly&&He.role==="user"&&He.id===A.value&&!i.working&&!He.skillActivation&&!He.pluginCommand}function S(He){const tt=He.compaction,qe=tt?.trigger==="auto"?o("conversation.compactedAuto"):o("conversation.compactedPlain");return typeof tt?.tokensBefore=="number"&&typeof tt?.tokensAfter=="number"?qe+o("conversation.compactedTokens",{before:bl(tt.tokensBefore),after:bl(tt.tokensAfter)}):qe}const T=K(null);function R(He){return He.durationMs===void 0?"":bu(He.durationMs)}const B=K(null);let I=null;async function $(He){await s({title:o("conversation.undo"),message:o("conversation.undoConfirm"),variant:"primary"})&&D(He)}function D(He){B.value===null&&(B.value=He.id,h("editMessage",{text:He.text,attachments:He.attachments}),I=setTimeout(()=>{I=null,B.value=null},Q_e))}Je(()=>i.turns,He=>{B.value!==null&&(He.some(tt=>tt.id===B.value)||(B.value=null,I!==null&&(clearTimeout(I),I=null)))},{flush:"post"});const H=K(!1);let O=null;function P(){if(i.turns.length===0)return;const He=[];for(const qe of i.turns){if(qe.role==="compaction"||qe.role==="cron")continue;const Et=qe.role==="user"?"User":"Assistant",ft=mke(qe);ft.trim()&&He.push(`**${Et}** - -${ft}`)}const tt=He.join(` - ---- - -`);Ps(tt).then(qe=>{qe&&(H.value=!0,h("copyConversationCopied"),O!==null&&clearTimeout(O),O=setTimeout(()=>{O=null,H.value=!1},2e3))}).catch(()=>{})}function z(He){const tt=[];for(let qe=He;qe>=0;qe--){const Et=i.turns[qe];if(!Et||Et.role!=="assistant")break;tt.unshift(Et)}return tt}function W(He){return z(He).map(tt=>hke(tt)).filter(Boolean).join(` - -`)}function U(){for(let He=i.turns.length-1;He>=0;He-=1)if(i.turns[He]?.role==="assistant")return W(He);return""}function G(){const He=U();He.trim()&&Ps(He).then(tt=>{tt&&(H.value=!0,h("copyConversationCopied"),O!==null&&clearTimeout(O),O=setTimeout(()=>{O=null,H.value=!1},2e3))}).catch(()=>{})}t({copyConversation:P,copyFinalSummary:G});function Z(He){const tt=i.turns[He];if(!tt||tt.role!=="assistant")return!1;const qe=i.turns[He+1];return!qe||qe.role!=="assistant"}let ee=null;function Q(He){const tt=i.turns[He];if(!tt)return;const qe=W(He);qe.trim()&&Ps(qe).then(Et=>{Et&&(T.value=tt.id,ee!==null&&clearTimeout(ee),ee=setTimeout(()=>{ee=null,T.value=null},1400))}).catch(()=>{})}function X(He){const tt=He.text;tt.trim()&&Ps(tt).then(qe=>{qe&&(T.value=He.id,ee!==null&&clearTimeout(ee),ee=setTimeout(()=>{ee=null,T.value=null},1400))}).catch(()=>{})}const oe=Uo(new Set),xe=Uo(new Set),pe=new Map,ve=new WeakMap,ge=dn("pinScroll",()=>{}),ne=new ResizeObserver(He=>{for(const tt of He){const qe=tt.target,Et=ve.get(qe);Et!==void 0&&ae(Et,qe)}});kn(()=>ne.disconnect());function ae(He,tt){const qe=parseFloat(getComputedStyle(tt).lineHeight);if(!Number.isFinite(qe)||qe<=0)return;const ft=(tt.textContent??"").match(/\n+$/)?.[0].length??0;tt.scrollHeight-Math.max(0,ft-1)*qe>qe*exe+1?oe.add(He):oe.delete(He)}function j(He,tt){if(!(tt instanceof HTMLElement)||pe.get(He)===tt)return;const qe=pe.get(He);qe!==void 0&&ne.unobserve(qe),pe.set(He,tt),ve.set(tt,He),ne.observe(tt),ae(He,tt)}function Y(He){return`queue:${He.id}`}Je([()=>i.turns,()=>i.queued],()=>{const He=new Set(i.turns.map(tt=>tt.id));for(const tt of i.queued)He.add(Y(tt));for(const[tt,qe]of pe)He.has(tt)||(ne.unobserve(qe),pe.delete(tt),oe.delete(tt),xe.delete(tt))});function fe(He){return He.skillActivation?He.skillActivation.args||null:He.pluginCommand?He.pluginCommand.args||null:He.text||null}function ue(He){return He.skillActivation!==void 0||He.pluginCommand!==void 0}function de(He){return oe.has(He)&&!xe.has(He)}function J(He,tt){const qe=xe.has(He);qe&&tt.currentTarget instanceof HTMLElement&&ge(tt.currentTarget),qe?xe.delete(He):xe.add(He)}function se(He){return He.kind==="image"||He.kind==="video"}function ce(He){return(He.attachments??[]).filter(se)}function he(He){return(He.attachments??[]).filter(tt=>!se(tt))}function Ie(He){return{kind:He.kind==="video"?"video":"image",url:He.url,path:He.name,fileId:He.fileId}}const Ge=K(null);let we=null;const Te=K(null),st=K(null);function Ne(He,tt){if(He.kind==="image"||He.kind==="video"){st.value=tt??null,Te.value=Ie(He);return}He.fileId!==void 0&&LN(He.fileId,He.name,He.mediaType).then(qe=>{qe==="unsupported"&&(Ge.value=He.name??He.fileId??"",we!==null&&clearTimeout(we),we=setTimeout(()=>{we=null,Ge.value=null},2400))})}function Re(He,tt){return He.id!==c.value||tt.kind==="thinking"&&tt.durationMs!==void 0?!1:tt.sourceIndex===Zl(He).length-1}function Ze(He,tt){if(He.id!==c.value)return!1;const qe=tt.items.at(-1);return qe?.kind==="thinking"&&qe.durationMs!==void 0?!1:qe!==void 0&&qe.sourceIndex===Zl(He).length-1}const gt={folded:[],visible:[]};function Pt(He){return He.role!=="assistant"?gt:lN(He)}function Tt(He){if(He.id!==c.value)return null;const tt=Zl(He),qe=tt.at(-1);if(qe?.kind==="thinking"&&qe.durationMs!==void 0)return null;if(qe?.kind==="tool"&&qe.tool.status==="running"){const Et=qe.tool.id;if(i.approvals?.some(ft=>ft.toolCallId===Et)||i.questions?.some(ft=>ft.toolCallId===Et))return null}return tt.length-1}return(He,tt)=>(k(),M(De,null,[C("div",s_e,[e.sessionLoading?(k(),M("div",i_e,[q(p(Ao),{size:"sm"}),C("span",r_e,N(p(o)("conversation.loading")),1)])):e.turns.length===0&&(!e.approvals||e.approvals.length===0)?(k(),M("div",l_e)):te("",!0),e.hasMoreMessages||e.loadingMore?(k(),M("div",{key:2,ref_key:"topSentinelRef",ref:r,class:Fe(["top-sentinel",{"top-sentinel-loading":e.loadingMore}])},[e.loadingMore?(k(),M("span",a_e,[q(p(Ao),{size:"sm"}),Ve(" "+N(p(o)("conversation.loadingOlder")),1)])):(k(),M("button",{key:0,type:"button",class:"top-sentinel-btn",onClick:tt[0]||(tt[0]=qe=>h("loadOlderMessages"))},N(p(o)("conversation.loadOlder")),1))],2)):te("",!0),(k(!0),M(De,null,vt(e.turns,(qe,Et)=>(k(),M(De,{key:qe.id},[qe.role==="user"?(k(),M("div",c_e,[C("div",{class:Fe(["u-bub turn-anchor",{undoing:B.value===qe.id}]),"data-turn-id":qe.id},[ce(qe).length>0?(k(),M("div",d_e,[(k(!0),M(De,null,vt(ce(qe),(ft,en)=>(k(),me(MN,{key:en,kind:ft.kind,name:ft.name,url:ft.url,"file-id":ft.fileId,onActivate:Vt=>Ne(ft,Vt)},null,8,["kind","name","url","file-id","onActivate"]))),128))])):te("",!0),he(qe).length>0?(k(),M("div",f_e,[(k(!0),M(De,null,vt(he(qe),(ft,en)=>(k(),me(TN,{key:en,kind:ft.kind,name:ft.name,url:ft.url,"file-id":ft.fileId,"media-type":ft.mediaType,size:ft.size,onActivate:Vt=>Ne(ft)},null,8,["kind","name","url","file-id","media-type","size","onActivate"]))),128))])):te("",!0),qe.skillActivation?(k(),M("div",p_e,[C("div",h_e,[tt[13]||(tt[13]=C("span",{class:"skill-act-arrow"},"▶",-1)),C("span",null,N(p(o)("conversation.activatedSkill",{name:qe.skillActivation.name})),1)])])):qe.pluginCommand?(k(),M("div",m_e,[C("div",g_e,[tt[14]||(tt[14]=C("span",{class:"skill-act-arrow"},"▶",-1)),C("span",null,"/"+N(qe.pluginCommand.pluginId)+":"+N(qe.pluginCommand.commandName),1)])])):te("",!0),fe(qe)!==null?(k(),M("div",{key:4,class:Fe(["u-text-wrap",{"is-clamped":de(qe.id),"u-text-wrap-args":ue(qe)}])},[C("div",{class:Fe(ue(qe)?"skill-act-args":"u-text"),ref_for:!0,ref:ft=>j(qe.id,ft)},N(fe(qe)),3),oe.has(qe.id)?(k(),M("button",{key:0,type:"button",class:"u-text-toggle","aria-expanded":!de(qe.id),onClick:ft=>J(qe.id,ft)},[C("span",null,N(de(qe.id)?p(o)("conversation.userMessage.expand"):p(o)("conversation.userMessage.collapse")),1),q(p(Me),{class:"u-text-toggle-car",name:"chevron-down",size:"sm","aria-hidden":"true"})],8,v_e)):te("",!0)],2)):te("",!0)],10,u_e),qe.createdAt||L(qe)||!e.readOnly&&e.undoHintTurnId===qe.id?(k(),M("div",y_e,[L(qe)||!e.readOnly&&e.undoHintTurnId===qe.id?(k(),M("div",{key:0,class:Fe(["u-edit-wrap",{undoing:B.value===qe.id}])},[e.undoHintTurnId===qe.id?(k(),M("button",{key:0,type:"button",class:"u-edit u-edit-armed","aria-label":p(o)("conversation.undoTooltip"),onClick:ft=>h("armedUndo",qe.id)},[q(p(Me),{name:"undo",size:"sm"}),C("span",b_e,[Ve(N(p(o)("conversation.escUndoHintPre")),1),q(p(Yl),{keys:["Esc"]}),Ve(N(p(o)("conversation.escUndoHintPost")),1)])],8,k_e)):(k(),M("button",{key:1,type:"button",class:"u-edit","aria-label":p(o)("conversation.undoTooltip"),onClick:ft=>$(qe)},[q(p(Me),{name:"undo",size:"sm"})],8,C_e))],2)):te("",!0),qe.text.trim().length>0?(k(),M("button",{key:1,type:"button",class:"u-copy","aria-label":p(o)("filePreview.copy"),onClick:Ot(ft=>X(qe),["stop"])},[T.value!==qe.id?(k(),me(p(Me),{key:0,name:"copy",size:"sm"})):(k(),me(p(Me),{key:1,name:"check",size:"sm"}))],8,w_e)):te("",!0),qe.createdAt?(k(),me(_g,{key:2,time:qe.createdAt},null,8,["time"])):te("",!0)])):te("",!0)])):qe.role==="compaction"?(k(),M("div",{key:1,class:"compact-divider turn-anchor","data-turn-id":qe.id,role:"separator"},[tt[15]||(tt[15]=C("span",{class:"cd-line","aria-hidden":"true"},null,-1)),qe.text?(k(),M("button",{key:0,type:"button",class:"cd-label cd-btn",onClick:ft=>h("openCompaction",{turnId:qe.id})},[C("span",null,N(S(qe)),1),C("span",S_e,N(p(o)("conversation.viewSummary")),1)],8,x_e)):(k(),M("span",A_e,N(S(qe)),1)),tt[16]||(tt[16]=C("span",{class:"cd-line","aria-hidden":"true"},null,-1))],8,__e)):qe.role==="cron"?(k(),me(gCe,{key:2,text:qe.text,cron:qe.cron,"turn-id":qe.id,"created-at":qe.createdAt},null,8,["text","cron","turn-id","created-at"])):(k(),M("div",{key:3,class:"a-msg turn-anchor","data-turn-id":qe.id},[qe.goalContinuation?(k(),M("div",T_e,[q(p(Me),{name:"target",size:"sm","aria-hidden":"true"}),C("span",null,N(p(o)("conversation.goal.continuation")),1)])):te("",!0),Pt(qe).folded.length>0?(k(),me(Wbe,{key:1,items:Pt(qe).folded,mobile:"","streaming-tail-index":Tt(qe),live:qe.id===c.value,parked:qe.id===c.value&&Tt(qe)===null,"seed-ms":p(fke)(p(Zl)(qe)),"created-ms":p(Sx)(qe.createdAt),"ended-ms":p(Sx)(qe.endedAt),"duration-ms":qe.durationMs,onOpenMedia:tt[1]||(tt[1]=ft=>h("openMedia",ft)),onOpenFile:tt[2]||(tt[2]=ft=>h("openFile",ft)),onOpenAgent:tt[3]||(tt[3]=ft=>h("openAgent",ft))},null,8,["items","streaming-tail-index","live","parked","seed-ms","created-ms","ended-ms","duration-ms"])):te("",!0),(k(!0),M(De,null,vt(Pt(qe).visible,(ft,en)=>(k(),M(De,{key:p(cN)(ft,en)},[ft.kind==="thinking"?(k(),me(D5,{key:0,text:ft.thinking,mobile:"",streaming:Re(qe,ft),"started-at":ft.startedAt,"duration-ms":ft.durationMs},null,8,["text","streaming","started-at","duration-ms"])):ft.kind==="text"&&ft.text?(k(),M("div",E_e,[q(p(Mu),{text:ft.text,streaming:Re(qe,ft),"open-file":Vt=>h("openFile",Vt)},null,8,["text","streaming","open-file"])])):ft.kind==="activity-run"?(k(),me(gN,{key:2,items:ft.items,mobile:"",streaming:Ze(qe,ft),onOpenMedia:tt[4]||(tt[4]=Vt=>h("openMedia",Vt)),onOpenFile:tt[5]||(tt[5]=Vt=>h("openFile",Vt)),onOpenAgent:tt[6]||(tt[6]=Vt=>h("openAgent",Vt))},null,8,["items","streaming"])):ft.kind==="tool"?(k(),me(P5,{key:3,tool:ft.tool,mobile:"",onOpenMedia:tt[7]||(tt[7]=Vt=>h("openMedia",Vt)),onOpenFile:tt[8]||(tt[8]=Vt=>h("openFile",Vt)),onOpenAgent:tt[9]||(tt[9]=Vt=>h("openAgent",Vt))},null,8,["tool"])):ft.kind==="notification"?(k(),me(vN,{key:4,items:ft.items},null,8,["items"])):te("",!0)],64))),128)),u.value.get(qe.id)?(k(),me(oCe,{key:2,changes:u.value.get(qe.id),cwd:i.cwd,interactive:e.turnFilesInteractive,onOpenDiff:tt[10]||(tt[10]=ft=>h("openTurnDiff",ft)),onOpenFile:tt[11]||(tt[11]=ft=>h("openFile",ft))},null,8,["changes","cwd","interactive"])):te("",!0),qe.id!==c.value&&Z(Et)&&(W(Et).trim().length>0||R(qe))?(k(),M("div",I_e,[R(qe)?(k(),M("span",L_e,N(R(qe)),1)):te("",!0),W(Et).trim().length>0?(k(),M("button",{key:1,class:"a-cpbtn","aria-label":p(o)("filePreview.copy"),onClick:ft=>Q(Et)},[T.value!==qe.id?(k(),me(p(Me),{key:0,name:"copy",size:"sm"})):(k(),me(p(Me),{key:1,name:"check",size:"sm"}))],8,$_e)):te("",!0)])):te("",!0)],8,M_e)),qe.role==="assistant"&&qe.id===e.interruptedTurnId?(k(),M("div",N_e,[tt[17]||(tt[17]=C("span",{class:"cd-line","aria-hidden":"true"},null,-1)),C("span",O_e,N(p(o)("conversation.turnInterrupted")),1),tt[18]||(tt[18]=C("span",{class:"cd-line","aria-hidden":"true"},null,-1))])):te("",!0)],64))),128)),e.compaction?(k(),me(aCe,{key:3,label:p(o)("conversation.compacting")},null,8,["label"])):te("",!0),d.value?(k(),M("div",F_e,[q(IN,{label:f.value},null,8,["label"])])):te("",!0),e.queued.length>0?(k(),M("div",R_e,[C("div",P_e,[C("span",D_e,[q(p(Me),{name:"mail",size:"sm"}),Ve(" "+N(p(o)("composer.queueLabel"))+" · ",1),C("b",null,N(e.queued.length),1)]),C("span",B_e,N(p(o)("composer.queueAutoDrain")),1)]),(k(!0),M(De,null,vt(e.queued,(qe,Et)=>(k(),M("div",{key:qe.id,class:Fe(["u-turn q-turn",{"q-dragging":m.value===Et,"drop-before":g.value?.index===Et&&g.value.position==="before","drop-after":g.value?.index===Et&&g.value.position==="after"}]),onDragover:ft=>y(Et,ft),onDrop:ft=>w(Et,ft)},[C("div",z_e,[C("span",{class:"q-grip",title:p(o)("composer.queueDragTitle"),draggable:"true",onDragstart:ft=>v(Et,ft),onDragend:x},[q(p(Me),{name:"grip",size:"sm"})],40,W_e),C("div",{class:Fe(["q-clamp u-text-wrap",{"is-clamped":de(Y(qe))}])},[C("button",{type:"button",class:"q-body",title:p(o)("composer.editQueued"),ref_for:!0,ref:ft=>j(Y(qe),ft),onClick:ft=>_(Et)},[qe.text?(k(),M("span",j_e,N(qe.text),1)):(k(),M("span",V_e,[q(p(Me),{name:"file",size:"sm"}),Ve(" "+N(p(o)("composer.queuedAttachments",{n:qe.attachments?.length??0})),1)]))],8,U_e),oe.has(Y(qe))?(k(),M("button",{key:0,type:"button",class:"u-text-toggle","aria-expanded":!de(Y(qe)),onClick:ft=>J(Y(qe),ft)},[C("span",null,N(de(Y(qe))?p(o)("conversation.userMessage.expand"):p(o)("conversation.userMessage.collapse")),1),q(p(Me),{class:"u-text-toggle-car",name:"chevron-down",size:"sm","aria-hidden":"true"})],8,q_e)):te("",!0)],2),b(qe)?(k(),M("div",K_e,[(k(!0),M(De,null,vt(qe.attachments,(ft,en)=>(k(),M(De,{key:en},[ft.kind==="file"?(k(),M("span",Z_e,[q(p(Me),{name:"file",size:"sm"}),Ve(" "+N(ft.name??ft.fileId),1)])):(k(),me(Gp,{key:1,url:ft.url,kind:ft.kind,"file-id":ft.fileId,"media-class":"q-img",controls:!1,muted:""},null,8,["url","kind","file-id"]))],64))),128))])):te("",!0),Et===0?(k(),M("span",G_e,N(p(o)("composer.queueNext")),1)):(k(),M("span",Y_e,"#"+N(Et+1),1)),C("button",{type:"button",class:"q-rm","aria-label":p(o)("composer.remove"),onClick:Ot(ft=>h("unqueue",Et),["stop"])},[q(p(Me),{name:"close",size:"sm"})],8,X_e)])],42,H_e))),128))])):te("",!0)]),Ge.value!==null?(k(),M("div",J_e,N(p(o)("composer.attachmentOpenUnsupported",{name:Ge.value})),1)):te("",!0),Te.value?(k(),me(AN,{key:1,media:Te.value,"origin-img":st.value,onClose:tt[12]||(tt[12]=qe=>{Te.value=null,st.value=null})},null,8,["media","origin-img"])):te("",!0)],64))}}),B5=mt(txe,[["__scopeId","data-v-c4bbe3ed"]]),nxe={class:"ch-id"},oxe=["title"],sxe={key:1,class:"ch-ws"},ixe={key:2,class:"ch-sep"},rxe=["onKeydown"],lxe={class:"ch-ses"},axe={key:0,class:"ch-pill ch-sync-pill"},cxe={key:0,class:"ch-ahead"},uxe={key:1,class:"ch-behind"},dxe={key:1,class:"ch-pill ch-diff-pill"},fxe={key:0,class:"ch-add"},pxe={key:1,class:"ch-del"},hxe=et({__name:"ChatHeader",props:{sessionId:{},workspaceName:{},workspaceRoot:{},sessionTitle:{},branch:{},ahead:{},behind:{},changesCount:{},gitDiffStats:{},isGitRepo:{type:Boolean},pr:{},copied:{type:Boolean}},emits:["copyAll","copyFinalSummary","openChanges","openPr","renameSession","forkSession","archiveSession","exportSession"],setup(e,{emit:t}){const{t:n}=$t(),o=e,s=t,i=F(()=>o.ahead??0),r=F(()=>o.behind??0),l=F(()=>o.gitDiffStats?.totalAdditions??0),a=F(()=>o.gitDiffStats?.totalDeletions??0),c=F(()=>l.value>0||a.value>0),u={open:"header.prStatusOpen",closed:"header.prStatusClosed",merged:"header.prStatusMerged",draft:"header.prStatusDraft"};function d(Q){return Q.trim().toLowerCase().replaceAll("_","-")}function f(Q){const X=d(Q);return u[X]?`pr-${X}`:"pr-unknown"}function h(Q){return n(u[d(Q)]??"header.prStatusUnknown")}const m=K(!1),g=K(null),b=K(null),_=K({});function v(Q){const X=Q.target;b.value?.el?.contains(X)||g.value?.el?.contains(X)||x()}function y(){x()}async function w(Q){if(Q.stopPropagation(),m.value){x();return}m.value=!0,document.addEventListener("mousedown",v),window.addEventListener("resize",y),await bt();const X=g.value?.el,oe=b.value?.el;if(!X||!oe)return;const xe=X.getBoundingClientRect(),pe=4,ve=8,ge=oe.offsetWidth,ne=oe.offsetHeight;let ae=xe.bottom+pe,j=!1;ae+ne>window.innerHeight-ve&&(ae=Math.max(ve,xe.top-ne-pe),j=!0);let Y=xe.left,fe=!1;Y+ge>window.innerWidth-ve&&(Y=Math.max(ve,xe.right-ge),fe=!0),_.value={top:`${Math.round(ae)}px`,left:`${Math.round(Y)}px`,transformOrigin:`${j?"bottom":"top"} ${fe?"right":"left"}`,"--menu-pop-shift":j?"2px":"-2px"}}function x(){m.value=!1,document.removeEventListener("mousedown",v),window.removeEventListener("resize",y)}kn(()=>{document.removeEventListener("mousedown",v),window.removeEventListener("resize",y)});function A(){s("copyAll"),x()}function L(){s("copyFinalSummary"),x()}const S=K(!1);function T(){o.sessionId&&Ps(o.sessionId).then(Q=>{Q&&(S.value=!0,setTimeout(()=>{S.value=!1},1200))})}const R=K(!1),B=K(""),I=K(null),{handleCompositionStart:$,handleCompositionEnd:D,isComposingKeyEvent:H}=_r();async function O(){if(x(),!!o.sessionId){R.value=!0,B.value=o.sessionTitle??"",await bt();try{I.value?.focus(),I.value?.select()}catch{}}}function P(){const Q=B.value.trim();Q&&o.sessionId&&Q!==(o.sessionTitle??"").trim()&&s("renameSession",o.sessionId,Q),R.value=!1}function z(Q){H(Q)||P()}function W(){R.value=!1}function U(){o.sessionId&&(x(),s("forkSession",o.sessionId))}function G(){o.sessionId&&(x(),s("exportSession",o.sessionId))}function Z(){o.sessionId&&(x(),s("archiveSession",o.sessionId))}const ee=!1;return(Q,X)=>(k(),M("header",{class:Fe(["chat-header",{"macos-desktop":p(lu)}])},[C("div",nxe,[p(ee)?(k(),M("span",{key:0,class:"ch-dev",title:p(n)("header.devBadge")},"DEV",8,oxe)):te("",!0),e.workspaceName?(k(),M("span",sxe,N(e.workspaceName),1)):te("",!0),e.workspaceName&&e.sessionTitle?(k(),M("span",ixe,"/")):te("",!0),R.value?An((k(),M("input",{key:3,ref_key:"renameInputRef",ref:I,"onUpdate:modelValue":X[0]||(X[0]=oe=>B.value=oe),class:"ch-rename",type:"text",onKeydown:[yl(Ot(z,["stop"]),["enter"]),yl(Ot(W,["stop"]),["esc"])],onCompositionstart:X[1]||(X[1]=(...oe)=>p($)&&p($)(...oe)),onCompositionend:X[2]||(X[2]=(...oe)=>p(D)&&p(D)(...oe)),onBlur:P,onClick:X[3]||(X[3]=Ot(()=>{},["stop"]))},null,40,rxe)),[[Ys,B.value]]):e.sessionTitle?(k(),me(p($n),{key:4,text:e.sessionTitle},{default:be(()=>[C("span",lxe,N(e.sessionTitle),1)]),_:1},8,["text"])):te("",!0)]),q(p(mn),{ref_key:"kebabRef",ref:g,class:Fe(["ch-act-more",{open:m.value}]),label:p(n)("header.options"),"aria-expanded":m.value,"aria-haspopup":"menu",onClick:X[4]||(X[4]=Ot(oe=>w(oe),["stop"]))},{default:be(()=>[q(p(Me),{name:"dots-horizontal",size:"sm"})]),_:1},8,["class","label","aria-expanded"]),q(gs,{name:"menu-pop"},{default:be(()=>[m.value?(k(),me(p(ea),{key:0,ref_key:"menuRef",ref:b,class:"ch-menu",style:Gt(_.value),onClick:X[5]||(X[5]=Ot(()=>{},["stop"]))},{default:be(()=>[q(p(hn),{onClick:A},{default:be(()=>[q(p(Me),{name:e.copied?"check":"copy",size:"sm"},null,8,["name"]),Ve(" "+N(e.copied?p(n)("header.copied"):p(n)("header.copyAll")),1)]),_:1}),q(p(hn),{onClick:L},{default:be(()=>[q(p(Me),{name:"file-text",size:"sm"}),Ve(" "+N(p(n)("header.copyFinalSummary")),1)]),_:1}),e.sessionId?(k(),M(De,{key:0},[q(p(hn),{separator:""}),q(p(hn),{onClick:T},{default:be(()=>[q(p(Me),{name:S.value?"check":"copy",size:"sm"},null,8,["name"]),Ve(" "+N(S.value?p(n)("header.copied"):p(n)("header.copySessionId")),1)]),_:1}),q(p(hn),{onClick:O},{default:be(()=>[q(p(Me),{name:"pencil",size:"sm"}),Ve(" "+N(p(n)("header.renameSession")),1)]),_:1}),q(p(hn),{onClick:U},{default:be(()=>[q(p(Me),{name:"git-fork",size:"sm"}),Ve(" "+N(p(n)("header.forkSession")),1)]),_:1}),q(p(hn),{onClick:G},{default:be(()=>[q(p(Me),{name:"download",size:"sm"}),Ve(" "+N(p(n)("header.exportSession")),1)]),_:1}),q(p(hn),{onClick:Z},{default:be(()=>[q(p(Me),{name:"archive",size:"sm"}),Ve(" "+N(p(n)("header.archiveSession")),1)]),_:1})],64)):te("",!0)]),_:1},8,["style"])):te("",!0)]),_:1}),X[8]||(X[8]=C("div",{class:"ch-spacer"},null,-1)),e.isGitRepo?(k(),M("button",{key:0,type:"button",class:"ch-git",onClick:X[6]||(X[6]=oe=>s("openChanges"))},[q(p(Me),{class:"ch-branch-icon",name:"git-fork",size:"sm"}),C("span",{class:Fe(["ch-branch",{"ch-detached":!e.branch}])},N(e.branch||p(n)("header.detached")),3),i.value>0||r.value>0?(k(),M("span",axe,[i.value>0?(k(),M("span",cxe,"↑"+N(i.value),1)):te("",!0),r.value>0?(k(),M("span",uxe,"↓"+N(r.value),1)):te("",!0)])):te("",!0),c.value?(k(),M("span",dxe,[l.value>0?(k(),M("span",fxe,"+"+N(l.value),1)):te("",!0),a.value>0?(k(),M("span",pxe,"-"+N(a.value),1)):te("",!0)])):te("",!0)])):te("",!0),e.pr?(k(),M("button",{key:1,type:"button",class:Fe(["ch-pill ch-pr",f(e.pr.state)]),onClick:X[7]||(X[7]=oe=>e.pr&&s("openPr",e.pr.url))},[q(p(Me),{name:"git-pull-request",size:"sm"}),C("span",null,"PR #"+N(e.pr.number)+" · "+N(h(e.pr.state)),1)],2)):te("",!0)],2))}}),mxe=mt(hxe,[["__scopeId","data-v-88f3b874"]]),gxe=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","ON","ON","ET","ET","ET","ON","ON","ON","ON","ON","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","ON","ET","ET","ET","ET","ON","ON","ON","ON","L","ON","ON","BN","ON","ON","ET","ET","EN","EN","ON","L","ON","ON","ON","EN","L","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L"],Fx=[[697,698,"ON"],[706,719,"ON"],[722,735,"ON"],[741,749,"ON"],[751,767,"ON"],[768,879,"NSM"],[884,885,"ON"],[894,894,"ON"],[900,901,"ON"],[903,903,"ON"],[1014,1014,"ON"],[1155,1161,"NSM"],[1418,1418,"ON"],[1421,1422,"ON"],[1423,1423,"ET"],[1424,1424,"R"],[1425,1469,"NSM"],[1470,1470,"R"],[1471,1471,"NSM"],[1472,1472,"R"],[1473,1474,"NSM"],[1475,1475,"R"],[1476,1477,"NSM"],[1478,1478,"R"],[1479,1479,"NSM"],[1480,1535,"R"],[1536,1541,"AN"],[1542,1543,"ON"],[1544,1544,"AL"],[1545,1546,"ET"],[1547,1547,"AL"],[1548,1548,"CS"],[1549,1549,"AL"],[1550,1551,"ON"],[1552,1562,"NSM"],[1563,1610,"AL"],[1611,1631,"NSM"],[1632,1641,"AN"],[1642,1642,"ET"],[1643,1644,"AN"],[1645,1647,"AL"],[1648,1648,"NSM"],[1649,1749,"AL"],[1750,1756,"NSM"],[1757,1757,"AN"],[1758,1758,"ON"],[1759,1764,"NSM"],[1765,1766,"AL"],[1767,1768,"NSM"],[1769,1769,"ON"],[1770,1773,"NSM"],[1774,1775,"AL"],[1776,1785,"EN"],[1786,1808,"AL"],[1809,1809,"NSM"],[1810,1839,"AL"],[1840,1866,"NSM"],[1867,1957,"AL"],[1958,1968,"NSM"],[1969,1983,"AL"],[1984,2026,"R"],[2027,2035,"NSM"],[2036,2037,"R"],[2038,2041,"ON"],[2042,2044,"R"],[2045,2045,"NSM"],[2046,2069,"R"],[2070,2073,"NSM"],[2074,2074,"R"],[2075,2083,"NSM"],[2084,2084,"R"],[2085,2087,"NSM"],[2088,2088,"R"],[2089,2093,"NSM"],[2094,2136,"R"],[2137,2139,"NSM"],[2140,2143,"R"],[2144,2191,"AL"],[2192,2193,"AN"],[2194,2198,"AL"],[2199,2207,"NSM"],[2208,2249,"AL"],[2250,2273,"NSM"],[2274,2274,"AN"],[2275,2306,"NSM"],[2362,2362,"NSM"],[2364,2364,"NSM"],[2369,2376,"NSM"],[2381,2381,"NSM"],[2385,2391,"NSM"],[2402,2403,"NSM"],[2433,2433,"NSM"],[2492,2492,"NSM"],[2497,2500,"NSM"],[2509,2509,"NSM"],[2530,2531,"NSM"],[2546,2547,"ET"],[2555,2555,"ET"],[2558,2558,"NSM"],[2561,2562,"NSM"],[2620,2620,"NSM"],[2625,2626,"NSM"],[2631,2632,"NSM"],[2635,2637,"NSM"],[2641,2641,"NSM"],[2672,2673,"NSM"],[2677,2677,"NSM"],[2689,2690,"NSM"],[2748,2748,"NSM"],[2753,2757,"NSM"],[2759,2760,"NSM"],[2765,2765,"NSM"],[2786,2787,"NSM"],[2801,2801,"ET"],[2810,2815,"NSM"],[2817,2817,"NSM"],[2876,2876,"NSM"],[2879,2879,"NSM"],[2881,2884,"NSM"],[2893,2893,"NSM"],[2901,2902,"NSM"],[2914,2915,"NSM"],[2946,2946,"NSM"],[3008,3008,"NSM"],[3021,3021,"NSM"],[3059,3064,"ON"],[3065,3065,"ET"],[3066,3066,"ON"],[3072,3072,"NSM"],[3076,3076,"NSM"],[3132,3132,"NSM"],[3134,3136,"NSM"],[3142,3144,"NSM"],[3146,3149,"NSM"],[3157,3158,"NSM"],[3170,3171,"NSM"],[3192,3198,"ON"],[3201,3201,"NSM"],[3260,3260,"NSM"],[3276,3277,"NSM"],[3298,3299,"NSM"],[3328,3329,"NSM"],[3387,3388,"NSM"],[3393,3396,"NSM"],[3405,3405,"NSM"],[3426,3427,"NSM"],[3457,3457,"NSM"],[3530,3530,"NSM"],[3538,3540,"NSM"],[3542,3542,"NSM"],[3633,3633,"NSM"],[3636,3642,"NSM"],[3647,3647,"ET"],[3655,3662,"NSM"],[3761,3761,"NSM"],[3764,3772,"NSM"],[3784,3790,"NSM"],[3864,3865,"NSM"],[3893,3893,"NSM"],[3895,3895,"NSM"],[3897,3897,"NSM"],[3898,3901,"ON"],[3953,3966,"NSM"],[3968,3972,"NSM"],[3974,3975,"NSM"],[3981,3991,"NSM"],[3993,4028,"NSM"],[4038,4038,"NSM"],[4141,4144,"NSM"],[4146,4151,"NSM"],[4153,4154,"NSM"],[4157,4158,"NSM"],[4184,4185,"NSM"],[4190,4192,"NSM"],[4209,4212,"NSM"],[4226,4226,"NSM"],[4229,4230,"NSM"],[4237,4237,"NSM"],[4253,4253,"NSM"],[4957,4959,"NSM"],[5008,5017,"ON"],[5120,5120,"ON"],[5760,5760,"WS"],[5787,5788,"ON"],[5906,5908,"NSM"],[5938,5939,"NSM"],[5970,5971,"NSM"],[6002,6003,"NSM"],[6068,6069,"NSM"],[6071,6077,"NSM"],[6086,6086,"NSM"],[6089,6099,"NSM"],[6107,6107,"ET"],[6109,6109,"NSM"],[6128,6137,"ON"],[6144,6154,"ON"],[6155,6157,"NSM"],[6158,6158,"BN"],[6159,6159,"NSM"],[6277,6278,"NSM"],[6313,6313,"NSM"],[6432,6434,"NSM"],[6439,6440,"NSM"],[6450,6450,"NSM"],[6457,6459,"NSM"],[6464,6464,"ON"],[6468,6469,"ON"],[6622,6655,"ON"],[6679,6680,"NSM"],[6683,6683,"NSM"],[6742,6742,"NSM"],[6744,6750,"NSM"],[6752,6752,"NSM"],[6754,6754,"NSM"],[6757,6764,"NSM"],[6771,6780,"NSM"],[6783,6783,"NSM"],[6832,6877,"NSM"],[6880,6891,"NSM"],[6912,6915,"NSM"],[6964,6964,"NSM"],[6966,6970,"NSM"],[6972,6972,"NSM"],[6978,6978,"NSM"],[7019,7027,"NSM"],[7040,7041,"NSM"],[7074,7077,"NSM"],[7080,7081,"NSM"],[7083,7085,"NSM"],[7142,7142,"NSM"],[7144,7145,"NSM"],[7149,7149,"NSM"],[7151,7153,"NSM"],[7212,7219,"NSM"],[7222,7223,"NSM"],[7376,7378,"NSM"],[7380,7392,"NSM"],[7394,7400,"NSM"],[7405,7405,"NSM"],[7412,7412,"NSM"],[7416,7417,"NSM"],[7616,7679,"NSM"],[8125,8125,"ON"],[8127,8129,"ON"],[8141,8143,"ON"],[8157,8159,"ON"],[8173,8175,"ON"],[8189,8190,"ON"],[8192,8202,"WS"],[8203,8205,"BN"],[8207,8207,"R"],[8208,8231,"ON"],[8232,8232,"WS"],[8233,8233,"B"],[8234,8238,"BN"],[8239,8239,"CS"],[8240,8244,"ET"],[8245,8259,"ON"],[8260,8260,"CS"],[8261,8286,"ON"],[8287,8287,"WS"],[8288,8303,"BN"],[8304,8304,"EN"],[8308,8313,"EN"],[8314,8315,"ES"],[8316,8318,"ON"],[8320,8329,"EN"],[8330,8331,"ES"],[8332,8334,"ON"],[8352,8399,"ET"],[8400,8432,"NSM"],[8448,8449,"ON"],[8451,8454,"ON"],[8456,8457,"ON"],[8468,8468,"ON"],[8470,8472,"ON"],[8478,8483,"ON"],[8485,8485,"ON"],[8487,8487,"ON"],[8489,8489,"ON"],[8494,8494,"ET"],[8506,8507,"ON"],[8512,8516,"ON"],[8522,8525,"ON"],[8528,8543,"ON"],[8585,8587,"ON"],[8592,8721,"ON"],[8722,8722,"ES"],[8723,8723,"ET"],[8724,9013,"ON"],[9083,9108,"ON"],[9110,9257,"ON"],[9280,9290,"ON"],[9312,9351,"ON"],[9352,9371,"EN"],[9450,9899,"ON"],[9901,10239,"ON"],[10496,11123,"ON"],[11126,11263,"ON"],[11493,11498,"ON"],[11503,11505,"NSM"],[11513,11519,"ON"],[11647,11647,"NSM"],[11744,11775,"NSM"],[11776,11869,"ON"],[11904,11929,"ON"],[11931,12019,"ON"],[12032,12245,"ON"],[12272,12287,"ON"],[12288,12288,"WS"],[12289,12292,"ON"],[12296,12320,"ON"],[12330,12333,"NSM"],[12336,12336,"ON"],[12342,12343,"ON"],[12349,12351,"ON"],[12441,12442,"NSM"],[12443,12444,"ON"],[12448,12448,"ON"],[12539,12539,"ON"],[12736,12773,"ON"],[12783,12783,"ON"],[12829,12830,"ON"],[12880,12895,"ON"],[12924,12926,"ON"],[12977,12991,"ON"],[13004,13007,"ON"],[13175,13178,"ON"],[13278,13279,"ON"],[13311,13311,"ON"],[19904,19967,"ON"],[42128,42182,"ON"],[42509,42511,"ON"],[42607,42610,"NSM"],[42611,42611,"ON"],[42612,42621,"NSM"],[42622,42623,"ON"],[42654,42655,"NSM"],[42736,42737,"NSM"],[42752,42785,"ON"],[42888,42888,"ON"],[43010,43010,"NSM"],[43014,43014,"NSM"],[43019,43019,"NSM"],[43045,43046,"NSM"],[43048,43051,"ON"],[43052,43052,"NSM"],[43064,43065,"ET"],[43124,43127,"ON"],[43204,43205,"NSM"],[43232,43249,"NSM"],[43263,43263,"NSM"],[43302,43309,"NSM"],[43335,43345,"NSM"],[43392,43394,"NSM"],[43443,43443,"NSM"],[43446,43449,"NSM"],[43452,43453,"NSM"],[43493,43493,"NSM"],[43561,43566,"NSM"],[43569,43570,"NSM"],[43573,43574,"NSM"],[43587,43587,"NSM"],[43596,43596,"NSM"],[43644,43644,"NSM"],[43696,43696,"NSM"],[43698,43700,"NSM"],[43703,43704,"NSM"],[43710,43711,"NSM"],[43713,43713,"NSM"],[43756,43757,"NSM"],[43766,43766,"NSM"],[43882,43883,"ON"],[44005,44005,"NSM"],[44008,44008,"NSM"],[44013,44013,"NSM"],[64285,64285,"R"],[64286,64286,"NSM"],[64287,64296,"R"],[64297,64297,"ES"],[64298,64335,"R"],[64336,64450,"AL"],[64451,64466,"ON"],[64467,64829,"AL"],[64830,64847,"ON"],[64848,64911,"AL"],[64912,64913,"ON"],[64914,64967,"AL"],[64968,64975,"ON"],[64976,65007,"BN"],[65008,65020,"AL"],[65021,65023,"ON"],[65024,65039,"NSM"],[65040,65049,"ON"],[65056,65071,"NSM"],[65072,65103,"ON"],[65104,65104,"CS"],[65105,65105,"ON"],[65106,65106,"CS"],[65108,65108,"ON"],[65109,65109,"CS"],[65110,65118,"ON"],[65119,65119,"ET"],[65120,65121,"ON"],[65122,65123,"ES"],[65124,65126,"ON"],[65128,65128,"ON"],[65129,65130,"ET"],[65131,65131,"ON"],[65136,65278,"AL"],[65279,65279,"BN"],[65281,65282,"ON"],[65283,65285,"ET"],[65286,65290,"ON"],[65291,65291,"ES"],[65292,65292,"CS"],[65293,65293,"ES"],[65294,65295,"CS"],[65296,65305,"EN"],[65306,65306,"CS"],[65307,65312,"ON"],[65339,65344,"ON"],[65371,65381,"ON"],[65504,65505,"ET"],[65506,65508,"ON"],[65509,65510,"ET"],[65512,65518,"ON"],[65520,65528,"BN"],[65529,65533,"ON"],[65534,65535,"BN"],[65793,65793,"ON"],[65856,65932,"ON"],[65936,65948,"ON"],[65952,65952,"ON"],[66045,66045,"NSM"],[66272,66272,"NSM"],[66273,66299,"EN"],[66422,66426,"NSM"],[67584,67870,"R"],[67871,67871,"ON"],[67872,68096,"R"],[68097,68099,"NSM"],[68100,68100,"R"],[68101,68102,"NSM"],[68103,68107,"R"],[68108,68111,"NSM"],[68112,68151,"R"],[68152,68154,"NSM"],[68155,68158,"R"],[68159,68159,"NSM"],[68160,68324,"R"],[68325,68326,"NSM"],[68327,68408,"R"],[68409,68415,"ON"],[68416,68863,"R"],[68864,68899,"AL"],[68900,68903,"NSM"],[68904,68911,"AL"],[68912,68921,"AN"],[68922,68927,"AL"],[68928,68937,"AN"],[68938,68968,"R"],[68969,68973,"NSM"],[68974,68974,"ON"],[68975,69215,"R"],[69216,69246,"AN"],[69247,69290,"R"],[69291,69292,"NSM"],[69293,69311,"R"],[69312,69327,"AL"],[69328,69336,"ON"],[69337,69369,"AL"],[69370,69375,"NSM"],[69376,69423,"R"],[69424,69445,"AL"],[69446,69456,"NSM"],[69457,69487,"AL"],[69488,69505,"R"],[69506,69509,"NSM"],[69510,69631,"R"],[69633,69633,"NSM"],[69688,69702,"NSM"],[69714,69733,"ON"],[69744,69744,"NSM"],[69747,69748,"NSM"],[69759,69761,"NSM"],[69811,69814,"NSM"],[69817,69818,"NSM"],[69826,69826,"NSM"],[69888,69890,"NSM"],[69927,69931,"NSM"],[69933,69940,"NSM"],[70003,70003,"NSM"],[70016,70017,"NSM"],[70070,70078,"NSM"],[70089,70092,"NSM"],[70095,70095,"NSM"],[70191,70193,"NSM"],[70196,70196,"NSM"],[70198,70199,"NSM"],[70206,70206,"NSM"],[70209,70209,"NSM"],[70367,70367,"NSM"],[70371,70378,"NSM"],[70400,70401,"NSM"],[70459,70460,"NSM"],[70464,70464,"NSM"],[70502,70508,"NSM"],[70512,70516,"NSM"],[70587,70592,"NSM"],[70606,70606,"NSM"],[70608,70608,"NSM"],[70610,70610,"NSM"],[70625,70626,"NSM"],[70712,70719,"NSM"],[70722,70724,"NSM"],[70726,70726,"NSM"],[70750,70750,"NSM"],[70835,70840,"NSM"],[70842,70842,"NSM"],[70847,70848,"NSM"],[70850,70851,"NSM"],[71090,71093,"NSM"],[71100,71101,"NSM"],[71103,71104,"NSM"],[71132,71133,"NSM"],[71219,71226,"NSM"],[71229,71229,"NSM"],[71231,71232,"NSM"],[71264,71276,"ON"],[71339,71339,"NSM"],[71341,71341,"NSM"],[71344,71349,"NSM"],[71351,71351,"NSM"],[71453,71453,"NSM"],[71455,71455,"NSM"],[71458,71461,"NSM"],[71463,71467,"NSM"],[71727,71735,"NSM"],[71737,71738,"NSM"],[71995,71996,"NSM"],[71998,71998,"NSM"],[72003,72003,"NSM"],[72148,72151,"NSM"],[72154,72155,"NSM"],[72160,72160,"NSM"],[72193,72198,"NSM"],[72201,72202,"NSM"],[72243,72248,"NSM"],[72251,72254,"NSM"],[72263,72263,"NSM"],[72273,72278,"NSM"],[72281,72283,"NSM"],[72330,72342,"NSM"],[72344,72345,"NSM"],[72544,72544,"NSM"],[72546,72548,"NSM"],[72550,72550,"NSM"],[72752,72758,"NSM"],[72760,72765,"NSM"],[72850,72871,"NSM"],[72874,72880,"NSM"],[72882,72883,"NSM"],[72885,72886,"NSM"],[73009,73014,"NSM"],[73018,73018,"NSM"],[73020,73021,"NSM"],[73023,73029,"NSM"],[73031,73031,"NSM"],[73104,73105,"NSM"],[73109,73109,"NSM"],[73111,73111,"NSM"],[73459,73460,"NSM"],[73472,73473,"NSM"],[73526,73530,"NSM"],[73536,73536,"NSM"],[73538,73538,"NSM"],[73562,73562,"NSM"],[73685,73692,"ON"],[73693,73696,"ET"],[73697,73713,"ON"],[78912,78912,"NSM"],[78919,78933,"NSM"],[90398,90409,"NSM"],[90413,90415,"NSM"],[92912,92916,"NSM"],[92976,92982,"NSM"],[94031,94031,"NSM"],[94095,94098,"NSM"],[94178,94178,"ON"],[94180,94180,"NSM"],[113821,113822,"NSM"],[113824,113827,"BN"],[117760,117973,"ON"],[118e3,118009,"EN"],[118010,118012,"ON"],[118016,118451,"ON"],[118458,118480,"ON"],[118496,118512,"ON"],[118528,118573,"NSM"],[118576,118598,"NSM"],[119143,119145,"NSM"],[119155,119162,"BN"],[119163,119170,"NSM"],[119173,119179,"NSM"],[119210,119213,"NSM"],[119273,119274,"ON"],[119296,119361,"ON"],[119362,119364,"NSM"],[119365,119365,"ON"],[119552,119638,"ON"],[120513,120513,"ON"],[120539,120539,"ON"],[120571,120571,"ON"],[120597,120597,"ON"],[120629,120629,"ON"],[120655,120655,"ON"],[120687,120687,"ON"],[120713,120713,"ON"],[120745,120745,"ON"],[120771,120771,"ON"],[120782,120831,"EN"],[121344,121398,"NSM"],[121403,121452,"NSM"],[121461,121461,"NSM"],[121476,121476,"NSM"],[121499,121503,"NSM"],[121505,121519,"NSM"],[122880,122886,"NSM"],[122888,122904,"NSM"],[122907,122913,"NSM"],[122915,122916,"NSM"],[122918,122922,"NSM"],[123023,123023,"NSM"],[123184,123190,"NSM"],[123566,123566,"NSM"],[123628,123631,"NSM"],[123647,123647,"ET"],[124140,124143,"NSM"],[124398,124399,"NSM"],[124643,124643,"NSM"],[124646,124646,"NSM"],[124654,124655,"NSM"],[124661,124661,"NSM"],[124928,125135,"R"],[125136,125142,"NSM"],[125143,125251,"R"],[125252,125258,"NSM"],[125259,126063,"R"],[126064,126143,"AL"],[126144,126207,"R"],[126208,126287,"AL"],[126288,126463,"R"],[126464,126703,"AL"],[126704,126705,"ON"],[126706,126719,"AL"],[126720,126975,"R"],[126976,127019,"ON"],[127024,127123,"ON"],[127136,127150,"ON"],[127153,127167,"ON"],[127169,127183,"ON"],[127185,127221,"ON"],[127232,127242,"EN"],[127243,127247,"ON"],[127279,127279,"ON"],[127338,127343,"ON"],[127405,127405,"ON"],[127584,127589,"ON"],[127744,128728,"ON"],[128732,128748,"ON"],[128752,128764,"ON"],[128768,128985,"ON"],[128992,129003,"ON"],[129008,129008,"ON"],[129024,129035,"ON"],[129040,129095,"ON"],[129104,129113,"ON"],[129120,129159,"ON"],[129168,129197,"ON"],[129200,129211,"ON"],[129216,129217,"ON"],[129232,129240,"ON"],[129280,129623,"ON"],[129632,129645,"ON"],[129648,129660,"ON"],[129664,129674,"ON"],[129678,129734,"ON"],[129736,129736,"ON"],[129741,129756,"ON"],[129759,129770,"ON"],[129775,129784,"ON"],[129792,129938,"ON"],[129940,130031,"ON"],[130032,130041,"EN"],[130042,130042,"ON"],[131070,131071,"BN"],[196606,196607,"BN"],[262142,262143,"BN"],[327678,327679,"BN"],[393214,393215,"BN"],[458750,458751,"BN"],[524286,524287,"BN"],[589822,589823,"BN"],[655358,655359,"BN"],[720894,720895,"BN"],[786430,786431,"BN"],[851966,851967,"BN"],[917502,917759,"BN"],[917760,917999,"NSM"],[918e3,921599,"BN"],[983038,983039,"BN"],[1048574,1048575,"BN"],[1114110,1114111,"BN"]];function vxe(e){if(e<=255)return gxe[e];let t=0,n=Fx.length-1;for(;t<=n;){const o=t+n>>1,s=Fx[o];if(es[1]){t=o+1;continue}return s[2]}return"L"}function yxe(e){const t=e.length;if(t===0)return null;const n=new Array(t);let o=!1;for(let c=0;c=55296&&u<=56319&&c+1=56320&&m<=57343&&(d=(u-55296<<10)+(m-56320)+65536,f=2)}const h=vxe(d);(h==="R"||h==="AL"||h==="AN")&&(o=!0);for(let m=0;m=0&&n[u]==="ET";u--)n[u]="EN";for(u=c+1;u0?n[c-1]:l,f=u0&&t.charCodeAt(t.length-1)===32&&(t=t.slice(0,-1)),t}function xxe(e){return/[\r\f]/.test(e)?e.replace(/\r\n/g,` -`).replace(/[\r\f]/g,` -`):e}let v4=null,Sxe;function Axe(){return v4===null&&(v4=new Intl.Segmenter(Sxe,{granularity:"word"})),v4}const Mxe=/\p{Script=Arabic}/u,fc=/\p{M}/u,H5=/\p{Nd}/u;function Rx(e){return Mxe.test(e)}function Px(e){return e>=19968&&e<=40959||e>=13312&&e<=19903||e>=131072&&e<=173791||e>=173824&&e<=177983||e>=177984&&e<=178207||e>=178208&&e<=183983||e>=183984&&e<=191471||e>=191472&&e<=192093||e>=194560&&e<=195103||e>=196608&&e<=201551||e>=201552&&e<=205743||e>=205744&&e<=210041||e>=63744&&e<=64255||e>=12288&&e<=12351||e>=12352&&e<=12447||e>=12448&&e<=12543||e>=12592&&e<=12687||e>=44032&&e<=55215||e>=65280&&e<=65519}function Cl(e){for(let t=0;t=55296&&n<=56319&&t+1=56320&&o<=57343){const s=(n-55296<<10)+(o-56320)+65536;if(Px(s))return!0;t++;continue}}if(Px(n))return!0}}return!1}function Txe(e){const t=Xp(e);return t!==null&&(z5.has(t)||Cu.has(t))}const Exe=new Set([" "," ","⁠","\uFEFF"]),Ixe=new Set(["-","‐","–","—"]);function Lxe(e){const t=Xp(e);return t!==null&&Exe.has(t)}function $xe(e){const t=Xp(e);return t!==null&&Ixe.has(t)}function $N(e,t){return Lxe(e)?!1:t?!(Txe(e)||$xe(e)):!0}const z5=new Set([",",".","!",":",";","?","、","。","・",")","〕","〉","》","」","』","】","〗","〙","〛","ー","々","〻","ゝ","ゞ","ヽ","ヾ"]),O2=new Set(['"',"(","[","{","¡","¿","“","‘","‚","„","«","‹","⸘","(","〔","〈","《","「","『","【","〖","〘","〚"]),W5=new Set(["'","’"]),Cu=new Set([".",",","!","?",":",";","،","؛","؟","।","॥","၊","။","၌","၍","၏",")","]","}","%",'"',"”","’","»","›","…"]),Nxe=new Set([":",".","،","؛"]),Oxe=new Set(["၏"]),Fxe=new Set(["”","’","»","›","」","』","】","》","〉","〕",")"]);function Rxe(e){if(U5(e))return!0;let t=!1;for(const n of e){if(Cu.has(n)||R2(n)){t=!0;continue}if(!(t&&fc.test(n)))return!1}return t}function Pxe(e){for(const t of e)if(!z5.has(t)&&!Cu.has(t))return!1;return e.length>0}function Dxe(e){if(U5(e))return!0;for(const t of e)if(!O2.has(t)&&!W5.has(t)&&!fc.test(t)&&!R2(t))return!1;return e.length>0}function U5(e){let t=!1;for(const n of e)if(!(n==="\\"||fc.test(n))){if(O2.has(n)||Cu.has(n)||W5.has(n)){t=!0;continue}return!1}return t}function F2(e,t){const n=t-1;if(n<=0)return Math.max(n,0);const o=e.charCodeAt(n);if(o<56320||o>57343)return n;const s=n-1;if(s<0)return n;const i=e.charCodeAt(s);return i>=55296&&i<=56319?s:n}function Xp(e){if(e.length===0)return null;const t=F2(e,e.length);return e.slice(t)}function Bxe(e){for(const t of e)if(!fc.test(t))return t;return null}function Hxe(e){for(let t=e.length;t>0;){const n=F2(e,t),o=e.slice(n,t);if(!fc.test(o))return o;t=n}return null}const zxe=[36,37,43,43,92,92,162,165,176,177,1423,1423,1545,1547,1642,1642,2046,2047,2546,2547,2553,2555,2801,2801,3065,3065,3449,3449,3647,3647,6107,6107,8240,8247,8279,8279,8352,8399,8451,8451,8457,8457,8470,8470,8722,8723,43064,43064,65020,65020,65129,65130,65284,65285,65504,65505,65509,65510,73693,73696,123647,123647,126124,126124,126128,126128];function Wxe(e,t){for(let n=0;n=t[n]&&e<=t[n+1])return!0;return!1}function R2(e){const t=e.codePointAt(0);return t!==void 0&&Wxe(t,zxe)}function Uxe(e){const t=Hxe(e);return t!==null&&R2(t)}function jxe(e){const t=Bxe(e);return t!==null&&H5.test(t)}function Vxe(e){const t=Array.from(e);let n=t.length;for(;n>0;){const o=t[n-1];if(fc.test(o)){n--;continue}if(O2.has(o)||W5.has(o)){n--;continue}break}return n<=0||n===t.length?null:{head:t.slice(0,n).join(""),tail:t.slice(n).join("")}}function qxe(e,t,n){return n==="text"&&!t&&e.length===1&&e!=="-"&&e!=="—"?e:null}function Dx(e,t,n,o){const s=t[o],i=e[o];if(s==null)return i;const r=n[o];if(i.length===r)return i;const l=s.repeat(r);return e[o]=l,l}function Bx(e,t){return e&&t!==null&&Nxe.has(t)}function Kxe(e){const t=Xp(e);return t!==null&&Oxe.has(t)}function Zxe(e){if(e.length<2||e[0]!==" ")return null;const t=e.slice(1);return/^\p{M}+$/u.test(t)?{space:" ",marks:t}:null}function fy(e){let t=e.length;for(;t>0;){const n=F2(e,t),o=e.slice(n,t);if(Fxe.has(o))return!0;if(!Cu.has(o))return!1;t=n}return!1}function Gxe(e,t){if(t.preserveOrdinarySpaces||t.preserveHardBreaks){if(e===" ")return"preserved-space";if(e===" ")return"tab";if(t.preserveHardBreaks&&e===` -`)return"hard-break"}return e===" "?"space":e===" "||e===" "||e==="⁠"||e==="\uFEFF"?"glue":e==="​"?"zero-width-break":e==="­"?"soft-hyphen":"text"}const Yxe=/[\x20\t\n\xA0\xAD\u200B\u202F\u2060\uFEFF]/;function Ur(e){return e.length===1?e[0]:e.join("")}function Xxe(e,t){const n=[];for(let o=e.length-1;o>=0;o--)n.push(e[o]);return n.push(t),Ur(n)}function Jxe(e,t,n,o){if(!Yxe.test(e))return[{text:e,isWordLike:t,kind:"text",start:n}];const s=[];let i=null,r=[],l=n,a=!1,c=0;for(const u of e){const d=Gxe(u,o),f=d==="text"&&t;if(i!==null&&d===i&&f===a){r.push(u),c+=u.length;continue}i!==null&&s.push({text:Ur(r),isWordLike:a,kind:i,start:l}),i=d,r=[u],l=n+c,a=f,c+=u.length}return i!==null&&s.push({text:Ur(r),isWordLike:a,kind:i,start:l}),s}function py(e){return e==="space"||e==="preserved-space"||e==="zero-width-break"||e==="hard-break"}const Qxe=/^[A-Za-z][A-Za-z0-9+.-]*:$/;function eSe(e,t){const n=e.texts[t];return n.startsWith("www.")?!0:Qxe.test(n)&&t+1=e.len||py(e.kinds[l]))continue;const a=[],c=e.starts[l];let u=l;for(;u0&&(t.push(Ur(a)),n.push(!0),o.push("text"),s.push(c),i=u-1)}return{len:t.length,texts:t,isWordLike:n,kinds:o,starts:s}}const sSe=new Set([":","-","/","×",",",".","+","–","—"]),iSe=/[\p{P}\p{S}\p{Co}]/u,rSe=/\p{Emoji_Presentation}/u,lSe=new Set(["?","֊","-","‐","‒","–","—","…","‼","‽","⁉"]);function aSe(e){return e>=33&&e<=47&&e!==45||e>=58&&e<=64&&e!==63||e>=91&&e<=96||e>=123&&e<=126}function NN(e){const t=e.charCodeAt(0);return t<128?aSe(t):!lSe.has(e)&&!rSe.test(e)&&iSe.test(e)}function Hx(e){let t=!1;for(const n of e)if(!fc.test(n)){if(!NN(n))return!1;t=!0}return t}function cSe(e){for(let t=e.length;t>0;){const n=F2(e,t),o=e.slice(n,t);if(fc.test(o)){t=n;continue}return NN(o)||R2(o)}return!1}function uSe(e,t,n,o){const s=!t&&Hx(e),i=!o&&Hx(n),r=Uxe(e),l=(t||r)&&cSe(e);return!s&&!i&&!l||Cl(e)||Cl(n)?!1:(t||s||r)&&(o||i)}function ON(e){for(const t of e)if(H5.test(t))return!0;return!1}function xg(e){if(e.length===0)return!1;for(const t of e)if(!(H5.test(t)||sSe.has(t)))return!1;return!0}function dSe(e){const t=[],n=[],o=[],s=[];for(let i=0;ii+1){t.push(Ur(c)),n.push(d),o.push("text"),s.push(e.starts[i]),i=u;continue}}t.push(r),n.push(a),o.push(l),s.push(e.starts[i]),i++}return{len:t.length,texts:t,isWordLike:n,kinds:o,starts:s}}function pSe(e){const t=[],n=[],o=[],s=[];for(let i=0;i1;for(let c=0;c0&&a[H]==="text"&&R&&f[H]&&m[H]||S&&s>0&&a[H]==="text"&&Pxe(L.text)&&f[H]||S&&s>0&&a[H]==="text"&&g[H]?O():S&&s>0&&a[H]==="text"&&L.isWordLike&&B&&b[H]?(O(),l[H]=!0):T!==null&&s>0&&a[H]==="text"&&u[H]===T?d[H]=(d[H]??1)+1:S&&!L.isWordLike&&s>0&&a[H]==="text"&&!f[H]&&(Rxe(L.text)||L.text==="-"&&l[H])?O():(i[s]=L.text,r[s]=[L.text],l[s]=L.isWordLike,a[s]=L.kind,c[s]=L.start,u[s]=T,d[s]=T===null?0:1,f[s]=R,h[s]=B,m[s]=$,g[s]=D,b[s]=Bx(B,I),s++)}for(let A=0;Anull);let v=-1;for(let A=s-1;A>=0;A--){const L=i[A];if(L.length!==0){if(a[A]==="text"&&!l[A]&&v>=0&&a[v]==="text"&&(Dxe(L)||L==="-"&&jxe(i[v]))){const S=_[v]??[];S.push(L),_[v]=S,c[v]=c[A],i[A]="";continue}v=A}}for(let A=0;A=0&&!$N(t.texts[f-1],n)&&d(f),l<0&&(l=f),a=a||Cl(h);continue}d(f),o.push(h),s.push(t.isWordLike[f]),i.push(m),r.push(t.starts[f])}return d(t.len),{len:o.length,texts:o,isWordLike:s,kinds:i,starts:r}}function kSe(e,t,n="normal",o="normal"){const s=wxe(n),i=s.mode==="pre-wrap"?xxe(e):_xe(e);if(i.length===0)return{normalized:i,chunks:[],len:0,texts:[],isWordLike:[],kinds:[],starts:[]};const r=gSe(i,t,s),l=o==="keep-all"?ySe(i,r,t.breakKeepAllAfterPunctuation):r;return{normalized:i,chunks:vSe(l,s),...l}}let sd=null;const zx=new Map;let id=null;const bSe=96,CSe=/\p{Emoji_Presentation}/u,wSe=/[\p{Emoji_Presentation}\p{Extended_Pictographic}\p{Regional_Indicator}\uFE0F\u20E3]/u;let y4=null;const Wx=new Map;function j5(){if(sd!==null)return sd;if(typeof OffscreenCanvas<"u")return sd=new OffscreenCanvas(1,1).getContext("2d"),sd;if(typeof document<"u")return sd=document.createElement("canvas").getContext("2d"),sd;throw new Error("Text measurement requires OffscreenCanvas or a DOM canvas context.")}function _Se(e){let t=zx.get(e);return t||(t=new Map,zx.set(e,t)),t}function Pa(e,t){let n=t.get(e);return n===void 0&&(n={width:j5().measureText(e).width,containsCJK:Cl(e)},t.set(e,n)),n}function P2(){if(id!==null)return id;if(typeof navigator>"u")return id={lineFitEpsilon:.005,carryCJKAfterClosingQuote:!1,breakKeepAllAfterPunctuation:!0,preferPrefixWidthsForBreakableRuns:!1,preferEarlySoftHyphenBreak:!1},id;const e=navigator.userAgent,n=navigator.vendor==="Apple Computer, Inc."&&e.includes("Safari/")&&!e.includes("Chrome/")&&!e.includes("Chromium/")&&!e.includes("CriOS/")&&!e.includes("FxiOS/")&&!e.includes("EdgiOS/"),o=e.includes("Chrome/")||e.includes("Chromium/")||e.includes("CriOS/")||e.includes("Edg/");return id={lineFitEpsilon:n?1/64:.005,carryCJKAfterClosingQuote:o,breakKeepAllAfterPunctuation:!n,preferPrefixWidthsForBreakableRuns:n,preferEarlySoftHyphenBreak:n},id}function xSe(e){const t=e.match(/(\d+(?:\.\d+)?)\s*px/);return t?parseFloat(t[1]):16}function FN(){return y4===null&&(y4=new Intl.Segmenter(void 0,{granularity:"grapheme"})),y4}function SSe(e){return CSe.test(e)||e.includes("️")}function ASe(e){return wSe.test(e)}function MSe(e,t){let n=Wx.get(e);if(n!==void 0)return n;const o=j5();o.font=e;const s=o.measureText("😀").width;if(n=0,s>t+.5&&typeof document<"u"&&document.body!==null){const i=document.createElement("span");i.style.font=e,i.style.display="inline-block",i.style.visibility="hidden",i.style.position="absolute",i.textContent="😀",document.body.appendChild(i);const r=i.getBoundingClientRect().width;document.body.removeChild(i),s-r>.5&&(n=s-r)}return Wx.set(e,n),n}function TSe(e){let t=0;const n=FN();for(const o of n.segment(e))SSe(o.segment)&&t++;return t}function ESe(e,t){return t.emojiCount===void 0&&(t.emojiCount=TSe(e)),t.emojiCount}function Qc(e,t,n){return n===0?t.width:t.width-ESe(e,t)*n}function ISe(e,t,n,o,s){if(t.breakableFitAdvances!==void 0&&t.breakableFitMode===s)return t.breakableFitAdvances;t.breakableFitMode=s;const i=FN(),r=[];for(const u of i.segment(e))r.push(u.segment);if(r.length<=1)return t.breakableFitAdvances=null,t.breakableFitAdvances;if(s==="sum-graphemes"){const u=[];for(const d of r){const f=Pa(d,n);u.push(Qc(d,f,o))}return t.breakableFitAdvances=u,t.breakableFitAdvances}if(s==="pair-context"||r.length>bSe){const u=[];let d=null,f=0;for(const h of r){const m=Pa(h,n),g=Qc(h,m,o);if(d===null)u.push(g);else{const b=d+h,_=Pa(b,n);u.push(Qc(b,_,o)-f)}d=h,f=g}return t.breakableFitAdvances=u,t.breakableFitAdvances}const l=[];let a="",c=0;for(const u of r){a+=u;const d=Pa(a,n),f=Qc(a,d,o);l.push(f-c),c=f}return t.breakableFitAdvances=l,t.breakableFitAdvances}function LSe(e,t){const n=j5();n.font=e;const o=_Se(e),s=xSe(e),i=t?MSe(e,s):0;return{cache:o,fontSize:s,emojiCorrection:i}}function $Se(e){return e==="space"||e==="zero-width-break"||e==="soft-hyphen"}function RN(e){return e==="space"||e==="preserved-space"||e==="tab"||e==="zero-width-break"||e==="soft-hyphen"}function PN(e,t,n=e.widths.length){for(;t0?e.letterSpacing:0}function V5(e,t){return t===0?0:e+t}function FSe(e,t){return e.letterSpacing!==0&&e.spacingGraphemeCounts[t]>0?e.letterSpacing:0}function RSe(e,t,n,o,s){const i=t==="tab"?s+FSe(e,n):e.lineEndFitAdvances[n];return V5(o,i)}function Ux(e,t,n,o){const s=t==="tab"?0:e.lineEndFitAdvances[n];return V5(o,s)}function jx(e,t,n,o,s){const i=t==="tab"?s:e.lineEndPaintAdvances[n];return V5(o,i)}function PSe(e,t,n){return e.letterSpacing!==0&&t?n+e.letterSpacing:n}function DSe(e,t){return e.letterSpacing===0?t:t+e.letterSpacing}function Sg(e,t,n){let o=t;for(;o0)return e.spacingGraphemeCounts[o]>0?e.letterSpacing:0;for(let i=o-1;i>=t;i--){const r=e.kinds[i];if(!(r==="space"||r==="zero-width-break"||r==="hard-break")){if(r==="soft-hyphen"){if(i===o-1)return 0;continue}return i===t&&n>0||e.spacingGraphemeCounts[i]>0?e.letterSpacing:0}}return 0}function HSe(e,t,n,o,s,i){return t+BSe(e,n,o,s,i)}function zSe(e,t,n){const{widths:o,kinds:s,breakableFitAdvances:i,breakablePreferredBreaks:r}=e;if(o.length===0)return 0;const a=P2().lineFitEpsilon,c=t+a;let u=0,d=0,f=!1,h=0,m=0,g=0,b=0,_=-1,v=0;function y(){_=-1,v=0}function w(R=g,B=b,I=d){u++,n?.(I,h,m,R,B),d=0,f=!1,y()}function x(R,B){f=!0,h=R,m=0,g=R+1,b=0,d=B}function A(R,B,I){f=!0,h=R,m=B,g=R,b=B+1,d=I}function L(R,B){if(!f){x(R,B);return}d+=B,g=R+1,b=0}function S(R,B){const I=i[R],$=r[R]??null;let D=$===null?-1:Sg($,0,B+1),H=-1,O=0,P=B;for(;Pc){if($!==null&&H>B){w(R,H,O),P=H,D=Sg($,D,P+1),H=-1,O=0;continue}w(),A(R,P,z)}else d+=z,g=R,b=P+1;const W=P+1;$!==null&&$[D]===W&&(H=W,O=d,D++),P++}f&&g===R&&b===I.length&&(g=R+1,b=0)}let T=0;for(;T=o.length));){const R=o[T],B=s[T],I=RN(B);if(!f){R>c&&i[T]!==null?S(T,0):x(T,R),I&&(_=T+1,v=d-R),T++;continue}if(d+R>c){if(I){L(T,R),w(T+1,0,d-R),T++;continue}if(_>=0){if(g>_||g===_&&b>0){w();continue}w(_,0,v);continue}if(R>c&&i[T]!==null){w(),S(T,0),T++;continue}w();continue}L(T,R),I&&(_=T+1,v=d-R),T++}return f&&w(),u}function WSe(e,t,n){if(e.simpleLineWalkFastPath)return zSe(e,t,n);const{widths:o,kinds:s,breakableFitAdvances:i,breakablePreferredBreaks:r,discretionaryHyphenWidth:l,chunks:a}=e;if(o.length===0||a.length===0)return 0;const c=P2(),u=c.lineFitEpsilon,d=t+u;let f=0,h=0,m=!1,g=0,b=0,_=0,v=0,y=-1,w=0,x=0,A=null;function L(){y=-1,w=0,x=0,A=null}function S(){return A==="soft-hyphen"&&y===_&&v===0?x:h}function T(O=_,P=v,z){f++,n!==void 0&&n(HSe(e,z??S(),g,b,O,P),g,b,O,P),h=0,m=!1,L()}function R(O,P){m=!0,g=O,b=0,_=O+1,v=0,h=P}function B(O,P,z){m=!0,g=O,b=P,_=O,v=P+1,h=z}function I(O,P){if(!m){R(O,P);return}h+=P,_=O+1,v=0}function $(O,P,z,W,U,G){if(!P)return;const Z=Ux(e,O,z,U),ee=jx(e,O,z,U,W);y=z+1,w=h-G+Z,x=h-G+ee,A=O}function D(O,P){const z=i[O],W=r[O]??null;let U=W===null?-1:Sg(W,0,P+1),G=-1,Z=0,ee=P;for(;eed){if(W!==null&&G>P){T(O,G,Z),ee=G,U=Sg(W,U,ee+1),G=-1,Z=0;continue}T(),B(O,ee,Q)}else h=xe,_=O,v=ee+1}const X=ee+1;W!==null&&W[U]===X&&(G=X,Z=h,U++),ee++}m&&_===O&&v===z.length&&(_=O+1,v=0)}function H(O){f++,n?.(0,O.startSegmentIndex,0,O.consumedEndSegmentIndex,0),L()}for(let O=0;O=P.endSegmentIndex));){const W=s[z],U=RN(W),G=OSe(e,m,z),Z=W==="tab"?NSe(h+G,e.tabStopAdvance):o[z],ee=G+Z,Q=RSe(e,W,z,G,Z);if(W==="soft-hyphen"){m&&(_=z+1,v=0,y=z+1,w=h+l,x=h+l,A=W),z++;continue}if(!m){Q>d&&i[z]!==null?D(z,0):R(z,Z),$(W,U,z,Z,G,ee),z++;continue}if(h+Q>d){const oe=h+Ux(e,W,z,G),xe=h+jx(e,W,z,G,Z);if(A==="soft-hyphen"&&c.preferEarlySoftHyphenBreak&&w<=d){T(y,0,x);continue}if(U&&oe<=d){I(z,ee),T(z+1,0,xe),z++;continue}if(y>=0&&w<=d){if(_>y||_===y&&v>0){T();continue}const pe=y;T(pe,0,x),z=pe;continue}if(Q>d&&i[z]!==null){T(),D(z,0),z++;continue}T();continue}I(z,ee),$(W,U,z,Z,G,ee),z++}if(m){const W=y===P.consumedEndSegmentIndex?x:h;T(P.consumedEndSegmentIndex,0,W)}}return f}let k4=null;function q5(){return k4===null&&(k4=new Intl.Segmenter(void 0,{granularity:"grapheme"})),k4}function USe(e){return{widths:[],lineEndFitAdvances:[],lineEndPaintAdvances:[],kinds:[],simpleLineWalkFastPath:!0,segLevels:null,breakableFitAdvances:[],breakablePreferredBreaks:[],letterSpacing:0,spacingGraphemeCounts:[],discretionaryHyphenWidth:0,tabStopAdvance:0,chunks:[],segments:[]}}function jSe(e,t){const n=[];let o=[],s=0,i=!1,r=!1,l=!1;function a(){o.length!==0&&(n.push({text:o.length===1?o[0]:o.join(""),start:s}),o=[],i=!1,r=!1,l=!1)}function c(d,f,h){o=[d],s=f,i=h,r=fy(d),l=O2.has(d)}function u(d,f){o.push(d),i=i||f;const h=fy(d);d.length===1&&Cu.has(d)?r=r||h:r=h,l=!1}for(const d of q5().segment(e)){const f=d.segment,h=Cl(f);if(o.length===0){c(f,d.index,h);continue}if(l||z5.has(f)||Cu.has(f)||t.carryCJKAfterClosingQuote&&h&&r){u(f,h);continue}if(!i&&!h){u(f,h);continue}a(),c(f,d.index,h)}return a(),n}function VSe(e,t,n){if(t.length<=1)return t;const o=[];let s=-1,i=!1;function r(a,c){const u=t[a].start,d=c=0&&!$N(t[a-1].text,n)&&l(a),s<0&&(s=a),i=i||Cl(c.text)}return l(t.length),o}function Vx(e,t){if(t==="zero-width-break"||t==="soft-hyphen"||t==="hard-break")return 0;if(t==="tab")return 1;let n=0;const o=q5();for(const s of o.segment(e))n++;return n}function qSe(e){return e==="-"||e==="֊"||e==="‐"||e==="‒"||e==="–"||e==="—"}function KSe(e){if(!/[-\u058A\u2010\u2012\u2013\u2014]/u.test(e))return null;const t=[];let n=0;for(const o of q5().segment(e))n++,qSe(o.segment)&&t.push(n);return t.length===0?null:t}function ZSe(e,t,n){return t>1?e+(t-1)*n:e}function GSe(e,t,n,o,s){const i=P2(),{cache:r,emojiCorrection:l}=LSe(t,ASe(e.normalized)),a=Qc("-",Pa("-",r),l)+(s===0?0:s*2),u=Qc(" ",Pa(" ",r),l)*8,d=s!==0;if(e.len===0)return USe();const f=[],h=[],m=[],g=[];let b=e.chunks.length<=1&&!d;const _=n?[]:null,v=[],y=[],w=[],x=n?[]:null,A=Array.from({length:e.len});function L(B,I,$,D,H,O,P,z,W){H!=="text"&&H!=="space"&&H!=="zero-width-break"&&(b=!1),f.push(I),h.push($),m.push(D),g.push(H),_?.push(O),v.push(P),y.push(z),d&&w.push(W),x!==null&&x.push(B)}function S(B,I,$,D,H){const O=Pa(B,r),P=d?Vx(B,I):0,z=ZSe(Qc(B,O,l),P,s),W=I==="space"||I==="preserved-space"||I==="zero-width-break"?0:z,U=W===0?0:W+(P>0?s:0),G=I==="space"||I==="zero-width-break"?0:z;if(H&&D&&B.length>1){let Z="sum-graphemes";s!==0?Z="segment-prefixes":xg(B)?Z="pair-context":i.preferPrefixWidthsForBreakableRuns&&(Z="segment-prefixes");const ee=ISe(B,O,r,l,Z),Q=ee===null||o==="keep-all"?null:KSe(B);L(B,z,U,G,I,$,ee,Q,P);return}L(B,z,U,G,I,$,null,null,P)}for(let B=0;B{n>t&&(t=n)}),t}const eAe={key:0,class:"slash-menu",role:"listbox"},tAe=["aria-selected","onMouseenter","onMousedown"],nAe={class:"slash-name"},oAe={class:"slash-desc"},sAe=et({__name:"SlashMenu",props:{items:{},activeIndex:{}},emits:["select","hover"],setup(e,{emit:t}){const{t:n}=$t(),o=e,s=t,i=K([]);return Je(()=>o.activeIndex,r=>{i.value[r]?.scrollIntoView({block:"nearest"})}),(r,l)=>e.items.length>0?(k(),M("div",eAe,[(k(!0),M(De,null,vt(e.items,(a,c)=>(k(),M("div",{ref_for:!0,ref:u=>{u&&(i.value[c]=u)},key:`${a.name}-${c}`,class:Fe(["slash-item",{active:c===o.activeIndex}]),role:"option","aria-selected":c===o.activeIndex,onMouseenter:u=>s("hover",c),onMousedown:Ot(u=>s("select",a),["prevent"])},[C("span",nAe,N(a.name),1),C("span",oAe,N(a.isSkill?a.desc:p(n)(a.desc)),1)],42,tAe))),128))])):te("",!0)}}),iAe=mt(sAe,[["__scopeId","data-v-fc5ec690"]]),rAe={class:"mention-menu",role:"listbox"},lAe={key:0,class:"mention-state dim"},aAe={key:1,class:"mention-state dim"},cAe=["aria-selected","onMouseenter","onMousedown"],uAe=["innerHTML"],dAe={class:"mention-name"},fAe={class:"mention-path"},pAe=et({__name:"MentionMenu",props:{items:{},activeIndex:{},loading:{type:Boolean}},emits:["select","hover"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=dd("folder","sm"),r=dd("code","sm"),l=dd("file-text","sm"),a=dd("image","sm"),c=dd("file","sm"),u=new Set(["ts","tsx","js","jsx","mjs","cjs","vue","json","py","go","rs","java","kt","c","h","cpp","cc","hpp","cs","rb","php","swift","sh","bash","zsh","css","scss","less","html","htm","xml","sql","yaml","yml","toml","lua","dart","scala","clj","ex","exs"]),d=new Set(["md","markdown","mdx","txt","rst","adoc","pdf","doc","docx"]),f=new Set(["png","jpg","jpeg","gif","svg","webp","bmp","ico","avif"]);function h(m){const g=m.path;if(g.endsWith("/"))return i;const b=m.name||g.split("/").pop()||g,_=b.lastIndexOf("."),v=_>0?b.slice(_+1).toLowerCase():"";return v?u.has(v)?r:d.has(v)?l:f.has(v)?a:c:c}return(m,g)=>(k(),M("div",rAe,[n.loading?(k(),M("div",lAe,N(p(s)("mention.searching")),1)):n.items.length===0?(k(),M("div",aAe,N(p(s)("mention.noMatch")),1)):(k(!0),M(De,{key:2},vt(n.items,(b,_)=>(k(),M("div",{key:b.path,class:Fe(["mention-item",{active:_===n.activeIndex}]),role:"option","aria-selected":_===n.activeIndex,onMouseenter:v=>o("hover",_),onMousedown:Ot(v=>o("select",b),["prevent"])},[C("span",{class:"mention-icon",innerHTML:h(b),"aria-hidden":"true"},null,8,uAe),C("span",dAe,N(b.name),1),C("span",fAe,N(b.path),1)],42,cAe))),128))]))}}),hAe=mt(pAe,[["__scopeId","data-v-d089b60a"]]),DN=[{name:"/new",desc:"commands.new.desc"},{name:"/clear",desc:"commands.clear.desc"},{name:"/login",desc:"commands.login.desc"},{name:"/plan",desc:"commands.plan.desc"},{name:"/swarm",desc:"commands.swarm.desc",acceptsInput:!0},{name:"/goal",desc:"commands.goal.desc",acceptsInput:!0},{name:"/btw",desc:"commands.btw.desc",acceptsInput:!0},{name:"/auto",desc:"commands.auto.desc"},{name:"/yolo",desc:"commands.yolo.desc"},{name:"/thinking",desc:"commands.thinking.desc"},{name:"/compact",desc:"commands.compact.desc",acceptsInput:!0},{name:"/undo",desc:"commands.undo.desc"},{name:"/fork",desc:"commands.fork.desc"},{name:"/export",desc:"commands.export.desc"},{name:"/status",desc:"commands.status.desc"}];function mAe(e){if(!e.startsWith("/"))return null;const t=e.indexOf(" ");return t===-1?{cmd:e,arg:""}:{cmd:e.slice(0,t),arg:e.slice(t+1)}}const Ag="skill:";function gAe(e){return e.startsWith(Ag)?e.slice(Ag.length):e}function BN(e=[]){const t=e.map(n=>({name:n.source==="builtin"?`/${n.name}`:`/${Ag}${n.name}`,desc:n.description,isSkill:!0,acceptsInput:!0}));return[...DN,...t]}function vAe(e,t=DN){const n=e.toLowerCase().trim().replace(/^\//,"");return n===""?t:t.map((o,s)=>{const i=o.name.toLowerCase().replace(/^\//,"");let r=0;return i===n?r=3:i.startsWith(n)?r=2:i.includes(n)&&(r=1),{item:o,index:s,score:r}}).filter(({score:o})=>o>0).sort((o,s)=>o.score!==s.score?s.score-o.score:o.index-s.index).map(({item:o})=>o)}const Mg=100;function yAe(e){const t=pf(ln.inputHistory);if(Array.isArray(t)){const n=t.filter(i=>typeof i=="string"&&i.length>0);if(!e||n.length===0)return{};const o=n.length>Mg?n.slice(-Mg):n,s={[e]:o};return Su(ln.inputHistory,s),s}return t&&typeof t=="object"?t:{}}function kAe(e){const{text:t,textareaRef:n,autosize:o,sessionId:s}=e,i=K(yAe(s())),r=F(()=>i.value[s()??""]??[]);let l=-1,a="";function c(_){const v=s();if(l=-1,!v)return;const y=_.trim();if(!y)return;const w=i.value[v]??[];if(w.at(-1)===y)return;const x=[...w,y],A=x.length>Mg?x.slice(-Mg):x;i.value={...i.value,[v]:A},Su(ln.inputHistory,i.value)}function u(){const _=n.value;return _?(_.selectionStart??0)===0:!1}function d(_){t.value=_,bt(()=>{const v=n.value;if(!v)return;o();const y=_.length;v.setSelectionRange(y,y)})}function f(){const _=r.value;if(_.length!==0){if(l===-1)a=t.value,l=_.length-1;else if(l>0)l-=1;else return;d(_[l])}}function h(){if(l===-1)return;const _=r.value;l<_.length-1?(l+=1,d(_[l])):(l=-1,d(a))}function m(){l=-1}function g(){return l!==-1}function b(){return r.value.length>0}return Je(s,()=>{l=-1}),{push:c,caretAtTextStart:u,recallOlder:f,recallNewer:h,resetBrowsing:m,isBrowsing:g,hasHistory:b}}function bAe(e){const{text:t,textareaRef:n,autosize:o,skills:s,emitCommand:i,historyPush:r,clearDraft:l}=e,a=K(!1),c=K([]),u=K(0);function d(){const h=t.value;h.startsWith("/")&&!h.includes(" ")?(c.value=vAe(h,BN(s())),u.value=0,a.value=c.value.length>0):a.value=!1}function f(h){if(a.value=!1,h.acceptsInput){t.value=`${h.name} `,bt(()=>{const m=n.value;if(!m)return;const g=t.value.length;m.setSelectionRange(g,g),m.focus(),o()});return}t.value="",l?.(),r(h.name),i(h.name)}return{open:a,items:c,active:u,update:d,select:f}}function CAe(e){const{text:t,textareaRef:n,autosize:o,searchFiles:s}=e,i=K(!1),r=K([]),l=K(0),a=K(!1);let c=null;function u(){const h=t.value,m=n.value?.selectionStart??h.length;let g=m-1;for(;g>=0&&!/\s/.test(h[g]);)g--;g++;const b=h.slice(g,m);return b.startsWith("@")?{token:b.slice(1),start:g,end:m}:null}function d(){const h=u(),m=s();if(c!==null&&clearTimeout(c),!h||!m||h.token.length===0){i.value=!1,a.value=!1;return}const g=h.token;c=setTimeout(async()=>{a.value=!0,i.value=!0,l.value=0;const b=()=>{const _=u();return _!==null&&_.token===g&&i.value};try{const _=await m(g);b()&&(r.value=_)}catch{b()&&(r.value=[])}finally{b()&&(a.value=!1)}},200)}function f(h){const m=u();if(!m)return;const g=t.value;t.value=g.slice(0,m.start)+h.path+g.slice(m.end),i.value=!1,bt(()=>{const b=n.value;if(!b)return;const _=m.start+h.path.length;b.setSelectionRange(_,_),b.focus(),o()})}return{open:i,items:r,active:l,loading:a,update:d,select:f}}function wAe(e){const{sessionId:t}=e;function n(c){return mi(db(c))??""}function o(c,u){const d=db(c);u?Ds(d,u):Qi(d)}const s=K(n(t())),i=K(null);function r(){const c=i.value;c&&(c.style.height="auto",c.style.height=`${c.scrollHeight}px`)}Je(s,c=>{bt(r),o(t(),c)}),Je(t,(c,u)=>{c!==u&&(o(u,s.value),s.value=n(c),bt(r))});function l(c){s.value=c,bt(()=>{const u=i.value;if(!u)return;u.focus();const d=c.length;u.setSelectionRange(d,d),r()})}function a(){o(t(),"")}return{text:s,textareaRef:i,autosize:r,loadForEdit:l,clearDraft:a}}function _Ae(e){const{uploadImage:t,sessionId:n}=e,o=K({}),s=F(()=>o.value[n()??""]??[]),i=K(null),r=K(null),l=K(!1);let a=0;function c(){return`att_${++a}`}function u(z,W){o.value={...o.value,[z]:W}}function d(z){if(z.previewUrl!==void 0)try{URL.revokeObjectURL(z.previewUrl)}catch{}}function f(z){return z.startsWith("image/")?"image":z.startsWith("video/")?"video":"file"}async function h(z){const W=t();if(!W)return;const U=n()??"";if(z.length!==0)for(const G of z){const Z=f(G.type),ee=c(),Q=Z==="file"?void 0:URL.createObjectURL(G),X={localId:ee,name:G.name,kind:Z,previewUrl:Q,mediaType:G.type||"application/octet-stream",size:G.size,uploading:!0};u(U,[...o.value[U]??[],X]),W(G,G.name).then(oe=>{const xe=o.value[U]??[];u(U,xe.map(pe=>pe.localId===ee?{...pe,uploading:!1,fileId:oe?.fileId,mediaType:oe?.mediaType??pe.mediaType,error:oe===null}:pe))}).catch(()=>{const oe=o.value[U]??[];u(U,oe.map(xe=>xe.localId===ee?{...xe,uploading:!1,error:!0}:xe))})}}function m(z){const W=n()??"",U=o.value[W]??[],G=U.find(Z=>Z.localId===z);i.value?.localId===z&&(i.value=null),G&&d(G),u(W,U.filter(Z=>Z.localId!==z))}function g(z){i.value=z}function b(){i.value=null}function _(){r.value?.click()}function v(z){const W=z.target,U=Array.from(W.files??[]);h(U),W.value=""}function y(z){if(!t())return;const W=z.clipboardData;if(!W)return;const U=[],G=new Set,Z=(ee,Q)=>{const X=`${ee.size}:${ee.type}:${Q}`;if(G.has(X))return;G.add(X);const oe=ee.type.split("/")[1]??"png",xe=Q.includes(".")?Q:`paste-${Date.now()}.${oe}`;U.push(ee instanceof File?ee:new File([ee],xe,{type:ee.type}))};for(const ee of Array.from(W.items))if(ee.kind==="file"){const Q=ee.getAsFile();Q&&Z(Q,Q.name||`paste-${Date.now()}.${ee.type.split("/")[1]??"png"}`)}for(const ee of Array.from(W.files))Z(ee,ee.name);U.length!==0&&(z.preventDefault(),h(U))}let w=0;function x(z){!t()||!Array.from(z.dataTransfer?.items??[]).some(U=>U.kind==="file")||(z.preventDefault(),z.stopPropagation(),l.value=!0)}function A(){l.value=!1}function L(z){if(w=0,l.value=!1,!t())return;z.preventDefault(),z.stopPropagation();const W=Array.from(z.dataTransfer?.files??[]);h(W)}function S(z){return Array.from(z.dataTransfer?.items??[]).some(W=>W.kind==="file")}function T(z){!t()||!S(z)||(z.preventDefault(),w+=1,l.value=!0)}function R(z){!t()||!S(z)||z.preventDefault()}function B(z){!t()||!S(z)||(w=Math.max(0,w-1),w===0&&(l.value=!1))}function I(z){if(w=0,l.value=!1,!t())return;z.preventDefault();const W=Array.from(z.dataTransfer?.files??[]);h(W)}function $(){const z=n()??"";for(const W of o.value[z]??[])d(W);u(z,[])}function D(){i.value=null,$()}function H(z,W,U){const G=o.value[z]??[];G.some(Z=>Z.localId===W)&&u(z,G.map(Z=>Z.localId===W?{...Z,...U}:Z))}function O(z){return fetch(z).then(W=>{if(!W.ok)throw new Error(`fetch failed: ${W.status}`);return W.blob()})}function P(z){const W=n()??"";for(const U of o.value[W]??[])d(U);u(W,[]);for(const U of z){const G=c(),Z=/^data:/i.test(U.url),ee=/^blob:/i.test(U.url),Q=U.name??U.kind;if(U.fileId){const X={localId:G,name:Q,kind:U.kind,previewUrl:U.kind==="file"?void 0:U.url,uploading:!1,fileId:U.fileId};u(W,[...o.value[W]??[],X]),U.kind==="image"&&!Z&&!ee&&xt().getFileBlob(U.fileId).then(oe=>{const xe=URL.createObjectURL(oe);if(!(o.value[W]??[]).some(ve=>ve.localId===G)){URL.revokeObjectURL(xe);return}H(W,G,{previewUrl:xe})}).catch(()=>{})}else{if(!U.url)continue;const X=t();if(!X)continue;const oe={localId:G,name:Q,kind:U.kind,previewUrl:U.url,uploading:!0};u(W,[...o.value[W]??[],oe]),O(U.url).then(xe=>{const pe=Q.includes(".")?Q:`${Q}.${xe.type.split("/")[1]??"bin"}`;return X(xe,pe)}).then(xe=>{if(xe===null){const pe=o.value[W]??[];u(W,pe.filter(ve=>ve.localId!==G));return}H(W,G,{uploading:!1,fileId:xe.fileId})}).catch(()=>{const xe=o.value[W]??[];u(W,xe.filter(pe=>pe.localId!==G))})}}}return Je(n,()=>{i.value=null}),cn(()=>{document.addEventListener("paste",y),document.addEventListener("dragenter",T),document.addEventListener("dragover",R),document.addEventListener("dragleave",B),document.addEventListener("drop",I)}),kn(()=>{document.removeEventListener("paste",y),document.removeEventListener("dragenter",T),document.removeEventListener("dragover",R),document.removeEventListener("dragleave",B),document.removeEventListener("drop",I);for(const z of Object.values(o.value))for(const W of z)d(W);i.value=null}),{attachments:s,previewAttachment:i,fileInputRef:r,isDragOver:l,removeAttachment:m,openAttachmentPreview:g,closeAttachmentPreview:b,openFilePicker:_,handleFileInputChange:v,handleDragOver:x,handleDragLeave:A,handleDrop:L,clearAfterSubmit:$,clearAttachments:D,loadAttachments:P}}const xAe={class:"composer-card"},SAe={key:0,class:"att-strip"},AAe={key:1,class:"att-row"},MAe={key:0,class:"att-more"},TAe={class:"cin-wrap"},EAe={class:"input-row"},IAe=["placeholder","disabled"],LAe=["aria-label"],$Ae={class:"toolbar-left"},NAe=["aria-label","onKeydown"],OAe={class:"perm-pill-label"},FAe=["onClick"],RAe={class:"pd-info"},PAe={class:"pd-desc"},DAe={class:"pd-check"},BAe={class:"mode-label"},HAe={key:0,class:"mode-tag"},zAe={key:1,class:"mode-tag"},WAe={key:2,class:"mode-tag"},UAe={class:"mode-row-icon"},jAe={class:"mode-row-info"},VAe={class:"mode-row-name"},qAe={class:"mode-row-desc"},KAe={class:"mode-row-icon"},ZAe={class:"mode-row-info"},GAe={class:"mode-row-name"},YAe={class:"mode-row-desc"},XAe={class:"mode-row-icon"},JAe={class:"mode-row-info"},QAe={class:"mode-row-name"},eMe={class:"mode-row-desc"},tMe={key:0,class:"mode-row-actions"},nMe={class:"toolbar-right"},oMe=["aria-label"],sMe=["aria-expanded"],iMe={class:"mp-name"},rMe={key:0,class:"think-suffix"},lMe={class:"mp-name"},aMe={class:"mp-name"},cMe=["aria-label"],uMe=["aria-label","disabled"],dMe={key:0,class:"md-section"},fMe=["onClick"],pMe={class:"md-check"},hMe={class:"md-name"},mMe={class:"md-provider"},gMe={key:1,class:"md-divider"},vMe={key:2,class:"md-section"},yMe=["onClick"],kMe={class:"md-check"},bMe={class:"md-name"},CMe={key:3,class:"md-divider"},wMe={class:"md-thinking"},_Me={class:"md-name"},xMe={key:0,class:"md-note"},SMe={key:2,class:"md-note"},AMe={class:"md-cache-note"},MMe={class:"md-check md-more-icon"},TMe={class:"md-name"},EMe={key:1,class:"composer-footer"},IMe={class:"drop-card"},qx=36,LMe=et({__name:"Composer",props:{running:{type:Boolean,default:!1},working:{type:Boolean,default:!1},starting:{type:Boolean,default:!1},sessionId:{},queued:{default:()=>[]},searchFiles:{type:Function,default:void 0},uploadImage:{type:Function,default:void 0},status:{},thinking:{},planMode:{type:Boolean},swarmMode:{type:Boolean},goalMode:{type:Boolean},goal:{},activationBadges:{},models:{default:()=>[]},authReady:{type:Boolean},managedSignedIn:{type:Boolean},managedMembership:{},starredIds:{default:()=>[]},skills:{default:()=>[]},hideContext:{type:Boolean}},emits:["submit","steer","command","interrupt","setPermission","setThinking","togglePlan","toggleSwarm","toggleGoal","openBtw","createGoal","controlGoal","focusGoal","focusSwarm","compact","pickModel","selectModel","login"],setup(e,{expose:t,emit:n}){const o=e,s=F(()=>o.starting?r("composer.starting"):o.running?r("composer.placeholderRunning"):o.goalMode?r("status.goalPlaceholder"):r("composer.placeholder")),i=n,{t:r,locale:l}=$t(),{text:a,textareaRef:c,autosize:u,loadForEdit:d,clearDraft:f}=wAe({sessionId:()=>o.sessionId}),h=K(!1);function m(){h.value=!h.value,bt(()=>{u(),v(),c.value?.focus()})}function g(){h.value&&(h.value=!1,bt(u))}function b(Se){if(typeof getComputedStyle>"u")return qx;const Oe=Number.parseFloat(getComputedStyle(Se).minHeight);return Number.isFinite(Oe)&&Oe>0?Oe:qx}const _=K(!1);function v(){const Se=c.value;_.value=!!Se&&Se.scrollHeight>b(Se)}Je(a,()=>{bt(v)}),Je(()=>o.sessionId,()=>{h.value=!1});const y=kAe({text:a,textareaRef:c,autosize:u,sessionId:()=>o.sessionId}),{open:w,items:x,active:A,update:L,select:S}=bAe({text:a,textareaRef:c,autosize:u,skills:()=>o.skills,emitCommand:Se=>i("command",Se),historyPush:Se=>y.push(Se),clearDraft:f}),{open:T,items:R,active:B,loading:I,update:$,select:D}=CAe({text:a,textareaRef:c,autosize:u,searchFiles:()=>o.searchFiles});function H(){y.resetBrowsing(),L(),$()}const{attachments:O,previewAttachment:P,fileInputRef:z,isDragOver:W,removeAttachment:U,openAttachmentPreview:G,closeAttachmentPreview:Z,openFilePicker:ee,handleFileInputChange:Q,handleDragOver:X,handleDragLeave:oe,handleDrop:xe,clearAfterSubmit:pe,clearAttachments:ve,loadAttachments:ge}=_Ae({uploadImage:()=>o.uploadImage,sessionId:()=>o.sessionId}),ne=Se=>Se.kind==="image"||Se.kind==="video",ae=F(()=>O.value.filter(ne)),j=F(()=>O.value.filter(Se=>!ne(Se))),Y=K(null),fe=K(null),ue=K(!1);function de(){const Se=Y.value,Oe=fe.value;ue.value=Se!==null&&Oe!==null&&Oe.scrollHeight>Se.clientHeight+1}let J=null;Je(Y,Se=>{if(J?.disconnect(),J=null,Se){const Oe=new ResizeObserver(de);Oe.observe(Se),J=Oe}de()},{immediate:!0}),Je(O,()=>void bt(de),{deep:!0}),kn(()=>J?.disconnect());const se=K(null);Je(()=>[ae.value.length,j.value.length],([Se,Oe],[ct,kt])=>{Se<=ct&&Oe<=kt||bt(()=>{const Xt=Y.value;Xt&&(Se>ct&&se.value?Xt.scrollTop=se.value.offsetHeight-Xt.clientHeight:Xt.scrollTop=Xt.scrollHeight)})}),cn(()=>{a.value&&bt(()=>{u(),v()})}),kn(()=>{document.removeEventListener("mousedown",As),Pt()});function ce(){c.value?.focus({preventScroll:!0})}function he(Se){ge(Se)}function Ie(Se){return{fileId:Se.fileId,kind:Se.kind,name:Se.name,mediaType:Se.mediaType,size:Se.size}}const Ge=K(null);function we(Se,Oe){if(Se.kind==="file"){Se.fileId!==void 0&&LN(Se.fileId,Se.name,Se.mediaType);return}Ge.value=Oe??null,G(Se)}const Te=F(()=>{const Se=P.value;return!Se||!Se.previewUrl?null:{kind:Se.kind==="video"?"video":"image",url:Se.previewUrl,path:Se.name,fileId:Se.previewUrl.startsWith("blob:")?void 0:Se.fileId}}),st=F(()=>!O.value.some(Se=>Se.uploading)&&(a.value.trim()!==""||O.value.some(Se=>!Se.error&&Se.fileId)));function Ne(){const Se=a.value.trim();if(O.value.some(kt=>kt.uploading))return;const Oe=O.value.filter(kt=>!kt.uploading&&!kt.error&&kt.fileId);if(!Se&&Oe.length===0)return;if(y.push(Se),Se){const kt=mAe(Se),Xt=kt?BN(o.skills).some(zn=>zn.name===kt.cmd||zn.name===`/${Ag}${kt.cmd.slice(1)}`):!1;if(kt&&Xt){a.value="",f(),w.value=!1,g(),i("command",kt.arg?`${kt.cmd} ${kt.arg}`:kt.cmd);return}}const ct={text:Se,attachments:Oe.map(kt=>Ie(kt))};P.value=null,Ge.value=null,pe(),a.value="",f(),w.value=!1,T.value=!1,g(),i("submit",ct)}function Re(){if(!o.running||O.value.some(kt=>kt.uploading))return;const Se=a.value.trim(),Oe=O.value.filter(kt=>!kt.uploading&&!kt.error&&kt.fileId);if(!Se&&Oe.length===0&&o.queued.length===0)return;const ct={text:Se,attachments:Oe.map(kt=>Ie(kt))};pe(),y.push(Se),a.value="",f(),w.value=!1,T.value=!1,g(),i("steer",ct)}let Ze=!1,gt=null;function Pt(){gt!==null&&(clearTimeout(gt),gt=null)}function Tt(){Pt(),Ze=!0}function He(){Pt(),gt=setTimeout(()=>{gt=null,Ze=!1},0)}function tt(Se){return Ze||Se.isComposing||Se.keyCode===229}function qe(Se){if(!tt(Se)){if(Se.key==="Escape"){if(en.value){Se.preventDefault(),ho();return}if(Vt.value){Se.preventDefault(),yn();return}}if(w.value){if(Se.key==="ArrowDown"){Se.preventDefault(),A.value=(A.value+1)%x.value.length;return}if(Se.key==="ArrowUp"){Se.preventDefault(),A.value=(A.value-1+x.value.length)%x.value.length;return}if(Se.key==="Enter"||Se.key==="Tab"){Se.preventDefault();const Oe=x.value[A.value];Oe&&S(Oe);return}if(Se.key==="Escape"){Se.preventDefault(),w.value=!1;return}}if(T.value&&!I.value){if(Se.key==="Escape"){Se.preventDefault(),T.value=!1;return}if(R.value.length>0){if(Se.key==="ArrowDown"){Se.preventDefault(),B.value=(B.value+1)%R.value.length;return}if(Se.key==="ArrowUp"){Se.preventDefault(),B.value=(B.value-1+R.value.length)%R.value.length;return}if(Se.key==="Enter"||Se.key==="Tab"){Se.preventDefault();const Oe=R.value[B.value];Oe&&D(Oe);return}}}if(Se.key==="s"&&(Se.ctrlKey||Se.metaKey)&&!Se.shiftKey&&!Se.altKey){o.running&&(Se.preventDefault(),Re());return}if(!h.value&&!w.value&&!T.value&&!Se.shiftKey&&!Se.altKey&&!Se.metaKey&&!Se.ctrlKey){const Oe=y.isBrowsing();if(Se.key==="ArrowUp"&&y.hasHistory()&&(Oe||y.caretAtTextStart())){Se.preventDefault(),y.recallOlder();return}if(Se.key==="ArrowDown"&&Oe){Se.preventDefault(),y.recallNewer();return}}if(Se.key==="Enter"&&!Se.shiftKey){if(h.value&&!(Se.metaKey||Se.ctrlKey))return;Se.preventDefault(),Ne()}}}const Et=F(()=>r("composer.send")),ft=F(()=>!!o.uploadImage),en=K(!1),Vt=K(!1),qn=K(!1),nn=K(null),rn=K(null),Sn=K(null),Gn=K(""),bo=F(()=>{const Se={};return Gn.value&&(Se.right=Gn.value),Se}),po=F(()=>en.value||Vt.value||qn.value||w.value||T.value);t({loadForEdit:d,loadAttachmentsForEdit:he,focus:ce,anyPopupOpen:po,isEmpty:()=>a.value.trim().length===0&&O.value.length===0});function Io(){en.value=!en.value,en.value?(_o(),Vt.value=!1,Js(),document.addEventListener("click",qo,!0)):document.removeEventListener("click",qo,!0)}function ho(){en.value=!1,Vt.value||document.removeEventListener("click",qo,!0)}function Vo(){Vt.value=!Vt.value,Vt.value?(yi(),en.value=!1,Js(),document.addEventListener("click",qo,!0)):document.removeEventListener("click",qo,!0)}function yn(){Vt.value=!1,en.value||document.removeEventListener("click",qo,!0)}function qo(Se){nn.value&&!nn.value.contains(Se.target)&&(ho(),yn())}kn(()=>{document.removeEventListener("click",qo,!0)});const Co=F(()=>{const Se=o.status?.ctxMax??0;return Se<=0?0:Math.min(100,Math.max(0,Math.ceil((o.status?.ctxUsed??0)/Se*100)))}),At=F(()=>{const Se=bl(o.status?.ctxUsed??0),Oe=bl(o.status?.ctxMax??0);return r("status.ctxTooltip",{used:Se,max:Oe,pct:Co.value})}),it=F(()=>Co.value>=80),ut=F(()=>o.models?.find(Se=>Se.id===o.status?.modelId)),Zt=F(()=>_2(ut.value)),vn=F(()=>jp(ut.value)),eo=F(()=>pg(ut.value,o.thinking)),uo=F(()=>vn.value.includes(eo.value)?eo.value:""),Lo=F(()=>G2e(eo.value)),Ho=F(()=>Zt.value==="unsupported"||vn.value.length<=1),Xs=F(()=>{if(!Lo.value)return"";const Se=(ut.value?.supportEfforts?.length??0)>0,Oe=eo.value;return Se&&Oe!=="on"?r("composer.thinkingSuffixEffort",{level:Oe}):r("composer.thinkingSuffix")});function io(Se){Ho.value||i("setThinking",w5(ut.value,Se))}function Yn(Se){return Se==="on"?r("status.thinkingOn"):Se==="off"?r("status.thinkingOff"):J3(Se)}const ro=F(()=>vn.value.map(Se=>({value:Se,label:Yn(Se)}))),$o=F(()=>o.planMode===!0),as=F(()=>o.swarmMode===!0),mo=F(()=>o.goal?.status??o.activationBadges?.goal?.status??null),Ko=F(()=>mo.value!==null&&mo.value!=="complete"),Hs=F(()=>Ko.value||o.goalMode===!0),bn=F(()=>mo.value==="active"),Fi=F(()=>mo.value==="paused"||mo.value==="blocked"),Hn=K(null),nr=K(null),Ri=K({}),or=F(()=>$o.value||as.value||Hs.value);function Js(){qn.value=!1,document.removeEventListener("mousedown",As)}function As(Se){const Oe=Se.target;Hn.value?.contains(Oe)||nr.value?.contains(Oe)||Js()}function Zo(){if(qn.value){Js();return}ho(),yn();const Se=Hn.value?.getBoundingClientRect();Se&&(Ri.value={left:`${Math.round(Se.left)}px`,bottom:`${Math.round(window.innerHeight-Se.top+8)}px`}),qn.value=!0,setTimeout(()=>document.addEventListener("mousedown",As),0)}const wo=[{mode:"manual",icon:"hand",color:"var(--color-text)",labelKey:"status.permissionManual",descKey:"status.permissionManualDesc"},{mode:"yolo",icon:"shield-question",color:"var(--color-warning)",labelKey:"status.permissionYolo",descKey:"status.permissionYoloDesc"},{mode:"auto",icon:"full-access",color:"var(--color-danger)",labelKey:"status.permissionAuto",descKey:"status.permissionAutoDesc"}],an=["status.planDesc","status.swarmDesc","status.goalDesc"],gi=K(null),Ms=K(""),Pi=K(""),sr=K("");function Sr(Se){const Oe={};return Se&&(Oe["--composer-menu-desc-width"]=Se),Oe}const vi=F(()=>({...Sr(Ms.value),...Pi.value?{left:Pi.value}:{}})),zo=F(()=>Sr(sr.value)),No=F(()=>({...Ri.value,...zo.value}));function yi(){const Se=rn.value,Oe=nn.value;if(!Se||!Oe){Pi.value="";return}Pi.value=`${Math.round(Se.getBoundingClientRect().left-Oe.getBoundingClientRect().left)}px`}function _o(){const Se=Sn.value,Oe=nn.value;if(!Se||!Oe){Gn.value="";return}Gn.value=`${Math.round(Oe.getBoundingClientRect().right-Se.getBoundingClientRect().right)}px`}let Wo=null;function cs(Se){const Oe=Number.parseFloat(Se);return Number.isFinite(Oe)?Oe:0}function vs(Se){return`${Se.fontStyle||"normal"} ${Se.fontWeight||"400"} ${Se.fontSize} ${Se.fontFamily}`}function ir(Se){return Se.letterSpacing==="normal"?0:cs(Se.letterSpacing)}function dt(Se,Oe){if(!Se)return 0;const ct=JSe(Se,vs(Oe),{letterSpacing:ir(Oe)});return QSe(ct)}function Le(){const Se=gi.value?.querySelector(".pd-desc");if(!Se)return;const Oe=getComputedStyle(Se),ct=Math.max(0,...wo.map(Xt=>dt(r(Xt.descKey),Oe))),kt=Math.max(0,...an.map(Xt=>dt(r(Xt),Oe)));Ms.value=ct>0?`${Math.ceil(ct)}px`:"",sr.value=kt>0?`${Math.ceil(kt)}px`:""}function Ke(){typeof window>"u"||(Wo!==null&&window.cancelAnimationFrame(Wo),bt(()=>{Wo=window.requestAnimationFrame(()=>{Wo=null,Le()})}))}Je(l,Ke,{immediate:!0}),cn(()=>{Ke(),document.fonts?.ready.then(Ke)}),kn(()=>{Wo!==null&&(window.cancelAnimationFrame(Wo),Wo=null)});function _n(Se){i("setPermission",Se),yn()}const ys=F(()=>wo.find(Se=>Se.mode===o.status?.permission)),rr=F(()=>ys.value?r(ys.value.labelKey):""),Ar=F(()=>ys.value?.icon??"hand"),Di=F(()=>ut.value?.provider??""),Mr=F(()=>!Di.value||!o.models?.length?[]:o.models.filter(Se=>Se.provider===Di.value)),Go=F(()=>(o.models?.length??0)>0),lr=F(()=>o.authReady===!1&&!Go.value),Bi=F(()=>lr.value&&!(o.managedSignedIn??!1)),Qs=F(()=>lr.value&&(o.managedSignedIn??!1)&&o.managedMembership==="free"),re=F(()=>new Set(o.starredIds??[]));function Ce(Se){return re.value.has(Se)}const Ae=F(()=>o.models?.length?o.models.filter(Se=>Ce(Se.id)&&Se.provider!==Di.value):[]),Ue=K(null);Je(en,async Se=>{if(!Se)return;await bt(),(Ue.value?.querySelector(".md-row.is-current")??Ue.value?.querySelector(".md-row"))?.focus()});function Qe(Se){if(Se.key!=="ArrowDown"&&Se.key!=="ArrowUp")return;const Oe=Array.from(Ue.value?.querySelectorAll(".md-row:not(:disabled)")??[]);if(!Oe.length)return;Se.preventDefault();const ct=Oe.indexOf(document.activeElement),kt=Se.key==="ArrowDown"?(ct+1)%Oe.length:(ct-1+Oe.length)%Oe.length;Oe[kt]?.focus()}function lt(Se){i("selectModel",Se),ho()}return(Se,Oe)=>(k(),M("div",{class:Fe(["composer",{"drag-over":p(W),expanded:h.value}]),onDragover:Oe[19]||(Oe[19]=(...ct)=>p(X)&&p(X)(...ct)),onDragleave:Oe[20]||(Oe[20]=(...ct)=>p(oe)&&p(oe)(...ct)),onDrop:Oe[21]||(Oe[21]=(...ct)=>p(xe)&&p(xe)(...ct))},[Te.value?(k(),me(AN,{key:0,media:Te.value,"origin-img":Ge.value,onClose:Oe[0]||(Oe[0]=ct=>{Ge.value=null,p(Z)()})},null,8,["media","origin-img"])):te("",!0),C("div",xAe,[p(O).length>0?(k(),M("div",SAe,[C("div",{ref_key:"attScrollRef",ref:Y,class:Fe(["att-scroll",{"is-overflowing":ue.value}])},[C("div",{ref_key:"attScrollContentRef",ref:fe,class:"att-scroll-content"},[ae.value.length>0?(k(),M("div",{key:0,ref_key:"attMediaRowRef",ref:se,class:"att-row att-row-media"},[(k(!0),M(De,null,vt(ae.value,ct=>(k(),me(MN,{key:ct.localId,kind:ct.kind,name:ct.name,url:ct.previewUrl,"file-id":ct.fileId,uploading:ct.uploading,error:ct.error,removable:"","remove-label":p(r)("composer.removeNamed",{name:ct.name}),onActivate:kt=>we(ct,kt),onRemove:kt=>p(U)(ct.localId)},null,8,["kind","name","url","file-id","uploading","error","remove-label","onActivate","onRemove"]))),128))],512)):te("",!0),j.value.length>0?(k(),M("div",AAe,[(k(!0),M(De,null,vt(j.value,ct=>(k(),me(TN,{key:ct.localId,kind:"file",name:ct.name,"media-type":ct.mediaType,size:ct.size,uploading:ct.uploading,error:ct.error,removable:"","remove-label":p(r)("composer.removeNamed",{name:ct.name}),onActivate:kt=>we(ct),onRemove:kt=>p(U)(ct.localId)},null,8,["name","media-type","size","uploading","error","remove-label","onActivate","onRemove"]))),128))])):te("",!0)],512)],2),ue.value?(k(),M("span",MAe,N(p(r)("composer.attachmentCount",{n:p(O).length})),1)):te("",!0),p(O).length>=2?(k(),me(p($n),{key:1,text:p(r)("composer.clearAll")},{default:be(()=>[q(p(mn),{class:"att-clear",size:"sm",label:p(r)("composer.clearAll"),onClick:p(ve)},{default:be(()=>[q(p(Me),{name:"trash"})]),_:1},8,["label","onClick"])]),_:1},8,["text"])):te("",!0)])):te("",!0),C("div",TAe,[p(w)?(k(),me(iAe,{key:0,items:p(x),"active-index":p(A),onSelect:p(S),onHover:Oe[1]||(Oe[1]=ct=>A.value=ct)},null,8,["items","active-index","onSelect"])):te("",!0),p(T)?(k(),me(hAe,{key:1,items:p(R),"active-index":p(B),loading:p(I),onSelect:p(D),onHover:Oe[2]||(Oe[2]=ct=>B.value=ct)},null,8,["items","active-index","loading","onSelect"])):te("",!0),C("div",EAe,[An(C("textarea",{ref_key:"textareaRef",ref:c,"onUpdate:modelValue":Oe[3]||(Oe[3]=ct=>jo(a)?a.value=ct:null),class:"ph",placeholder:s.value,disabled:e.starting,autocomplete:"off",spellcheck:"false",rows:"1",onKeydown:qe,onCompositionstart:Tt,onCompositionend:He,onInput:H},null,40,IAe),[[Ys,p(a)]]),h.value||_.value?(k(),M("button",{key:0,class:"expand-btn",type:"button","aria-label":h.value?p(r)("composer.collapseTitle"):p(r)("composer.expandTitle"),onClick:m},[h.value?(k(),me(p(Me),{key:0,name:"collapse",size:"sm"})):(k(),me(p(Me),{key:1,name:"expand",size:"sm"}))],8,LAe)):te("",!0)])]),ft.value?(k(),M("input",{key:1,ref_key:"fileInputRef",ref:z,type:"file",multiple:"",class:"file-input-hidden",onChange:Oe[4]||(Oe[4]=(...ct)=>p(Q)&&p(Q)(...ct))},null,544)):te("",!0),C("div",{ref_key:"toolbarRef",ref:nn,class:"toolbar"},[C("div",{ref_key:"menuMeasureRef",ref:gi,class:"menu-measure","aria-hidden":"true"},[...Oe[22]||(Oe[22]=[C("span",{class:"pd-desc"},null,-1)])],512),C("div",$Ae,[ft.value?(k(),me(p(mn),{key:0,class:"composer-attach",size:"md",label:p(r)("composer.attachFile"),onClick:p(ee)},{default:be(()=>[q(p(Me),{name:"attachment"})]),_:1},8,["label","onClick"])):te("",!0),e.status?(k(),M("span",{key:1,ref_key:"permPillRef",ref:rn,class:Fe(["perm-pill",["perm-"+e.status.permission,{open:Vt.value}]]),role:"button",tabindex:"0","aria-label":rr.value,onClick:Ot(Vo,["stop"]),onKeydown:[yl(Vo,["enter"]),yl(Ot(Vo,["prevent"]),["space"])]},[q(p(Me),{class:"perm-pill-icon",name:Ar.value,size:"sm"},null,8,["name"]),C("span",OAe,N(rr.value),1)],42,NAe)):te("",!0),q(gs,{name:"composer-menu-pop"},{default:be(()=>[Vt.value&&e.status?(k(),M("div",{key:0,class:"perm-dropdown",style:Gt(vi.value),role:"menu",onClick:Oe[5]||(Oe[5]=Ot(()=>{},["stop"]))},[(k(),M(De,null,vt(wo,ct=>C("button",{key:ct.mode,class:Fe(["pd-row",{"is-current":ct.mode===e.status.permission}]),role:"menuitem",onClick:kt=>_n(ct.mode)},[C("span",{class:"pd-icon",style:Gt({color:ct.color})},[q(p(Me),{name:ct.icon,size:"sm"},null,8,["name"])],4),C("span",RAe,[C("span",{class:"pd-name",style:Gt({color:ct.color})},N(p(r)(ct.labelKey)),5),C("span",PAe,N(p(r)(ct.descKey)),1)]),C("span",DAe,[ct.mode===e.status.permission?(k(),me(p(Me),{key:0,name:"check",size:"sm"})):te("",!0)])],10,FAe)),64))],4)):te("",!0)]),_:1}),e.status?(k(),M("div",{key:2,ref_key:"modesRef",ref:Hn,class:"modes"},[C("button",{type:"button",class:Fe(["mode-pill",{on:or.value,open:qn.value}]),onClick:Ot(Zo,["stop"])},[C("span",BAe,N(p(r)("status.modesLabel")),1),$o.value?(k(),M("span",HAe,N(p(r)("status.planLabel")),1)):te("",!0),as.value?(k(),M("span",zAe,N(p(r)("status.swarmLabel")),1)):te("",!0),Hs.value?(k(),M("span",WAe,N(p(r)("status.goalLabel")),1)):te("",!0)],2),q(gs,{name:"composer-menu-pop"},{default:be(()=>[qn.value?(k(),M("div",{key:0,ref_key:"modesMenuRef",ref:nr,class:"modes-menu",style:Gt(No.value),role:"menu"},[C("button",{type:"button",class:Fe(["mode-row",{on:$o.value}]),role:"menuitem",onClick:Oe[6]||(Oe[6]=ct=>i("togglePlan"))},[C("span",UAe,[q(p(Me),{name:"file-edit",size:"sm"})]),C("span",jAe,[C("span",VAe,N(p(r)("status.planLabel")),1),C("span",qAe,N(p(r)("status.planDesc")),1)]),C("span",{class:Fe(["mode-switch",{on:$o.value}])},[...Oe[23]||(Oe[23]=[C("span",{class:"mode-knob"},null,-1)])],2)],2),C("button",{type:"button",class:Fe(["mode-row",{on:as.value}]),role:"menuitem",onClick:Oe[7]||(Oe[7]=ct=>i("toggleSwarm"))},[C("span",KAe,[q(p(Me),{name:"sparkles",size:"sm"})]),C("span",ZAe,[C("span",GAe,N(p(r)("status.swarmLabel")),1),C("span",YAe,N(p(r)("status.swarmDesc")),1)]),C("span",{class:Fe(["mode-switch",{on:as.value}])},[...Oe[24]||(Oe[24]=[C("span",{class:"mode-knob"},null,-1)])],2)],2),C("div",{class:Fe(["mode-row mode-row-goal",{on:Ko.value||o.goalMode}])},[C("button",{type:"button",class:"mode-row-main",role:"menuitem",onClick:Oe[8]||(Oe[8]=ct=>Ko.value?i("focusGoal"):i("toggleGoal"))},[C("span",XAe,[q(p(Me),{name:"target",size:"sm"})]),C("span",JAe,[C("span",QAe,N(p(r)("status.goalLabel")),1),C("span",eMe,N(p(r)("status.goalDesc")),1)]),Ko.value?te("",!0):(k(),M("span",{key:0,class:Fe(["mode-switch",{on:o.goalMode}])},[...Oe[25]||(Oe[25]=[C("span",{class:"mode-knob"},null,-1)])],2))]),Ko.value?(k(),M("div",tMe,[bn.value?(k(),me(p(Rt),{key:0,size:"sm",variant:"secondary",class:"mode-row-action",onClick:Oe[9]||(Oe[9]=ct=>i("controlGoal","pause"))},{default:be(()=>[q(p(Me),{name:"pause",size:"sm"}),C("span",null,N(p(r)("status.goalPause")),1)]),_:1})):te("",!0),Fi.value?(k(),me(p(Rt),{key:1,size:"sm",variant:"primary",class:"mode-row-action",onClick:Oe[10]||(Oe[10]=ct=>i("controlGoal","resume"))},{default:be(()=>[q(p(Me),{name:"play",size:"sm"}),C("span",null,N(p(r)("status.goalResume")),1)]),_:1})):te("",!0),q(p(Rt),{size:"sm",variant:"danger-soft",class:"mode-row-action",onClick:Oe[11]||(Oe[11]=ct=>i("controlGoal","cancel"))},{default:be(()=>[q(p(Me),{name:"close",size:"sm"}),C("span",null,N(p(r)("status.goalCancel")),1)]),_:1})])):te("",!0)],2)],4)):te("",!0)]),_:1})],512)):te("",!0)]),C("div",nMe,[it.value?(k(),M("button",{key:0,class:"compact-chip",onClick:Oe[12]||(Oe[12]=Ot(ct=>i("compact"),["stop"]))},"/compact")):te("",!0),q(p($n),{text:At.value},{default:be(()=>[e.status&&!e.hideContext?(k(),M("span",{key:0,class:"ctx-group",role:"img",tabindex:"0","aria-label":At.value},[q(p(zz),{pct:Co.value},null,8,["pct"])],8,oMe)):te("",!0)]),_:1},8,["text"]),e.status&&!Bi.value&&!Qs.value?(k(),M("button",{key:1,ref_key:"modelPillRef",ref:Sn,type:"button",class:Fe(["model-pill",{open:en.value}]),"aria-haspopup":"menu","aria-expanded":en.value,onClick:Ot(Io,["stop"])},[C("span",iMe,N(e.status.model),1),Xs.value?(k(),M("span",rMe,N(Xs.value),1)):te("",!0),q(p(Me),{class:"cv",name:"chevron-down",size:"sm"})],10,sMe)):e.status&&Qs.value?(k(),M("button",{key:2,type:"button",class:"model-pill login-pill",onClick:Oe[13]||(Oe[13]=Ot(ct=>p(Zp)(),["stop"]))},[q(p(Me),{name:"music",size:"sm"}),C("span",lMe,N(p(r)("sidebar.upgrade")),1)])):e.status&&Bi.value?(k(),M("button",{key:3,type:"button",class:"model-pill login-pill",onClick:Oe[14]||(Oe[14]=Ot(ct=>i("login"),["stop"]))},[q(p(Me),{name:"log-in",size:"sm"}),C("span",aMe,N(p(r)("login.action")),1)])):te("",!0),e.working?(k(),me(p($n),{key:4,text:p(r)("composer.interruptTitle")},{default:be(()=>[C("button",{class:"stop","aria-label":p(r)("composer.interrupt"),onClick:Oe[15]||(Oe[15]=ct=>i("interrupt"))},[q(p(Me),{name:"stop",size:"sm"})],8,cMe)]),_:1},8,["text"])):te("",!0),C("button",{class:Fe(["send",{"is-starting":e.starting}]),"aria-label":Et.value,disabled:e.starting||!st.value,onClick:Oe[16]||(Oe[16]=ct=>Ne())},[e.starting?(k(),me(p(Ao),{key:0,size:"sm"})):(k(),me(p(Me),{key:1,name:"send",size:"sm"}))],10,uMe)]),q(gs,{name:"composer-menu-pop"},{default:be(()=>[en.value&&e.status?(k(),M("div",{key:0,ref_key:"modelDropdownRef",ref:Ue,class:"model-dropdown",style:Gt(bo.value),role:"menu",onClick:Oe[18]||(Oe[18]=Ot(()=>{},["stop"])),onKeydown:Qe},[Ae.value.length>0?(k(),M("div",dMe,N(p(r)("status.starredModels")),1)):te("",!0),(k(!0),M(De,null,vt(Ae.value,ct=>(k(),M("button",{key:ct.id,class:Fe(["md-row",{"is-current":ct.id===e.status.modelId}]),role:"menuitem",onClick:kt=>lt(ct.id)},[C("span",pMe,[ct.id===e.status.modelId?(k(),me(p(Me),{key:0,name:"check",size:"sm"})):te("",!0)]),C("span",hMe,N(ct.displayName??ct.model),1),C("span",mMe,N(ct.provider),1),q(p(Me),{class:"md-star",name:"star",size:"sm"})],10,fMe))),128)),Ae.value.length>0?(k(),M("div",gMe)):te("",!0),Mr.value.length>0?(k(),M("div",vMe,N(Di.value),1)):te("",!0),(k(!0),M(De,null,vt(Mr.value,ct=>(k(),M("button",{key:ct.id,class:Fe(["md-row",{"is-current":ct.id===e.status.modelId}]),role:"menuitem",onClick:kt=>lt(ct.id)},[C("span",kMe,[ct.id===e.status.modelId?(k(),me(p(Me),{key:0,name:"check",size:"sm"})):te("",!0)]),C("span",bMe,N(ct.displayName??ct.model),1),Ce(ct.id)?(k(),me(p(Me),{key:0,class:"md-star",name:"star",size:"sm"})):te("",!0)],10,yMe))),128)),Mr.value.length>0?(k(),M("div",CMe)):te("",!0),C("div",wMe,[C("span",_Me,N(p(r)("status.thinkingLabel")),1),Zt.value==="unsupported"?(k(),M("span",xMe,N(p(r)("status.modeNotSupported")),1)):vn.value.length>1?(k(),me(p(ai),{key:1,"model-value":uo.value,options:ro.value,size:"xs","onUpdate:modelValue":io},null,8,["model-value","options"])):(k(),M("span",SMe,N(Yn(vn.value[0]??eo.value)),1))]),Oe[26]||(Oe[26]=C("div",{class:"md-divider"},null,-1)),C("div",AMe,N(p(r)("status.cacheNote")),1),Oe[27]||(Oe[27]=C("div",{class:"md-divider"},null,-1)),C("button",{class:"md-row md-row-more",role:"menuitem",onClick:Oe[17]||(Oe[17]=ct=>{ho(),i("pickModel")})},[C("span",MMe,[q(p(Me),{name:"list",size:"sm"})]),C("span",TMe,N(p(r)("status.moreModels")),1),q(p(Me),{class:"md-more-arrow",name:"chevron-right",size:"sm"})])],36)):te("",!0)]),_:1})],512)]),Se.$slots.footer?(k(),M("div",EMe,[Cn(Se.$slots,"footer",{},void 0,!0)])):te("",!0),C("div",{class:Fe(["drop-overlay",{show:p(W)}]),"aria-hidden":"true"},[C("div",IMe,[q(p(Me),{name:"file-plus",size:"lg"}),C("span",null,N(p(r)("composer.dropToAttach")),1)])],2)],34))}}),HN=mt(LMe,[["__scopeId","data-v-c5da0dc2"]]),$Me={class:"goal-panel"},NMe={class:"goal-full"},OMe={key:0,class:"goal-criterion"},FMe={class:"goal-criterion-label"},RMe=et({__name:"GoalPanel",props:{goal:{}},setup(e){const{t}=$t();return(n,o)=>(k(),M("div",$Me,[C("div",NMe,N(e.goal.objective),1),e.goal.completionCriterion?(k(),M("div",OMe,[C("span",FMe,[q(p(Me),{name:"check-list",size:"sm"}),Ve(" "+N(p(t)("status.goalDoneWhen")),1)]),C("p",null,N(e.goal.completionCriterion),1)])):te("",!0)]))}}),PMe=mt(RMe,[["__scopeId","data-v-ec169c9d"]]),DMe={key:0,class:"qh-chip"},BMe={class:"qtitle"},HMe={class:"qbody"},zMe={class:"qopts"},WMe=["onClick"],UMe={class:"qopt-key"},jMe={class:"qopt-text"},VMe={class:"qopt-label"},qMe={key:0,class:"qopt-desc"},KMe={class:"qopt-label"},ZMe=["placeholder"],GMe={class:"qfoot"},YMe={class:"qbtns"},XMe={class:"qhint"},JMe=et({__name:"QuestionCard",props:{question:{},busyKind:{}},emits:["answer","dismiss"],setup(e,{emit:t}){const n=e,{t:o}=$t(),s=t,i=K(0),r=K(!1);function l(){r.value&&(r.value=!1)}const a=F(()=>n.question.questions[i.value]),c=F(()=>n.question.questions.length);function u(){i.value>0&&i.value--}function d(){i.value0:G.kind==="multiWithOther"?G.optionIds.length>0||G.otherText.trim().length>0:G.kind==="other"?G.text.trim().length>0:!0:!1}function h(){return f(a.value.id)}const m=K({});function g(U){return U.recommended===!0?!0:/\b(?:recommended|recommend)\b|推荐/.test(`${U.label} ${U.description??""}`.toLowerCase())}function b(){const U={...m.value};let G=!1;for(const Z of n.question.questions){if(U[Z.id])continue;const ee=Z.options.filter(g);ee.length!==0&&(U[Z.id]=Z.multiSelect?{kind:"multi",optionIds:ee.map(Q=>Q.id)}:{kind:"single",optionId:ee[0].id},G=!0)}G&&(m.value=U)}Je(()=>n.question.questionId,()=>{i.value=0,r.value=!1,m.value={},y.value={}}),Je(()=>n.question,()=>{i.value>=n.question.questions.length&&(i.value=0),b()},{immediate:!0,deep:!0});function _(U,G){const Z=m.value[U];if(Z&&Z.kind==="single"&&Z.optionId===G){const ee={...m.value};delete ee[U],m.value=ee}else m.value={...m.value,[U]:{kind:"single",optionId:G}}}function v(U,G){const Z=m.value[U],ee=Z&&(Z.kind==="multi"||Z.kind==="multiWithOther")?Z.kind==="multi"?[...Z.optionIds]:[...Z.optionIds]:[],Q=ee.indexOf(G);Q>=0?ee.splice(Q,1):ee.push(G);const X=m.value[U],oe=X&&X.kind==="multiWithOther"?X.otherText:"";oe?m.value={...m.value,[U]:{kind:"multiWithOther",optionIds:ee,otherText:oe}}:m.value={...m.value,[U]:{kind:"multi",optionIds:ee}}}const y=K({}),w=K(null);function x(U){const G=n.question.questions.find(ee=>ee.id===U),Z=y.value[U]??"";if(G.multiSelect){const ee=m.value[U],Q=ee&&(ee.kind==="multi"||ee.kind==="multiWithOther")?ee.kind==="multi"?[...ee.optionIds]:[...ee.optionIds]:[];m.value={...m.value,[U]:{kind:"multiWithOther",optionIds:Q,otherText:Z}}}else m.value={...m.value,[U]:{kind:"other",text:Z}}}function A(U){x(U),bt(()=>w.value?.focus())}function L(U,G){const Z=m.value[U];return Z?Z.kind==="single"?Z.optionId===G:Z.kind==="multi"||Z.kind==="multiWithOther"?Z.optionIds.includes(G):!1:!1}function S(U){const G=m.value[U];return!!(G&&(G.kind==="other"||G.kind==="multiWithOther"))}function T(){return n.question.questions.every(U=>f(U.id))}const R=F(()=>n.busyKind==="answer"),B=F(()=>n.busyKind==="dismiss"),I=F(()=>!!n.busyKind);function $(){if(I.value||!T())return;const U={answers:m.value,method:"click"};s("answer",n.question.questionId,U)}function D(){I.value||s("dismiss",n.question.questionId)}const H=K(0);Je([i,()=>n.question.questionId],()=>{H.value=0});const{handleCompositionStart:O,handleCompositionEnd:P,isComposingKeyEvent:z}=_r();function W(U){const G=(document.activeElement?.tagName??"").toLowerCase(),Z=G==="input"||G==="textarea";if(U.metaKey||U.ctrlKey||U.altKey||I.value||z(U)||li.value>0)return;if(U.key==="Enter"){if(U.preventDefault(),r.value)return;i.value0||U.defaultPrevented)return;U.preventDefault(),D();return}if(r.value)return;if(U.key==="ArrowDown"||U.key==="ArrowUp"){const Q=a.value,X=Q.options.length+(Q.allowOther?1:0);if(X===0)return;U.preventDefault();const oe=U.key==="ArrowDown"?1:-1,xe=Math.min(X-1,Math.max(0,H.value+oe));if(xe===H.value)return;H.value=xe;const pe=Q.options[H.value];pe?Q.multiSelect||_(Q.id,pe.id):Q.allowOther&&!Q.multiSelect&&x(Q.id);return}if(U.key===" "&&a.value.multiSelect){U.preventDefault();const Q=a.value,X=Q.options[H.value];X?v(Q.id,X.id):Q.allowOther&&x(Q.id);return}const ee=parseInt(U.key,10);if(!isNaN(ee)&&ee>=1&&ee<=9){U.preventDefault();const Q=a.value,X=ee-1,oe=Q.options[X];oe&&(H.value=X,Q.multiSelect?v(Q.id,oe.id):_(Q.id,oe.id))}}return cn(()=>document.addEventListener("keydown",W)),kn(()=>document.removeEventListener("keydown",W)),(U,G)=>(k(),M("div",{class:Fe(["qcard",{minimized:r.value}])},[C("div",{class:Fe(["qh",{clickable:r.value}]),onClick:l},[c.value>1?(k(),M("span",DMe,N(i.value+1),1)):te("",!0),C("span",BMe,N(a.value.question),1),q(p(mn),{class:"qmin",size:"sm",label:r.value?p(o)("question.expand"):p(o)("question.minimize"),onClick:G[0]||(G[0]=Ot(Z=>r.value=!r.value,["stop"]))},{default:be(()=>[r.value?(k(),me(p(Me),{key:0,name:"chevron-up",size:"md"})):(k(),me(p(Me),{key:1,name:"minus",size:"md"}))]),_:1},8,["label"]),q(p(mn),{class:"qclose",size:"sm",label:p(o)("question.dismiss"),disabled:I.value,onClick:Ot(D,["stop"])},{default:be(()=>[q(p(Me),{name:"close",size:"md"})]),_:1},8,["label","disabled"])],2),r.value?te("",!0):(k(),M(De,{key:0},[C("div",HMe,[a.value.body?(k(),me(p(Mu),{key:0,text:a.value.body,class:"qmdbody"},null,8,["text"])):te("",!0),C("div",zMe,[(k(!0),M(De,null,vt(a.value.options,(Z,ee)=>(k(),M("label",{key:Z.id,class:Fe(["qopt",{selected:L(a.value.id,Z.id),highlighted:a.value.multiSelect&&ee===H.value}]),onClick:Ot(Q=>{H.value=ee,a.value.multiSelect?v(a.value.id,Z.id):_(a.value.id,Z.id)},["prevent"])},[C("span",UMe,N(ee+1),1),C("span",{class:Fe(["qopt-glyph",a.value.multiSelect?"chk":"rad"])},null,2),C("span",jMe,[C("span",VMe,N(Z.label),1),Z.description?(k(),M("span",qMe,N(Z.description),1)):te("",!0)])],10,WMe))),128)),a.value.allowOther?(k(),M("label",{key:0,class:Fe(["qopt",{selected:S(a.value.id),highlighted:a.value.multiSelect&&H.value===a.value.options.length}]),onClick:G[6]||(G[6]=Ot(Z=>{H.value=a.value.options.length,A(a.value.id)},["prevent"]))},[G[7]||(G[7]=C("span",{class:"qopt-key"},null,-1)),C("span",{class:Fe(["qopt-glyph",a.value.multiSelect?"chk":"rad"])},null,2),C("span",KMe,N(a.value.otherLabel??p(o)("question.otherDefault")),1),An(C("input",{ref_key:"otherInputEl",ref:w,"onUpdate:modelValue":G[1]||(G[1]=Z=>y.value[a.value.id]=Z),class:"other-input",type:"text",placeholder:a.value.otherLabel??p(o)("question.otherDefault"),onInput:G[2]||(G[2]=Z=>x(a.value.id)),onFocus:G[3]||(G[3]=Z=>x(a.value.id)),onCompositionstart:G[4]||(G[4]=(...Z)=>p(O)&&p(O)(...Z)),onCompositionend:G[5]||(G[5]=(...Z)=>p(P)&&p(P)(...Z))},null,40,ZMe),[[Ys,y.value[a.value.id]]])],2)):te("",!0)])]),C("div",GMe,[C("div",YMe,[i.value[Ve(N(p(o)("question.nextQuestion")),1)]),_:1},8,["disabled"])):(k(),me(p(Rt),{key:1,class:"qmain",size:"md",variant:"primary",disabled:!T(),loading:R.value,onClick:$},{default:be(()=>[Ve(N(p(o)("question.submit")),1)]),_:1},8,["disabled","loading"])),c.value>1?(k(),me(p(Rt),{key:2,size:"md",variant:"ghost",disabled:i.value===0||I.value,onClick:u},{default:be(()=>[Ve(N(p(o)("question.back")),1)]),_:1},8,["disabled"])):te("",!0),q(p(Rt),{size:"md",variant:"ghost",loading:B.value,disabled:I.value,onClick:D},{default:be(()=>[Ve(N(p(o)("question.dismiss")),1)]),_:1},8,["loading","disabled"])]),C("span",XMe,N(p(o)("question.hint")),1)])],64))],2))}}),QMe=mt(JMe,[["__scopeId","data-v-0781cb78"]]),eTe={class:"akind"},tTe={key:1,class:"apeek"},nTe={class:"ab"},oTe=["title"],sTe={class:"code-path"},iTe={key:2,class:"body-shell"},rTe={class:"shell-cmd"},lTe={key:0,class:"shell-cwd"},aTe={key:1,class:"shell-danger"},cTe={class:"code-path"},uTe={key:4,class:"body-chip"},dTe={class:"chip-label"},fTe={class:"chip-value"},pTe={key:0,class:"chip-detail"},hTe={key:5,class:"body-chip"},mTe={key:0,class:"chip-label"},gTe={class:"chip-value"},vTe={key:6,class:"body-chip"},yTe={class:"chip-label"},kTe={class:"chip-value"},bTe={key:0,class:"chip-detail"},CTe={key:7,class:"body-chip"},wTe={class:"chip-label"},_Te={class:"chip-value"},xTe={key:0,class:"chip-detail"},STe={key:8,class:"body-todo"},ATe={class:"todo-glyph"},MTe={key:0,class:"plan-opts"},TTe=["disabled","onClick"],ETe={class:"popt-key"},ITe={class:"popt-text"},LTe={class:"popt-label"},$Te={key:0,class:"popt-desc"},NTe={key:10,class:"body-generic"},OTe={class:"gen-text"},FTe={key:11,class:"feedback-wrap"},RTe=["placeholder"],PTe={class:"feedback-hint"},DTe={class:"af"},BTe={class:"abtns"},HTe={key:0,class:"knum"},zTe={key:0,class:"knum"},WTe=et({__name:"ApprovalCard",props:{block:{},agentName:{},busy:{type:Boolean},openFile:{type:Function}},emits:["decide"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=F(()=>{const Z=n.block;return Z.kind!=="plan_review"?null:{plan:Z.plan,path:Z.path,options:Z.options??[]}}),r=K(!1),l=K(null),a=K(!1);function c(){a.value=(l.value?.scrollTop??0)>0}function u(Z){a.value=Z.target.scrollTop>0}const d=K(!1),f=F(()=>{const Z=n.block.kind;return Z==="plan_review"||Z==="diff"||Z==="file"});function h(){r.value&&(r.value=!1)}const m=["shell","diff","file","fileop","url","search","invocation","todo","plan_review","generic"];function g(){return m.includes(n.block.kind)?n.block.kind:"generic"}function b(){return s(`approval.title.${g()}`)}const _=F(()=>{const Z=n.block;switch(Z.kind){case"diff":case"file":case"fileop":return Z.path;case"shell":return Z.command;case"url":return Z.url;case"search":return Z.query;case"invocation":return Z.name;case"generic":return Z.summary;default:return""}}),v=K(!1),y=K(""),w=K(null);function x(){n.busy||(v.value=!0,y.value="",setTimeout(()=>w.value?.focus(),0))}function A(){if(n.busy)return;const Z=y.value.trim();i.value?$("feedback",{decision:"rejected",selectedLabel:"Revise",feedback:Z||void 0}):$("feedback",{decision:"rejected",feedback:Z||void 0}),v.value=!1,y.value=""}function L(){n.busy||(v.value=!1,y.value="")}const{handleCompositionStart:S,handleCompositionEnd:T,isComposingKeyEvent:R}=_r();function B(Z){R(Z)||(Z.key==="Enter"&&!Z.shiftKey?(Z.preventDefault(),A()):Z.key==="Escape"&&(Z.preventDefault(),L()))}const I=K(null);Je(()=>n.busy,Z=>{Z||(I.value=null)});function $(Z,ee){n.busy||(I.value=Z,o("decide",ee))}function D(){$("approve",{decision:"approved"})}function H(){$("approveSession",{decision:"approved",scope:"session"})}function O(){$("reject",{decision:"rejected"})}function P(){$("approvePlan",{decision:"approved"})}function z(Z){$(`option:${Z}`,{decision:"approved",selectedLabel:Z})}function W(){n.busy||x()}function U(){$("rejectAndExit",{decision:"rejected",selectedLabel:"Reject and Exit"})}function G(Z){const ee=(document.activeElement?.tagName??"").toLowerCase();if(ee==="input"||ee==="textarea"||Z.metaKey||Z.ctrlKey||Z.altKey||li.value>0||Z.defaultPrevented)return;if(v.value){Z.key==="Escape"&&(Z.preventDefault(),L());return}if(n.busy||r.value)return;const Q=i.value;if(Q){if(Q.options.length===0){Z.key==="1"?(Z.preventDefault(),P()):Z.key==="2"?(Z.preventDefault(),W()):Z.key==="3"&&(Z.preventDefault(),U());return}Z.key==="1"&&Q.options[0]?(Z.preventDefault(),z(Q.options[0].label)):Z.key==="2"&&Q.options[1]?(Z.preventDefault(),z(Q.options[1].label)):Z.key==="3"&&Q.options[2]&&(Z.preventDefault(),z(Q.options[2].label));return}Z.key==="1"?(Z.preventDefault(),D()):Z.key==="2"?(Z.preventDefault(),H()):Z.key==="3"?(Z.preventDefault(),O()):Z.key==="4"&&(Z.preventDefault(),x())}return cn(()=>document.addEventListener("keydown",G)),kn(()=>document.removeEventListener("keydown",G)),Ip(c),(Z,ee)=>(k(),M("div",{class:Fe(["appr",{minimized:r.value}])},[C("div",{class:Fe(["ah",{clickable:r.value}]),onClick:h},[C("span",eTe,N(b()),1),e.agentName&&!r.value?(k(),me(p(Wr),{key:0,variant:"neutral",size:"sm"},{default:be(()=>[Ve(N(p(s)("approval.subagentBadge",{name:e.agentName})),1)]),_:1})):te("",!0),r.value&&_.value?(k(),M("span",tTe,N(_.value),1)):te("",!0),f.value&&!r.value?(k(),me(p(mn),{key:2,class:"aexpand",size:"sm",label:d.value?p(s)("approval.collapsePlan"):p(s)("approval.expandPlan"),onClick:ee[0]||(ee[0]=Q=>d.value=!d.value)},{default:be(()=>[q(p(Me),{name:d.value?"collapse":"expand",size:"md"},null,8,["name"])]),_:1},8,["label"])):te("",!0),q(p(mn),{class:"amin",size:"sm",label:r.value?p(s)("question.expand"):p(s)("question.minimize"),onClick:ee[1]||(ee[1]=Ot(Q=>r.value=!r.value,["stop"]))},{default:be(()=>[r.value?(k(),me(p(Me),{key:0,name:"chevron-up",size:"md"})):(k(),me(p(Me),{key:1,name:"minus",size:"md"}))]),_:1},8,["label"])],2),r.value?te("",!0):(k(),M(De,{key:0},[C("div",nTe,[e.block.kind==="plan_review"&&e.block.path?(k(),M("button",{key:0,type:"button",class:"plan-path",title:e.block.path,onClick:ee[2]||(ee[2]=Q=>n.openFile?.({path:e.block.path,content:e.block.plan}))},N(e.block.path),9,oTe)):te("",!0),e.block.kind==="diff"?(k(),M("div",{key:1,class:Fe(["body-code",{expanded:d.value}])},[C("div",sTe,N(e.block.path),1),e.block.diff.length>0?(k(),me(Hr,{key:0,lines:e.block.diff,path:e.block.path},null,8,["lines","path"])):te("",!0)],2)):e.block.kind==="shell"?(k(),M("div",iTe,[C("div",rTe,[ee[6]||(ee[6]=C("span",{class:"shell-dollar"},"$",-1)),Ve(" "+N(e.block.command),1)]),e.block.cwd?(k(),M("div",lTe,"cwd: "+N(e.block.cwd),1)):te("",!0),e.block.danger?(k(),M("div",aTe,[q(p(Me),{name:"alert-triangle",size:"sm",class:"shell-danger-ic"}),C("span",null,N(p(s)("approval.danger",{detail:e.block.danger})),1)])):te("",!0)])):e.block.kind==="file"?(k(),M("div",{key:3,class:Fe(["body-code",{expanded:d.value}])},[C("div",cTe,N(e.block.path),1),q(Hr,{code:e.block.content,path:e.block.path},null,8,["code","path"])],2)):e.block.kind==="fileop"?(k(),M("div",uTe,[C("span",dTe,N(e.block.op),1),C("span",fTe,N(e.block.path),1),e.block.detail?(k(),M("span",pTe,N(e.block.detail),1)):te("",!0)])):e.block.kind==="url"?(k(),M("div",hTe,[e.block.method?(k(),M("span",mTe,N(e.block.method),1)):te("",!0),C("span",gTe,N(e.block.url),1)])):e.block.kind==="search"?(k(),M("div",vTe,[C("span",yTe,N(p(s)("approval.searchQueryLabel")),1),C("span",kTe,N(e.block.query),1),e.block.scope?(k(),M("span",bTe,N(p(s)("approval.searchScope",{scope:e.block.scope})),1)):te("",!0)])):e.block.kind==="invocation"?(k(),M("div",CTe,[C("span",wTe,N(e.block.kind2),1),C("span",_Te,N(e.block.name),1),e.block.description?(k(),M("span",xTe,N(e.block.description),1)):te("",!0)])):e.block.kind==="todo"?(k(),M("div",STe,[(k(!0),M(De,null,vt(e.block.items,(Q,X)=>(k(),M("div",{key:X,class:"todo-item"},[C("span",ATe,N(Q.status==="done"||Q.status==="completed"?"✓":"○"),1),C("span",{class:Fe(["todo-title",{"todo-done":Q.status==="done"||Q.status==="completed"}])},N(Q.title),3)]))),128))])):e.block.kind==="plan_review"?(k(),M("div",{key:9,class:Fe(["body-plan-wrap",{scrolled:a.value}])},[C("div",{ref_key:"planBodyEl",ref:l,class:Fe(["body-plan",{expanded:d.value}]),onScroll:u},[q(p(Mu),{text:e.block.plan,"open-file":n.openFile},null,8,["text","open-file"])],34),i.value&&i.value.options.length>0?(k(),M("div",MTe,[(k(!0),M(De,null,vt(i.value.options,(Q,X)=>(k(),M("button",{key:X,type:"button",class:"popt",disabled:e.busy,onClick:oe=>z(Q.label)},[C("span",ETe,N(X+1),1),C("span",ITe,[C("span",LTe,N(Q.label),1),Q.description?(k(),M("span",$Te,N(Q.description),1)):te("",!0)]),I.value===`option:${Q.label}`?(k(),me(p(Ao),{key:0,size:"sm",class:"popt-spin"})):te("",!0)],8,TTe))),128))])):te("",!0)],2)):(k(),M("div",NTe,[C("span",OTe,N(e.block.summary),1)])),v.value?(k(),M("div",FTe,[An(C("textarea",{ref_key:"feedbackRef",ref:w,"onUpdate:modelValue":ee[3]||(ee[3]=Q=>y.value=Q),class:"feedback-ta",placeholder:p(s)("approval.feedbackPlaceholder"),rows:"2",onKeydown:B,onCompositionstart:ee[4]||(ee[4]=(...Q)=>p(S)&&p(S)(...Q)),onCompositionend:ee[5]||(ee[5]=(...Q)=>p(T)&&p(T)(...Q))},null,40,RTe),[[Ys,y.value]]),C("div",PTe,N(p(s)("approval.feedbackHint")),1)])):te("",!0)]),C("div",DTe,[C("div",BTe,[v.value?(k(),M(De,{key:0},[q(p(Rt),{size:"md",variant:"danger-soft",loading:I.value==="feedback",disabled:e.busy,onClick:A},{default:be(()=>[Ve(N(p(s)("approval.feedbackSubmit")),1)]),_:1},8,["loading","disabled"]),q(p(Rt),{size:"md",variant:"ghost",disabled:e.busy,onClick:L},{default:be(()=>[Ve(N(p(s)("approval.feedbackCancel")),1)]),_:1},8,["disabled"])],64)):i.value?(k(),M(De,{key:1},[i.value.options.length===0?(k(),me(p(Rt),{key:0,class:"amain",size:"md",variant:"primary",loading:I.value==="approvePlan",disabled:e.busy,onClick:P},{default:be(()=>[ee[7]||(ee[7]=C("span",{class:"knum"},"1",-1)),Ve(N(p(s)("approval.approvePlan")),1)]),_:1},8,["loading","disabled"])):te("",!0),q(p(Rt),{size:"md",variant:"ghost",disabled:e.busy,onClick:W},{default:be(()=>[i.value.options.length===0?(k(),M("span",HTe,"2")):te("",!0),Ve(N(p(s)("approval.revise")),1)]),_:1},8,["disabled"]),q(p(Rt),{size:"md",variant:"ghost",loading:I.value==="rejectAndExit",disabled:e.busy,onClick:U},{default:be(()=>[i.value.options.length===0?(k(),M("span",zTe,"3")):te("",!0),Ve(N(p(s)("approval.rejectAndExit")),1)]),_:1},8,["loading","disabled"])],64)):(k(),M(De,{key:2},[q(p(Rt),{class:"amain",size:"md",variant:"primary",loading:I.value==="approve",disabled:e.busy,onClick:D},{default:be(()=>[ee[8]||(ee[8]=C("span",{class:"knum"},"1",-1)),Ve(N(p(s)("approval.approve")),1)]),_:1},8,["loading","disabled"]),q(p(Rt),{size:"md",variant:"ghost",loading:I.value==="approveSession",disabled:e.busy,onClick:H},{default:be(()=>[ee[9]||(ee[9]=C("span",{class:"knum"},"2",-1)),Ve(N(p(s)("approval.approveSession")),1)]),_:1},8,["loading","disabled"]),q(p(Rt),{size:"md",variant:"ghost",loading:I.value==="reject",disabled:e.busy,onClick:O},{default:be(()=>[ee[10]||(ee[10]=C("span",{class:"knum"},"3",-1)),Ve(N(p(s)("approval.reject")),1)]),_:1},8,["loading","disabled"]),q(p(Rt),{size:"md",variant:"ghost",disabled:e.busy,onClick:x},{default:be(()=>[ee[11]||(ee[11]=C("span",{class:"knum"},"4",-1)),Ve(N(p(s)("approval.feedback")),1)]),_:1},8,["disabled"])],64))])])],64))],2))}}),UTe=mt(WTe,[["__scopeId","data-v-a72de036"]]),jTe={class:"taskspane"},VTe={class:"tp-head"},qTe={class:"tp-title"},KTe={class:"tp-count"},ZTe={class:"tp-list"},GTe={key:0,class:"tp-empty"},YTe=["role","onClick"],XTe={class:"tp-name"},JTe={class:"tp-time"},QTe=["onClick"],eEe={key:0,class:"tp-detail"},tEe={key:0,class:"tp-codebox"},nEe=["onClick"],oEe={class:"tp-pre"},sEe={class:"tp-cmd"},iEe={key:1,class:"tp-codebox"},rEe=["onClick"],lEe={class:"tp-pre"},aEe=et({__name:"TasksPane",props:{tasks:{}},emits:["cancel","open"],setup(e,{emit:t}){const n=t,{t:o}=$t(),s=Uo(new Set),i=Uo(new Set),r=Uo(new Set);function l(m){return!!(m.output&&m.output.length>0||m.meta)}function a(m){if(m.kind==="subagent"&&m.agentId){n("open",m.agentId);return}l(m)&&(s.has(m.id)?s.delete(m.id):s.add(m.id))}function c(m){return!!(m.kind==="subagent"&&m.agentId||l(m))}function u(m){return m==="run"||m==="done"||m==="fail"?m:"pending"}async function d(m,g,b){await Ps(m)&&(b.add(g),setTimeout(()=>b.delete(g),1500))}async function f(m){m.meta&&await d(m.meta,m.id,i)}async function h(m){const g=m.output?.join(` -`)??"";g&&await d(g,m.id,r)}return(m,g)=>(k(),M("div",jTe,[C("div",VTe,[C("span",qTe,N(p(o)("tasks.tag")),1),C("span",KTe,N(e.tasks.length),1)]),C("div",ZTe,[e.tasks.length===0?(k(),M("div",GTe,N(p(o)("tasks.emptyTasks")),1)):(k(!0),M(De,{key:1},vt(e.tasks,b=>(k(),M("div",{key:b.id,class:Fe(["tp-row",{done:b.state==="done",fail:b.state==="fail",expandable:c(b)}])},[C("div",{class:"tp-main",role:c(b)?"button":void 0,onClick:_=>a(b)},[q(R5,{status:u(b.state)},null,8,["status"]),C("span",XTe,N(b.name),1),q(p(Wr),{variant:"neutral",size:"sm"},{default:be(()=>[Ve(N(b.kind),1)]),_:2},1024),C("span",JTe,N(b.timing),1),b.state==="run"?(k(),M("button",{key:0,class:"tp-stop",onClick:Ot(_=>n("cancel",b.id),["stop"])},N(p(o)("tasks.stop")),9,QTe)):te("",!0),b.kind==="subagent"&&b.agentId?(k(),me(p(Me),{key:1,class:"tp-chevron",name:"chevron-right",size:"sm"})):l(b)?(k(),me(p(Me),{key:2,class:Fe(["tp-chevron",{open:s.has(b.id)}]),name:"chevron-right",size:"sm"},null,8,["class"])):te("",!0)],8,YTe),s.has(b.id)&&l(b)?(k(),M("div",eEe,[b.meta?(k(),M("div",tEe,[C("button",{class:Fe(["tp-copy",{copied:i.has(b.id)}]),onClick:Ot(_=>f(b),["stop"])},N(i.has(b.id)?p(o)("tasks.copied"):p(o)("tasks.copy")),11,nEe),C("pre",oEe,[C("code",null,[C("span",sEe,N(b.meta),1)])])])):te("",!0),b.output&&b.output.length>0?(k(),M("div",iEe,[C("button",{class:Fe(["tp-copy",{copied:r.has(b.id)}]),onClick:Ot(_=>h(b),["stop"])},N(r.has(b.id)?p(o)("tasks.copied"):p(o)("tasks.copy")),11,rEe),C("pre",lEe,[C("code",null,[g[0]||(g[0]=Ve(` - `,-1)),(k(!0),M(De,null,vt(b.output,(_,v)=>(k(),M("span",{key:v,class:"tp-line"},N(_),1))),128)),g[1]||(g[1]=Ve(` - `,-1))])])])):te("",!0)])):te("",!0)],2))),128))])]))}}),Kx=mt(aEe,[["__scopeId","data-v-259ccdcd"]]),cEe={class:"todo-card"},uEe={key:0,class:"tc-empty"},dEe={class:"tc-name"},fEe=et({__name:"TodoCard",props:{todos:{}},setup(e){const t=e,{t:n}=$t();function o(s){return s==="in_progress"?"run":s}return(s,i)=>(k(),M("div",cEe,[t.todos.length===0?(k(),M("div",uEe,[i[0]||(i[0]=C("svg",{class:"tc-empty-ico",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.6","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[C("path",{d:"M9 11l2 2 4-4"}),C("rect",{x:"4",y:"4",width:"16",height:"16",rx:"3"})],-1)),C("span",null,N(p(n)("tasks.emptyTodo")),1)])):te("",!0),(k(!0),M(De,null,vt(t.todos,(r,l)=>(k(),M("div",{key:l,class:Fe(["tc-row",`s-${r.status}`])},[q(R5,{status:o(r.status)},null,8,["status"]),C("span",dEe,N(r.title),1)],2))),128))]))}}),pEe=mt(fEe,[["__scopeId","data-v-01c65735"]]),hEe={class:"dock-work-head"},mEe={key:0,class:"dock-work-tab static"},gEe={key:1,class:"dock-work-tab static"},vEe={key:2,class:"dock-work-tab static"},yEe={key:3,class:"dock-work-tab static"},kEe={key:4,class:"dock-work-head-actions"},bEe={key:0,class:"dock-work-foot"},CEe={key:0},wEe={key:1},_Ee={key:0,class:"dock-workbar"},xEe={class:"dw-count"},SEe={class:"dw-count"},AEe={class:"dw-count"},MEe=et({__name:"ChatDock",props:{sessionId:{},running:{type:Boolean},working:{type:Boolean},starting:{type:Boolean},queued:{},searchFiles:{type:Function},uploadImage:{type:Function},status:{},thinking:{},planMode:{type:Boolean},swarmMode:{type:Boolean},goalMode:{type:Boolean},activationBadges:{},models:{},authReady:{type:Boolean},managedSignedIn:{type:Boolean},managedMembership:{},starredIds:{},skills:{},goal:{},dockPanel:{},bashTasks:{},subagentTasks:{},bashRunning:{},subagentRunning:{},todoDoneCount:{},hasDockWork:{type:Boolean},todos:{},pendingQuestion:{},questionBusyKind:{},pendingApproval:{},approvalBusy:{type:Boolean},openFile:{type:Function},mobile:{type:Boolean}},emits:["submit","steer","command","interrupt","setPermission","setThinking","togglePlan","toggleSwarm","toggleGoal","openBtw","createGoal","controlGoal","focusGoal","focusSwarm","compact","pickModel","selectModel","login","answer","dismiss","approval","cancelTask","toggle-dock-panel","close-dock-panel","openAgent"],setup(e,{expose:t,emit:n}){const o=e,s=n,{t:i}=$t(),{confirm:r}=cc(),l=F(()=>{switch(o.goal?.status){case"active":return i("status.goalStatusActive");case"paused":return i("status.goalStatusPaused");case"blocked":return i("status.goalStatusBlocked");case"complete":return i("status.goalStatusComplete");default:return""}}),a=F(()=>{const I=o.goal?.budget.tokenBudget;return!o.goal||!I||I<=0?0:Math.max(0,Math.min(100,Math.round(o.goal.tokensUsed/I*100)))}),c=F(()=>o.goal?bu(o.goal.wallClockMs):"");async function u(){await r({title:i("status.goalCancel"),message:i("status.goalCancelConfirm"),confirmLabel:i("status.goalCancelConfirmYes"),cancelLabel:i("status.goalCancelConfirmNo"),variant:"danger"})&&s("controlGoal","cancel")}const d=K(null),f=F(()=>d.value?.anyPopupOpen===!0),h=K(null),m=K(null);function g(I){return d.value?(d.value.loadForEdit(I),!0):!1}function b(I){d.value?.loadAttachmentsForEdit(I)}function _(){d.value?.focus()}const v=()=>d.value?.isEmpty?.()??!1;function y(I){if(!o.dockPanel)return;const $=I.target;$&&(h.value?.contains($)||$ instanceof Element&&$.closest(".ui-pill")||s("close-dock-panel"))}const w=K(null),x=K(!1),A=K(!1);function L(){const I=w.value;if(!I){x.value=!1,A.value=!1;return}x.value=I.scrollTop>0,A.value=I.scrollTop+I.clientHeight0,A.value=$.scrollTop+$.clientHeight<$.scrollHeight-1}let T=null;Je(()=>o.dockPanel,async I=>{typeof document<"u"&&(document.removeEventListener("mousedown",y,!0),I&&document.addEventListener("mousedown",y,!0)),T?.disconnect(),T=null,I?(await bt(),L(),typeof ResizeObserver=="function"&&w.value&&(T=new ResizeObserver(L),T.observe(w.value))):(x.value=!1,A.value=!1)},{immediate:!0});let R=null;function B(){const I=m.value?.offsetHeight??0;document.documentElement.style.setProperty("--dock-h",`${I}px`)}return cn(()=>{typeof ResizeObserver!="function"||!m.value||(R=new ResizeObserver(B),R.observe(m.value),B())}),kn(()=>{typeof document<"u"&&document.removeEventListener("mousedown",y,!0),R?.disconnect(),R=null,T?.disconnect(),T=null}),t({loadForEdit:g,loadAttachmentsForEdit:b,focus:_,anyPopupOpen:f,isEmpty:v}),(I,$)=>(k(),M("div",{ref_key:"dockRef",ref:m,class:Fe(["chat-dock",[e.mobile?"align-mobile":"align-center",{"has-popup":f.value}]]),onClick:$[31]||($[31]=Ot(()=>{},["stop"]))},[q(gs,{name:"dock-panel"},{default:be(()=>[e.dockPanel?(k(),M("div",{key:0,ref_key:"workPanelRef",ref:h,class:Fe(["dock-work-panel",{"body-scrolled-up":x.value,"body-scrolled-down":A.value}]),onClick:$[5]||($[5]=Ot(()=>{},["stop"]))},[C("div",hEe,[e.dockPanel==="bash"?(k(),M("span",mEe,N(p(i)("tasks.dockBash"))+" · "+N(e.bashRunning)+" "+N(p(i)("tasks.running")),1)):e.dockPanel==="subagent"?(k(),M("span",gEe,N(p(i)("tasks.dockSubagent"))+" · "+N(e.subagentRunning)+" "+N(p(i)("tasks.running")),1)):e.dockPanel==="todos"?(k(),M("span",vEe,N(p(i)("tasks.dockTodos"))+" · "+N(e.todoDoneCount)+"/"+N(e.todos?.length??0),1)):e.dockPanel==="goal"?(k(),M("span",yEe,N(p(i)("status.goalLabel"))+" · "+N(l.value),1)):te("",!0),e.dockPanel==="goal"&&e.goal?(k(),M("span",kEe,[e.goal.status==="active"?(k(),me(p(Rt),{key:0,size:"sm",variant:"secondary",class:"dock-goal-action",onClick:$[0]||($[0]=Ot(D=>s("controlGoal","pause"),["stop"]))},{default:be(()=>[q(p(Me),{name:"pause",size:"md"}),C("span",null,N(p(i)("status.goalPause")),1)]),_:1})):te("",!0),e.goal.status==="paused"||e.goal.status==="blocked"?(k(),me(p(Rt),{key:1,size:"sm",variant:"primary",class:"dock-goal-action",onClick:$[1]||($[1]=Ot(D=>s("controlGoal","resume"),["stop"]))},{default:be(()=>[q(p(Me),{name:"play",size:"md"}),C("span",null,N(p(i)("status.goalResume")),1)]),_:1})):te("",!0),q(p(Rt),{size:"sm",variant:"danger-soft",class:"dock-goal-action",onClick:Ot(u,["stop"])},{default:be(()=>[q(p(Me),{name:"close",size:"md"}),C("span",null,N(p(i)("status.goalCancel")),1)]),_:1})])):te("",!0)]),C("div",{ref_key:"workBodyRef",ref:w,class:"dock-work-body",onScroll:S},[e.dockPanel==="bash"?(k(),me(Kx,{key:0,tasks:e.bashTasks,onCancel:$[2]||($[2]=D=>s("cancelTask",D))},null,8,["tasks"])):e.dockPanel==="subagent"?(k(),me(Kx,{key:1,tasks:e.subagentTasks,onCancel:$[3]||($[3]=D=>s("cancelTask",D)),onOpen:$[4]||($[4]=D=>s("openAgent",D))},null,8,["tasks"])):e.dockPanel==="todos"?(k(),me(pEe,{key:2,todos:e.todos??[]},null,8,["todos"])):e.dockPanel==="goal"&&e.goal?(k(),me(PMe,{key:3,goal:e.goal},null,8,["goal"])):te("",!0)],544),e.dockPanel==="goal"&&e.goal?(k(),M("div",bEe,[C("span",null,N(e.goal.turnsUsed)+" turns",1),C("span",null,N(p(bl)(e.goal.tokensUsed))+" tokens",1),c.value?(k(),M("span",CEe,N(c.value),1)):te("",!0),e.goal.budget.tokenBudget!==null?(k(),M("span",wEe,N(a.value)+"% token budget",1)):te("",!0)])):te("",!0)],2)):te("",!0)]),_:1}),e.hasDockWork?(k(),M("div",_Ee,[e.goal?(k(),me(p(H0),{key:0,active:e.dockPanel==="goal","aria-pressed":e.dockPanel==="goal",onClick:$[6]||($[6]=D=>s("toggle-dock-panel","goal"))},{default:be(()=>[q(p(Me),{name:"target",size:"md"}),C("span",null,N(p(i)("status.goalLabel")),1),C("span",{class:Fe(["dw-goal-status",`dw-goal-status--${e.goal.status}`])},N(l.value),3)]),_:1},8,["active","aria-pressed"])):te("",!0),e.bashTasks.length>0?(k(),me(p(H0),{key:1,active:e.dockPanel==="bash","aria-pressed":e.dockPanel==="bash",onClick:$[7]||($[7]=D=>s("toggle-dock-panel","bash"))},{default:be(()=>[q(p(Me),{name:"clock",size:"md"}),C("span",null,N(p(i)("tasks.dockBash")),1),C("span",xEe,[$[32]||($[32]=Ve("(",-1)),C("b",null,N(e.bashTasks.length),1),$[33]||($[33]=Ve(")",-1))])]),_:1},8,["active","aria-pressed"])):te("",!0),e.subagentTasks.length>0?(k(),me(p(H0),{key:2,active:e.dockPanel==="subagent","aria-pressed":e.dockPanel==="subagent",onClick:$[8]||($[8]=D=>s("toggle-dock-panel","subagent"))},{default:be(()=>[q(p(Me),{name:"sparkles",size:"md"}),C("span",null,N(p(i)("tasks.dockSubagent")),1),C("span",SEe,[$[34]||($[34]=Ve("(",-1)),C("b",null,N(e.subagentTasks.length),1),$[35]||($[35]=Ve(")",-1))])]),_:1},8,["active","aria-pressed"])):te("",!0),(e.todos?.length??0)>0?(k(),me(p(H0),{key:3,active:e.dockPanel==="todos","aria-pressed":e.dockPanel==="todos",onClick:$[9]||($[9]=D=>s("toggle-dock-panel","todos"))},{default:be(()=>[q(p(Me),{name:"check-list",size:"md"}),C("span",null,N(p(i)("tasks.dockTodos")),1),C("span",AEe,[$[36]||($[36]=Ve("(",-1)),C("b",null,N(e.todoDoneCount)+"/"+N(e.todos?.length??0),1),$[37]||($[37]=Ve(")",-1))])]),_:1},8,["active","aria-pressed"])):te("",!0)])):te("",!0),e.pendingQuestion?(k(),me(QMe,{key:e.pendingQuestion.questionId,question:e.pendingQuestion,"busy-kind":e.questionBusyKind,onAnswer:$[10]||($[10]=(D,H)=>s("answer",D,H)),onDismiss:$[11]||($[11]=D=>s("dismiss",D))},null,8,["question","busy-kind"])):e.pendingApproval?(k(),me(UTe,{key:e.pendingApproval.approvalId,class:"dock-approval",block:e.pendingApproval.block,"agent-name":e.pendingApproval.agentName,busy:e.approvalBusy,"open-file":e.openFile,onDecide:$[12]||($[12]=D=>s("approval",e.pendingApproval.approvalId,D))},null,8,["block","agent-name","busy","open-file"])):(k(),me(HN,{key:3,ref_key:"composerRef",ref:d,"session-id":e.sessionId,running:e.running,working:e.working,queued:e.queued,"search-files":e.searchFiles,"upload-image":e.uploadImage,status:e.status,thinking:e.thinking,"plan-mode":e.planMode,"swarm-mode":e.swarmMode,"goal-mode":e.goalMode,goal:e.goal,"activation-badges":e.activationBadges,models:e.models,"auth-ready":e.authReady,"managed-signed-in":e.managedSignedIn,"managed-membership":e.managedMembership,"starred-ids":e.starredIds,skills:e.skills,starting:e.starting,onSubmit:$[13]||($[13]=D=>s("submit",D)),onSteer:$[14]||($[14]=D=>s("steer",D)),onCommand:$[15]||($[15]=D=>s("command",D)),onInterrupt:$[16]||($[16]=D=>s("interrupt")),onSetPermission:$[17]||($[17]=D=>s("setPermission",D)),onSetThinking:$[18]||($[18]=D=>s("setThinking",D)),onTogglePlan:$[19]||($[19]=D=>s("togglePlan")),onToggleSwarm:$[20]||($[20]=D=>s("toggleSwarm")),onToggleGoal:$[21]||($[21]=D=>s("toggleGoal")),onOpenBtw:$[22]||($[22]=D=>s("openBtw")),onCreateGoal:$[23]||($[23]=D=>s("createGoal",D)),onControlGoal:$[24]||($[24]=D=>s("controlGoal",D)),onFocusGoal:$[25]||($[25]=D=>s("focusGoal")),onFocusSwarm:$[26]||($[26]=D=>s("focusSwarm")),onCompact:$[27]||($[27]=D=>s("compact")),onPickModel:$[28]||($[28]=D=>s("pickModel")),onSelectModel:$[29]||($[29]=D=>s("selectModel",D)),onLogin:$[30]||($[30]=D=>s("login"))},null,8,["session-id","running","working","queued","search-files","upload-image","status","thinking","plan-mode","swarm-mode","goal-mode","goal","activation-badges","models","auth-ready","managed-signed-in","managed-membership","starred-ids","skills","starting"]))],2))}}),TEe=mt(MEe,[["__scopeId","data-v-fdb5cf8d"]]),EEe=["aria-label","aria-hidden"],IEe={class:"toc-scroll"},LEe=["onClick"],$Ee={class:"toc-label"},NEe=240,OEe=et({__name:"ConversationToc",props:{items:{},activeTurnId:{},mobile:{type:Boolean},sessionLoading:{type:Boolean},occluded:{type:Boolean}},emits:["select"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=K(null),r=K(!0);let l=null;function a(){const u=i.value,d=u?.offsetParent;if(!u||!d)return;const f=u.getBoundingClientRect().left,h=d.getBoundingClientRect().right;r.value=h-f>=NEe}const c=F(()=>!n.mobile&&!n.sessionLoading&&n.items.length>1);return Je(c,u=>{l?.disconnect(),l=null,u&&bt(()=>{const d=i.value,f=d?.offsetParent;!d||!f||(typeof ResizeObserver<"u"&&(l=new ResizeObserver(a),l.observe(f)),a())})},{immediate:!0}),Dn(()=>{l?.disconnect(),l=null}),(u,d)=>c.value?(k(),M("nav",{key:0,ref_key:"navRef",ref:i,class:Fe(["conversation-toc",{"toc-clipped":!r.value||e.occluded}]),"aria-label":p(s)("conversation.toc"),"aria-hidden":r.value&&!e.occluded?void 0:!0},[C("div",IEe,[(k(!0),M(De,null,vt(e.items,f=>(k(),M("button",{key:f.id,type:"button",class:Fe(["toc-row",{active:e.activeTurnId===f.id}]),onClick:h=>o("select",f.id)},[d[0]||(d[0]=C("span",{class:"toc-bar"},null,-1)),C("span",$Ee,N(f.title),1)],10,LEe))),128))])],10,EEe)):te("",!0)}}),FEe=mt(OEe,[["__scopeId","data-v-b8ba267a"]]);function REe(){if(typeof navigator>"u")return!1;if(/Mac|iPod|iPhone|iPad/.test(navigator.platform))return!0;const e=navigator.userAgentData;return e?.platform==="macOS"||e?.platform==="iOS"}function PEe(e,t=REe()){return(t?e.metaKey&&!e.ctrlKey:e.ctrlKey&&!e.metaKey)&&!e.altKey&&!e.shiftKey&&(e.code==="KeyF"||e.key.toLowerCase()==="f")&&!e.defaultPrevented}const DEe=new Map([["ς","σ"],["ß","ss"],["ſ","s"],["ff","ff"],["fi","fi"],["fl","fl"],["ffi","ffi"],["ffl","ffl"],["ſt","st"],["st","st"],["ʼn","ʼn"],["µ","μ"],["K","k"],["Å","å"],["Ω","ω"]]);function BEe(e){return e==="pre"||e==="pre-wrap"||e==="break-spaces"?"preserve":e==="pre-line"?"pre-line":"collapse"}function HEe(e,t){if(t==="preserve")return{text:e,map:Array.from({length:e.length},(r,l)=>l)};const n=t==="collapse"?/[\t\n\f\r ]/:/[\t ]/;let o="";const s=[];let i=!1;for(let r=0;rZx(u.text)),o="\0";let s="";const i=[];for(let u=0;u0&&e[u].gapBefore&&(s+=o),i[u]=s.length,s+=n[u].folded;const r=UEe(Zx(t).folded);if(r===null)return;const l=new RegExp(r,"g");function a(u){let d=0,f=i.length-1,h=0;for(;d<=f;){const m=d+f>>1;i[m]<=u?(h=m,d=m+1):f=m-1}return h}let c;for(;;){const u=l.exec(s);if(u===null)return;const d=u.index,f=d+u[0].length-1,h=a(d),m=a(f),g=n[h].map[d-i[h]],b=n[m].map[f-i[m]],_={startSeg:h,startOffset:g.start,endSeg:m,endOffset:b.start+b.length};c!==void 0&&c.startSeg===_.startSeg&&c.startOffset===_.startOffset&&c.endSeg===_.endSeg&&c.endOffset===_.endOffset||(c=_,yield _)}}const WEe=/[.*+?^${}()|[\]\\]/g;function UEe(e){const t=[];let n=0;for(;n=ZEe)return{ranges:a,truncated:!0};a.push(f)}}return{ranges:a,truncated:!1}}const zN="kimi-transcript-search",hy="kimi-transcript-search-current";function WN(){return globalThis.CSS?.highlights??null}function b4(e,t){const n=WN(),o=globalThis.Highlight;if(!n||!o)return;if(e.length===0){my();return}const s=new o;for(const r of e)s.add(r);n.set(zN,s);const i=e[t];if(i!==void 0){const r=new o;r.add(i),n.set(hy,r)}else n.delete(hy)}function my(){const e=WN();e?.delete(zN),e?.delete(hy)}const YEe={class:"tsearch-main"},XEe=["placeholder"],JEe={key:0,class:"tsearch-spin"},QEe=["inert"],eIe={class:"tsearch-foot"},tIe={class:"tsearch-count",role:"status"},nIe={class:"tsearch-rings","aria-hidden":"true"},oIe=800,sIe=400,iIe=1500,rIe=et({__name:"TranscriptSearch",props:{pane:{},reveal:{},mobile:{type:Boolean,default:!1}},emits:["close"],setup(e,{expose:t,emit:n}){const o=e,s=n,{t:i}=$t(),{handleCompositionStart:r,handleCompositionEnd:l,isComposingKeyEvent:a}=_r(),c=K(""),u=K(!1),d=K([]),f=K(0),h=K(null),m=F(()=>d.value.length),g=F(()=>c.value.trim()!==""&&!u.value),b=K(!1),_=F(()=>{if(m.value===0)return i("conversation.search.noResults");const Z={current:f.value+1,total:m.value};return b.value?i("conversation.search.resultsCapped",Z):i("conversation.search.results",Z)});let v=null,y=null,w=null,x=null,A=null,L=0;const S=K([]);function T(){const Z=o.pane,ee=d.value[f.value];if(!Z||ee===void 0){S.value=[];return}const Q=Z.getBoundingClientRect(),X=[];for(const oe of ee.getClientRects())X.push({top:`${oe.top-Q.top+Z.scrollTop}px`,left:`${oe.left-Q.left}px`,width:`${oe.width}px`,height:`${oe.height}px`});S.value=X}function R(Z,ee){return Z.type==="attributes"&&Z.target===ee?!0:B(Z)}function B(Z){const ee=Q=>Q instanceof Element&&(Q.classList.contains("tsearch-rings")||Q.closest(".tsearch-rings")!==null);if(ee(Z.target))return!0;if(Z.type==="childList"){const Q=[...Z.addedNodes,...Z.removedNodes];if(Q.length>0&&Q.every(ee))return!0}return!1}function I(){S.value.length!==0&&(A!==null&&clearTimeout(A),A=setTimeout(()=>{A=null,T()},120))}function $(){return o.pane?.querySelector(".chat")??null}function D(){if(v!==null&&(clearTimeout(v),v=null),c.value.trim()===""){u.value=!1,H();return}u.value=!0,v=setTimeout(H,oIe)}function H(Z="first"){v!==null&&(clearTimeout(v),v=null),u.value=!1;const ee=$();if(c.value.trim()===""||ee===null){d.value=[],b.value=!1,f.value=0,my(),T();return}const Q=d.value[f.value],X=Q?.startContainer??null,oe=Q?.startOffset??0,xe=GEe(ee,c.value.trim()),pe=xe.ranges;if(b.value=xe.truncated,d.value=pe,pe.length===0){f.value=0,b4([],0),T();return}if(Z!==!1){const ge=O(pe);f.value=Z==="backward"?(ge-1+pe.length)%pe.length:ge,P();return}const ve=X!==null?pe.findIndex(ge=>ge.startContainer===X&&ge.startOffset===oe):-1;f.value=ve>=0?ve:O(pe),b4(pe,f.value),T()}function O(Z){const ee=o.pane?.getBoundingClientRect().top??0,Q=Z.findIndex(X=>{const oe=X.getClientRects(),xe=oe[oe.length-1];return xe!==void 0&&xe.bottom>=ee});return Q===-1?0:Q}function P(){const Z=d.value[f.value];b4(d.value,f.value),Z!==void 0&&o.reveal(Z),T()}function z(Z){m.value!==0&&(f.value=(f.value+Z+m.value)%m.value,P())}function W(Z){if(Z.key==="Enter"&&!a(Z)){if(Z.preventDefault(),v!==null){H(Z.shiftKey?"backward":"first");return}z(Z.shiftKey?-1:1)}}function U(Z){Z.key==="Escape"&&(a(Z)||(Z.preventDefault(),Z.stopPropagation(),s("close")))}function G(){const Z=h.value;Z&&(Z.focus(),Z.select())}return t({focusInput:G}),cn(()=>{bt(()=>h.value?.focus()),o.pane&&typeof MutationObserver=="function"&&(w=new MutationObserver(ee=>{if(c.value.trim()!==""&&!ee.every(Q=>R(Q,o.pane))&&v===null){if(Date.now()-L>=iIe){L=Date.now(),y!==null&&(clearTimeout(y),y=null),H(!1);return}y!==null&&clearTimeout(y),y=setTimeout(()=>{y=null,v===null&&(L=Date.now(),H(!1))},sIe)}}),w.observe(o.pane,{subtree:!0,childList:!0,characterData:!0,attributes:!0,attributeFilter:["inert","style","class"]})),o.pane?.addEventListener("scroll",I,{passive:!0});const Z=[o.pane,o.pane?.querySelector(".content-wrap")??null];if(typeof ResizeObserver=="function"){x=new ResizeObserver(()=>T());for(const ee of Z)ee&&x.observe(ee)}}),kn(()=>{v!==null&&clearTimeout(v),y!==null&&clearTimeout(y),A!==null&&clearTimeout(A),w?.disconnect(),w=null,x?.disconnect(),x=null,o.pane?.removeEventListener("scroll",I),my()}),(Z,ee)=>(k(),M("div",{class:Fe(["tsearch",{mobile:e.mobile}]),role:"search",onKeydown:U},[C("div",YEe,[q(p(Me),{class:"tsearch-icon",name:"search",size:"sm","aria-hidden":"true"}),An(C("input",{ref_key:"inputRef",ref:h,"onUpdate:modelValue":ee[0]||(ee[0]=Q=>c.value=Q),type:"text",class:"tsearch-input",placeholder:p(i)("conversation.search.placeholder"),autocapitalize:"off",autocomplete:"off",spellcheck:"false",onInput:D,onKeydown:W,onCompositionstart:ee[1]||(ee[1]=(...Q)=>p(r)&&p(r)(...Q)),onCompositionend:ee[2]||(ee[2]=(...Q)=>p(l)&&p(l)(...Q))},null,40,XEe),[[Ys,c.value]]),u.value?(k(),M("span",JEe,[q(p(Ao),{size:"sm",label:p(i)("conversation.search.searching")},null,8,["label"])])):te("",!0),ee[6]||(ee[6]=C("span",{class:"tsearch-sep","aria-hidden":"true"},null,-1)),q(p(mn),{class:"tsearch-close",size:"sm",label:p(i)("conversation.search.close"),onClick:ee[3]||(ee[3]=Q=>s("close"))},{default:be(()=>[q(p(Me),{name:"close"})]),_:1},8,["label"])]),C("div",{class:Fe(["tsearch-foot-wrap",{open:g.value}]),inert:!g.value},[C("div",eIe,[q(p(mn),{size:"sm",label:p(i)("conversation.search.previous"),disabled:m.value===0,onClick:ee[4]||(ee[4]=Q=>z(-1))},{default:be(()=>[q(p(Me),{name:"arrow-up"})]),_:1},8,["label","disabled"]),q(p(mn),{size:"sm",label:p(i)("conversation.search.next"),disabled:m.value===0,onClick:ee[5]||(ee[5]=Q=>z(1))},{default:be(()=>[q(p(Me),{name:"arrow-down"})]),_:1},8,["label","disabled"]),C("span",tIe,N(_.value),1)])],10,QEe),e.pane?(k(),me(Vr,{key:0,to:e.pane},[C("div",nIe,[(k(!0),M(De,null,vt(S.value,(Q,X)=>(k(),M("div",{key:X,class:"tsearch-ring",style:Gt(Q)},null,4))),128))])],8,["to"])):te("",!0)],34))}}),lIe=mt(rIe,[["__scopeId","data-v-4efab220"]]),aIe="/assets/k3_doodle1-27EZ2HSw.riv",cIe={class:"doodle-host"},uIe={key:0,class:"doodle-fallback"},dIe=et({__name:"KimiDoodle",setup(e){const t=K(!1),n=K(null),o=o2();let s=null;return cn(async()=>{if(!window.matchMedia("(prefers-reduced-motion: reduce)").matches)try{let i=function(){const m=d.stateMachineNames[0];if(!m)return;const g=(d.stateMachineInputs(m)??[]).find(b=>b.name==="light/dark");g&&(g.value=o.value?1:0)};const[{Rive:r,RuntimeLoader:l},a,c]=await Promise.all([Po(()=>import("./rive-CeXCFBdn.js").then(m=>m.r),__vite__mapDeps([10,3])),Po(()=>import("./rive-BxcgqsjB.js"),[]).then(m=>m.default),Po(()=>import("./rive_fallback-ByshBW-N.js"),[]).then(m=>m.default)]),u=n.value;if(!u)return;l.setWasmUrl(a),l.setWasmFallbackUrl(c);const d=new r({canvas:u,src:aIe,autoplay:!0,onLoad(){const m=d.stateMachineNames[0];m&&d.play(m),requestAnimationFrame(()=>{n.value&&(i(),d.resizeDrawingSurfaceToCanvas(),t.value=!0)})}}),f=Je(o,i),h=()=>d.resizeDrawingSurfaceToCanvas();window.addEventListener("resize",h),s=()=>{f(),window.removeEventListener("resize",h),d.cleanup()}}catch{}}),Dn(()=>{s?.(),s=null}),(i,r)=>(k(),M("div",cIe,[t.value?te("",!0):(k(),M("div",uIe,[Cn(i.$slots,"fallback",{},void 0,!0)])),C("canvas",{ref_key:"canvasRef",ref:n,class:Fe(["doodle-canvas",{ready:t.value}]),role:"img","aria-label":"Kimi"},null,2)]))}}),fIe=mt(dIe,[["__scopeId","data-v-ca7d2c61"]]),pIe=5;function hIe(e,t,n,o=pIe){if(e.length<=o)return e;const s=e.slice(0,o);if(t&&!s.some(i=>i.id===t)){const i=e.find(r=>r.id===t);i&&(s[o-1]=i)}return s}function mIe(){if(typeof navigator>"u")return!1;if(/Mac|iPod|iPhone|iPad/.test(navigator.platform))return!0;const e=navigator.userAgentData;return e?.platform==="macOS"||e?.platform==="iOS"}function gIe(e,t=mIe()){return(t?e.metaKey&&!e.ctrlKey:e.ctrlKey&&!e.metaKey)&&!e.altKey&&!e.shiftKey&&(e.code==="KeyA"||e.key.toLowerCase()==="a")&&!e.defaultPrevented}function vIe(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement&&(e.isContentEditable||e.closest("input, textarea")!==null)}function yIe(e,t){return typeof Element>"u"||!(e instanceof Element)?null:e.closest(t)}function Yx(e){e.ownerDocument.getSelection()?.selectAllChildren(e)}function kIe(e){return e?e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable===!0:!1}function bIe(e){const{sessionId:t,mobile:n,starting:o,dockedComposer:s,emptyComposer:i}=e,r=K(!1);Je(t,()=>{n()||(r.value=!0)}),Je([r,s,i,o],()=>{if(!r.value)return;const l=s.value??i.value;if(!l)return;const a=typeof document<"u"?document.activeElement:null;if(kIe(a)){r.value=!1;return}l.focus(),(typeof document>"u"||document.activeElement!==a)&&(r.value=!1)},{flush:"post"})}const CIe={class:"empty-hint"},wIe={class:"empty-hint-title"},_Ie={key:1,class:"empty-hint-title is-starting"},xIe={key:2,class:"empty-hint-text"},SIe={key:0,class:"upgrade-banner"},AIe={class:"upgrade-banner-text"},MIe={class:"ws-bar"},TIe={key:0,class:"ws-anchor"},EIe=["aria-expanded"],IIe={class:"ws-chip-name"},LIe={class:"ws-caption"},$Ie=["onClick"],NIe={class:"ws-info"},OIe={class:"ws-name"},FIe={class:"ws-path"},RIe=["aria-label"],PIe={key:0,class:"undo-toast",role:"status","aria-live":"polite"},DIe={class:"undo-toast-text"},BIe=48,i1=80,Xx=1e3,HIe=420,zIe=3e3,WIe=5e3,UIe=1e4,jIe=2500,VIe=et({__name:"ConversationPane",props:{turns:{},sessionId:{},approvals:{},gitInfo:{},tasks:{},todos:{},goal:{},activationBadges:{},status:{},thinking:{},planMode:{type:Boolean},swarmMode:{type:Boolean},goalMode:{type:Boolean},questions:{},pendingQuestionActions:{},pendingApprovalActions:{},running:{type:Boolean},turnActive:{type:Boolean},queued:{},searchFiles:{type:Function},uploadImage:{type:Function},changes:{},fileReloadKey:{},working:{type:Boolean},lastTurnReason:{},overlayOpen:{type:Boolean},starting:{type:Boolean},mobile:{type:Boolean},sessionLoading:{type:Boolean},compaction:{},hasMoreMessages:{type:Boolean},loadingMore:{type:Boolean},loadingMoreError:{type:Boolean},loadOlderMessages:{type:Function},models:{},authReady:{type:Boolean},managedSignedIn:{type:Boolean},managedMembership:{},starredIds:{},skills:{},workspaceName:{},workspaceRoot:{},gitDiffStats:{},workspaces:{},activeWorkspaceId:{},sessionTitle:{},pr:{}},emits:["submit","steer","approval","cancelTask","answer","dismiss","command","interrupt","unqueue","editQueued","reorderQueue","setPermission","setThinking","togglePlan","toggleSwarm","toggleGoal","createGoal","controlGoal","compact","pickModel","selectModel","login","openFile","openMedia","openTurnDiff","openCompaction","openAgent","openChanges","refreshGitStatus","editMessage","selectWorkspace","addWorkspace","openPr","renameSession","forkSession","archiveSession","exportSession"],setup(e,{expose:t,emit:n}){const{t:o}=$t(),s=e,i=n,r=K(!1),l=K(!1),a=K(null),c=F(()=>s.workspaces?.find(_e=>_e.id===s.activeWorkspaceId)?.name??s.workspaceName??""),u=F(()=>(s.workspaces?.length??0)>0),d=F(()=>s.authReady===!1&&(s.models?.length??0)===0&&s.managedSignedIn===!0&&s.managedMembership==="free"),f=F(()=>hIe(s.workspaces??[],s.activeWorkspaceId));function h(ye){if(r.value){r.value=!1;return}const _e=ye.currentTarget?.closest(".ws-anchor"),je=_e?.closest(".panes");if(_e instanceof HTMLElement&&je instanceof HTMLElement){const It=_e.getBoundingClientRect(),Jt=je.getBoundingClientRect(),fn=Jt.bottom-It.bottom-4,to=It.top-Jt.top-4;l.value=to>fn;const fo=Math.max(0,Math.floor(l.value?to:fn));a.value=`min(calc(var(--space-8) * 10), ${fo}px)`}else l.value=!1,a.value=null;r.value=!0}function m(ye){r.value=!1,ye!==s.activeWorkspaceId&&i("selectWorkspace",ye)}Qi(ln.contentAlign);const g=K(null),b=K(null),_=K(null),v=K(!1);let y=null;function w(ye,_e){const je=_.value??b.value;return!je||je.loadForEdit(ye)===!1?!1:(je.loadAttachmentsForEdit(_e??[]),!0)}function x(){v.value=!0,y!==null&&clearTimeout(y),y=setTimeout(()=>{y=null,v.value=!1},2e3)}const A=F(()=>s.tasks.filter(ye=>ye.kind!=="subagent")),L=F(()=>s.tasks.filter(ye=>ye.kind==="subagent"&&ye.runInBackground)),S=F(()=>A.value.filter(ye=>ye.state==="run").length),T=F(()=>L.value.filter(ye=>ye.state==="run").length);function R(ye){const _e=s.tasks,je=_e.find(Jt=>Jt.id===ye)??_e.find(Jt=>Jt.parentToolCallId===ye);if(je?.agentId)return je.agentId;const It=_e.filter(Jt=>Jt.kind==="subagent"&&!Jt.parentToolCallId&&Jt.agentId);if(It.length===1)return It[0].agentId}Wn("resolveAgentTaskId",R),Wn("pinScroll",bn);const B=F(()=>(s.todos??[]).filter(ye=>ye.status==="done").length),I=F(()=>s.goal!=null||A.value.length>0||L.value.length>0||(s.todos?.length??0)>0||(s.queued?.length??0)>0),$=K(null),D=F(()=>s.gitInfo?s.changes?.length??0:0);function H(ye){$.value=$.value===ye?null:ye}function O(){$.value=null}function P(){s.goal&&($.value="goal")}Je(()=>[s.goal,A.value.length,L.value.length,s.todos?.length],()=>{const ye=$.value;if(ye===null)return;ye==="goal"&&s.goal!=null||ye==="bash"&&A.value.length>0||ye==="subagent"&&L.value.length>0||ye==="todos"&&(s.todos?.length??0)>0||O()});function z(ye){if(ye.role==="compaction")return o("conversation.compactedPlain");if(ye.role==="user"){if(ye.skillActivation)return`/${ye.skillActivation.name}`;if(ye.pluginCommand)return`/${ye.pluginCommand.pluginId}:${ye.pluginCommand.commandName}`;const je=ye.text.trim().replaceAll(/\s+/g," ");return je.length>0?je:"user"}const _e=(ye.text||ye.thinking||"").trim().replaceAll(/\s+/g," ");return _e.length>0?_e:(ye.tools?.length??0)>0?`${ye.tools.length} tools`:"kimi"}const W=F(()=>s.turns.filter(ye=>ye.role==="user").map((ye,_e)=>({id:ye.id,role:ye.role,no:_e+1,title:z(ye)}))),U=K(null);function G(){const ye=ue.value;if(!ye)return;const _e=W.value;if(_e.length===0)return;if(Et()<=i1){U.value=_e[_e.length-1].id;return}if(ee||Z===null){const fn=ye.scrollTop,to=ye.getBoundingClientRect().top,fo=[];for(const Ts of ye.querySelectorAll(".turn-anchor[data-turn-id]")){const hc=Ts.dataset.turnId;hc&&fo.push({id:hc,top:Ts.getBoundingClientRect().top-to+fn})}Z=fo,ee=!1}const je=new Set(_e.map(fn=>fn.id)),It=ye.scrollTop+ye.clientHeight/2;let Jt=null;for(const fn of Z)je.has(fn.id)&&fn.top<=It&&(Jt=fn.id);U.value=Jt??_e[0].id}let Z=null,ee=!0;function Q(){ee=!0}let X=0;function oe(){X||(X=io(()=>{X=0,G()}))}const xe=K(!1);let pe=0;function ve(){pe||(pe=io(()=>{pe=0,ne()}))}function ge(){ve(),Q()}function ne(){const ye=ue.value,_e=!s.mobile&&ye?ye.closest(".con")?.querySelector(".conversation-toc"):null,je=_e?.querySelector(".toc-bar");let It=!1;if(ye&&_e&&je){const Jt=je.getBoundingClientRect(),fn=_e.getBoundingClientRect(),to=Jt.left+Jt.width/2;It=Array.from(ye.querySelectorAll(".table-node-wrapper")).some(fo=>{const Ts=fo.getBoundingClientRect();return Ts.left<=to&&to<=Ts.right&&Ts.topfn.top})}xe.value!==It&&(xe.value=It)}const ae=F(()=>s.questions&&s.questions.length>0?s.questions[0]:void 0),j=F(()=>{const ye=ae.value;if(ye)return s.pendingQuestionActions?.[ye.questionId]}),Y=F(()=>s.approvals&&s.approvals.length>0?s.approvals[0]:void 0),fe=F(()=>{const ye=Y.value;return ye?!!s.pendingApprovalActions?.[ye.approvalId]:!1}),ue=K(null),de=K(null),J=K(0),se=K(0),ce=K(!1),he=K(null);let Ie=null;function Ge(){if(s.turns.length!==0){if(ce.value){he.value?.focusInput();return}Ie=document.activeElement,ce.value=!0}}function we(){ce.value=!1,bt(()=>{Ie instanceof HTMLElement&&Ie.isConnected&&Ie.focus(),Ie=null})}Je(()=>s.turns.length===0&&!s.sessionLoading,ye=>{ye&&ce.value&&we()});const Te=F(()=>({"--panes-scrollbar-width":`${J.value}px`})),st=F(()=>({"--chat-dock-height":`${se.value+BIe}px`}));function Ne(ye){return ye instanceof HTMLElement?ye:ye&&"$el"in ye&&ye.$el instanceof HTMLElement?ye.$el:null}let Re=0;function Ze(){Re||(Re=io(()=>{Re=0;const ye=ue.value,_e=ye?Math.max(0,ye.offsetWidth-ye.clientWidth):0;_e!==J.value&&(J.value=_e);const je=de.value?.offsetHeight??0;je!==se.value&&(se.value=je)}))}function gt(ye){const _e=Ne(ye);_e!==ue.value&&(ue.value=_e,_e&&Ue())}function Pt(ye){const _e=Ne(ye);_e!==de.value&&(de.value=_e??null,ye&&"loadForEdit"in ye&&typeof ye.loadForEdit=="function"&&"focus"in ye&&typeof ye.focus=="function"?_.value={loadForEdit:ye.loadForEdit.bind(ye),loadAttachmentsForEdit:"loadAttachmentsForEdit"in ye&&typeof ye.loadAttachmentsForEdit=="function"?ye.loadAttachmentsForEdit.bind(ye):()=>{},focus:ye.focus.bind(ye),get anyPopupOpen(){return"anyPopupOpen"in ye&&ye.anyPopupOpen===!0},isEmpty:"isEmpty"in ye&&typeof ye.isEmpty=="function"?ye.isEmpty.bind(ye):void 0}:_.value=null,Ae())}const Tt=K(!0),He=K(!1),tt=K(!1);let qe=null;function Et(){const ye=ue.value;return ye?vs-ye.scrollTop-ir:0}let ft=0,en=0,Vt=0,qn=0,nn=0,rn=0,Sn=0;function Gn(){return Date.now(){tt.value=!1,qe=null},900);const ye=ue.value;if(!ye)return;const _e=ye.scrollTop;if(Hs()){ft=_e;return}if(performance.now()-Vt<100){ft=_e;return}const je=Et();if(Gn()){Tt.value=!0,He.value=!1,ft=_e;return}_e1?ye.scrollHeight-_e-ye.clientHeight>1&&(Tt.value=!1,He.value=!0):je<=i1&&_e>ft+1&&Date.now()>=qn&&(Tt.value=!0,He.value=!1),ft=_e,oe()}function po(ye=!1){const _e=ue.value;Tt.value=!0,He.value=!1,Zt(),_e&&(!ye&&performance.now(){zt=0;const fn=Math.min(1,(performance.now()-It)/ye),to=1-Math.pow(1-fn,3);_e.scrollTop=je+(_e.scrollHeight-je)*to,ft=_e.scrollTop,fn<1?zt=io(Jt):nn=0};zt=io(Jt)}function ho(ye,_e){return(_e.closest("[inert]")?.closest(".tool-group, .activity-run, .turn-fold")??_e).getBoundingClientRect().top-ye.getBoundingClientRect().top+ye.scrollTop}function Vo(ye,_e){const je=Array.from(ye.querySelectorAll(".turn-anchor[data-turn-id], [data-scroll-anchor-id]")).map(fn=>({node:fn,top:ho(ye,fn)})),It=je.findIndex(fn=>fn.top>=_e),Jt=It<0?Math.max(0,je.length-1):It;return je.slice(Jt,Jt+2).flatMap(fn=>{const to=fn.node.dataset.scrollAnchorId,fo=to??fn.node.dataset.turnId;return fo?[{kind:to?"tool":"turn",id:fo,top:fn.top}]:[]})}const yn=new Map;function qo(ye,_e){for(const je of _e.anchors){const It=je.kind==="tool"?"data-scroll-anchor-id":"data-turn-id",Jt=ye.querySelector(`[${It}="${it(je.id)}"]`);if(Jt)return ho(ye,Jt)-je.top}return ye.scrollHeight-_e.oldHeight}function Co(ye,_e,je=ye.scrollTop){return ye.scrollTop=je+qo(ye,_e),ft=ye.scrollTop,ye.scrollTop}async function At(){if(!s.sessionId||!s.loadOlderMessages||s.loadingMore||Ke.value||!s.hasMoreMessages)return;const ye=s.sessionId,_e=ue.value,je=_e?.scrollTop??0,It={anchors:_e?Vo(_e,je):[],oldHeight:_e?.scrollHeight??0};_n(ye,!0),rr();try{if(await bt(),await s.loadOlderMessages(ye),await bt(),s.sessionId!==ye){yn.set(ye,It);return}const Jt=ue.value;if(!Jt)return;Co(Jt,It),yn.delete(ye)}finally{_n(ye,!1)}}function it(ye){return typeof CSS<"u"&&typeof CSS.escape=="function"?CSS.escape(ye):ye.replaceAll(/["\\]/g,"\\$&")}let ut=null;function Zt(){ut!==null&&(clearTimeout(ut),ut=null)}function vn(ye){Ar(),Tt.value=!1,He.value=Et()>i1,ye.scrollIntoView({behavior:"smooth",block:"center"}),Zt(),ut=setTimeout(()=>{ut=null;const _e=ue.value;if(!_e||!ye.isConnected)return;const je=ye.getBoundingClientRect().top+ye.offsetHeight/2-(_e.getBoundingClientRect().top+_e.clientHeight/2);Math.abs(je)>48&&(_e.scrollTop+=je)},480)}function eo(ye){const _e=ue.value;if(!_e)return;const je=_e.querySelector(`.turn-anchor[data-turn-id="${it(ye)}"]`);je&&vn(je)}function uo(ye,_e){const je=ye.startContainer.parentElement;if(je!==null)for(let It=je;It!==null&&It!==_e;It=It.parentElement){const Jt=getComputedStyle(It),fn=/(auto|scroll)/.test(Jt.overflowY)&&It.scrollHeight>It.clientHeight,to=/(auto|scroll)/.test(Jt.overflowX)&&It.scrollWidth>It.clientWidth;if(!fn&&!to)continue;const fo=ye.getClientRects()[0];if(!fo)return;const Ts=It.getBoundingClientRect();fn&&(It.scrollTop+=fo.top+fo.height/2-(Ts.top+It.clientHeight/2)),to&&(It.scrollLeft+=fo.left+fo.width/2-(Ts.left+It.clientWidth/2))}}function Lo(ye){const _e=ue.value;if(!_e)return;const je=ye.startContainer.parentElement;Ar(),Tt.value=!1,He.value=Et()>i1,qn=Date.now()+700;const It=je?.closest(".u-text-wrap.is-clamped");if(It){It.querySelector(".u-text-toggle")?.click(),bt(()=>Ho(ye,_e));return}Ho(ye,_e)}function Ho(ye,_e){const je=ye.startContainer.parentElement;uo(ye,_e);const It=ye.getClientRects()[0];if(!It){je instanceof HTMLElement&&vn(je);return}const Jt=_e.getBoundingClientRect(),fn=It.top+It.height/2-(Jt.top+_e.clientHeight/2),to=typeof window>"u"||!window.matchMedia("(prefers-reduced-motion: reduce)").matches;_e.scrollTo({top:_e.scrollTop+fn,behavior:to?"smooth":"auto"}),Zt(),ut=setTimeout(()=>{ut=null;const fo=ue.value,Ts=ye.getClientRects()[0];if(!fo||!Ts)return;const hc=fo.getBoundingClientRect(),Sl=Ts.top+Ts.height/2-(hc.top+fo.clientHeight/2);Math.abs(Sl)>48&&(fo.scrollTop+=Sl)},480)}function Xs(){const ye=ue.value;if(!ye)return"none";const _e=ye.firstElementChild,je=_e instanceof HTMLElement?_e.offsetHeight:0,It=de.value?.offsetHeight??0;return`${ye.scrollHeight}:${ye.clientHeight}:${je}:${It}`}function io(ye){return typeof requestAnimationFrame=="function"?requestAnimationFrame(ye):setTimeout(ye,16)}function Yn(ye){typeof cancelAnimationFrame=="function"?cancelAnimationFrame(ye):clearTimeout(ye)}let ro=0,$o=0,as=null,mo=0;const Ko=K(!1);function Hs(){return performance.now(){if($o=0,!as)return;if(Tt.value){as=null,Ko.value=!1;return}if(performance.now()>=ro){as=null,Ko.value=!1,Fi();return}const Jt=as.getBoundingClientRect().top-mo;Jt&&(je.scrollTop+=Jt),$o=io(It)};$o=io(It)}function Fi(){Et()<=i1?(Tt.value=!0,He.value=!1):(Tt.value=!1,He.value=!0)}function Hn(ye=36,_e){if(!Tt.value&&!Gn()){_e?.();return}const je=++Sn;let It="",Jt=0,fn=0;rn&&(Yn(rn),rn=0);const to=()=>{if(rn=0,je!==Sn)return;if(!Tt.value&&!Gn()){_e?.();return}po(!1);const fo=Xs();Jt=fo===It?Jt+1:0,It=fo,fn++,Jt<3&&fn0&&_e.length>=ye.length&&ye.firstId!==_e.firstId&&ye.lastId===_e.lastId&&ye.lastTextLen===_e.lastTextLen&&ye.lastThinkingLen===_e.lastThinkingLen&&ye.lastToolsLen===_e.lastToolsLen&&ye.approvalIds===_e.approvalIds}const Ri=F(()=>{const ye=(s.approvals??[]).map(fn=>fn.approvalId).join(","),_e=s.turns,je=_e.at(-1),It=je?.thinking?.length??0,Jt=je?.tools?.reduce((fn,to)=>fn+to.name.length+(to.arg?.length??0)+(to.output?.join("").length??0),0)??0;return{length:_e.length,firstId:_e[0]?.id??"",lastId:je?.id??"",lastTextLen:je?.text.length??0,lastThinkingLen:It,lastToolsLen:Jt,approvalIds:ye}});let or=s.fileReloadKey;Je(Ri,async(ye,_e)=>{const je=s.fileReloadKey,It=je!==or;if(or=je,Ke.value&&nr(_e,ye)){oe();return}if(It){oe();return}await bt(),Tt.value||Gn()?po(ye.length<_e.length):He.value=!0,oe()}),Je(de,()=>{Ae()}),Je(()=>s.mobile,async()=>{await bt(),Ze()});const Js=new Map,As=K(!1);let Zo=0,wo=null;function an(){As.value=!0,Zo&&(Yn(Zo),Zo=0),wo&&clearTimeout(wo),wo=setTimeout(()=>{As.value=!1,wo=null},1200)}function gi(){if(!As.value)return;let ye=2;const _e=()=>{if(Zo=0,ye--,ye>0){Zo=io(_e);return}As.value=!1,wo&&(clearTimeout(wo),wo=null)};Zo&&Yn(Zo),Zo=io(_e)}Je(()=>s.fileReloadKey,async(ye,_e)=>{const je=ue.value;_e&&je&&Js.set(String(_e),{top:je.scrollTop,following:Tt.value}),Ar(),an(),await bt();const It=ue.value,Jt=ye?Js.get(String(ye)):void 0;if(Jt&&It){const fn=yn.get(String(ye)),to=fn?Co(It,fn,Jt.top):Jt.top;fn&&yn.delete(String(ye)),Tt.value=Jt.following,It.scrollTop=to,ft=It.scrollTop,He.value=!Jt.following&&Et()>1,Jt.following?Hn(36,gi):gi()}else Tt.value=!0,ft=0,po(!1),Hn(36,gi);Q(),G()}),Je(()=>s.sessionLoading,async(ye,_e)=>{ye||!_e||(Tt.value=!0,await bt(),Hn(36,gi),oe())}),Je(()=>s.turnActive,async(ye,_e)=>{ye||!_e||!Tt.value&&!Gn()||(await bt(),Hn(48),oe())});function Ms(){Tt.value=!0,He.value=!1,en=Date.now()+Xx,bt(()=>{po(!0),Hn(16)})}function Pi(ye){Ms(),i("submit",ye)}function sr(ye){Tt.value=!0,He.value=!1,en=Date.now()+Xx,i("editMessage",ye)}function Sr(ye){const _e=s.queued?.[ye],je=_e?.text??"";w(je,_e?.attachments)&&i("editQueued",ye)}function vi(ye){i("reorderQueue",ye)}function zo(ye,_e){Ms(),i("answer",ye,_e)}function No(ye,_e){!ye||!_e||i("approval",ye,_e)}let yi=null,_o=null,Wo=null,cs=null,vs=0,ir=0,dt=0;const Le=K(new Set),Ke=F(()=>!!s.sessionId&&Le.value.has(s.sessionId));function _n(ye,_e){const je=new Set(Le.value);_e?je.add(ye):je.delete(ye),Le.value=je}function ys(){Ke.value||dt||(dt=io(()=>{dt=0,!Ke.value&&(Hs()||(Tt.value||Gn())&&po(!1))}))}function rr(){Sn++,rn&&(Yn(rn),rn=0),dt&&(Yn(dt),dt=0)}function Ar(){const ye=ue.value;if(en=0,qn=0,rr(),ro=0,as=null,Ko.value=!1,zt&&(Yn(zt),zt=0),Zt(),ye){const _e=ye.scrollTop;typeof ye.scrollTo=="function"?ye.scrollTo({top:_e,behavior:"auto"}):ye.scrollTop=_e}nn=0,Vt=Number.NEGATIVE_INFINITY,ye&&(ft=ye.scrollTop)}function Di(){const ye=ue.value;!ye||ye.scrollHeight-ye.clientHeight<=1&&!s.hasMoreMessages||(Tt.value=!1,Ar(),ye.scrollHeight-ye.clientHeight>1&&(He.value=!0))}function Mr(ye){const _e=ue.value;if(!_e)return!1;for(const je of ye.composedPath()){if(je===_e)return!1;if(je instanceof HTMLElement&&je.scrollHeight>je.clientHeight+1&&je.scrollTop>1)return!0}return!1}function Go(ye){ye.defaultPrevented||ye.ctrlKey||ye.shiftKey||(Zt(),!(ye.deltaY>=0||Mr(ye))&&Di())}function lr(ye){const _e=ue.value;if(!_e||ye.defaultPrevented||ye.button!==0||ye.pointerType==="touch")return;const je=_e.getBoundingClientRect(),It=_e.offsetWidth-_e.clientWidth,Jt=It>0?It:12;ye.target===_e&&ye.clientX>=je.right-Jt&&Di()}let Bi=null;function Qs(ye){Bi=ye.touches.length===1?ye.touches[0].clientY:null}function re(ye){const _e=ye.touches.length===1?ye.touches[0].clientY:null;Zt(),_e!==null&&Bi!==null&&_e>Bi+2&&!Mr(ye)&&Di(),Bi=_e}function Ce(){if(!_o)return;const ye=ue.value?.firstElementChild??null;ye!==Wo&&(Wo&&_o.unobserve(Wo),Wo=ye,ye&&_o.observe(ye))}function Ae(){if(!_o)return;const ye=de.value;ye!==cs&&(cs&&_o.unobserve(cs),cs=ye,ye&&_o.observe(ye))}function Ue(){const ye=ue.value;Ze(),yi&&(yi.disconnect(),ye&&yi.observe(ye,{childList:!0,subtree:!0,characterData:!0})),_o&&(_o.disconnect(),Wo=null,cs=null,ye&&_o.observe(ye),Ce(),Ae()),vs=ye?.scrollHeight??0,ir=ye?.clientHeight??0,ve(),Q()}function Qe(){Ce(),ys(),ve(),Q()}function lt(){typeof document>"u"||document.visibilityState==="visible"&&Tt.value&&Hn()}const Se=K(!1);let Oe=null;function ct(){Se.value=!0,Oe!==null&&clearTimeout(Oe),Oe=setTimeout(()=>{Se.value=!1},zIe)}const kt=K(null);let Xt=null;const zn=K(null);let Dt=null,Nt=!1;function on(){kt.value=null,zn.value=null,Nt=!1,Xt!==null&&(clearTimeout(Xt),Xt=null),Dt!==null&&(clearTimeout(Dt),Dt=null)}function so(){for(let ye=s.turns.length-1;ye>=0;ye--){const _e=s.turns[ye];if(_e.goalContinuation)return null;if(_e.role==="user")return _e}return null}function Yo(ye){return Zl(ye).some(_e=>_e.kind==="thinking"&&_e.thinking.trim().length>0||_e.kind==="text"&&_e.text.trim().length>0||_e.kind==="tool")}function _l(){if(kt.value!==null||zn.value!==null||!s.working||(s.queued?.length??0)>0)return;const ye=so();if(ye===null||ye.skillActivation!==void 0||ye.pluginCommand!==void 0)return;s.turns.slice(s.turns.indexOf(ye)+1).every(je=>je.role==="assistant"&&!Yo(je))?(zn.value=ye.id,Nt=!1,Dt=setTimeout(()=>{zn.value=null},UIe)):kt.value=ye.id}let zs=!1,ra=null;function Xr(ye){if(zs)return;on();const _e=s.turns.find(It=>It.id===ye);_e===void 0||_e.role!=="user"||so()?.id!==_e.id||(_.value??b.value)?.isEmpty?.()===!1||(zs=!0,ra=setTimeout(()=>{zs=!1,ra=null},jIe),sr({text:_e.text,attachments:_e.attachments}))}function Eu(){zn.value===null||s.working||!Nt||Xr(zn.value)}Je(()=>s.working,(ye,_e)=>{if(!(_e!==!0||ye)){if(zn.value!==null){Eu();return}kt.value!==null&&Xt===null&&(Xt=setTimeout(()=>{kt.value=null,Xt=null},WIe))}}),Je(()=>so()?.id??null,(ye,_e)=>{ye!==_e&&on()}),Je(()=>s.sessionId,on),Je(()=>s.queued?.length,ye=>{(ye??0)>0&&on()});const la=F(()=>{if(s.lastTurnReason!=="cancelled"||s.working||s.turnActive)return null;const ye=s.turns[s.turns.length-1];return ye?.role==="assistant"&&Yo(ye)?ye.id:null}),yf=F(()=>s.working?null:kt.value);function kf(){i("interrupt")}function B2(){return(_.value?.anyPopupOpen??b.value?.anyPopupOpen)===!0}const{handleCompositionStart:pc,handleCompositionEnd:aa,isComposingKeyEvent:Jp}=_r();let bf=null;function Qp(ye){bf=ye.target}function xl(ye){const _e=ye instanceof Element&&ye!==document.body?ye:bf,je=yIe(_e,".global-preview");if(je){Yx(je);return}const It=ue.value?.querySelector(".chat");It&&Yx(It)}function ei(ye){if(!(ye.target instanceof Element&&ye.target.closest(".terminal-host")!==null)){if(ye.key==="Escape"&&!s.overlayOpen&&!B2()&&!ye.defaultPrevented&&!ye.repeat&&!Jp(ye)){yf.value!==null?(ye.preventDefault(),Xr(yf.value)):s.working&&(ye.preventDefault(),_l(),kf());return}if(PEe(ye)&&!s.overlayOpen&&s.turns.length>0){ye.preventDefault(),Ge();return}gIe(ye)&&!s.overlayOpen&&!vIe(ye.target)&&(ye.preventDefault(),xl(ye.target))}}function Iu(){Tt.value&&ys()}cn(()=>{bt(()=>{typeof MutationObserver=="function"&&(yi=new MutationObserver(Qe)),typeof ResizeObserver=="function"&&(_o=new ResizeObserver(()=>{ve(),Q(),Ze();const ye=ue.value;if(!ye)return;const{scrollHeight:_e,clientHeight:je}=ye,It=_e>vs+1,Jt=je{ue.value?.removeEventListener("kimi-table-layout",ge),yi&&yi.disconnect(),_o&&_o.disconnect(),dt&&Yn(dt),rn&&Yn(rn),$o&&Yn($o),zt&&Yn(zt),pe&&Yn(pe),X&&Yn(X),ut!==null&&clearTimeout(ut),qe&&clearTimeout(qe),Oe!==null&&clearTimeout(Oe),Xt!==null&&clearTimeout(Xt),Dt!==null&&clearTimeout(Dt),ra!==null&&clearTimeout(ra),y!==null&&(clearTimeout(y),y=null),typeof document<"u"&&(document.removeEventListener("visibilitychange",lt),document.removeEventListener("keydown",ei),document.removeEventListener("pointerdown",Qp,!0),document.removeEventListener("compositionstart",pc),document.removeEventListener("compositionend",aa)),window.visualViewport?.removeEventListener("resize",Iu)});function H2(){(_.value??b.value)?.focus()}bIe({sessionId:()=>s.sessionId,mobile:()=>s.mobile===!0,starting:()=>s.starting===!0,dockedComposer:_,emptyComposer:b});function z2(){ct()}function e0(ye){if(zn.value!==null){if(!ye){Nt||on();return}Nt=!0,Eu()}}return t({loadComposerForEdit:w,focusComposer:H2,notifyUndone:z2,onAbortOutcome:e0,selectAllRegion:xl}),(ye,_e)=>(k(),M("section",{class:Fe(["con",{mobile:e.mobile}])},[!e.mobile&&!(e.turns.length===0&&!e.sessionLoading)?(k(),me(mxe,{key:0,"session-id":e.sessionId,"workspace-name":e.workspaceName,"workspace-root":e.workspaceRoot,"session-title":e.sessionTitle,branch:e.gitInfo?.branch,ahead:e.gitInfo?.ahead,behind:e.gitInfo?.behind,"changes-count":D.value,"git-diff-stats":e.gitDiffStats,"is-git-repo":!!e.gitInfo,pr:e.pr,copied:v.value,onOpenChanges:_e[0]||(_e[0]=je=>i("openChanges")),onCopyAll:_e[1]||(_e[1]=je=>g.value?.copyConversation()),onCopyFinalSummary:_e[2]||(_e[2]=je=>g.value?.copyFinalSummary()),onOpenPr:_e[3]||(_e[3]=je=>e.pr&&i("openPr",e.pr.url)),onRenameSession:_e[4]||(_e[4]=(je,It)=>i("renameSession",je,It)),onForkSession:_e[5]||(_e[5]=je=>i("forkSession",je)),onArchiveSession:_e[6]||(_e[6]=je=>i("archiveSession",je)),onExportSession:_e[7]||(_e[7]=je=>i("exportSession",je))},null,8,["session-id","workspace-name","workspace-root","session-title","branch","ahead","behind","changes-count","git-diff-stats","is-git-repo","pr","copied"])):e.mobile?te("",!0):(k(),M("div",{key:1,class:Fe(["empty-drag",{"macos-desktop":p(lu)}])},null,2)),q(FEe,{items:W.value,"active-turn-id":U.value,mobile:e.mobile,"session-loading":e.sessionLoading,occluded:xe.value,onSelect:eo},null,8,["items","active-turn-id","mobile","session-loading","occluded"]),C("div",{class:"chat-layout",style:Gt(st.value)},[C("div",{ref:gt,class:Fe(["panes chat-scroll",{"is-following":Tt.value,"history-prepending":Ke.value,"is-pinned":Ko.value,scrolling:tt.value,"session-settling":As.value}]),onScrollPassive:bo,onWheelPassive:Go,onPointerdownPassive:lr,onTouchstartPassive:Qs,onTouchmovePassive:re},[C("div",{class:Fe(["content-wrap",[e.mobile?"align-mobile":"align-center"]])},[e.turns.length===0&&!e.sessionLoading?(k(),M(De,{key:0},[_e[55]||(_e[55]=C("div",{class:"empty-spacer"},null,-1)),C("div",CIe,[e.starting?(k(),M("span",_Ie,[q(p(Ao),{size:"sm"}),C("span",null,N(p(o)("conversation.starting")),1)])):(k(),me(fIe,{key:0,class:"empty-doodle"},{fallback:be(()=>[C("span",wIe,N(p(o)("composer.emptyConversationTitle")),1)]),_:1})),e.starting?te("",!0):(k(),M("span",xIe,N(p(o)("composer.emptyConversation")),1))]),d.value?(k(),M("div",SIe,[q(p(Me),{class:"upgrade-banner-icon",name:"music",size:"sm"}),C("span",AIe,N(p(o)("composer.upgradeBanner")),1),C("button",{type:"button",class:"upgrade-banner-cta",onClick:_e[8]||(_e[8]=je=>p(Zp)())},N(p(o)("sidebar.upgrade")),1)])):te("",!0),q(HN,{ref_key:"emptyComposerRef",ref:b,class:"empty-composer","session-id":e.sessionId,running:e.running,working:e.working,queued:e.queued,"search-files":e.searchFiles,"upload-image":e.uploadImage,status:e.status,thinking:e.thinking,"plan-mode":e.planMode,"swarm-mode":e.swarmMode,"goal-mode":e.goalMode,goal:e.goal,"activation-badges":e.activationBadges,models:e.models,"auth-ready":e.authReady,"managed-signed-in":e.managedSignedIn,"managed-membership":e.managedMembership,"starred-ids":e.starredIds,skills:e.skills,starting:e.starting,"hide-context":"",onSubmit:Pi,onSteer:_e[11]||(_e[11]=je=>i("steer",je)),onCommand:_e[12]||(_e[12]=je=>i("command",je)),onInterrupt:kf,onUnqueue:_e[13]||(_e[13]=je=>i("unqueue",je)),onEditQueued:_e[14]||(_e[14]=je=>i("editQueued",je)),onSetPermission:_e[15]||(_e[15]=je=>i("setPermission",je)),onSetThinking:_e[16]||(_e[16]=je=>i("setThinking",je)),onTogglePlan:_e[17]||(_e[17]=je=>i("togglePlan")),onToggleSwarm:_e[18]||(_e[18]=je=>i("toggleSwarm")),onToggleGoal:_e[19]||(_e[19]=je=>i("toggleGoal")),onOpenBtw:_e[20]||(_e[20]=je=>i("command","/btw")),onCreateGoal:_e[21]||(_e[21]=je=>i("createGoal",je)),onControlGoal:_e[22]||(_e[22]=je=>i("controlGoal",je)),onFocusGoal:P,onCompact:_e[23]||(_e[23]=je=>i("compact")),onPickModel:_e[24]||(_e[24]=je=>i("pickModel")),onSelectModel:_e[25]||(_e[25]=je=>i("selectModel",je)),onLogin:_e[26]||(_e[26]=je=>i("login"))},YS({_:2},[e.starting?void 0:{name:"footer",fn:be(()=>[C("div",MIe,[u.value?(k(),M("div",TIe,[q(p($n),{text:p(o)("conversation.switchWorkspace")},{default:be(()=>[C("button",{type:"button",class:Fe(["ws-chip",{open:r.value}]),"aria-expanded":r.value,onClick:Ot(h,["stop"])},[q(p(Me),{name:"folder"}),C("span",IIe,N(c.value),1),q(p(Me),{class:"ws-chip-chev",name:"chevron-down",size:"sm"})],10,EIe)]),_:1},8,["text"]),r.value?(k(),M("div",{key:0,class:Fe(["ws-panel",{up:l.value}]),style:Gt(a.value?{maxHeight:a.value}:void 0),role:"menu"},[C("div",LIe,N(p(o)("workspace.recentLabel")),1),(k(!0),M(De,null,vt(f.value,je=>(k(),M("button",{key:je.id,type:"button",class:Fe(["ws-row",{on:je.id===e.activeWorkspaceId}]),role:"menuitem",onClick:Ot(It=>m(je.id),["stop"])},[q(p(Me),{name:"folder"}),C("span",NIe,[C("span",OIe,N(je.name),1),C("span",FIe,N(je.shortPath),1)]),je.id===e.activeWorkspaceId?(k(),me(p(Me),{key:0,class:"ws-check",name:"check",size:"sm"})):te("",!0)],10,$Ie))),128)),_e[54]||(_e[54]=C("div",{class:"ws-divider"},null,-1)),C("button",{type:"button",class:"ws-action",role:"menuitem",onClick:_e[9]||(_e[9]=Ot(je=>{r.value=!1,i("addWorkspace")},["stop"]))},[q(p(Me),{name:"folder-plus"}),C("span",null,N(p(o)("conversation.pickFolder")),1)])],6)):te("",!0)])):(k(),M("button",{key:1,type:"button",class:"ws-chip ws-ghost",onClick:_e[10]||(_e[10]=je=>i("addWorkspace"))},[q(p(Me),{name:"folder-plus"}),C("span",null,N(p(o)("conversation.pickFolder")),1)]))])]),key:"0"}]),1032,["session-id","running","working","queued","search-files","upload-image","status","thinking","plan-mode","swarm-mode","goal-mode","goal","activation-badges","models","auth-ready","managed-signed-in","managed-membership","starred-ids","skills","starting"]),r.value?(k(),M("div",{key:1,class:"ws-backdrop",onClick:_e[27]||(_e[27]=je=>r.value=!1)})):te("",!0),_e[56]||(_e[56]=C("div",{class:"empty-spacer"},null,-1))],64)):(k(),me(B5,{ref_key:"chatPaneRef",ref:g,key:e.fileReloadKey??"no-session",turns:e.turns,cwd:e.status.cwd,approvals:e.approvals,questions:e.questions,"turn-active":e.turnActive,working:e.working,"session-loading":e.sessionLoading,compaction:e.compaction,"has-more-messages":e.hasMoreMessages,"loading-more":e.loadingMore,"loading-more-error":e.loadingMoreError,"is-following":Tt.value,queued:e.queued,"undo-hint-turn-id":yf.value,"interrupted-turn-id":la.value,onOpenFile:_e[28]||(_e[28]=je=>i("openFile",je)),onOpenMedia:_e[29]||(_e[29]=je=>i("openMedia",je)),onOpenTurnDiff:_e[30]||(_e[30]=je=>i("openTurnDiff",je)),onCopyConversationCopied:x,onOpenCompaction:_e[31]||(_e[31]=je=>i("openCompaction",je)),onOpenAgent:_e[32]||(_e[32]=je=>i("openAgent",je)),onEditMessage:sr,onArmedUndo:Xr,onLoadOlderMessages:At,onUnqueue:_e[33]||(_e[33]=je=>i("unqueue",je)),onEditQueued:Sr,onReorderQueue:vi},null,8,["turns","cwd","approvals","questions","turn-active","working","session-loading","compaction","has-more-messages","loading-more","loading-more-error","is-following","queued","undo-hint-turn-id","interrupted-turn-id"]))],2)],34),e.turns.length===0&&!e.sessionLoading?te("",!0):(k(),me(TEe,{key:0,ref:Pt,style:Gt(Te.value),"session-id":e.sessionId,running:e.running,working:e.working,starting:e.starting,queued:e.queued,"search-files":e.searchFiles,"upload-image":e.uploadImage,status:e.status,thinking:e.thinking,"plan-mode":e.planMode,"swarm-mode":e.swarmMode,"goal-mode":e.goalMode,"activation-badges":e.activationBadges,models:e.models,"auth-ready":e.authReady,"managed-signed-in":e.managedSignedIn,"managed-membership":e.managedMembership,"starred-ids":e.starredIds,skills:e.skills,goal:e.goal,"dock-panel":$.value,"bash-tasks":A.value,"subagent-tasks":L.value,"bash-running":S.value,"subagent-running":T.value,"todo-done-count":B.value,"has-dock-work":I.value,todos:e.todos,"pending-question":ae.value,"question-busy-kind":j.value,"pending-approval":Y.value,"approval-busy":fe.value,mobile:e.mobile,onToggleDockPanel:_e[34]||(_e[34]=je=>H(je)),onCloseDockPanel:_e[35]||(_e[35]=je=>O()),onOpenAgent:_e[36]||(_e[36]=je=>i("openAgent",je)),"open-file":je=>i("openFile",je),onAnswer:zo,onDismiss:_e[37]||(_e[37]=je=>i("dismiss",je)),onApproval:No,onCancelTask:_e[38]||(_e[38]=je=>i("cancelTask",je)),onControlGoal:_e[39]||(_e[39]=je=>i("controlGoal",je)),onSubmit:Pi,onSteer:_e[40]||(_e[40]=je=>i("steer",je)),onCommand:_e[41]||(_e[41]=je=>i("command",je)),onInterrupt:kf,onSetPermission:_e[42]||(_e[42]=je=>i("setPermission",je)),onSetThinking:_e[43]||(_e[43]=je=>i("setThinking",je)),onTogglePlan:_e[44]||(_e[44]=je=>i("togglePlan")),onToggleSwarm:_e[45]||(_e[45]=je=>i("toggleSwarm")),onToggleGoal:_e[46]||(_e[46]=je=>i("toggleGoal")),onOpenBtw:_e[47]||(_e[47]=je=>i("command","/btw")),onCreateGoal:_e[48]||(_e[48]=je=>i("createGoal",je)),onFocusGoal:P,onCompact:_e[49]||(_e[49]=je=>i("compact")),onPickModel:_e[50]||(_e[50]=je=>i("pickModel")),onSelectModel:_e[51]||(_e[51]=je=>i("selectModel",je)),onLogin:_e[52]||(_e[52]=je=>i("login"))},null,8,["style","session-id","running","working","starting","queued","search-files","upload-image","status","thinking","plan-mode","swarm-mode","goal-mode","activation-badges","models","auth-ready","managed-signed-in","managed-membership","starred-ids","skills","goal","dock-panel","bash-tasks","subagent-tasks","bash-running","subagent-running","todo-done-count","has-dock-work","todos","pending-question","question-busy-kind","pending-approval","approval-busy","mobile","open-file"]))],4),ce.value?(k(),me(lIe,{key:2,ref_key:"transcriptSearchRef",ref:he,pane:ue.value,mobile:e.mobile,reveal:Lo,onClose:we},null,8,["pane","mobile"])):te("",!0),q(gs,{name:"pill"},{default:be(()=>[He.value?(k(),M("button",{key:0,class:"newmsg-pill",style:Gt({bottom:`${se.value+12}px`}),"aria-label":p(o)("conversation.jumpToLatestAria"),onClick:_e[53]||(_e[53]=je=>po(!0))},[q(p(Me),{class:"pill-chevron",name:"arrow-down",size:"sm"}),Ve(" "+N(p(o)("conversation.newMessages")),1)],12,RIe)):te("",!0)]),_:1}),q(gs,{name:"undo-toast"},{default:be(()=>[Se.value?(k(),M("div",PIe,[C("span",DIe,N(p(o)("conversation.undone")),1)])):te("",!0)]),_:1})],2))}}),qIe=mt(VIe,[["__scopeId","data-v-558d63a3"]]),KIe={key:0,class:"fp-empty fp-error"},ZIe={key:1,class:"fp-empty"},GIe={key:2,class:"fp-loading"},YIe={class:"fp-path"},XIe={class:"fp-meta"},JIe={key:0,class:"fp-lines"},QIe={class:"fp-size"},eLe={key:3,class:"fp-search"},tLe=["placeholder"],nLe={key:0,class:"fp-search-count"},oLe=["href","aria-label"],sLe={key:1,class:"fp-code"},iLe={key:1,class:"fp-body fp-code"},rLe={key:2,class:"fp-body"},lLe=["srcdoc","title"],aLe={key:1,class:"fp-code"},cLe={key:3,class:"fp-body fp-pdf-wrap"},uLe=["src","title"],dLe={key:1,class:"fp-binary-card"},fLe={class:"fp-binary-label"},pLe={key:4,class:"fp-body fp-table-wrap"},hLe={class:"fp-table"},mLe=["data-line"],gLe={key:5,class:"fp-body fp-image-wrap"},vLe=["src","alt"],yLe={key:1,class:"fp-binary-card"},kLe={class:"fp-binary-icon"},bLe={class:"fp-binary-label"},CLe={key:6,class:"fp-body fp-code"},wLe={key:7,class:"fp-body fp-binary-wrap"},_Le={class:"fp-binary-card"},xLe={class:"fp-binary-icon"},SLe={class:"fp-binary-label"},ALe=et({__name:"FilePreview",props:{file:{},loading:{type:Boolean},error:{},line:{},downloadUrl:{},closable:{type:Boolean},externalActions:{type:Boolean},openFile:{type:Function}},emits:["close","openExternal","reveal"],setup(e,{emit:t}){const{t:n}=$t();function o(pe,ve){const ge=ve.startsWith("/"),ne=ve.split("/").filter(Boolean);for(const ae of pe.split("/"))ae===""||ae==="."||(ae===".."?ne.pop():ne.push(ae));return(ge?"/":"")+ne.join("/")}const s=dn("resolveImage",async pe=>pe),i=F(()=>{const pe=c.file?.path??"",ve=pe.lastIndexOf("/");return ve>0?pe.slice(0,ve):""});function r(pe){if(/^(https?:|data:|blob:)/i.test(pe)||pe.startsWith("/")||/^[a-zA-Z]:[\\/]/.test(pe)||pe.startsWith("\\\\"))return pe;const ve=i.value;return ve?o(pe,ve):pe}async function l(pe){const ve=r(pe);return s?s(ve):ve}Wn("resolveImage",l);function a(pe){let ve=pe.path;if(/^(https?:|mailto:|tel:|data:|blob:|#)/i.test(ve)||ve.startsWith("/")||/^[a-zA-Z]:[\\/]/.test(ve)||ve.startsWith("\\\\"))return pe;for(const ne of["#","?"]){const ae=ve.indexOf(ne);ae!==-1&&(ve=ve.slice(0,ae))}const ge=i.value;return{...pe,path:o(ve,ge)}}const c=e,u=t;function d(pe){c.openFile?.(a(pe))}const f=K(null),h=F(()=>{const pe=c.file;if(!pe)return"binary";const ve=pe.mime??"",ge=pe.languageId??"",ne=pe.path.toLowerCase();return ve==="text/markdown"||ge==="markdown"||ge==="md"||ne.endsWith(".mdx")?"markdown":ve==="application/json"||ge==="json"?"json":ve==="text/html"||ge==="html"||ne.endsWith(".html")||ne.endsWith(".htm")?"html":ve==="application/pdf"||ne.endsWith(".pdf")?"pdf":ve==="text/csv"||ge==="csv"||ne.endsWith(".csv")?"csv":ve.startsWith("image/")?"image":pe.isBinary?"binary":ve.startsWith("text/")||ge!==""?"text":"binary"});function m(pe){const ve=atob(pe),ge=Uint8Array.from(ve,ne=>ne.charCodeAt(0));return new TextDecoder().decode(ge)}const g=F(()=>{const pe=c.file;if(!pe)return"";if(pe.encoding==="base64")try{return m(pe.content)}catch{return pe.content}return pe.content}),b=F(()=>{if(h.value!=="json"||!c.file)return"";try{return JSON.stringify(JSON.parse(g.value),null,2)}catch{return g.value}}),_=F(()=>c.file?(h.value==="json"?b.value:g.value).split(` -`):[]),v=F(()=>c.file?h.value==="json"?b.value:g.value:""),y=F(()=>_.value.map((pe,ve)=>ve+1)),w=F(()=>c.file&&v.value.length<=ey?c.file.path:void 0),x=K(""),A=K(0),L=F(()=>{const pe=x.value.trim().toLowerCase();if(!pe)return[];const ve=[];return _.value.forEach((ge,ne)=>{ge.toLowerCase().includes(pe)&&ve.push(ne+1)}),ve});Je(x,()=>{A.value=0});function S(pe,ve=!1){pe&&bt(()=>{const ge=f.value?.querySelector(".fp-body"),ne=ge?.querySelector(`[data-line="${pe}"]`);if(!ge||!ne)return;ve&&(ge.scrollTop=0);const ae=ge.getBoundingClientRect(),j=ne.getBoundingClientRect(),Y=j.top-ae.top+ge.scrollTop;ge.scrollTop=Y-ge.clientHeight/2+j.height/2})}Je(()=>[c.file?.path,c.line],()=>S(c.line,!0),{immediate:!0});function T(pe){const ve=L.value;ve.length!==0&&(A.value=(A.value+pe+ve.length)%ve.length,S(ve[A.value]))}function R(pe){const ve=L.value;return{target:c.line===pe,hit:ve.includes(pe),active:ve[A.value]===pe}}function B(pe){return pe<1024?`${pe} B`:pe<1024*1024?`${(pe/1024).toFixed(1)} KB`:`${(pe/(1024*1024)).toFixed(1)} MB`}const I=K(!1),$=K(!1);function D(){c.file&&Ps(v.value).then(pe=>{pe&&(I.value=!0,setTimeout(()=>{I.value=!1},1400))})}function H(){c.file&&Ps(c.file.path).then(pe=>{pe&&($.value=!0,setTimeout(()=>{$.value=!1},1400))})}const O=K("preview"),P=K("preview"),z=K("fit");function W(pe){O.value=pe}function U(pe){P.value=pe}function G(pe){z.value=pe}Je(h,pe=>{O.value=pe==="html"?"preview":"source",P.value="preview",z.value="fit"});const Z=F(()=>{const pe=c.file;return!pe||h.value!=="image"?null:pe.sourceUrl?pe.sourceUrl:pe.encoding==="base64"?`data:${pe.mime};base64,${pe.content}`:pe.mime==="image/svg+xml"?`data:${pe.mime};charset=utf-8,${encodeURIComponent(pe.content)}`:null}),ee=F(()=>{const pe=c.file;return!pe||h.value!=="pdf"?null:c.downloadUrl?c.downloadUrl:pe.encoding==="base64"?`data:${pe.mime};base64,${pe.content}`:null}),Q=F(()=>c.file?["",'',``,g.value].join(""):"");function X(pe){const ve=[];let ge="",ne=!1;for(let ae=0;ae_.value.slice(0,200).map(X));function xe(pe,ve=55){return!pe||pe.length<=ve?pe:"…"+pe.slice(pe.length-ve+1)}return(pe,ve)=>(k(),M("div",{ref_key:"rootRef",ref:f,class:"file-preview"},[e.error&&!e.loading?(k(),M("div",KIe,[C("span",null,N(e.error),1),e.closable?(k(),me(p(Rt),{key:0,variant:"secondary",size:"sm",onClick:ve[0]||(ve[0]=ge=>u("close"))},{default:be(()=>[Ve(N(p(n)("filePreview.close")),1)]),_:1})):te("",!0)])):!e.file&&!e.loading?(k(),M("div",ZIe,N(p(n)("filePreview.empty")),1)):e.loading?(k(),M("div",GIe,[ve[7]||(ve[7]=C("span",{class:"spinner"},null,-1)),C("span",null,N(p(n)("filePreview.loading")),1)])):e.file?(k(),M(De,{key:3},[q(p(uu),{wrap:"",title:p(n)("common.preview"),closable:e.closable,"close-label":p(n)("filePreview.close"),onClose:ve[6]||(ve[6]=ge=>u("close"))},{default:be(()=>[q(p($n),{text:e.file.path},{default:be(()=>[C("span",YIe,N(xe(e.file.path)),1)]),_:1},8,["text"]),C("span",XIe,[e.file.lineCount?(k(),M("span",JIe,N(p(n)("filePreview.lineCount",{count:e.file.lineCount})),1)):te("",!0),C("span",QIe,N(B(e.file.size)),1)]),h.value==="html"?(k(),me(p(ai),{key:0,"model-value":O.value,size:"sm",options:[{value:"preview",label:p(n)("filePreview.preview")},{value:"source",label:p(n)("filePreview.source")}],"onUpdate:modelValue":W},null,8,["model-value","options"])):te("",!0),h.value==="markdown"?(k(),me(p(ai),{key:1,"model-value":P.value,size:"sm",options:[{value:"preview",label:p(n)("filePreview.preview")},{value:"source",label:p(n)("filePreview.source")}],"onUpdate:modelValue":U},null,8,["model-value","options"])):te("",!0),h.value==="image"?(k(),me(p(ai),{key:2,"model-value":z.value,size:"sm",options:[{value:"fit",label:p(n)("filePreview.fit")},{value:"actual",label:p(n)("filePreview.actual")}],"onUpdate:modelValue":G},null,8,["model-value","options"])):te("",!0),h.value==="text"||h.value==="json"||h.value==="html"||h.value==="csv"?(k(),M("div",eLe,[An(C("input",{"onUpdate:modelValue":ve[1]||(ve[1]=ge=>x.value=ge),class:"fp-search-input",type:"search",placeholder:p(n)("filePreview.search")},null,8,tLe),[[Ys,x.value]]),x.value.trim()?(k(),M("span",nLe,N(L.value.length),1)):te("",!0),q(p(mn),{size:"sm",disabled:L.value.length===0,label:p(n)("filePreview.prevMatch"),onClick:ve[2]||(ve[2]=ge=>T(-1))},{default:be(()=>[q(p(Me),{name:"arrow-up",size:"md"})]),_:1},8,["disabled","label"]),q(p(mn),{size:"sm",disabled:L.value.length===0,label:p(n)("filePreview.nextMatch"),onClick:ve[3]||(ve[3]=ge=>T(1))},{default:be(()=>[q(p(Me),{name:"arrow-down",size:"md"})]),_:1},8,["disabled","label"])])):te("",!0),q(p(mn),{size:"sm",class:Fe({copied:$.value}),label:$.value?p(n)("filePreview.copied"):p(n)("filePreview.copyPath"),onClick:H},{default:be(()=>[$.value?(k(),me(p(Me),{key:1,class:"fp-check",name:"check",size:"md"})):(k(),me(p(Me),{key:0,name:"link",size:"md"}))]),_:1},8,["class","label"]),e.externalActions?(k(),me(p(mn),{key:4,size:"sm",label:p(n)("filePreview.openInEditor"),onClick:ve[4]||(ve[4]=ge=>u("openExternal"))},{default:be(()=>[q(p(Me),{name:"external-link",size:"md"})]),_:1},8,["label"])):te("",!0),e.externalActions?(k(),me(p(mn),{key:5,size:"sm",label:p(n)("filePreview.reveal"),onClick:ve[5]||(ve[5]=ge=>u("reveal"))},{default:be(()=>[q(p(Me),{name:"folder",size:"md"})]),_:1},8,["label"])):te("",!0),e.downloadUrl?(k(),M("a",{key:6,class:"fp-download",href:e.downloadUrl,target:"_blank",rel:"noreferrer",download:"","aria-label":p(n)("filePreview.download")},[q(p(Me),{name:"download",size:"md"})],8,oLe)):te("",!0),!e.file.isBinary&&h.value!=="image"?(k(),me(p(mn),{key:7,size:"sm",class:Fe({copied:I.value}),label:I.value?p(n)("filePreview.copied"):p(n)("filePreview.copy"),onClick:D},{default:be(()=>[I.value?(k(),me(p(Me),{key:1,class:"fp-check",name:"check",size:"md"})):(k(),me(p(Me),{key:0,name:"copy",size:"md"}))]),_:1},8,["class","label"])):te("",!0)]),_:1},8,["title","closable","close-label"]),h.value==="markdown"?(k(),M("div",{key:0,class:Fe(["fp-body",{"fp-markdown":P.value==="preview"}])},[P.value==="preview"?(k(),me(p(Mu),{key:0,text:g.value,"open-file":c.openFile?d:void 0},null,8,["text","open-file"])):(k(),M("div",sLe,[q(Hr,{code:_.value,path:w.value,"line-numbers":y.value,framed:!1,"line-class":R},null,8,["code","path","line-numbers"])]))],2)):h.value==="json"?(k(),M("div",iLe,[q(Hr,{code:_.value,path:w.value,"line-numbers":y.value,framed:!1,"line-class":R},null,8,["code","path","line-numbers"])])):h.value==="html"?(k(),M("div",rLe,[O.value==="preview"?(k(),M("iframe",{key:0,class:"fp-html-frame",sandbox:"",srcdoc:Q.value,title:e.file.path},null,8,lLe)):(k(),M("div",aLe,[q(Hr,{code:_.value,path:w.value,"line-numbers":y.value,framed:!1,"line-class":R},null,8,["code","path","line-numbers"])]))])):h.value==="pdf"?(k(),M("div",cLe,[ee.value?(k(),M("iframe",{key:0,class:"fp-pdf-frame",src:ee.value,title:e.file.path},null,8,uLe)):(k(),M("div",dLe,[C("span",fLe,N(p(n)("filePreview.pdfNoPreview")),1)]))])):h.value==="csv"?(k(),M("div",pLe,[C("table",hLe,[C("tbody",null,[(k(!0),M(De,null,vt(oe.value,(ge,ne)=>(k(),M("tr",{key:ne,class:Fe(R(ne+1)),"data-line":ne+1},[C("th",null,N(ne+1),1),(k(!0),M(De,null,vt(ge,(ae,j)=>(k(),M("td",{key:j},N(ae),1))),128))],10,mLe))),128))])])])):h.value==="image"?(k(),M("div",gLe,[Z.value?(k(),M("img",{key:0,src:Z.value,alt:e.file.path,class:Fe(["fp-image",{actual:z.value==="actual"}])},null,10,vLe)):(k(),M("div",yLe,[C("span",kLe,[q(p(Me),{name:"image-off",size:"lg"})]),C("span",bLe,N(p(n)("filePreview.imageNoPreview",{mime:e.file.mime,size:B(e.file.size)})),1)]))])):h.value==="text"?(k(),M("div",CLe,[q(Hr,{code:_.value,path:w.value,"line-numbers":y.value,framed:!1,"line-class":R},null,8,["code","path","line-numbers"])])):(k(),M("div",wLe,[C("div",_Le,[C("span",xLe,[q(p(Me),{name:"file-off",size:"lg"})]),C("span",SLe,N(p(n)("filePreview.binaryNoPreview",{mime:e.file.mime||p(n)("filePreview.unknownType"),size:B(e.file.size)})),1)])]))],64)):te("",!0)],512))}}),MLe=mt(ALe,[["__scopeId","data-v-72bb9faa"]]),TLe={class:"tp"},ELe=et({__name:"ThinkingPanel",props:{text:{},subtitle:{}},emits:["close"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=K(null);return Je(()=>n.text,()=>{const r=i.value;!r||!(r.scrollHeight-r.scrollTop-r.clientHeight<24)||bt(()=>{i.value&&(i.value.scrollTop=i.value.scrollHeight)})},{immediate:!0}),(r,l)=>(k(),M("div",TLe,[q(p(uu),{title:p(s)("common.preview"),subtitle:e.subtitle??p(s)("thinking.panelTitle"),"close-label":p(s)("thinking.close"),onClose:l[0]||(l[0]=a=>o("close"))},null,8,["title","subtitle","close-label"]),C("pre",{ref_key:"bodyEl",ref:i,class:"tp-body"},N(e.text),513)]))}}),ILe=mt(ELe,[["__scopeId","data-v-b154dd00"]]),LLe=24;function $Le(e){const t=K(null),n=K(!0);let o=null,s=null,i=null,r=0,l=0,a=!1,c=0;function u(){const b=t.value;b&&(b.scrollTop=Math.max(b.scrollTop,r))}function d(){const _=t.value?.firstElementChild??null;_!==i&&(i&&o?.unobserve(i),i=_,_&&o?.observe(_))}function f(){const b=t.value;!b||a||(n.value=r-b.scrollTop-lh(b));return}requestAnimationFrame(()=>{requestAnimationFrame(()=>h(b))})}function g(){const b=t.value;b&&(o?.disconnect(),s?.disconnect(),i=null,a=!1,c++,r=0,l=0,typeof ResizeObserver=="function"?(o=new ResizeObserver(()=>{const _=t.value;if(!_)return;const{scrollHeight:v,clientHeight:y}=_,w=v>r+1,x=y{n.value=!0,bt(g)}),Je(t,()=>void bt(g)),cn(()=>void bt(g)),kn(()=>{c++,o?.disconnect(),s?.disconnect()}),{scroller:t,following:n,onScroll:f,pinScroll:m}}const NLe={class:"agent-panel"},OLe={key:0,class:"agent-fallback"},FLe={key:0,class:"agent-error"},RLe=et({__name:"AgentDetailPanel",props:{member:{},turns:{},running:{type:Boolean},loading:{type:Boolean},loadError:{type:Boolean},hasMore:{type:Boolean},loadingMore:{type:Boolean},loadMoreError:{type:Boolean}},emits:["close","loadOlderMessages","openAgent","openFile","openMedia","openTurnDiff"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=F(()=>n.member.id),{scroller:r,following:l,onScroll:a,pinScroll:c}=$Le(i),u=K(!1);let d=null,f=null;function h(){d!==null&&typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(d),f!==null&&clearTimeout(f),d=null,f=null}Je(i,()=>{u.value=!1,h();const b=()=>{h(),u.value=!0};typeof requestAnimationFrame=="function"?d=requestAnimationFrame(()=>{d=requestAnimationFrame(b)}):f=setTimeout(b,32)},{immediate:!0}),Dn(h);const m=F(()=>{const b=new Set,_=[];for(const v of[n.member.suspendedReason,n.member.text,n.member.outputLines?.join(` -`),n.member.summary]){const y=v?.trim();!y||b.has(y)||(b.add(y),_.push(y))}return _});Wn("pinScroll",()=>{r.value&&c()});function g(b){switch(b){case"queued":return s("tools.swarm.phaseQueued");case"working":return s("tools.swarm.phaseWorking");case"suspended":return s("tools.swarm.phaseSuspended");case"completed":return s("tools.swarm.phaseCompleted");case"failed":return s("tools.swarm.phaseFailed")}}return(b,_)=>(k(),M("div",NLe,[q(p(uu),{title:e.member.name,subtitle:e.member.subagentType,"close-label":p(s)("thinking.close"),onClose:_[0]||(_[0]=v=>o("close"))},{default:be(()=>[q(p(Wr),{variant:"neutral",size:"sm"},{default:be(()=>[Ve(N(g(e.member.phase)),1)]),_:1})]),_:1},8,["title","subtitle","close-label"]),C("div",{ref_key:"scroller",ref:r,class:"agent-transcript",onScrollPassive:_[6]||(_[6]=(...v)=>p(a)&&p(a)(...v))},[u.value?(k(),M(De,{key:0},[e.turns.length===0&&!e.loading&&(e.loadError||m.value.length>0)?(k(),M("div",OLe,[e.loadError?(k(),M("div",FLe,N(p(s)("tasks.transcriptLoadError")),1)):te("",!0),m.value.length>0?(k(),me(tr,{key:1,lines:m.value},null,8,["lines"])):te("",!0)])):(k(),me(B5,{key:1,turns:e.turns,"turn-active":e.running,"session-loading":e.loading&&e.turns.length===0,"has-more-messages":e.hasMore,"loading-more":e.loadingMore,"loading-more-error":e.loadMoreError,"is-following":p(l),"read-only":"",onLoadOlderMessages:_[1]||(_[1]=v=>o("loadOlderMessages")),onOpenAgent:_[2]||(_[2]=v=>o("openAgent",v)),onOpenFile:_[3]||(_[3]=v=>o("openFile",v)),onOpenMedia:_[4]||(_[4]=v=>o("openMedia",v)),onOpenTurnDiff:_[5]||(_[5]=v=>o("openTurnDiff",v))},null,8,["turns","turn-active","session-loading","has-more-messages","loading-more","loading-more-error","is-following"]))],64)):te("",!0)],544)]))}}),PLe=mt(RLe,[["__scopeId","data-v-67524947"]]),DLe={class:"sc"},BLe={key:0,class:"sc-empty"},HLe={key:2,class:"sc-loading"},zLe={class:"sc-composer"},WLe=["placeholder"],ULe=["disabled"],jLe=et({__name:"SideChatPanel",props:{turns:{},running:{type:Boolean},sending:{type:Boolean},title:{},subtitle:{}},emits:["send","close"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=F(()=>n.turns.find(x=>x.role==="user")?.text?.trim()??""),r=F(()=>n.title?.trim()||s("sideChat.title")),l=F(()=>n.subtitle?.trim()?n.subtitle.trim():i.value||s("sideChat.subtitle")),a=K(""),c=K(null),u=K(null);function d(){const w=a.value.trim();w&&(o("send",w),a.value="",bt(()=>{c.value&&(c.value.style.height="auto"),f()}))}function f(){const w=u.value;w&&(w.scrollTop=w.scrollHeight)}Wn("pinScroll",w=>{const x=u.value;if(!x)return;const A=w.getBoundingClientRect().top;requestAnimationFrame(()=>{x.scrollTop+=w.getBoundingClientRect().top-A})});const h=F(()=>{const w=n.turns;if(w.length===0)return"0";const x=w.at(-1),A=x.thinking?.length??0,L=x.tools?.reduce((S,T)=>S+T.name.length+(T.arg?.length??0)+(T.output?.join("").length??0),0)??0;return`${w.length}:${x.text.length}:${A}:${L}`});Je(h,async()=>{!n.running&&!n.sending||(await bt(),f())});const m=F(()=>n.sending?n.turns.at(-1)?.role==="user":!1),{handleCompositionStart:g,handleCompositionEnd:b,isComposingKeyEvent:_}=_r();function v(w){w.key==="Enter"&&!w.shiftKey&&!_(w)&&(w.preventDefault(),d())}function y(){const w=c.value;w&&(w.style.height="auto",w.style.height=`${Math.min(w.scrollHeight,160)}px`)}return(w,x)=>(k(),M("div",DLe,[q(p(uu),{title:r.value,subtitle:l.value,"close-label":p(s)("thinking.close"),onClose:x[0]||(x[0]=A=>o("close"))},null,8,["title","subtitle","close-label"]),C("div",{ref_key:"bodyRef",ref:u,class:"sc-body"},[e.turns.length===0?(k(),M("div",BLe,N(p(s)("sideChat.empty")),1)):(k(),me(B5,{key:1,turns:e.turns,approvals:[],"turn-active":e.running,working:e.sending||e.running,"turn-files-interactive":!1},null,8,["turns","turn-active","working"])),m.value?(k(),M("div",HLe,[q(IN,{label:p(s)("conversation.requesting")},null,8,["label"])])):te("",!0)],512),C("div",zLe,[An(C("textarea",{ref_key:"inputRef",ref:c,"onUpdate:modelValue":x[1]||(x[1]=A=>a.value=A),class:"sc-input",rows:"1",placeholder:p(s)("sideChat.placeholder"),onInput:y,onKeydown:v,onCompositionstart:x[2]||(x[2]=(...A)=>p(g)&&p(g)(...A)),onCompositionend:x[3]||(x[3]=(...A)=>p(b)&&p(b)(...A))},null,40,WLe),[[Ys,a.value]]),q(p($n),{text:p(s)("sideChat.send")},{default:be(()=>[C("button",{type:"button",class:"sc-send",disabled:!a.value.trim(),onClick:d},[q(p(Me),{name:"arrow-right",size:"sm"})],8,ULe)]),_:1},8,["text"])])]))}}),VLe=mt(jLe,[["__scopeId","data-v-b6455a56"]]),qLe={class:"changes-pane"},KLe={class:"dv-path"},ZLe={class:"diff-head"},GLe={class:"back-label"},YLe={key:"loading",class:"empty-state diff-loading"},XLe={key:"lines",class:"dv-lines-wrap"},JLe={key:"empty",class:"empty-state"},QLe={class:"dv-change-count"},e$e={class:"ch-head"},t$e={class:"br-heading"},n$e={class:"br-label"},o$e={class:"br-name"},s$e={key:0,class:"sync-info"},i$e={key:0,class:"ahead"},r$e={key:0,class:"behind"},l$e={key:1,class:"empty-head"},a$e={class:"ch-list-content"},c$e=["onClick"],u$e={class:"fpath"},d$e=["onClick"],f$e={class:"tree-name"},p$e=["onClick"],h$e={class:"tree-name"},m$e={key:2,class:"empty-state"},g$e={class:"empty-state-icon","aria-hidden":"true"},v$e={key:3,class:"empty-state"},y$e=et({__name:"DiffView",props:{changes:{},gitInfo:{},fileDiff:{},fullTexts:{},emptyFile:{type:Boolean},selectedDiffPath:{},fileDiffLoading:{type:Boolean},mode:{default:"full"},hideBack:{type:Boolean,default:!1},closable:{type:Boolean,default:!0}},emits:["open","back","close"],setup(e,{emit:t}){const{t:n}=$t();function o($){return n($===1?"diff.fileCountOne":"diff.fileCountOther",{number:$})}const s=e,i=t;function r($){const D=$.toLowerCase();return D==="modified"?"modified":D==="added"?"added":D==="deleted"?"deleted":D==="renamed"?"renamed":D==="untracked"?"untracked":D==="conflicted"?"conflicted":D==="ignored"?"ignored":D==="clean"?"clean":"unknown"}const l={modified:"M",added:"+",deleted:"−",renamed:"→",untracked:"+",conflicted:"C",ignored:"I",clean:"·",unknown:"?"};function a($){return l[r($)]??"?"}function c($,D=60){return $.length<=D?$:"…"+$.slice($.length-D+1)}const u=F(()=>s.gitInfo!==null),d=F(()=>s.changes.length>0),f=F(()=>(s.selectedDiffPath??null)!==null),h=F(()=>s.mode==="detail"||s.mode==="full"&&f.value),m=F(()=>s.fileDiff??[]),g=F(()=>s.fileDiffLoading===!0);function b($){i("open",$)}function _(){i("back")}function v(){i("close")}const y=K("list");function w($){y.value=$}function x($){const D={children:[]},H=[...$].sort((O,P)=>O.path.localeCompare(P.path));for(const O of H){const P=O.path.endsWith("/"),z=O.path.split("/").filter(Boolean);if(z.length===0)continue;let W=D;for(let U=0;UX.name===G&&X.kind===(Z?"file":"folder"));Q||(Q={name:G,path:ee,kind:Z?"file":"folder",status:Z?O.status:void 0,children:[]},W.children.push(Q)),W=Q}}return D.children}const A=F(()=>x(s.changes)),L=K(new Set);function S($){return!L.value.has($)}const T=F(()=>{const $=[];function D(H,O){for(const P of H)$.push({node:P,depth:O}),P.kind==="folder"&&S(P.path)&&D(P.children,O+1)}return D(A.value,0),$});function R($){const D=new Set(L.value);D.has($.path)?D.delete($.path):D.add($.path),L.value=D}function B($){return`calc(var(--tree-base-indent) + ${$} * var(--tree-indent-step))`}function I($){return{paddingLeft:B($),"--tree-depth":String($)}}return($,D)=>(k(),M("div",qLe,[h.value?(k(),M(De,{key:0},[q(p(uu),{title:p(n)("diff.title"),closable:e.closable,"close-label":p(n)("diff.close"),onClose:v},{default:be(()=>[q(p($n),{text:e.selectedDiffPath??""},{default:be(()=>[C("span",KLe,N(c(e.selectedDiffPath??"",50)),1)]),_:1},8,["text"])]),_:1},8,["title","closable","close-label"]),C("div",ZLe,[e.hideBack?te("",!0):(k(),me(p(Rt),{key:0,variant:"ghost",size:"sm",onClick:_},{default:be(()=>[q(p(Me),{name:"arrow-left",size:"sm"}),C("span",GLe,N(p(n)("diff.back")),1)]),_:1}))]),q(gs,{name:"diff-content",mode:"out-in"},{default:be(()=>[g.value?(k(),M("div",YLe,[q(p(Ao),{size:"md"}),C("span",null,N(p(n)("diff.loading")),1)])):m.value.length>0?(k(),M("div",XLe,[q(Hr,{lines:m.value,path:e.selectedDiffPath??void 0,"line-numbers":"",framed:!1,"full-texts":e.fullTexts??null},null,8,["lines","path","full-texts"])])):(k(),M("div",JLe,N(e.emptyFile?p(n)("diff.emptyFile"):p(n)("diff.noDiff")),1))]),_:1})],64)):(k(),M(De,{key:1},[q(p(uu),{title:p(n)("diff.title"),closable:e.closable,"close-label":p(n)("diff.close"),onClose:v},{default:be(()=>[C("span",QLe,N(o(e.changes.length)),1),q(p(ai),{"model-value":y.value,size:"sm",options:[{value:"list",label:p(n)("diff.list"),icon:"list"},{value:"tree",label:p(n)("diff.tree"),icon:"tree-view"}],"onUpdate:modelValue":w},null,8,["model-value","options"])]),_:1},8,["title","closable","close-label"]),C("div",e$e,[u.value?(k(),M(De,{key:0},[C("span",t$e,[q(p(Me),{class:"br-icon",name:"git-fork",size:"sm"}),C("span",n$e,N(p(n)("diff.branch")),1)]),C("span",o$e,N(e.gitInfo.branch),1),e.gitInfo.ahead>0||e.gitInfo.behind>0?(k(),M("span",s$e,[q(p($n),{text:p(n)("diff.aheadTitle")},{default:be(()=>[e.gitInfo.ahead>0?(k(),M("span",i$e,"↑"+N(e.gitInfo.ahead),1)):te("",!0)]),_:1},8,["text"]),q(p($n),{text:p(n)("diff.behindTitle")},{default:be(()=>[e.gitInfo.behind>0?(k(),M("span",r$e,"↓"+N(e.gitInfo.behind),1)):te("",!0)]),_:1},8,["text"])])):te("",!0)],64)):(k(),M("span",l$e,N(p(n)("diff.empty")),1))]),d.value&&y.value==="list"?(k(),me(p(Ak),{key:0,class:"ch-list"},{default:be(()=>[C("div",a$e,[(k(!0),M(De,null,vt(e.changes,H=>(k(),me(p($n),{key:H.path,text:H.path},{default:be(()=>[C("button",{type:"button",class:"ch-row",onClick:O=>b(H.path)},[C("span",{class:Fe(["badge",r(H.status)])},N(a(H.status)),3),C("span",u$e,N(c(H.path)),1)],8,c$e)]),_:2},1032,["text"]))),128))])]),_:1})):d.value&&y.value==="tree"?(k(),me(p(Ak),{key:1,class:"ch-list ch-tree"},{default:be(()=>[q(OA,{name:"tree-collapse",tag:"ul",class:"tree-list ch-list-content"},{default:be(()=>[(k(!0),M(De,null,vt(T.value,({node:H,depth:O})=>(k(),M("li",{key:H.path,class:"tree-node"},[H.kind==="folder"?(k(),M("button",{key:0,type:"button",class:"tree-row tree-folder",style:Gt(I(O)),onClick:P=>R(H)},[q(p(Me),{class:"tree-icon",name:"folder-solid",size:"sm"}),C("span",f$e,N(H.name),1)],12,d$e)):(k(),me(p($n),{key:1,text:H.path},{default:be(()=>[C("button",{type:"button",class:"tree-row tree-file",style:Gt(I(O)),onClick:P=>b(H.path)},[C("span",{class:Fe(["badge",r(H.status)])},N(a(H.status)),3),C("span",h$e,N(H.name),1)],12,p$e)]),_:2},1032,["text"]))]))),128))]),_:1})]),_:1})):u.value?(k(),M("div",m$e,[C("span",g$e,[q(p(Me),{name:"check",size:"lg"})]),Ve(" "+N(p(n)("diff.clean")),1)])):(k(),M("div",v$e,N(p(n)("diff.empty")),1))],64))]))}}),k$e=mt(y$e,[["__scopeId","data-v-e1daffaf"]]),b$e={class:"td"},C$e={class:"td-path"},w$e={class:"td-body"},_$e={key:1,class:"td-empty"},x$e=et({__name:"TurnDiffPanel",props:{change:{},cwd:{},closable:{type:Boolean}},emits:["close","openFile"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=F(()=>{const a=n.cwd?S2(n.change.path,n.cwd):null;return r(a??n.change.path)});function r(a,c=48){return!a||a.length<=c?a:"…"+a.slice(a.length-c+1)}const l=F(()=>n.change.diff!==null&&n.change.diff.length>0);return(a,c)=>(k(),M("div",b$e,[q(p(uu),{title:p(s)("conversation.turnFiles.diffTitle"),closable:e.closable,"close-label":p(s)("filePreview.close"),onClose:c[1]||(c[1]=u=>o("close"))},{default:be(()=>[q(p($n),{text:e.change.path},{default:be(()=>[C("span",C$e,N(i.value),1)]),_:1},8,["text"]),q(p(mn),{size:"sm",label:p(s)("conversation.turnFiles.openFile"),onClick:c[0]||(c[0]=u=>o("openFile",e.change.path))},{default:be(()=>[q(p(Me),{name:"external-link",size:"md"})]),_:1},8,["label"])]),_:1},8,["title","closable","close-label"]),C("div",w$e,[l.value?(k(),me(Hr,{key:0,lines:e.change.diff,path:e.change.path,framed:!1},null,8,["lines","path"])):(k(),M("div",_$e,[C("p",null,N(p(s)("conversation.turnFiles.diffUnavailable")),1),q(p(Rt),{variant:"ghost",size:"sm",onClick:c[2]||(c[2]=u=>o("openFile",e.change.path))},{default:be(()=>[Ve(N(p(s)("conversation.turnFiles.openFile")),1)]),_:1})]))])]))}}),S$e=mt(x$e,[["__scopeId","data-v-da704fc4"]]);function UN(e,t){let n=null;cn(()=>{n=typeof document<"u"&&document.activeElement instanceof HTMLElement?document.activeElement:null,bt(()=>{const o=t?.value??e.value;try{o?.focus()}catch{}})}),Dn(()=>{const o=n;if(n=null,!(!o||typeof document>"u"||!document.contains(o)))try{o.focus()}catch{}})}const A$e={class:"search-wrap"},M$e=["aria-label"],T$e=["aria-label"],E$e=["aria-pressed","onClick"],I$e={key:1,class:"state-row"},L$e={key:2,class:"state-row unavail"},$$e=["aria-label"],N$e=["aria-selected","onClick","onMouseenter"],O$e={class:"model-main"},F$e={class:"model-name"},R$e={class:"model-meta"},P$e={class:"model-side"},D$e={key:0,class:"empty"},B$e={class:"footer-hint","aria-hidden":"true"},H$e=et({__name:"ModelPicker",props:{models:{},current:{},starredIds:{},loading:{type:Boolean},unavailable:{type:Boolean}},emits:["select","toggle-star","close"],setup(e,{emit:t}){const{t:n}=$t(),o=e,s=t,i=F(()=>new Set(o.starredIds??[]));function r(B){return i.value.has(B)}const l=K(""),a=K(null),c=K(null),u=K(null),d=K("all"),f={image_in:"model.capabilityImageInput",video_in:"model.capabilityVideoInput",tool_use:"model.capabilityToolUse",thinking:"model.capabilityThinking",always_thinking:"model.capabilityAlwaysThinking"};function h(B){const I=f[B];return I?n(I):B.replaceAll("_"," ")}function m(B){const I=[B.provider,n("model.contextSuffix",{size:bl(B.maxContextSize)})];for(const $ of B.capabilities??[])I.push(h($));return I.join(" · ")}UN(c,a);const g=F(()=>{const B=new Set,I=[{id:"all",label:n("model.allTab")}];for(const $ of o.models)B.has($.provider)||(B.add($.provider),I.push({id:$.provider,label:$.provider}));return I}),b=F(()=>{const B=l.value.toLowerCase().trim(),I=o.models.filter($=>{if(d.value!=="all"&&$.provider!==d.value)return!1;const D=($.displayName??$.model).toLowerCase().includes(B),H=$.provider.toLowerCase().includes(B),O=$.id.toLowerCase().includes(B);return!B||D||H||O});return d.value!=="all"?I:I.sort(($,D)=>{const H=r($.id)?1:0;return(r(D.id)?1:0)-H})}),_=F(()=>b.value),v=K(0);Je([l,d],()=>{v.value=0}),Je(g,B=>{B.some(I=>I.id===d.value)||(d.value="all")}),Je(_,B=>{v.value=Math.min(v.value,Math.max(B.length-1,0))}),Je(v,async()=>{await bt(),u.value?.querySelector(".model-row.is-selected")?.scrollIntoView({block:"nearest"})});const{handleCompositionStart:y,handleCompositionEnd:w,isComposingKeyEvent:x}=_r();function A(B){if(!x(B)){if(B.key==="Escape"){s("close");return}if(B.key==="ArrowDown")B.preventDefault(),v.value=Math.min(v.value+1,_.value.length-1);else if(B.key==="ArrowUp")B.preventDefault(),v.value=Math.max(v.value-1,0);else if(B.key==="Enter"){const I=_.value[v.value];I&&s("select",I.id)}}}cn(()=>{document.addEventListener("keydown",A)}),kn(()=>{document.removeEventListener("keydown",A)});function L(B){s("select",B)}function S(){l.value="",a.value?.focus()}function T(B){return _.value.indexOf(B)}function R(B){d.value=B}return(B,I)=>(k(),me(p(sa),{open:!0,"close-on-esc":!1,title:p(n)("model.title"),size:"lg",height:"fixed",padded:!1,onClose:I[1]||(I[1]=$=>s("close"))},{default:be(()=>[C("div",{ref_key:"dialogRef",ref:c,class:"mp"},[C("div",A$e,[q(p(Os),{ref_key:"searchRef",ref:a,modelValue:l.value,"onUpdate:modelValue":I[0]||(I[0]=$=>l.value=$),placeholder:p(n)("model.searchPlaceholder"),autocomplete:"off",spellcheck:"false",autofocus:"",onCompositionstart:p(y),onCompositionend:p(w)},null,8,["modelValue","placeholder","onCompositionstart","onCompositionend"]),C("button",{type:"button",class:Fe(["search-clear",{"is-on":l.value.length>0}]),tabindex:"-1","aria-label":p(n)("model.clearSearch"),onClick:S},[q(p(Me),{name:"close",size:"sm"})],10,M$e)]),g.value.length>1?(k(),M("div",{key:0,class:"chip-strip","aria-label":p(n)("model.providerTabs")},[(k(!0),M(De,null,vt(g.value,$=>(k(),M("button",{key:$.id,type:"button",class:Fe(["chip",{"is-active":$.id===d.value}]),"aria-pressed":$.id===d.value,onClick:D=>R($.id)},N($.label),11,E$e))),128))],8,T$e)):te("",!0),e.loading?(k(),M("div",I$e,[q(p(Ao),{size:"sm"}),C("span",null,N(p(n)("model.loading")),1)])):e.unavailable?(k(),M("div",L$e,[q(p(Me),{name:"alert-triangle",size:"lg"}),C("span",null,N(p(n)("model.unavailable")),1)])):(k(),M("div",{key:3,ref_key:"listRef",ref:u,class:"model-list",role:"listbox","aria-label":p(n)("model.title")},[(k(!0),M(De,null,vt(_.value,$=>(k(),M("div",{key:$.id,class:Fe(["model-row",{"is-current":$.id===e.current,"is-selected":T($)===v.value}]),role:"option","aria-selected":$.id===e.current,onClick:D=>L($.id),onMouseenter:D=>v.value=T($)},[C("span",O$e,[C("span",F$e,N($.displayName??$.model),1),C("span",R$e,N(m($)),1)]),C("span",P$e,[$.id===e.current?(k(),me(p(Me),{key:0,class:"model-check",name:"check",size:"sm"})):te("",!0),q(p(mn),{class:Fe(["model-star",{"is-starred":r($.id)}]),size:"sm",label:r($.id)?p(n)("model.unstarTitle"):p(n)("model.starTitle"),onClick:Ot(D=>s("toggle-star",$.id),["stop"])},{default:be(()=>[r($.id)?(k(),me(p(Me),{key:0,name:"star",size:"md"})):(k(),me(p(Me),{key:1,name:"star-outline",size:"md"}))]),_:2},1032,["class","label","onClick"])])],42,N$e))),128)),_.value.length===0?(k(),M("div",D$e,N(o.models.length===0?p(n)("model.emptyNoModels"):p(n)("model.emptyNoMatch")),1)):te("",!0)],8,$$e)),C("div",B$e,[q(p(Yl),{keys:["↑","↓"]}),C("span",null,N(p(n)("model.hintNavigate")),1),I[2]||(I[2]=C("span",{class:"hint-dot"},"·",-1)),q(p(Yl),{keys:["Enter"]}),C("span",null,N(p(n)("model.hintSelect")),1),I[3]||(I[3]=C("span",{class:"hint-dot"},"·",-1)),q(p(Yl),{keys:["Esc"]}),C("span",null,N(p(n)("model.hintClose")),1)])],512)]),_:1},8,["title"]))}}),z$e=mt(H$e,[["__scopeId","data-v-d5ea4110"]]),W$e=3;function jN(e){const t=K("starting"),n=K(!1),o=K(null),s=K(0);let i=null,r=null,l=null,a=0,c=!1,u=!1;function d(){i&&(clearTimeout(i),i=null),r&&(clearInterval(r),r=null),l&&(clearTimeout(l),l=null)}function f(_){d(),t.value="success",l=setTimeout(()=>{l=null,e.onSuccess?.()},_)}function h(){r&&clearInterval(r),r=setInterval(()=>{s.value>0?s.value--:(r&&clearInterval(r),r=null)},1e3)}function m(_){i&&clearTimeout(i),i=setTimeout(async()=>{const v=await e.onPollOAuthLogin();if(!u){if(v===null){if(a+=1,a>=W$e){d(),n.value=!0,t.value="error";return}m(_);return}a=0,v.status==="authenticated"?f(1200):v.status==="expired"||v.status==="cancelled"?(d(),t.value="expired"):m(_)}},_*1e3)}async function g(){d(),o.value=null,n.value=!1,a=0,c=!1,t.value="starting";const _=await e.onStartOAuthLogin();if(u){_!==null&&_.status!=="authenticated"&&e.onCancelOAuthLogin();return}if(!_){t.value="error";return}if(_.status==="authenticated"){f(800);return}o.value={flowId:_.flowId,verificationUri:_.verificationUri,verificationUriComplete:_.verificationUriComplete,userCode:_.userCode,expiresIn:_.expiresIn,interval:_.interval},s.value=_.expiresIn,t.value="device-code",h(),m(_.interval)}function b(){t.value!=="success"&&(d(),t.value==="device-code"&&!c&&(c=!0,e.onCancelOAuthLogin()))}return Dg()&&lf(()=>{u=!0,b()}),{step:t,pollError:n,flow:o,secondsLeft:s,startFlow:g,cancelFlow:b}}const U$e={key:0,class:"center-body"},j$e={class:"center-text"},V$e={key:1,class:"nb"},q$e={class:"nb-lead"},K$e=["href"],Z$e={class:"nb-code-row"},G$e=["title"],Y$e={class:"nb-status"},X$e={class:"nb-status-text"},J$e={class:"nb-countdown"},Q$e={key:2,class:"center-body"},eNe={class:"center-text success-text"},tNe={class:"center-hint"},nNe={class:"center-body"},oNe={class:"center-text err-text"},sNe={class:"center-hint"},iNe={class:"actions"},rNe={class:"center-body"},lNe={class:"center-text warn-text"},aNe={class:"center-hint"},cNe={class:"actions"},uNe=et({__name:"LoginDialog",props:{onStartOAuthLogin:{type:Function},onPollOAuthLogin:{type:Function},onCancelOAuthLogin:{type:Function}},emits:["success","close"],setup(e,{emit:t}){const{t:n}=$t(),o=K(!0),s=t,i=e,{step:r,pollError:l,flow:a,secondsLeft:c,startFlow:u,cancelFlow:d}=jN({onStartOAuthLogin:i.onStartOAuthLogin,onPollOAuthLogin:i.onPollOAuthLogin,onCancelOAuthLogin:i.onCancelOAuthLogin,onSuccess:()=>{s("success"),s("close")}}),f=K(!1);cn(async()=>{await u()});async function h(){!a.value||!await Ps(a.value.verificationUriComplete)||(f.value=!0,setTimeout(()=>{f.value=!1},2e3))}async function m(){d(),s("close")}function g(b){const _=Math.floor(b/60),v=b%60;return`${_}:${String(v).padStart(2,"0")}`}return(b,_)=>(k(),me(p(sa),{open:o.value,"onUpdate:open":_[0]||(_[0]=v=>o.value=v),title:p(n)("login.title"),"close-on-overlay":!1,onClose:m},{default:be(()=>[p(r)==="starting"?(k(),M("div",U$e,[q(p(Ao),{size:"md"}),C("span",j$e,N(p(n)("login.starting")),1)])):p(r)==="device-code"&&p(a)?(k(),M("div",V$e,[C("div",q$e,N(p(n)("login.lead")),1),C("a",{class:"nb-primary",href:p(a).verificationUriComplete,target:"_blank",rel:"noopener noreferrer"},[Ve(N(p(n)("login.authorizeInBrowser"))+" ",1),q(p(Me),{name:"external-link",size:"sm"})],8,K$e),C("div",Z$e,[C("span",{class:"nb-link",title:p(a).verificationUriComplete},N(p(a).verificationUriComplete),9,G$e),q(p(Rt),{class:Fe(["nb-copy",{"is-copied":f.value}]),variant:"secondary",size:"sm",onClick:h},{default:be(()=>[f.value?(k(),M(De,{key:0},[q(p(Me),{name:"check",size:"sm"}),Ve(" "+N(p(n)("login.copied")),1)],64)):(k(),M(De,{key:1},[q(p(Me),{name:"copy",size:"sm"}),Ve(" "+N(p(n)("login.copyLink")),1)],64))]),_:1},8,["class"])]),C("div",Y$e,[q(p(Ao),{size:"sm",label:p(n)("login.waitingAuth")},null,8,["label"]),C("span",X$e,N(p(n)("login.waitingAutoClose")),1),C("span",J$e,N(g(p(c))),1)])])):p(r)==="success"?(k(),M("div",Q$e,[q(p(Nd),{kind:"success"}),C("span",eNe,N(p(n)("login.success")),1),C("span",tNe,N(p(n)("login.successHint")),1)])):p(r)==="expired"?(k(),M(De,{key:3},[C("div",nNe,[q(p(Nd),{kind:"expired"}),C("span",oNe,N(p(n)("login.expiredTitle")),1),C("span",sNe,N(p(n)("login.expiredHint")),1)]),C("div",iNe,[q(p(Rt),{variant:"primary",onClick:p(u)},{default:be(()=>[Ve(N(p(n)("login.retry")),1)]),_:1},8,["onClick"]),q(p(Rt),{variant:"secondary",onClick:m},{default:be(()=>[Ve(N(p(n)("login.closeBtn")),1)]),_:1})])],64)):p(r)==="error"?(k(),M(De,{key:4},[C("div",rNe,[q(p(Nd),{kind:"error"}),C("span",lNe,N(p(l)?p(n)("login.pollErrorTitle"):p(n)("login.errorTitle")),1),C("span",aNe,N(p(l)?p(n)("login.pollErrorHint"):p(n)("login.errorHint")),1)]),C("div",cNe,[q(p(Rt),{variant:"primary",onClick:p(u)},{default:be(()=>[Ve(N(p(n)("login.retry")),1)]),_:1},8,["onClick"]),q(p(Rt),{variant:"secondary",onClick:m},{default:be(()=>[Ve(N(p(n)("login.closeBtn")),1)]),_:1})])],64)):te("",!0)]),_:1},8,["open","title"]))}}),dNe=mt(uNe,[["__scopeId","data-v-aad4b9f1"]]),VN=et({__name:"LanguageSwitcher",props:{size:{default:"md"}},setup(e){const{locale:t}=$t(),n=lg.map(s=>({value:s.code,label:s.label}));function o(s){t.value!==s&&m5(s)}return(s,i)=>(k(),me(p(ai),{"model-value":p(t),options:p(n),size:e.size,"onUpdate:modelValue":o},null,8,["model-value","options","size"]))}}),fNe=["kimi","openai","openai_responses","anthropic","google-genai","vertexai"];function _h(){return{model:"",maxContextSize:"",displayName:"",capabilities:["tool_use","thinking"],supportEfforts:[],adaptiveThinking:!0}}function gy(e,t){const n=[];for(const o of Object.values(t??{})){if(o===null||typeof o!="object")continue;const s=o;s.provider===e.id&&n.push({model:typeof s.model=="string"?s.model:"",maxContextSize:typeof s.maxContextSize=="number"?String(s.maxContextSize):"",displayName:typeof s.displayName=="string"?s.displayName:"",capabilities:Array.isArray(s.capabilities)?s.capabilities.filter(i=>typeof i=="string"):[],supportEfforts:Array.isArray(s.supportEfforts)?s.supportEfforts.filter(i=>typeof i=="string"):[],...typeof s.adaptiveThinking=="boolean"?{adaptiveThinking:s.adaptiveThinking}:{}})}return n}const qN=/^[\p{L}\p{N}][\p{L}\p{N}\-_ ]*$/u;function pNe(e,t={}){const n=e.id.trim();if(n==="")return"idRequired";if(!qN.test(n))return"idInvalid";if(t.requireApiKey===!0&&e.apiKey.trim()==="")return"apiKeyRequired";if(t.requireBaseUrl===!0&&e.baseUrl.trim()==="")return"baseUrlRequired";if(e.models.length===0)return"modelRequired";for(const o of e.models){if(o.model.trim()==="")return"modelRequired";const s=o.maxContextSize.trim();if(s==="")return"contextSizeRequired";if(!/^\d+$/.test(s)||Number(s)<1)return"contextSizeInvalid"}return null}function KN(e){return e.map(t=>{const n=t.displayName.trim();return{model:t.model.trim(),maxContextSize:Number(t.maxContextSize.trim()),...t.capabilities.length>0?{capabilities:[...t.capabilities]}:{},...t.supportEfforts.length>0?{supportEfforts:[...t.supportEfforts]}:{},...t.adaptiveThinking!==void 0?{adaptiveThinking:t.adaptiveThinking}:{},...n===""?{}:{displayName:n}}})}function hNe(e){const t=e.apiKey.trim(),n=e.baseUrl.trim();return{id:e.id.trim(),type:e.type,models:KN(e.models),...t===""?{}:{apiKey:t},...n===""?{}:{baseUrl:n}}}function mNe(e,t,n){const o=KN(e.models),s=e.id.trim(),i=e.apiKey.trim(),r=e.baseUrl.trim(),l=n?.existingDefaultModel?.trim()??"",a=l.indexOf("/")>=0?l.slice(l.indexOf("/")+1):l;return{...t!==void 0&&s!==""&&s!==t.id?{newId:s}:{},type:e.type,models:o,...i===""&&n?.includeBlankApiKey!==!0?{}:{apiKey:i},...r===""?{}:{baseUrl:r},...a!==""&&o.some(c=>c.model===a)?{defaultModel:a}:{}}}function ZN(e){return e.id==="managed:kimi-code"&&e.type==="kimi"}const gNe={class:"msg"},vNe={class:"pf-field"},yNe={class:"pf-field-label"},kNe={class:"pf-field"},bNe={class:"pf-field-label"},CNe={class:"pf-field"},wNe={class:"pf-field-label"},_Ne={class:"pf-key-wrap"},xNe={class:"pf-field"},SNe={class:"pf-field-label"},ANe={class:"pf-field"},MNe={class:"pf-field-label"},TNe={class:"pf-models"},ENe={key:0,class:"pf-models-empty"},INe={class:"pf-model-grid pf-model-head"},LNe={key:1},$Ne={key:0},NNe={class:"pf-foot"},ONe={key:0,class:"pf-managed-note"},FNe={class:"pf-confirm-msg"},RNe=et({__name:"ProviderForm",props:{mode:{},provider:{},guard:{type:Boolean}},emits:["dirtyChange","guardStay","guardDiscard","added","saved","deleting","deleted","cancel"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=uc(),r=Uo({id:"",type:"openai",apiKey:"",baseUrl:"",models:[_h()]}),l=K(""),a=K(!1),c=K(!1),u=K(!1),d=F(()=>n.mode==="add"),f=F(()=>n.provider!==void 0&&ZN(n.provider)),h=F(()=>{const $=n.provider;return $===void 0?0:gy($,i.config.value?.models).length}),m=F(()=>f.value&&h.value===0),g=F(()=>fNe.map($=>({value:$,label:s(`providers.types.${$}`)}))),b=F(()=>f.value?s("providers.apiKeyManaged"):!d.value&&n.provider?.hasApiKey===!0?s("providers.apiKeySet"):"sk-…");function _(){l.value="",c.value=!1;const $=n.provider;if(d.value||$===void 0){r.id="",r.type="openai",r.apiKey="",r.baseUrl="",r.models=[_h()];return}r.id=$.id,r.type=$.type,r.apiKey="",r.baseUrl=$.baseUrl??"";const D=gy($,i.config.value?.models);r.models=D.length>0?D:[_h()]}cn(()=>{_(),w()});const v=K(!1),y=K(!1);async function w(){const $=n.provider;if(!(d.value||$===void 0||f.value||$.hasApiKey!==!0))try{const D=await i.getProvider($.id);if(y.value)return;D.apiKey!==void 0&&D.apiKey!==""&&(r.apiKey=D.apiKey,v.value=!0)}catch{}}function x(){o("dirtyChange",!0)}const A=K(!1),L=K();function S($){l.value=$,bt(()=>L.value?.scrollIntoView({block:"nearest",behavior:"smooth"}))}async function T(){if(a.value)return;const $=pNe(r,{requireApiKey:d.value,requireBaseUrl:d.value});if($!==null){S(s(`providers.error.${$}`));return}l.value="",a.value=!0;try{if(d.value){const D=await i.addProvider(hNe(r));if(D!==null){S(D);return}o("dirtyChange",!1),i.notify({severity:"success",title:s("providers.added")}),o("added",r.id.trim())}else{const D=n.provider;if(D===void 0)return;const H=i.config.value?.providers?.[D.id]?.defaultModel,O=await i.updateProvider(D.id,mNe(r,D,{includeBlankApiKey:v.value,existingDefaultModel:H}));if(O!==null){S(O);return}await i.checkAuth(),i.notify({severity:"success",title:s("providers.saved")}),o("dirtyChange",!1),o("saved",r.id.trim())}}finally{a.value=!1}}async function R(){const $=n.provider;if(!($===void 0||u.value)){u.value=!0,o("deleting"),await new Promise(D=>setTimeout(D,300));try{if(await i.deleteProvider($.id)===null){c.value=!1;return}o("dirtyChange",!1),o("deleted",$.id)}finally{u.value=!1}}}function B(){r.models.push(_h()),x()}function I($){r.models.length<=1||(r.models.splice($,1),x())}return($,D)=>(k(),M("div",{class:"pf-form",onInput:x},[e.guard?(k(),me(p(Uc),{key:0,variant:"warning",class:"pf-guard"},{default:be(()=>[C("span",gNe,N(p(s)("providers.unsavedGuard")),1),q(p(Rt),{variant:"secondary",size:"sm",onClick:D[0]||(D[0]=H=>o("guardStay"))},{default:be(()=>[Ve(N(p(s)("providers.guardStay")),1)]),_:1}),q(p(Rt),{variant:"danger",size:"sm",onClick:D[1]||(D[1]=H=>o("guardDiscard"))},{default:be(()=>[Ve(N(p(s)("providers.guardDiscard")),1)]),_:1})]),_:1})):te("",!0),l.value?(k(),M("div",{key:1,ref_key:"errorBox",ref:L},[q(p(Uc),{variant:"danger"},{default:be(()=>[Ve(N(l.value),1)]),_:1})],512)):te("",!0),C("div",vNe,[C("label",yNe,[Ve(N(p(s)("providers.fieldId")),1),D[11]||(D[11]=C("span",{class:"req"}," *",-1))]),q(p(Os),{modelValue:r.id,"onUpdate:modelValue":D[2]||(D[2]=H=>r.id=H),placeholder:"my-openai",disabled:f.value,autocomplete:"off",spellcheck:"false"},null,8,["modelValue","disabled"])]),C("div",kNe,[C("label",bNe,[Ve(N(p(s)("providers.fieldType")),1),D[12]||(D[12]=C("span",{class:"req"}," *",-1))]),q(p(X4),{"model-value":r.type,options:g.value,disabled:f.value,"onUpdate:modelValue":D[3]||(D[3]=H=>{r.type=H,x()})},null,8,["model-value","options","disabled"])]),C("div",CNe,[C("label",wNe,[Ve(N(p(s)("providers.fieldApiKey")),1),D[13]||(D[13]=C("span",{class:"req"}," *",-1))]),C("div",_Ne,[q(p(Os),{modelValue:r.apiKey,"onUpdate:modelValue":D[4]||(D[4]=H=>r.apiKey=H),type:A.value?"text":"password",placeholder:b.value,disabled:f.value,autocomplete:"off",spellcheck:"false",onInput:D[5]||(D[5]=H=>y.value=!0)},null,8,["modelValue","type","placeholder","disabled"]),f.value?te("",!0):(k(),me(p(mn),{key:0,class:"pf-key-eye",size:"sm",label:p(s)(A.value?"providers.hideApiKey":"providers.showApiKey"),onClick:D[6]||(D[6]=H=>A.value=!A.value)},{default:be(()=>[q(p(Me),{name:A.value?"eye-off":"eye",size:"sm"},null,8,["name"])]),_:1},8,["label"]))])]),C("div",xNe,[C("label",SNe,[Ve(N(p(s)("providers.fieldBaseUrl")),1),D[14]||(D[14]=C("span",{class:"req"}," *",-1))]),q(p(Os),{modelValue:r.baseUrl,"onUpdate:modelValue":D[7]||(D[7]=H=>r.baseUrl=H),placeholder:p(s)("providers.baseUrlPlaceholder"),disabled:f.value,autocomplete:"off",spellcheck:"false"},null,8,["modelValue","placeholder","disabled"])]),C("div",ANe,[C("label",MNe,[Ve(N(p(s)("providers.fieldModels")),1),D[15]||(D[15]=C("span",{class:"req"}," *",-1))]),C("div",TNe,[m.value?(k(),M("div",ENe,N(p(s)("providers.noModels")),1)):(k(),M(De,{key:1},[C("div",INe,[C("span",null,[Ve(N(p(s)("providers.colModelId")),1),D[16]||(D[16]=C("span",{class:"req"}," *",-1))]),C("span",null,[Ve(N(p(s)("providers.colContext")),1),D[17]||(D[17]=C("span",{class:"req"}," *",-1))]),C("span",null,N(p(s)("providers.colDisplayName")),1),D[18]||(D[18]=C("span",null,null,-1))]),(k(!0),M(De,null,vt(r.models,(H,O)=>(k(),M("div",{key:O,class:"pf-model-grid"},[q(p(Os),{modelValue:H.model,"onUpdate:modelValue":P=>H.model=P,placeholder:p(s)("providers.modelIdPlaceholder"),disabled:f.value,autocomplete:"off",spellcheck:"false"},null,8,["modelValue","onUpdate:modelValue","placeholder","disabled"]),q(p(Os),{modelValue:H.maxContextSize,"onUpdate:modelValue":P=>H.maxContextSize=P,inputmode:"numeric",placeholder:p(s)("providers.modelContextPlaceholder"),disabled:f.value,autocomplete:"off",spellcheck:"false"},null,8,["modelValue","onUpdate:modelValue","placeholder","disabled"]),q(p(Os),{modelValue:H.displayName,"onUpdate:modelValue":P=>H.displayName=P,placeholder:p(s)("providers.modelNamePlaceholder"),disabled:f.value,autocomplete:"off",spellcheck:"false"},null,8,["modelValue","onUpdate:modelValue","placeholder","disabled"]),f.value?(k(),M("span",LNe)):(k(),me(p(mn),{key:0,size:"sm",label:p(s)("providers.removeModel"),disabled:r.models.length<=1,onClick:P=>I(O)},{default:be(()=>[q(p(Me),{name:"trash",size:"sm"})]),_:1},8,["label","disabled","onClick"]))]))),128)),f.value?te("",!0):(k(),M("div",$Ne,[q(p(Rt),{variant:"ghost",size:"sm",onClick:B},{default:be(()=>[q(p(Me),{name:"plus",size:"sm"}),Ve(" "+N(p(s)("providers.addModel")),1)]),_:1})]))],64))])]),C("div",NNe,[f.value?(k(),M("span",ONe,N(p(s)("providers.managedHint")),1)):d.value?(k(),M(De,{key:1},[q(p(Rt),{variant:"secondary",size:"sm",onClick:D[8]||(D[8]=H=>o("cancel"))},{default:be(()=>[Ve(N(p(s)("common.cancel")),1)]),_:1}),q(p(Rt),{variant:"primary",size:"sm",disabled:a.value,onClick:T},{default:be(()=>[Ve(N(p(s)("providers.addProvider")),1)]),_:1},8,["disabled"])],64)):c.value&&n.provider!==void 0?(k(),M(De,{key:2},[C("span",FNe,N(p(s)("providers.deleteConfirm",{id:n.provider.id,count:h.value})),1),D[19]||(D[19]=C("span",{class:"spacer"},null,-1)),q(p(Rt),{variant:"secondary",size:"sm",disabled:u.value,onClick:D[9]||(D[9]=H=>c.value=!1)},{default:be(()=>[Ve(N(p(s)("common.cancel")),1)]),_:1},8,["disabled"]),q(p(Rt),{variant:"danger",size:"sm",disabled:u.value,onClick:R},{default:be(()=>[Ve(N(p(s)("providers.deleteConfirmYes")),1)]),_:1},8,["disabled"])],64)):(k(),M(De,{key:3},[q(p(Rt),{variant:"danger-soft",size:"sm",onClick:D[10]||(D[10]=H=>c.value=!0)},{default:be(()=>[Ve(N(p(s)("providers.deleteProvider")),1)]),_:1}),D[20]||(D[20]=C("span",{class:"spacer"},null,-1)),q(p(Rt),{variant:"primary",size:"sm",disabled:a.value,onClick:T},{default:be(()=>[Ve(N(p(s)("providers.save")),1)]),_:1},8,["disabled"])],64))])],32))}}),GN=mt(RNe,[["__scopeId","data-v-51214cd2"]]),PNe={class:"af"},DNe={class:"msg"},BNe={key:2,class:"af-catalog"},HNe={key:0,class:"af-center"},zNe={key:1,class:"af-error"},WNe={class:"af-list"},UNe=["disabled","onClick"],jNe={class:"af-entry-name"},VNe={key:1,class:"af-entry-reason"},qNe={key:2,class:"af-entry-count"},KNe={key:0,class:"af-empty"},ZNe={class:"af-field"},GNe={class:"af-label"},YNe={class:"af-field"},XNe={class:"af-label"},JNe={class:"af-key-wrap"},QNe={key:0,class:"af-field"},eOe={class:"af-label"},tOe={class:"af-note"},nOe={class:"af-foot"},oOe={class:"af-hint"},sOe={class:"af-field"},iOe={class:"af-label"},rOe={class:"af-field"},lOe={class:"af-label"},aOe={class:"af-key-wrap"},cOe={class:"af-foot"},uOe={class:"af-manual"},dOe=et({__name:"AddProviderFlow",props:{guard:{type:Boolean}},emits:["dirtyChange","guardStay","guardDiscard","added","cancel"],setup(e,{emit:t}){const n=t,{t:o,te:s}=$t(),i=uc(),r=K("catalog"),l=F(()=>[{value:"catalog",label:o("providers.catalog.sourceCatalog")},{value:"registry",label:o("providers.catalog.sourceRegistry")},{value:"manual",label:o("providers.catalog.sourceManual")}]),a=K("loading"),c=K([]);async function u(){a.value="loading";const z=await i.loadCatalogProviders();z.kind==="ok"?(c.value=z.items,a.value="ready"):z.kind==="unsupported"?(a.value="unsupported",r.value==="catalog"&&(r.value="manual")):a.value="error"}cn(u);const d=K(""),f=F(()=>{const z=d.value.trim().toLowerCase();return z===""?c.value:c.value.filter(W=>W.name.toLowerCase().includes(z)||W.id.toLowerCase().includes(z))});function h(z){const W=z.rejectReason;return W!==null&&s(`providers.catalog.rejectReason.${W}`)?o(`providers.catalog.rejectReason.${W}`):o("providers.catalog.rejected")}const m=K(null),g=K({id:"",apiKey:"",baseUrl:""}),b=K(!1),_=K(!1),v=K("");function y(z){m.value=z,g.value={id:z.id,apiKey:"",baseUrl:""},v.value="",b.value=!1}function w(){m.value=null,v.value="",n("dirtyChange",!1)}function x(){n("dirtyChange",!0)}const A=F(()=>{if(m.value===null)return!1;const W=g.value.id.trim();return W!==""&&i.providers.value.some(U=>U.id===W)}),L=K();function S(z){v.value=z,bt(()=>L.value?.scrollIntoView({block:"nearest",behavior:"smooth"}))}function T(){const z=g.value,W=z.id.trim();return W===""?o("providers.error.idRequired"):qN.test(W)?z.apiKey.trim()===""?o("providers.error.apiKeyRequired"):m.value?.needsBaseUrl===!0&&z.baseUrl.trim()===""?o("providers.error.baseUrlRequired"):null:o("providers.error.idInvalid")}async function R(){const z=m.value;if(z===null||_.value)return;const W=T();if(W!==null){S(W);return}v.value="",_.value=!0;try{const U=g.value,G=U.id.trim(),Z=U.baseUrl.trim(),ee=await i.importCatalogProvider({catalogId:z.id,apiKey:U.apiKey.trim(),...Z===""?{}:{baseUrl:Z},...G===z.id?{}:{id:G}});if(ee!==null){S(ee);return}i.notify({severity:"success",title:o("providers.added")}),n("dirtyChange",!1),n("added",G)}finally{_.value=!1}}const B=K({url:"",apiKey:""}),I=K(!1),$=K(!1),D=K(""),H=K();function O(z){D.value=z,bt(()=>H.value?.scrollIntoView({block:"nearest",behavior:"smooth"}))}async function P(){if($.value)return;const z=B.value.url.trim();if(z===""){O(o("providers.error.registryUrlRequired"));return}D.value="",$.value=!0;try{const W=B.value.apiKey.trim(),U=await i.importCustomRegistry({url:z,...W===""?{}:{apiKey:W}});if(typeof U=="string"){O(U);return}i.notify({severity:"success",title:o("providers.catalog.registryImported",{count:U.providers.length})}),n("dirtyChange",!1);const G=U.providers[0];G!==void 0?n("added",G.id):n("cancel")}finally{$.value=!1}}return(z,W)=>(k(),M("div",PNe,[e.guard?(k(),me(p(Uc),{key:0,variant:"warning",class:"af-guard"},{default:be(()=>[C("span",DNe,N(p(o)("providers.unsavedGuard")),1),q(p(Rt),{variant:"secondary",size:"sm",onClick:W[0]||(W[0]=U=>n("guardStay"))},{default:be(()=>[Ve(N(p(o)("providers.guardStay")),1)]),_:1}),q(p(Rt),{variant:"danger",size:"sm",onClick:W[1]||(W[1]=U=>n("guardDiscard"))},{default:be(()=>[Ve(N(p(o)("providers.guardDiscard")),1)]),_:1})]),_:1})):te("",!0),a.value!=="unsupported"?(k(),me(p(ai),{key:1,modelValue:r.value,"onUpdate:modelValue":W[2]||(W[2]=U=>r.value=U),size:"sm",options:l.value},null,8,["modelValue","options"])):te("",!0),a.value!=="unsupported"?An((k(),M("div",BNe,[a.value==="loading"?(k(),M("div",HNe,[q(p(Ao),{size:"sm"}),C("span",null,N(p(o)("providers.catalog.loading")),1)])):a.value==="error"?(k(),M("div",zNe,[q(p(Uc),{variant:"danger"},{default:be(()=>[Ve(N(p(o)("providers.catalog.loadError")),1)]),_:1}),C("div",null,[q(p(Rt),{variant:"secondary",size:"sm",onClick:u},{default:be(()=>[Ve(N(p(o)("providers.catalog.retry")),1)]),_:1})])])):m.value===null?(k(),M(De,{key:2},[q(p(Os),{modelValue:d.value,"onUpdate:modelValue":W[3]||(W[3]=U=>d.value=U),placeholder:p(o)("providers.catalog.searchPlaceholder"),autocomplete:"off",spellcheck:"false"},null,8,["modelValue","placeholder"]),C("div",WNe,[(k(!0),M(De,null,vt(f.value,U=>(k(),M("button",{key:U.id,type:"button",class:"af-entry",disabled:U.rejected,onClick:G=>y(U)},[C("span",jNe,N(U.name),1),U.wireType!==null?(k(),me(p(Wr),{key:0,variant:"neutral",size:"sm"},{default:be(()=>[Ve(N(U.wireType),1)]),_:2},1024)):te("",!0),W[16]||(W[16]=C("span",{class:"grow"},null,-1)),U.rejected?(k(),M("span",VNe,N(h(U)),1)):(k(),M("span",qNe,N(p(o)("providers.modelCount",{count:U.models.length})),1))],8,UNe))),128)),f.value.length===0?(k(),M("div",KNe,N(p(o)("providers.catalog.empty")),1)):te("",!0)])],64)):(k(),M("div",{key:3,class:"af-import",onInput:x},[C("button",{type:"button",class:"af-back",onClick:w},[q(p(Me),{name:"arrow-left",size:"sm"}),Ve(" "+N(p(o)("providers.catalog.backToList")),1)]),C("div",ZNe,[C("label",GNe,[Ve(N(p(o)("providers.fieldId")),1),W[17]||(W[17]=C("span",{class:"req"}," *",-1))]),q(p(Os),{modelValue:g.value.id,"onUpdate:modelValue":W[4]||(W[4]=U=>g.value.id=U),autocomplete:"off",spellcheck:"false"},null,8,["modelValue"])]),C("div",YNe,[C("label",XNe,[Ve(N(p(o)("providers.fieldApiKey")),1),W[18]||(W[18]=C("span",{class:"req"}," *",-1))]),C("div",JNe,[q(p(Os),{modelValue:g.value.apiKey,"onUpdate:modelValue":W[5]||(W[5]=U=>g.value.apiKey=U),type:b.value?"text":"password",placeholder:"sk-…",autocomplete:"off",spellcheck:"false"},null,8,["modelValue","type"]),q(p(mn),{class:"af-key-eye",size:"sm",label:p(o)(b.value?"providers.hideApiKey":"providers.showApiKey"),onClick:W[6]||(W[6]=U=>b.value=!b.value)},{default:be(()=>[q(p(Me),{name:b.value?"eye-off":"eye",size:"sm"},null,8,["name"])]),_:1},8,["label"])])]),m.value.needsBaseUrl?(k(),M("div",QNe,[C("label",eOe,[Ve(N(p(o)("providers.fieldBaseUrl")),1),W[19]||(W[19]=C("span",{class:"req"}," *",-1))]),q(p(Os),{modelValue:g.value.baseUrl,"onUpdate:modelValue":W[7]||(W[7]=U=>g.value.baseUrl=U),placeholder:p(o)("providers.baseUrlPlaceholder"),autocomplete:"off",spellcheck:"false"},null,8,["modelValue","placeholder"])])):te("",!0),A.value?(k(),me(p(Uc),{key:1,variant:"warning"},{default:be(()=>[Ve(N(p(o)("providers.catalog.overwriteWarning")),1)]),_:1})):te("",!0),C("div",tOe,N(p(o)("providers.catalog.willImport",{count:m.value.models.length})),1),v.value?(k(),M("div",{key:2,ref_key:"importErrorBox",ref:L},[q(p(Uc),{variant:"danger"},{default:be(()=>[Ve(N(v.value),1)]),_:1})],512)):te("",!0),C("div",nOe,[q(p(Rt),{variant:"secondary",size:"sm",onClick:W[8]||(W[8]=U=>n("cancel"))},{default:be(()=>[Ve(N(p(o)("common.cancel")),1)]),_:1}),q(p(Rt),{variant:"primary",size:"sm",disabled:_.value,onClick:R},{default:be(()=>[Ve(N(p(o)("providers.catalog.importAction")),1)]),_:1},8,["disabled"])])],32))],512)),[[xs,r.value==="catalog"]]):te("",!0),An(C("div",{class:"af-registry",onInput:x},[C("div",oOe,N(p(o)("providers.catalog.registryHint")),1),C("div",sOe,[C("label",iOe,[Ve(N(p(o)("providers.catalog.registryUrlLabel")),1),W[20]||(W[20]=C("span",{class:"req"}," *",-1))]),q(p(Os),{modelValue:B.value.url,"onUpdate:modelValue":W[9]||(W[9]=U=>B.value.url=U),placeholder:"https://example.com/api.json",autocomplete:"off",spellcheck:"false"},null,8,["modelValue"])]),C("div",rOe,[C("label",lOe,N(p(o)("providers.fieldApiKey")),1),C("div",aOe,[q(p(Os),{modelValue:B.value.apiKey,"onUpdate:modelValue":W[10]||(W[10]=U=>B.value.apiKey=U),type:I.value?"text":"password",placeholder:p(o)("providers.modelNamePlaceholder"),autocomplete:"off",spellcheck:"false"},null,8,["modelValue","type","placeholder"]),q(p(mn),{class:"af-key-eye",size:"sm",label:p(o)(I.value?"providers.hideApiKey":"providers.showApiKey"),onClick:W[11]||(W[11]=U=>I.value=!I.value)},{default:be(()=>[q(p(Me),{name:I.value?"eye-off":"eye",size:"sm"},null,8,["name"])]),_:1},8,["label"])])]),D.value?(k(),M("div",{key:0,ref_key:"registryErrorBox",ref:H},[q(p(Uc),{variant:"danger"},{default:be(()=>[Ve(N(D.value),1)]),_:1})],512)):te("",!0),C("div",cOe,[q(p(Rt),{variant:"secondary",size:"sm",onClick:W[12]||(W[12]=U=>n("cancel"))},{default:be(()=>[Ve(N(p(o)("common.cancel")),1)]),_:1}),q(p(Rt),{variant:"primary",size:"sm",disabled:$.value,onClick:P},{default:be(()=>[Ve(N(p(o)("providers.catalog.importAction")),1)]),_:1},8,["disabled"])])],544),[[xs,r.value==="registry"]]),An(C("div",uOe,[q(GN,{mode:"add",guard:!1,onDirtyChange:W[13]||(W[13]=U=>n("dirtyChange",U)),onAdded:W[14]||(W[14]=U=>n("added",U)),onCancel:W[15]||(W[15]=U=>n("cancel"))})],512),[[xs,r.value==="manual"]])]))}}),fOe=mt(dOe,[["__scopeId","data-v-e6595b0c"]]),pOe={class:"pp"},hOe={class:"pp-head"},mOe={class:"pp-title"},gOe={key:0,class:"pp-loading"},vOe={key:1,class:"pp-group"},yOe={class:"pp-add-label"},kOe={class:"pp-chev"},bOe={class:"pp-acc"},COe={class:"pp-acc-in"},wOe={key:1,class:"pp-empty"},_Oe=["onClick"],xOe={class:"grow"},SOe={class:"pp-id"},AOe={class:"pp-count"},MOe={class:"pp-chev"},TOe={class:"pp-acc"},EOe={class:"pp-acc-in"},Dc="$add",IOe=et({__name:"ProvidersPanel",setup(e){const{t}=$t(),n=uc(),o=K(!0),s=K(null),i=K(null);let r=0;const l=K(!1),a=K(!1),c=K(null),u=K("");let d=0;const f=F(()=>[...n.providers.value].sort((A,L)=>A.id.localeCompare(L.id)));function h(A){return gy(A,n.config.value?.models).length}Je(s,(A,L)=>{L!==null&&L!==A&&(i.value=L,window.clearTimeout(r),r=window.setTimeout(()=>{i.value=null},300)),l.value=!1}),Je(l,A=>{A||(a.value=!1,c.value=null)}),kn(()=>{window.clearTimeout(r),window.clearTimeout(d)});const m=K(!1);Je(s,A=>{A===Dc?(m.value=!1,bt(()=>requestAnimationFrame(()=>{m.value=!0}))):m.value=!1}),cn(async()=>{o.value=!0;try{await Promise.all([n.loadProviders(),n.loadModels(),n.loadConfig()])}finally{o.value=!1}});function g(A){const L=s.value===A?null:A;if(l.value){c.value=L,a.value=!0;return}s.value=L}function b(){a.value=!1,c.value=null}function _(){a.value=!1,s.value=c.value,c.value=null}function v(A){u.value=A,window.clearTimeout(d),d=window.setTimeout(()=>{u.value=""},1200)}function y(A){s.value=A}function w(A){s.value=A,v(A)}function x(){s.value=null}return(A,L)=>(k(),M("section",pOe,[C("div",hOe,[C("h3",mOe,N(p(t)("settings.tabs.providers")),1),q(p(Rt),{variant:"secondary",size:"sm",onClick:L[0]||(L[0]=S=>g(Dc))},{default:be(()=>[q(p(Me),{name:"plus",size:"sm"}),Ve(" "+N(p(t)("providers.addProvider")),1)]),_:1})]),o.value?(k(),M("div",gOe,[q(p(Ao),{size:"sm"}),C("span",null,N(p(t)("providers.loading")),1)])):(k(),M("div",vOe,[s.value===Dc||i.value===Dc?(k(),M("div",{key:0,class:Fe(["pp-item pp-add-item",{open:s.value===Dc&&m.value}])},[C("button",{type:"button",class:"pp-row pp-add-row",onClick:L[1]||(L[1]=S=>g(Dc))},[C("span",yOe,N(p(t)("providers.addProvider")),1),L[6]||(L[6]=C("span",{class:"grow"},null,-1)),C("span",kOe,[q(p(Me),{name:"chevron-right",size:"sm"})])]),C("div",bOe,[C("div",COe,[q(fOe,{guard:a.value&&s.value===Dc,onDirtyChange:L[2]||(L[2]=S=>l.value=S),onGuardStay:b,onGuardDiscard:_,onAdded:w,onCancel:L[3]||(L[3]=S=>s.value=null)},null,8,["guard"])])])],2)):te("",!0),f.value.length===0?(k(),M("div",wOe,N(p(t)("providers.empty")),1)):te("",!0),(k(!0),M(De,null,vt(f.value,S=>(k(),M("div",{key:S.id,class:Fe(["pp-item",{open:s.value===S.id,flash:u.value===S.id}])},[C("button",{type:"button",class:"pp-row",onClick:T=>g(S.id)},[C("div",xOe,[C("span",SOe,N(S.id),1),q(p(Wr),{variant:"neutral",size:"sm"},{default:be(()=>[Ve(N(S.type),1)]),_:2},1024),p(ZN)(S)?(k(),me(p(Wr),{key:0,variant:"info",size:"sm"},{default:be(()=>[Ve(N(p(t)("providers.managedBadge")),1)]),_:1})):te("",!0)]),C("span",AOe,N(p(t)("providers.modelCount",{count:h(S)})),1),C("span",MOe,[q(p(Me),{name:"chevron-right",size:"sm"})])],8,_Oe),C("div",TOe,[C("div",EOe,[s.value===S.id||i.value===S.id?(k(),me(GN,{key:0,mode:"edit",provider:S,guard:a.value&&s.value===S.id,onDirtyChange:L[4]||(L[4]=T=>l.value=T),onGuardStay:b,onGuardDiscard:_,onSaved:y,onDeleting:L[5]||(L[5]=T=>s.value=null),onDeleted:x},null,8,["provider","guard"])):te("",!0)])])],2))),128))]))]))}}),LOe=mt(IOe,[["__scopeId","data-v-2cfb5b3f"]]),$Oe={class:"sec"},NOe={class:"sec-title"},OOe={class:"pu-group"},FOe={class:"pu-row"},ROe={class:"pu-main"},POe={class:"pu-label"},DOe={class:"pu-hint"},BOe=et({__name:"PlanUpgradeCard",setup(e){const{t}=$t();return(n,o)=>(k(),M("section",$Oe,[C("h3",NOe,N(p(t)("settings.planUsage.title")),1),C("div",OOe,[C("div",FOe,[C("span",ROe,[C("span",POe,N(p(t)("settings.planUsage.freeTitle")),1),C("span",DOe,N(p(t)("settings.planUsage.freeHint")),1)]),q(p(Rt),{variant:"primary",size:"sm",onClick:o[0]||(o[0]=s=>p(Zp)())},{default:be(()=>[Ve(N(p(t)("sidebar.upgrade")),1)]),_:1})])])]))}}),YN=mt(BOe,[["__scopeId","data-v-fad87fe8"]]),HOe={class:"sec"},zOe={class:"sec-title"},WOe={class:"pu-group"},UOe={key:0,class:"pu-row pu-state"},jOe={key:1,class:"pu-row pu-state"},VOe={class:"pu-error-text"},qOe={key:2,class:"pu-row pu-state pu-empty"},KOe={class:"pu-main"},ZOe={class:"pu-label"},GOe={key:0,class:"pu-hint"},YOe={class:"pu-value"},XOe=["aria-valuenow","aria-valuemax"],JOe={key:0,class:"sec"},QOe={class:"sec-title"},eFe={class:"pu-group"},tFe={class:"pu-row"},nFe={class:"pu-main"},oFe={class:"pu-label"},sFe={class:"pu-value"},iFe={key:0,class:"pu-value-sub"},rFe={key:0,class:"pu-meter"},lFe={class:"pu-row"},aFe={class:"pu-main"},cFe={class:"pu-label"},uFe={class:"pu-value"},dFe={class:"pu-row"},fFe={class:"pu-main"},pFe={class:"pu-label"},hFe={class:"pu-value"},mFe={class:"pu-value-sub"},gFe=et({__name:"PlanUsageCard",props:{onFetchUsage:{type:Function}},setup(e){const t=e,{t:n}=$t(),o=K(!0),s=K(null);async function i(){o.value=!0;try{s.value=await t.onFetchUsage()}finally{o.value=!1}}cn(i);const r=F(()=>s.value?.kind==="ok"?s.value:null),l=F(()=>r.value?.extraUsage??null),a=F(()=>{const g=r.value;return g===null?[]:g.summary===null?g.limits:[g.summary,...g.limits]}),c=F(()=>a.value.length>0),u=F(()=>s.value?.kind==="error"?s.value.message:n("settings.planUsage.loadFailed")),d=F(()=>s.value?.kind==="error"&&(s.value.status===402||s.value.status===403)),f=F(()=>l.value!==null&&l.value.monthlyChargeLimitEnabled&&l.value.monthlyChargeLimitCents>0);function h(g,b){const _=P3e(g,b);return`${_.symbol}${_.number}`}function m(g){return g.resetAt===void 0?"":J$(g.resetAt,n)}return(g,b)=>d.value?(k(),me(YN,{key:0})):(k(),M(De,{key:1},[C("section",HOe,[C("h3",zOe,N(p(n)("settings.planUsage.title")),1),C("div",WOe,[o.value?(k(),M("div",UOe,[q(p(Ao),{size:"sm"})])):r.value===null?(k(),M("div",jOe,[C("span",VOe,N(u.value),1),q(p(Rt),{variant:"ghost",size:"sm",onClick:i},{default:be(()=>[Ve(N(p(n)("settings.planUsage.retry")),1)]),_:1})])):c.value?(k(!0),M(De,{key:3},vt(a.value,(_,v)=>(k(),M("div",{key:v,class:"pu-row"},[C("span",KOe,[C("span",ZOe,N(p(X$)(_,p(n))),1),m(_)?(k(),M("span",GOe,N(m(_)),1)):te("",!0)]),C("span",YOe,N(p(n)("settings.planUsage.usedPct",{pct:p(tm)(_.used,_.limit)})),1),C("span",{class:"pu-meter",role:"progressbar","aria-valuenow":_.used,"aria-valuemax":_.limit},[C("i",{class:Fe(`sev-${p(cy)(_.used,_.limit)}`),style:Gt({width:`${p(tm)(_.used,_.limit)}%`})},null,6)],8,XOe)]))),128)):(k(),M("div",qOe,N(p(n)("settings.planUsage.empty")),1))])]),l.value!==null?(k(),M("section",JOe,[C("h3",QOe,N(p(n)("settings.planUsage.boosterTitle")),1),C("div",eFe,[C("div",tFe,[C("span",nFe,[C("span",oFe,N(p(n)("settings.planUsage.monthlyUsed")),1)]),C("span",sFe,[Ve(N(h(l.value.monthlyUsedCents,l.value.currency)),1),f.value?(k(),M("span",iFe," / "+N(h(l.value.monthlyChargeLimitCents,l.value.currency)),1)):te("",!0)]),f.value?(k(),M("span",rFe,[C("i",{class:Fe(`sev-${p(cy)(l.value.monthlyUsedCents,l.value.monthlyChargeLimitCents)}`),style:Gt({width:`${p(tm)(l.value.monthlyUsedCents,l.value.monthlyChargeLimitCents)}%`})},null,6)])):te("",!0)]),C("div",lFe,[C("span",aFe,[C("span",cFe,N(p(n)("settings.planUsage.monthlyLimit")),1)]),C("span",uFe,[f.value?(k(),M(De,{key:0},[Ve(N(h(l.value.monthlyChargeLimitCents,l.value.currency)),1)],64)):(k(),M(De,{key:1},[Ve(N(p(n)("settings.planUsage.unlimited")),1)],64))])]),C("div",dFe,[C("span",fFe,[C("span",pFe,N(p(n)("settings.planUsage.boosterBalance")),1)]),C("span",hFe,[Ve(N(h(l.value.balanceCents,l.value.currency)),1),C("span",mFe," / "+N(h(l.value.totalCents,l.value.currency)),1)])])])])):te("",!0)],64))}}),vFe=mt(gFe,[["__scopeId","data-v-582385f8"]]),yFe=["aria-expanded","aria-label"],kFe={class:"sm-picker__value-text"},bFe=["aria-label"],CFe=["aria-label"],wFe={class:"sm-picker__group"},_Fe=["aria-selected","onMouseenter","onClick"],xFe={class:"sm-picker__option-label"},SFe=["aria-label"],AFe={class:"sm-picker__group"},MFe=["aria-selected","onMouseenter","onClick"],TFe={class:"sm-picker__option-label"},EFe=188,IFe=250,Jx=8,LFe=et({__name:"SecondaryModelPicker",props:{modelValue:{},effort:{},groups:{},modelInfoById:{}},emits:["select"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t(),i=K(null),r=K(null),l=K(null),a=new Map,c=K(!1),u=K(!1),d=K({}),f=`sm-picker-${Math.random().toString(36).slice(2,9)}`,h=K(""),m=K(null),g=K("right"),b=K(0),_=K("models"),v=K(0),y=K(0);let w=null;const x=F(()=>n.groups.flatMap(ge=>ge.options)),A=F(()=>n.modelValue?x.value.find(ge=>ge.id===n.modelValue)?.label??n.modelValue:""),L=F(()=>n.modelValue?n.effort?`${A.value} · ${n.effort}`:A.value:s("settings.noSecondaryModel")),S=F(()=>{const ge=m.value;if(ge===null)return[];const ne=jp(n.modelInfoById[ge]),ae=n.effort===""?[null,...ne]:[...ne];return n.modelValue===ge&&n.effort!==""&&!ne.includes(n.effort)&&ae.push(n.effort),ae});function T(ge){return n.modelValue!==m.value?!1:ge===null?n.effort==="":n.effort===ge}function R(){const ge=S.value.findIndex(ne=>T(ne));return ge>=0?ge:0}function B(ge,ne){ge instanceof HTMLElement?a.set(ne,ge):a.delete(ne)}function I(){w!==null&&(clearTimeout(w),w=null)}function $(){I(),w=setTimeout(()=>{m.value=null,_.value==="efforts"&&(_.value="models")},IFe)}function D(ge){ge!==h.value&&(h.value=ge,v.value=Math.max(0,x.value.findIndex(ne=>ne.id===ge)))}function H(){const ge=r.value,ne=l.value;if(!ge||!ne)return;const ae=ge.getBoundingClientRect(),j=ne.offsetHeight,Y=window.innerHeight-ae.bottom;u.value=Yj;const fe=Math.max(Jx,window.innerWidth-ae.right);d.value=u.value?{right:`${fe}px`,bottom:`${window.innerHeight-ae.top+4}px`,top:"auto"}:{right:`${fe}px`,top:`${ae.bottom+4}px`,bottom:"auto"}}function O(){const ge=l.value,ne=m.value===null?void 0:a.get(m.value);if(!ge||!ne)return;const ae=ge.getBoundingClientRect(),j=ne.getBoundingClientRect();b.value=Math.max(0,Math.min(j.top-ae.top-4,ge.offsetHeight-40));const Y=window.innerWidth-ae.right,fe=ae.left;g.value=Y>=EFe||Y>=fe?"right":"left"}function P(ge,{moveFocus:ne=!1}={}){D(ge),I(),m.value=ge,ne&&(_.value="efforts",y.value=R()),bt(O)}function z(){m.value=null,_.value="models"}function W(){c.value||(c.value=!0,h.value=n.modelValue||(x.value[0]?.id??""),v.value=Math.max(0,x.value.findIndex(ge=>ge.id===h.value)),m.value=null,_.value="models",bt(H))}function U({restoreFocus:ge=!1}={}){c.value&&(I(),c.value=!1,m.value=null,ge&&bt(()=>r.value?.focus()))}function G(){c.value?U():W()}function Z(ge){if(m.value===null)return;const ne={model:m.value,effort:ge??void 0};(ne.model!==n.modelValue||(ne.effort??"")!==n.effort)&&o("select",ne),U({restoreFocus:!0})}function ee(){bt(()=>{l.value?.querySelector(".sm-picker__option.is-kb-active")?.scrollIntoView({block:"nearest"})})}function Q(ge){const ne=x.value;if(ne.length===0)return;const ae=(v.value+ge+ne.length)%ne.length,j=ne[ae].id;D(j),m.value!==null&&P(j),ee()}function X(ge){const ne=S.value;ne.length!==0&&(y.value=(y.value+ge+ne.length)%ne.length,ee())}function oe(ge){if(!c.value){(ge.key==="Enter"||ge.key===" "||ge.key==="ArrowDown")&&(ge.preventDefault(),W());return}if(ge.key==="ArrowDown")ge.preventDefault(),_.value==="models"?Q(1):X(1);else if(ge.key==="ArrowUp")ge.preventDefault(),_.value==="models"?Q(-1):X(-1);else if(ge.key==="ArrowRight")ge.preventDefault(),P(h.value,{moveFocus:!0});else if(ge.key==="ArrowLeft")ge.preventDefault(),m.value!==null&&z();else if(ge.key==="Enter"||ge.key===" ")ge.preventDefault(),_.value==="models"?P(h.value,{moveFocus:!0}):Z(S.value[y.value]??null);else if(ge.key==="Home"||ge.key==="End"){ge.preventDefault();const ne=ge.key==="Home";if(_.value==="models"){const ae=x.value;if(ae.length===0)return;const j=(ne?ae[0]:ae.at(-1)).id;D(j),m.value!==null&&P(j)}else y.value=ne?0:S.value.length-1;ee()}else ge.key==="Escape"&&(ge.preventDefault(),U({restoreFocus:!0}))}function xe(ge){const ne=ge.target;i.value?.contains(ne)||l.value?.contains(ne)||U()}function pe(ge){if(c.value){if(l.value?.contains(ge.target)){O();return}H(),O()}}function ve(){U()}return cn(()=>{document.addEventListener("pointerdown",xe),document.addEventListener("scroll",pe,!0),window.addEventListener("resize",ve)}),kn(()=>{document.removeEventListener("pointerdown",xe),document.removeEventListener("scroll",pe,!0),window.removeEventListener("resize",ve),I()}),(ge,ne)=>(k(),M("div",{ref_key:"rootRef",ref:i,class:Fe(["sm-picker",{"is-open":c.value}])},[C("button",{ref_key:"triggerRef",ref:r,class:"sm-picker__trigger",type:"button",role:"combobox","aria-controls":f,"aria-expanded":c.value,"aria-haspopup":"dialog","aria-label":p(s)("settings.secondaryModel"),onClick:G,onKeydown:oe},[C("span",{class:Fe(["sm-picker__value",{"is-placeholder":!e.modelValue}])},[C("span",kFe,N(L.value),1)],2),q(p(Me),{class:"sm-picker__chevron",name:"chevron-down",size:"sm"})],40,yFe),(k(),me(Vr,{to:"body"},[c.value?(k(),M("div",{key:0,id:f,ref_key:"menuRef",ref:l,class:Fe(["sm-picker__menu",{"sm-picker__menu--up":u.value}]),style:Gt(d.value),role:"dialog","aria-label":p(s)("settings.secondaryModel")},[C("div",{class:"sm-picker__models",role:"listbox","aria-label":p(s)("settings.secondaryModel")},[(k(!0),M(De,null,vt(e.groups,ae=>(k(),M(De,{key:ae.provider},[C("div",wFe,N(ae.provider),1),(k(!0),M(De,null,vt(ae.options,j=>(k(),M("button",{key:j.id,ref_for:!0,ref:Y=>B(Y,j.id),class:Fe(["sm-picker__option",{"is-selected":j.id===e.modelValue,"is-active":j.id===h.value,"is-kb-active":_.value==="models"&&j.id===h.value}]),type:"button",role:"option","aria-selected":j.id===e.modelValue,onMouseenter:Y=>P(j.id),onMouseleave:$,onClick:Y=>P(j.id,{moveFocus:!0})},[q(p(Me),{class:"sm-picker__check",name:"check",size:"sm"}),C("span",xFe,N(j.label),1),q(p(Me),{class:"sm-picker__flyout-caret",name:"chevron-right",size:"sm"})],42,_Fe))),128))],64))),128))],8,CFe),m.value!==null?(k(),M("div",{key:0,class:Fe(["sm-picker__flyout",`sm-picker__flyout--${g.value}`]),style:Gt({top:`${b.value}px`}),role:"listbox","aria-label":p(s)("settings.secondaryModelEffort"),onMouseenter:I,onMouseleave:$},[C("div",AFe,N(p(s)("settings.secondaryModelEffort")),1),(k(!0),M(De,null,vt(S.value,(ae,j)=>(k(),M("button",{key:ae??"__default__",class:Fe(["sm-picker__option",{"is-selected":T(ae),"is-active":_.value==="efforts"&&j===y.value,"is-kb-active":_.value==="efforts"&&j===y.value,"is-muted":ae===null}]),type:"button",role:"option","aria-selected":T(ae),onMouseenter:Y=>{_.value="efforts",y.value=j},onClick:Y=>Z(ae)},[q(p(Me),{class:"sm-picker__check",name:"check",size:"sm"}),C("span",TFe,N(ae??p(s)("settings.secondaryModelEffortAuto")),1)],42,MFe))),128))],46,SFe)):te("",!0)],14,bFe)):te("",!0)]))],2))}}),$Fe=mt(LFe,[["__scopeId","data-v-32518acf"]]),NFe=["aria-label"],OFe={class:"settings-tabs-header"},FFe={class:"settings-dialog-title"},RFe={class:"settings-tab-list"},PFe=["aria-selected","onClick"],DFe={class:"settings-region"},BFe={class:"settings-region-header"},HFe={class:"panel"},zFe={class:"sec"},WFe={class:"sec-title"},UFe={class:"settings-group"},jFe={class:"row"},VFe={class:"rlabel"},qFe={class:"hint"},KFe={class:"row language-row"},ZFe={class:"rlabel"},GFe={class:"hint"},YFe={class:"row font-size-row"},XFe={class:"rlabel"},JFe={class:"hint"},QFe={class:"sec notification-settings"},eRe={class:"sec-title"},tRe={class:"settings-group"},nRe={class:"row"},oRe={class:"rlabel"},sRe={class:"hint"},iRe={key:0,class:"hint"},rRe={class:"row"},lRe={class:"rlabel"},aRe={class:"hint"},cRe={class:"panel"},uRe={class:"sec"},dRe={class:"sec-title"},fRe={class:"settings-group"},pRe={class:"account-row"},hRe={class:"account-avatar","aria-hidden":"true"},mRe=["src"],gRe={class:"account-meta"},vRe={class:"account-name-row"},yRe={class:"account-name"},kRe={class:"account-sub"},bRe={key:0,class:"panel"},CRe={class:"panel"},wRe={class:"sec"},_Re={class:"sec-head"},xRe={class:"sec-title"},SRe={class:"settings-group"},ARe={class:"row"},MRe={class:"rlabel"},TRe={class:"hint"},ERe={key:0,class:"select-wrap"},IRe={key:1,class:"rvalue mono"},LRe={class:"row"},$Re={class:"rlabel"},NRe={class:"hint"},ORe={class:"row"},FRe={class:"rlabel"},RRe={class:"hint"},PRe={class:"row"},DRe={class:"rlabel"},BRe={class:"hint"},HRe={key:1,class:"empty-config"},zRe={key:0,class:"sec"},WRe={class:"sec-head"},URe={class:"sec-title"},jRe={class:"settings-group"},VRe={class:"row"},qRe={class:"rlabel"},KRe={class:"hint"},ZRe={key:0,class:"select-wrap"},GRe={key:1,class:"rvalue mono"},YRe={class:"panel"},XRe={class:"sec"},JRe={class:"sec-title"},QRe={class:"settings-group"},ePe={class:"row"},tPe={class:"rlabel"},nPe={class:"hint"},oPe={class:"rvalue"},sPe={class:"row"},iPe={class:"rlabel"},rPe={class:"hint"},lPe={class:"rvalue"},aPe={class:"row"},cPe={class:"rlabel"},uPe={class:"hint"},dPe={class:"rvalue"},fPe={key:0,class:"row"},pPe={class:"rlabel"},hPe={key:0,class:"hint"},mPe={key:1,class:"hint"},gPe={key:1,class:"row"},vPe={class:"rlabel"},yPe={class:"hint"},kPe={key:0,class:"sec"},bPe={class:"sec-title"},CPe={class:"settings-group"},wPe={class:"row"},_Pe={class:"rlabel"},xPe={class:"hint"},SPe={class:"hint"},APe={class:"sec"},MPe={class:"sec-title"},TPe={class:"settings-group"},EPe={class:"row"},IPe={class:"rlabel"},LPe={class:"hint"},$Pe={key:0,class:"hint"},NPe={class:"panel"},OPe={class:"panel-head"},FPe={class:"panel-title"},RPe={class:"panel-desc"},PPe={class:"archive-toolbar"},DPe={class:"archive-search"},BPe=["placeholder"],HPe={key:0,class:"archive-empty"},zPe={key:0,class:"archive-list"},WPe={class:"archive-workspace"},UPe={class:"path"},jPe={class:"count"},VPe={class:"setting-card"},qPe={class:"archive-meta"},KPe={class:"archive-name"},ZPe={class:"archive-time"},GPe={key:1,class:"archive-empty"},YPe=100,XPe=et({__name:"SettingsDialog",props:{colorScheme:{},fontScale:{},initialTab:{},managedProviderStatus:{},managedUserInfo:{},onFetchUsage:{type:Function},notify:{type:Boolean},notifyPermission:{},notifySound:{type:Boolean},config:{},models:{},configSaving:{type:Boolean},serverVersion:{},experimentalFlags:{}},emits:["setColorScheme","setFontScale","setNotify","setNotifySound","login","logout","updateConfig","close"],setup(e,{emit:t}){const{t:n}=$t(),o=e,s=t,i=F(()=>o.managedProviderStatus==="authenticated"),r=F(()=>i.value?o.managedUserInfo?.nickname||n("sidebar.defaultUserName"):n("sidebar.notSignedIn")),l=F(()=>o.managedUserInfo?.userLevelName?.trim()??""),a=K(!1);Je(()=>o.managedUserInfo?.avatar,()=>{a.value=!1});const c=F(()=>!!o.managedUserInfo?.avatar&&!a.value),u=F(()=>i.value?n("settings.signedIn"):n("settings.signedOutHint")),d=K(o.initialTab??"general"),f=K(!1);let h=null;function m(){f.value=!0,h&&clearTimeout(h),h=setTimeout(()=>{f.value=!1,h=null},900)}const g=[{id:"general",labelKey:"settings.tabs.general",icon:"sliders"},{id:"agent",labelKey:"settings.tabs.agent",icon:"robot"},{id:"account",labelKey:"settings.tabs.account",icon:"user"},{id:"providers",labelKey:"settings.tabs.providers",icon:"bolt"},{id:"advanced",labelKey:"settings.tabs.advanced",icon:"microscope"},{id:"archived",labelKey:"settings.tabs.archived",icon:"archive"}],b=nfe(),_=["manual","yolo","auto"],v={manual:"status.permissionManual",auto:"status.permissionAuto",yolo:"status.permissionYolo"},y=K(null);UN(y);const{isConfirmOpen:w}=cc();function x(Ne){Ne.key==="Escape"&&!Ne.defaultPrevented&&!w.value&&s("close")}cn(()=>document.addEventListener("keydown",x)),kn(()=>{document.removeEventListener("keydown",x),h&&clearTimeout(h)});function A(){ZL()}const L=(()=>{const Ne="0.32.0".trim()?"0.32.0":"";let Re="";if("2026-08-05T04:38:42.329Z".trim()){const gt=new Date("2026-08-05T04:38:42.329Z");if(!Number.isNaN(gt.getTime())){const Pt=Tt=>String(Tt).padStart(2,"0");Re=`${gt.getFullYear()}-${Pt(gt.getMonth()+1)}-${Pt(gt.getDate())} ${Pt(gt.getHours())}:${Pt(gt.getMinutes())}`}}const Ze=Re===""?Ne:`${Ne} · ${Re}`;return Ze===""?"-":Ze})(),S=VL(),T=K(!1),R=K(null);async function B(){if(!T.value){T.value=!0,R.value=null;try{R.value=await S.check()}finally{T.value=!1}}}const I=F(()=>{const Ne=R.value;if(Ne===null)return"";switch(Ne.outcome){case"available":return S.status.value.state==="downloaded"?n("settings.updateCheckDownloaded",{version:Ne.version??""}):S.autoDownload.value?n("settings.updateCheckAvailableAuto",{version:Ne.version??""}):n("settings.updateCheckAvailable",{version:Ne.version??""});case"latest":return n("settings.updateCheckLatest");case"unsupported":return n("settings.updateCheckUnsupported");case"error":return n("settings.updateCheckFailed")}}),$=F(()=>{const Ne=new Map;for(const Re of o.models??[])Ne.set(Re.id,{id:Re.id,label:Re.displayName??Re.model??Re.id,provider:Re.provider});for(const[Re,Ze]of Object.entries(o.config?.models??{})){if(Ne.has(Re))continue;const gt=P(Ze);Ne.set(Re,{id:Re,label:z(Re,Ze,gt),provider:gt??Re})}return Array.from(Ne.values())}),D=F(()=>{const Ne=new Map;for(const Re of $.value){const Ze=Ne.get(Re.provider)??[];Ze.push(Re),Ne.set(Re.provider,Ze)}for(const Re of Ne.values())Re.sort((Ze,gt)=>Ze.label.localeCompare(gt.label));return Array.from(Ne.entries()).toSorted(([Re],[Ze])=>Re.localeCompare(Ze)).map(([Re,Ze])=>({provider:Re,options:Ze}))}),H=F(()=>{const Ne=D.value.flatMap(Re=>Re.options.map(Ze=>({value:Ze.id,label:Ze.label,group:Re.provider})));return o.config?.defaultModel||Ne.unshift({value:"",label:n("settings.noDefaultModel"),group:"",disabled:!0}),Ne}),O=F(()=>{const Ne=o.config?.defaultPermissionMode;return Ne==="auto"||Ne==="yolo"||Ne==="manual"?Ne:"manual"});function P(Ne){if(!Ne||typeof Ne!="object")return;const Re=Ne;return typeof Re.provider=="string"?Re.provider:void 0}function z(Ne,Re,Ze){if(!Re||typeof Re!="object")return Ne;const gt=Re,Pt=typeof gt.model=="string"?gt.model:void 0,Tt=Ze??P(Re);return Pt&&Tt?`${Ne} (${Tt}/${Pt})`:Pt?`${Ne} (${Pt})`:Ne}function W(Ne){return Ne===!0}function U(Ne){!Ne||Ne===o.config?.defaultModel||s("updateConfig",{defaultModel:Ne})}function G(Ne){Ne!==O.value&&s("updateConfig",{defaultPermissionMode:Ne})}const Z=F(()=>(o.experimentalFlags?.["secondary-model"]??o.config?.experimental?.["secondary-model"])===!0),ee=F(()=>o.config?.secondaryModel?.model??""),Q=F(()=>o.config?.secondaryModel?.defaultEffort??""),X=F(()=>Object.fromEntries((o.models??[]).map(Ne=>[Ne.id,Ne])));function oe(Ne){Ne.model===ee.value&&(Ne.effort??"")===Q.value||s("updateConfig",{secondaryModel:Ne.effort?{model:Ne.model,defaultEffort:Ne.effort}:{model:Ne.model}})}function xe(Ne){const Re=o.config?.[Ne];s("updateConfig",{[Ne]:!W(Re)})}function pe(){const Ne=o.config?.thinking;return!Ne||typeof Ne!="object"?!0:Ne.enabled!==!1}function ve(){s("updateConfig",{thinking:{enabled:!pe()}})}function ge(){const Ne=o.config?.telemetry!==!1;s("updateConfig",{telemetry:!Ne})}function ne(Ne){d.value=Ne}const ae=uc(),j=F(()=>i.value&&ae.managedMembership.value==="free"),Y=K([]),fe=K(!1),ue=K(!1),de=K(""),J=K("all"),se=K("archived-desc");async function ce(){if(!(fe.value||ue.value)){fe.value=!0;try{const Ne=[];let Re;for(;;){const Ze=await ae.loadArchivedSessions({beforeId:Re,pageSize:YPe});if(Ne.push(...Ze.items),!Ze.hasMore||Ze.items.length===0)break;const gt=Ze.items.at(-1)?.id;if(gt===void 0)break;Re=gt}Y.value=Ne,ue.value=!0}catch(Ne){fl("loadAllArchived failed",Ne)}finally{fe.value=!1}}}Je(d,Ne=>{Ne==="archived"&&!ue.value&&ce()},{immediate:!0});const he=F(()=>{const Ne=new Set;for(const Re of Y.value)Ne.add(Re.cwd);return Array.from(Ne).sort((Re,Ze)=>Re.localeCompare(Ze))}),Ie=F(()=>[{value:"all",label:n("settings.archivedAllWorkspaces")},...he.value.map(Ne=>({value:Ne,label:Ne}))]),Ge=F(()=>{const Ne=de.value.trim().toLowerCase();let Re=Y.value.filter(Ze=>Ze.archived===!0);return J.value!=="all"&&(Re=Re.filter(Ze=>Ze.cwd===J.value)),Ne&&(Re=Re.filter(Ze=>Ze.title.toLowerCase().includes(Ne))),Re=Re.slice(),se.value==="archived-desc"?Re.sort((Ze,gt)=>gt.updatedAt.localeCompare(Ze.updatedAt)):se.value==="created-desc"?Re.sort((Ze,gt)=>gt.createdAt.localeCompare(Ze.createdAt)):Re.sort((Ze,gt)=>Ze.title.localeCompare(gt.title,"zh")),Re}),we=F(()=>{const Ne=new Map;for(const Re of Ge.value){const Ze=Ne.get(Re.cwd)??[];Ze.push(Re),Ne.set(Re.cwd,Ze)}return Array.from(Ne.entries()).map(([Re,Ze])=>({cwd:Re,items:Ze}))});async function Te(Ne){await ae.restoreSession(Ne)&&(Y.value=Y.value.filter(Ze=>Ze.id!==Ne))}function st(Ne){const Re=new Date(Ne);if(Number.isNaN(Re.getTime()))return Ne;const Ze=gt=>String(gt).padStart(2,"0");return`${Re.getFullYear()}-${Ze(Re.getMonth()+1)}-${Ze(Re.getDate())} ${Ze(Re.getHours())}:${Ze(Re.getMinutes())}`}return(Ne,Re)=>(k(),me(p(sa),{open:!0,"close-on-esc":!1,"aria-label":p(n)("settings.title"),size:"xl",height:"fixed",padded:!1,level:"grouped",onClose:Re[16]||(Re[16]=Ze=>s("close"))},{default:be(()=>[C("div",{ref_key:"dialogRef",ref:y,class:"sd"},[C("nav",{class:"settings-tabs",role:"tablist","aria-label":p(n)("settings.title")},[C("header",OFe,[C("h2",FFe,N(p(n)("settings.title")),1)]),C("div",RFe,[(k(),M(De,null,vt(g,Ze=>C("button",{key:Ze.id,type:"button",class:Fe(["tab",{on:d.value===Ze.id}]),role:"tab","aria-selected":d.value===Ze.id,onClick:gt=>ne(Ze.id)},[q(p(Me),{name:Ze.icon,size:"md"},null,8,["name"]),C("span",null,N(p(n)(Ze.labelKey)),1)],10,PFe)),64))])],8,NFe),C("section",DFe,[C("header",BFe,[q(p(mn),{size:"sm",label:p(n)("settings.close"),onClick:Re[0]||(Re[0]=Ze=>s("close"))},{default:be(()=>[q(p(Me),{name:"close",size:"md"})]),_:1},8,["label"])]),C("div",{class:Fe(["body",{scrolling:f.value}]),onScroll:m},[An(C("section",HFe,[C("section",zFe,[C("h3",WFe,N(p(n)("settings.appearance")),1),C("div",UFe,[C("div",jFe,[C("span",VFe,[Ve(N(p(n)("theme.colorSchemeLabel"))+" ",1),C("span",qFe,N(p(n)("settings.colorSchemeHint")),1)]),q(p(ai),{"model-value":e.colorScheme,options:[{value:"light",label:p(n)("theme.light"),icon:"light-mode"},{value:"dark",label:p(n)("theme.dark"),icon:"dark-mode"},{value:"system",label:p(n)("theme.system")}],"onUpdate:modelValue":Re[1]||(Re[1]=Ze=>s("setColorScheme",Ze))},null,8,["model-value","options"])]),C("div",KFe,[C("span",ZFe,[Ve(N(p(n)("sidebar.language"))+" ",1),C("span",GFe,N(p(n)("settings.languageHint")),1)]),q(VN)]),C("div",YFe,[C("span",XFe,[Ve(N(p(n)("settings.uiFontSize"))+" ",1),C("span",JFe,N(p(n)("settings.uiFontSizeHint")),1)]),q(p(ai),{"model-value":e.fontScale,options:[{value:"small",label:"S"},{value:"medium",label:"M"},{value:"large",label:"L"},{value:"xlarge",label:"XL"}],"aria-label":p(n)("settings.uiFontSize"),"onUpdate:modelValue":Re[2]||(Re[2]=Ze=>s("setFontScale",Ze))},null,8,["model-value","aria-label"])])])]),C("section",QFe,[C("h3",eRe,N(p(n)("settings.notifications")),1),C("div",tRe,[C("div",nRe,[C("span",oRe,[Ve(N(p(n)("settings.notifyEnabled"))+" ",1),C("span",sRe,N(p(n)("settings.notifyEnabledHint")),1),e.notifyPermission==="denied"?(k(),M("span",iRe,N(p(n)("settings.notifyDenied")),1)):te("",!0)]),q(p(Gu),{"model-value":e.notify,disabled:e.notifyPermission==="denied",label:p(n)("settings.notifyEnabled"),"onUpdate:modelValue":Re[3]||(Re[3]=Ze=>s("setNotify",Ze))},null,8,["model-value","disabled","label"])]),C("div",rRe,[C("span",lRe,[Ve(N(p(n)("settings.notifySound"))+" ",1),C("span",aRe,N(p(n)("settings.notifySoundHint")),1)]),q(p(Gu),{"model-value":e.notifySound,label:p(n)("settings.notifySound"),"onUpdate:modelValue":Re[4]||(Re[4]=Ze=>s("setNotifySound",Ze))},null,8,["model-value","label"])])])])],512),[[xs,d.value==="general"]]),An(C("section",cRe,[C("section",uRe,[C("h3",dRe,N(p(n)("settings.account")),1),C("div",fRe,[C("div",pRe,[C("span",hRe,[c.value?(k(),M("img",{key:0,src:o.managedUserInfo?.avatar,alt:"",onError:Re[5]||(Re[5]=Ze=>a.value=!0)},null,40,mRe)):(k(),me(p(Me),{key:1,name:"user",size:"md"}))]),C("span",gRe,[C("span",vRe,[C("span",yRe,N(r.value),1),l.value?(k(),me(p(Wr),{key:0,class:"account-level",variant:"neutral",size:"sm"},{default:be(()=>[Ve(N(l.value),1)]),_:1})):te("",!0)]),C("span",kRe,N(u.value),1)]),i.value?(k(),me(p(Rt),{key:0,variant:"danger-soft",size:"sm",onClick:Re[6]||(Re[6]=Ze=>s("logout"))},{default:be(()=>[Ve(N(p(n)("sidebar.signOut")),1)]),_:1})):(k(),me(p(Rt),{key:1,variant:"primary",size:"sm",onClick:Re[7]||(Re[7]=Ze=>s("login"))},{default:be(()=>[Ve(N(p(n)("sidebar.signIn")),1)]),_:1}))])])]),j.value?(k(),me(YN,{key:0})):i.value?(k(),me(vFe,{key:1,"on-fetch-usage":o.onFetchUsage},null,8,["on-fetch-usage"])):te("",!0)],512),[[xs,d.value==="account"]]),d.value==="providers"?(k(),M("section",bRe,[q(LOe)])):te("",!0),An(C("section",CRe,[C("section",wRe,[C("div",_Re,[C("h3",xRe,N(p(n)("settings.agentDefaults")),1)]),C("div",SRe,[e.config?(k(),M(De,{key:0},[C("div",ARe,[C("span",MRe,[Ve(N(p(n)("settings.defaultModel"))+" ",1),C("span",TRe,N(p(n)("settings.defaultModelHint")),1)]),D.value.length>0?(k(),M("div",ERe,[q(p(X4),{"model-value":e.config.defaultModel??"",options:H.value,"aria-label":p(n)("settings.defaultModel"),"onUpdate:modelValue":U},null,8,["model-value","options","aria-label"])])):(k(),M("span",IRe,N(e.config.defaultModel??p(n)("settings.noDefaultModel")),1))]),C("div",LRe,[C("span",$Re,[Ve(N(p(n)("settings.defaultPermission"))+" ",1),C("span",NRe,N(p(n)("settings.defaultPermissionHint")),1)]),q(p(ai),{"model-value":O.value,options:_.map(Ze=>({value:Ze,label:p(n)(v[Ze])})),"onUpdate:modelValue":Re[8]||(Re[8]=Ze=>G(Ze))},null,8,["model-value","options"])]),C("div",ORe,[C("span",FRe,[Ve(N(p(n)("settings.defaultThinking"))+" ",1),C("span",RRe,N(p(n)("settings.defaultThinkingHint")),1)]),q(p(Gu),{"model-value":pe(),label:p(n)("settings.defaultThinking"),"onUpdate:modelValue":Re[9]||(Re[9]=Ze=>ve())},null,8,["model-value","label"])]),C("div",PRe,[C("span",DRe,[Ve(N(p(n)("settings.defaultPlanMode"))+" ",1),C("span",BRe,N(p(n)("settings.defaultPlanModeHint")),1)]),q(p(Gu),{"model-value":W(e.config.defaultPlanMode),label:p(n)("settings.defaultPlanMode"),"onUpdate:modelValue":Re[10]||(Re[10]=Ze=>xe("defaultPlanMode"))},null,8,["model-value","label"])])],64)):(k(),M("div",HRe,N(p(n)("settings.configUnavailable")),1))])]),e.config&&Z.value?(k(),M("section",zRe,[C("div",WRe,[C("h3",URe,N(p(n)("settings.secondaryModelSection")),1)]),C("div",jRe,[C("div",VRe,[C("span",qRe,[Ve(N(p(n)("settings.secondaryModel"))+" ",1),C("span",KRe,N(p(n)("settings.secondaryModelHint")),1)]),D.value.length>0?(k(),M("div",ZRe,[q($Fe,{"model-value":ee.value,effort:Q.value,groups:D.value,"model-info-by-id":X.value,onSelect:oe},null,8,["model-value","effort","groups","model-info-by-id"])])):(k(),M("span",GRe,N(ee.value||p(n)("settings.noSecondaryModel")),1))])])])):te("",!0)],512),[[xs,d.value==="agent"]]),An(C("section",YRe,[C("section",XRe,[C("h3",JRe,N(p(n)("settings.versionAndUpdates")),1),C("div",QRe,[C("div",ePe,[C("span",tPe,[Ve(N(p(n)("settings.appVersion"))+" ",1),C("span",nPe,N(p(n)("settings.appVersionHint")),1)]),C("span",oPe,N(p(L)),1)]),C("div",sPe,[C("span",iPe,[Ve(N(p(n)("settings.serverVersion"))+" ",1),C("span",rPe,N(p(n)("settings.serverVersionHint")),1)]),C("span",lPe,N(e.serverVersion||"-"),1)]),C("div",aPe,[C("span",cPe,[Ve(N(p(n)("settings.serverAddress"))+" ",1),C("span",uPe,N(p(n)("settings.serverAddressHint")),1)]),C("span",dPe,N(p(b)),1)]),p(S).canCheck?(k(),M("div",fPe,[C("span",pPe,[Ve(N(p(n)("settings.checkUpdate"))+" ",1),I.value?(k(),M("span",hPe,N(I.value),1)):(k(),M("span",mPe,N(p(n)("settings.checkUpdateHint")),1))]),q(p(Rt),{variant:"secondary",size:"sm",disabled:T.value,onClick:B},{default:be(()=>[Ve(N(T.value?p(n)("settings.updateChecking"):p(n)("settings.checkUpdateBtn")),1)]),_:1},8,["disabled"])])):te("",!0),p(S).canToggleAutoDownload?(k(),M("div",gPe,[C("span",vPe,[Ve(N(p(n)("settings.autoDownloadUpdate"))+" ",1),C("span",yPe,N(p(n)("settings.autoDownloadUpdateHint")),1)]),q(p(Gu),{"model-value":p(S).autoDownload.value,label:p(n)("settings.autoDownloadUpdate"),"onUpdate:modelValue":Re[11]||(Re[11]=Ze=>p(S).setAutoDownload(Ze))},null,8,["model-value","label"])])):te("",!0)])]),e.config?(k(),M("section",kPe,[C("h3",bPe,N(p(n)("settings.privacy")),1),C("div",CPe,[C("div",wPe,[C("span",_Pe,[Ve(N(p(n)("settings.telemetry"))+" ",1),C("span",xPe,N(p(n)("settings.telemetryHint")),1),C("span",SPe,N(p(n)("settings.telemetryRestartHint")),1)]),q(p(Gu),{"model-value":e.config.telemetry!==!1,disabled:e.configSaving,label:p(n)("settings.telemetry"),"onUpdate:modelValue":Re[12]||(Re[12]=Ze=>ge())},null,8,["model-value","disabled","label"])])])])):te("",!0),C("section",APe,[C("h3",MPe,N(p(n)("settings.diagnostics")),1),C("div",TPe,[C("div",EPe,[C("span",IPe,[Ve(N(p(n)("settings.exportLog"))+" ",1),C("span",LPe,N(p(n)("settings.exportLogHint")),1),p(Gr)()?te("",!0):(k(),M("span",$Pe,N(p(n)("settings.logHint")),1))]),q(p(Rt),{variant:"secondary",size:"sm",onClick:A},{default:be(()=>[Ve(N(p(n)("settings.exportLogBtn")),1)]),_:1})])])])],512),[[xs,d.value==="advanced"]]),An(C("section",NPe,[C("div",OPe,[C("h4",FPe,N(p(n)("settings.archivedTitle")),1),C("p",RPe,N(p(n)("settings.archivedDesc")),1)]),C("div",PPe,[C("label",DPe,[Re[17]||(Re[17]=C("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"},[C("circle",{cx:"11",cy:"11",r:"7"}),C("path",{d:"m21 21-4.3-4.3"})],-1)),An(C("input",{"onUpdate:modelValue":Re[13]||(Re[13]=Ze=>de.value=Ze),placeholder:p(n)("settings.archivedSearch")},null,8,BPe),[[Ys,de.value]])]),q(p(X4),{"model-value":J.value,options:Ie.value,size:"sm","aria-label":p(n)("settings.archivedAllWorkspaces"),"onUpdate:modelValue":Re[14]||(Re[14]=Ze=>J.value=Ze)},null,8,["model-value","options","aria-label"]),q(p(ai),{size:"sm","model-value":se.value,options:[{value:"archived-desc",label:p(n)("settings.archivedSortArchived"),icon:"clock"},{value:"created-desc",label:p(n)("settings.archivedSortCreated"),icon:"calendar-schedule"},{value:"name-asc",label:p(n)("settings.archivedSortName"),icon:"sort"}],"onUpdate:modelValue":Re[15]||(Re[15]=Ze=>se.value=Ze)},null,8,["model-value","options"])]),fe.value?(k(),M("div",HPe,N(p(n)("settings.archivedLoadingAll")),1)):(k(),M(De,{key:1},[we.value.length>0?(k(),M("div",zPe,[(k(!0),M(De,null,vt(we.value,Ze=>(k(),M("section",{key:Ze.cwd,class:"archive-card"},[C("div",WPe,[q(p(Me),{name:"folder-closed",size:"md"}),C("span",UPe,N(Ze.cwd),1),C("span",jPe,N(p(n)("settings.archivedSessionsCount",{count:Ze.items.length})),1)]),C("div",VPe,[(k(!0),M(De,null,vt(Ze.items,gt=>(k(),M("div",{key:gt.id,class:"archive-row"},[C("div",qPe,[C("div",KPe,N(gt.title),1),C("div",ZPe,N(p(n)("settings.archivedAt",{time:st(gt.updatedAt)})),1)]),q(p(Rt),{variant:"secondary",size:"sm",onClick:Pt=>Te(gt.id)},{default:be(()=>[q(p(Me),{name:"undo",size:"sm"}),C("span",null,N(p(n)("settings.archivedRestore")),1)]),_:1},8,["onClick"])]))),128))])]))),128))])):(k(),M("div",GPe,N(Y.value.length===0?p(n)("settings.archivedEmpty"):p(n)("settings.archivedNoMatch")),1))],64))],512),[[xs,d.value==="archived"]])],34)])],512)]),_:1},8,["aria-label"]))}}),JPe=mt(XPe,[["__scopeId","data-v-1764f4b1"]]),QPe={class:"aw"},eDe={class:"crumbbar"},tDe={class:"crumbs"},nDe={key:0,class:"crumb-sep"},oDe=["onClick"],sDe={key:0,class:"filterbar"},iDe=["placeholder"],rDe={class:"folder-list"},lDe={key:0,class:"fl-loading"},aDe=["onClick"],cDe={class:"folder-name search-rel"},uDe={key:0,class:"fl-empty"},dDe={key:1,class:"fl-loading"},fDe=["onClick"],pDe={class:"folder-name"},hDe={key:0,class:"fl-empty"},mDe={class:"paste-row"},gDe={class:"paste-input-wrap"},vDe={key:1,class:"add-error",role:"alert"},yDe={class:"actions"},kDe={class:"footer-hint"},bDe=600,CDe=6,Qx=150,wDe=et({__name:"AddWorkspaceDialog",props:{browseFs:{type:Function},getFsHome:{type:Function},defaultPath:{},error:{}},emits:["add","close"],setup(e,{emit:t}){const{t:n}=$t(),o=e,s=t,i=K(!0),r=K(!1),l=K(!1),a=K(""),c=K(null),u=K([]),d=K(""),f=K(!1),h=K([]),m=F(()=>d.value.trim().length>0);let g=0,b=null;function _(z,W){const U=z.toLowerCase(),G=W.toLowerCase();let Z=0;for(let ee=0;ee0&&Q=Qx))break;X.depth+1{if(b&&clearTimeout(b),z.trim()===""){g++,h.value=[],f.value=!1;return}b=setTimeout(()=>void v(z),220)});const y=K(!1),w=K(""),x=F(()=>w.value.trim()),A=F(()=>{const z=a.value;if(!z)return[];const W=z.split("/").filter(Boolean),U=[{label:"/",path:"/"}];let G="";for(const Z of W)G+=`/${Z}`,U.push({label:Z,path:G});return U}),L=F(()=>a.value.length>0);async function S(z){r.value=!0;try{const W=await o.browseFs(z);if(!W.path){l.value=!0;return}a.value=W.path,c.value=W.parent,u.value=W.entries,d.value="",l.value=!1}catch{l.value=!0}finally{r.value=!1}}function T(z){z.isDir&&S(z.path)}function R(){c.value&&S(c.value)}function B(){L.value&&s("add",a.value)}function I(){x.value.length!==0&&s("add",x.value)}const{handleCompositionStart:$,handleCompositionEnd:D,isComposingKeyEvent:H}=_r();function O(z){H(z)||I()}function P(z){z.key==="Escape"&&H(z)&&z.stopPropagation()}return cn(async()=>{r.value=!0;try{if(o.defaultPath&&(await S(o.defaultPath),!l.value))return;const z=await o.getFsHome();z.home?await S(z.home):l.value=!0}catch{l.value=!0}finally{r.value=!1}}),kn(()=>{b&&clearTimeout(b)}),(z,W)=>(k(),me(p(sa),{open:i.value,"onUpdate:open":W[5]||(W[5]=U=>i.value=U),title:p(n)("workspace.addTitle"),size:"lg",height:"fixed",padded:!1,onClose:W[6]||(W[6]=U=>s("close"))},{default:be(()=>[C("div",QPe,[l.value?te("",!0):(k(),M(De,{key:0},[C("div",eDe,[q(p(mn),{size:"sm",disabled:!c.value,label:p(n)("workspace.up"),onClick:R},{default:be(()=>[q(p(Me),{name:"arrow-up",size:"md"})]),_:1},8,["disabled","label"]),C("div",tDe,[(k(!0),M(De,null,vt(A.value,(U,G)=>(k(),M(De,{key:U.path},[G>1?(k(),M("span",nDe,"/")):te("",!0),C("button",{class:Fe(["crumb",{last:G===A.value.length-1}]),onClick:Z=>S(U.path)},N(U.label),11,oDe)],64))),128))])]),r.value?te("",!0):(k(),M("div",sDe,[q(p(Me),{class:"filter-icon",name:"search",size:"md"}),An(C("input",{"onUpdate:modelValue":W[0]||(W[0]=U=>d.value=U),class:"filter-input",type:"text",placeholder:p(n)("workspace.searchPlaceholder"),autocomplete:"off",spellcheck:"false",onKeydown:W[1]||(W[1]=Ot(()=>{},["stop"]))},null,40,iDe),[[Ys,d.value]]),f.value?(k(),me(p(Ao),{key:0,size:"sm"})):te("",!0)])),C("div",rDe,[r.value?(k(),M("div",lDe,N(p(n)("workspace.browsing")),1)):m.value?(k(),M(De,{key:1},[(k(!0),M(De,null,vt(h.value,U=>(k(),M("button",{key:U.path,class:"folder-row",onClick:G=>S(U.path)},[q(p(Me),{class:"dir-icon",name:"folder-closed",size:"sm"}),C("span",cDe,N(U.rel),1)],8,aDe))),128)),!f.value&&h.value.length===0?(k(),M("div",uDe,N(p(n)("workspace.noFilterMatch",{q:d.value.trim()})),1)):f.value&&h.value.length===0?(k(),M("div",dDe,N(p(n)("workspace.searching")),1)):te("",!0)],64)):(k(),M(De,{key:2},[(k(!0),M(De,null,vt(u.value,U=>(k(),M("button",{key:U.path,class:"folder-row",onClick:G=>T(U)},[q(p(Me),{class:"dir-icon",name:"folder-closed",size:"sm"}),C("span",pDe,N(U.name),1)],8,fDe))),128)),u.value.length===0?(k(),M("div",hDe,N(p(n)("workspace.noSubfolders")),1)):te("",!0)],64))])],64)),C("div",{class:Fe(["paste-section",{"paste-only":l.value}])},[!l.value&&!y.value?(k(),me(p(Rt),{key:0,variant:"ghost",size:"sm",onClick:W[2]||(W[2]=U=>y.value=!0)},{default:be(()=>[Ve(N(p(n)("workspace.pasteToggle")),1)]),_:1})):(k(),me(p(lW),{key:1,label:p(n)("workspace.pathLabel")},{default:be(()=>[C("div",mDe,[C("div",gDe,[q(p(Os),{modelValue:w.value,"onUpdate:modelValue":W[3]||(W[3]=U=>w.value=U),placeholder:p(n)("workspace.pathPlaceholder"),autocomplete:"off",spellcheck:"false",onKeydown:[yl(Ot(O,["stop"]),["enter"]),P],onCompositionstart:p($),onCompositionend:p(D)},null,8,["modelValue","placeholder","onKeydown","onCompositionstart","onCompositionend"])]),q(p(mn),{disabled:x.value.length===0,label:p(n)("workspace.add"),onClick:I},{default:be(()=>[q(p(Me),{name:"plus",size:"md"})]),_:1},8,["disabled","label"])])]),_:1},8,["label"]))],2),e.error?(k(),M("div",vDe,N(e.error),1)):te("",!0),C("div",yDe,[q(p($n),{text:a.value},{default:be(()=>[l.value?te("",!0):(k(),me(p(Rt),{key:0,variant:"primary",disabled:!L.value,onClick:B},{default:be(()=>[Ve(N(p(n)("workspace.openThisFolder")),1)]),_:1},8,["disabled"]))]),_:1},8,["text"]),q(p(Rt),{variant:"secondary",onClick:W[4]||(W[4]=U=>s("close"))},{default:be(()=>[Ve(N(p(n)("workspace.cancel")),1)]),_:1})]),C("div",kDe,N(p(n)("workspace.browseHint")),1)])]),_:1},8,["open","title"]))}}),_De=mt(wDe,[["__scopeId","data-v-9655d534"]]),xDe={key:0,class:"confirm-dialog__message"},SDe=et({__name:"ConfirmDialog",props:{open:{type:Boolean},title:{},message:{},confirmLabel:{},cancelLabel:{},variant:{default:"danger"},loading:{type:Boolean}},emits:["update:open","confirm","cancel"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t();function i(){n.loading||(o("update:open",!1),o("cancel"))}function r(l){if(l.key!=="Enter"||!n.open||n.loading)return;const a=l.target;a instanceof HTMLButtonElement||a instanceof HTMLAnchorElement||a instanceof HTMLTextAreaElement||a instanceof HTMLSelectElement||a instanceof HTMLInputElement||(l.preventDefault(),o("confirm"))}return typeof window<"u"&&window.addEventListener("keydown",r),Dn(()=>{typeof window<"u"&&window.removeEventListener("keydown",r)}),(l,a)=>(k(),me(p(sa),{open:e.open,title:e.title,height:"auto","initial-focus":".confirm-dialog__confirm","close-on-esc":!e.loading,"close-on-overlay":!e.loading,"onUpdate:open":a[1]||(a[1]=c=>o("update:open",c)),onClose:i},{foot:be(()=>[q(p(Rt),{variant:"secondary",disabled:e.loading,onClick:i},{default:be(()=>[Ve(N(e.cancelLabel??p(s)("common.cancel")),1)]),_:1},8,["disabled"]),q(p(Rt),{class:"confirm-dialog__confirm",variant:e.variant,loading:e.loading,onClick:a[0]||(a[0]=c=>o("confirm"))},{default:be(()=>[Ve(N(e.confirmLabel??p(s)("common.confirm")),1)]),_:1},8,["variant","loading"])]),default:be(()=>[e.message?(k(),M("p",xDe,N(e.message),1)):te("",!0)]),_:1},8,["open","title","close-on-esc","close-on-overlay"]))}}),ADe=mt(SDe,[["__scopeId","data-v-76fb3ee3"]]),MDe=et({__name:"ConfirmDialogHost",setup(e){const{current:t,busy:n,settle:o,runAction:s}=cc();function i(){s()}return(r,l)=>p(t)!==null?(k(),me(ADe,{key:0,open:!0,title:p(t).title,message:p(t).message,"confirm-label":p(t).confirmLabel,"cancel-label":p(t).cancelLabel,variant:p(t).variant,loading:p(n),onConfirm:i,onCancel:l[0]||(l[0]=a=>p(o)(!1))},null,8,["title","message","confirm-label","cancel-label","variant","loading"])):te("",!0)}}),TDe={class:"rows"},EDe={class:"row"},IDe={class:"row"},LDe={class:"row"},$De={class:"row"},NDe={class:"row"},ODe={class:"row"},FDe={class:"ctx-text"},RDe={key:0,class:"bar"},PDe={class:"row"},DDe=et({__name:"StatusPanel",props:{status:{},thinking:{},planMode:{type:Boolean},swarmMode:{type:Boolean},costUsd:{}},emits:["close"],setup(e,{emit:t}){const{t:n}=$t(),o=e,s=t,i=K(!0),r=F(()=>o.status.ctxMax<=0?0:Math.min(100,Math.max(0,Math.ceil(o.status.ctxUsed/o.status.ctxMax*100)))),l=F(()=>o.status.ctxMax>0?n("status.statusContextValue",{used:bl(o.status.ctxUsed),max:bl(o.status.ctxMax),pct:r.value}):n("status.statusNone"));function a(m){return n(m==="yolo"?"status.permissionYolo":m==="auto"?"status.permissionAuto":"status.permissionManual")}const c=F(()=>{const m=o.status.permission;return m==="auto"?"var(--color-danger)":m==="yolo"?"var(--color-warning)":"var(--color-text)"}),u=F(()=>o.planMode?n("status.planOn"):n("status.planOff")),d=F(()=>o.swarmMode?n("status.swarmOn"):n("status.swarmOff")),f=F(()=>typeof o.costUsd=="number"&&o.costUsd>0),h=F(()=>f.value?`$${o.costUsd.toFixed(4)}`:n("status.statusNone"));return(m,g)=>(k(),me(p(sa),{open:i.value,"onUpdate:open":g[0]||(g[0]=b=>i.value=b),title:p(n)("status.statusPanelTitle"),onClose:g[1]||(g[1]=b=>s("close"))},{default:be(()=>[C("dl",TDe,[C("div",EDe,[C("dt",null,N(p(n)("status.statusModel")),1),C("dd",null,N(e.status.model),1)]),C("div",IDe,[C("dt",null,N(p(n)("status.statusThinking")),1),C("dd",null,N(e.thinking),1)]),C("div",LDe,[C("dt",null,N(p(n)("status.statusPermission")),1),C("dd",{style:Gt({color:c.value})},N(a(e.status.permission)),5)]),C("div",$De,[C("dt",null,N(p(n)("status.statusPlanMode")),1),C("dd",{class:Fe({"plan-on":e.planMode})},N(u.value),3)]),C("div",NDe,[C("dt",null,N(p(n)("status.statusSwarmMode")),1),C("dd",{class:Fe({"swarm-on":e.swarmMode})},N(d.value),3)]),C("div",ODe,[C("dt",null,N(p(n)("status.statusContext")),1),C("dd",null,[C("span",FDe,N(l.value),1),e.status.ctxMax>0?(k(),M("span",RDe,[C("i",{style:Gt({width:r.value+"%"})},null,4)])):te("",!0)])]),C("div",PDe,[C("dt",null,N(p(n)("status.statusCost")),1),C("dd",null,N(h.value),1)])])]),_:1},8,["open","title"]))}}),BDe=mt(DDe,[["__scopeId","data-v-7c3d87c3"]]),HDe={key:0,class:"actions"},zDe=["onClick"],WDe=["onClick"],UDe={key:1,class:"details"},jDe=et({__name:"WarningToasts",props:{warnings:{}},emits:["dismiss"],setup(e,{emit:t}){const n=e,o=t,{t:s}=$t();function i(T){return typeof T=="object"&&T!==null}function r(T){return i(T)?T.title:T}function l(T){return i(T)?T.message??"":""}function a(T){return i(T)?T.details:void 0}function c(T){return i(T)?T.severity==="error":T.startsWith(`${s("warnings.errorLabel")}:`)||/\b4\d\d\b|error|失败|failed/i.test(T)}function u(T){return i(T)?T.severity==="error"?"danger":T.severity==="success"?"success":T.severity==="info"?"info":"warning":c(T)?"danger":"warning"}function d(T){return i(T)?`notice:${T.severity}:${T.title}:${T.message??""}:${JSON.stringify(T.details??[])}`:`text:${T}`}function f(T){if(!i(T))return T;const R=[T.title];T.message&&R.push(T.message);const B=T.details??[];if(B.length>0){R.push("",`${s("warnings.diagnostics")}:`);for(const I of B)R.push(`${I.label}: ${I.value}`)}return R.join(` -`)}let h=1;const m=K([]),g=new Map,b=new Map;function _(T){const R=c(T)?12e3:6e3;return typeof window<"u"&&window.matchMedia?.("(hover: none)").matches===!0?R+5e3:R}function v(T,R){const B=g.get(T)??{handle:null,deadline:0,remaining:0};B.handle=setTimeout(()=>S(T),R),B.deadline=Date.now()+R,g.set(T,B)}function y(T){const R=g.get(T);R&&R.handle!==null&&clearTimeout(R.handle),g.delete(T)}function w(T){const R=g.get(T);!R||R.handle===null||(clearTimeout(R.handle),R.handle=null,R.remaining=Math.max(0,R.deadline-Date.now()))}function x(T){if(m.value.find(I=>I.id===T)?.detailsOpen)return;const B=g.get(T);!B||B.handle!==null||v(T,B.remaining)}function A(T){T.detailsOpen=!T.detailsOpen,T.detailsOpen?w(T.id):x(T.id)}async function L(T){if(!await Ps(f(T.warning)))return;T.copied=!0;const B=b.get(T.id);B&&clearTimeout(B),b.set(T.id,setTimeout(()=>{T.copied=!1,b.delete(T.id)},1400))}function S(T){y(T);const R=b.get(T);R&&clearTimeout(R),b.delete(T);const B=m.value.findIndex(I=>I.id===T);B!==-1&&(m.value=m.value.filter(I=>I.id!==T),o("dismiss",B))}return Je(()=>n.warnings,T=>{const R=[...m.value];m.value=T.map(B=>{const I=d(B),$=R.findIndex(O=>O.key===I),D=$===-1?void 0:R.splice($,1)[0];if(D)return D.warning=B,D;const H={id:h++,key:I,warning:B,detailsOpen:!1,copied:!1};return v(H.id,_(B)),H});for(const B of R){y(B.id);const I=b.get(B.id);I&&clearTimeout(I),b.delete(B.id)}},{immediate:!0,flush:"post"}),kn(()=>{g.forEach(T=>{T.handle!==null&&clearTimeout(T.handle)}),g.clear(),b.forEach(T=>clearTimeout(T)),b.clear()}),(T,R)=>(k(),me(OA,{name:"toast",tag:"div",class:"toasts",role:"status","aria-live":"polite"},{default:be(()=>[(k(!0),M(De,null,vt(m.value,B=>(k(),me(p(zW),{key:B.id,variant:u(B.warning),title:r(B.warning),message:l(B.warning),"dismiss-label":p(s)("warnings.dismiss"),onDismiss:I=>S(B.id),onPointerenter:I=>w(B.id),onPointerleave:I=>x(B.id)},{default:be(()=>[a(B.warning)?.length?(k(),M("div",HDe,[C("button",{class:"link",type:"button",onClick:I=>A(B)},N(B.detailsOpen?p(s)("warnings.hideDetails"):p(s)("warnings.showDetails")),9,zDe),C("button",{class:"link",type:"button",onClick:I=>L(B)},N(B.copied?p(s)("warnings.copied"):p(s)("warnings.copyDetails")),9,WDe)])):te("",!0),B.detailsOpen&&a(B.warning)?.length?(k(),M("dl",UDe,[(k(!0),M(De,null,vt(a(B.warning),I=>(k(),M("div",{key:`${I.label}:${I.value}`,class:"detail-row"},[C("dt",null,N(I.label),1),C("dd",null,N(I.value),1)]))),128))])):te("",!0)]),_:2},1032,["variant","title","message","dismiss-label","onDismiss","onPointerenter","onPointerleave"]))),128))]),_:1}))}}),VDe=mt(jDe,[["__scopeId","data-v-38645e9f"]]),qDe={class:"topbar"},KDe={class:"wsq"},ZDe=["aria-label"],GDe={class:"tb-path"},YDe={class:"ws"},XDe={class:"se"},JDe={class:"tb-sub"},QDe=et({__name:"MobileTopBar",props:{workspace:{default:null},sessionTitle:{default:""},running:{type:Boolean,default:!1},branch:{default:""},sessionCount:{default:0}},emits:["openSwitcher","openSettings"],setup(e,{emit:t}){const{t:n}=$t(),o=e,s=t,i=F(()=>{const a=o.workspace,u=(a?.name||a?.root||"").trim().charAt(0);return u?u.toUpperCase():"K"}),r=F(()=>o.workspace?.name??n("workspace.noWorkspace")),l=F(()=>o.running?n("mobile.running"):n("mobile.idle"));return(a,c)=>(k(),M("div",qDe,[C("span",KDe,N(i.value),1),C("button",{type:"button",class:"tb-mid","aria-label":p(n)("mobile.openSwitcher"),onClick:c[0]||(c[0]=u=>s("openSwitcher"))},[C("span",GDe,[C("span",YDe,N(r.value),1),e.sessionTitle?(k(),M(De,{key:0},[c[2]||(c[2]=C("span",{class:"sl"},"/",-1)),C("span",XDe,N(e.sessionTitle),1)],64)):te("",!0),c[3]||(c[3]=C("span",{class:"cv"},"⌄",-1))]),C("span",JDe,[C("span",{class:Fe(["rd",{on:e.running}])},null,2),C("span",null,N(l.value),1),e.branch?(k(),M(De,{key:0},[Ve(" · "+N(e.branch),1)],64)):te("",!0),e.sessionCount>0?(k(),M(De,{key:1},[Ve(" · "+N(p(n)("mobile.sessionCount",{n:e.sessionCount})),1)],64)):te("",!0)])],8,ZDe),q(p(mn),{size:"lg",label:p(n)("mobile.openSettings"),onClick:c[1]||(c[1]=u=>s("openSettings"))},{default:be(()=>[q(p(Me),{name:"sliders",size:"lg"})]),_:1},8,["label"])]))}}),eBe=mt(QDe,[["__scopeId","data-v-0231ec69"]]),tBe={key:0,class:"sheet-root"},nBe=["aria-label"],oBe=["aria-label"],sBe={key:0,class:"sheet-head"},iBe={class:"sheet-title"},rBe={class:"sheet-body"},lBe=et({__name:"BottomSheet",props:{modelValue:{type:Boolean},title:{default:""},closeOnEsc:{type:Boolean,default:!0}},emits:["update:modelValue","close"],setup(e,{emit:t}){const{t:n}=$t(),o=e,s=t;function i(){s("update:modelValue",!1),s("close")}function r(l){l.key==="Escape"&&o.closeOnEsc&&i()}return Je(()=>o.modelValue,l=>{typeof document>"u"||(l?document.addEventListener("keydown",r):document.removeEventListener("keydown",r))},{immediate:!0}),kn(()=>{typeof document<"u"&&document.removeEventListener("keydown",r)}),(l,a)=>(k(),me(gs,{name:"sheet"},{default:be(()=>[e.modelValue?(k(),M("div",tBe,[C("div",{class:"sheet-scrim",onClick:i}),C("div",{class:"sheet-panel",role:"dialog","aria-label":e.title||p(n)("mobile.sheetLabel")},[C("button",{type:"button",class:"sheet-grab","aria-label":p(n)("mobile.closeSheet"),onClick:i},null,8,oBe),e.title?(k(),M("div",sBe,[C("span",iBe,N(e.title),1)])):te("",!0),C("div",rBe,[Cn(l.$slots,"default",{},void 0,!0)])],8,nBe)])):te("",!0)]),_:3}))}}),XN=mt(lBe,[["__scopeId","data-v-c3d5dadc"]]),aBe={class:"mlist"},cBe={key:0,class:"mempty"},uBe=["onClick"],dBe={class:"mgh-main"},fBe={class:"mgh-name"},pBe={class:"mgh-path"},hBe={key:2,class:"att"},mBe={key:0,class:"mempty small"},gBe=["onClick"],vBe={class:"m"},yBe={class:"s"},kBe={key:0,class:"att"},bBe={key:1,class:"mshow-more-row"},CBe=["disabled","onClick"],wBe={key:1,class:"mshow-more-sep","aria-hidden":"true"},_Be=["onClick"],xBe=et({__name:"MobileSwitcherSheet",props:{modelValue:{type:Boolean},groups:{},activeWorkspaceId:{default:null},activeId:{},attentionBySession:{default:()=>({})},attentionByWorkspace:{default:()=>({})}},emits:["update:modelValue","select","create","createInWorkspace","addWorkspace","rename","archive","deleteWorkspace","loadMore"],setup(e,{emit:t}){const{t:n}=$t(),o=e,s=t;function i(){s("update:modelValue",!1)}function r($){s("select",$),i()}function l($){s("createInWorkspace",$),i()}function a(){s("create"),i()}function c(){s("addWorkspace"),i()}const u=K(new Set);function d($){return u.value.has($)}function f($){const D=new Set(u.value);D.has($)?D.delete($):D.add($),u.value=D,x.value=null,T.value=null}const h=K(new Map);function m($){return h.value.get($.workspace.id)??$.initialCount}function g($){const D=$.sessions.slice(0,m($));if(o.activeId&&!D.some(H=>H.id===o.activeId)){const H=$.sessions.find(O=>O.id===o.activeId);if(H)return[...D,H]}return D}function b($){return $.sessions.length>m($)||$.hasMore||$.loadingMore}function _($){return m($)>$.initialCount}function v($){const D=o.groups.find(P=>P.workspace.id===$);if(!D)return;const H=m(D)+x5,O=new Map(h.value);O.set($,H),h.value=O,D.sessions.length(k(),me(XN,{"model-value":e.modelValue,"onUpdate:modelValue":D[2]||(D[2]=H=>s("update:modelValue",H))},{default:be(()=>[C("button",{type:"button",class:"newrow",onClick:a},[q(p(Me),{name:"message",size:"sm"}),Ve(" "+N(p(n)("sidebar.newChat")),1)]),C("button",{type:"button",class:"newrow secondary",onClick:c},[q(p(Me),{name:"folder",size:"sm"}),Ve(" "+N(p(n)("sidebar.newWorkspace")),1)]),C("div",aBe,[e.groups.length===0?(k(),M("div",cBe,N(p(n)("workspace.noWorkspace")),1)):te("",!0),(k(!0),M(De,null,vt(e.groups,H=>(k(),M("div",{key:H.workspace.id,class:"mgroup"},[C("div",{class:Fe(["mgh",{on:H.workspace.id===e.activeWorkspaceId}]),onClick:O=>f(H.workspace.id)},[d(H.workspace.id)?(k(),me(p(Me),{key:0,class:"mgh-folder",name:"folder-closed",size:"sm"})):(k(),me(p(Me),{key:1,class:"mgh-folder",name:"folder",size:"sm"})),C("div",dBe,[C("span",fBe,N(H.workspace.name),1),q(p($n),{text:H.workspace.root},{default:be(()=>[C("span",pBe,N(H.workspace.shortPath),1)]),_:2},1032,["text"])]),d(H.workspace.id)&&w(H.workspace.id)>0?(k(),M("span",hBe,N(w(H.workspace.id)),1)):te("",!0),q(p(mn),{size:"lg",class:"mgh-more",label:p(n)("sidebar.options"),onClick:Ot(O=>R(H.workspace.id),["stop"])},{default:be(()=>[q(p(Me),{name:"dots-horizontal",size:"md"})]),_:1},8,["label","onClick"]),q(p(mn),{size:"lg",class:"mgh-add",label:p(n)("workspace.newInGroup"),onClick:Ot(O=>l(H.workspace.id),["stop"])},{default:be(()=>[q(p(Me),{name:"plus",size:"md"})]),_:1},8,["label","onClick"]),T.value===H.workspace.id?(k(),me(p(ea),{key:3,class:"kmenu wsmenu",onClick:D[0]||(D[0]=Ot(()=>{},["stop"]))},{default:be(()=>[q(p(hn),{size:"lg",onClick:O=>B(H.workspace)},{default:be(()=>[Ve(N(p(n)("sidebar.copyPath")),1)]),_:1},8,["onClick"]),q(p(hn),{size:"lg",danger:"",onClick:O=>I(H.workspace)},{default:be(()=>[Ve(N(p(n)("sidebar.delete")),1)]),_:1},8,["onClick"])]),_:2},1024)):te("",!0)],10,uBe),An(C("div",null,[H.sessions.length===0?(k(),M("div",mBe,N(p(n)("sidebar.noSessions")),1)):te("",!0),(k(!0),M(De,null,vt(g(H),O=>(k(),M("div",{key:O.id,class:Fe(["srow",{cur:O.id===e.activeId}]),onClick:P=>r(O.id)},[C("div",vBe,[C("div",{class:Fe(["t",{run:O.busy,aborted:!O.busy&&(e.attentionBySession[O.id]??0)===0&&(O.lastTurnReason==="cancelled"||O.lastTurnReason==="failed")}])},N(O.title),3),C("div",yBe,N(O.time),1)]),(e.attentionBySession[O.id]??0)>0?(k(),M("span",kBe,N(e.attentionBySession[O.id]),1)):te("",!0),q(p(mn),{size:"lg",class:"kb",label:p(n)("sidebar.options"),onClick:Ot(P=>A(O.id),["stop"])},{default:be(()=>[q(p(Me),{name:"dots-horizontal",size:"md"})]),_:1},8,["label","onClick"]),x.value===O.id?(k(),me(p(ea),{key:1,class:"kmenu",onClick:D[1]||(D[1]=Ot(()=>{},["stop"]))},{default:be(()=>[q(p(hn),{size:"lg",onClick:P=>L(O)},{default:be(()=>[Ve(N(p(n)("sidebar.rename")),1)]),_:1},8,["onClick"]),q(p(hn),{size:"lg",onClick:P=>S(O.id)},{default:be(()=>[Ve(N(p(n)("sidebar.archive")),1)]),_:1},8,["onClick"])]),_:2},1024)):te("",!0)],10,gBe))),128)),b(H)||_(H)?(k(),M("div",bBe,[b(H)?(k(),M("button",{key:0,type:"button",class:"mshow-more",disabled:H.loadingMore,onClick:Ot(O=>v(H.workspace.id),["stop"])},[q(p(Me),{name:"chevron-down",size:"sm"}),Ve(" "+N(H.loadingMore?p(n)("sidebar.loadingMore"):p(n)("sidebar.showMore")),1)],8,CBe)):te("",!0),b(H)&&_(H)?(k(),M("span",wBe,"·")):te("",!0),_(H)?(k(),M("button",{key:2,type:"button",class:"mshow-more",onClick:Ot(O=>y(H.workspace.id),["stop"])},[q(p(Me),{name:"chevron-up",size:"sm"}),Ve(" "+N(p(n)("sidebar.showLess")),1)],8,_Be)):te("",!0)])):te("",!0)],512),[[xs,!d(H.workspace.id)]])]))),128))])]),_:1},8,["model-value"]))}}),SBe=mt(xBe,[["__scopeId","data-v-5734b709"]]),ABe={class:"group-title"},MBe={class:"srow-main"},TBe={class:"srow-label"},EBe={class:"srow-sub"},IBe={class:"srow read-only"},LBe={class:"srow-main"},$Be={class:"srow-label"},NBe={key:0,class:"srow-sub"},OBe={class:"cache-note"},FBe={class:"srow-main"},RBe={class:"srow-label"},PBe={class:"srow-sub"},DBe=["aria-checked"],BBe={class:"srow-main"},HBe={class:"srow-label"},zBe={class:"srow-sub"},WBe=["aria-checked"],UBe={class:"srow-main"},jBe={class:"srow-label"},VBe={class:"srow read-only"},qBe={class:"srow-main"},KBe={class:"srow-label"},ZBe={class:"srow-sub"},GBe=["aria-label"],YBe={class:"group-title"},XBe={class:"srow-main"},JBe={class:"srow-label"},QBe={class:"srow-sub"},eHe={class:"srow read-only pref"},tHe={class:"srow-main"},nHe={class:"srow-label"},oHe={class:"srow read-only pref"},sHe={class:"srow-main"},iHe={class:"srow-label"},rHe={class:"srow read-only pref"},lHe={class:"srow-main"},aHe={class:"srow-label"},cHe={key:0,class:"srow read-only acct-profile"},uHe={class:"acct-avatar","aria-hidden":"true"},dHe=["src"],fHe={class:"srow-main"},pHe={class:"acct-name-row"},hHe={class:"srow-label"},mHe={class:"srow-sub"},gHe={class:"srow-main"},vHe={class:"srow-label"},yHe={class:"srow-main"},kHe={class:"srow-label"},bHe={key:3,class:"srow read-only"},CHe={class:"srow-main"},wHe={class:"srow-label"},_He={class:"srow-val dim"},xHe={class:"arch-subhead"},SHe={class:"arch-count"},AHe={class:"arch-tools"},MHe={key:0,class:"arch-empty"},THe={class:"arch-meta"},EHe={class:"arch-name"},IHe={class:"arch-time"},LHe={key:2,class:"arch-empty"},$He=100,NHe=et({__name:"MobileSettingsSheet",props:{modelValue:{type:Boolean},initialView:{},status:{},thinking:{},planMode:{type:Boolean},swarmMode:{type:Boolean},colorScheme:{default:"system"},fontScale:{default:"medium"},managedProviderStatus:{default:null},managedUserInfo:{default:null},serverVersion:{default:""},models:{default:()=>[]}},emits:["update:modelValue","pickModel","setThinking","togglePlan","toggleSwarm","setPermission","setColorScheme","setFontScale","login","logout"],setup(e,{emit:t}){const{t:n}=$t(),{isConfirmOpen:o}=cc(),s=e,i=t;function r(X){i("setColorScheme",X)}const l=["manual","yolo","auto"],a=F(()=>s.models?.find(X=>X.id===s.status?.modelId)),c=F(()=>_2(a.value)),u=F(()=>jp(a.value)),d=F(()=>pg(a.value,s.thinking)),f=F(()=>u.value.includes(d.value)?d.value:""),h=F(()=>u.value.map(X=>({value:X,label:J3(X)}))),m=F(()=>s.planMode===!0),g=F(()=>s.swarmMode===!0),b=K(!1);Je(()=>s.managedUserInfo?.avatar,()=>{b.value=!1});const _=F(()=>!!s.managedUserInfo?.avatar&&!b.value),v=F(()=>s.managedUserInfo?.userLevelName?.trim()??""),y=F(()=>{const X=s.status.permission;return X==="auto"?"var(--color-danger)":X==="yolo"?"var(--color-warning)":"var(--color-text-muted)"}),w=F(()=>{const X=s.status.permission,oe=n(X==="yolo"?"mobile.permYoloSub":X==="auto"?"mobile.permAutoSub":"mobile.permManualSub");return`${X} · ${oe}`}),x=F(()=>s.status.ctxMax>0?Math.min(100,Math.max(0,Math.ceil(s.status.ctxUsed/s.status.ctxMax*100))):0),A=F(()=>s.status.ctxMax>0?`${bl(s.status.ctxUsed)}/${bl(s.status.ctxMax)}`:n("status.statusNone"));function L(X){i("setThinking",w5(a.value,X))}function S(){const X=l.indexOf(s.status.permission),oe=l[(X+1)%l.length];i("setPermission",oe)}function T(){i("pickModel"),i("update:modelValue",!1)}function R(){i("login"),i("update:modelValue",!1)}function B(){i("logout"),i("update:modelValue",!1)}const I=uc(),$=K("main"),D=K([]),H=K(!1),O=K(!1),P=K(""),z=K("archived-desc");async function W(){if(!H.value){H.value=!0,O.value=!1;try{const X=[];let oe;for(;;){const xe=await I.loadArchivedSessions({beforeId:oe,pageSize:$He});if(X.push(...xe.items),!xe.hasMore||xe.items.length===0)break;const pe=xe.items.at(-1)?.id;if(pe===void 0)break;oe=pe}D.value=X,O.value=!0}catch(X){fl("loadAllArchived failed",X)}finally{H.value=!1}}}function U(){$.value="archived",P.value="",W()}Je(()=>s.modelValue,X=>{X&&s.initialView==="archived"&&U()});function G(){$.value="main"}const Z=F(()=>{const X=P.value.trim().toLowerCase();let oe=D.value.filter(xe=>xe.archived===!0);return X&&(oe=oe.filter(xe=>xe.title.toLowerCase().includes(X))),oe=oe.slice(),z.value==="archived-desc"?oe.sort((xe,pe)=>pe.updatedAt.localeCompare(xe.updatedAt)):z.value==="created-desc"?oe.sort((xe,pe)=>pe.createdAt.localeCompare(xe.createdAt)):oe.sort((xe,pe)=>xe.title.localeCompare(pe.title,"zh")),oe});async function ee(X){await I.restoreSession(X)&&(D.value=D.value.filter(xe=>xe.id!==X))}function Q(X){const oe=new Date(X);if(Number.isNaN(oe.getTime()))return X;const xe=pe=>String(pe).padStart(2,"0");return`${oe.getFullYear()}-${xe(oe.getMonth()+1)}-${xe(oe.getDate())} ${xe(oe.getHours())}:${xe(oe.getMinutes())}`}return Je(()=>s.modelValue,X=>{X||($.value="main")}),(X,oe)=>(k(),me(XN,{"model-value":e.modelValue,title:p(n)("mobile.settingsTitle"),"close-on-esc":!p(o),"onUpdate:modelValue":oe[6]||(oe[6]=xe=>i("update:modelValue",xe))},{default:be(()=>[$.value==="main"?(k(),M(De,{key:0},[C("div",ABe,N(p(n)("mobile.groupSession")),1),C("button",{type:"button",class:"srow",onClick:T},[C("span",MBe,[C("span",TBe,N(p(n)("status.statusModel")),1),C("span",EBe,N(e.status.model),1)]),oe[7]||(oe[7]=C("span",{class:"chev"},"›",-1))]),C("div",IBe,[C("span",LBe,[C("span",$Be,N(p(n)("status.statusThinking")),1),c.value==="unsupported"?(k(),M("span",NBe,N(p(n)("status.modeNotSupported")),1)):te("",!0)]),u.value.length>1?(k(),me(p(ai),{key:0,"model-value":f.value,options:h.value,size:"sm","onUpdate:modelValue":L},null,8,["model-value","options"])):(k(),M("span",{key:1,class:Fe(["srow-val",{dim:d.value==="off"}])},N(d.value==="off"?p(n)("status.planOff"):p(J3)(d.value)),3))]),C("div",OBe,N(p(n)("status.cacheNote")),1),C("button",{type:"button",class:"srow",onClick:oe[0]||(oe[0]=xe=>i("togglePlan"))},[C("span",FBe,[C("span",RBe,N(p(n)("status.statusPlanMode")),1),C("span",PBe,N(p(n)("mobile.planModeSub")),1)]),C("span",{class:Fe(["toggle",{on:m.value}]),role:"switch","aria-checked":m.value},null,10,DBe)]),C("button",{type:"button",class:"srow",onClick:oe[1]||(oe[1]=xe=>i("toggleSwarm"))},[C("span",BBe,[C("span",HBe,N(p(n)("status.statusSwarmMode")),1),C("span",zBe,N(p(n)("mobile.swarmModeSub")),1)]),C("span",{class:Fe(["toggle",{on:g.value}]),role:"switch","aria-checked":g.value},null,10,WBe)]),C("button",{type:"button",class:"srow",onClick:S},[C("span",UBe,[C("span",jBe,N(p(n)("status.statusPermission")),1),C("span",{class:"srow-sub",style:Gt({color:y.value})},N(w.value),5)]),oe[8]||(oe[8]=C("span",{class:"chev"},"›",-1))]),C("div",VBe,[C("span",qBe,[C("span",KBe,N(p(n)("status.statusContext")),1),C("span",ZBe,N(A.value),1)]),C("span",{class:"ctx-meter","aria-label":A.value},[C("i",{style:Gt({width:x.value+"%"})},null,4)],8,GBe)]),C("div",YBe,N(p(n)("mobile.groupApp")),1),C("button",{type:"button",class:"srow",onClick:U},[C("span",XBe,[C("span",JBe,N(p(n)("mobile.archivedSessions")),1),C("span",QBe,N(p(n)("mobile.archivedSessionsSub")),1)]),oe[9]||(oe[9]=C("span",{class:"chev"},"›",-1))]),C("div",eHe,[C("span",tHe,[C("span",nHe,N(p(n)("theme.colorSchemeLabel")),1)]),q(p(ai),{"model-value":e.colorScheme??"system",options:[{value:"light",label:p(n)("theme.light"),icon:"light-mode"},{value:"dark",label:p(n)("theme.dark"),icon:"dark-mode"},{value:"system",label:p(n)("theme.system")}],"onUpdate:modelValue":r},null,8,["model-value","options"])]),C("div",oHe,[C("span",sHe,[C("span",iHe,N(p(n)("sidebar.language")),1)]),q(VN)]),C("div",rHe,[C("span",lHe,[C("span",aHe,N(p(n)("settings.uiFontSize")),1)]),q(p(ai),{"model-value":e.fontScale,options:[{value:"small",label:"S"},{value:"medium",label:"M"},{value:"large",label:"L"},{value:"xlarge",label:"XL"}],"aria-label":p(n)("settings.uiFontSize"),"onUpdate:modelValue":oe[2]||(oe[2]=xe=>i("setFontScale",xe))},null,8,["model-value","aria-label"])]),e.managedProviderStatus==="authenticated"?(k(),M("div",cHe,[C("span",uHe,[_.value?(k(),M("img",{key:0,src:e.managedUserInfo?.avatar,alt:"",onError:oe[3]||(oe[3]=xe=>b.value=!0)},null,40,dHe)):(k(),me(p(Me),{key:1,name:"user",size:"md"}))]),C("span",fHe,[C("span",pHe,[C("span",hHe,N(e.managedUserInfo?.nickname||p(n)("sidebar.defaultUserName")),1),v.value?(k(),me(p(Wr),{key:0,class:"acct-level",variant:"neutral",size:"sm"},{default:be(()=>[Ve(N(v.value),1)]),_:1})):te("",!0)]),C("span",mHe,N(p(n)("settings.signedIn")),1)])])):te("",!0),e.managedProviderStatus==="authenticated"?(k(),M("button",{key:1,type:"button",class:"srow acct out",onClick:B},[C("span",gHe,[C("span",vHe,N(p(n)("sidebar.signOut")),1)])])):(k(),M("button",{key:2,type:"button",class:"srow acct in",onClick:R},[C("span",yHe,[C("span",kHe,N(p(n)("sidebar.signIn")),1)])])),e.serverVersion?(k(),M("div",bHe,[C("span",CHe,[C("span",wHe,N(p(n)("settings.serverVersion")),1)]),C("span",_He,N(e.serverVersion),1)])):te("",!0)],64)):(k(),M(De,{key:1},[C("div",xHe,[C("button",{type:"button",class:"arch-back",onClick:G},[oe[10]||(oe[10]=C("span",{class:"chev back"},"‹",-1)),Ve(" "+N(p(n)("mobile.archivedBack")),1)]),C("span",SHe,N(p(n)("mobile.sessionCount",{n:Z.value.length})),1)]),C("div",AHe,[q(p(Os),{class:"arch-search-input","model-value":P.value,size:"sm",placeholder:p(n)("settings.archivedSearch"),"onUpdate:modelValue":oe[4]||(oe[4]=xe=>P.value=xe)},null,8,["model-value","placeholder"]),q(p(ai),{size:"sm","model-value":z.value,options:[{value:"archived-desc",label:p(n)("settings.archivedSortArchived")},{value:"created-desc",label:p(n)("settings.archivedSortCreated")},{value:"name-asc",label:p(n)("settings.archivedSortName")}],"onUpdate:modelValue":oe[5]||(oe[5]=xe=>z.value=xe)},null,8,["model-value","options"])]),H.value?(k(),M("div",MHe,N(p(n)("settings.archivedLoadingAll")),1)):Z.value.length>0?(k(!0),M(De,{key:1},vt(Z.value,xe=>(k(),M("div",{key:xe.id,class:"arch-row"},[C("div",THe,[C("div",EHe,N(xe.title),1),C("div",IHe,N(p(n)("settings.archivedAt",{time:Q(xe.updatedAt)})),1)]),q(p(Rt),{variant:"secondary",size:"sm",onClick:pe=>ee(xe.id)},{default:be(()=>[Ve(N(p(n)("settings.archivedRestore")),1)]),_:1},8,["onClick"])]))),128)):(k(),M("div",LHe,N(D.value.length===0?p(n)("settings.archivedEmpty"):p(n)("settings.archivedNoMatch")),1))],64))]),_:1},8,["model-value","title","close-on-esc"]))}}),OHe=mt(NHe,[["__scopeId","data-v-ac7214c8"]]),FHe=["mask"],RHe=et({__name:"BrandLogo",props:{size:{default:64}},setup(e){const t=`bl-eyes-${JF()}`,n=K(null);let o;function s(){const i=n.value;i&&(i.classList.remove("blink-now"),i.getBoundingClientRect(),i.classList.add("blink-now"),clearTimeout(o),o=setTimeout(()=>i.classList.remove("blink-now"),300))}return Dn(()=>clearTimeout(o)),(i,r)=>(k(),M("svg",{ref_key:"logoRef",ref:n,class:"brand-logo",style:Gt({width:`${e.size}px`,height:`${e.size*22/32}px`}),viewBox:"0 0 32 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":"Kimi Code",onClick:s},[C("defs",null,[C("mask",{id:t,maskUnits:"userSpaceOnUse"},[...r[0]||(r[0]=[C("rect",{x:"0",y:"0",width:"32",height:"22",fill:"#fff"},null,-1),C("g",{class:"ch-eyes",fill:"#000"},[C("rect",{class:"ch-eye",x:"11.8",y:"7",width:"2.8",height:"8",rx:"1.4"}),C("rect",{class:"ch-eye",x:"17.4",y:"7",width:"2.8",height:"8",rx:"1.4"})],-1)])])]),C("rect",{x:"1",y:"1",width:"30",height:"20",rx:"6",fill:"var(--logo)",mask:`url(#${t})`},null,8,FHe)],4))}}),vy=mt(RHe,[["__scopeId","data-v-f04205a8"]]),PHe={key:0,class:"ls-done-card"},DHe={class:"ls-done-badge"},BHe={class:"ls-card-text"},HHe={class:"ls-card-title"},zHe={class:"ls-card-hint"},WHe={key:1,class:"ls-cards"},UHe={class:"ls-card-text"},jHe={class:"ls-card-title"},VHe={class:"ls-reco"},qHe={class:"ls-card-hint"},KHe={class:"ls-card-logo ls-card-icon"},ZHe={class:"ls-card-text"},GHe={class:"ls-card-title"},YHe={class:"ls-card-hint"},XHe={key:2,class:"ls-flow"},JHe={key:0,class:"ls-center"},QHe={class:"ls-center-text"},eze={key:1,class:"ls-device"},tze={class:"ls-lead"},nze=["href"],oze={class:"ls-code-row"},sze=["title"],ize={class:"ls-status"},rze={class:"ls-status-text"},lze={class:"ls-countdown"},aze={key:2,class:"ls-center"},cze={class:"ls-center-text ls-success-text"},uze={class:"ls-center-hint"},dze={class:"ls-center"},fze={class:"ls-center-text ls-err-text"},pze={class:"ls-center-hint"},hze={class:"ls-actions"},mze={class:"ls-center"},gze={class:"ls-center-text ls-warn-text"},vze={class:"ls-center-hint"},yze={class:"ls-actions"},kze=et({__name:"OnboardingLoginStep",props:{authReady:{type:Boolean},onStartOAuthLogin:{type:Function},onPollOAuthLogin:{type:Function},onCancelOAuthLogin:{type:Function}},emits:["success","addProvider"],setup(e,{emit:t}){const{t:n}=$t(),o=e,s=t,i=K("choice"),{step:r,pollError:l,flow:a,secondsLeft:c,startFlow:u,cancelFlow:d}=jN({onStartOAuthLogin:o.onStartOAuthLogin,onPollOAuthLogin:o.onPollOAuthLogin,onCancelOAuthLogin:o.onCancelOAuthLogin,onSuccess:()=>s("success")}),f=K(!1);function h(){i.value="flow",u()}function m(){d(),i.value="choice"}async function g(){!a.value||!await Ps(a.value.verificationUriComplete)||(f.value=!0,setTimeout(()=>{f.value=!1},2e3))}function b(_){const v=Math.floor(_/60),y=_%60;return`${v}:${String(y).padStart(2,"0")}`}return(_,v)=>e.authReady?(k(),M("div",PHe,[C("span",DHe,[q(p(Me),{name:"check",size:"sm"})]),C("div",BHe,[C("div",HHe,N(p(n)("onboarding.login.loggedInTitle")),1),C("div",zHe,N(p(n)("onboarding.login.loggedInHint")),1)])])):i.value==="choice"?(k(),M("div",WHe,[C("button",{class:"ls-card",type:"button",onClick:h},[q(vy,{size:40,class:"ls-card-logo"}),C("div",UHe,[C("div",jHe,[Ve(N(p(n)("onboarding.login.kimiTitle"))+" ",1),C("span",VHe,N(p(n)("onboarding.login.recommended")),1)]),C("div",qHe,N(p(n)("onboarding.login.kimiHint")),1)]),q(p(Me),{name:"chevron-right",size:"lg",class:"ls-card-chevron"})]),C("button",{class:"ls-card",type:"button",onClick:v[0]||(v[0]=y=>s("addProvider"))},[C("span",KHe,[q(p(Me),{name:"bolt",size:"lg"})]),C("div",ZHe,[C("div",GHe,N(p(n)("onboarding.login.customProviderTitle")),1),C("div",YHe,N(p(n)("onboarding.login.customProviderHint")),1)]),q(p(Me),{name:"chevron-right",size:"lg",class:"ls-card-chevron"})])])):(k(),M("div",XHe,[p(r)==="starting"?(k(),M("div",JHe,[q(p(Ao),{size:"md"}),C("span",QHe,N(p(n)("login.starting")),1)])):p(r)==="device-code"&&p(a)?(k(),M("div",eze,[C("div",tze,N(p(n)("login.lead")),1),C("a",{class:"ls-primary",href:p(a).verificationUriComplete,target:"_blank",rel:"noopener noreferrer"},[Ve(N(p(n)("login.authorizeInBrowser"))+" ",1),q(p(Me),{name:"external-link",size:"sm"})],8,nze),C("div",oze,[C("span",{class:"ls-link",title:p(a).verificationUriComplete},N(p(a).verificationUriComplete),9,sze),q(p(Rt),{class:Fe(["ls-copy",{"is-copied":f.value}]),variant:"secondary",size:"sm",onClick:g},{default:be(()=>[f.value?(k(),M(De,{key:0},[q(p(Me),{name:"check",size:"sm"}),Ve(" "+N(p(n)("login.copied")),1)],64)):(k(),M(De,{key:1},[q(p(Me),{name:"copy",size:"sm"}),Ve(" "+N(p(n)("login.copyLink")),1)],64))]),_:1},8,["class"])]),C("div",ize,[q(p(Ao),{size:"sm",label:p(n)("login.waitingAuth")},null,8,["label"]),C("span",rze,N(p(n)("login.waitingAutoClose")),1),C("span",lze,N(b(p(c))),1)])])):p(r)==="success"?(k(),M("div",aze,[q(p(Nd),{kind:"success"}),C("span",cze,N(p(n)("login.success")),1),C("span",uze,N(p(n)("login.successHint")),1)])):p(r)==="expired"?(k(),M(De,{key:3},[C("div",dze,[q(p(Nd),{kind:"expired"}),C("span",fze,N(p(n)("login.expiredTitle")),1),C("span",pze,N(p(n)("login.expiredHint")),1)]),C("div",hze,[q(p(Rt),{variant:"secondary",onClick:m},{default:be(()=>[Ve(N(p(n)("onboarding.back")),1)]),_:1}),q(p(Rt),{variant:"primary",onClick:p(u)},{default:be(()=>[Ve(N(p(n)("login.retry")),1)]),_:1},8,["onClick"])])],64)):p(r)==="error"?(k(),M(De,{key:4},[C("div",mze,[q(p(Nd),{kind:"error"}),C("span",gze,N(p(l)?p(n)("login.pollErrorTitle"):p(n)("login.errorTitle")),1),C("span",vze,N(p(l)?p(n)("login.pollErrorHint"):p(n)("login.errorHint")),1)]),C("div",yze,[q(p(Rt),{variant:"secondary",onClick:m},{default:be(()=>[Ve(N(p(n)("onboarding.back")),1)]),_:1}),q(p(Rt),{variant:"primary",onClick:p(u)},{default:be(()=>[Ve(N(p(n)("login.retry")),1)]),_:1},8,["onClick"])])],64)):te("",!0)]))}}),bze=mt(kze,[["__scopeId","data-v-950977ea"]]),Cze=["aria-label"],wze={class:"wiz-body"},_ze={key:0,class:"wiz-step"},xze={class:"wiz-title"},Sze={class:"wiz-sub"},Aze={class:"pref-group"},Mze={class:"pref-label"},Tze={class:"lang-cards"},Eze=["onClick"],Ize={class:"opt-label"},Lze={class:"pref-group"},$ze={class:"pref-label"},Nze={class:"theme-cards"},Oze=["onClick"],Fze={class:"opt-label"},Rze={key:1,class:"wiz-step"},Pze={class:"wiz-title"},Dze={class:"wiz-sub"},Bze={class:"wiz-step-fill"},Hze={class:"wiz-foot"},zze={class:"wiz-foot-ghost"},Wze=et({__name:"OnboardingWizard",props:{authReady:{type:Boolean},onStartOAuthLogin:{type:Function},onPollOAuthLogin:{type:Function},onCancelOAuthLogin:{type:Function}},emits:["complete","loginSuccess","addProvider"],setup(e,{emit:t}){const{t:n,locale:o}=$t(),s=e,i=t;function r(){i("addProvider")}const l=["preferences","login"],a=K(0),c=F(()=>l[a.value]??"preferences");function u(){a.value0&&a.value--}function f(_){o.value!==_&&m5(_)}const{colorScheme:h,setColorScheme:m}=bT(),g=[{value:"system",labelKey:"theme.system"},{value:"light",labelKey:"theme.light"},{value:"dark",labelKey:"theme.dark"}];function b(){i("loginSuccess")}return(_,v)=>(k(),M("div",{class:"wizard",role:"dialog","aria-modal":"true","aria-label":p(n)("onboarding.welcome.title")},[C("div",wze,[c.value==="preferences"?(k(),M("section",_ze,[q(vy,{size:72}),C("h1",xze,N(p(n)("onboarding.welcome.title")),1),C("p",Sze,N(p(n)("onboarding.welcome.subtitle")),1),C("div",Aze,[C("div",Mze,N(p(n)("onboarding.welcome.languageLabel")),1),C("div",Tze,[(k(!0),M(De,null,vt(p(lg),y=>(k(),M("button",{key:y.code,class:Fe(["opt-card lang-card",{selected:p(o)===y.code}]),type:"button",onClick:w=>f(y.code)},[C("span",{class:Fe(["opt-radio",{on:p(o)===y.code}])},null,2),C("span",Ize,N(y.label),1)],10,Eze))),128))])]),C("div",Lze,[C("div",$ze,N(p(n)("onboarding.welcome.themeLabel")),1),C("div",Nze,[(k(),M(De,null,vt(g,y=>C("button",{key:y.value,class:Fe(["opt-card theme-card",{selected:p(h)===y.value}]),type:"button",onClick:w=>p(m)(y.value)},[C("span",{class:Fe(["tp",`tp-${y.value}`]),"aria-hidden":"true"},[y.value==="system"?(k(),M(De,{key:0},[v[2]||(v[2]=_u('',2))],64)):(k(),M(De,{key:1},[v[3]||(v[3]=C("span",{class:"tp-side"},null,-1)),v[4]||(v[4]=C("span",{class:"tp-lines"},[C("span"),C("span"),C("span")],-1))],64))],2),C("span",Fze,N(p(n)(y.labelKey)),1)],10,Oze)),64))])])])):(k(),M("section",Rze,[q(vy,{size:72}),C("h1",Pze,N(p(n)("onboarding.login.title")),1),C("p",Dze,N(p(n)("onboarding.login.subtitle")),1),C("div",Bze,[q(bze,{"auth-ready":s.authReady,"on-start-o-auth-login":s.onStartOAuthLogin,"on-poll-o-auth-login":s.onPollOAuthLogin,"on-cancel-o-auth-login":s.onCancelOAuthLogin,onSuccess:b,onAddProvider:r},null,8,["auth-ready","on-start-o-auth-login","on-poll-o-auth-login","on-cancel-o-auth-login"])])])),C("div",Hze,[c.value==="preferences"?(k(),me(p(Rt),{key:0,variant:"primary",size:"lg",class:"wiz-primary",onClick:u},{default:be(()=>[Ve(N(p(n)("onboarding.continue")),1)]),_:1})):c.value==="login"&&s.authReady?(k(),me(p(Rt),{key:1,variant:"primary",size:"lg",class:"wiz-primary",onClick:v[0]||(v[0]=y=>i("complete"))},{default:be(()=>[Ve(N(p(n)("onboarding.login.finish")),1)]),_:1})):te("",!0),C("div",zze,[a.value>0?(k(),me(p(Rt),{key:0,variant:"ghost",onClick:d},{default:be(()=>[Ve(N(p(n)("onboarding.back")),1)]),_:1})):te("",!0),c.value==="login"&&s.authReady?te("",!0):(k(),me(p(Rt),{key:1,variant:"ghost",onClick:v[1]||(v[1]=y=>i("complete"))},{default:be(()=>[Ve(N(c.value==="login"?p(n)("onboarding.login.skip"):p(n)("onboarding.skip")),1)]),_:1}))])])])],8,Cze))}}),Uze=mt(Wze,[["__scopeId","data-v-dc402f98"]]),jze=["aria-label"],Vze={class:"gload-box"},qze={class:"gload-text"},Kze=et({__name:"GlobalLoading",setup(e){const{t}=$t();return(n,o)=>(k(),M("div",{class:"gload",role:"status","aria-label":p(t)("app.connecting")},[C("div",Vze,[o[0]||(o[0]=_u('',1)),q(p(Ao),{size:"md",label:p(t)("app.connecting")},null,8,["label"]),C("div",qze,N(p(t)("app.connecting")),1)])],8,jze))}}),Zze=mt(Kze,[["__scopeId","data-v-3acabc65"]]),Gze={class:"kap-root"},Yze={class:"kap-head"},Xze={class:"kap-count"},Jze={class:"kap-head-actions"},Qze={class:"kap-filters"},eWe=["value"],tWe={class:"kap-check"},nWe={class:"kap-check"},oWe={class:"kap-view-toggle",role:"group"},sWe={key:0,class:"kap-empty"},iWe=["onClick"],rWe={class:"kap-ts"},lWe={class:"kap-label"},aWe={key:0,class:"kap-detail"},cWe={class:"kap-detail-actions"},uWe=["onClick"],dWe={key:1,class:"kap-agg"},fWe={class:"mono"},pWe={class:"mono"},hWe={class:"num"},mWe={class:"num"},gWe={key:0},vWe={class:"mono"},yWe={class:"num"},kWe={class:"num"},bWe={key:0},CWe=et({__name:"KapDebugView",emits:["close"],setup(e,{emit:t}){const n=t,o=K("all"),s=K(""),i=K(""),r=K(!1),l=K("timeline"),a=F(()=>(g5.value,[..._de()])),c=F(()=>{const T=new Set;for(const R of a.value)R.sessionId&&T.add(R.sessionId);return[...T].sort()});function u(T){return T.kind==="rest:error"||T.code!==void 0&&T.code!==0||T.eventType==="error"||T.eventType==="parse-error"}const d=F(()=>{const T=s.value.trim().toLowerCase();return a.value.filter(R=>!(o.value!=="all"&&R.source!==o.value||i.value&&R.sessionId!==i.value||r.value&&!u(R)||T&&!`${R.label} ${R.kind} ${R.eventType??""} ${R.sessionId??""} ${R.requestId??""}`.toLowerCase().includes(T)))}),f=F(()=>{const T=new Map;for(const R of d.value){if(R.kind!=="ws:in"&&R.kind!=="ws:out")continue;const B=R.kind==="ws:in"?"←":"→",I=`${B} ${R.eventType??"?"} @ ${R.sessionId??"-"}`,$=T.get(I)??{key:I,sessionId:R.sessionId??"-",eventType:R.eventType??"?",dir:B,count:0};$.count++,R.seq!==void 0&&($.lastSeq=R.seq),T.set(I,$)}return[...T.values()].sort((R,B)=>B.count-R.count)}),h=F(()=>{const T=new Map;for(const R of d.value){if(R.source!=="rest"||R.kind==="rest:request")continue;const B=`${R.method??"?"} ${R.path??"?"}`,I=T.get(B)??{count:0,errors:0,totalMs:0,timed:0};I.count++,u(R)&&I.errors++,R.durationMs!==void 0&&(I.totalMs+=R.durationMs,I.timed++),T.set(B,I)}return[...T.entries()].map(([R,B])=>({key:R,count:B.count,errors:B.errors,avgMs:B.timed>0?Math.round(B.totalMs/B.timed):0})).sort((R,B)=>B.count-R.count)}),m=K(null),g=K(!0),b=K(null),_=K(null);Je(()=>d.value.length,async()=>{if(!g.value||l.value!=="timeline")return;await bt();const T=b.value;T&&(T.scrollTop=T.scrollHeight)});function v(T){m.value=m.value===T?null:T}function y(T){const R=new Date(T),B=(I,$=2)=>String(I).padStart($,"0");return`${B(R.getHours())}:${B(R.getMinutes())}:${B(R.getSeconds())}.${B(R.getMilliseconds(),3)}`}function w(T){return JSON.stringify(T,null,2)}async function x(T){await Ps(w(T))&&(_.value=T.id,setTimeout(()=>{_.value===T.id&&(_.value=null)},1500))}function A(){ZL(d.value)}function L(T){return u(T)||T.source==="client"?"b-err":T.source==="rest"?"b-rest":T.kind==="ws:lifecycle"?"b-life":T.kind==="ws:out"?"b-out":"b-in"}function S(T){return T.source==="rest"?"REST":T.source==="client"?"APP":"WS"}return(T,R)=>(k(),M("section",Gze,[C("header",Yze,[R[11]||(R[11]=C("strong",null,"KAP debug",-1)),C("span",Xze,N(d.value.length)+"/"+N(a.value.length),1),C("div",Jze,[C("button",{type:"button",class:Fe({on:p(C1)}),onClick:R[0]||(R[0]=B=>C1.value=!p(C1))},N(p(C1)?"resume":"pause"),3),C("button",{type:"button",onClick:R[1]||(R[1]=B=>p(xde)())},"clear"),C("button",{type:"button",onClick:R[2]||(R[2]=B=>A())},"export jsonl"),q(p($n),{text:"Close window"},{default:be(()=>[C("button",{type:"button",onClick:R[3]||(R[3]=B=>n("close"))},"✕")]),_:1})])]),C("div",Qze,[An(C("select",{"onUpdate:modelValue":R[4]||(R[4]=B=>o.value=B),"aria-label":"Source filter"},[...R[12]||(R[12]=[C("option",{value:"all"},"rest + ws + app",-1),C("option",{value:"rest"},"rest",-1),C("option",{value:"ws"},"ws",-1),C("option",{value:"client"},"app errors",-1)])],512),[[H4,o.value]]),An(C("select",{"onUpdate:modelValue":R[5]||(R[5]=B=>i.value=B),"aria-label":"Session filter"},[R[13]||(R[13]=C("option",{value:""},"all sessions",-1)),(k(!0),M(De,null,vt(c.value,B=>(k(),M("option",{key:B,value:B},N(B),9,eWe))),128))],512),[[H4,i.value]]),An(C("input",{"onUpdate:modelValue":R[6]||(R[6]=B=>s.value=B),type:"text",placeholder:"filter (type / path / id)","aria-label":"Text filter"},null,512),[[Ys,s.value]]),C("label",tWe,[An(C("input",{"onUpdate:modelValue":R[7]||(R[7]=B=>r.value=B),type:"checkbox"},null,512),[[Cm,r.value]]),R[14]||(R[14]=Ve(" errors",-1))]),C("label",nWe,[An(C("input",{"onUpdate:modelValue":R[8]||(R[8]=B=>g.value=B),type:"checkbox"},null,512),[[Cm,g.value]]),R[15]||(R[15]=Ve(" follow",-1))]),C("div",oWe,[C("button",{type:"button",class:Fe({on:l.value==="timeline"}),onClick:R[9]||(R[9]=B=>l.value="timeline")},"timeline",2),C("button",{type:"button",class:Fe({on:l.value==="aggregate"}),onClick:R[10]||(R[10]=B=>l.value="aggregate")},"aggregate",2)])]),l.value==="timeline"?(k(),M("div",{key:0,ref_key:"listRef",ref:b,class:"kap-list"},[d.value.length===0?(k(),M("div",sWe," No trace entries yet. REST calls and WS frames will appear here. ")):te("",!0),(k(!0),M(De,null,vt(d.value,B=>(k(),M("div",{key:B.id,class:"kap-row-wrap"},[C("button",{type:"button",class:Fe(["kap-row",{expanded:m.value===B.id}]),onClick:I=>v(B.id)},[C("span",rWe,N(y(B.ts)),1),C("span",{class:Fe(["kap-badge",L(B)])},N(S(B)),3),C("span",lWe,N(B.label),1)],10,iWe),m.value===B.id?(k(),M("div",aWe,[C("div",cWe,[C("button",{type:"button",onClick:I=>x(B)},N(_.value===B.id?"copied ✓":"copy json"),9,uWe)]),C("pre",null,N(w(B)),1)])):te("",!0)]))),128))],512)):(k(),M("div",dWe,[R[20]||(R[20]=C("h4",null,"WS frames by session / type",-1)),C("table",null,[R[17]||(R[17]=C("thead",null,[C("tr",null,[C("th",null,"dir"),C("th",null,"type"),C("th",null,"session"),C("th",null,"count"),C("th",null,"last seq")])],-1)),C("tbody",null,[(k(!0),M(De,null,vt(f.value,B=>(k(),M("tr",{key:B.key},[C("td",null,N(B.dir),1),C("td",fWe,N(B.eventType),1),C("td",pWe,N(B.sessionId),1),C("td",hWe,N(B.count),1),C("td",mWe,N(B.lastSeq??"—"),1)]))),128)),f.value.length===0?(k(),M("tr",gWe,[...R[16]||(R[16]=[C("td",{colspan:"5",class:"kap-empty"},"no ws frames",-1)])])):te("",!0)])]),R[21]||(R[21]=C("h4",null,"REST by endpoint",-1)),C("table",null,[R[19]||(R[19]=C("thead",null,[C("tr",null,[C("th",null,"endpoint"),C("th",null,"count"),C("th",null,"errors"),C("th",null,"avg ms")])],-1)),C("tbody",null,[(k(!0),M(De,null,vt(h.value,B=>(k(),M("tr",{key:B.key},[C("td",vWe,N(B.key),1),C("td",yWe,N(B.count),1),C("td",{class:Fe(["num",{err:B.errors>0}])},N(B.errors),3),C("td",kWe,N(B.avgMs),1)]))),128)),h.value.length===0?(k(),M("tr",bWe,[...R[18]||(R[18]=[C("td",{colspan:"4",class:"kap-empty"},"no rest calls",-1)])])):te("",!0)])])]))]))}}),wWe=mt(CWe,[["__scopeId","data-v-04683f0d"]]),_We=et({__name:"DebugPanel",setup(e){const t=K(!1);let n=null,o=null,s=null;const i=["data-color-scheme"];function r(u){const d=document.documentElement,f=u.documentElement;for(const h of i){const m=d.getAttribute(h);m!==null?f.setAttribute(h,m):f.removeAttribute(h)}}function l(u){const d=u.document;d.title="KAP debug";const f=d.createElement("base");f.href=location.href,d.head.appendChild(f);for(const m of Array.from(document.querySelectorAll('style, link[rel="stylesheet"]')))d.head.appendChild(m.cloneNode(!0));r(d),d.body.style.margin="0";const h=d.createElement("div");return h.style.height="100vh",d.body.appendChild(h),h}function a(){s?.disconnect(),s=null;try{o?.unmount()}catch{}o=null,n=null,t.value=!1}function c(){if(n&&!n.closed){n.focus();return}const u=window.open("","kap-debug","popup=yes,width=1040,height=760");if(!u)return;n=u;const d=l(u),f=wm(wWe,{onClose:()=>u.close()});f.mount(d),o=f,t.value=!0,s=new MutationObserver(()=>{n&&!n.closed&&r(n.document)}),s.observe(document.documentElement,{attributes:!0,attributeFilter:[...i]}),u.addEventListener("pagehide",a),u.addEventListener("beforeunload",a)}return cn(()=>{c()}),Dn(()=>{n&&!n.closed&&n.close(),a()}),(u,d)=>(k(),me(p($n),{text:t.value?"Focus KAP debug window":"Open KAP debug window"},{default:be(()=>[C("button",{class:"kap-fab",type:"button",onClick:c}," KAP ")]),_:1},8,["text"]))}}),xWe=mt(_We,[["__scopeId","data-v-454fcd8d"]]);function SWe({running:e}){const t=["◐","◓","◑","◒"],n=K(0);let o=null;function s(){o===null&&(n.value=0,o=setInterval(()=>{n.value=(n.value+1)%t.length},250))}function i(){o!==null&&(clearInterval(o),o=null),n.value=0}Je(e,l=>{l?s():i()},{immediate:!0});const r=F(()=>`${e.value?`${t[n.value]} `:""}Kimi Code Web`);DS(()=>{typeof document<"u"&&(document.title=r.value)}),kn(()=>{i()})}function AWe(e,t,n){const o=e.items.filter(c=>c.kind==="turn"),s=o[0]?.turnId,i=o.length===1?s:void 0,r=new Map(e.tasks.map(c=>[c.taskId,c])),l=e.items.flatMap(c=>c.kind==="turn"?MWe(c,e.attachments,r,c.turnId===s?n?.createdAt:void 0,c.turnId===i?n?.disposedAt:void 0):[]),a=e.meta.activity==="turn";return f$(l,[],t,a).map(EWe)}function MWe(e,t,n,o,s){const i=[],r=new Map(t.map(d=>[d.attachmentId,d])),l=IWe([e.startedAt,...e.steps.map(d=>d.startedAt),o])??"",a=eS(e.endedAt)??eS(s),c=e.turnId;if(e.prompt!==void 0&&e.prompt.length>0){const d=[{type:"text",text:e.prompt}];for(const f of e.attachmentIds??[]){const h=LWe(r.get(f));h!==void 0&&d.push(h)}i.push({id:`${e.turnId}:input`,sessionId:"",role:"user",content:d,createdAt:l,promptId:c,metadata:e.origin.kind==="task"&&e.prompt.includes("f.role==="assistant");d>=0&&(i[d]={...i[d],durationMs:u})}return i}function TWe(e,t,n){const[o="",...s]=t.split(` -`),i=n?.state??"info";return{id:`task:${e}:${i}`,category:"task",type:`task.${i}`,sourceKind:n?.kind==="subagent"?"subagent":"background_task",sourceId:e,agentId:n?.agentId,title:o.trim(),severity:i==="completed"?"info":"warning",body:s.join(` -`).trim(),raw:t}}function EWe(e){if(e.createdAt!==""&&e.endedAt!=="")return e;const t={...e};return t.createdAt===""&&delete t.createdAt,t.endedAt===""&&delete t.endedAt,t}function IWe(e){let t;for(const n of e){if(n===void 0)continue;const o=Date.parse(n);Number.isFinite(o)&&(t===void 0||o=0?n:void 0}const JN=K(typeof window>"u"?0:window.innerWidth);let xh=0,Tg=!1;function yy(){JN.value=window.innerWidth}function $We(){Tg||typeof window>"u"||(window.addEventListener("resize",yy),Tg=!0,yy())}function NWe(){!Tg||typeof window>"u"||(window.removeEventListener("resize",yy),Tg=!1)}function QN(e,t,n){return Math.max(t,e-n)}function ky(e,t,n){return Math.min(n,Math.max(t,e))}function eO(){return cn(()=>{xh+=1,$We()}),Dn(()=>{xh=Math.max(0,xh-1),xh===0&&NWe()}),{viewportWidth:JN}}const OWe="kimi-web.file-preview-width",pd=320;function FWe({client:e,sideWidth:t,detailTarget:n,closeFilePreview:o}){const{viewportWidth:s}=eO(),i=F(()=>Math.max(0,s.value-t.value)),r=F(()=>QN(i.value,pd,pd));function l(Y){return ky(Math.round(Y),pd,r.value)}function a(){return l(i.value/2)}const c=F(()=>a()),u=K(c.value),d=F(()=>ky(u.value,pd,r.value)),f=K(null),h=F(()=>{const Y=f.value;if(!Y)return null;const fe=e.turns.value.find(ue=>ue.id===Y.turnId);return fe?.role==="compaction"&&fe.text?fe.text:null}),m=F(()=>h.value!==null);function g(Y){if(f.value?.turnId===Y.turnId){f.value=null,n.value==="compaction"&&(n.value=null);return}n.value="compaction",f.value=Y}function b(){f.value=null,n.value==="compaction"&&(n.value=null)}const _=K(null),v=F(()=>{const Y=_.value;if(!Y)return{entry:void 0,version:0};const fe=e.auxiliaryTranscripts.getEntry(Y.sessionId,Y.subagentId);return{entry:fe,version:fe?.version.value??0}});function y(Y){const fe=e.turns.value.flatMap(ue=>ue.tools??[]).find(ue=>ue.agentId===Y);if(!fe)return{};try{const ue=JSON.parse(fe.arg);return{name:typeof ue.description=="string"?ue.description:void 0,subagentType:typeof ue.subagent_type=="string"?ue.subagent_type:void 0,status:fe.status,outputLines:fe.output}}catch{return{}}}const w=F(()=>{const Y=_.value;if(!Y)return null;const fe=e.activeAppTasks.value.find(Ne=>Ne.agentId===Y.subagentId||Ne.id===Y.subagentId);if(fe)return a9e(fe);const ue=v.value.entry?.channel,de=ue?.agents.find(Ne=>Ne.agentId===Y.subagentId),J=ue?.refreshError??!1,se=ue===void 0||ue.loading,ce=ue?.snapshot.meta.activity==="turn",he=y(Y.subagentId),Ie=ue?.snapshot.items.findLast(Ne=>Ne.kind==="turn"),Ge=Ie?.kind==="turn"&&Ie.state==="cancelled",we=Ie?.kind==="turn"&&Ie.state==="failed"||he.status==="error",Te=ce?"working":we||Ge?"failed":se?"queued":J&&he.status===void 0?"failed":"completed",st=ce?"running":Ge?"cancelled":we?"failed":se?"running":J&&he.status===void 0?"failed":"completed";return{id:Y.subagentId,name:de?.label??he.name??Y.subagentId,subagentType:he.subagentType??(de?.type==="sub"?"subagent":de?.type),phase:Te,status:st,outputLines:he.outputLines}}),x=F(()=>{const Y=v.value.entry;if(!Y)return[];const fe=_.value,ue=Y.channel.agents.find(de=>de.agentId===fe?.subagentId);return AWe(Y.channel.snapshot,e.getFileUrl,ue)}),A=F(()=>v.value.entry?.channel.loading??!1),L=F(()=>v.value.entry?.channel.refreshError??!1),S=F(()=>v.value.entry?.channel.loadingOlder??!1),T=F(()=>v.value.entry?.channel.loadOlderError??!1),R=F(()=>v.value.entry?.channel.snapshot.hasMoreOlder??!1),B=F(()=>v.value.entry?.channel.snapshot.meta.activity==="turn"),I=F(()=>w.value!==null);function $(Y){const fe=e.activeSessionId.value;if(!(!Y||!fe)){if(n.value==="agent"&&_.value?.sessionId===fe&&_.value.subagentId===Y){D();return}_.value={sessionId:fe,subagentId:Y},n.value="agent",e.auxiliaryTranscripts.activate(fe,Y)}}function D(){const Y=_.value;Y&&e.auxiliaryTranscripts.deactivate(Y.sessionId,Y.subagentId),_.value=null,n.value==="agent"&&(n.value=null)}Je(n,(Y,fe)=>{if(fe!=="agent"||Y==="agent")return;const ue=_.value;ue&&e.auxiliaryTranscripts.deactivate(ue.sessionId,ue.subagentId)});function H(){const Y=v.value.entry;Y&&Y.channel.loadOlder().catch(()=>{})}const O=K("list"),P=K(null);function z(){if(n.value==="diff"){W();return}n.value="diff",O.value="list",P.value=null,e.loadGitStatus(e.activeSessionId.value)}function W(){n.value==="diff"&&(n.value=null),O.value="list",P.value=null,e.clearFileDiff()}async function U(Y){O.value="detail",P.value=Y,await e.loadFileDiff(Y)}const G=Kr(null);function Z(Y){if(G.value===Y&&n.value==="turn-diff"){ee();return}G.value=Y,n.value="turn-diff"}function ee(){G.value=null,n.value==="turn-diff"&&(n.value=null)}async function Q(Y){if(!e.activeSessionId.value&&e.activeWorkspaceId.value){const fe=await e.startSessionAndOpenSideChat(e.activeWorkspaceId.value,Y);return n.value="btw",fe}return await e.openSideChat(Y),n.value="btw",null}function X(){e.closeSideChat(),n.value==="btw"&&(n.value=null)}function oe(){n.value==="btw"&&(n.value=null)}const xe=F(()=>e.sideChatVisible.value),pe=F(()=>n.value!==null&&(n.value!=="compaction"||m.value)&&(n.value!=="agent"||I.value)&&(n.value!=="btw"||xe.value)),ve=K(!1),ge=K({});function ne(){switch(n.value){case"compaction":return f.value?{kind:"compaction",...f.value}:null;case"agent":return _.value?{kind:"agent",..._.value}:null;case"btw":return{kind:"btw"};default:return null}}function ae(Y){if(Y)switch(Y.kind){case"compaction":f.value={turnId:Y.turnId},n.value="compaction";break;case"agent":e.activeSessionId.value&&(_.value={sessionId:e.activeSessionId.value,subagentId:Y.subagentId},n.value="agent",e.auxiliaryTranscripts.activate(e.activeSessionId.value,Y.subagentId));break;case"btw":e.sideChatVisible.value&&(n.value="btw");break}}function j(){return n.value==="compaction"&&m.value?(b(),!0):n.value==="agent"&&I.value?(D(),!0):n.value==="file"?(o(),!0):n.value==="diff"?(W(),!0):n.value==="turn-diff"?(ee(),!0):n.value==="btw"?(X(),!0):!1}return Je(e.activeSessionId,(Y,fe)=>{if(fe){const ue=ne();ue?ge.value[fe]=ue:delete ge.value[fe]}o(),b(),D(),W(),ee(),oe(),Y&&ae(ge.value[Y])}),{PREVIEW_WIDTH_KEY:OWe,PREVIEW_MIN:pd,previewDefaultWidth:c,previewMax:r,previewWidth:u,previewPanelWidth:d,compactionPanelText:h,compactionPanelVisible:m,openCompactionPanel:g,closeCompactionPanel:b,agentPanelMember:w,agentPanelTurns:x,agentPanelLoading:A,agentPanelLoadError:L,agentPanelLoadingMore:S,agentPanelLoadMoreError:T,agentPanelHasMore:R,agentPanelRunning:B,agentPanelVisible:I,openAgentPanel:$,closeAgentPanel:D,loadOlderAgentMessages:H,detailDiffMode:O,detailDiffPath:P,openDiffDetail:z,closeDiffDetail:W,selectDiffFile:U,turnDiffChange:G,openTurnDiff:Z,closeTurnDiff:ee,btwVisible:xe,openSideChatTab:Q,closeSideChat:X,hideSideChatPanel:oe,sidePanelVisible:pe,panelDragging:ve,closeOpenSidePanel:j}}const RWe=ln.sidebarWidth,nS=ln.sidebarCollapsed,oS=270,C4=170,PWe=480,DWe=320;function BWe(e={}){const{viewportWidth:t}=eO(),n=K(oS),o=K(!1),s=K(!1),i=F(()=>{const u=DWe+(Ah(e.previewOpen)?pd:0);return Math.min(PWe,QN(t.value,C4,u))}),r=F(()=>ky(n.value,C4,i.value));function l(){try{o.value=mi(nS)==="true"}catch{o.value=!1}}function a(){try{Ds(nS,String(o.value))}catch{}}function c(){o.value=!o.value,a()}return{SIDEBAR_WIDTH_KEY:RWe,SIDEBAR_DEFAULT:oS,SIDEBAR_MIN:C4,sidebarMax:i,sessionColWidth:n,sidebarCollapsed:o,sidebarDragging:s,sideWidth:r,loadSidebarCollapsed:l,toggleSidebarCollapse:c}}const HWe=40409;function sS(e){return qs(e)&&e.code===HWe}function iS(e){return e.startsWith("/")||/^[a-zA-Z]:[\\/]/.test(e)||e.startsWith("\\\\")}function rS(e){if(e.startsWith("\\\\"))return e;const t=/^[a-zA-Z]:/.test(e)?e.slice(0,2):"",n=[];for(const o of e.slice(t.length).split(/[\\/]+/))if(!(!o||o===".")){if(o===".."){n.pop();continue}n.push(o)}return t?`${t}/${n.join("/")}`:`/${n.join("/")}`}function zWe({client:e,detailTarget:t}){const{t:n}=$t(),o=K(null),s=K(null),i=K(!1),r=K(null),l=K(null);let a=0,c=null;function u(){c!==null&&(URL.revokeObjectURL(c),c=null)}const d=F(()=>{const S=l.value;return S?e.getFileDownloadUrl(S):null}),f=F(()=>o.value!==null&&l.value!==null);function h(S){return S.length>1?S.replace(/\/+$/,""):S}function m(S){const T=S2(S,e.status.value.cwd);return T===null||T.split(/[\\/]+/).includes("..")?null:g(T)||null}function g(S){const T=[];for(const R of S.split(/[\\/]+/))if(!(!R||R===".")){if(R===".."){T.pop();continue}T.push(R)}return T.join("/")}function b(S){const T=S.trim();if(!T)return{error:n("filePreview.errors.emptyPath")};if(/^[a-z][a-z0-9+.-]*:\/\//i.test(T))return{error:n("filePreview.errors.unsupportedPath")};if(T.startsWith("~"))return{error:n("filePreview.errors.outsideWorkspace")};const R=h(e.status.value.cwd);if(T.startsWith("/")){if(!R||T!==R&&!T.startsWith(`${R}/`))return{error:n("filePreview.errors.outsideWorkspace")};const I=T===R?"":T.slice(R.length+1);if(I.split(/[\\/]+/).includes(".."))return{error:n("filePreview.errors.outsideWorkspace")};const $=g(I);return $?{path:$}:{error:n("filePreview.errors.isDirectory")}}if(T.split(/[\\/]+/).includes(".."))return{error:n("filePreview.errors.outsideWorkspace")};const B=g(T);return B?{path:B}:{error:n("filePreview.errors.emptyPath")}}async function _(S){const T=o.value;if(t.value==="file"&&T&&T.path===S.path&&T.line===S.line){x();return}const R=++a;if(u(),t.value="file",s.value=null,r.value=null,i.value=!0,o.value=S,l.value=null,typeof S.content=="string"){i.value=!1,s.value={path:S.path,content:S.content,encoding:"utf-8",mime:"text/markdown",isBinary:!1,size:S.content.length};return}if(!iS(S.path)&&S.path.split(/[\\/]+/).includes("..")){const I=h(e.status.value.cwd);I&&(S={...S,path:rS(`${I}/${S.path}`)})}if(iS(S.path)){S={...S,path:rS(S.path)};const I=m(S.path);if(I!==null)S={...S,path:I};else{try{const $=await e.readHostFileContent(S.path);if(R!==a)return;l.value=null,s.value={path:S.path,content:$.content,encoding:$.encoding,mime:$.mime,isBinary:$.isBinary,size:$.size}}catch($){if(R!==a)return;r.value=sS($)?n("filePreview.errors.notFound"):UW($)?n("filePreview.errors.tooLarge"):$ instanceof Error?$.message:n("filePreview.errors.loadFailed")}finally{R===a&&(i.value=!1)}return}}const B=b(S.path);if("error"in B){i.value=!1,r.value=B.error;return}l.value=B.path;try{const I=await e.readFileContent(B.path);if(R!==a)return;I?s.value={...I,path:I.path||B.path}:r.value=n("filePreview.errors.loadFailed")}catch(I){if(R!==a)return;r.value=sS(I)?n("filePreview.errors.notFound"):I instanceof Error?I.message:n("filePreview.errors.loadFailed")}finally{R===a&&(i.value=!1)}}function v(S){return/^data:([^;,]+)/i.exec(S)?.[1]}function y(S){if(S.kind!=="image")return;const T=++a;u(),t.value="file",o.value=null,l.value=null,r.value=null;const R={path:S.path??"ReadMediaFile image",content:"",encoding:"utf-8",mime:S.mimeType??v(S.url)??"image/*",isBinary:!0,size:S.bytes??0};S.fileId?(i.value=!0,s.value=R,xt().getFileBlob(S.fileId).then(B=>{if(T===a){if(t.value!=="file"||!s.value){i.value=!1;return}c=URL.createObjectURL(B),s.value={...s.value,sourceUrl:c},i.value=!1}}).catch(()=>{T===a&&(s.value&&(s.value={...s.value,sourceUrl:S.url}),i.value=!1)})):(i.value=!1,s.value={...R,sourceUrl:S.url})}function w(){a+=1,o.value=null,l.value=null,s.value=null,r.value=null,i.value=!1,u()}function x(){w(),t.value==="file"&&(t.value=null)}Je(t,(S,T)=>{T==="file"&&S!=="file"&&w()});function A(){const S=s.value?.path??o.value?.path;S&&e.openWorkspaceFile(S,o.value?.line)}function L(){const S=s.value?.path??o.value?.path;S&&e.revealWorkspaceFile(S)}return{previewTarget:o,previewFile:s,previewLoading:i,previewError:r,previewDownloadUrl:d,previewExternalActions:f,openFilePreview:_,openMediaPreview:y,closeFilePreview:x,openPreviewInEditor:A,revealPreviewFile:L}}const WWe=640,UWe=`(max-width: ${WWe}px)`;function jWe(){const e=K(!1);if(typeof window>"u"||typeof window.matchMedia!="function")return e;const t=window.matchMedia(UWe);e.value=t.matches;const n=o=>{e.value=o.matches};return typeof t.addEventListener=="function"?(t.addEventListener("change",n),kn(()=>t.removeEventListener("change",n))):typeof t.addListener=="function"&&(t.addListener(n),kn(()=>t.removeListener(n))),e}const VWe=et({__name:"ServerAuthDialog",setup(e){const t=K(""),n=K(null),o=K(!1);cn(()=>{bt(()=>n.value?.focus())});function s(){const r=t.value;!r||o.value||(o.value=!0,GL(r),window.location.reload())}function i(r){r.key==="Enter"&&(r.preventDefault(),s())}return(r,l)=>(k(),me(p(sa),{open:!0,title:"Server token required","hide-close":!0,"close-on-overlay":!1,"close-on-esc":!1},{foot:be(()=>[q(p(Rt),{variant:"primary",disabled:!t.value||o.value,loading:o.value,onClick:s},{default:be(()=>[Ve(N(o.value?"Connecting…":"Connect"),1)]),_:1},8,["disabled","loading"])]),default:be(()=>[l[1]||(l[1]=C("p",{class:"server-auth-hint"},[Ve(" This server is protected. Enter the bearer token printed when the server started (or the password set via "),C("code",null,"KIMI_CODE_PASSWORD"),Ve("). ")],-1)),q(p(Os),{ref_key:"inputRef",ref:n,modelValue:t.value,"onUpdate:modelValue":l[0]||(l[0]=a=>t.value=a),type:"password",autocomplete:"current-password",placeholder:"Token",disabled:o.value,onKeydown:i},null,8,["modelValue","disabled"])]),_:1}))}}),qWe=mt(VWe,[["__scopeId","data-v-e3047f67"]]),KWe=["aria-label"],ZWe=et({__name:"InternalBuildBanner",setup(e){const{t}=$t(),n=x2;return(o,s)=>p(n)?(k(),M("span",{key:0,class:"internal-build-tag",role:"note","aria-label":p(t)("app.internalBuildBanner")},[s[0]||(s[0]=C("svg",{viewBox:"0 0 16 16",width:"11",height:"11",fill:"none",stroke:"currentColor","stroke-width":"1.7","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[C("path",{d:"M8 2 14 13H2L8 2Z"}),C("path",{d:"M8 6v3.5"}),C("path",{d:"M8 11.5h.01"})],-1)),C("span",null,N(p(t)("app.internalBuildBanner")),1)],8,KWe)):te("",!0)}}),GWe=mt(ZWe,[["__scopeId","data-v-166b3735"]]),YWe={class:"app-shell"},XWe=["inert"],JWe=["aria-label","aria-hidden"],QWe=et({__name:"App",setup(e){Vde();const t=K(!1);let n=null;const o=uc(),s=F(()=>!o.dangerousBypassAuth.value&&t.value);Wn("resolveImage",o.resolveImageUrl),Wn("resolveSwarmMembers",dt=>o.swarmMembersByToolCallId.value.get(dt)??[]);const{t:i}=$t(),{confirm:r}=cc(),l=Gr(),a=jWe(),c=K(!1),u=K(!1),d=F(()=>{const dt=o.activeSessionId.value;return o.sessions.value.find(Le=>Le.id===dt)?.title??""}),f=F(()=>{const dt=o.activeSessionId.value;return o.sessions.value.find(Le=>Le.id===dt)?.lastTurnReason??null}),h=F(()=>o.visibleWorkspace.value?.sessionCount??0),m=F(()=>o.activity.value!=="idle");SWe({running:m});function g(dt){const Le=o.models.value.find(rr=>rr.id===o.status.value.modelId),Ke=jp(Le),_n=Ke.indexOf(pg(Le,dt)),ys=Ke[(_n+1)%Ke.length]??Ke[0]??"off";return w5(Le,ys)}const b=F(()=>{const dt=o.models.value.find(Le=>Le.id===o.status.value.modelId);return pg(dt,o.thinking.value)}),_=K(!o.onboarded.value);function v(){o.setOnboarded(!0),_.value=!1}function y(){v(),mo.value="providers",Co.value=!0}let w=0;function x(){const dt=window.visualViewport,Le=document.documentElement.style;Le.setProperty("--app-height",`${dt?.height??window.innerHeight}px`),Le.setProperty("--app-top",`${dt?.offsetTop??0}px`)}function A(){w||(w=requestAnimationFrame(()=>{w=0,x()}))}cn(()=>{n=Gde(()=>{t.value=!0,o.clearDangerousBypassAuth()}),o.load(),ve(),x(),window.visualViewport?.addEventListener("resize",A),window.visualViewport?.addEventListener("scroll",A),window.addEventListener("resize",A),document.addEventListener("keydown",L,!0)}),kn(()=>{document.removeEventListener("keydown",L,!0),window.visualViewport?.removeEventListener("resize",A),window.visualViewport?.removeEventListener("scroll",A),window.removeEventListener("resize",A),w&&(cancelAnimationFrame(w),w=0),document.documentElement.style.removeProperty("--app-height"),document.documentElement.style.removeProperty("--app-top"),n!==null&&(n(),n=null)});function L(dt){dt.key==="Escape"&&(Zt.value||bo()&&(dt.stopPropagation(),dt.preventDefault()))}const S=K(null),{previewTarget:T,previewFile:R,previewLoading:B,previewError:I,previewDownloadUrl:$,previewExternalActions:D,openFilePreview:H,openMediaPreview:O,closeFilePreview:P,openPreviewInEditor:z,revealPreviewFile:W}=zWe({client:o,detailTarget:S}),U=F(()=>S.value!==null),{SIDEBAR_WIDTH_KEY:G,SIDEBAR_DEFAULT:Z,SIDEBAR_MIN:ee,sidebarMax:Q,sessionColWidth:X,sidebarCollapsed:oe,sidebarDragging:xe,sideWidth:pe,loadSidebarCollapsed:ve,toggleSidebarCollapse:ge}=BWe({previewOpen:U}),{PREVIEW_WIDTH_KEY:ne,PREVIEW_MIN:ae,previewDefaultWidth:j,previewMax:Y,previewWidth:fe,previewPanelWidth:ue,compactionPanelText:de,compactionPanelVisible:J,openCompactionPanel:se,closeCompactionPanel:ce,agentPanelMember:he,agentPanelTurns:Ie,agentPanelLoading:Ge,agentPanelLoadError:we,agentPanelLoadingMore:Te,agentPanelLoadMoreError:st,agentPanelHasMore:Ne,agentPanelRunning:Re,openAgentPanel:Ze,closeAgentPanel:gt,loadOlderAgentMessages:Pt,detailDiffMode:Tt,detailDiffPath:He,openDiffDetail:tt,closeDiffDetail:qe,selectDiffFile:Et,turnDiffChange:ft,openTurnDiff:en,closeTurnDiff:Vt,btwVisible:qn,openSideChatTab:nn,closeSideChat:rn,sidePanelVisible:Sn,panelDragging:Gn,closeOpenSidePanel:bo}=FWe({client:o,sideWidth:pe,detailTarget:S,closeFilePreview:P}),po=K(null);function zt(dt){po.value?.style.setProperty("--preview-w",`${dt}px`)}Je([po,ue],([dt,Le])=>dt?.style.setProperty("--preview-w",`${Le}px`),{immediate:!0});const Io=K(null),ho=K(!1),Vo=K(!1),yn=K(!1),qo=K(!1),Co=K(!1);let At;cn(()=>{At=window.kimiDesktop?.onMenuAction?.(dt=>{dt==="open-settings"?Co.value=!0:dt==="new-chat"&&cs()})}),kn(()=>{At?.()});const it=K(null),ut=K(null),Zt=F(()=>li.value>0||ho.value||Vo.value||yn.value||qo.value||Co.value||_.value||c.value||u.value),vn=K(!1),eo=K(!1),uo=K(!1);async function Lo(){vn.value=!0,eo.value=!1,ho.value=!0;try{await o.refreshAllProviders()}catch{eo.value=!0}finally{vn.value=!1}}function Ho(){Vo.value=!0}async function Xs(){await r({title:i("sidebar.logoutConfirmTitle"),message:i("sidebar.logoutConfirmMessage"),variant:"danger",action:()=>o.logout()})}async function io(dt){ho.value=!1,await Yn(dt)}async function Yn(dt){await o.setModel(dt)&&dt!==o.defaultModel.value&&o.updateConfig({defaultModel:dt})}const ro=K(null);async function $o(dt){await o.archiveSession(dt),!o.sessionsForView.value.some(Le=>Le.id===dt)&&(ro.value={id:dt})}async function as(){const dt=ro.value;dt&&await o.restoreSession(dt.id)&&(ro.value=null)}const mo=K(void 0),Ko=K(void 0);Je(u,dt=>{dt||(Ko.value=void 0)});function Hs(){ro.value=null,a.value?(Ko.value="archived",u.value=!0):(mo.value="archived",Co.value=!0)}async function bn(dt){const Le=o.workspacesView.value.find(Ke=>Ke.id===dt)?.name??dt;await r({title:i("sidebar.removeWorkspace"),message:i("workspace.removeWorkspaceConfirm",{name:Le}),variant:"danger",action:()=>o.deleteWorkspace(dt)})}async function Fi(dt){uo.value=!0;try{await o.updateConfig(dt)&&await o.checkAuth()}finally{uo.value=!1}}async function Hn(){return o.startOAuthLogin()}async function nr(){return o.pollOAuthLogin()}async function Ri(){return o.cancelOAuthLogin()}async function or(){Vo.value=!1,await o.checkAuth(),await o.load()}async function Js(){v(),await o.checkAuth(),await o.load()}async function As(dt){await o.undo(1)!==null&&(await bt(),Io.value?.loadComposerForEdit(dt.text,dt.attachments),Io.value?.notifyUndone())}async function Zo(){const dt=await o.abortCurrentPrompt();Io.value?.onAbortOutcome(dt)}function wo(dt){const Le=xt();return dt.map(Ke=>({kind:Ke.kind,url:Le.getFileUrl(Ke.fileId),fileId:Ke.fileId,name:Ke.name}))}async function an(dt,Le){if(o.authReady.value)return!0;const Ke=o.managedProviderStatus.value==="authenticated";Ke&&o.managedMembership.value===null&&await o.probeManagedMembership();const _n=Ke&&o.managedMembership.value==="free",ys=await r(_n?{title:i("login.upgradeRequiredTitle"),message:i("login.upgradeRequiredMessage"),confirmLabel:i("sidebar.upgrade"),variant:"primary"}:{title:i("login.requiredTitle"),message:i("login.requiredMessage"),confirmLabel:i("login.goToLogin"),variant:"primary"});return Io.value?.loadComposerForEdit(dt,wo(Le)),ys&&(_n?Zp():Ho()),!1}async function gi(dt){if(o.activeSessionId.value||o.activeWorkspaceId.value)return!0;const Le=await r({title:i("workspace.requiredTitle"),message:i("workspace.requiredMessage"),confirmLabel:i("conversation.pickFolder"),variant:"primary"});return Io.value?.loadComposerForEdit(dt),Le&&(yn.value=!0),!1}async function Ms(dt){return await an(dt,[])?gi(dt):!1}async function Pi(dt){if(dt==="/compact"||dt.startsWith("/compact ")){if(!await Ms(dt))return;o.compact(dt.slice(8).trim()||void 0);return}if(dt==="/swarm"||dt.startsWith("/swarm ")){const Le=dt.slice(6).trim();if(Le==="on")o.setSwarmMode(!0);else if(Le==="off")o.setSwarmMode(!1);else if(Le){if(!await Ms(dt))return;o.setSwarmMode(!0),o.sendPrompt(Le)}else o.toggleSwarmMode();return}if(dt==="/goal"||dt.startsWith("/goal ")){const Le=dt.slice(5).trim();if(Le==="pause"||Le==="resume"||Le==="cancel")o.controlGoal(Le);else if(Le){if(!await Ms(dt))return;o.createGoal(Le)}else o.toggleGoalMode();return}if(dt==="/btw"||dt.startsWith("/btw ")){const Le=dt.slice(4).trim();if(!Le&&o.sideChatVisible.value)rn();else{if(Le&&!await Ms(dt))return;nn(Le||void 0)}return}switch(dt){case"/new":case"/clear":cs();break;case"/fork":o.forkSession();break;case"/export":o.exportSession();break;case"/undo":o.undo();break;case"/plan":o.togglePlanMode();break;case"/auto":o.setPermission("auto");break;case"/yolo":o.setPermission("yolo");break;case"/thinking":o.setThinking(g(o.thinking.value));break;case"/status":qo.value=!0;break;case"/login":Ho();break;default:{const Le=dt.indexOf(" "),Ke=gAe((Le===-1?dt:dt.slice(0,Le)).slice(1)),_n=Le===-1?void 0:dt.slice(Le+1).trim()||void 0;if(!Ke)break;if(!await Ms(dt))return;!o.activeSessionId.value&&o.activeWorkspaceId.value?o.startSessionAndActivateSkill(o.activeWorkspaceId.value,Ke,_n):o.activateSkill(Ke,_n);break}}}function sr(dt){o.unqueue(dt)}function Sr(dt){o.unqueue(dt)}function vi(dt){o.reorderQueue(dt.from,dt.to)}async function zo(dt){if(!await an(dt.text,dt.attachments))return;const Le=o.activeWorkspaceId.value;if(!o.activeSessionId.value&&Le){await o.startSessionAndSendPrompt(Le,dt.text,dt.attachments);return}if(!o.activeSessionId.value&&!Le){it.value=dt,await r({title:i("workspace.requiredTitle"),message:i("workspace.requiredMessage"),confirmLabel:i("conversation.pickFolder"),variant:"primary"})?yn.value=!0:No();return}o.sendPrompt(dt.text,dt.attachments)}function No(){const dt=it.value;it.value=null,dt&&Io.value?.loadComposerForEdit(dt.text,wo(dt.attachments))}async function yi(dt){if(ut.value=null,!await o.addWorkspaceByPath(dt)){ut.value=i("workspace.addFailed");return}yn.value=!1;const Ke=it.value;it.value=null;const _n=o.activeWorkspaceId.value;Ke&&_n&&await o.startSessionAndSendPrompt(_n,Ke.text,Ke.attachments)}function _o(){No(),ut.value=null,yn.value=!1}function Wo(){bt(()=>{Io.value?.focusComposer()})}function cs(){const dt=o.activeWorkspaceId.value;dt?o.openWorkspaceDraft(dt):o.clearActiveSession(),Wo()}function vs(dt){o.openWorkspaceDraft(dt),Wo()}function ir(dt){dt&&window.open(dt,"_blank","noopener")}return(dt,Le)=>(k(),M("div",YWe,[s.value?(k(),me(qWe,{key:0})):te("",!0),C("div",{class:Fe(["app",{mobile:p(a),"sidebar-collapsed":p(oe)&&!p(a),"macos-desktop":p(lu)}]),inert:_.value},[p(a)?(k(),me(eBe,{key:1,workspace:p(o).visibleWorkspace.value,"session-title":d.value,running:m.value,branch:p(o).status.value.branch,"session-count":h.value,onOpenSwitcher:Le[20]||(Le[20]=Ke=>c.value=!0),onOpenSettings:Le[21]||(Le[21]=Ke=>u.value=!0)},null,8,["workspace","session-title","running","branch","session-count"])):(k(),M(De,{key:0},[q(_8e,{collapsed:p(oe),dragging:p(xe),"col-width":p(pe),"active-workspace":p(o).visibleWorkspace.value,"active-workspace-id":p(o).activeWorkspaceId.value,sessions:p(o).sessionsForView.value,groups:p(o).workspaceGroups.value,"pinned-sessions":p(o).pinnedSessions.value,"active-id":p(o).activeSessionId.value,"attention-by-session":p(o).attentionBySession.value,"pending-by-session":p(o).pendingBySession.value,"unread-by-session":p(o).unreadBySession.value,onSelect:Le[0]||(Le[0]=Ke=>p(o).selectSession(Ke)),onCreate:cs,onCreateInWorkspace:Le[1]||(Le[1]=Ke=>vs(Ke)),onSelectWorkspace:Le[2]||(Le[2]=Ke=>p(o).openWorkspace(Ke)),onAddWorkspace:Le[3]||(Le[3]=Ke=>yn.value=!0),onRename:Le[4]||(Le[4]=(Ke,_n)=>p(o).renameSession(Ke,_n)),onArchive:Le[5]||(Le[5]=Ke=>$o(Ke)),onFork:Le[6]||(Le[6]=Ke=>p(o).forkSession(Ke)),onExport:Le[7]||(Le[7]=Ke=>p(o).exportSession(Ke)),onPin:Le[8]||(Le[8]=Ke=>p(o).togglePinSession(Ke)),onUnpin:Le[9]||(Le[9]=Ke=>p(o).unpinSession(Ke)),onReorderPinned:Le[10]||(Le[10]=Ke=>p(o).reorderPinnedSessions(Ke)),onPinAt:Le[11]||(Le[11]=(Ke,_n,ys)=>p(o).pinSessionAt(Ke,_n,ys)),onRenameWorkspace:Le[12]||(Le[12]=(Ke,_n)=>p(o).renameWorkspace(Ke,_n)),onDeleteWorkspace:Le[13]||(Le[13]=Ke=>bn(Ke)),onReorderWorkspaces:Le[14]||(Le[14]=Ke=>p(o).reorderWorkspaces(Ke)),onLoadMoreSessions:Le[15]||(Le[15]=Ke=>void p(o).loadMoreSessions(Ke)),onLoadAllSessions:Le[16]||(Le[16]=Ke=>void p(o).loadAllSessions()),onOpenSettings:Le[17]||(Le[17]=Ke=>Co.value=!0),onLogin:Ho,onCollapse:p(ge)},null,8,["collapsed","dragging","col-width","active-workspace","active-workspace-id","sessions","groups","pinned-sessions","active-id","attention-by-session","pending-by-session","unread-by-session","onCollapse"]),An(q(yx,{class:"side-handle","storage-key":p(G),"default-width":p(Z),min:p(ee),max:p(Q),"onUpdate:width":Le[18]||(Le[18]=Ke=>X.value=Ke),"onUpdate:dragging":Le[19]||(Le[19]=Ke=>xe.value=Ke)},null,8,["storage-key","default-width","min","max"]),[[xs,!p(oe)]])],64)),q(qIe,{ref_key:"conversationPaneRef",ref:Io,mobile:p(a),turns:p(o).turns.value,"session-id":p(o).activeSessionId.value,approvals:p(o).pendingApprovals.value,changes:p(o).changes.value,"git-info":p(o).gitInfo.value,tasks:p(o).tasks.value,todos:p(o).todos.value,goal:p(o).goal.value,"activation-badges":p(o).activationBadges.value,status:p(o).status.value,thinking:p(o).thinking.value,"plan-mode":p(o).planMode.value,"swarm-mode":p(o).swarmMode.value,"goal-mode":p(o).goalMode.value,models:p(o).models.value,"auth-ready":p(o).authReady.value,"managed-signed-in":p(o).managedProviderStatus.value==="authenticated","managed-membership":p(o).managedMembership.value,"starred-ids":p(o).starredModelIds.value,skills:p(o).skills.value,questions:p(o).questions.value,"pending-question-actions":p(o).pendingQuestionActions,"pending-approval-actions":p(o).pendingApprovalActions,running:m.value,"overlay-open":Zt.value,"turn-active":p(o).turnActive.value,queued:p(o).queued.value,"search-files":p(o).searchFiles,"upload-image":p(o).uploadImage,working:p(o).working.value,"last-turn-reason":f.value,starting:p(o).isStartingFirstPrompt.value,"file-reload-key":p(o).activeSessionId.value,"session-loading":p(o).sessionLoading.value,compaction:p(o).compaction.value,"has-more-messages":p(o).hasMoreMessages.value,"loading-more":p(o).loadingMoreMessages.value,"loading-more-error":p(o).loadMoreMessagesError.value,"load-older-messages":p(o).loadOlderMessages,"workspace-name":p(o).visibleWorkspace.value?.name,"workspace-root":p(o).visibleWorkspace.value?.root??p(o).status.value.cwd,"git-diff-stats":p(o).gitDiffStats.value,workspaces:p(o).workspacesView.value,"active-workspace-id":p(o).activeWorkspaceId.value,"session-title":d.value,pr:p(o).activePullRequest.value,onOpenChanges:Le[22]||(Le[22]=Ke=>p(tt)()),onSelectWorkspace:Le[23]||(Le[23]=Ke=>vs(Ke)),onAddWorkspace:Le[24]||(Le[24]=Ke=>yn.value=!0),onOpenPr:ir,onSubmit:Le[25]||(Le[25]=Ke=>zo(Ke)),onLogin:Le[26]||(Le[26]=Ke=>Ho()),onSteer:Le[27]||(Le[27]=Ke=>p(o).steerPrompt(Ke.text,Ke.attachments)),onApproval:Le[28]||(Le[28]=(Ke,_n)=>p(o).respondApproval(Ke,_n)),onCancelTask:Le[29]||(Le[29]=Ke=>p(o).cancelTask(Ke)),onAnswer:Le[30]||(Le[30]=(Ke,_n)=>p(o).respondQuestion(Ke,_n)),onDismiss:Le[31]||(Le[31]=Ke=>p(o).dismissQuestion(Ke)),onCommand:Pi,onInterrupt:Zo,onUnqueue:sr,onEditQueued:Sr,onReorderQueue:vi,onSetPermission:Le[32]||(Le[32]=Ke=>p(o).setPermission(Ke)),onSetThinking:Le[33]||(Le[33]=Ke=>p(o).setThinking(Ke)),onTogglePlan:Le[34]||(Le[34]=Ke=>p(o).togglePlanMode()),onToggleSwarm:Le[35]||(Le[35]=Ke=>p(o).toggleSwarmMode()),onToggleGoal:Le[36]||(Le[36]=Ke=>p(o).toggleGoalMode()),onCreateGoal:Le[37]||(Le[37]=Ke=>p(o).createGoal(Ke)),onControlGoal:Le[38]||(Le[38]=Ke=>p(o).controlGoal(Ke)),onRefreshGitStatus:Le[39]||(Le[39]=Ke=>p(o).activeSessionId.value&&p(o).loadGitStatus(p(o).activeSessionId.value)),onRenameSession:Le[40]||(Le[40]=(Ke,_n)=>p(o).renameSession(Ke,_n)),onForkSession:Le[41]||(Le[41]=Ke=>p(o).forkSession(Ke)),onArchiveSession:Le[42]||(Le[42]=Ke=>$o(Ke)),onExportSession:Le[43]||(Le[43]=Ke=>p(o).exportSession(Ke)),onCompact:Le[44]||(Le[44]=Ke=>p(o).compact()),onPickModel:Le[45]||(Le[45]=Ke=>Lo()),onSelectModel:Le[46]||(Le[46]=Ke=>Yn(Ke)),onOpenFile:Le[47]||(Le[47]=Ke=>p(H)(Ke)),onOpenMedia:Le[48]||(Le[48]=Ke=>p(O)(Ke)),onOpenTurnDiff:Le[49]||(Le[49]=Ke=>p(en)(Ke)),onOpenCompaction:Le[50]||(Le[50]=Ke=>p(se)(Ke)),onOpenAgent:Le[51]||(Le[51]=Ke=>p(Ze)(Ke)),onEditMessage:As},null,8,["mobile","turns","session-id","approvals","changes","git-info","tasks","todos","goal","activation-badges","status","thinking","plan-mode","swarm-mode","goal-mode","models","auth-ready","managed-signed-in","managed-membership","starred-ids","skills","questions","pending-question-actions","pending-approval-actions","running","overlay-open","turn-active","queued","search-files","upload-image","working","last-turn-reason","starting","file-reload-key","session-loading","compaction","has-more-messages","loading-more","loading-more-error","load-older-messages","workspace-name","workspace-root","git-diff-stats","workspaces","active-workspace-id","session-title","pr"]),!p(a)&&(p(lu)||p(oe))?(k(),me(p(mn),{key:2,class:"sidebar-toggle-btn",size:"sm",label:p(oe)?p(i)("sidebar.expandSidebar"):p(i)("sidebar.collapseSidebar"),onClick:p(ge)},{default:be(()=>[q(p(Me),{name:p(oe)?"panel-expand":"panel-collapse"},null,8,["name"])]),_:1},8,["label","onClick"])):te("",!0),!p(a)&&p(oe)?(k(),me(p(mn),{key:3,class:"new-chat-btn",size:"sm",label:p(i)("sidebar.newChat"),onClick:cs},{default:be(()=>[q(p(Me),{name:"chat-new"})]),_:1},8,["label"])):te("",!0),p(Sn)&&!p(a)?(k(),me(yx,{key:4,class:"preview-handle","storage-key":p(ne),"default-width":p(j),min:p(ae),max:p(Y),reverse:"","aria-label":p(i)("layout.resizePreviewAria"),"apply-live":zt,"onUpdate:width":Le[52]||(Le[52]=Ke=>fe.value=Ke),"onUpdate:dragging":Le[53]||(Le[53]=Ke=>Gn.value=Ke)},null,8,["storage-key","default-width","min","max","aria-label"])):te("",!0),!p(a)||p(Sn)?(k(),M("aside",{key:5,ref_key:"previewPanelEl",ref:po,class:Fe(["global-preview",{open:p(Sn),mobile:p(a)}]),role:"complementary","aria-label":p(i)("layout.detailPanelAria"),"aria-hidden":!p(Sn)},[S.value==="compaction"&&p(J)?(k(),me(ILe,{key:0,text:p(de)??"",subtitle:p(i)("conversation.summaryTitle"),onClose:p(ce)},null,8,["text","subtitle","onClose"])):S.value==="agent"&&p(he)?(k(),me(PLe,{key:1,member:p(he),turns:p(Ie),running:p(Re),loading:p(Ge),"load-error":p(we),"has-more":p(Ne),"loading-more":p(Te),"load-more-error":p(st),onClose:p(gt),onLoadOlderMessages:p(Pt),onOpenAgent:p(Ze),onOpenFile:p(H),onOpenMedia:p(O),onOpenTurnDiff:Le[54]||(Le[54]=Ke=>p(en)(Ke))},null,8,["member","turns","running","loading","load-error","has-more","loading-more","load-more-error","onClose","onLoadOlderMessages","onOpenAgent","onOpenFile","onOpenMedia"])):S.value==="btw"&&p(qn)?(k(),me(VLe,{key:2,turns:p(o).sideChatTurns.value,running:p(o).sideChatRunning.value,sending:p(o).sideChatSending.value,onSend:Le[55]||(Le[55]=Ke=>p(o).sendSideChatPrompt(Ke)),onClose:p(rn)},null,8,["turns","running","sending","onClose"])):S.value==="diff"?(k(),me(k$e,{key:3,mode:p(Tt),changes:p(o).changes.value,"git-info":p(o).gitInfo.value,"file-diff":p(o).fileDiff.value,"full-texts":p(o).fileDiffTexts.value,"empty-file":p(o).fileDiffEmptyFile.value,"selected-diff-path":p(o).selectedDiffPath.value,"file-diff-loading":p(o).fileDiffLoading.value,closable:"",onOpen:p(Et),onBack:Le[56]||(Le[56]=Ke=>{Tt.value="list",He.value=null,p(o).clearFileDiff()}),onClose:p(qe)},null,8,["mode","changes","git-info","file-diff","full-texts","empty-file","selected-diff-path","file-diff-loading","onOpen","onClose"])):S.value==="file"?(k(),me(MLe,{key:4,file:p(R),loading:p(B),error:p(I),line:p(T)?.line,"download-url":p($),closable:"","external-actions":p(D),"open-file":p(H),onClose:p(P),onOpenExternal:p(z),onReveal:p(W)},null,8,["file","loading","error","line","download-url","external-actions","open-file","onClose","onOpenExternal","onReveal"])):S.value==="turn-diff"&&p(ft)?(k(),me(S$e,{key:5,change:p(ft),cwd:p(o).status.value.cwd,closable:"",onClose:p(Vt),onOpenFile:Le[57]||(Le[57]=Ke=>p(H)({path:Ke}))},null,8,["change","cwd","onClose"])):te("",!0)],10,JWe)):te("",!0),q(GWe,{class:"internal-build-fab"}),ho.value?(k(),me(z$e,{key:6,models:p(o).models.value,current:p(o).status.value.modelId,"starred-ids":p(o).starredModelIds.value,loading:vn.value,unavailable:eo.value,onSelect:Le[58]||(Le[58]=Ke=>io(Ke)),onToggleStar:Le[59]||(Le[59]=Ke=>p(o).toggleStarModel(Ke)),onClose:Le[60]||(Le[60]=Ke=>ho.value=!1)},null,8,["models","current","starred-ids","loading","unavailable"])):te("",!0),Co.value?(k(),me(JPe,{key:7,"color-scheme":p(o).colorScheme.value,"font-scale":p(o).fontScale.value,"managed-provider-status":p(o).managedProviderStatus.value,"managed-user-info":p(o).managedUserInfo.value,"on-fetch-usage":p(o).getUsage,notify:p(o).notifyEnabled.value,"notify-permission":p(o).notifyPermission.value,"notify-sound":p(o).notifySound.value,config:p(o).config.value,models:p(o).models.value,"config-saving":uo.value,"server-version":p(o).serverVersion.value,backend:p(o).backend.value,"experimental-flags":p(o).experimentalFlags.value,"initial-tab":mo.value,onSetColorScheme:Le[61]||(Le[61]=Ke=>p(o).setColorScheme(Ke)),onSetFontScale:Le[62]||(Le[62]=Ke=>p(o).setFontScale(Ke)),onSetNotify:Le[63]||(Le[63]=Ke=>p(o).setNotifyEnabled(Ke)),onSetNotifySound:Le[64]||(Le[64]=Ke=>p(o).setNotifySound(Ke)),onUpdateConfig:Le[65]||(Le[65]=Ke=>Fi(Ke)),onLogin:Le[66]||(Le[66]=()=>{Co.value=!1,Ho()}),onLogout:Xs,onClose:Le[67]||(Le[67]=Ke=>{Co.value=!1,mo.value=void 0})},null,8,["color-scheme","font-scale","managed-provider-status","managed-user-info","on-fetch-usage","notify","notify-permission","notify-sound","config","models","config-saving","server-version","backend","experimental-flags","initial-tab"])):te("",!0),qo.value?(k(),me(BDe,{key:8,status:p(o).status.value,thinking:b.value,"plan-mode":p(o).planMode.value,"swarm-mode":p(o).swarmMode.value,"cost-usd":p(o).sessionCost.value,onClose:Le[68]||(Le[68]=Ke=>qo.value=!1)},null,8,["status","thinking","plan-mode","swarm-mode","cost-usd"])):te("",!0),yn.value?(k(),me(_De,{key:9,"browse-fs":p(o).browseFs,"get-fs-home":p(o).getFsHome,"default-path":p(o).visibleWorkspace.value?.root??p(o).status.value.cwd,error:ut.value,onAdd:Le[69]||(Le[69]=Ke=>yi(Ke)),onClose:_o},null,8,["browse-fs","get-fs-home","default-path","error"])):te("",!0),q(gs,{name:"gload-fade"},{default:be(()=>[p(o).initialized.value?te("",!0):(k(),me(Zze,{key:0,issue:p(o).connectIssue.value},null,8,["issue"]))]),_:1}),q(VDe,{warnings:p(o).warnings.value,onDismiss:p(o).dismissWarning},null,8,["warnings","onDismiss"]),(k(),me(Vr,{to:"body"},[q(gs,{name:"action-toast"},{default:be(()=>[ro.value?(k(),me(p(hz),{key:ro.value.id,onDismiss:Le[70]||(Le[70]=Ke=>ro.value=null)},{default:be(()=>[C("button",{type:"button",onClick:as},N(p(i)("sidebar.archiveToastUndo")),1),Ve(" "+N(p(i)("sidebar.archiveToastMid"))+" ",1),C("button",{type:"button",onClick:Hs},N(p(i)("sidebar.archiveToastSettings")),1),Ve(" "+N(p(i)("sidebar.archiveToastTail")),1)]),_:1})):te("",!0)]),_:1})])),p(l)?(k(),me(xWe,{key:10})):te("",!0),q(MDe),p(a)?(k(),me(SBe,{key:11,modelValue:c.value,"onUpdate:modelValue":Le[71]||(Le[71]=Ke=>c.value=Ke),groups:p(o).mobileWorkspaceGroups.value,"active-workspace-id":p(o).activeWorkspaceId.value,"active-id":p(o).activeSessionId.value,"attention-by-session":p(o).attentionBySession.value,"attention-by-workspace":p(o).attentionByWorkspace.value,onSelect:Le[72]||(Le[72]=Ke=>p(o).selectSession(Ke)),onCreate:cs,onCreateInWorkspace:Le[73]||(Le[73]=Ke=>vs(Ke)),onAddWorkspace:Le[74]||(Le[74]=Ke=>yn.value=!0),onRename:Le[75]||(Le[75]=(Ke,_n)=>p(o).renameSession(Ke,_n)),onArchive:Le[76]||(Le[76]=Ke=>$o(Ke)),onDeleteWorkspace:Le[77]||(Le[77]=Ke=>bn(Ke)),onLoadMore:Le[78]||(Le[78]=Ke=>void p(o).loadMoreSessions(Ke))},null,8,["modelValue","groups","active-workspace-id","active-id","attention-by-session","attention-by-workspace"])):te("",!0),p(a)?(k(),me(OHe,{key:12,modelValue:u.value,"onUpdate:modelValue":Le[79]||(Le[79]=Ke=>u.value=Ke),"initial-view":Ko.value,status:p(o).status.value,thinking:p(o).thinking.value,models:p(o).models.value,"plan-mode":p(o).planMode.value,"swarm-mode":p(o).swarmMode.value,"color-scheme":p(o).colorScheme.value,"font-scale":p(o).fontScale.value,"managed-provider-status":p(o).managedProviderStatus.value,"managed-user-info":p(o).managedUserInfo.value,"server-version":p(o).serverVersion.value,onPickModel:Le[80]||(Le[80]=Ke=>Lo()),onSetThinking:Le[81]||(Le[81]=Ke=>p(o).setThinking(Ke)),onTogglePlan:Le[82]||(Le[82]=Ke=>p(o).togglePlanMode()),onToggleSwarm:Le[83]||(Le[83]=Ke=>p(o).toggleSwarmMode()),onSetPermission:Le[84]||(Le[84]=Ke=>p(o).setPermission(Ke)),onSetColorScheme:Le[85]||(Le[85]=Ke=>p(o).setColorScheme(Ke)),onSetFontScale:Le[86]||(Le[86]=Ke=>p(o).setFontScale(Ke)),onLogin:Le[87]||(Le[87]=()=>{u.value=!1,Ho()}),onLogout:Xs},null,8,["modelValue","initial-view","status","thinking","models","plan-mode","swarm-mode","color-scheme","font-scale","managed-provider-status","managed-user-info","server-version"])):te("",!0)],10,XWe),p(o).initialized.value&&_.value?(k(),me(Uze,{key:1,"auth-ready":p(o).managedProviderStatus.value==="authenticated","on-start-o-auth-login":Hn,"on-poll-o-auth-login":nr,"on-cancel-o-auth-login":Ri,onComplete:v,onLoginSuccess:Js,onAddProvider:y},null,8,["auth-ready"])):te("",!0),Vo.value?(k(),me(dNe,{key:2,"on-start-o-auth-login":Hn,"on-poll-o-auth-login":nr,"on-cancel-o-auth-login":Ri,onSuccess:or,onClose:Le[88]||(Le[88]=Ke=>Vo.value=!1)})):te("",!0)]))}}),eUe=mt(QWe,[["__scopeId","data-v-bde66221"]]);Fde();const D2=wm(eUe).use(Pn),tUe={t:(e,t)=>Pn.global.t(e,t)};D2.provide(vM,tUe);D2.provide(yM,e=>Hge(e)?.component);D2.provide(TG,uc());D2.mount("#app");if(x2){const e=window.kimiDesktop;if(e){const t=()=>{const n=document.documentElement.dataset.colorScheme;e.setTheme(n==="light"||n==="dark"?n:"system")};new MutationObserver(t).observe(document.documentElement,{attributes:!0,attributeFilter:["data-color-scheme"]}),t()}}export{aF as $,YS as A,XF as B,ts as C,XUe as D,pS as E,De as F,_u as G,Ve as H,q as I,LF as J,wUe as K,Dr as L,et as M,TP as N,AUe as O,MUe as P,IUe as Q,om as R,Ld as S,Vr as T,TUe as U,Py as V,SUe as W,QUe as X,EUe as Y,qUe as Z,nUe as _,US as a,fs as a$,rs as a0,Dg as a1,cUe as a2,Ay as a3,bA as a4,Qt as a5,af as a6,mUe as a7,nje as a8,yUe as a9,ZS as aA,fR as aB,yR as aC,cn as aD,vR as aE,gR as aF,lf as aG,mR as aH,kn as aI,Ip as aJ,RF as aK,k as aL,SP as aM,pUe as aN,Wn as aO,LS as aP,fUe as aQ,lm as aR,Uo as aS,S4 as aT,K as aU,HUe as aV,UP as aW,vt as aX,Cn as aY,bR as aZ,_Ue as a_,CUe as aa,bUe as ab,kUe as ac,WUe as ad,oje as ae,dn as af,nP as ag,Ug as ah,Da as ai,Jl as aj,jo as ak,zUe as al,Vi as am,Va as an,wt as ao,NUe as ap,OUe as aq,Nn as ar,bt as as,lP as at,Fe as au,oF as av,Gt as aw,dR as ax,hR as ay,Dn as az,dUe as b,Ale as b$,GUe as b0,tp as b1,hm as b2,KUe as b3,ja as b4,ES as b5,sUe as b6,Kr as b7,UF as b8,ZUe as b9,Ys as bA,xs as bB,oP as bC,jUe as bD,Je as bE,DS as bF,gUe as bG,VF as bH,RUe as bI,be as bJ,LUe as bK,An as bL,yl as bM,UUe as bN,Ot as bO,hUe as bP,Vn as bQ,Po as bR,aje as bS,cje as bT,iL as bU,uje as bV,Vre as bW,sL as bX,M3 as bY,hje as bZ,Ele as b_,oUe as ba,N as bb,Sh as bc,xUe as bd,In as be,rUe as bf,iUe as bg,Ah as bh,BUe as bi,TF as bj,p as bk,cf as bl,tje as bm,JUe as bn,IP as bo,JF as bp,PUe as bq,jF as br,eje as bs,$Ue as bt,vUe as bu,WS as bv,Cm as bw,DP as bx,RA as by,H4 as bz,VUe as c,n5 as c0,e5 as c1,t5 as c2,gje as c3,Xm as c4,wd as c5,Gm as c6,wle as c7,_le as c8,vje as c9,oCe as cA,mt as cB,mje as ca,ije as cb,yje as cc,v2 as cd,Si as ce,Ble as cf,Dle as cg,Dre as ch,lje as ci,Ore as cj,Fre as ck,rje as cl,o5 as cm,Hle as cn,Ww as co,ww as cp,Kre as cq,Ym as cr,Zm as cs,dje as ct,pje as cu,sje as cv,fje as cw,Me as cx,kje as cy,IN as cz,DUe as d,Ba as e,lUe as f,gs as g,OA as h,aUe as i,uUe as j,Cr as k,Mp as l,ms as m,Og as n,Ql as o,YUe as p,F as q,wm as r,me as s,te as t,M as u,C as v,WR as w,FUe as x,zR as y,jP as z}; diff --git a/apps/kimi-code/dist-web/assets/index-ZTpPpnYb.js b/apps/kimi-code/dist-web/assets/index-B2KLv33G.js similarity index 99% rename from apps/kimi-code/dist-web/assets/index-ZTpPpnYb.js rename to apps/kimi-code/dist-web/assets/index-B2KLv33G.js index baef16ad7d..01bbabe2cd 100644 --- a/apps/kimi-code/dist-web/assets/index-ZTpPpnYb.js +++ b/apps/kimi-code/dist-web/assets/index-B2KLv33G.js @@ -1,4 +1,4 @@ -import{t as pe,b as Ln,n as Or,c as Nr,a as Fr,d as zr,s as Ur,g as Vr,e as Br}from"./index-DUhLXAkw.js";import{f as Ld}from"./index-DUhLXAkw.js";import{bR as k}from"./index-B-HzRssS.js";const Ei="diffs-container",$r=(()=>{try{return!1}catch{return!1}})(),Wr=/(?=^From [a-f0-9]+ .+$)/m,Ti=/(?=^diff --git)/gm,Ul=/(?=^---\s+\S)/gm,Vl=/(?=^@@ )/gm,Gr=/^@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@(?: (.*))?/m,jr=/(?<=\n)/,qr=/^(---|\+\+\+)\s+([^\t\r\n]+)/,Kr=/^(---|\+\+\+)\s+[ab]\/([^\t\r\n]+)/,Yr=/^diff --git (?:"a\/(.+?)"|a\/(.+?)) (?:"b\/(.+?)"|b\/(.+?))$/,Xr=/^index ([0-9a-f]+)\.\.([0-9a-f]+)(?: (\d+))?$/i,Bl=/^<{7,}(?:\s.*)?$/,$l=/^\|{7,}(?:\s.*)?$/,Wl=/^={7,}$/,Gl=/^>{7,}(?:\s.*)?$/,on="header-prefix",sn="header-metadata",an="header-custom",_={dark:"pierre-dark",light:"pierre-light"},Ii="data-theme-css",Ri="data-unsafe-css",Qr="data-core-css",Jr="data-diffs-scrollbar-measure",Ai="--diffs-scrollbar-gutter-measured",jl=1,Zr=1e5,ln={hunkLineCount:50,lineHeight:20,diffHeaderHeight:44,spacing:8},_e={...ln,hunkLineCount:1},eo={paddingTop:8,paddingBottom:8,gap:8},to={omega:.015,positionEpsilon:.5,velocityEpsilon:.05},no=Object.freeze({fromStart:0,fromEnd:0}),Ae={startingLine:0,totalLines:1/0,bufferBefore:0,bufferAfter:0},Hi={startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:0},Ie=new Set;let Re=null;function Y(e){Ie.add(e),Re??=requestAnimationFrame(Mi)}function io(e){Ie.delete(e),Ie.size===0&&Re!=null&&(cancelAnimationFrame(Re),Re=null)}function Mi(e){const t=new Set(Ie);Ie.clear();for(const n of t)try{n(e)}catch(i){console.error(i)}Ie.size>0?Re=requestAnimationFrame(Mi):Re=null}function He(e,t,n){if(e===t||e==null||t==null)return e===t;const i=new Set(n),r=Object.keys(e),o=new Set(Object.keys(t));for(const s of r)if(o.delete(s),!i.has(s)&&(!(s in t)||e[s]!==t[s]))return!1;for(const s of Array.from(o))if(!i.has(s))return!1;return!0}function De(e,t){return e==null||t==null||typeof e=="string"||typeof t=="string"?e===t:e.dark===t.dark&&e.light===t.light}function dn(e,t){const n=e?.theme??_,i=t?.theme??_,r=kn(e),o=kn(t);return De(n,i)&&He(e,t,["theme","parseDiffOptions"])&&He(r,o)}function kn(e){if(e!=null&&"parseDiffOptions"in e)return e.parseDiffOptions}function Wt(e,t){return e?.start===t?.start&&e?.end===t?.end&&e?.side===t?.side&&e?.endSide===t?.endSide}function Gt({scrollTop:e,scrollHeight:t,height:n,fitPerfectly:i=!1,fitPerfectlyOverscroll:r=0,overscrollSize:o}){const s=n+o*2,l=i?n+r*2:s;if(t=Math.max(t,l),s>=t||i){const h=Math.max(e-r,0),c=Math.min(e+l,t);return{top:h,bottom:Math.max(c,h)}}let a=e+n/2-s/2,d=a+s;return a<0&&(a=0),d>t&&(d=t),a=Math.floor(Math.max(a,0)),{top:a,bottom:Math.ceil(Math.max(Math.min(d,t),a))}}function ro(){return typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches}function W(e){return{type:"text",value:e}}function A({tagName:e,children:t=[],properties:n={}}){return{type:"element",tagName:e,properties:n,children:t}}function pt({name:e,width:t=16,height:n=16,properties:i}){return A({tagName:"svg",properties:{width:t,height:n,viewBox:"0 0 16 16",...i},children:[A({tagName:"use",properties:{href:`#${e.replace(/^#/,"")}`}})]})}function oo(e){let t=e.children[0];for(;t!=null;){if(t.type==="element"&&t.tagName==="code")return t;"children"in t?t=t.children[0]:t=null}}function Ee(e){return A({tagName:"div",properties:{"data-gutter":""},children:e})}function Di(e,t,n,i={}){return A({tagName:"div",properties:{"data-line-type":e,"data-column-number":t,"data-line-index":n,...i},children:t!=null?[A({tagName:"span",properties:{"data-line-number-content":""},children:[W(`${t}`)]})]:void 0})}function j(e,t,n){return A({tagName:"div",properties:{"data-gutter-buffer":t,"data-buffer-size":n,"data-line-type":t==="annotation"?void 0:e,style:t==="annotation"?`grid-row: span ${n};`:`grid-row: span ${n};min-height:calc(${n} * 1lh);`}})}function so(){return A({tagName:"button",properties:{"data-utility-button":"",type:"button"},children:[pt({name:"diffs-icon-plus",properties:{"data-icon":""}})]})}function ao(e,t){return e.lineNumber===t.lineNumber&&e.side===t.side}var Pi=class{mode;options;hoveredLine;hoveredToken;pre;gutterUtilityLine;gutterUtilityContainer;gutterUtilityButton;gutterUtilitySlot;interactiveLinesAttr=!1;interactiveLineNumbersAttr=!1;hasPointerListeners=!1;hasDocumentPointerListeners=!1;selectedRange=null;proposedSelectedRange;renderedSelectionRange;selectionAnchor;queuedSelectionRender;pointerSession={mode:"idle"};constructor(e,t){this.mode=e,this.options=t}setOptions(e){this.options=e}cleanUp(){this.pre?.removeEventListener("click",this.handlePointerClick),this.pre?.removeEventListener("pointerdown",this.handlePointerDown),this.pre?.removeEventListener("pointermove",this.handlePointerMove),this.pre?.removeEventListener("pointerleave",this.handlePointerLeave),this.pre?.removeAttribute("data-interactive-lines"),this.pre?.removeAttribute("data-interactive-line-numbers"),this.pre=void 0,this.gutterUtilityContainer?.remove(),this.gutterUtilityLine=void 0,this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.clearHoveredLine(),this.clearHoveredToken(),this.detachDocumentPointerListeners(),this.clearPointerSession(),this.queuedSelectionRender!=null&&(cancelAnimationFrame(this.queuedSelectionRender),this.queuedSelectionRender=void 0),this.interactiveLinesAttr=!1,this.interactiveLineNumbersAttr=!1,this.hasPointerListeners=!1}setup(e){this.setSelectionDirty();const{usesCustomGutterUtility:t=!1,enableGutterUtility:n=!1}=this.options;this.pre!==e&&(this.cleanUp(),this.pre=e),n?this.ensureGutterUtilityNode(t):this.gutterUtilityContainer!=null&&(this.gutterUtilityContainer.remove(),this.gutterUtilityLine=void 0,this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.pointerSession.mode==="gutterSelecting"&&(this.clearPointerSession(),this.detachDocumentPointerListeners())),this.syncPointerListeners(e),this.updateInteractiveLineAttributes(),this.renderSelection(),this.placeUtility()}setSelectionDirty(){this.renderedSelectionRange=void 0}isSelectionDirty(){return this.renderedSelectionRange===null}setSelection(e,t){const n=!(e===this.selectedRange||Wt(e??void 0,this.selectedRange??void 0));!this.isSelectionDirty()&&!n||(this.proposedSelectedRange=void 0,this.selectedRange=e,this.renderSelection(),this.placeUtility(),n&&t?.notify!==!1&&this.notifySelectionCommitted())}getSelection(){return this.selectedRange}getHoveredLine=()=>{const e=this.gutterUtilityLine??this.hoveredLine;if(e!=null){if(this.mode==="diff"&&e.type==="diff-line")return{lineNumber:e.lineNumber,side:e.annotationSide};if(this.mode==="file"&&e.type==="line")return{lineNumber:e.lineNumber}}};handlePointerClick=e=>{const{onHunkExpand:t,onLineClick:n,onLineNumberClick:i,onTokenClick:r,onMergeConflictActionClick:o}=this.options;t==null&&n==null&&i==null&&o==null&&r==null||this.options.onGutterUtilityClick!=null&&et(e.composedPath())||(he(this.options.__debugPointerEvents,"click","FileDiff.DEBUG.handlePointerClick:",e),this.handlePointerEvent({eventType:"click",event:e}))};handlePointerMove=e=>{if(e.pointerType!=="mouse")return;const{lineHoverHighlight:t="disabled",onLineEnter:n,onLineLeave:i,onTokenEnter:r,onTokenLeave:o,enableGutterUtility:s=!1}=this.options;t==="disabled"&&!s&&n==null&&i==null&&r==null&&o==null||(he(this.options.__debugPointerEvents,"move","FileDiff.DEBUG.handlePointerMove:",e),this.handlePointerEvent({eventType:"move",event:e}))};handlePointerLeave=e=>{const{__debugPointerEvents:t}=this.options;if(he(t,"move","FileDiff.DEBUG.handlePointerLeave: no event"),this.hoveredLine==null&&this.hoveredToken==null){he(t,"move","FileDiff.DEBUG.handlePointerLeave: returned early, no hovered line or token");return}this.hoveredToken!=null&&(this.options.onTokenLeave?.(this.hoveredToken,e),this.clearHoveredToken()),this.hoveredLine!=null&&(this.options.onLineLeave?.({...this.hoveredLine,event:e}),this.clearHoveredLine()),this.placeUtility()};handlePointerEvent({eventType:e,event:t}){const{__debugPointerEvents:n}=this.options,i=t.composedPath();he(n,e,"FileDiff.DEBUG.handlePointerEvent:",{eventType:e,composedPath:i});const r=this.resolvePointerTarget(i);he(n,e,"FileDiff.DEBUG.handlePointerEvent: resolvePointerTarget result:",r);const{onLineClick:o,onLineNumberClick:s,onLineEnter:l,onLineLeave:a,onTokenClick:d,onTokenEnter:h,onTokenLeave:c,onHunkExpand:u,onMergeConflictActionClick:f}=this.options;switch(e){case"move":{const g=Tt(r)&&this.hoveredLine?.lineElement===r.lineElement;ut(r)&&this.hoveredToken?.tokenElement===r.tokenElement||(this.hoveredToken!=null&&(c?.(this.hoveredToken,t),this.clearHoveredToken()),ut(r)&&(this.setHoveredToken(this.toTokenEventBaseProps(r)),h?.(this.hoveredToken,t))),g||(this.hoveredLine!=null&&(a?.({...this.hoveredLine,event:t}),this.clearHoveredLine()),Tt(r)?(this.setHoveredLine(this.toEventBaseProps(r)),this.placeUtility(),l?.({...this.hoveredLine,event:t})):this.placeUtility());break}case"click":{if(r==null)break;if(co(r)&&f!=null){f(r);break}if(ho(r)&&u!=null){u(r.hunkIndex,r.all||t.shiftKey?"both":r.direction,r.all||t.shiftKey?Number.POSITIVE_INFINITY:void 0);break}if(!Tt(r))break;ut(r)&&d!=null&&d(this.toTokenEventBaseProps(r),t);const g=this.toEventBaseProps(r);s!=null&&r.numberColumn?s({...g,event:t}):o?.({...g,event:t});break}}}syncPointerListeners(e){const{__debugPointerEvents:t,lineHoverHighlight:n="disabled",onLineClick:i,onLineNumberClick:r,onLineEnter:o,onLineLeave:s,onTokenClick:l,onTokenEnter:a,onTokenLeave:d,onHunkExpand:h,onMergeConflictActionClick:c,enableGutterUtility:u=!1,enableLineSelection:f=!1,onGutterUtilityClick:g}=this.options,b=g!=null,y=n!=="disabled"||i!=null||r!=null||o!=null||s!=null||l!=null||a!=null||d!=null||h!=null||c!=null||u||f||b;y&&!this.hasPointerListeners?(e.addEventListener("click",this.handlePointerClick),e.addEventListener("pointerdown",this.handlePointerDown),e.addEventListener("pointermove",this.handlePointerMove),e.addEventListener("pointerleave",this.handlePointerLeave),this.hasPointerListeners=!0,he(t,"click","FileDiff.DEBUG.attachEventListeners: Attaching click events for:",(()=>{const C=[];return(t==="both"||t==="click")&&(i!=null&&C.push("onLineClick"),r!=null&&C.push("onLineNumberClick"),h!=null&&C.push("expandable hunk separators"),c!=null&&C.push("merge conflict actions")),C})()),he(t,"move","FileDiff.DEBUG.attachEventListeners: Attaching pointer move event"),he(t,"move","FileDiff.DEBUG.attachEventListeners: Attaching pointer leave event")):!y&&this.hasPointerListeners&&(e.removeEventListener("click",this.handlePointerClick),e.removeEventListener("pointerdown",this.handlePointerDown),e.removeEventListener("pointermove",this.handlePointerMove),e.removeEventListener("pointerleave",this.handlePointerLeave),this.hasPointerListeners=!1);const m=this.pointerSession.mode==="selecting"||this.pointerSession.mode==="pendingSingleLineUnselect",p=this.pointerSession.mode==="gutterSelecting";(!f&&m||!b&&p)&&(this.clearPointerSession(),this.detachDocumentPointerListeners(),this.selectionAnchor=void 0,this.clearPendingSingleLineState())}updateInteractiveLineAttributes(){if(this.pre==null)return;const{onLineClick:e,onLineNumberClick:t,enableLineSelection:n=!1}=this.options,i=e!=null,r=t!=null||n;i&&!this.interactiveLinesAttr?(this.pre.setAttribute("data-interactive-lines",""),this.interactiveLinesAttr=!0):!i&&this.interactiveLinesAttr&&(this.pre.removeAttribute("data-interactive-lines"),this.interactiveLinesAttr=!1),r&&!this.interactiveLineNumbersAttr?(this.pre.setAttribute("data-interactive-line-numbers",""),this.interactiveLineNumbersAttr=!0):!r&&this.interactiveLineNumbersAttr&&(this.pre.removeAttribute("data-interactive-line-numbers"),this.interactiveLineNumbersAttr=!1)}handlePointerDown=e=>{if(e.pointerType==="mouse"&&e.button!==0||this.pre==null||this.pointerSession.mode!=="idle")return;const t=e.composedPath();et(t)&&this.options.onGutterUtilityClick!=null?this.startGutterSelectionFromPointerDown(e):(e.pointerType!=="mouse"&&this.revealUtilityFromGutterPath(t),this.startLineSelectionFromPointerDown(e))};startLineSelectionFromPointerDown(e){const{enableLineSelection:t=!1}=this.options;if(!t)return;const n=this.resolveSelectionInfo(e,{source:"event-path",requireNumberColumn:!0});if(n==null)return;const{pre:i}=this;if(i==null)return;const{lineNumber:r,eventSide:o,lineIndex:s}=n;if(e.shiftKey&&this.selectedRange!=null){const l=this.getIndexesFromSelection(this.selectedRange,i.getAttribute("data-diff-type")==="split");if(l==null)return;const a=l.start<=l.end?s>=l.start:s<=l.end;this.selectionAnchor={lineNumber:a?this.selectedRange.start:this.selectedRange.end,side:a?this.selectedRange.side:this.selectedRange.endSide??this.selectedRange.side},this.updateSelection(r,o,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:"selecting",pointerId:e.pointerId},this.attachDocumentPointerListeners();return}if(this.selectedRange?.start===r&&this.selectedRange?.end===r){const l={lineNumber:r,side:o};this.selectionAnchor=l,this.pointerSession={mode:"pendingSingleLineUnselect",pointerId:e.pointerId,anchor:l,pending:l},this.attachDocumentPointerListeners();return}this.options.controlledSelection===!0?this.proposedSelectedRange=null:this.selectedRange=null,this.placeUtility(),this.selectionAnchor={lineNumber:r,side:o},this.updateSelection(r,o,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:"selecting",pointerId:e.pointerId},this.attachDocumentPointerListeners()}startGutterSelectionFromPointerDown(e){const{enableLineSelection:t=!1,onGutterUtilityClick:n}=this.options;if(n==null)return;const i=this.currentSelectionEnds(),r=i?.bottom??this.resolveSelectionPoint(e,{source:"event-path",excludeUtility:!1}),o=i?.top??r;r==null||o==null||(e.preventDefault(),e.stopPropagation(),this.pointerSession={mode:"gutterSelecting",pointerId:e.pointerId,anchor:o,current:r},t&&(this.selectionAnchor={lineNumber:o.lineNumber,side:o.side},this.updateSelection(r.lineNumber,r.side,!1),this.notifySelectionStart(this.getCurrentSelectionRange())),this.attachDocumentPointerListeners())}handleDocumentPointerMove=e=>{const{enableLineSelection:t=!1}=this.options;switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const n=this.resolveSelectionPoint(e,{source:"coordinates-first"});if(n==null)return;this.pointerSession.current=n,t===!0&&this.updateSelection(n.lineNumber,n.side);return}case"selecting":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const n=this.resolveSelectionInfo(e,{source:"coordinates-first",requireNumberColumn:!1});if(n==null||this.selectionAnchor==null)return;this.updateSelection(n.lineNumber,n.eventSide);return}case"pendingSingleLineUnselect":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const n=this.resolveSelectionInfo(e,{source:"coordinates-first",requireNumberColumn:!1});if(n==null||this.selectionAnchor==null)return;const i={lineNumber:n.lineNumber,side:n.eventSide};if(ao(this.pointerSession.pending,i))return;this.updateSelection(n.lineNumber,n.eventSide,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.notifySelectionChangeDelta(),this.pointerSession={mode:"selecting",pointerId:e.pointerId};return}}};handleDocumentPointerUp=e=>{const{enableLineSelection:t=!1,onGutterUtilityClick:n}=this.options;switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const i=this.resolveSelectionPoint(e,{source:"coordinates-first"});i!=null&&(this.pointerSession.current=i,t&&this.updateSelection(i.lineNumber,i.side)),n?.(this.buildSelectedLineRange(this.pointerSession.anchor,this.pointerSession.current)),this.selectionAnchor=void 0,t&&(this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(),this.clearProposedSelection()),this.clearPointerSession(),this.detachDocumentPointerListeners();return}case"pendingSingleLineUnselect":if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault(),this.updateSelection(null,void 0,!1),this.selectionAnchor=void 0,this.clearPendingSingleLineState(),this.detachDocumentPointerListeners(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(),this.clearProposedSelection();return;case"selecting":if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault(),this.selectionAnchor=void 0,this.detachDocumentPointerListeners(),this.clearPointerSession(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(),this.clearProposedSelection()}};handleDocumentPointerCancel=e=>{switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":case"selecting":case"pendingSingleLineUnselect":if("pointerId"in this.pointerSession&&e.pointerId!==this.pointerSession.pointerId)return;this.selectionAnchor=void 0,this.clearProposedSelection(),this.clearPendingSingleLineState(),this.clearPointerSession(),this.detachDocumentPointerListeners()}};clearHoveredLine(){this.hoveredLine!=null&&(this.hoveredLine.lineElement.removeAttribute("data-hovered"),this.hoveredLine.numberElement.removeAttribute("data-hovered"),this.hoveredLine=void 0)}setHoveredLine(e){const{lineHoverHighlight:t="disabled"}=this.options;this.hoveredLine!=null&&this.clearHoveredLine(),this.hoveredLine=e,t!=="disabled"&&((t==="both"||t==="line")&&this.hoveredLine.lineElement.setAttribute("data-hovered",""),(t==="both"||t==="number")&&this.hoveredLine.numberElement.setAttribute("data-hovered",""))}clearHoveredToken(){this.hoveredToken!=null&&(this.hoveredToken=void 0)}setHoveredToken(e){this.hoveredToken!=null&&this.clearHoveredToken(),this.hoveredToken=e}ensureGutterUtilityNode(e){if(this.gutterUtilityContainer==null&&(this.gutterUtilityContainer=document.createElement("div"),this.gutterUtilityContainer.setAttribute("data-gutter-utility-slot","")),e)this.gutterUtilityButton!=null&&(this.gutterUtilityButton.remove(),this.gutterUtilityButton=void 0),this.gutterUtilitySlot==null&&(this.gutterUtilitySlot=document.createElement("slot"),this.gutterUtilitySlot.name="gutter-utility-slot"),this.gutterUtilitySlot.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilitySlot);else{if(this.gutterUtilitySlot?.remove(),this.gutterUtilitySlot=void 0,this.gutterUtilityButton==null){const t=document.createElement("div");t.innerHTML=pe(so());const n=t.firstElementChild;if(!(n instanceof HTMLButtonElement))throw new Error("InteractionManager.ensureGutterUtilityNode: Node element should be a button");n.remove(),this.gutterUtilityButton=n}this.gutterUtilityButton.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilityButton)}}revealUtilityFromGutterPath(e){if(this.placeUtilityFromSelection())return;const t=this.resolvePointerTarget(e);Ve(t)&&t.numberColumn&&this.showUtilityOnLine(this.toEventBaseProps(t))}placeUtility(){if(!this.placeUtilityFromSelection()){if(this.hoveredLine!=null){this.showUtilityOnLine(this.hoveredLine);return}this.hideUtility()}}placeUtilityFromSelection(){const e=this.currentSelectionEnds();if(e==null)return!1;const t=this.targetForSelectionPoint(e.bottom);return t==null?this.hideUtility():this.showUtilityOnLine(this.toEventBaseProps(t)),!0}showUtilityOnLine(e){this.gutterUtilityContainer!=null&&(this.gutterUtilityLine=e,e.numberElement.appendChild(this.gutterUtilityContainer))}hideUtility(){this.gutterUtilityContainer?.remove(),this.gutterUtilityLine=void 0}currentSelectionEnds(){const e=this.getCurrentSelectionRange();return e==null?void 0:this.selectionEnds(e)}selectionEnds(e){const t={lineNumber:e.start,side:e.side},n={lineNumber:e.end,side:e.endSide??e.side},i=this.selectionPointRowIndex(t),r=this.selectionPointRowIndex(n);if(!(i==null||r==null))return i>r?{top:n,bottom:t}:{top:t,bottom:n}}selectionPointRowIndex(e){const t=this.getLineIndex(e.lineNumber,e.side);if(t!=null)return this.isSplitDiff()?t[1]:t[0]}targetForSelectionPoint(e){if(this.pre==null)return;const t=this.getLineIndex(e.lineNumber,e.side);if(t==null)return;const n=this.mode==="diff"?`${t[0]},${t[1]}`:`${t[0]}`,i=this.pre.querySelectorAll(`[data-column-number="${e.lineNumber}"][data-line-index="${n}"]`);for(const r of i){if(!(r instanceof HTMLElement))continue;const o=this.resolvePointerTarget(Ze(r));if(Ve(o)&&!(this.mode==="diff"&&e.side!=null&&o.side!==e.side))return o}}attachDocumentPointerListeners(){this.hasDocumentPointerListeners||(document.addEventListener("pointermove",this.handleDocumentPointerMove),document.addEventListener("pointerup",this.handleDocumentPointerUp),document.addEventListener("pointercancel",this.handleDocumentPointerCancel),this.hasDocumentPointerListeners=!0)}detachDocumentPointerListeners(){this.hasDocumentPointerListeners&&(document.removeEventListener("pointermove",this.handleDocumentPointerMove),document.removeEventListener("pointerup",this.handleDocumentPointerUp),document.removeEventListener("pointercancel",this.handleDocumentPointerCancel),this.hasDocumentPointerListeners=!1)}clearPointerSession(){this.pointerSession={mode:"idle"}}clearPendingSingleLineState(){this.pointerSession.mode==="pendingSingleLineUnselect"&&(this.pointerSession={mode:"idle"})}selectionInfoFromPath(e,t){const n=this.resolvePointerTarget(e);if(Ve(n)&&!(t&&!n.numberColumn)&&n.splitLineIndex!=null)return{lineIndex:n.splitLineIndex,lineNumber:n.lineNumber,eventSide:this.mode==="diff"?n.side:void 0}}resolveSelectionInfo(e,t){const n=this.resolveSelectionPath(e,t);return n!=null?this.selectionInfoFromPath(n,t.requireNumberColumn):void 0}selectionPointFromPath(e){const t=this.resolvePointerTarget(e);if(Ve(t))return{lineNumber:t.lineNumber,side:this.mode==="diff"?t.side:void 0}}resolveSelectionPoint(e,t){const n=this.resolveSelectionPath(e,t);return n!=null?this.selectionPointFromPath(n):void 0}resolveSelectionPath(e,t){const n=t.excludeUtility!==!1;switch(t.source){case"event-path":return this.pathFromEventPath(e.composedPath(),n);case"coordinates-first":{const i=this.pathFromCoordinates(e,n);return i!==void 0?i??void 0:this.pathFromEventPath(e.composedPath(),n)}}}pathFromCoordinates(e,t){const n=this.hitTest(e);if(n!==void 0)return n===null?null:this.pathFromElement(n,t)??null}pathFromEventPath(e,t){if(!(t&&et(e))){for(const n of e)if(n instanceof Element)return this.pathFromElement(n,t)}}pathFromElement(e,t){const n=Ze(e);if(t&&et(n))return;const i=fo(e);return i!=null?Ze(i):this.pathFromAnnotationSlot(e)}pathFromAnnotationSlot(e){const t=go(po(e));if(t==null)return;const n=this.targetForSelectionPoint(t);return n!=null?Ze(n.lineElement):void 0}hitTest(e){if(!Number.isFinite(e.clientX)||!Number.isFinite(e.clientY))return;const t=this.pre?.getRootNode(),n=En(t)?t:En(document)?document:void 0;if(n!=null)return n.elementFromPoint(e.clientX,e.clientY)}getLineIndex(e,t){const{getLineIndex:n}=this.options;return n!=null?n(e,t):[e-1,e-1]}getCurrentSelectionRange(){return this.proposedSelectedRange!==void 0?this.proposedSelectedRange:this.selectedRange}clearProposedSelection(){this.proposedSelectedRange=void 0}updateSelection(e,t,n=!0){const i=this.getCurrentSelectionRange();let r;if(e==null)r=null;else{const o=this.selectionAnchor?.side??t,s=this.selectionAnchor?.lineNumber??e;r=this.buildSelectionRange(s,e,o,t)}Wt(i??void 0,r??void 0)||(this.options.controlledSelection===!0?this.proposedSelectedRange=r:(this.selectedRange=r,this.queuedSelectionRender??=requestAnimationFrame(this.renderSelection)),this.placeUtility(),n&&this.notifySelectionChangeDelta())}getIndexesFromSelection(e,t){if(this.pre==null)return;const n=this.getLineIndex(e.start,e.side),i=this.getLineIndex(e.end,e.endSide??e.side);return n!=null&&i!=null?{start:t?n[1]:n[0],end:t?i[1]:i[0]}:void 0}renderSelection=()=>{if(this.queuedSelectionRender!=null&&(cancelAnimationFrame(this.queuedSelectionRender),this.queuedSelectionRender=void 0),this.pre==null||this.renderedSelectionRange===this.selectedRange)return;const e=this.pre.querySelectorAll("[data-selected-line]");for(const l of e)l.removeAttribute("data-selected-line");if(this.renderedSelectionRange=this.selectedRange,this.selectedRange==null)return;const{children:t}=this.pre;if(t.length===0)return;if(t.length>2)throw console.error(t),new Error("InteractionManager.renderSelection: Somehow there are more than 2 code elements...");const n=this.pre.getAttribute("data-diff-type")==="split",i=this.getIndexesFromSelection(this.selectedRange,n);if(i==null)throw console.error({rowRange:i,selectedRange:this.selectedRange}),new Error("InteractionManager.renderSelection: No valid rowRange");const r=i.start===i.end,o=Math.min(i.start,i.end),s=Math.max(i.start,i.end);for(const l of t){const[a,d]=l.children,h=d.children.length;if(h!==a.children.length)throw new Error("InteractionManager.renderSelection: gutter and content children dont match, something is wrong");for(let c=0;cs)break;if(g==null||gNumber.parseInt(i,10)).filter(i=>!Number.isNaN(i));if(t&&n.length===2)return n[1];if(!t)return n[0]}};function Ke({enableTokenInteractionsOnWhitespace:e,enableGutterUtility:t,lineHoverHighlight:n,onGutterUtilityClick:i,onLineClick:r,onLineEnter:o,onLineLeave:s,onLineNumberClick:l,onTokenClick:a,onTokenEnter:d,onTokenLeave:h,renderGutterUtility:c,__debugPointerEvents:u,enableLineSelection:f,controlledSelection:g,onLineSelected:b,onLineSelectionStart:y,onLineSelectionChange:m,onLineSelectionEnd:p},C,v,x){return{enableTokenInteractionsOnWhitespace:e,enableGutterUtility:lo({enableGutterUtility:t,renderGutterUtility:c,onGutterUtilityClick:i}),usesCustomGutterUtility:c!=null,lineHoverHighlight:n,onGutterUtilityClick:i,onHunkExpand:C,onMergeConflictActionClick:x,onLineClick:r,onLineEnter:o,onLineLeave:s,onLineNumberClick:l,onTokenClick:a,onTokenEnter:d,onTokenLeave:h,__debugPointerEvents:u,enableLineSelection:f,controlledSelection:g,onLineSelected:b,onLineSelectionStart:y,onLineSelectionChange:m,onLineSelectionEnd:p,getLineIndex:v}}function lo({enableGutterUtility:e,renderGutterUtility:t,onGutterUtilityClick:n}){if(n!=null&&t!=null)throw new Error("Cannot use both 'onGutterUtilityClick' and 'renderGutterUtility'. Use only one gutter utility API.");return e??!1}function Ve(e){return e!=null&&"kind"in e&&e.kind==="line"}function ut(e){return e!=null&&"kind"in e&&e.kind==="token"}function Tt(e){return Ve(e)||ut(e)}function ho(e){return"type"in e&&e.type==="line-info"}function co(e){return"kind"in e&&e.kind==="merge-conflict-action"}function uo(e){return e==="current"||e==="incoming"||e==="both"}function wn(e,t){const n=e?.querySelector(t);return n instanceof HTMLElement?n:void 0}function Ze(e){const t=[];let n=e;for(;n!=null;)t.push(n),n=n.parentNode;return t}function fo(e){const t=e.closest("[data-line], [data-column-number]");if(t instanceof HTMLElement)return t;const n=e.closest('[data-line-annotation], [data-gutter-buffer="annotation"]');if(!(n instanceof HTMLElement))return;const i=n.previousElementSibling;return i instanceof HTMLElement&&(i.hasAttribute("data-line")||i.hasAttribute("data-column-number"))?i:void 0}function po(e){const t=e.closest('[slot^="annotation-"]');if(t instanceof HTMLElement)return t.getAttribute("slot")??void 0;if(e instanceof HTMLElement){const n=e.getAttribute("name")??void 0;return n!=null&&n.startsWith("annotation-")?n:void 0}}function go(e){if(e==null)return;const t=/^annotation-(?:(additions|deletions)-)?(\d+)$/.exec(e);if(t==null)return;const n=Number.parseInt(t[2],10);if(!(!Number.isFinite(n)||n<=0))return{lineNumber:n,side:t[1]}}function En(e){return e!=null&&typeof e.elementFromPoint=="function"}function Tn(e,t){switch(e){case"change-deletion":return"deletions";case"change-addition":return"additions";default:return t.hasAttribute("data-deletions")?"deletions":"additions"}}function In(e){const t=e.getAttribute("data-line-type");if(t!=null)switch(t){case"change-deletion":case"change-addition":case"context":case"context-expanded":return t;default:return}}function et(e){for(const t of e)if(t instanceof HTMLElement&&(t.hasAttribute("data-utility-button")||t.hasAttribute("data-gutter-utility-slot")||t.getAttribute("slot")==="gutter-utility-slot"||t.getAttribute("name")==="gutter-utility-slot"))return!0;return!1}function he(e="none",t,...n){switch(e){case"none":return;case"both":break;case"click":if(t!=="click")return;break;case"move":if(t!=="move")return;break}console.log(...n)}var _i=class ue{static resizeObserver;static managersByElement=new Map;static getResizeObserver(){const t=ue.resizeObserver??new ResizeObserver(ue.handleSharedResizeEntries);return ue.resizeObserver=t,t}static handleSharedResizeEntries(t){const n=new Map;for(const i of t){const r=ue.managersByElement.get(i.target);if(r==null)continue;const o=n.get(r);o==null?n.set(r,[i]):o.push(i)}for(const[i,r]of n)i.handleResizeEntries(r)}observedNodes=new Map;setup(t,n){const i=new Set;let r=0;const o=new Map(this.observedNodes);this.observedNodes.clear();for(const s of t.children){if(r===2)break;const l=(()=>{if(s instanceof HTMLElement&&s.tagName==="CODE")return s})();if(l==null)continue;r++;let a=o.get(l);if(a!=null&&a.type!=="code")throw new Error("ResizeManager.setup: somehow a code node is being used for an annotation, should be impossible");let d=l.firstElementChild;d instanceof HTMLElement||(d=null),a!=null?(this.observedNodes.set(l,a),o.delete(l),a.numberElement!==d?(a.numberElement!=null&&(this.unobserve(a.numberElement),o.delete(a.numberElement)),d!=null&&(this.observe(d),o.delete(d),this.observedNodes.set(d,a)),a.numberElement=d,a.numberWidth=0):a.numberElement!=null?(o.delete(a.numberElement),this.observedNodes.set(a.numberElement,a)):a.numberWidth=0):(a={type:"code",codeElement:l,numberElement:d,codeWidth:"auto",numberWidth:0},this.observedNodes.set(l,a),this.observe(l),d!=null&&(this.observedNodes.set(d,a),this.observe(d)))}if(r>1&&!n){const s=t.querySelectorAll('[data-line-annotation*=","]'),l=new Map;for(const a of s){if(!(a instanceof HTMLElement))continue;const d=a.getAttribute("data-line-annotation")??"";if(!/^-?\d+,-?\d+$/.test(d)){console.error("DiffFileRenderer.setupResizeObserver: Invalid element or annotation",{lineAnnotation:d,element:a});continue}let h=l.get(d);h==null&&(h=[],l.set(d,h)),h.push(a)}for(const[a,d]of l){if(d.length!==2){console.error("DiffFileRenderer.setupResizeObserver: Bad Pair",a,d);continue}const[h,c]=d,u=h.firstElementChild,f=c.firstElementChild;if(!(h instanceof HTMLElement)||!(c instanceof HTMLElement)||!(u instanceof HTMLElement)||!(f instanceof HTMLElement))continue;let g=o.get(u);if(g!=null){this.observedNodes.set(u,g),this.observedNodes.set(f,g),o.delete(u),o.delete(f);continue}const b=u.getBoundingClientRect().height,y=f.getBoundingClientRect().height;g={type:"annotations",column1:{container:h,child:u,childHeight:b},column2:{container:c,child:f,childHeight:y},currentHeight:"auto"},i.add({child1:u,child2:f,item:g,newHeight:Math.max(b,y)})}for(const a of i)this.applyNewHeight(a.item,a.newHeight),this.observedNodes.set(a.child1,a.item),this.observedNodes.set(a.child2,a.item),this.observe(a.child1),this.observe(a.child2);i.clear()}for(const[s,l]of o)this.unobserve(s),l.type==="code"?bo(l):Co(l);o.clear()}cleanUp(){for(const t of this.observedNodes.keys())this.unobserve(t);this.observedNodes.clear()}observe(t){const{managersByElement:n}=ue,i=n.get(t);if(i!==this){if(i!=null&&i!==this)throw new Error("ResizeManager.observe: element is already owned by another ResizeManager");n.set(t,this),ue.getResizeObserver().observe(t)}}unobserve(t){const{managersByElement:n,resizeObserver:i}=ue,r=n.get(t);if(r!=null){if(r!==this)throw new Error("ResizeManager.unobserve: element is owned by another ResizeManager");n.delete(t),i?.unobserve(t),i!=null&&n.size===0&&(i.disconnect(),ue.resizeObserver=void 0)}}handleResizeEntries(t){const n=new Map,i=new Set;for(const r of t){const{target:o,borderBoxSize:s,contentBoxSize:l}=r;if(!(o instanceof HTMLElement)){console.error("ResizeManager.handleResizeEntries: Invalid element for ResizeObserver",r);continue}const a=this.observedNodes.get(o);if(a==null){console.error("ResizeManager.handleResizeEntries: Not a valid observed node",r);continue}if(a.type==="annotations"){const d=(()=>{if(o===a.column1.child)return a.column1;if(o===a.column2.child)return a.column2})();if(d==null){console.error("ResizeManager.handleResizeEntries: Couldn't find a column for",{item:a,target:o});continue}d.childHeight=s[0].blockSize,i.add(a)}else if(a.type==="code"){const d=n.get(a)??{},h=l[0].inlineSize;o===a.codeElement?d.codeInlineSize=h:o===a.numberElement&&(d.numberInlineSize=h),n.set(a,d)}}this.applyAnnotationUpdates(i),i.clear(),this.applyColumnUpdates(n),n.clear()}applyAnnotationUpdates(t){for(const n of t)this.applyNewHeight(n,Math.max(n.column1.childHeight,n.column2.childHeight))}applyColumnUpdates=t=>{for(const[n,i]of t){const r=i.codeInlineSize!=null?mo(i.codeInlineSize):n.codeWidth,o=i.numberInlineSize!=null?vo(i.numberInlineSize):n.numberWidth,s=r!==n.codeWidth,l=o!==n.numberWidth;if(!(!s&&!l)&&(n.codeWidth=r,n.numberWidth=o,s&&n.codeElement.style.setProperty("--diffs-column-width",`${typeof r=="number"?`${r}px`:"auto"}`),l&&n.codeElement.style.setProperty("--diffs-column-number-width",`${o===0?"auto":`${o}px`}`),s||l&&r!=="auto")){const a=typeof r=="number"?Math.max(r-o,0):0;n.codeElement.style.setProperty("--diffs-column-content-width",`${a>0?`${a}px`:"auto"}`)}}};applyNewHeight(t,n){n!==t.currentHeight&&(t.currentHeight=Math.max(n,0),t.column1.container.style.setProperty("--diffs-annotation-min-height",`${t.currentHeight}px`),t.column2.container.style.setProperty("--diffs-annotation-min-height",`${t.currentHeight}px`))}};function mo(e){const t=Math.max(Math.floor(e),0);return t===0?"auto":t}function vo(e){return Math.max(Math.ceil(e),0)}function bo(e){e.codeElement.isConnected&&(e.codeElement.style.removeProperty("--diffs-column-content-width"),e.codeElement.style.removeProperty("--diffs-column-number-width"),e.codeElement.style.removeProperty("--diffs-column-width"))}function Co(e){e.column1.container.isConnected&&e.column1.container.style.removeProperty("--diffs-annotation-min-height"),e.column2.container.isConnected&&e.column2.container.style.removeProperty("--diffs-annotation-min-height")}const Se=new Map,It=new Map,jt=new Map,gt=new Set;function mt(e){for(const t of Array.isArray(e)?e:[e])if(!(t==="text"||t==="ansi")&&!gt.has(t))return!1;return!0}function Rn(e,t){e=Array.isArray(e)?e:[e];for(const n of e){if(gt.has(n.name))continue;let i=Se.get(n.name);i==null&&(i=n,Se.set(n.name,i)),gt.add(i.name),t.loadLanguageSync(i.data)}}function So(){Se.clear(),gt.clear()}function Oi(){return typeof WorkerGlobalScope<"u"&&typeof self<"u"&&self instanceof WorkerGlobalScope}async function Ni(e){if(Oi())throw new Error(`resolveLanguage("${e}") cannot be called from a worker context. Languages must be pre-resolved on the main thread and passed to the worker via the resolvedLanguages parameter.`);const t=It.get(e);if(t!=null)return t;try{let n=jt.get(e);if(n==null&&Object.prototype.hasOwnProperty.call(Ln,e)&&(n=Ln[e]),n==null)throw new Error(`resolveLanguage: "${e}" not found in bundled or custom languages`);const i=n().then(({default:r})=>{const o={name:e,data:r};return Se.has(e)||Se.set(e,o),o});return It.set(e,i),await i}finally{It.delete(e)}}function Fi(e){return Se.get(e)??Ni(e)}const vt=new Set;function Ye(e){const t=[],n=new Set;for(const c of yo(e.themes)){const u=zi(c)?c.getThemes():[c];for(const f of u){if(n.has(f.name))throw new Error(`Theme collection already contains theme "${f.name}"`);n.add(f.name),t.push(f)}}const i=Object.freeze([...t]),r=Object.freeze(i.filter(c=>c.colorScheme==="light")),o=Object.freeze(i.filter(c=>c.colorScheme==="dark")),s=new Map(i.map(c=>[c.name,c])),l=Object.freeze(i.map(c=>c.name)),a=Object.freeze(r.map(c=>c.name)),d=Object.freeze(o.map(c=>c.name));function h(c){if(c==null)return i;const{colorScheme:u,collection:f}=c;return f==null?u==="light"?r:u==="dark"?o:i:i.filter(g=>g.collection!==f?!1:u==null||g.colorScheme===u)}return{getTheme(c){return s.get(c)},getThemes(c){return h(c)},getThemeNames(c){return c?.collection==null?c?.colorScheme==="light"?a:c?.colorScheme==="dark"?d:l:h(c).map(u=>u.name)},hasTheme(c){return s.has(c)},orderBy(c){return Ye({themes:i.map((u,f)=>({descriptor:u,index:f})).sort((u,f)=>{const g=c(u.descriptor,f.descriptor);return g!==0?g:u.index-f.index}).map(u=>u.descriptor)})},pick(c){const u=[],f=new Set;for(const g of c){if(f.has(g))throw new Error(`Theme collection pick already includes theme "${g}"`);f.add(g);const b=s.get(g);if(b==null)throw new Error(`Theme collection does not contain theme "${g}"`);u.push(b)}return Ye({themes:u})},registerInto(c){for(const u of i)c.registerThemeIfAbsent(u.name,u.load)}}}function yo(e){return xo(e)?[e]:e}function xo(e){return zi(e)||Lo(e)}function Lo(e){return typeof e.name=="string"&&typeof e.load=="function"}function zi(e){return typeof e.getThemes=="function"}function Ui(e){return e!==null&&typeof e=="object"&&"default"in e?e.default:e}var Vi=class extends Error{constructor(e){super(`Theme "${e}" is already registered`),this.name="DuplicateThemeError"}},ko=class extends Error{constructor(e){super(`No loader registered for theme "${e}"`),this.name="UnregisteredThemeError"}},wo=class extends Error{constructor(e){super(`Theme "${e}" has not been resolved`),this.name="UnresolvedThemeError"}};function Eo(){const e=new Map,t=new Map,n=new Map;let i=0;function r(m,p){if(e.has(m))throw new Vi(m);e.set(m,p)}function o(m,p){return e.has(m)?!1:(e.set(m,p),!0)}function s(m){return e.has(m)}function l(m){const p=t.get(m);if(p!==void 0)return Promise.resolve(p);const C=n.get(m);if(C!==void 0)return C;const v=e.get(m);if(v===void 0)return Promise.reject(new ko(m));const x=i,S=v().then(L=>{const E=Ui(L);return x===i&&t.set(m,E),n.get(m)===S&&n.delete(m),E}).catch(L=>{throw n.get(m)===S&&n.delete(m),L});return n.set(m,S),S}function a(m){return Promise.all(m.map(p=>l(p)))}function d(m,p){t.set(m,p)}function h(m){for(const[p,C]of m)d(p,C)}function c(m){return t.get(m)}function u(m){const p=[];for(const C of m){const v=t.get(C);if(v===void 0)throw new wo(C);p.push(v)}return p}function f(m){return t.has(m)}function g(m){for(const p of m)if(!t.has(p))return!1;return!0}function b(m){const p=t.get(m);return p!==void 0?p:l(m)}function y(){i++,t.clear(),n.clear()}return{clearResolvedThemes:y,getResolvedOrResolveTheme:b,getResolvedTheme:c,getResolvedThemes:u,hasRegisteredTheme:s,hasResolvedTheme:f,hasResolvedThemes:g,registerTheme:r,registerThemeIfAbsent:o,resolveTheme:l,resolveThemes:a,seedResolvedTheme:d,seedResolvedThemes:h}}const X=Eo();function An(e,t){e=Array.isArray(e)?e:[e];for(let n of e){let i;if(typeof n=="string"){if(i=X.getResolvedTheme(n),i==null)throw new Error(`loadResolvedThemes: ${n} is not resolved, you must resolve it before calling loadResolvedThemes`)}else i=n,n=n.name,X.getResolvedTheme(n)==null&&X.seedResolvedTheme(n,i);vt.has(n)||(vt.add(n),t.loadThemeSync(i))}}function To(){X.clearResolvedThemes(),vt.clear()}function hn({name:e,load:t,colorScheme:n,collection:i,displayName:r}){return{name:e,colorScheme:n,collection:i,displayName:r,load:Io(t)}}function Io(e){return async()=>Or(Ui(await e()))}const Ro="pierre",Ao=["pierre-dark","pierre-dark-soft","pierre-dark-vibrant","pierre-dark-protanopia-deuteranopia","pierre-dark-tritanopia"],Bi=["pierre-light","pierre-light-soft","pierre-light-vibrant","pierre-light-protanopia-deuteranopia","pierre-light-tritanopia"],Ho=[...Bi,...Ao],Mo=new Set(Bi);function Do(e){return Mo.has(e)?"light":"dark"}const Po={"pierre-dark":"Pierre Dark","pierre-dark-soft":"Pierre Dark Soft","pierre-dark-vibrant":"Pierre Dark Vibrant","pierre-dark-protanopia-deuteranopia":"Pierre Dark Protanopia & Deuteranopia","pierre-dark-tritanopia":"Pierre Dark Tritanopia","pierre-light":"Pierre Light","pierre-light-soft":"Pierre Light Soft","pierre-light-vibrant":"Pierre Light Vibrant","pierre-light-protanopia-deuteranopia":"Pierre Light Protanopia & Deuteranopia","pierre-light-tritanopia":"Pierre Light Tritanopia"},_o={"pierre-dark":()=>k(()=>import("./pierre-dark-CyvmCCZW.js"),[]),"pierre-dark-soft":()=>k(()=>import("./pierre-dark-soft-BHGpRqa4.js"),[]),"pierre-dark-vibrant":()=>k(()=>import("./pierre-dark-vibrant-BWBVywrn.js"),[]),"pierre-dark-protanopia-deuteranopia":()=>k(()=>import("./pierre-dark-protanopia-deuteranopia-Rgc0TwpF.js"),[]),"pierre-dark-tritanopia":()=>k(()=>import("./pierre-dark-tritanopia-Beq2gCRQ.js"),[]),"pierre-light":()=>k(()=>import("./pierre-light-480U9XYS.js"),[]),"pierre-light-soft":()=>k(()=>import("./pierre-light-soft-CVdyfjmI.js"),[]),"pierre-light-vibrant":()=>k(()=>import("./pierre-light-vibrant-DdTDNdfJ.js"),[]),"pierre-light-protanopia-deuteranopia":()=>k(()=>import("./pierre-light-protanopia-deuteranopia-CaVOBURG.js"),[]),"pierre-light-tritanopia":()=>k(()=>import("./pierre-light-tritanopia-B4_gpKOM.js"),[])};function Oo(e){return hn({name:e,collection:Ro,colorScheme:Do(e),displayName:Po[e],load:_o[e]})}const $i=Ye({themes:Ho.map(e=>Oo(e))}),No="shiki",Wi=["ayu-light","catppuccin-latte","everforest-light","github-light","github-light-default","github-light-high-contrast","gruvbox-light-hard","gruvbox-light-medium","gruvbox-light-soft","horizon-bright","kanagawa-lotus","light-plus","material-theme-lighter","min-light","night-owl-light","one-light","rose-pine-dawn","slack-ochin","snazzy-light","solarized-light","vitesse-light"],Fo=["andromeeda","aurora-x","ayu-dark","ayu-mirage","catppuccin-frappe","catppuccin-macchiato","catppuccin-mocha","dark-plus","dracula","dracula-soft","everforest-dark","github-dark","github-dark-default","github-dark-dimmed","github-dark-high-contrast","gruvbox-dark-hard","gruvbox-dark-medium","gruvbox-dark-soft","horizon","houston","kanagawa-dragon","kanagawa-wave","laserwave","material-theme","material-theme-darker","material-theme-ocean","material-theme-palenight","min-dark","monokai","night-owl","nord","one-dark-pro","plastic","poimandres","red","rose-pine","rose-pine-moon","slack-dark","solarized-dark","synthwave-84","tokyo-night","vesper","vitesse-black","vitesse-dark"],zo=new Set(Wi);function Uo(e){return zo.has(e)?"light":"dark"}const Vo={andromeeda:()=>k(()=>import("./andromeeda-C4gqWexZ.js"),[]),"aurora-x":()=>k(()=>import("./aurora-x-D-2ljcwZ.js"),[]),"ayu-dark":()=>k(()=>import("./ayu-dark-DYE7WIF3.js"),[]),"ayu-light":()=>k(()=>import("./ayu-light-BA47KaF1.js"),[]),"ayu-mirage":()=>k(()=>import("./ayu-mirage-32ctXXKs.js"),[]),"catppuccin-frappe":()=>k(()=>import("./catppuccin-frappe-DFWUc33u.js"),[]),"catppuccin-latte":()=>k(()=>import("./catppuccin-latte-C9dUb6Cb.js"),[]),"catppuccin-macchiato":()=>k(()=>import("./catppuccin-macchiato-DQyhUUbL.js"),[]),"catppuccin-mocha":()=>k(()=>import("./catppuccin-mocha-D87Tk5Gz.js"),[]),"dark-plus":()=>k(()=>import("./dark-plus-C3mMm8J8.js"),[]),dracula:()=>k(()=>import("./dracula-BzJJZx-M.js"),[]),"dracula-soft":()=>k(()=>import("./dracula-soft-BXkSAIEj.js"),[]),"everforest-dark":()=>k(()=>import("./everforest-dark-BgDCqdQA.js"),[]),"everforest-light":()=>k(()=>import("./everforest-light-C8M2exoo.js"),[]),"github-dark":()=>k(()=>import("./github-dark-DHJKELXO.js"),[]),"github-dark-default":()=>k(()=>import("./github-dark-default-Cuk6v7N8.js"),[]),"github-dark-dimmed":()=>k(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[]),"github-dark-high-contrast":()=>k(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[]),"github-light":()=>k(()=>import("./github-light-DAi9KRSo.js"),[]),"github-light-default":()=>k(()=>import("./github-light-default-D7oLnXFd.js"),[]),"github-light-high-contrast":()=>k(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[]),"gruvbox-dark-hard":()=>k(()=>import("./gruvbox-dark-hard-CFHQjOhq.js"),[]),"gruvbox-dark-medium":()=>k(()=>import("./gruvbox-dark-medium-GsRaNv29.js"),[]),"gruvbox-dark-soft":()=>k(()=>import("./gruvbox-dark-soft-CVdnzihN.js"),[]),"gruvbox-light-hard":()=>k(()=>import("./gruvbox-light-hard-CH1njM8p.js"),[]),"gruvbox-light-medium":()=>k(()=>import("./gruvbox-light-medium-DRw_LuNl.js"),[]),"gruvbox-light-soft":()=>k(()=>import("./gruvbox-light-soft-hJgmCMqR.js"),[]),horizon:()=>k(()=>import("./horizon-BUw7H-hv.js"),[]),"horizon-bright":()=>k(()=>import("./horizon-bright-CUuTKBJd.js"),[]),houston:()=>k(()=>import("./houston-DnULxvSX.js"),[]),"kanagawa-dragon":()=>k(()=>import("./kanagawa-dragon-CkXjmgJE.js"),[]),"kanagawa-lotus":()=>k(()=>import("./kanagawa-lotus-CfQXZHmo.js"),[]),"kanagawa-wave":()=>k(()=>import("./kanagawa-wave-DWedfzmr.js"),[]),laserwave:()=>k(()=>import("./laserwave-DUszq2jm.js"),[]),"light-plus":()=>k(()=>import("./light-plus-B7mTdjB0.js"),[]),"material-theme":()=>k(()=>import("./material-theme-D5KoaKCx.js"),[]),"material-theme-darker":()=>k(()=>import("./material-theme-darker-BfHTSMKl.js"),[]),"material-theme-lighter":()=>k(()=>import("./material-theme-lighter-B0m2ddpp.js"),[]),"material-theme-ocean":()=>k(()=>import("./material-theme-ocean-CyktbL80.js"),[]),"material-theme-palenight":()=>k(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[]),"min-dark":()=>k(()=>import("./min-dark-CafNBF8u.js"),[]),"min-light":()=>k(()=>import("./min-light-CTRr51gU.js"),[]),monokai:()=>k(()=>import("./monokai-D4h5O-jR.js"),[]),"night-owl":()=>k(()=>import("./night-owl-C39BiMTA.js"),[]),"night-owl-light":()=>k(()=>import("./night-owl-light-CMTm3GFP.js"),[]),nord:()=>k(()=>import("./nord-Ddv68eIx.js"),[]),"one-dark-pro":()=>k(()=>import("./one-dark-pro-DVMEJ2y_.js"),[]),"one-light":()=>k(()=>import("./one-light-C3Wv6jpd.js"),[]),plastic:()=>k(()=>import("./plastic-3e1v2bzS.js"),[]),poimandres:()=>k(()=>import("./poimandres-CS3Unz2-.js"),[]),red:()=>k(()=>import("./red-bN70gL4F.js"),[]),"rose-pine":()=>k(()=>import("./rose-pine-qdsjHGoJ.js"),[]),"rose-pine-dawn":()=>k(()=>import("./rose-pine-dawn-DHQR4-dF.js"),[]),"rose-pine-moon":()=>k(()=>import("./rose-pine-moon-D4_iv3hh.js"),[]),"slack-dark":()=>k(()=>import("./slack-dark-BthQWCQV.js"),[]),"slack-ochin":()=>k(()=>import("./slack-ochin-DqwNpetd.js"),[]),"snazzy-light":()=>k(()=>import("./snazzy-light-Bw305WKR.js"),[]),"solarized-dark":()=>k(()=>import("./solarized-dark-DXbdFlpD.js"),[]),"solarized-light":()=>k(()=>import("./solarized-light-L9t79GZl.js"),[]),"synthwave-84":()=>k(()=>import("./synthwave-84-CbfX1IO0.js"),[]),"tokyo-night":()=>k(()=>import("./tokyo-night-hegEt444.js"),[]),vesper:()=>k(()=>import("./vesper-DRje8inN.js"),[]),"vitesse-black":()=>k(()=>import("./vitesse-black-Bkuqu6BP.js"),[]),"vitesse-dark":()=>k(()=>import("./vitesse-dark-D0r3Knsf.js"),[]),"vitesse-light":()=>k(()=>import("./vitesse-light-CVO1_9PV.js"),[])};function Hn(e){return hn({name:e,collection:No,colorScheme:Uo(e),load:Vo[e]})}const Gi=Ye({themes:Object.freeze([...Wi.map(e=>Hn(e)),...Fo.map(e=>Hn(e))])});Ye({themes:[$i,Gi]});function ji(e){if(Oi())throw new Error(`Theme "${e}" cannot be resolved from a worker context. Themes must be pre-resolved on the main thread and passed to the worker via the resolvedLanguages parameter.`);if(X.hasRegisteredTheme(e))return;const t=Gi.getTheme(e);if(t!=null){X.registerThemeIfAbsent(t.name,t.load);return}throw new Error(`No valid theme loader registered for "${e}"`)}function qi(e,t){if(t.name!==e)throw new Error(`resolvedTheme: themeName: ${e} does not match theme.name: ${t.name}`)}async function Bo(e){ji(e);const t=await X.resolveTheme(e);return qi(e,t),t}function $o(e){return X.getResolvedTheme(e)??Bo(e)}let $;async function xt({themes:e,langs:t,preferredHighlighter:n="shiki-js"}){$??=Nr({themes:[],langs:["text"],engine:n==="shiki-wasm"?Fr(k(()=>import("./wasm-CG6Dc4jp.js"),[])):zr()});const i=Wo($)?await $:$;$=i;const r=[];for(const s of t){if(s==="text"||s==="ansi")continue;const l=Fi(s);"then"in l?r.push(l):Rn(l,i)}const o=[];for(const s of e){const l=$o(s);"then"in l?o.push(l):An(l,$)}return(r.length>0||o.length>0)&&await Promise.all([Promise.all(r).then(s=>{Rn(s,i)}),Promise.all(o).then(s=>{An(s,i)})]),i}function ql(e=$){return e!=null&&!("then"in e)}function Ki(){if($!=null&&!("then"in $))return $}function Wo(e=$){return e!=null&&"then"in e}function Kl(e=$){return e==null}async function Yl(e){await xt(e)}async function Xl(){$!=null&&((await $).dispose(),So(),To(),$=void 0)}for(const e of $i.getThemes())X.registerThemeIfAbsent(e.name,e.load);function cn(e=_){const t=[];return typeof e=="string"?t.push(e):(t.push(e.dark),t.push(e.light)),t}function Ge(e){for(const t of cn(e))if(!vt.has(t))return!1;return!0}function Go(e){return X.hasResolvedThemes(e)}function Oe(e,t){return De(e.theme,t.theme)&&e.useTokenTransformer===t.useTokenTransformer&&e.tokenizeMaxLineLength===t.tokenizeMaxLineLength}function ae(e,t){return e?.cacheKey===t?.cacheKey&&e?.contents===t?.contents&&e?.name===t?.name&&e?.lang===t?.lang}function Lt(e,t){return e==null||t==null?e===t:e.startingLine===t.startingLine&&e.totalLines===t.totalLines&&e.bufferBefore===t.bufferBefore&&e.bufferAfter===t.bufferAfter}function qt(e){return A({tagName:"div",children:[A({tagName:"div",children:e.annotations?.map(t=>A({tagName:"slot",properties:{name:t}})),properties:{"data-annotation-content":""}})],properties:{"data-line-annotation":`${e.hunkIndex},${e.lineIndex}`}})}function jo(e){switch(e){case"file":return"diffs-icon-file-code";case"change":return"diffs-icon-symbol-modified";case"new":return"diffs-icon-symbol-added";case"deleted":return"diffs-icon-symbol-deleted";case"rename-pure":case"rename-changed":return"diffs-icon-symbol-moved"}}function Yi({fileOrDiff:e,mode:t,stickyHeader:n}){const i="type"in e?e:void 0,r={"data-diffs-header":t,"data-change-type":i?.type,"data-sticky":n?"":void 0};return A({tagName:"div",children:[t==="custom"?A({tagName:"slot",properties:{name:an}}):qo({name:e.name,prevName:"prevName"in e?e.prevName:void 0,iconType:i?.type??"file"}),...t==="custom"?[]:[Ko(i)]],properties:r})}function qo({name:e,prevName:t,iconType:n}){const i=[A({tagName:"slot",properties:{name:on}}),pt({name:jo(n),properties:{"data-change-icon":n}})];return t!=null&&(i.push(A({tagName:"div",children:[A({tagName:"bdi",children:[W(t)]})],properties:{"data-prev-name":""}})),i.push(pt({name:"diffs-icon-arrow-right-short",properties:{"data-rename-icon":""}}))),i.push(A({tagName:"div",children:[A({tagName:"bdi",children:[W(e)]})],properties:{"data-title":""}})),A({tagName:"div",children:i,properties:{"data-header-content":""}})}function Ko(e){const t=[];if(e!=null){let n=0,i=0;for(const r of e.hunks)n+=r.additionLines,i+=r.deletionLines;(i>0||n===0)&&t.push(A({tagName:"span",children:[W(`-${i}`)],properties:{"data-deletions-count":""}})),(n>0||i===0)&&t.push(A({tagName:"span",children:[W(`+${n}`)],properties:{"data-additions-count":""}}))}return t.push(A({tagName:"slot",properties:{name:sn}})),A({tagName:"div",children:t,properties:{"data-metadata":""}})}function Xi(e){return A({tagName:"pre",properties:Yo(e)})}function Yo({diffIndicators:e,disableBackground:t,disableLineNumbers:n,overflow:i,split:r,totalLines:o,type:s,customProperties:l}){return{...l,"data-diff":s==="diff"?"":void 0,"data-file":s==="file"?"":void 0,"data-diff-type":s==="diff"?r?"split":"single":void 0,"data-overflow":i,"data-disable-line-numbers":n?"":void 0,"data-background":t?void 0:"","data-indicators":e==="bars"||e==="classic"?e:void 0,style:`--diffs-min-number-column-width-default:${`${o}`.length}ch;`}}const Z=new Map;let bt=0;const Ne={"1c":"1c",abap:"abap",as:"actionscript-3",ada:"ada",adb:"ada",ads:"ada",adoc:"asciidoc",asciidoc:"asciidoc","component.html":"angular-html","component.ts":"angular-ts",conf:"nginx",htaccess:"apache",cls:"tex",trigger:"apex",apl:"apl",applescript:"applescript",scpt:"applescript",ara:"ara",asm:"asm",s:"riscv",astro:"astro",awk:"awk",bal:"ballerina",sh:"zsh",bash:"zsh",bat:"cmd",cmd:"cmd",be:"berry",beancount:"beancount",bib:"bibtex",bicep:"bicep","blade.php":"blade",bsl:"bsl",c:"c",h:"objective-cpp",cs:"csharp",cpp:"cpp",hpp:"cpp",cc:"cpp",cxx:"cpp",hh:"cpp",cdc:"cdc",cairo:"cairo",clar:"clarity",clj:"clojure",cljs:"clojure",cljc:"clojure",soy:"soy",cmake:"cmake","CMakeLists.txt":"cmake",cob:"cobol",cbl:"cobol",cobol:"cobol",CODEOWNERS:"codeowners",ql:"ql",coffee:"coffeescript",lisp:"lisp",cl:"lisp",lsp:"lisp",log:"log",v:"verilog",cql:"cql",cr:"crystal",css:"css",csv:"csv",cue:"cue",cypher:"cypher",cyp:"cypher",d:"d",dart:"dart",dax:"dax",desktop:"desktop",diff:"diff",patch:"diff",Dockerfile:"dockerfile",dockerfile:"dockerfile",env:"dotenv",dm:"dream-maker",edge:"edge",el:"emacs-lisp",ex:"elixir",exs:"elixir",elm:"elm",erb:"erb",erl:"erlang",hrl:"erlang",f:"fortran-fixed-form",for:"fortran-fixed-form",fs:"fsharp",fsi:"fsharp",fsx:"fsharp",f03:"f03",f08:"f08",f18:"f18",f77:"f77",f90:"fortran-free-form",f95:"fortran-free-form",fnl:"fennel",fish:"fish",ftl:"ftl",tres:"gdresource",res:"gdresource",gd:"gdscript",gdshader:"gdshader",gs:"genie",feature:"gherkin",COMMIT_EDITMSG:"git-commit","git-rebase-todo":"git-rebase",gjs:"glimmer-js",gleam:"gleam",gts:"glimmer-ts",glsl:"glsl",vert:"glsl",frag:"glsl",shader:"shaderlab",gp:"gnuplot",plt:"gnuplot",gnuplot:"gnuplot",go:"go",graphql:"graphql",gql:"graphql",groovy:"groovy",gvy:"groovy",hack:"hack",haml:"haml",hbs:"handlebars",handlebars:"handlebars",hs:"haskell",lhs:"haskell",hx:"haxe",hcl:"hcl",hjson:"hjson",hlsl:"hlsl",fx:"hlsl",html:"html",htm:"html",http:"http",rest:"http",hxml:"hxml",hy:"hy",imba:"imba",ini:"ini",cfg:"ini",jade:"pug",pug:"pug",java:"java",js:"javascript",mjs:"javascript",cjs:"javascript",jinja:"jinja",jinja2:"jinja",j2:"jinja",jison:"jison",jl:"julia",json:"json",json5:"json5",jsonc:"jsonc",jsonl:"jsonl",jsonnet:"jsonnet",libsonnet:"jsonnet",jssm:"jssm",jsx:"jsx",kt:"kotlin",kts:"kts",kql:"kusto",tex:"tex",ltx:"tex",lean:"lean4",less:"less",liquid:"liquid",lit:"lit",ll:"llvm",logo:"logo",lua:"lua",luau:"luau",Makefile:"makefile",mk:"makefile",makefile:"makefile",md:"markdown",markdown:"markdown",marko:"marko",m:"wolfram",mat:"matlab",mdc:"mdc",mdx:"mdx",wiki:"wikitext",mediawiki:"wikitext",mmd:"mermaid",mermaid:"mermaid",mips:"mipsasm",mojo:"mojo","🔥":"mojo",move:"move",nar:"narrat",nf:"nextflow",nim:"nim",nims:"nim",nimble:"nim",nix:"nix",nu:"nushell",mm:"objective-cpp",ml:"ocaml",mli:"ocaml",mll:"ocaml",mly:"ocaml",pas:"pascal",p:"pascal",pl:"prolog",pm:"perl",t:"perl",raku:"raku",p6:"raku",pl6:"raku",php:"php",phtml:"php",pls:"plsql",sql:"sql",po:"po",polar:"polar",pcss:"postcss",pot:"pot",potx:"potx",pq:"powerquery",pqm:"powerquery",ps1:"powershell",psm1:"powershell",psd1:"powershell",prisma:"prisma",pro:"prolog",P:"prolog",properties:"properties",proto:"protobuf",pp:"puppet",purs:"purescript",py:"python",pyw:"python",pyi:"python",qml:"qml",qmldir:"qmldir",qss:"qss",r:"r",R:"r",rkt:"racket",rktl:"racket",razor:"razor",cshtml:"razor",rb:"ruby",rbw:"ruby",reg:"reg",regex:"regexp",rel:"rel",rs:"rust",rst:"rst",rake:"ruby",gemspec:"ruby",jbuilder:"ruby",builder:"ruby",rabl:"ruby",arb:"ruby",ru:"ruby",podspec:"ruby",Gemfile:"ruby",Rakefile:"ruby",Guardfile:"ruby",Capfile:"ruby",Berksfile:"ruby",Brewfile:"ruby",Vagrantfile:"ruby",Thorfile:"ruby",Appraisals:"ruby",Dangerfile:"ruby",sas:"sas",sass:"sass",scala:"scala",sc:"scala",scm:"scheme",ss:"scheme",sld:"scheme",scss:"scss",sdbl:"sdbl",shadergraph:"shader",st:"smalltalk",sol:"solidity",sparql:"sparql",rq:"sparql",spl:"splunk",config:"ssh-config",do:"stata",ado:"stata",dta:"stata",styl:"stylus",stylus:"stylus",svelte:"svelte",swift:"swift",sv:"system-verilog",svh:"system-verilog",service:"systemd",socket:"systemd",device:"systemd",timer:"systemd",talon:"talonscript",tasl:"tasl",tcl:"tcl",templ:"templ",tf:"tf",tfvars:"tfvars",toml:"toml",ts:"typescript",tsp:"typespec",tsv:"tsv",tsx:"tsx",ttl:"turtle",twig:"twig",typ:"typst",vv:"v",vala:"vala",vapi:"vala",vb:"vb",vbs:"vb",bas:"vb",vh:"verilog",vhd:"vhdl",vhdl:"vhdl",vim:"vimscript",vue:"vue","vine.ts":"vue-vine",vy:"vyper",wasm:"wasm",wat:"wasm",wy:"文言",wgsl:"wgsl",wit:"wit",wl:"wolfram",nb:"wolfram",xml:"xml",xsl:"xsl",xslt:"xsl",yaml:"yaml",yml:"yml",zs:"zenscript",zig:"zig",zsh:"zsh",sty:"tex"};function Q(e){if(Z.has(e))return Z.get(e)??"text";if(Ne[e]!=null)return Ne[e];const t=e.match(/\.([^/\\]+\.[^/\\]+)$/);if(t!=null){if(Z.has(t[1]))return Z.get(t[1])??"text";if(Ne[t[1]]!=null)return Ne[t[1]]??"text"}const n=e.match(/\.([^.]+)$/)?.[1]??"";return Z.has(n)?Z.get(n)??"text":Ne[n]??"text"}function Ql(e,t){if(e<=bt)return!1;Z.clear();for(const n in t){const i=t[n];i!=null&&Z.set(n,i)}return bt=e,!0}function Jl(){return bt}function Xo(e,t){const n=Z.get(e);return n===t?!1:(n!=null&&console.warn(`setCustomExtension: overriding custom mapping for "${e}" from "${n}" to "${t}"`),Z.set(e,t),bt++,!0)}function Zl(){return Object.fromEntries(Z)}function un(e,{theme:t,preferredHighlighter:n="shiki-js"}){return{langs:[e??"text"],themes:cn(t),preferredHighlighter:n}}function ge(e){return`annotation-${"side"in e?`${e.side}-`:""}${e.lineNumber}`}function xe(e){return e.replace(/\n$|\r\n$/,"")}function Qo(e,t,n){const i=typeof n.lineInfo=="function"?n.lineInfo(t):n.lineInfo[t-1];if(i==null){const r=`processLine: line ${t}, contains no state.lineInfo`;throw console.error(r,{node:e,line:t,state:n}),new Error(r)}return e.tagName="div",e.properties["data-line"]=i.lineNumber,e.properties["data-alt-line"]=i.altLineNumber,e.properties["data-line-type"]=i.type,e.properties["data-line-index"]=i.lineIndex,e.children.length===0&&e.children.push(W(` +import{t as pe,b as Ln,n as Or,c as Nr,a as Fr,d as zr,s as Ur,g as Vr,e as Br}from"./index-V37-dq86.js";import{f as Ld}from"./index-V37-dq86.js";import{bR as k}from"./index-HRJ6xRtC.js";const Ei="diffs-container",$r=(()=>{try{return!1}catch{return!1}})(),Wr=/(?=^From [a-f0-9]+ .+$)/m,Ti=/(?=^diff --git)/gm,Ul=/(?=^---\s+\S)/gm,Vl=/(?=^@@ )/gm,Gr=/^@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@(?: (.*))?/m,jr=/(?<=\n)/,qr=/^(---|\+\+\+)\s+([^\t\r\n]+)/,Kr=/^(---|\+\+\+)\s+[ab]\/([^\t\r\n]+)/,Yr=/^diff --git (?:"a\/(.+?)"|a\/(.+?)) (?:"b\/(.+?)"|b\/(.+?))$/,Xr=/^index ([0-9a-f]+)\.\.([0-9a-f]+)(?: (\d+))?$/i,Bl=/^<{7,}(?:\s.*)?$/,$l=/^\|{7,}(?:\s.*)?$/,Wl=/^={7,}$/,Gl=/^>{7,}(?:\s.*)?$/,on="header-prefix",sn="header-metadata",an="header-custom",_={dark:"pierre-dark",light:"pierre-light"},Ii="data-theme-css",Ri="data-unsafe-css",Qr="data-core-css",Jr="data-diffs-scrollbar-measure",Ai="--diffs-scrollbar-gutter-measured",jl=1,Zr=1e5,ln={hunkLineCount:50,lineHeight:20,diffHeaderHeight:44,spacing:8},_e={...ln,hunkLineCount:1},eo={paddingTop:8,paddingBottom:8,gap:8},to={omega:.015,positionEpsilon:.5,velocityEpsilon:.05},no=Object.freeze({fromStart:0,fromEnd:0}),Ae={startingLine:0,totalLines:1/0,bufferBefore:0,bufferAfter:0},Hi={startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:0},Ie=new Set;let Re=null;function Y(e){Ie.add(e),Re??=requestAnimationFrame(Mi)}function io(e){Ie.delete(e),Ie.size===0&&Re!=null&&(cancelAnimationFrame(Re),Re=null)}function Mi(e){const t=new Set(Ie);Ie.clear();for(const n of t)try{n(e)}catch(i){console.error(i)}Ie.size>0?Re=requestAnimationFrame(Mi):Re=null}function He(e,t,n){if(e===t||e==null||t==null)return e===t;const i=new Set(n),r=Object.keys(e),o=new Set(Object.keys(t));for(const s of r)if(o.delete(s),!i.has(s)&&(!(s in t)||e[s]!==t[s]))return!1;for(const s of Array.from(o))if(!i.has(s))return!1;return!0}function De(e,t){return e==null||t==null||typeof e=="string"||typeof t=="string"?e===t:e.dark===t.dark&&e.light===t.light}function dn(e,t){const n=e?.theme??_,i=t?.theme??_,r=kn(e),o=kn(t);return De(n,i)&&He(e,t,["theme","parseDiffOptions"])&&He(r,o)}function kn(e){if(e!=null&&"parseDiffOptions"in e)return e.parseDiffOptions}function Wt(e,t){return e?.start===t?.start&&e?.end===t?.end&&e?.side===t?.side&&e?.endSide===t?.endSide}function Gt({scrollTop:e,scrollHeight:t,height:n,fitPerfectly:i=!1,fitPerfectlyOverscroll:r=0,overscrollSize:o}){const s=n+o*2,l=i?n+r*2:s;if(t=Math.max(t,l),s>=t||i){const h=Math.max(e-r,0),c=Math.min(e+l,t);return{top:h,bottom:Math.max(c,h)}}let a=e+n/2-s/2,d=a+s;return a<0&&(a=0),d>t&&(d=t),a=Math.floor(Math.max(a,0)),{top:a,bottom:Math.ceil(Math.max(Math.min(d,t),a))}}function ro(){return typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches}function W(e){return{type:"text",value:e}}function A({tagName:e,children:t=[],properties:n={}}){return{type:"element",tagName:e,properties:n,children:t}}function pt({name:e,width:t=16,height:n=16,properties:i}){return A({tagName:"svg",properties:{width:t,height:n,viewBox:"0 0 16 16",...i},children:[A({tagName:"use",properties:{href:`#${e.replace(/^#/,"")}`}})]})}function oo(e){let t=e.children[0];for(;t!=null;){if(t.type==="element"&&t.tagName==="code")return t;"children"in t?t=t.children[0]:t=null}}function Ee(e){return A({tagName:"div",properties:{"data-gutter":""},children:e})}function Di(e,t,n,i={}){return A({tagName:"div",properties:{"data-line-type":e,"data-column-number":t,"data-line-index":n,...i},children:t!=null?[A({tagName:"span",properties:{"data-line-number-content":""},children:[W(`${t}`)]})]:void 0})}function j(e,t,n){return A({tagName:"div",properties:{"data-gutter-buffer":t,"data-buffer-size":n,"data-line-type":t==="annotation"?void 0:e,style:t==="annotation"?`grid-row: span ${n};`:`grid-row: span ${n};min-height:calc(${n} * 1lh);`}})}function so(){return A({tagName:"button",properties:{"data-utility-button":"",type:"button"},children:[pt({name:"diffs-icon-plus",properties:{"data-icon":""}})]})}function ao(e,t){return e.lineNumber===t.lineNumber&&e.side===t.side}var Pi=class{mode;options;hoveredLine;hoveredToken;pre;gutterUtilityLine;gutterUtilityContainer;gutterUtilityButton;gutterUtilitySlot;interactiveLinesAttr=!1;interactiveLineNumbersAttr=!1;hasPointerListeners=!1;hasDocumentPointerListeners=!1;selectedRange=null;proposedSelectedRange;renderedSelectionRange;selectionAnchor;queuedSelectionRender;pointerSession={mode:"idle"};constructor(e,t){this.mode=e,this.options=t}setOptions(e){this.options=e}cleanUp(){this.pre?.removeEventListener("click",this.handlePointerClick),this.pre?.removeEventListener("pointerdown",this.handlePointerDown),this.pre?.removeEventListener("pointermove",this.handlePointerMove),this.pre?.removeEventListener("pointerleave",this.handlePointerLeave),this.pre?.removeAttribute("data-interactive-lines"),this.pre?.removeAttribute("data-interactive-line-numbers"),this.pre=void 0,this.gutterUtilityContainer?.remove(),this.gutterUtilityLine=void 0,this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.clearHoveredLine(),this.clearHoveredToken(),this.detachDocumentPointerListeners(),this.clearPointerSession(),this.queuedSelectionRender!=null&&(cancelAnimationFrame(this.queuedSelectionRender),this.queuedSelectionRender=void 0),this.interactiveLinesAttr=!1,this.interactiveLineNumbersAttr=!1,this.hasPointerListeners=!1}setup(e){this.setSelectionDirty();const{usesCustomGutterUtility:t=!1,enableGutterUtility:n=!1}=this.options;this.pre!==e&&(this.cleanUp(),this.pre=e),n?this.ensureGutterUtilityNode(t):this.gutterUtilityContainer!=null&&(this.gutterUtilityContainer.remove(),this.gutterUtilityLine=void 0,this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.pointerSession.mode==="gutterSelecting"&&(this.clearPointerSession(),this.detachDocumentPointerListeners())),this.syncPointerListeners(e),this.updateInteractiveLineAttributes(),this.renderSelection(),this.placeUtility()}setSelectionDirty(){this.renderedSelectionRange=void 0}isSelectionDirty(){return this.renderedSelectionRange===null}setSelection(e,t){const n=!(e===this.selectedRange||Wt(e??void 0,this.selectedRange??void 0));!this.isSelectionDirty()&&!n||(this.proposedSelectedRange=void 0,this.selectedRange=e,this.renderSelection(),this.placeUtility(),n&&t?.notify!==!1&&this.notifySelectionCommitted())}getSelection(){return this.selectedRange}getHoveredLine=()=>{const e=this.gutterUtilityLine??this.hoveredLine;if(e!=null){if(this.mode==="diff"&&e.type==="diff-line")return{lineNumber:e.lineNumber,side:e.annotationSide};if(this.mode==="file"&&e.type==="line")return{lineNumber:e.lineNumber}}};handlePointerClick=e=>{const{onHunkExpand:t,onLineClick:n,onLineNumberClick:i,onTokenClick:r,onMergeConflictActionClick:o}=this.options;t==null&&n==null&&i==null&&o==null&&r==null||this.options.onGutterUtilityClick!=null&&et(e.composedPath())||(he(this.options.__debugPointerEvents,"click","FileDiff.DEBUG.handlePointerClick:",e),this.handlePointerEvent({eventType:"click",event:e}))};handlePointerMove=e=>{if(e.pointerType!=="mouse")return;const{lineHoverHighlight:t="disabled",onLineEnter:n,onLineLeave:i,onTokenEnter:r,onTokenLeave:o,enableGutterUtility:s=!1}=this.options;t==="disabled"&&!s&&n==null&&i==null&&r==null&&o==null||(he(this.options.__debugPointerEvents,"move","FileDiff.DEBUG.handlePointerMove:",e),this.handlePointerEvent({eventType:"move",event:e}))};handlePointerLeave=e=>{const{__debugPointerEvents:t}=this.options;if(he(t,"move","FileDiff.DEBUG.handlePointerLeave: no event"),this.hoveredLine==null&&this.hoveredToken==null){he(t,"move","FileDiff.DEBUG.handlePointerLeave: returned early, no hovered line or token");return}this.hoveredToken!=null&&(this.options.onTokenLeave?.(this.hoveredToken,e),this.clearHoveredToken()),this.hoveredLine!=null&&(this.options.onLineLeave?.({...this.hoveredLine,event:e}),this.clearHoveredLine()),this.placeUtility()};handlePointerEvent({eventType:e,event:t}){const{__debugPointerEvents:n}=this.options,i=t.composedPath();he(n,e,"FileDiff.DEBUG.handlePointerEvent:",{eventType:e,composedPath:i});const r=this.resolvePointerTarget(i);he(n,e,"FileDiff.DEBUG.handlePointerEvent: resolvePointerTarget result:",r);const{onLineClick:o,onLineNumberClick:s,onLineEnter:l,onLineLeave:a,onTokenClick:d,onTokenEnter:h,onTokenLeave:c,onHunkExpand:u,onMergeConflictActionClick:f}=this.options;switch(e){case"move":{const g=Tt(r)&&this.hoveredLine?.lineElement===r.lineElement;ut(r)&&this.hoveredToken?.tokenElement===r.tokenElement||(this.hoveredToken!=null&&(c?.(this.hoveredToken,t),this.clearHoveredToken()),ut(r)&&(this.setHoveredToken(this.toTokenEventBaseProps(r)),h?.(this.hoveredToken,t))),g||(this.hoveredLine!=null&&(a?.({...this.hoveredLine,event:t}),this.clearHoveredLine()),Tt(r)?(this.setHoveredLine(this.toEventBaseProps(r)),this.placeUtility(),l?.({...this.hoveredLine,event:t})):this.placeUtility());break}case"click":{if(r==null)break;if(co(r)&&f!=null){f(r);break}if(ho(r)&&u!=null){u(r.hunkIndex,r.all||t.shiftKey?"both":r.direction,r.all||t.shiftKey?Number.POSITIVE_INFINITY:void 0);break}if(!Tt(r))break;ut(r)&&d!=null&&d(this.toTokenEventBaseProps(r),t);const g=this.toEventBaseProps(r);s!=null&&r.numberColumn?s({...g,event:t}):o?.({...g,event:t});break}}}syncPointerListeners(e){const{__debugPointerEvents:t,lineHoverHighlight:n="disabled",onLineClick:i,onLineNumberClick:r,onLineEnter:o,onLineLeave:s,onTokenClick:l,onTokenEnter:a,onTokenLeave:d,onHunkExpand:h,onMergeConflictActionClick:c,enableGutterUtility:u=!1,enableLineSelection:f=!1,onGutterUtilityClick:g}=this.options,b=g!=null,y=n!=="disabled"||i!=null||r!=null||o!=null||s!=null||l!=null||a!=null||d!=null||h!=null||c!=null||u||f||b;y&&!this.hasPointerListeners?(e.addEventListener("click",this.handlePointerClick),e.addEventListener("pointerdown",this.handlePointerDown),e.addEventListener("pointermove",this.handlePointerMove),e.addEventListener("pointerleave",this.handlePointerLeave),this.hasPointerListeners=!0,he(t,"click","FileDiff.DEBUG.attachEventListeners: Attaching click events for:",(()=>{const C=[];return(t==="both"||t==="click")&&(i!=null&&C.push("onLineClick"),r!=null&&C.push("onLineNumberClick"),h!=null&&C.push("expandable hunk separators"),c!=null&&C.push("merge conflict actions")),C})()),he(t,"move","FileDiff.DEBUG.attachEventListeners: Attaching pointer move event"),he(t,"move","FileDiff.DEBUG.attachEventListeners: Attaching pointer leave event")):!y&&this.hasPointerListeners&&(e.removeEventListener("click",this.handlePointerClick),e.removeEventListener("pointerdown",this.handlePointerDown),e.removeEventListener("pointermove",this.handlePointerMove),e.removeEventListener("pointerleave",this.handlePointerLeave),this.hasPointerListeners=!1);const m=this.pointerSession.mode==="selecting"||this.pointerSession.mode==="pendingSingleLineUnselect",p=this.pointerSession.mode==="gutterSelecting";(!f&&m||!b&&p)&&(this.clearPointerSession(),this.detachDocumentPointerListeners(),this.selectionAnchor=void 0,this.clearPendingSingleLineState())}updateInteractiveLineAttributes(){if(this.pre==null)return;const{onLineClick:e,onLineNumberClick:t,enableLineSelection:n=!1}=this.options,i=e!=null,r=t!=null||n;i&&!this.interactiveLinesAttr?(this.pre.setAttribute("data-interactive-lines",""),this.interactiveLinesAttr=!0):!i&&this.interactiveLinesAttr&&(this.pre.removeAttribute("data-interactive-lines"),this.interactiveLinesAttr=!1),r&&!this.interactiveLineNumbersAttr?(this.pre.setAttribute("data-interactive-line-numbers",""),this.interactiveLineNumbersAttr=!0):!r&&this.interactiveLineNumbersAttr&&(this.pre.removeAttribute("data-interactive-line-numbers"),this.interactiveLineNumbersAttr=!1)}handlePointerDown=e=>{if(e.pointerType==="mouse"&&e.button!==0||this.pre==null||this.pointerSession.mode!=="idle")return;const t=e.composedPath();et(t)&&this.options.onGutterUtilityClick!=null?this.startGutterSelectionFromPointerDown(e):(e.pointerType!=="mouse"&&this.revealUtilityFromGutterPath(t),this.startLineSelectionFromPointerDown(e))};startLineSelectionFromPointerDown(e){const{enableLineSelection:t=!1}=this.options;if(!t)return;const n=this.resolveSelectionInfo(e,{source:"event-path",requireNumberColumn:!0});if(n==null)return;const{pre:i}=this;if(i==null)return;const{lineNumber:r,eventSide:o,lineIndex:s}=n;if(e.shiftKey&&this.selectedRange!=null){const l=this.getIndexesFromSelection(this.selectedRange,i.getAttribute("data-diff-type")==="split");if(l==null)return;const a=l.start<=l.end?s>=l.start:s<=l.end;this.selectionAnchor={lineNumber:a?this.selectedRange.start:this.selectedRange.end,side:a?this.selectedRange.side:this.selectedRange.endSide??this.selectedRange.side},this.updateSelection(r,o,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:"selecting",pointerId:e.pointerId},this.attachDocumentPointerListeners();return}if(this.selectedRange?.start===r&&this.selectedRange?.end===r){const l={lineNumber:r,side:o};this.selectionAnchor=l,this.pointerSession={mode:"pendingSingleLineUnselect",pointerId:e.pointerId,anchor:l,pending:l},this.attachDocumentPointerListeners();return}this.options.controlledSelection===!0?this.proposedSelectedRange=null:this.selectedRange=null,this.placeUtility(),this.selectionAnchor={lineNumber:r,side:o},this.updateSelection(r,o,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:"selecting",pointerId:e.pointerId},this.attachDocumentPointerListeners()}startGutterSelectionFromPointerDown(e){const{enableLineSelection:t=!1,onGutterUtilityClick:n}=this.options;if(n==null)return;const i=this.currentSelectionEnds(),r=i?.bottom??this.resolveSelectionPoint(e,{source:"event-path",excludeUtility:!1}),o=i?.top??r;r==null||o==null||(e.preventDefault(),e.stopPropagation(),this.pointerSession={mode:"gutterSelecting",pointerId:e.pointerId,anchor:o,current:r},t&&(this.selectionAnchor={lineNumber:o.lineNumber,side:o.side},this.updateSelection(r.lineNumber,r.side,!1),this.notifySelectionStart(this.getCurrentSelectionRange())),this.attachDocumentPointerListeners())}handleDocumentPointerMove=e=>{const{enableLineSelection:t=!1}=this.options;switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const n=this.resolveSelectionPoint(e,{source:"coordinates-first"});if(n==null)return;this.pointerSession.current=n,t===!0&&this.updateSelection(n.lineNumber,n.side);return}case"selecting":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const n=this.resolveSelectionInfo(e,{source:"coordinates-first",requireNumberColumn:!1});if(n==null||this.selectionAnchor==null)return;this.updateSelection(n.lineNumber,n.eventSide);return}case"pendingSingleLineUnselect":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const n=this.resolveSelectionInfo(e,{source:"coordinates-first",requireNumberColumn:!1});if(n==null||this.selectionAnchor==null)return;const i={lineNumber:n.lineNumber,side:n.eventSide};if(ao(this.pointerSession.pending,i))return;this.updateSelection(n.lineNumber,n.eventSide,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.notifySelectionChangeDelta(),this.pointerSession={mode:"selecting",pointerId:e.pointerId};return}}};handleDocumentPointerUp=e=>{const{enableLineSelection:t=!1,onGutterUtilityClick:n}=this.options;switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const i=this.resolveSelectionPoint(e,{source:"coordinates-first"});i!=null&&(this.pointerSession.current=i,t&&this.updateSelection(i.lineNumber,i.side)),n?.(this.buildSelectedLineRange(this.pointerSession.anchor,this.pointerSession.current)),this.selectionAnchor=void 0,t&&(this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(),this.clearProposedSelection()),this.clearPointerSession(),this.detachDocumentPointerListeners();return}case"pendingSingleLineUnselect":if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault(),this.updateSelection(null,void 0,!1),this.selectionAnchor=void 0,this.clearPendingSingleLineState(),this.detachDocumentPointerListeners(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(),this.clearProposedSelection();return;case"selecting":if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault(),this.selectionAnchor=void 0,this.detachDocumentPointerListeners(),this.clearPointerSession(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(),this.clearProposedSelection()}};handleDocumentPointerCancel=e=>{switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":case"selecting":case"pendingSingleLineUnselect":if("pointerId"in this.pointerSession&&e.pointerId!==this.pointerSession.pointerId)return;this.selectionAnchor=void 0,this.clearProposedSelection(),this.clearPendingSingleLineState(),this.clearPointerSession(),this.detachDocumentPointerListeners()}};clearHoveredLine(){this.hoveredLine!=null&&(this.hoveredLine.lineElement.removeAttribute("data-hovered"),this.hoveredLine.numberElement.removeAttribute("data-hovered"),this.hoveredLine=void 0)}setHoveredLine(e){const{lineHoverHighlight:t="disabled"}=this.options;this.hoveredLine!=null&&this.clearHoveredLine(),this.hoveredLine=e,t!=="disabled"&&((t==="both"||t==="line")&&this.hoveredLine.lineElement.setAttribute("data-hovered",""),(t==="both"||t==="number")&&this.hoveredLine.numberElement.setAttribute("data-hovered",""))}clearHoveredToken(){this.hoveredToken!=null&&(this.hoveredToken=void 0)}setHoveredToken(e){this.hoveredToken!=null&&this.clearHoveredToken(),this.hoveredToken=e}ensureGutterUtilityNode(e){if(this.gutterUtilityContainer==null&&(this.gutterUtilityContainer=document.createElement("div"),this.gutterUtilityContainer.setAttribute("data-gutter-utility-slot","")),e)this.gutterUtilityButton!=null&&(this.gutterUtilityButton.remove(),this.gutterUtilityButton=void 0),this.gutterUtilitySlot==null&&(this.gutterUtilitySlot=document.createElement("slot"),this.gutterUtilitySlot.name="gutter-utility-slot"),this.gutterUtilitySlot.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilitySlot);else{if(this.gutterUtilitySlot?.remove(),this.gutterUtilitySlot=void 0,this.gutterUtilityButton==null){const t=document.createElement("div");t.innerHTML=pe(so());const n=t.firstElementChild;if(!(n instanceof HTMLButtonElement))throw new Error("InteractionManager.ensureGutterUtilityNode: Node element should be a button");n.remove(),this.gutterUtilityButton=n}this.gutterUtilityButton.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilityButton)}}revealUtilityFromGutterPath(e){if(this.placeUtilityFromSelection())return;const t=this.resolvePointerTarget(e);Ve(t)&&t.numberColumn&&this.showUtilityOnLine(this.toEventBaseProps(t))}placeUtility(){if(!this.placeUtilityFromSelection()){if(this.hoveredLine!=null){this.showUtilityOnLine(this.hoveredLine);return}this.hideUtility()}}placeUtilityFromSelection(){const e=this.currentSelectionEnds();if(e==null)return!1;const t=this.targetForSelectionPoint(e.bottom);return t==null?this.hideUtility():this.showUtilityOnLine(this.toEventBaseProps(t)),!0}showUtilityOnLine(e){this.gutterUtilityContainer!=null&&(this.gutterUtilityLine=e,e.numberElement.appendChild(this.gutterUtilityContainer))}hideUtility(){this.gutterUtilityContainer?.remove(),this.gutterUtilityLine=void 0}currentSelectionEnds(){const e=this.getCurrentSelectionRange();return e==null?void 0:this.selectionEnds(e)}selectionEnds(e){const t={lineNumber:e.start,side:e.side},n={lineNumber:e.end,side:e.endSide??e.side},i=this.selectionPointRowIndex(t),r=this.selectionPointRowIndex(n);if(!(i==null||r==null))return i>r?{top:n,bottom:t}:{top:t,bottom:n}}selectionPointRowIndex(e){const t=this.getLineIndex(e.lineNumber,e.side);if(t!=null)return this.isSplitDiff()?t[1]:t[0]}targetForSelectionPoint(e){if(this.pre==null)return;const t=this.getLineIndex(e.lineNumber,e.side);if(t==null)return;const n=this.mode==="diff"?`${t[0]},${t[1]}`:`${t[0]}`,i=this.pre.querySelectorAll(`[data-column-number="${e.lineNumber}"][data-line-index="${n}"]`);for(const r of i){if(!(r instanceof HTMLElement))continue;const o=this.resolvePointerTarget(Ze(r));if(Ve(o)&&!(this.mode==="diff"&&e.side!=null&&o.side!==e.side))return o}}attachDocumentPointerListeners(){this.hasDocumentPointerListeners||(document.addEventListener("pointermove",this.handleDocumentPointerMove),document.addEventListener("pointerup",this.handleDocumentPointerUp),document.addEventListener("pointercancel",this.handleDocumentPointerCancel),this.hasDocumentPointerListeners=!0)}detachDocumentPointerListeners(){this.hasDocumentPointerListeners&&(document.removeEventListener("pointermove",this.handleDocumentPointerMove),document.removeEventListener("pointerup",this.handleDocumentPointerUp),document.removeEventListener("pointercancel",this.handleDocumentPointerCancel),this.hasDocumentPointerListeners=!1)}clearPointerSession(){this.pointerSession={mode:"idle"}}clearPendingSingleLineState(){this.pointerSession.mode==="pendingSingleLineUnselect"&&(this.pointerSession={mode:"idle"})}selectionInfoFromPath(e,t){const n=this.resolvePointerTarget(e);if(Ve(n)&&!(t&&!n.numberColumn)&&n.splitLineIndex!=null)return{lineIndex:n.splitLineIndex,lineNumber:n.lineNumber,eventSide:this.mode==="diff"?n.side:void 0}}resolveSelectionInfo(e,t){const n=this.resolveSelectionPath(e,t);return n!=null?this.selectionInfoFromPath(n,t.requireNumberColumn):void 0}selectionPointFromPath(e){const t=this.resolvePointerTarget(e);if(Ve(t))return{lineNumber:t.lineNumber,side:this.mode==="diff"?t.side:void 0}}resolveSelectionPoint(e,t){const n=this.resolveSelectionPath(e,t);return n!=null?this.selectionPointFromPath(n):void 0}resolveSelectionPath(e,t){const n=t.excludeUtility!==!1;switch(t.source){case"event-path":return this.pathFromEventPath(e.composedPath(),n);case"coordinates-first":{const i=this.pathFromCoordinates(e,n);return i!==void 0?i??void 0:this.pathFromEventPath(e.composedPath(),n)}}}pathFromCoordinates(e,t){const n=this.hitTest(e);if(n!==void 0)return n===null?null:this.pathFromElement(n,t)??null}pathFromEventPath(e,t){if(!(t&&et(e))){for(const n of e)if(n instanceof Element)return this.pathFromElement(n,t)}}pathFromElement(e,t){const n=Ze(e);if(t&&et(n))return;const i=fo(e);return i!=null?Ze(i):this.pathFromAnnotationSlot(e)}pathFromAnnotationSlot(e){const t=go(po(e));if(t==null)return;const n=this.targetForSelectionPoint(t);return n!=null?Ze(n.lineElement):void 0}hitTest(e){if(!Number.isFinite(e.clientX)||!Number.isFinite(e.clientY))return;const t=this.pre?.getRootNode(),n=En(t)?t:En(document)?document:void 0;if(n!=null)return n.elementFromPoint(e.clientX,e.clientY)}getLineIndex(e,t){const{getLineIndex:n}=this.options;return n!=null?n(e,t):[e-1,e-1]}getCurrentSelectionRange(){return this.proposedSelectedRange!==void 0?this.proposedSelectedRange:this.selectedRange}clearProposedSelection(){this.proposedSelectedRange=void 0}updateSelection(e,t,n=!0){const i=this.getCurrentSelectionRange();let r;if(e==null)r=null;else{const o=this.selectionAnchor?.side??t,s=this.selectionAnchor?.lineNumber??e;r=this.buildSelectionRange(s,e,o,t)}Wt(i??void 0,r??void 0)||(this.options.controlledSelection===!0?this.proposedSelectedRange=r:(this.selectedRange=r,this.queuedSelectionRender??=requestAnimationFrame(this.renderSelection)),this.placeUtility(),n&&this.notifySelectionChangeDelta())}getIndexesFromSelection(e,t){if(this.pre==null)return;const n=this.getLineIndex(e.start,e.side),i=this.getLineIndex(e.end,e.endSide??e.side);return n!=null&&i!=null?{start:t?n[1]:n[0],end:t?i[1]:i[0]}:void 0}renderSelection=()=>{if(this.queuedSelectionRender!=null&&(cancelAnimationFrame(this.queuedSelectionRender),this.queuedSelectionRender=void 0),this.pre==null||this.renderedSelectionRange===this.selectedRange)return;const e=this.pre.querySelectorAll("[data-selected-line]");for(const l of e)l.removeAttribute("data-selected-line");if(this.renderedSelectionRange=this.selectedRange,this.selectedRange==null)return;const{children:t}=this.pre;if(t.length===0)return;if(t.length>2)throw console.error(t),new Error("InteractionManager.renderSelection: Somehow there are more than 2 code elements...");const n=this.pre.getAttribute("data-diff-type")==="split",i=this.getIndexesFromSelection(this.selectedRange,n);if(i==null)throw console.error({rowRange:i,selectedRange:this.selectedRange}),new Error("InteractionManager.renderSelection: No valid rowRange");const r=i.start===i.end,o=Math.min(i.start,i.end),s=Math.max(i.start,i.end);for(const l of t){const[a,d]=l.children,h=d.children.length;if(h!==a.children.length)throw new Error("InteractionManager.renderSelection: gutter and content children dont match, something is wrong");for(let c=0;cs)break;if(g==null||gNumber.parseInt(i,10)).filter(i=>!Number.isNaN(i));if(t&&n.length===2)return n[1];if(!t)return n[0]}};function Ke({enableTokenInteractionsOnWhitespace:e,enableGutterUtility:t,lineHoverHighlight:n,onGutterUtilityClick:i,onLineClick:r,onLineEnter:o,onLineLeave:s,onLineNumberClick:l,onTokenClick:a,onTokenEnter:d,onTokenLeave:h,renderGutterUtility:c,__debugPointerEvents:u,enableLineSelection:f,controlledSelection:g,onLineSelected:b,onLineSelectionStart:y,onLineSelectionChange:m,onLineSelectionEnd:p},C,v,x){return{enableTokenInteractionsOnWhitespace:e,enableGutterUtility:lo({enableGutterUtility:t,renderGutterUtility:c,onGutterUtilityClick:i}),usesCustomGutterUtility:c!=null,lineHoverHighlight:n,onGutterUtilityClick:i,onHunkExpand:C,onMergeConflictActionClick:x,onLineClick:r,onLineEnter:o,onLineLeave:s,onLineNumberClick:l,onTokenClick:a,onTokenEnter:d,onTokenLeave:h,__debugPointerEvents:u,enableLineSelection:f,controlledSelection:g,onLineSelected:b,onLineSelectionStart:y,onLineSelectionChange:m,onLineSelectionEnd:p,getLineIndex:v}}function lo({enableGutterUtility:e,renderGutterUtility:t,onGutterUtilityClick:n}){if(n!=null&&t!=null)throw new Error("Cannot use both 'onGutterUtilityClick' and 'renderGutterUtility'. Use only one gutter utility API.");return e??!1}function Ve(e){return e!=null&&"kind"in e&&e.kind==="line"}function ut(e){return e!=null&&"kind"in e&&e.kind==="token"}function Tt(e){return Ve(e)||ut(e)}function ho(e){return"type"in e&&e.type==="line-info"}function co(e){return"kind"in e&&e.kind==="merge-conflict-action"}function uo(e){return e==="current"||e==="incoming"||e==="both"}function wn(e,t){const n=e?.querySelector(t);return n instanceof HTMLElement?n:void 0}function Ze(e){const t=[];let n=e;for(;n!=null;)t.push(n),n=n.parentNode;return t}function fo(e){const t=e.closest("[data-line], [data-column-number]");if(t instanceof HTMLElement)return t;const n=e.closest('[data-line-annotation], [data-gutter-buffer="annotation"]');if(!(n instanceof HTMLElement))return;const i=n.previousElementSibling;return i instanceof HTMLElement&&(i.hasAttribute("data-line")||i.hasAttribute("data-column-number"))?i:void 0}function po(e){const t=e.closest('[slot^="annotation-"]');if(t instanceof HTMLElement)return t.getAttribute("slot")??void 0;if(e instanceof HTMLElement){const n=e.getAttribute("name")??void 0;return n!=null&&n.startsWith("annotation-")?n:void 0}}function go(e){if(e==null)return;const t=/^annotation-(?:(additions|deletions)-)?(\d+)$/.exec(e);if(t==null)return;const n=Number.parseInt(t[2],10);if(!(!Number.isFinite(n)||n<=0))return{lineNumber:n,side:t[1]}}function En(e){return e!=null&&typeof e.elementFromPoint=="function"}function Tn(e,t){switch(e){case"change-deletion":return"deletions";case"change-addition":return"additions";default:return t.hasAttribute("data-deletions")?"deletions":"additions"}}function In(e){const t=e.getAttribute("data-line-type");if(t!=null)switch(t){case"change-deletion":case"change-addition":case"context":case"context-expanded":return t;default:return}}function et(e){for(const t of e)if(t instanceof HTMLElement&&(t.hasAttribute("data-utility-button")||t.hasAttribute("data-gutter-utility-slot")||t.getAttribute("slot")==="gutter-utility-slot"||t.getAttribute("name")==="gutter-utility-slot"))return!0;return!1}function he(e="none",t,...n){switch(e){case"none":return;case"both":break;case"click":if(t!=="click")return;break;case"move":if(t!=="move")return;break}console.log(...n)}var _i=class ue{static resizeObserver;static managersByElement=new Map;static getResizeObserver(){const t=ue.resizeObserver??new ResizeObserver(ue.handleSharedResizeEntries);return ue.resizeObserver=t,t}static handleSharedResizeEntries(t){const n=new Map;for(const i of t){const r=ue.managersByElement.get(i.target);if(r==null)continue;const o=n.get(r);o==null?n.set(r,[i]):o.push(i)}for(const[i,r]of n)i.handleResizeEntries(r)}observedNodes=new Map;setup(t,n){const i=new Set;let r=0;const o=new Map(this.observedNodes);this.observedNodes.clear();for(const s of t.children){if(r===2)break;const l=(()=>{if(s instanceof HTMLElement&&s.tagName==="CODE")return s})();if(l==null)continue;r++;let a=o.get(l);if(a!=null&&a.type!=="code")throw new Error("ResizeManager.setup: somehow a code node is being used for an annotation, should be impossible");let d=l.firstElementChild;d instanceof HTMLElement||(d=null),a!=null?(this.observedNodes.set(l,a),o.delete(l),a.numberElement!==d?(a.numberElement!=null&&(this.unobserve(a.numberElement),o.delete(a.numberElement)),d!=null&&(this.observe(d),o.delete(d),this.observedNodes.set(d,a)),a.numberElement=d,a.numberWidth=0):a.numberElement!=null?(o.delete(a.numberElement),this.observedNodes.set(a.numberElement,a)):a.numberWidth=0):(a={type:"code",codeElement:l,numberElement:d,codeWidth:"auto",numberWidth:0},this.observedNodes.set(l,a),this.observe(l),d!=null&&(this.observedNodes.set(d,a),this.observe(d)))}if(r>1&&!n){const s=t.querySelectorAll('[data-line-annotation*=","]'),l=new Map;for(const a of s){if(!(a instanceof HTMLElement))continue;const d=a.getAttribute("data-line-annotation")??"";if(!/^-?\d+,-?\d+$/.test(d)){console.error("DiffFileRenderer.setupResizeObserver: Invalid element or annotation",{lineAnnotation:d,element:a});continue}let h=l.get(d);h==null&&(h=[],l.set(d,h)),h.push(a)}for(const[a,d]of l){if(d.length!==2){console.error("DiffFileRenderer.setupResizeObserver: Bad Pair",a,d);continue}const[h,c]=d,u=h.firstElementChild,f=c.firstElementChild;if(!(h instanceof HTMLElement)||!(c instanceof HTMLElement)||!(u instanceof HTMLElement)||!(f instanceof HTMLElement))continue;let g=o.get(u);if(g!=null){this.observedNodes.set(u,g),this.observedNodes.set(f,g),o.delete(u),o.delete(f);continue}const b=u.getBoundingClientRect().height,y=f.getBoundingClientRect().height;g={type:"annotations",column1:{container:h,child:u,childHeight:b},column2:{container:c,child:f,childHeight:y},currentHeight:"auto"},i.add({child1:u,child2:f,item:g,newHeight:Math.max(b,y)})}for(const a of i)this.applyNewHeight(a.item,a.newHeight),this.observedNodes.set(a.child1,a.item),this.observedNodes.set(a.child2,a.item),this.observe(a.child1),this.observe(a.child2);i.clear()}for(const[s,l]of o)this.unobserve(s),l.type==="code"?bo(l):Co(l);o.clear()}cleanUp(){for(const t of this.observedNodes.keys())this.unobserve(t);this.observedNodes.clear()}observe(t){const{managersByElement:n}=ue,i=n.get(t);if(i!==this){if(i!=null&&i!==this)throw new Error("ResizeManager.observe: element is already owned by another ResizeManager");n.set(t,this),ue.getResizeObserver().observe(t)}}unobserve(t){const{managersByElement:n,resizeObserver:i}=ue,r=n.get(t);if(r!=null){if(r!==this)throw new Error("ResizeManager.unobserve: element is owned by another ResizeManager");n.delete(t),i?.unobserve(t),i!=null&&n.size===0&&(i.disconnect(),ue.resizeObserver=void 0)}}handleResizeEntries(t){const n=new Map,i=new Set;for(const r of t){const{target:o,borderBoxSize:s,contentBoxSize:l}=r;if(!(o instanceof HTMLElement)){console.error("ResizeManager.handleResizeEntries: Invalid element for ResizeObserver",r);continue}const a=this.observedNodes.get(o);if(a==null){console.error("ResizeManager.handleResizeEntries: Not a valid observed node",r);continue}if(a.type==="annotations"){const d=(()=>{if(o===a.column1.child)return a.column1;if(o===a.column2.child)return a.column2})();if(d==null){console.error("ResizeManager.handleResizeEntries: Couldn't find a column for",{item:a,target:o});continue}d.childHeight=s[0].blockSize,i.add(a)}else if(a.type==="code"){const d=n.get(a)??{},h=l[0].inlineSize;o===a.codeElement?d.codeInlineSize=h:o===a.numberElement&&(d.numberInlineSize=h),n.set(a,d)}}this.applyAnnotationUpdates(i),i.clear(),this.applyColumnUpdates(n),n.clear()}applyAnnotationUpdates(t){for(const n of t)this.applyNewHeight(n,Math.max(n.column1.childHeight,n.column2.childHeight))}applyColumnUpdates=t=>{for(const[n,i]of t){const r=i.codeInlineSize!=null?mo(i.codeInlineSize):n.codeWidth,o=i.numberInlineSize!=null?vo(i.numberInlineSize):n.numberWidth,s=r!==n.codeWidth,l=o!==n.numberWidth;if(!(!s&&!l)&&(n.codeWidth=r,n.numberWidth=o,s&&n.codeElement.style.setProperty("--diffs-column-width",`${typeof r=="number"?`${r}px`:"auto"}`),l&&n.codeElement.style.setProperty("--diffs-column-number-width",`${o===0?"auto":`${o}px`}`),s||l&&r!=="auto")){const a=typeof r=="number"?Math.max(r-o,0):0;n.codeElement.style.setProperty("--diffs-column-content-width",`${a>0?`${a}px`:"auto"}`)}}};applyNewHeight(t,n){n!==t.currentHeight&&(t.currentHeight=Math.max(n,0),t.column1.container.style.setProperty("--diffs-annotation-min-height",`${t.currentHeight}px`),t.column2.container.style.setProperty("--diffs-annotation-min-height",`${t.currentHeight}px`))}};function mo(e){const t=Math.max(Math.floor(e),0);return t===0?"auto":t}function vo(e){return Math.max(Math.ceil(e),0)}function bo(e){e.codeElement.isConnected&&(e.codeElement.style.removeProperty("--diffs-column-content-width"),e.codeElement.style.removeProperty("--diffs-column-number-width"),e.codeElement.style.removeProperty("--diffs-column-width"))}function Co(e){e.column1.container.isConnected&&e.column1.container.style.removeProperty("--diffs-annotation-min-height"),e.column2.container.isConnected&&e.column2.container.style.removeProperty("--diffs-annotation-min-height")}const Se=new Map,It=new Map,jt=new Map,gt=new Set;function mt(e){for(const t of Array.isArray(e)?e:[e])if(!(t==="text"||t==="ansi")&&!gt.has(t))return!1;return!0}function Rn(e,t){e=Array.isArray(e)?e:[e];for(const n of e){if(gt.has(n.name))continue;let i=Se.get(n.name);i==null&&(i=n,Se.set(n.name,i)),gt.add(i.name),t.loadLanguageSync(i.data)}}function So(){Se.clear(),gt.clear()}function Oi(){return typeof WorkerGlobalScope<"u"&&typeof self<"u"&&self instanceof WorkerGlobalScope}async function Ni(e){if(Oi())throw new Error(`resolveLanguage("${e}") cannot be called from a worker context. Languages must be pre-resolved on the main thread and passed to the worker via the resolvedLanguages parameter.`);const t=It.get(e);if(t!=null)return t;try{let n=jt.get(e);if(n==null&&Object.prototype.hasOwnProperty.call(Ln,e)&&(n=Ln[e]),n==null)throw new Error(`resolveLanguage: "${e}" not found in bundled or custom languages`);const i=n().then(({default:r})=>{const o={name:e,data:r};return Se.has(e)||Se.set(e,o),o});return It.set(e,i),await i}finally{It.delete(e)}}function Fi(e){return Se.get(e)??Ni(e)}const vt=new Set;function Ye(e){const t=[],n=new Set;for(const c of yo(e.themes)){const u=zi(c)?c.getThemes():[c];for(const f of u){if(n.has(f.name))throw new Error(`Theme collection already contains theme "${f.name}"`);n.add(f.name),t.push(f)}}const i=Object.freeze([...t]),r=Object.freeze(i.filter(c=>c.colorScheme==="light")),o=Object.freeze(i.filter(c=>c.colorScheme==="dark")),s=new Map(i.map(c=>[c.name,c])),l=Object.freeze(i.map(c=>c.name)),a=Object.freeze(r.map(c=>c.name)),d=Object.freeze(o.map(c=>c.name));function h(c){if(c==null)return i;const{colorScheme:u,collection:f}=c;return f==null?u==="light"?r:u==="dark"?o:i:i.filter(g=>g.collection!==f?!1:u==null||g.colorScheme===u)}return{getTheme(c){return s.get(c)},getThemes(c){return h(c)},getThemeNames(c){return c?.collection==null?c?.colorScheme==="light"?a:c?.colorScheme==="dark"?d:l:h(c).map(u=>u.name)},hasTheme(c){return s.has(c)},orderBy(c){return Ye({themes:i.map((u,f)=>({descriptor:u,index:f})).sort((u,f)=>{const g=c(u.descriptor,f.descriptor);return g!==0?g:u.index-f.index}).map(u=>u.descriptor)})},pick(c){const u=[],f=new Set;for(const g of c){if(f.has(g))throw new Error(`Theme collection pick already includes theme "${g}"`);f.add(g);const b=s.get(g);if(b==null)throw new Error(`Theme collection does not contain theme "${g}"`);u.push(b)}return Ye({themes:u})},registerInto(c){for(const u of i)c.registerThemeIfAbsent(u.name,u.load)}}}function yo(e){return xo(e)?[e]:e}function xo(e){return zi(e)||Lo(e)}function Lo(e){return typeof e.name=="string"&&typeof e.load=="function"}function zi(e){return typeof e.getThemes=="function"}function Ui(e){return e!==null&&typeof e=="object"&&"default"in e?e.default:e}var Vi=class extends Error{constructor(e){super(`Theme "${e}" is already registered`),this.name="DuplicateThemeError"}},ko=class extends Error{constructor(e){super(`No loader registered for theme "${e}"`),this.name="UnregisteredThemeError"}},wo=class extends Error{constructor(e){super(`Theme "${e}" has not been resolved`),this.name="UnresolvedThemeError"}};function Eo(){const e=new Map,t=new Map,n=new Map;let i=0;function r(m,p){if(e.has(m))throw new Vi(m);e.set(m,p)}function o(m,p){return e.has(m)?!1:(e.set(m,p),!0)}function s(m){return e.has(m)}function l(m){const p=t.get(m);if(p!==void 0)return Promise.resolve(p);const C=n.get(m);if(C!==void 0)return C;const v=e.get(m);if(v===void 0)return Promise.reject(new ko(m));const x=i,S=v().then(L=>{const E=Ui(L);return x===i&&t.set(m,E),n.get(m)===S&&n.delete(m),E}).catch(L=>{throw n.get(m)===S&&n.delete(m),L});return n.set(m,S),S}function a(m){return Promise.all(m.map(p=>l(p)))}function d(m,p){t.set(m,p)}function h(m){for(const[p,C]of m)d(p,C)}function c(m){return t.get(m)}function u(m){const p=[];for(const C of m){const v=t.get(C);if(v===void 0)throw new wo(C);p.push(v)}return p}function f(m){return t.has(m)}function g(m){for(const p of m)if(!t.has(p))return!1;return!0}function b(m){const p=t.get(m);return p!==void 0?p:l(m)}function y(){i++,t.clear(),n.clear()}return{clearResolvedThemes:y,getResolvedOrResolveTheme:b,getResolvedTheme:c,getResolvedThemes:u,hasRegisteredTheme:s,hasResolvedTheme:f,hasResolvedThemes:g,registerTheme:r,registerThemeIfAbsent:o,resolveTheme:l,resolveThemes:a,seedResolvedTheme:d,seedResolvedThemes:h}}const X=Eo();function An(e,t){e=Array.isArray(e)?e:[e];for(let n of e){let i;if(typeof n=="string"){if(i=X.getResolvedTheme(n),i==null)throw new Error(`loadResolvedThemes: ${n} is not resolved, you must resolve it before calling loadResolvedThemes`)}else i=n,n=n.name,X.getResolvedTheme(n)==null&&X.seedResolvedTheme(n,i);vt.has(n)||(vt.add(n),t.loadThemeSync(i))}}function To(){X.clearResolvedThemes(),vt.clear()}function hn({name:e,load:t,colorScheme:n,collection:i,displayName:r}){return{name:e,colorScheme:n,collection:i,displayName:r,load:Io(t)}}function Io(e){return async()=>Or(Ui(await e()))}const Ro="pierre",Ao=["pierre-dark","pierre-dark-soft","pierre-dark-vibrant","pierre-dark-protanopia-deuteranopia","pierre-dark-tritanopia"],Bi=["pierre-light","pierre-light-soft","pierre-light-vibrant","pierre-light-protanopia-deuteranopia","pierre-light-tritanopia"],Ho=[...Bi,...Ao],Mo=new Set(Bi);function Do(e){return Mo.has(e)?"light":"dark"}const Po={"pierre-dark":"Pierre Dark","pierre-dark-soft":"Pierre Dark Soft","pierre-dark-vibrant":"Pierre Dark Vibrant","pierre-dark-protanopia-deuteranopia":"Pierre Dark Protanopia & Deuteranopia","pierre-dark-tritanopia":"Pierre Dark Tritanopia","pierre-light":"Pierre Light","pierre-light-soft":"Pierre Light Soft","pierre-light-vibrant":"Pierre Light Vibrant","pierre-light-protanopia-deuteranopia":"Pierre Light Protanopia & Deuteranopia","pierre-light-tritanopia":"Pierre Light Tritanopia"},_o={"pierre-dark":()=>k(()=>import("./pierre-dark-CyvmCCZW.js"),[]),"pierre-dark-soft":()=>k(()=>import("./pierre-dark-soft-BHGpRqa4.js"),[]),"pierre-dark-vibrant":()=>k(()=>import("./pierre-dark-vibrant-BWBVywrn.js"),[]),"pierre-dark-protanopia-deuteranopia":()=>k(()=>import("./pierre-dark-protanopia-deuteranopia-Rgc0TwpF.js"),[]),"pierre-dark-tritanopia":()=>k(()=>import("./pierre-dark-tritanopia-Beq2gCRQ.js"),[]),"pierre-light":()=>k(()=>import("./pierre-light-480U9XYS.js"),[]),"pierre-light-soft":()=>k(()=>import("./pierre-light-soft-CVdyfjmI.js"),[]),"pierre-light-vibrant":()=>k(()=>import("./pierre-light-vibrant-DdTDNdfJ.js"),[]),"pierre-light-protanopia-deuteranopia":()=>k(()=>import("./pierre-light-protanopia-deuteranopia-CaVOBURG.js"),[]),"pierre-light-tritanopia":()=>k(()=>import("./pierre-light-tritanopia-B4_gpKOM.js"),[])};function Oo(e){return hn({name:e,collection:Ro,colorScheme:Do(e),displayName:Po[e],load:_o[e]})}const $i=Ye({themes:Ho.map(e=>Oo(e))}),No="shiki",Wi=["ayu-light","catppuccin-latte","everforest-light","github-light","github-light-default","github-light-high-contrast","gruvbox-light-hard","gruvbox-light-medium","gruvbox-light-soft","horizon-bright","kanagawa-lotus","light-plus","material-theme-lighter","min-light","night-owl-light","one-light","rose-pine-dawn","slack-ochin","snazzy-light","solarized-light","vitesse-light"],Fo=["andromeeda","aurora-x","ayu-dark","ayu-mirage","catppuccin-frappe","catppuccin-macchiato","catppuccin-mocha","dark-plus","dracula","dracula-soft","everforest-dark","github-dark","github-dark-default","github-dark-dimmed","github-dark-high-contrast","gruvbox-dark-hard","gruvbox-dark-medium","gruvbox-dark-soft","horizon","houston","kanagawa-dragon","kanagawa-wave","laserwave","material-theme","material-theme-darker","material-theme-ocean","material-theme-palenight","min-dark","monokai","night-owl","nord","one-dark-pro","plastic","poimandres","red","rose-pine","rose-pine-moon","slack-dark","solarized-dark","synthwave-84","tokyo-night","vesper","vitesse-black","vitesse-dark"],zo=new Set(Wi);function Uo(e){return zo.has(e)?"light":"dark"}const Vo={andromeeda:()=>k(()=>import("./andromeeda-C4gqWexZ.js"),[]),"aurora-x":()=>k(()=>import("./aurora-x-D-2ljcwZ.js"),[]),"ayu-dark":()=>k(()=>import("./ayu-dark-DYE7WIF3.js"),[]),"ayu-light":()=>k(()=>import("./ayu-light-BA47KaF1.js"),[]),"ayu-mirage":()=>k(()=>import("./ayu-mirage-32ctXXKs.js"),[]),"catppuccin-frappe":()=>k(()=>import("./catppuccin-frappe-DFWUc33u.js"),[]),"catppuccin-latte":()=>k(()=>import("./catppuccin-latte-C9dUb6Cb.js"),[]),"catppuccin-macchiato":()=>k(()=>import("./catppuccin-macchiato-DQyhUUbL.js"),[]),"catppuccin-mocha":()=>k(()=>import("./catppuccin-mocha-D87Tk5Gz.js"),[]),"dark-plus":()=>k(()=>import("./dark-plus-C3mMm8J8.js"),[]),dracula:()=>k(()=>import("./dracula-BzJJZx-M.js"),[]),"dracula-soft":()=>k(()=>import("./dracula-soft-BXkSAIEj.js"),[]),"everforest-dark":()=>k(()=>import("./everforest-dark-BgDCqdQA.js"),[]),"everforest-light":()=>k(()=>import("./everforest-light-C8M2exoo.js"),[]),"github-dark":()=>k(()=>import("./github-dark-DHJKELXO.js"),[]),"github-dark-default":()=>k(()=>import("./github-dark-default-Cuk6v7N8.js"),[]),"github-dark-dimmed":()=>k(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[]),"github-dark-high-contrast":()=>k(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[]),"github-light":()=>k(()=>import("./github-light-DAi9KRSo.js"),[]),"github-light-default":()=>k(()=>import("./github-light-default-D7oLnXFd.js"),[]),"github-light-high-contrast":()=>k(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[]),"gruvbox-dark-hard":()=>k(()=>import("./gruvbox-dark-hard-CFHQjOhq.js"),[]),"gruvbox-dark-medium":()=>k(()=>import("./gruvbox-dark-medium-GsRaNv29.js"),[]),"gruvbox-dark-soft":()=>k(()=>import("./gruvbox-dark-soft-CVdnzihN.js"),[]),"gruvbox-light-hard":()=>k(()=>import("./gruvbox-light-hard-CH1njM8p.js"),[]),"gruvbox-light-medium":()=>k(()=>import("./gruvbox-light-medium-DRw_LuNl.js"),[]),"gruvbox-light-soft":()=>k(()=>import("./gruvbox-light-soft-hJgmCMqR.js"),[]),horizon:()=>k(()=>import("./horizon-BUw7H-hv.js"),[]),"horizon-bright":()=>k(()=>import("./horizon-bright-CUuTKBJd.js"),[]),houston:()=>k(()=>import("./houston-DnULxvSX.js"),[]),"kanagawa-dragon":()=>k(()=>import("./kanagawa-dragon-CkXjmgJE.js"),[]),"kanagawa-lotus":()=>k(()=>import("./kanagawa-lotus-CfQXZHmo.js"),[]),"kanagawa-wave":()=>k(()=>import("./kanagawa-wave-DWedfzmr.js"),[]),laserwave:()=>k(()=>import("./laserwave-DUszq2jm.js"),[]),"light-plus":()=>k(()=>import("./light-plus-B7mTdjB0.js"),[]),"material-theme":()=>k(()=>import("./material-theme-D5KoaKCx.js"),[]),"material-theme-darker":()=>k(()=>import("./material-theme-darker-BfHTSMKl.js"),[]),"material-theme-lighter":()=>k(()=>import("./material-theme-lighter-B0m2ddpp.js"),[]),"material-theme-ocean":()=>k(()=>import("./material-theme-ocean-CyktbL80.js"),[]),"material-theme-palenight":()=>k(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[]),"min-dark":()=>k(()=>import("./min-dark-CafNBF8u.js"),[]),"min-light":()=>k(()=>import("./min-light-CTRr51gU.js"),[]),monokai:()=>k(()=>import("./monokai-D4h5O-jR.js"),[]),"night-owl":()=>k(()=>import("./night-owl-C39BiMTA.js"),[]),"night-owl-light":()=>k(()=>import("./night-owl-light-CMTm3GFP.js"),[]),nord:()=>k(()=>import("./nord-Ddv68eIx.js"),[]),"one-dark-pro":()=>k(()=>import("./one-dark-pro-DVMEJ2y_.js"),[]),"one-light":()=>k(()=>import("./one-light-C3Wv6jpd.js"),[]),plastic:()=>k(()=>import("./plastic-3e1v2bzS.js"),[]),poimandres:()=>k(()=>import("./poimandres-CS3Unz2-.js"),[]),red:()=>k(()=>import("./red-bN70gL4F.js"),[]),"rose-pine":()=>k(()=>import("./rose-pine-qdsjHGoJ.js"),[]),"rose-pine-dawn":()=>k(()=>import("./rose-pine-dawn-DHQR4-dF.js"),[]),"rose-pine-moon":()=>k(()=>import("./rose-pine-moon-D4_iv3hh.js"),[]),"slack-dark":()=>k(()=>import("./slack-dark-BthQWCQV.js"),[]),"slack-ochin":()=>k(()=>import("./slack-ochin-DqwNpetd.js"),[]),"snazzy-light":()=>k(()=>import("./snazzy-light-Bw305WKR.js"),[]),"solarized-dark":()=>k(()=>import("./solarized-dark-DXbdFlpD.js"),[]),"solarized-light":()=>k(()=>import("./solarized-light-L9t79GZl.js"),[]),"synthwave-84":()=>k(()=>import("./synthwave-84-CbfX1IO0.js"),[]),"tokyo-night":()=>k(()=>import("./tokyo-night-hegEt444.js"),[]),vesper:()=>k(()=>import("./vesper-DRje8inN.js"),[]),"vitesse-black":()=>k(()=>import("./vitesse-black-Bkuqu6BP.js"),[]),"vitesse-dark":()=>k(()=>import("./vitesse-dark-D0r3Knsf.js"),[]),"vitesse-light":()=>k(()=>import("./vitesse-light-CVO1_9PV.js"),[])};function Hn(e){return hn({name:e,collection:No,colorScheme:Uo(e),load:Vo[e]})}const Gi=Ye({themes:Object.freeze([...Wi.map(e=>Hn(e)),...Fo.map(e=>Hn(e))])});Ye({themes:[$i,Gi]});function ji(e){if(Oi())throw new Error(`Theme "${e}" cannot be resolved from a worker context. Themes must be pre-resolved on the main thread and passed to the worker via the resolvedLanguages parameter.`);if(X.hasRegisteredTheme(e))return;const t=Gi.getTheme(e);if(t!=null){X.registerThemeIfAbsent(t.name,t.load);return}throw new Error(`No valid theme loader registered for "${e}"`)}function qi(e,t){if(t.name!==e)throw new Error(`resolvedTheme: themeName: ${e} does not match theme.name: ${t.name}`)}async function Bo(e){ji(e);const t=await X.resolveTheme(e);return qi(e,t),t}function $o(e){return X.getResolvedTheme(e)??Bo(e)}let $;async function xt({themes:e,langs:t,preferredHighlighter:n="shiki-js"}){$??=Nr({themes:[],langs:["text"],engine:n==="shiki-wasm"?Fr(k(()=>import("./wasm-CG6Dc4jp.js"),[])):zr()});const i=Wo($)?await $:$;$=i;const r=[];for(const s of t){if(s==="text"||s==="ansi")continue;const l=Fi(s);"then"in l?r.push(l):Rn(l,i)}const o=[];for(const s of e){const l=$o(s);"then"in l?o.push(l):An(l,$)}return(r.length>0||o.length>0)&&await Promise.all([Promise.all(r).then(s=>{Rn(s,i)}),Promise.all(o).then(s=>{An(s,i)})]),i}function ql(e=$){return e!=null&&!("then"in e)}function Ki(){if($!=null&&!("then"in $))return $}function Wo(e=$){return e!=null&&"then"in e}function Kl(e=$){return e==null}async function Yl(e){await xt(e)}async function Xl(){$!=null&&((await $).dispose(),So(),To(),$=void 0)}for(const e of $i.getThemes())X.registerThemeIfAbsent(e.name,e.load);function cn(e=_){const t=[];return typeof e=="string"?t.push(e):(t.push(e.dark),t.push(e.light)),t}function Ge(e){for(const t of cn(e))if(!vt.has(t))return!1;return!0}function Go(e){return X.hasResolvedThemes(e)}function Oe(e,t){return De(e.theme,t.theme)&&e.useTokenTransformer===t.useTokenTransformer&&e.tokenizeMaxLineLength===t.tokenizeMaxLineLength}function ae(e,t){return e?.cacheKey===t?.cacheKey&&e?.contents===t?.contents&&e?.name===t?.name&&e?.lang===t?.lang}function Lt(e,t){return e==null||t==null?e===t:e.startingLine===t.startingLine&&e.totalLines===t.totalLines&&e.bufferBefore===t.bufferBefore&&e.bufferAfter===t.bufferAfter}function qt(e){return A({tagName:"div",children:[A({tagName:"div",children:e.annotations?.map(t=>A({tagName:"slot",properties:{name:t}})),properties:{"data-annotation-content":""}})],properties:{"data-line-annotation":`${e.hunkIndex},${e.lineIndex}`}})}function jo(e){switch(e){case"file":return"diffs-icon-file-code";case"change":return"diffs-icon-symbol-modified";case"new":return"diffs-icon-symbol-added";case"deleted":return"diffs-icon-symbol-deleted";case"rename-pure":case"rename-changed":return"diffs-icon-symbol-moved"}}function Yi({fileOrDiff:e,mode:t,stickyHeader:n}){const i="type"in e?e:void 0,r={"data-diffs-header":t,"data-change-type":i?.type,"data-sticky":n?"":void 0};return A({tagName:"div",children:[t==="custom"?A({tagName:"slot",properties:{name:an}}):qo({name:e.name,prevName:"prevName"in e?e.prevName:void 0,iconType:i?.type??"file"}),...t==="custom"?[]:[Ko(i)]],properties:r})}function qo({name:e,prevName:t,iconType:n}){const i=[A({tagName:"slot",properties:{name:on}}),pt({name:jo(n),properties:{"data-change-icon":n}})];return t!=null&&(i.push(A({tagName:"div",children:[A({tagName:"bdi",children:[W(t)]})],properties:{"data-prev-name":""}})),i.push(pt({name:"diffs-icon-arrow-right-short",properties:{"data-rename-icon":""}}))),i.push(A({tagName:"div",children:[A({tagName:"bdi",children:[W(e)]})],properties:{"data-title":""}})),A({tagName:"div",children:i,properties:{"data-header-content":""}})}function Ko(e){const t=[];if(e!=null){let n=0,i=0;for(const r of e.hunks)n+=r.additionLines,i+=r.deletionLines;(i>0||n===0)&&t.push(A({tagName:"span",children:[W(`-${i}`)],properties:{"data-deletions-count":""}})),(n>0||i===0)&&t.push(A({tagName:"span",children:[W(`+${n}`)],properties:{"data-additions-count":""}}))}return t.push(A({tagName:"slot",properties:{name:sn}})),A({tagName:"div",children:t,properties:{"data-metadata":""}})}function Xi(e){return A({tagName:"pre",properties:Yo(e)})}function Yo({diffIndicators:e,disableBackground:t,disableLineNumbers:n,overflow:i,split:r,totalLines:o,type:s,customProperties:l}){return{...l,"data-diff":s==="diff"?"":void 0,"data-file":s==="file"?"":void 0,"data-diff-type":s==="diff"?r?"split":"single":void 0,"data-overflow":i,"data-disable-line-numbers":n?"":void 0,"data-background":t?void 0:"","data-indicators":e==="bars"||e==="classic"?e:void 0,style:`--diffs-min-number-column-width-default:${`${o}`.length}ch;`}}const Z=new Map;let bt=0;const Ne={"1c":"1c",abap:"abap",as:"actionscript-3",ada:"ada",adb:"ada",ads:"ada",adoc:"asciidoc",asciidoc:"asciidoc","component.html":"angular-html","component.ts":"angular-ts",conf:"nginx",htaccess:"apache",cls:"tex",trigger:"apex",apl:"apl",applescript:"applescript",scpt:"applescript",ara:"ara",asm:"asm",s:"riscv",astro:"astro",awk:"awk",bal:"ballerina",sh:"zsh",bash:"zsh",bat:"cmd",cmd:"cmd",be:"berry",beancount:"beancount",bib:"bibtex",bicep:"bicep","blade.php":"blade",bsl:"bsl",c:"c",h:"objective-cpp",cs:"csharp",cpp:"cpp",hpp:"cpp",cc:"cpp",cxx:"cpp",hh:"cpp",cdc:"cdc",cairo:"cairo",clar:"clarity",clj:"clojure",cljs:"clojure",cljc:"clojure",soy:"soy",cmake:"cmake","CMakeLists.txt":"cmake",cob:"cobol",cbl:"cobol",cobol:"cobol",CODEOWNERS:"codeowners",ql:"ql",coffee:"coffeescript",lisp:"lisp",cl:"lisp",lsp:"lisp",log:"log",v:"verilog",cql:"cql",cr:"crystal",css:"css",csv:"csv",cue:"cue",cypher:"cypher",cyp:"cypher",d:"d",dart:"dart",dax:"dax",desktop:"desktop",diff:"diff",patch:"diff",Dockerfile:"dockerfile",dockerfile:"dockerfile",env:"dotenv",dm:"dream-maker",edge:"edge",el:"emacs-lisp",ex:"elixir",exs:"elixir",elm:"elm",erb:"erb",erl:"erlang",hrl:"erlang",f:"fortran-fixed-form",for:"fortran-fixed-form",fs:"fsharp",fsi:"fsharp",fsx:"fsharp",f03:"f03",f08:"f08",f18:"f18",f77:"f77",f90:"fortran-free-form",f95:"fortran-free-form",fnl:"fennel",fish:"fish",ftl:"ftl",tres:"gdresource",res:"gdresource",gd:"gdscript",gdshader:"gdshader",gs:"genie",feature:"gherkin",COMMIT_EDITMSG:"git-commit","git-rebase-todo":"git-rebase",gjs:"glimmer-js",gleam:"gleam",gts:"glimmer-ts",glsl:"glsl",vert:"glsl",frag:"glsl",shader:"shaderlab",gp:"gnuplot",plt:"gnuplot",gnuplot:"gnuplot",go:"go",graphql:"graphql",gql:"graphql",groovy:"groovy",gvy:"groovy",hack:"hack",haml:"haml",hbs:"handlebars",handlebars:"handlebars",hs:"haskell",lhs:"haskell",hx:"haxe",hcl:"hcl",hjson:"hjson",hlsl:"hlsl",fx:"hlsl",html:"html",htm:"html",http:"http",rest:"http",hxml:"hxml",hy:"hy",imba:"imba",ini:"ini",cfg:"ini",jade:"pug",pug:"pug",java:"java",js:"javascript",mjs:"javascript",cjs:"javascript",jinja:"jinja",jinja2:"jinja",j2:"jinja",jison:"jison",jl:"julia",json:"json",json5:"json5",jsonc:"jsonc",jsonl:"jsonl",jsonnet:"jsonnet",libsonnet:"jsonnet",jssm:"jssm",jsx:"jsx",kt:"kotlin",kts:"kts",kql:"kusto",tex:"tex",ltx:"tex",lean:"lean4",less:"less",liquid:"liquid",lit:"lit",ll:"llvm",logo:"logo",lua:"lua",luau:"luau",Makefile:"makefile",mk:"makefile",makefile:"makefile",md:"markdown",markdown:"markdown",marko:"marko",m:"wolfram",mat:"matlab",mdc:"mdc",mdx:"mdx",wiki:"wikitext",mediawiki:"wikitext",mmd:"mermaid",mermaid:"mermaid",mips:"mipsasm",mojo:"mojo","🔥":"mojo",move:"move",nar:"narrat",nf:"nextflow",nim:"nim",nims:"nim",nimble:"nim",nix:"nix",nu:"nushell",mm:"objective-cpp",ml:"ocaml",mli:"ocaml",mll:"ocaml",mly:"ocaml",pas:"pascal",p:"pascal",pl:"prolog",pm:"perl",t:"perl",raku:"raku",p6:"raku",pl6:"raku",php:"php",phtml:"php",pls:"plsql",sql:"sql",po:"po",polar:"polar",pcss:"postcss",pot:"pot",potx:"potx",pq:"powerquery",pqm:"powerquery",ps1:"powershell",psm1:"powershell",psd1:"powershell",prisma:"prisma",pro:"prolog",P:"prolog",properties:"properties",proto:"protobuf",pp:"puppet",purs:"purescript",py:"python",pyw:"python",pyi:"python",qml:"qml",qmldir:"qmldir",qss:"qss",r:"r",R:"r",rkt:"racket",rktl:"racket",razor:"razor",cshtml:"razor",rb:"ruby",rbw:"ruby",reg:"reg",regex:"regexp",rel:"rel",rs:"rust",rst:"rst",rake:"ruby",gemspec:"ruby",jbuilder:"ruby",builder:"ruby",rabl:"ruby",arb:"ruby",ru:"ruby",podspec:"ruby",Gemfile:"ruby",Rakefile:"ruby",Guardfile:"ruby",Capfile:"ruby",Berksfile:"ruby",Brewfile:"ruby",Vagrantfile:"ruby",Thorfile:"ruby",Appraisals:"ruby",Dangerfile:"ruby",sas:"sas",sass:"sass",scala:"scala",sc:"scala",scm:"scheme",ss:"scheme",sld:"scheme",scss:"scss",sdbl:"sdbl",shadergraph:"shader",st:"smalltalk",sol:"solidity",sparql:"sparql",rq:"sparql",spl:"splunk",config:"ssh-config",do:"stata",ado:"stata",dta:"stata",styl:"stylus",stylus:"stylus",svelte:"svelte",swift:"swift",sv:"system-verilog",svh:"system-verilog",service:"systemd",socket:"systemd",device:"systemd",timer:"systemd",talon:"talonscript",tasl:"tasl",tcl:"tcl",templ:"templ",tf:"tf",tfvars:"tfvars",toml:"toml",ts:"typescript",tsp:"typespec",tsv:"tsv",tsx:"tsx",ttl:"turtle",twig:"twig",typ:"typst",vv:"v",vala:"vala",vapi:"vala",vb:"vb",vbs:"vb",bas:"vb",vh:"verilog",vhd:"vhdl",vhdl:"vhdl",vim:"vimscript",vue:"vue","vine.ts":"vue-vine",vy:"vyper",wasm:"wasm",wat:"wasm",wy:"文言",wgsl:"wgsl",wit:"wit",wl:"wolfram",nb:"wolfram",xml:"xml",xsl:"xsl",xslt:"xsl",yaml:"yaml",yml:"yml",zs:"zenscript",zig:"zig",zsh:"zsh",sty:"tex"};function Q(e){if(Z.has(e))return Z.get(e)??"text";if(Ne[e]!=null)return Ne[e];const t=e.match(/\.([^/\\]+\.[^/\\]+)$/);if(t!=null){if(Z.has(t[1]))return Z.get(t[1])??"text";if(Ne[t[1]]!=null)return Ne[t[1]]??"text"}const n=e.match(/\.([^.]+)$/)?.[1]??"";return Z.has(n)?Z.get(n)??"text":Ne[n]??"text"}function Ql(e,t){if(e<=bt)return!1;Z.clear();for(const n in t){const i=t[n];i!=null&&Z.set(n,i)}return bt=e,!0}function Jl(){return bt}function Xo(e,t){const n=Z.get(e);return n===t?!1:(n!=null&&console.warn(`setCustomExtension: overriding custom mapping for "${e}" from "${n}" to "${t}"`),Z.set(e,t),bt++,!0)}function Zl(){return Object.fromEntries(Z)}function un(e,{theme:t,preferredHighlighter:n="shiki-js"}){return{langs:[e??"text"],themes:cn(t),preferredHighlighter:n}}function ge(e){return`annotation-${"side"in e?`${e.side}-`:""}${e.lineNumber}`}function xe(e){return e.replace(/\n$|\r\n$/,"")}function Qo(e,t,n){const i=typeof n.lineInfo=="function"?n.lineInfo(t):n.lineInfo[t-1];if(i==null){const r=`processLine: line ${t}, contains no state.lineInfo`;throw console.error(r,{node:e,line:t,state:n}),new Error(r)}return e.tagName="div",e.properties["data-line"]=i.lineNumber,e.properties["data-alt-line"]=i.altLineNumber,e.properties["data-line-type"]=i.type,e.properties["data-line-index"]=i.lineIndex,e.children.length===0&&e.children.push(W(` `)),e}const tt=Symbol("no-token"),Rt=Symbol("multiple-tokens");function Qi(e){const t=Jo(e);if(t!=null)return t;let n=tt;const i=[];let r=[],o;const s=()=>{if(r.length===0||o==null){r=[],o=void 0;return}if(r.length===1){const a=r[0];if(a?.type==="element"){Zo(a,o);for(const d of a.children)ft(d)}else ft(a);i.push(a),r=[],o=void 0;return}for(const a of r)ft(a);i.push(A({tagName:"span",properties:{"data-char":o},children:r})),r=[],o=void 0},l=a=>{if(a!==tt){if(a===Rt){n=Rt;return}if(n===tt){n=a;return}n!==a&&(n=Rt)}};for(const a of e.children){const d=a.type==="element"?Qi(a):tt;if(l(d),typeof d!="number"){s(),i.push(a);continue}o!=null&&o!==d&&s(),o??=d,r.push(a)}return s(),e.children=i,n}function Jo(e){const t=e.properties["data-char"];if(typeof t=="number")return t}function ft(e){if(e.type==="element"){e.properties["data-char"]=void 0;for(const t of e.children)ft(t)}}function Zo(e,t){e.properties["data-char"]=t}function es(e={}){const{classPrefix:t="__shiki_",classSuffix:n="",classReplacer:i=l=>l}=e,r=new Map;function o(l){return Object.entries(l).map(([a,d])=>`${a}:${d}`).join(";")}function s(l){let a=t+ts(typeof l=="string"?l:o(l))+n;return a=i(a),r.has(a)||r.set(a,typeof l=="string"?l:{...l}),a}return{name:"@shikijs/transformers:style-to-class",pre(l){if(!l.properties.style)return;const a=s(l.properties.style);delete l.properties.style,this.addClassToHast(l,a)},tokens(l){for(const a of l)for(const d of a){if(!d.htmlStyle)continue;const h=s(d.htmlStyle);d.htmlStyle={},d.htmlAttrs||={},d.htmlAttrs.class?d.htmlAttrs.class+=` ${h}`:d.htmlAttrs.class=h}},getClassRegistry(){return r},getCSS(){let l="";for(const[a,d]of r.entries())l+=`.${a}{${typeof d=="string"?d:o(d)}}`;return l},clearRegistry(){r.clear()}}}function ts(e,t=0){let n=3735928559^t,i=1103547991^t;for(let r=0,o;r>>16,2246822507),n^=Math.imul(i^i>>>13,3266489909),i=Math.imul(i^i>>>16,2246822507),i^=Math.imul(n^n>>>13,3266489909),(4294967296*(2097151&i)+(n>>>0)).toString(36).slice(0,6)}function Ji(e=!1,t=!1){const n={lineInfo:[]},i=[{line(r){return delete r.properties.class,r},pre(r){const o=oo(r),s=[];if(o!=null){let l=1;for(const a of o.children)a.type==="element"&&(e&&Qi(a),s.push(Qo(a,l,n)),l++);o.children=s}return r},...e?{tokens(r){for(const o of r){let s=0;for(const l of o){const a=l;a.__lineChar??=s,s+=l.content.length}}},preprocess(r,o){o.mergeWhitespaces="never"},span(r,o,s,l,a){if(a?.offset!=null&&a.content!=null){const d=a.__lineChar;return d!=null&&(r.properties["data-char"]=d),r}return r}}:null}];return t&&i.push(ns,Mn),{state:n,transformers:i,toClass:Mn}}const Mn=es({classPrefix:"hl-"}),ns={name:"token-style-normalizer",tokens(e){for(const t of e)for(const n of t){if(n.htmlStyle!=null)continue;const i={};n.color!=null&&(i.color=n.color),n.bgColor!=null&&(i["background-color"]=n.bgColor),n.fontStyle!=null&&n.fontStyle!==0&&((n.fontStyle&1)!==0&&(i["font-style"]="italic"),(n.fontStyle&2)!==0&&(i["font-weight"]="bold"),(n.fontStyle&4)!==0&&(i["text-decoration"]="underline")),Object.keys(i).length>0&&(n.htmlStyle=i)}}};function B(e){return`--${e==="token"?"diffs-token":"diffs"}-`}const is=/^#(?:[0-9a-f]{3}0|[0-9a-f]{6}00)$/i,rs=/^0(?:\.0+)?%?$/;function os(e){const t=e.indexOf("(");if(t<=0||!e.endsWith(")"))return;const n=e.slice(0,t).trim();if(!/^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch|color)$/i.test(n))return;const i=e.slice(t+1,-1).trim();if(i.length===0)return;const r=i.lastIndexOf("/");if(r!==-1)return i.slice(r+1).trim();if(/^(?:rgba|hsla)$/i.test(n)){const o=i.split(",");if(o.length===4)return o[3]?.trim()}}function ss(e){const t=/^#([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})\b/i.exec(e.trim());if(t==null)return null;const n=t[1];let i,r=1;return n.length===3?i=n.split("").map(o=>o+o).join(""):n.length===6?i=n:(i=n.slice(0,6),r=parseInt(n.slice(6,8),16)/255),[parseInt(i.slice(0,2),16),parseInt(i.slice(2,4),16),parseInt(i.slice(4,6),16),r]}function At(e){if(e==null)return null;const t=ss(e);if(t==null)return null;const n=t[0]/255,i=t[1]/255,r=t[2]/255,o=s=>s<=.03928?s/12.92:((s+.055)/1.055)**2.4;return .2126*o(n)+.7152*o(i)+.0722*o(r)}function Dn(e){if(e==null)return!1;const t=e.trim().toLowerCase();if(t==="transparent"||is.test(t))return!0;const n=os(t);return n!=null&&rs.test(n)}function as(e,t,n){if(t==null||n==null)return!1;const i=At(e),r=At(t),o=At(n);return i==null||r==null||o==null?!1:Math.abs(i-o){const s=e.at(-1);return s===""||s===` `||s===`\r `||s==="\r"?Math.max(0,e.length-2):e.length-1})();for(let s=t;s0||l<1/0,{state:h,transformers:c}=Ji(r),u=o?"text":e.lang??Q(e.name),f=typeof n=="string"?t.getTheme(n).type:void 0,g=fn({theme:n,highlighter:t});h.lineInfo=p=>({type:"context",lineIndex:p-1+s,lineNumber:p+s});const b=typeof n=="string"?{lang:u,theme:n,transformers:c,defaultColor:!1,cssVariablePrefix:B("token"),tokenizeMaxLineLength:i,tokenizeTimeLimit:0}:{lang:u,themes:n,transformers:c,defaultColor:!1,cssVariablePrefix:B("token"),tokenizeMaxLineLength:i,tokenizeTimeLimit:0},y=Kt(t.codeToHast(d?cs(a??St(e.contents),s,l):xe(e.contents),b)),m=d?new Array(s):y;return d&&m.push(...y),{code:m,themeStyles:g,baseThemeType:f}}function cs(e,t,n){let i="";return Ct({lines:e,startingLine:t,totalLines:n,callback({content:r}){i+=r}}),i}const Zi="-1,-1";function Yt(e){return e?.some(t=>t.lineNumber===0)??!1}function Xt(e){const t=e[0];return t!=null&&t.length>0?t:void 0}function kt(e){return e.startingLine===0&&e.totalLines>0}function er(e,t){return A({tagName:"div",children:e,properties:{"data-content":"",style:`grid-row: span ${t}`}})}function Qt(e){return(e.lang??Q(e.name))==="text"}function tr(e){return e.useTokenTransformer===!0||e.onTokenClick!=null||e.onTokenEnter!=null||e.onTokenLeave!=null}let us=-1;var fs=class{options;onRenderUpdate;workerManager;__id=`file-renderer:${++us}`;highlighter;renderCache;computedLang="text";lineAnnotations={};lineCache;constructor(e={theme:_},t,n){this.options=e,this.onRenderUpdate=t,this.workerManager=n,n?.isWorkingPool()!==!0&&(this.highlighter=Ge(e.theme??_)?Ki():void 0)}setOptions(e){this.options=e}mergeOptions(e){this.options={...this.options,...e}}setLineAnnotations(e){this.lineAnnotations={};for(const t of e){const n=this.lineAnnotations[t.lineNumber]??[];this.lineAnnotations[t.lineNumber]=n,n.push(t)}}cleanUp(){this.recycle(),this.workerManager=void 0,this.onRenderUpdate=void 0}recycle(){this.clearRenderCache(),this.highlighter=void 0,this.workerManager?.cleanUpTasks(this),this.lineCache=void 0}clearRenderCache(){this.renderCache=void 0}hydrate(e){const{options:t}=this.getRenderOptions(e),n=Pt(this.getOrCreateLineCache(e).length,this.getTokenizeMaxLength());let i=this.workerManager?.getFileResultCache(e);i!=null&&!Oe(t,i.options)&&(i=void 0),this.renderCache??={file:e,options:t,highlighted:!n&&!Qt(e),result:n?void 0:i?.result,renderRange:void 0},this.workerManager?.isWorkingPool()===!0?this.renderCache.result==null&&!n&&this.workerManager.highlightFileAST(this,e):this.highlighter==null&&(this.computedLang=e.lang??Q(e.name),this.initializeHighlighter())}getRenderOptions(e){const t=(()=>{if(this.workerManager?.isWorkingPool()===!0)return this.workerManager.getFileRenderOptions();const{theme:i=_,tokenizeMaxLineLength:r=1e3}=this.options;return{theme:i,useTokenTransformer:tr(this.options),tokenizeMaxLineLength:r}})(),{renderCache:n}=this;return n?.result==null?{options:t,forceHighlight:!0}:!ae(e,n.file)||!Oe(t,n.options)?{options:t,forceHighlight:!0}:{options:t,forceHighlight:!1}}getOrCreateLineCache(e){if(e.cacheKey==null)return this.lineCache=void 0,St(e.contents);let{lineCache:t}=this;return(t==null||t.cacheKey!==e.cacheKey)&&(t={cacheKey:e.cacheKey,lines:St(e.contents)}),this.lineCache=t,t.lines}renderFile(e=this.renderCache?.file,t=Ae){if(e==null)return;let{options:n,forceHighlight:i}=this.getRenderOptions(e);const r=this.getMatchingWorkerResultCache(e,n);r!=null&&!this.hasHighlightedRenderCache(e,n)&&(this.renderCache={file:e,highlighted:!0,renderRange:void 0,...r},i=!1),this.renderCache??={file:e,highlighted:!1,options:n,result:void 0,renderRange:void 0};const o=this.getOrCreateLineCache(e),s=e.contents.length>0,l=!s||Qt(e)||Pt(o.length,this.getTokenizeMaxLength()),a=!ae(e,this.renderCache.file),d=!Lt(this.renderCache.renderRange,t);if(this.workerManager?.isWorkingPool()===!0)(l||this.renderCache.result==null||!this.renderCache.highlighted&&(a||d))&&(this.renderCache.file=e,this.renderCache.options=n,this.renderCache.highlighted=!1,(this.renderCache.result==null||a||d||i)&&(this.renderCache.result=this.workerManager.getPlainFileAST(e,t.startingLine,t.totalLines,o)),this.renderCache.renderRange=t),!l&&s&&(!this.renderCache.highlighted||i)&&this.workerManager.highlightFileAST(this,e);else{this.computedLang=e.lang??Q(e.name);const h=this.highlighter!=null&&Ge(n.theme),c=this.highlighter!=null&&mt(this.computedLang),u=!l&&c;if(this.highlighter!=null&&h&&(i||l||!this.renderCache.highlighted&&u||this.renderCache.result==null)){const{result:f,options:g}=this.renderFileWithHighlighter(e,this.highlighter,l||!c);this.renderCache={file:e,options:g,highlighted:u,result:f,renderRange:void 0}}(!h||!l&&!c)&&this.asyncHighlight(e).then(({result:f,options:g})=>{this.renderCache!=null&&(this.renderCache.highlighted=!1),this.onHighlightSuccess(e,f,g,!l)})}return this.renderCache.result!=null?this.processFileResult(this.renderCache.file,t,this.renderCache.result):void 0}async asyncRender(e,t=Ae){const{result:n}=await this.asyncHighlight(e);return this.processFileResult(e,t,n)}async asyncHighlight(e){const t=Pt(this.getOrCreateLineCache(e).length,this.getTokenizeMaxLength());this.computedLang=t?"text":e.lang??Q(e.name);const n=this.highlighter!=null&&Go(cn(this.options.theme)),i=t||this.highlighter!=null&&mt(this.computedLang);return(this.highlighter==null||!n||!i)&&(this.highlighter=await this.initializeHighlighter()),this.renderFileWithHighlighter(e,this.highlighter,t)}renderFileWithHighlighter(e,t,n=!1){const{options:i}=this.getRenderOptions(e);return{result:hs(e,t,i,{forcePlainText:n}),options:i}}processFileResult(e,t,{code:n,themeStyles:i,baseThemeType:r}){const{disableFileHeader:o=!1}=this.options,s=[],l=Ee(),a=this.getOrCreateLineCache(e);let d=0;const h=kt(t)?Xt(this.lineAnnotations):void 0;return h!=null&&(l.children.push(j("context","annotation",1)),s.push(qt({hunkIndex:-1,lineIndex:-1,annotations:h.map(c=>ge(c))})),d++),Ct({lines:a,startingLine:t.startingLine,totalLines:t.totalLines,callback:({lineIndex:c,lineNumber:u})=>{const f=n[c];if(f==null){const g="FileRenderer.processFileResult: Line doesnt exist";throw console.error(g,{name:e.name,lineIndex:c,lineNumber:u,lines:a}),new Error(g)}if(f!=null){l.children.push(Di("context",u,`${c}`)),s.push(f),d++;const g=this.lineAnnotations[u];g!=null&&(l.children.push(j("context","annotation",1)),s.push(qt({hunkIndex:0,lineIndex:u,annotations:g.map(b=>ge(b))})),d++)}}}),l.properties.style=`grid-row: span ${d}`,{gutterAST:l.children??[],contentAST:s,preAST:this.createPreElement(a.length),headerAST:o?void 0:this.renderHeader(e),totalLines:a.length,rowCount:d,themeStyles:i,baseThemeType:r,bufferBefore:t.bufferBefore,bufferAfter:t.bufferAfter,css:""}}renderHeader(e){const{headerRenderMode:t="default",stickyHeader:n=!1}=this.options;return Yi({fileOrDiff:e,mode:t,stickyHeader:n})}renderFullHTML(e){return pe(this.renderFullAST(e))}renderFullAST(e,t=[]){return t.push(A({tagName:"code",children:this.renderCodeAST(e),properties:{"data-code":""}})),{...e.preAST,children:t}}renderCodeAST(e){const t=Ee();return t.children=e.gutterAST,t.properties.style=`grid-row: span ${e.rowCount}`,[t,er(e.contentAST,e.rowCount)]}renderPartialHTML(e,t=!1){return t?pe(A({tagName:"code",children:e,properties:{"data-code":""}})):pe(e)}async initializeHighlighter(){return this.highlighter=await xt(un(this.computedLang,this.options)),this.highlighter}onHighlightSuccess(e,t,n,i=!0){if(this.renderCache==null)return;const r=!ae(e,this.renderCache.file)||!this.renderCache.highlighted||!Oe(n,this.renderCache.options);this.renderCache={file:e,options:n,highlighted:i,result:t,renderRange:void 0},r&&this.onRenderUpdate?.()}getMatchingWorkerResultCache(e,t){const n=this.workerManager?.getFileResultCache(e);if(!(n==null||!Oe(t,n.options)))return n}hasHighlightedRenderCache(e,t){const{renderCache:n}=this;return n?.result!=null&&n.highlighted&&ae(e,n.file)&&Oe(t,n.options)}onHighlightError(e){console.error(e)}getTokenizeMaxLength(){return this.options.tokenizeMaxLength??1e5}createPreElement(e){const{disableLineNumbers:t=!1,overflow:n="scroll"}=this.options;return Xi({type:"file",diffIndicators:"none",disableBackground:!0,disableLineNumbers:t,overflow:n,split:!1,totalLines:e})}};function Pt(e,t){return e>t}const nr=`
      +`:`
      +`)+`
      +
        +`}function PY(){return`
      +
      +`}function DY(e,t,n,o,s){let i=s.rules.footnote_anchor_name(e,t,n,o,s);return e[t].meta.subId>0&&(i+=`:${e[t].meta.subId}`),`
    1. `}function BY(){return`
    2. +`}function HY(e,t,n,o,s){let i=s.rules.footnote_anchor_name(e,t,n,o,s);return e[t].meta.subId>0&&(i+=`:${e[t].meta.subId}`),`
      ↩︎`}function zY(e){const t=e.helpers.parseLinkLabel,n=e.utils.isSpace;e.renderer.rules.footnote_ref=RY,e.renderer.rules.footnote_block_open=OY,e.renderer.rules.footnote_block_close=PY,e.renderer.rules.footnote_open=DY,e.renderer.rules.footnote_close=BY,e.renderer.rules.footnote_anchor=HY,e.renderer.rules.footnote_caption=FY,e.renderer.rules.footnote_anchor_name=NY;function o(l,a,u,c){const d=l.bMarks[a]+l.tShift[a],f=l.eMarks[a];if(d+4>f||l.src.charCodeAt(d)!==91||l.src.charCodeAt(d+1)!==94)return!1;let h;for(h=d+2;h=f||l.src.charCodeAt(++h)!==58)return!1;if(c)return!0;h++,l.env.footnotes||(l.env.footnotes={}),l.env.footnotes.refs||(l.env.footnotes.refs={});const g=l.src.slice(d+2,h-2);l.env.footnotes.refs[`:${g}`]=-1;const m=new l.Token("footnote_reference_open","",1);m.meta={label:g},m.level=l.level++,l.tokens.push(m);const w=l.bMarks[a],_=l.tShift[a],v=l.sCount[a],k=l.parentType,y=h,x=l.sCount[a]+h-(l.bMarks[a]+l.tShift[a]);let M=x;for(;h=u||l.src.charCodeAt(c)!==94||l.src.charCodeAt(c+1)!==91)return!1;const d=c+2,f=t(l,c+1);if(f<0)return!1;if(!a){l.env.footnotes||(l.env.footnotes={}),l.env.footnotes.list||(l.env.footnotes.list=[]);const h=l.env.footnotes.list.length,g=[];l.md.inline.parse(l.src.slice(d,f),l.md,l.env,g);const m=l.push("footnote_ref","",0);m.meta={id:h},l.env.footnotes.list[h]={content:l.src.slice(d,f),tokens:g}}return l.pos=f+1,l.posMax=u,!0}function i(l,a){const u=l.posMax,c=l.pos;if(c+3>u||!l.env.footnotes||!l.env.footnotes.refs||l.src.charCodeAt(c)!==91||l.src.charCodeAt(c+1)!==94)return!1;let d;for(d=c+2;d=u)return!1;d++;const f=l.src.slice(c+2,d-1);if(typeof l.env.footnotes.refs[`:${f}`]>"u")return!1;if(!a){l.env.footnotes.list||(l.env.footnotes.list=[]);let h;l.env.footnotes.refs[`:${f}`]<0?(h=l.env.footnotes.list.length,l.env.footnotes.list[h]={label:f,count:0},l.env.footnotes.refs[`:${f}`]=h):h=l.env.footnotes.refs[`:${f}`];const g=l.env.footnotes.list[h].count;l.env.footnotes.list[h].count++;const m=l.push("footnote_ref","",0);m.meta={id:h,subId:g,label:f}}return l.pos=d,l.posMax=u,!0}function r(l){let a,u,c,d=!1;const f={};if(!l.env.footnotes||(l.tokens=l.tokens.filter(function(g){return g.type==="footnote_reference_open"?(d=!0,u=[],c=g.meta.label,!1):g.type==="footnote_reference_close"?(d=!1,f[":"+c]=u,!1):(d&&u.push(g),!d)}),!l.env.footnotes.list))return;const h=l.env.footnotes.list;l.tokens.push(new l.Token("footnote_block_open","",1));for(let g=0,m=h.length;g0?h[g].count:1;for(let k=0;k?@[\]^_`{|}~-])/g;function VY(e,t){const n=e.posMax,o=e.pos;if(e.src.charCodeAt(o)!==126||t||o+2>=n)return!1;e.pos=o+1;let s=!1;for(;e.pos?@[\]^_`{|}~-])/g;function ZY(e,t){const n=e.posMax,o=e.pos;if(e.src.charCodeAt(o)!==94||t||o+2>=n)return!1;e.pos=o+1;let s=!1;for(;e.pos{t.exports=function(m,w){w=Object.assign({},{disabled:!0,divWrap:!1,divClass:"checkbox",idPrefix:"cbx_",ulClass:"task-list",liClass:"task-list-item"},w),m.core.ruler.after("inline","github-task-lists",function(_){for(var v=_.tokens,k=0,y=2;y=0;v--)if(m[v].level===_)return v;return-1}function s(m,w){return d(m[w])&&f(m[w-1])&&h(m[w-2])&&g(m[w])}function i(m,w,_,v){var k=_.idPrefix+w;m.children[0].content=m.children[0].content.slice(3),m.children.unshift(l(k,v)),m.children.push(a(v)),m.children.unshift(r(m,k,_,v)),_.divWrap&&(m.children.unshift(u(_,v)),m.children.push(c(v)))}function r(m,w,_,v){var k=new v("checkbox_input","input",0);return k.attrs=[["type","checkbox"],["id",w]],/^\[[xX]\][ \u00A0]/.test(m.content)===!0&&k.attrs.push(["checked","true"]),_.disabled===!0&&k.attrs.push(["disabled","true"]),k}function l(m,w){var _=new w("label_open","label",1);return _.attrs=[["for",m]],_}function a(m){return new m("label_close","label",-1)}function u(m,w){var _=new w("checkbox_open","div",0);return _.attrs=[["class",m.divClass]],_}function c(m){return new m("checkbox_close","div",-1)}function d(m){return m.type==="inline"}function f(m){return m.type==="paragraph_open"}function h(m){return m.type==="list_item_open"}function g(m){return/^\[[xX \u00A0]\][ \u00A0]/.test(m.content)}})}),XY=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),JY=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0))),p9;const QY=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),eX=(p9=String.fromCodePoint)!==null&&p9!==void 0?p9:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function tX(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=QY.get(e))!==null&&t!==void 0?t:e}var Is;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(Is||(Is={}));const nX=32;var Da;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Da||(Da={}));function m3(e){return e>=Is.ZERO&&e<=Is.NINE}function oX(e){return e>=Is.UPPER_A&&e<=Is.UPPER_F||e>=Is.LOWER_A&&e<=Is.LOWER_F}function sX(e){return e>=Is.UPPER_A&&e<=Is.UPPER_Z||e>=Is.LOWER_A&&e<=Is.LOWER_Z||m3(e)}function iX(e){return e===Is.EQUALS||sX(e)}var Ss;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(Ss||(Ss={}));var Fa;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Fa||(Fa={}));var rX=class{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=Ss.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Fa.Strict}startEntity(e){this.decodeMode=e,this.state=Ss.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case Ss.EntityStart:return e.charCodeAt(t)===Is.NUM?(this.state=Ss.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=Ss.NamedEntity,this.stateNamedEntity(e,t));case Ss.NumericStart:return this.stateNumericStart(e,t);case Ss.NumericDecimal:return this.stateNumericDecimal(e,t);case Ss.NumericHex:return this.stateNumericHex(e,t);case Ss.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|nX)===Is.LOWER_X?(this.state=Ss.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=Ss.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,n,o){if(t!==n){const s=n-t;this.result=this.result*Math.pow(o,s)+parseInt(e.substr(t,s),o),this.consumed+=s}}stateNumericHex(e,t){const n=t;for(;t>14;for(;t>14,s!==0){if(i===Is.SEMI)return this.emitNamedEntityData(this.treeIndex,s,this.consumed+this.excess);this.decodeMode!==Fa.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;const{result:t,decodeTree:n}=this,o=(n[t]&Da.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,o,this.consumed),(e=this.errors)===null||e===void 0||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){const{decodeTree:o}=this;return this.emitCodePoint(t===1?o[e]&~Da.VALUE_LENGTH:o[e+1],n),t===3&&this.emitCodePoint(o[e+2],n),n}end(){var e;switch(this.state){case Ss.NamedEntity:return this.result!==0&&(this.decodeMode!==Fa.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Ss.NumericDecimal:return this.emitNumericEntity(0,2);case Ss.NumericHex:return this.emitNumericEntity(0,3);case Ss.NumericStart:return(e=this.errors)===null||e===void 0||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Ss.EntityStart:return 0}}};function KT(e){let t="";const n=new rX(e,o=>t+=eX(o));return function(s,i){let r=0,l=0;for(;(l=s.indexOf("&",l))>=0;){t+=s.slice(r,l),n.startEntity(i);const u=n.write(s,l+1);if(u<0){r=l+n.end();break}r=l+u,l=u===0?r+1:r}const a=t+s.slice(r);return t="",a}}function lX(e,t,n,o){const s=(t&Da.BRANCH_LENGTH)>>7,i=t&Da.JUMP_TABLE;if(s===0)return i!==0&&o===i?n:-1;if(i){const a=o-i;return a<0||a>=s?-1:e[n+a]-1}let r=n,l=r+s-1;for(;r<=l;){const a=r+l>>>1,u=e[a];if(uo)l=a-1;else return e[a+s]}return-1}const aX=KT(XY);KT(JY);function E8(e,t=Fa.Legacy){return aX(e,t)}var uX=qT(YY());const Mb={};function cX(e){let t=Mb[e];if(t)return t;t=Mb[e]=[];for(let n=0;n<128;n++){const o=String.fromCharCode(n);t.push(o)}for(let n=0;n=55296&&c<=57343?s+="���":s+=String.fromCharCode(c),i+=6;continue}}if((l&248)===240&&i+91114111?s+="����":(d-=65536,s+=String.fromCharCode(55296+(d>>10),56320+(d&1023))),i+=9;continue}}s+="�"}return s})}h2.defaultChars=";/?:@&=+$,#";h2.componentChars="";var g3=h2;const Tb={};function dX(e){let t=Tb[e];if(t)return t;t=Tb[e]=[];for(let n=0;n<128;n++){const o=String.fromCharCode(n);/^[0-9a-z]$/i.test(o)?t.push(o):t.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2))}for(let n=0;n"u"&&(n=!0);const o=dX(t);let s="";for(let i=0,r=e.length;i=55296&&l<=57343){if(l>=55296&&l<=56319&&i+1=56320&&a<=57343){s+=encodeURIComponent(e[i]+e[i+1]),i++;continue}}s+="%EF%BF%BD";continue}s+=encodeURIComponent(e[i])}return s}m2.defaultChars=";/?:@&=+$,-_.!~*'()#";m2.componentChars="-_.!~*'()";var ZT=m2;function I8(e){let t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&e.hostname.indexOf(":")!==-1?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||"",t}function Pm(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}const fX=/^([a-z0-9.+-]+:)/i,pX=/:[0-9]*$/,hX=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,mX=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r",` +`," "]),gX=["'"].concat(mX),Eb=["%","/","?",";","#"].concat(gX),Ib=["/","?","#"],vX=255,Lb=/^[+a-z0-9A-Z_-]{0,63}$/,yX=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,$b={javascript:!0,"javascript:":!0},Nb={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function kX(e,t){if(e&&e instanceof Pm)return e;const n=new Pm;return n.parse(e,t),n}Pm.prototype.parse=function(e,t){let n,o,s,i=e;if(i=i.trim(),!t&&e.split("#").length===1){const u=hX.exec(i);if(u)return this.pathname=u[1],u[2]&&(this.search=u[2]),this}let r=fX.exec(i);if(r&&(r=r[0],n=r.toLowerCase(),this.protocol=r,i=i.substr(r.length)),(t||r||i.match(/^\/\/[^@\/]+@[^@\/]+/))&&(s=i.substr(0,2)==="//",s&&!(r&&$b[r])&&(i=i.substr(2),this.slashes=!0)),!$b[r]&&(s||r&&!Nb[r])){let u=-1;for(let g=0;g127?v+="x":v+=_[k];if(!v.match(Lb)){const k=g.slice(0,m),y=g.slice(m+1),x=_.match(yX);x&&(k.push(x[1]),y.unshift(x[2])),y.length&&(i=y.join(".")+i),this.hostname=k.join(".");break}}}}this.hostname.length>vX&&(this.hostname=""),h&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const l=i.indexOf("#");l!==-1&&(this.hash=i.substr(l),i=i.slice(0,l));const a=i.indexOf("?");return a!==-1&&(this.search=i.substr(a),i=i.slice(0,a)),i&&(this.pathname=i),Nb[n]&&this.hostname&&!this.pathname&&(this.pathname=""),this};Pm.prototype.parseHost=function(e){let t=pX.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};var L8=kX,GT=VT({decode:()=>g3,encode:()=>ZT,format:()=>I8,parse:()=>L8}),YT=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,XT=/[\0-\x1F\x7F-\x9F]/,bX=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,JT=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,CX=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/,QT=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,wX=VT({Any:()=>YT,Cc:()=>XT,Cf:()=>bX,P:()=>JT,S:()=>CX,Z:()=>QT}),_X=Object.defineProperty,eE=e=>{let t={};for(var n in e)_X(t,n,{get:e[n],enumerable:!0});return t},bs=class{type;tag;attrs;map;nesting;level;children;content;markup;info;meta;block;hidden;constructor(e,t,n){this.type=e,this.tag=t,this.attrs=null,this.map=null,this.nesting=n,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}attrIndex(e){if(!this.attrs)return-1;const t=this.attrs;for(let n=0,o=t.length;n=0&&(n=this.attrs[t][1]),n}attrJoin(e,t){const n=this.attrIndex(e);n<0?this.attrPush([e,t]):this.attrs[n][1]=`${this.attrs[n][1]} ${t}`}},xX=eE({arrayReplaceAt:()=>LX,assign:()=>EX,countLines:()=>Ko,escapeHtml:()=>HX,escapeRE:()=>WX,fromCodePoint:()=>Cp,has:()=>TX,isMdAsciiPunct:()=>Hm,isPunctChar:()=>Bm,isPunctCode:()=>v3,isSpace:()=>IX,isString:()=>AX,isValidEntityCode:()=>v2,isWhiteSpace:()=>bp,lib:()=>UX,mdurl:()=>GT,normalizeReference:()=>g2,ucmicro:()=>Dm,unescapeAll:()=>wp,unescapeMd:()=>RX});const Dm=wX;function SX(e){return Object.prototype.toString.call(e)}function AX(e){return SX(e)==="[object String]"}const MX=Object.prototype.hasOwnProperty;function TX(e,t){return MX.call(e,t)}function EX(e,...t){return t.forEach(n=>{if(n){if(typeof n!="object")throw new TypeError(`${String(n)}must be object`);Object.keys(n).forEach(o=>{e[o]=n[o]})}}),e}function IX(e){return e===9||e===32}function bp(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function Bm(e){return Dm.P.test(e)||Dm.S.test(e)}const Fb=new Map;function v3(e){if(Hm(e))return!0;if(e>=0&&e<128)return!1;const t=Fb.get(e);if(t!==void 0)return t;const n=Bm(String.fromCharCode(e));return Fb.set(e,n),n}function Hm(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function g2(e){return e=e.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}function LX(e,t,n){return[...e.slice(0,t),...n,...e.slice(t+1)]}function v2(e){return!(e>=55296&&e<=57343||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534||e>=0&&e<=8||e===11||e>=14&&e<=31||e>=127&&e<=159||e>1114111)}function Cp(e){if(e>65535){e-=65536;const t=55296+(e>>10),n=56320+(e&1023);return String.fromCharCode(t,n)}return String.fromCharCode(e)}const tE=/\\([!"#$%&'()*+,\-\./:;<=>?@[\\\]^_`{|}~])/g,$X=new RegExp(`${tE.source}|${/&([a-z#][a-z0-9]{1,31});/gi.source}`,"gi"),NX=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function FX(e,t){if(t.charCodeAt(0)===35&&NX.test(t)){const o=t[1].toLowerCase()==="x"?Number.parseInt(t.slice(2),16):Number.parseInt(t.slice(1),10);return v2(o)?Cp(o):e}const n=E8(e);return n!==e?n:e}function RX(e){return e.includes("\\")?e.replace(tE,"$1"):e}function wp(e){return!e.includes("\\")&&!e.includes("&")?e:e.replace($X,(t,n,o)=>n||FX(t,o))}const OX=/[&<>"]/,PX=/[&<>"]/g,DX={"&":"&","<":"<",">":">",'"':"""};function BX(e){return DX[e]}function HX(e){return OX.test(e)?e.replace(PX,BX):e}const zX=/[.?*+^$[\]\\(){}|-]/g;function WX(e){return e.replace(zX,"\\$&")}const UX={mdurl:GT,ucmicro:Dm};function Ko(e){if(e.length===0)return 0;let t=0,n=-1;for(;(n=e.indexOf(` +`,n+1))!==-1;)t++;return t}const jX=/(?:^|\n)[ \t]{0,3}\[\^[^\]\n]+\]:/m,VX=/(?:^|\n)[ \t]{0,3}\*\[[^\]\n]+\]:/m,qX=/(?:^|\n)[ \t]{0,3}\[(?!\^)(?:\\[\s\S]|[^\]\\[])+\][ \t]*:/m,$8=["references","footnotes","abbreviations","abbr","abbrs"],N8=Symbol.for("markdown-it-ts.global-state"),F8=Object.prototype.hasOwnProperty;function Rb(e){return e==="reference-definition"||e==="footnote-definition"||e==="abbreviation-definition"}function Wr(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function ja(e){if(Array.isArray(e))return e.map(t=>ja(t));if(Wr(e)){const t={};for(const n of Object.keys(e))t[n]=ja(e[n]);return t}return e}function zm(e){return Array.isArray(e)?e.map((t,n)=>String(n)):Wr(e)?Object.keys(e):[]}function y3(e,t){if(Array.isArray(e)||Array.isArray(t)){if(!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length)return!1;for(let n=0;ni.has(r)?!y3(s[r],nE(o.value,r)):!0)}}function aa(e){const t=R8(e);if(t){for(const n of $8){const o=t.snapshot[n];if(!o){delete e[n];continue}if(o.ownedKeys){ZX(e,n,o);continue}o.existed?e[n]=KX(e[n],o.value):delete e[n]}delete e[N8]}}function h9(e){return{area:e,attempted:!0,matched:!1,attemptMs:0,blocks:0,headings:0,paragraphs:0,lists:0,fences:0,paragraphCacheHits:0,paragraphCacheMisses:0,paragraphCacheBypasses:0,listCacheHits:0,listCacheMisses:0,fenceCacheHits:0,fenceCacheMisses:0}}const k3=Symbol.for("markdown-it-ts.diagnostics");function Up(e,t){if(e)try{const n=e[k3];if(n&&typeof n=="object")return n;if(!t)return;const o={};return e[k3]=o,o}catch{return}}function ql(e){return Up(e,!1)}function YX(e){if(e)try{const t=e[k3];t&&typeof t=="object"&&(delete t.strategy,delete t.chunk,delete t.unbounded,delete t.editable,delete t.stockFast)}catch{}}function mi(e){YX(e)}function t1(e,t){const n=Up(e,!0);n&&(n.stockFast=t)}function ss(e,t){const n=Up(e,!0);n&&(n.strategy=t)}function m9(e,t){const n=Up(e,!0);n&&(n.chunk=t)}function oE(e,t){const n=Up(e,!0);n&&(n.unbounded=t)}function XX(e){const t={};e=e||{},t.src_Any=YT.source,t.src_Cc=XT.source,t.src_Z=QT.source,t.src_P=JT.source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");const n="[><|]";return t.src_pseudo_letter=`(?:(?!${n}|${t.src_ZPCc})${t.src_Any})`,t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth=`(?:(?:(?!${t.src_ZCc}|[@/\\[\\]()]).){1,50}@)?`,t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator=`(?=$|${n}|${t.src_ZPCc})(?!${e["---"]?"-(?!--)|":"-|"}_|:\\d|\\.-|\\.(?!$|${t.src_ZPCc}))`,t.src_path=`(?:[/?#](?:(?!${t.src_ZCc}|${n}|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!${t.src_ZCc}|\\]).)*\\]|\\((?:(?!${t.src_ZCc}|[)]).)*\\)|\\{(?:(?!${t.src_ZCc}|[}]).)*\\}|\\"(?:(?!${t.src_ZCc}|["]).)+\\"|\\'(?:(?!${t.src_ZCc}|[']).)+\\'|\\'(?=${t.src_pseudo_letter}|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!${t.src_ZCc}|[.]|$)|`+(e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+`,(?!${t.src_ZCc}|$)|;(?!${t.src_ZCc}|$)|\\!+(?!${t.src_ZCc}|[!]|$)|\\?(?!${t.src_ZCc}|[?]|$))+|\\/)?`,t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]{0,63}',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+`|${t.src_pseudo_letter}{1,63})`,t.src_domain="(?:"+t.src_xn+`|(?:${t.src_pseudo_letter})|(?:${t.src_pseudo_letter}(?:-|${t.src_pseudo_letter}){0,61}${t.src_pseudo_letter}))`,t.src_host=`(?:(?:(?:(?:${t.src_domain})\\.)*${t.src_domain}))`,t.tpl_host_fuzzy="(?:"+t.src_ip4+`|(?:(?:(?:${t.src_domain})\\.)+(?:%TLDS%)))`,t.tpl_host_no_ip_fuzzy=`(?:(?:(?:${t.src_domain})\\.)+(?:%TLDS%))`,t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test=`localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:${t.src_ZPCc}|>|$))`,t.tpl_email_fuzzy=`(^|${n}|"|\\(|${t.src_ZCc})(${t.src_email_name}@${t.tpl_host_fuzzy_strict})`,t.tpl_link_fuzzy=`(^|(?![.:/\\-_@])(?:[$+<=>^\`||]|${t.src_ZPCc}))((?![$+<=>^\`||])${t.tpl_host_port_fuzzy_strict}${t.src_path})`,t.tpl_link_no_ip_fuzzy=`(^|(?![.:/\\-_@])(?:[$+<=>^\`||]|${t.src_ZPCc}))((?![$+<=>^\`||])${t.tpl_host_port_no_ip_fuzzy_strict}${t.src_path})`,t}function b3(e){return Array.prototype.slice.call(arguments,1).forEach(function(t){t&&Object.keys(t).forEach(function(n){e[n]=t[n]})}),e}function y2(e){return Object.prototype.toString.call(e)}function JX(e){return y2(e)==="[object String]"}function QX(e){return y2(e)==="[object Object]"}function eJ(e){return y2(e)==="[object RegExp]"}function Ob(e){return y2(e)==="[object Function]"}function tJ(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const sE={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function nJ(e){return Object.keys(e||{}).reduce(function(t,n){return t||sE.hasOwnProperty(n)},!1)}const oJ={"http:":{validate:function(e,t,n){const o=e.slice(t);return n.re.http||(n.re.http=new RegExp(`^\\/\\/${n.re.src_auth}${n.re.src_host_port_strict}${n.re.src_path}`,"i")),n.re.http.test(o)?o.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){const o=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+`(?:localhost|(?:(?:${n.re.src_domain})\\.)+${n.re.src_domain_root})`+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(o)?t>=3&&e[t-3]===":"||t>=3&&e[t-3]==="/"?0:o.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){const o=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp(`^${n.re.src_email_name}@${n.re.src_host_strict}`,"i")),n.re.mailto.test(o)?o.match(n.re.mailto)[0].length:0}}},sJ="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",iJ="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function rJ(e){return function(t,n){const o=t.slice(n);return e.test(o)?o.match(e)[0].length:0}}function Pb(){return function(e,t){t.normalize(e)}}function Wm(e){const t=e.re=XX(e.__opts__),n=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||n.push(sJ),n.push(t.src_xn),t.src_tlds=n.join("|");function o(l){return l.replace("%TLDS%",t.src_tlds)}t.email_fuzzy=RegExp(o(t.tpl_email_fuzzy),"i"),t.email_fuzzy_global=RegExp(o(t.tpl_email_fuzzy),"ig"),t.link_fuzzy=RegExp(o(t.tpl_link_fuzzy),"i"),t.link_fuzzy_global=RegExp(o(t.tpl_link_fuzzy),"ig"),t.link_no_ip_fuzzy=RegExp(o(t.tpl_link_no_ip_fuzzy),"i"),t.link_no_ip_fuzzy_global=RegExp(o(t.tpl_link_no_ip_fuzzy),"ig"),t.host_fuzzy_test=RegExp(o(t.tpl_host_fuzzy_test),"i");const s=[];e.__compiled__={};function i(l,a){throw new Error(`(LinkifyIt) Invalid schema "${l}": ${a}`)}Object.keys(e.__schemas__).forEach(function(l){const a=e.__schemas__[l];if(a===null)return;const u={validate:null,link:null};if(e.__compiled__[l]=u,QX(a)){eJ(a.validate)?u.validate=rJ(a.validate):Ob(a.validate)?u.validate=a.validate:i(l,a),Ob(a.normalize)?u.normalize=a.normalize:a.normalize?i(l,a):u.normalize=Pb();return}if(JX(a)){s.push(l);return}i(l,a)}),s.forEach(function(l){e.__compiled__[e.__schemas__[l]]&&(e.__compiled__[l].validate=e.__compiled__[e.__schemas__[l]].validate,e.__compiled__[l].normalize=e.__compiled__[e.__schemas__[l]].normalize)}),e.__compiled__[""]={validate:null,normalize:Pb()};const r=Object.keys(e.__compiled__).filter(function(l){return l.length>0&&e.__compiled__[l]}).map(tJ).join("|");e.re.schema_test=RegExp(`(^|(?!_)(?:[><|]|${t.src_ZPCc}))(${r})`,"i"),e.re.schema_search=RegExp(`(^|(?!_)(?:[><|]|${t.src_ZPCc}))(${r})`,"ig"),e.re.schema_at_start=RegExp(`^${e.re.schema_search.source}`,"i"),e.re.pretest=RegExp(`(${e.re.schema_test.source})|(${e.re.host_fuzzy_test.source})|@`,"i")}function iE(e,t,n,o){const s=e.slice(n,o);this.schema=t.toLowerCase(),this.index=n,this.lastIndex=o,this.raw=s,this.text=s,this.url=s}function ar(e,t){if(!(this instanceof ar))return new ar(e,t);t||nJ(e)&&(t=e,e={}),this.__opts__=b3({},sE,t),this.__schemas__=b3({},oJ,e),this.__compiled__={},this.__tlds__=iJ,this.__tlds_replaced__=!1,this.re={},Wm(this)}ar.prototype.add=function(t,n){return this.__schemas__[t]=n,Wm(this),this};ar.prototype.set=function(t){return this.__opts__=b3(this.__opts__,t),this};ar.prototype.test=function(t){if(!t.length)return!1;let n,o;if(this.re.schema_test.test(t)){for(o=this.re.schema_search,o.lastIndex=0;(n=o.exec(t))!==null;)if(this.testSchemaAt(t,n[2],o.lastIndex))return!0}return!!(this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&t.search(this.re.host_fuzzy_test)>=0&&t.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy)!==null||this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&t.indexOf("@")>=0&&t.match(this.re.email_fuzzy)!==null)};ar.prototype.pretest=function(t){return this.re.pretest.test(t)};ar.prototype.testSchemaAt=function(t,n,o){return this.__compiled__[n.toLowerCase()]?this.__compiled__[n.toLowerCase()].validate(t,o,this):0};ar.prototype.match=function(t){const n=[],o=[],s=[],i=[];let r,l,a;function u(f,h){return f?h?f.index!==h.index?f.index=h.lastIndex?f:h:f:h}if(!t.length)return null;if(this.re.schema_test.test(t))for(a=this.re.schema_search,a.lastIndex=0;(r=a.exec(t))!==null;)l=this.testSchemaAt(t,r[2],a.lastIndex),l&&o.push({schema:r[2],index:r.index+r[1].length,lastIndex:r.index+r[0].length+l});if(this.__opts__.fuzzyLink&&this.__compiled__["http:"])for(a=this.__opts__.fuzzyIP?this.re.link_fuzzy_global:this.re.link_no_ip_fuzzy_global,a.lastIndex=0;(r=a.exec(t))!==null;)s.push({schema:"",index:r.index+r[1].length,lastIndex:r.index+r[0].length});if(this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"])for(a=this.re.email_fuzzy_global,a.lastIndex=0;(r=a.exec(t))!==null;)i.push({schema:"mailto:",index:r.index+r[1].length,lastIndex:r.index+r[0].length});const c=[0,0,0];let d=0;for(;;){const f=[o[c[0]],i[c[1]],s[c[2]]],h=u(u(f[0],f[1]),f[2]);if(!h)break;if(h===f[0]?c[0]++:h===f[1]?c[1]++:c[2]++,h.index{const d=/^xn--/,f=/[^\0-\x7F]/,h=/[\x2E\u3002\uFF0E\uFF61]/g,g={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},m=35,w=Math.floor,_=String.fromCharCode;function v(H){throw new RangeError(g[H])}function k(H,O){const F=[];let W=H.length;for(;W--;)F[W]=O(H[W]);return F}function y(H,O){const F=H.split("@");let W="";F.length>1&&(W=F[0]+"@",H=F[1]),H=H.replace(h,".");const z=k(H.split("."),O).join(".");return W+z}function x(H){const O=[];let F=0;const W=H.length;for(;F=55296&&z<=56319&&FString.fromCodePoint(...H),$=function(H){return H>=48&&H<58?26+(H-48):H>=65&&H<91?H-65:H>=97&&H<123?H-97:36},S=function(H,O){return H+22+75*(H<26)-((O!=0)<<5)},I=function(H,O,F){let W=0;for(H=F?w(H/700):H>>1,H+=w(H/O);H>m*26>>1;W+=36)H=w(H/m);return w(W+(m+1)*H/(H+38))},P=function(H){const O=[],F=H.length;let W=0,z=128,U=72,q=H.lastIndexOf("-");q<0&&(q=0);for(let K=0;K=128&&v("not-basic"),O.push(H.charCodeAt(K));for(let K=q>0?q+1:0;K=F&&v("invalid-input");const Ee=$(H.charCodeAt(K++));Ee>=36&&v("invalid-input"),Ee>w((2147483647-W)/Y)&&v("overflow"),W+=Ee*Y;const de=le<=U?1:le>=U+26?26:le-U;if(Eew(2147483647/he)&&v("overflow"),Y*=he}const ne=O.length+1;U=I(W-ie,ne,ie==0),w(W/ne)>2147483647-z&&v("overflow"),z+=w(W/ne),W%=ne,O.splice(W++,0,z)}return String.fromCodePoint(...O)},D=function(H){const O=[];H=x(H);const F=H.length;let W=128,z=0,U=72;for(const ie of H)ie<128&&O.push(_(ie));const q=O.length;let K=q;for(q&&O.push("-");K=W&&Yw((2147483647-z)/ne)&&v("overflow"),z+=(ie-W)*ne,W=ie;for(const Y of H)if(Y2147483647&&v("overflow"),Y===W){let le=z;for(let Ee=36;;Ee+=36){const de=Ee<=U?1:Ee>=U+26?26:Ee-U;if(le32))return i;if(o===41){if(r===0)break;r--}s++}return t===s||r!==0||(i.str=wp(e.slice(t,s)),i.pos=s,i.ok=!0),i}var aE=D8;const zh=-2;function aJ(e,t,n,o){let s=1,i=t+1;for(;i=0&&t+1>=c)return-1;const d=l.indexOf("]",t+1);if(d<0||d>=a)return e.linkLabelNoCloseFrom=t+1,-1;const f=aJ(l,t,a,n);if(f!==zh)return f;for(e.pos=t+1;e.pos=n)return r;let l=e.charCodeAt(i);if(l!==34&&l!==39&&l!==40)return r;t++,i++,l===40&&(l=41),r.marker=l}for(;i=0?e.attrs[n][1]:null}function dJ(e,t,n){const o=k2(e,t);o<0?z8(e,[t,n]):e.attrs[o][1]=`${e.attrs[o][1]} ${n}`}var fJ=eE({attrGet:()=>cJ,attrIndex:()=>k2,attrJoin:()=>dJ,attrPush:()=>z8,attrSet:()=>uJ,parseLinkDestination:()=>D8,parseLinkLabel:()=>B8,parseLinkTitle:()=>H8});function pJ(e){return e.includes("\r")||e.includes("\0")}function cE(e){return typeof e=="string"?e:e.toString()}function hJ(e){if(e.inlineMode){const t=new bs("inline","",0);t.content=cE(e.src),t.map=[0,1],t.children=[],t.level=0,e.tokens.push(t)}else e.md&&e.md.block&&e.md.block.parse(e.src,e.md,e.env,e.tokens)}const mJ=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,gJ=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function vJ(e,t){let n=e.pos;const o=e.src;if(o.charCodeAt(n)!==60)return!1;const s=n,i=e.posMax;for(;;){if(++n>=i)return!1;const l=o.charCodeAt(n);if(l===60)return!1;if(l===62)break}const r=o.slice(s+1,n);if(gJ.test(r)){const l=e.md.normalizeLink(r);if(!e.md.validateLink(l))return!1;if(!t){const a=e.push("link_open","a",1);a.attrs=[["href",l]],a.markup="autolink",a.info="auto";const u=e.push("text","",0);u.content=e.md.normalizeLinkText(r);const c=e.push("link_close","a",-1);c.markup="autolink",c.info="auto"}return e.pos+=r.length+2,!0}if(mJ.test(r)){const l=e.md.normalizeLink(`mailto:${r}`);if(!e.md.validateLink(l))return!1;if(!t){const a=e.push("link_open","a",1);a.attrs=[["href",l]],a.markup="autolink",a.info="auto";const u=e.push("text","",0);u.content=e.md.normalizeLinkText(r);const c=e.push("link_close","a",-1);c.markup="autolink",c.info="auto"}return e.pos+=r.length+2,!0}return!1}var dE=vJ;function yJ(e,t){const n=e.src;let o=e.pos;if(n.charCodeAt(o)!==96)return!1;const s=o;o++;const i=e.posMax;for(;o2&&f.charCodeAt(0)===32&&f.charCodeAt(f.length-1)===32&&(f=f.slice(1,-1)),d.content=f}return e.pos=a,!0}e.backticks[c]=u}return e.backticksScanned=!0,t||(e.pending+=r),e.pos+=l,!0}var fE=yJ;function Db(e){const t={},n=e.length;if(!n)return;let o=0,s=-2;const i=[];for(let r=0;ra;u-=i[u]+1){const d=e[u];if(d.marker===l.marker&&d.open&&d.end<0){let f=!1;if((d.close||l.open)&&(d.length+l.length)%3===0&&(d.length%3!==0||l.length%3!==0)&&(f=!0),!f){const h=u>0&&!e[u-1].open?i[u-1]+1:0;i[r]=r-u+h,i[u]=h,l.open=!1,d.end=r,d.close=!1,c=-1,s=-2;break}}}c!==-1&&(t[l.marker][(l.open?3:0)+(l.length||0)%3]=c)}}function kJ(e){const t=e.tokens_meta,n=e.tokens_meta.length;Db(e.delimiters);for(let o=0;o=0;s--){const i=t[s],r=i.marker;if(r!==95&&r!==42||i.end===-1)continue;const l=t[i.end],a=i.token,u=l.token,c=s>0&&t[s-1].end===i.end+1&&t[s-1].marker===r&&t[s-1].token===a-1&&t[i.end+1].token===u+1,d=r===42?pE:hE,f=o[a];c?(f.type="strong_open",f.tag="strong",f.nesting=1,f.markup=d+d,f.content=""):(f.type="em_open",f.tag="em",f.nesting=1,f.markup=d,f.content="");const h=o[u];c?(h.type="strong_close",h.tag="strong",h.nesting=-1,h.markup=d+d,h.content=""):(h.type="em_close",h.tag="em",h.nesting=-1,h.markup=d,h.content=""),c&&(o[t[s-1].token].content="",o[t[i.end+1].token].content="",s--)}}function wJ(e){const t=e.tokens_meta,n=e.tokens_meta.length;Bb(e,e.delimiters);for(let o=0;o=48&&e<=57}function _J(e){const t=e|32;return W8(e)||t>=97&&t<=102}function gE(e){const t=e|32;return t>=97&&t<=122}function xJ(e){return gE(e)||W8(e)}function SJ(e,t,n){let o=t+2;if(o>=n)return null;let s=!1,i=7,r=o;for((e.charCodeAt(o)|32)===120&&(s=!0,i=6,o++,r=o);o=n||e.charCodeAt(o)!==59?null:e.slice(t,o+1)}function AJ(e,t,n){let o=t+1;if(o>=n||!gE(e.charCodeAt(o)))return null;for(o++;o=n||e.charCodeAt(o)!==59)return null;const s=e.slice(t,o+1);return mE(s)!==s?s:null}function MJ(e,t){const n=e.pos,o=e.posMax;if(e.src.charCodeAt(n)!==38||n+1>=o)return!1;if(e.src.charCodeAt(n+1)===35){const s=SJ(e.src,n,o);if(s){if(!t){const i=(s.charCodeAt(2)|32)===120?Number.parseInt(s.slice(3,-1),16):Number.parseInt(s.slice(2,-1),10),r=e.push("text_special","",0);r.content=v2(i)?Cp(i):Cp(65533),r.markup=s,r.info="entity"}return e.pos+=s.length,!0}}else{const s=AJ(e.src,n,o);if(s){const i=mE(s);if(!t){const r=e.push("text_special","",0);r.content=i,r.markup=s,r.info="entity"}return e.pos+=s.length,!0}}return!1}var vE=MJ;const yE=(()=>{const e=new Array(256).fill(0),t="\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-";for(let n=0;n<32;n++)e[t.charCodeAt(n)]=1;return e})(),w3=new Array(128),kE=new Array(128);for(let e=0;e<128;e++){const t=String.fromCharCode(e);w3[e]=`\\${t}`,kE[e]=yE[e]?t:w3[e]}function Hb(e,t,n){e.pending&&e.pushPending();const o=new bs("text_special","",0);o.level=e.level,o.content=t,o.markup=n,o.info="escape",e.pendingLevel=e.level,e.tokens.push(o),e.tokens_meta.push(null)}function TJ(e,t){let n=e.pos;const o=e.posMax,s=e.src;if(s.charCodeAt(n)!==92||(n++,n>=o))return!1;let i=s.charCodeAt(n);if(i===10){for(t||e.push("hardbreak","br",0),n++;n=55296&&i<=56319&&n+1=56320&&a<=57343&&n++}return e.pos=n+1,!0}let r=s.charAt(n);if(i>=55296&&i<=56319&&n+1=56320&&a<=57343&&(r+=s.charAt(n+1),n++)}const l=`\\${r}`;return Hb(e,i<256&&yE[i]?r:l,l),e.pos=n+1,!0}var bE=TJ;function EJ(e){let t,n,o=0;const s=e.tokens,i=e.tokens.length;for(t=n=0;t0&&o++,r.type==="text"&&t+1\`\\x00-\\x20]+|'[^']*'|"[^"]*"))?)*\\s*\\/?>`,wE="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",LJ=new RegExp(`^(?:${CE}|${wE}||<\\?[\\s\\S]*?\\?>|]*>|)`),$J=new RegExp(`^(?:${CE}|${wE})`);function _E(e){return e===32||e===9||e===10||e===12||e===13}function NJ(e){if(e.length<3||e.charCodeAt(0)!==60||(e.charCodeAt(1)|32)!==97)return!1;const t=e.charCodeAt(2);return t===62||_E(t)}function FJ(e){if(e.length<4||e.charCodeAt(0)!==60||e.charCodeAt(1)!==47||(e.charCodeAt(2)|32)!==97)return!1;for(let t=3;t=97&&t<=122}function OJ(e,t){if(!e.md.options.html)return!1;const n=e.posMax,o=e.pos,s=e.src;if(s.charCodeAt(o)!==60||o+2>=n)return!1;const i=s.charCodeAt(o+1);if(i!==33&&i!==63&&i!==47&&!RJ(i))return!1;const r=s.slice(o).match(LJ);if(!r)return!1;const l=r[0];if(!t){const a=e.pushSimple("html_inline","");a.content=l,NJ(l)&&e.linkLevel++,FJ(l)&&e.linkLevel--}return e.pos+=l.length,!0}var xE=OJ;function PJ(e,t){let n,o,s,i,r,l,a,u,c="";const d=e.pos,f=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;const h=e.pos+2,g=Um(e,e.pos+1,!1);if(g<0)return!1;if(i=g+1,i=f)return!1;if(l=aE(e.src,i,e.posMax),l.ok){for(c=e.md.normalizeLink(l.str),e.md.validateLink(c)?i=l.pos:c="",u=i;i=f||e.src.charCodeAt(i)!==41)return e.pos=d,!1;i++}else{if(typeof e.env.references>"u")return!1;if(i=0?s=e.src.slice(u,i++):i=g+1):i=g+1,s||(s=e.src.slice(h,g)),r=e.env.references[g2(s)],!r)return e.pos=d,!1;c=r.href,a=r.title}if(!t){o=e.src.slice(h,g);const m=[];e.md.inline.parse(o,e.md,e.env,m);const w=e.push("image","img",0);w.attrs=[["src",c],["alt",""]],w.children=m,w.content=o,a&&w.attrs.push(["title",a])}return e.pos=i,e.posMax=f,!0}var SE=PJ;function g9(e,t,n){for(;t"u")return!1;let d;if(l=r+1,l=0?(d=n.slice(h,g),d||(d=n.slice(i,r)),l=g+1):d=n.slice(i,r)}else d=n.slice(i,r);const f=e.env.references[g2(d)];if(!f)return e.pos=o,!1;a=f.href,u=f.title}if(!t){e.pos=i,e.posMax=r;const d=e.push("link_open","a",1);d.attrs=u?[["href",a],["title",u]]:[["href",a]],e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=l,e.posMax=s,!0}var AE=DJ;function ME(e){const t=e|32;return t>=97&&t<=122}function BJ(e){return e>=48&&e<=57}function HJ(e){return ME(e)||BJ(e)||e===43||e===45||e===46}function zJ(e){if(e.length===0)return null;let t=e.length-1;for(;t>=0&&HJ(e.charCodeAt(t));)t--;return t++,t>=e.length||!ME(e.charCodeAt(t))?null:e.slice(t)}function WJ(e,t,n){let o=t;for(;o0)return!1;const n=e.pos,o=e.posMax;if(n+3>o||e.src.charCodeAt(n)!==58||e.src.charCodeAt(n+1)!==47||e.src.charCodeAt(n+2)!==47)return!1;const s=zJ(e.pending);if(!s)return!1;const i=WJ(e.src,n-s.length,o),r=e.md.linkify.matchAtStart(i);if(!r)return!1;let l=r.url;if(l.length<=s.length)return!1;let a=l.length;for(;a>0&&l.charCodeAt(a-1)===42;)a--;a!==l.length&&(l=l.slice(0,a));const u=e.md.normalizeLink(l);if(!e.md.validateLink(u))return!1;if(!t){e.pending=e.pending.slice(0,-s.length);const c=e.push("link_open","a",1);c.attrs=[["href",u]],c.markup="linkify",c.info="auto";const d=e.push("text","",0);d.content=e.md.normalizeLinkText(l);const f=e.push("link_close","a",-1);f.markup="linkify",f.info="auto"}return e.pos+=l.length-s.length,!0}function UJ(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==10)return!1;const o=e.pending.length-1,s=e.posMax;if(!t)if(o>=0&&e.pending.charCodeAt(o)===32)if(o>=1&&e.pending.charCodeAt(o-1)===32){let i=o-1;for(;i>=1&&e.pending.charCodeAt(i-1)===32;)i--;e.pending=e.pending.slice(0,i),e.pushSimple("hardbreak","br")}else e.pending=e.pending.slice(0,-1),e.pushSimple("softbreak","br");else e.pushSimple("softbreak","br");for(n++;n=s||Wb(n.charCodeAt(o)))return!1;let i=o+1;for(;io-s),n=Math.floor(t.length/2);return t.length%2===0?(t[n-1]+t[n])/2:t[n]}function ZJ(e,t){return{chain:e,name:t,calls:0,hits:0,inclusiveMs:0,medianMs:0,maxMs:0,normalCalls:0,normalHits:0,silentCalls:0,silentHits:0,samples:[]}}function LE(e){const t=e;if(!t)return null;if(t.__mdtsRuleProfile)return t.__mdtsRuleProfile;if(!t.__mdtsProfileRules)return null;const n=t.__mdtsProfileRules===!0?{}:t.__mdtsProfileRules,o={enabled:!0,fixture:n.fixture,mode:n.mode,startedAt:U8(),records:Object.create(null)};return t.__mdtsRuleProfile=o,o}function Wd(e,t,n,o,s,i){const r=LE(e);if(!r)return;const l=`${t}:${n}`,a=r.records[l]??(r.records[l]=ZJ(t,n));a.calls++,a.inclusiveMs+=o,o>a.maxMs&&(a.maxMs=o),a.samples.push(o),i?(a.silentCalls++,s&&a.silentHits++):(a.normalCalls++,s&&a.normalHits++),s&&a.hits++,r.completedAt=U8()}function GJ(e){const t=LE(e);if(!t)return null;const n=Object.keys(t.records);for(let o=0;os.name===e);o>=0&&this.rules.splice(o,1),this.rules.push({name:e,fn:t,alt:n?.alt||[],enabled:!0}),this.invalidateCache()}at(e,t,n){const o=this.rules.findIndex(s=>s.name===e);if(t===void 0){if(o<0)return;const s=this.rules[o];return Object.freeze({name:s.name,fn:s.fn,alt:s.alt?Object.freeze(s.alt.slice()):void 0,enabled:s.enabled})}if(o<0)throw new Error(`Parser rule not found: ${e}`);this.rules[o].fn=t,n?.alt!==void 0&&(this.rules[o].alt=n.alt),this.invalidateCache()}before(e,t,n,o){const s=this.rules.findIndex(r=>r.name===e);if(s<0)throw new Error(`Parser rule not found: ${e}`);const i=this.rules.findIndex(r=>r.name===t);i>=0&&this.rules.splice(i,1),this.rules.splice(s,0,{name:t,fn:n,alt:o?.alt||[],enabled:!0}),this.invalidateCache()}after(e,t,n,o){const s=this.rules.findIndex(r=>r.name===e);if(s<0)throw new Error(`Parser rule not found: ${e}`);const i=this.rules.findIndex(r=>r.name===t);i>=0&&this.rules.splice(i,1),this.rules.splice(s+1,0,{name:t,fn:n,alt:o?.alt||[],enabled:!0}),this.invalidateCache()}enable(e,t){const n=Array.isArray(e)?e:[e],o=[];let s=!1;for(const i of n){const r=this.rules.findIndex(l=>l.name===i);if(r<0){if(!t)throw new Error(`Rules manager: invalid rule name ${i}`);continue}o.push(i),this.rules[r].enabled||(this.rules[r].enabled=!0,s=!0)}return s&&this.invalidateCache(),o}disable(e,t){const n=Array.isArray(e)?e:[e],o=[];let s=!1;for(const i of n){const r=this.rules.findIndex(l=>l.name===i);if(r<0){if(!t)throw new Error(`Rules manager: invalid rule name ${i}`);continue}o.push(i),this.rules[r].enabled&&(this.rules[r].enabled=!1,s=!0)}return s&&this.invalidateCache(),o}enableOnly(e){const t=new Set(e);let n=!1;for(const o of this.rules){const s=t.has(o.name);o.enabled!==s&&(o.enabled=s,n=!0)}n&&this.invalidateCache()}getRules(e){const t=e||"";return this.cache||this.compileCache(),this.cache.get(t)??[]}getNamedRules(e){const t=e||"";return this.namedCache||this.compileCache(),this.namedCache.get(t)??[]}compileCache(){const e=new Set([""]);for(const o of this.rules)if(o.enabled&&o.alt)for(const s of o.alt)e.add(s);const t=new Map,n=new Map;for(const o of e){const s=[],i=[];for(const r of this.rules)r.enabled&&(o!==""&&!r.alt?.includes(o)||(s.push(r.fn),i.push({name:r.name,fn:r.fn})));t.set(o,s),n.set(o,i)}this.cache=t,this.namedCache=n}},$E=class{src;md;env;tokens;tokens_meta;pos;posMax;level;pending;pendingLevel;cache;delimiters;_prev_delimiters;backticks;backticksScanned;linkLevel;linkLabelNoCloseFrom;maxNesting;constructor(e,t,n,o){this.src=e,this.md=t,this.env=n,this.tokens=o,this.tokens_meta=new Array(o.length),this.pos=0,this.posMax=e.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache=[],this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0,this.linkLabelNoCloseFrom=-1,this.maxNesting=t.options.maxNesting}pushPending(){const e=new bs("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e}pushSimple(e,t){this.pending&&this.pushPending();const n=new bs(e,t,0);return n.level=this.level,this.pendingLevel=this.level,this.tokens.push(n),this.tokens_meta.push(null),n}push(e,t,n){if(this.pending&&this.pushPending(),n===0)return this.pushSimple(e,t);const o=new bs(e,t,n);let s=null;return n<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),o.level=this.level,n>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],s={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(o),this.tokens_meta.push(s),o}scanDelims(e,t){const{src:n,posMax:o}=this,s=n.charCodeAt(e);let i=e;for(;i0?n.charCodeAt(e-1):32,a=i@[\]\\^_`{}~]/;function jb(e,t){switch(e.src.charCodeAt(e.pos)){case 10:return EE(e,t);case 33:return SE(e,t);case 38:return vE(e,t);case 42:case 95:return C3.tokenize(e,t);case 58:return e.md.options.linkify&&TE(e,t);case 60:return dE(e,t)||xE(e,t);case 91:return AE(e,t);case 92:return bE(e,t);case 96:return fE(e,t);case 126:return _3.tokenize(e,t);default:return IE(e,t)}}function NE(e){return!YJ.test(e)}var XJ=class{ruler;ruler2;cachedRulesVersion=-1;cachedRules=[];cachedRules2Version=-1;cachedRules2=[];defaultRulerVersion;defaultRuler2Version;constructor(){this.ruler=new Ub,this.ruler2=new Ub,this.ruler.push("text",IE),this.ruler.push("linkify",TE),this.ruler.push("newline",EE),this.ruler.push("escape",bE),this.ruler.push("backticks",fE),this.ruler.push("strikethrough",_3.tokenize),this.ruler.push("emphasis",C3.tokenize),this.ruler.push("link",AE),this.ruler.push("image",SE),this.ruler.push("autolink",dE),this.ruler.push("html_inline",xE),this.ruler.push("entity",vE),this.ruler2.push("balance_pairs",bJ),this.ruler2.push("strikethrough",_3.postProcess),this.ruler2.push("emphasis",C3.postProcess),this.ruler2.push("fragments_join",IJ),this.defaultRulerVersion=this.ruler.version,this.defaultRuler2Version=this.ruler2.version}skipToken(e){const t=e.pos,n=this.getRules(),o=n.length,s=e.cache,i=s[t],r=!!e.env&&(Object.prototype.hasOwnProperty.call(e.env,"__mdtsRuleProfile")||Object.prototype.hasOwnProperty.call(e.env,"__mdtsProfileRules"));if(i!==void 0){e.pos=i;return}let l=!1;if(e.level=e.pos)throw new Error("inline rule didn't increment state.pos");break}}}else if(this.isDefaultRuleset()){if(e.level++,l=jb(e,!0),e.level--,l&&t>=e.pos)throw new Error("inline rule didn't increment state.pos")}else for(let a=0;a=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;l||e.pos++,s[t]=e.pos}tokenize(e){const t=this.getRules(),n=t.length,o=e.posMax;if(!(e.env&&(Object.prototype.hasOwnProperty.call(e.env,"__mdtsRuleProfile")||Object.prototype.hasOwnProperty.call(e.env,"__mdtsProfileRules")))){const i=this.isDefaultRuleset();for(;e.pos=e.pos)throw new Error("inline rule didn't increment state.pos")}if(l){if(e.pos>=o)break;continue}e.pending+=e.src.charAt(e.pos++)}e.pending&&e.pushPending();return}const s=this.ruler.getNamedRules("");for(;e.pos=e.pos)throw new Error("inline rule didn't increment state.pos");break}}if(r){if(e.pos>=o)break;continue}e.pending+=e.src.charAt(e.pos++)}e.pending&&e.pushPending()}isDefaultRuleset(){return this.ruler.version===this.defaultRulerVersion&&this.ruler2.version===this.defaultRuler2Version}parseSource(e,t,n,o){if(typeof e=="string"&&e.length>0&&this.isDefaultRuleset()&&NE(e)){const a=new bs("text","",0);a.content=e,o.push(a);return}const s=new $E(e,t,n,o);this.tokenize(s);const i=this.getRules2(),r=i.length;if(!(s.env&&(Object.prototype.hasOwnProperty.call(s.env,"__mdtsRuleProfile")||Object.prototype.hasOwnProperty.call(s.env,"__mdtsProfileRules")))){for(let a=0;a0&&NE(i.content)){const r=new bs("text","",0);r.content=i.content,i.children.push(r);continue}e.md.inline.parse(i.content,e.md,e.env,i.children)}}}const QJ=/[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}]/u,eQ=/[0-9a-z]/i;function tQ(e){return/^\s]/i.test(e)}function nQ(e){return/^<\/a\s*>/i.test(e)}function oQ(e,t){if(t.schema||t.index!==0||!t.raw)return t;for(let n=1;n=0;r--){const l=s[r];if(l.type==="link_close"){for(r--;r>=0&&s[r].level!==l.level&&s[r].type!=="link_open";)r--;continue}if(l.type==="html_inline"&&(tQ(l.content)&&i>0&&i--,nQ(l.content)&&i++),i>0||l.type!=="text"||!e.md.linkify.test(l.content))continue;const a=l.content;let u=(e.md.linkify.match(a)||[]).map(h=>oQ(e.md.linkify,h));if(u.length===0)continue;const c=[];let d=l.level,f=0;u.length>0&&u[0].index===0&&r>0&&s[r-1].type==="text_special"&&(u=u.slice(1));for(let h=0;hf){const x=new bs("text","",0);x.content=a.slice(f,_),x.level=d,c.push(x)}const v=new bs("link_open","a",1);v.attrs=[["href",m]],v.level=d++,v.markup="linkify",v.info="auto",c.push(v);const k=new bs("text","",0);k.content=w,k.level=d,c.push(k);const y=new bs("link_close","a",-1);y.level=--d,y.markup="linkify",y.info="auto",c.push(y),f=g.lastIndex}if(f!==0){if(f=0;n--){const o=e[n];o.type==="text"&&!t&&(o.content=o.content.replace(uQ,dQ)),o.type==="link_open"&&o.info==="auto"&&t--,o.type==="link_close"&&o.info==="auto"&&t++}}function pQ(e){let t=0;for(let n=e.length-1;n>=0;n--){const o=e[n];o.type==="text"&&!t&&FE.test(o.content)&&(o.content=o.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/gm,"$1—").replace(/(^|\s)--(?=\s|$)/gm,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/gm,"$1–")),o.type==="link_open"&&o.info==="auto"&&t--,o.type==="link_close"&&o.info==="auto"&&t++}}function hQ(e){if(e.md?.options?.typographer)for(let t=e.tokens.length-1;t>=0;t--){const n=e.tokens[t];if(n.type!=="inline")continue;const o=n.content||(Array.isArray(n.children)?n.children.map(s=>s.type==="text"?s.content:"").join(""):"");aQ.test(o)&&fQ(n.children||[]),FE.test(o)&&pQ(n.children||[])}}var mQ=class{rules=[];cache=null;namedCache=null;version=0;invalidateCache(){this.cache=null,this.namedCache=null,this.version++}push(e,t){const n=this.rules.findIndex(o=>o.name===e);n>=0&&this.rules.splice(n,1),this.rules.push({name:e,fn:t,enabled:!0}),this.invalidateCache()}at(e,t){const n=this.rules.findIndex(o=>o.name===e);if(n<0)throw new Error(`Parser rule not found: ${e}`);this.rules[n].fn=t,this.invalidateCache()}before(e,t,n){const o=this.rules.findIndex(i=>i.name===e);if(o<0)throw new Error(`Parser rule not found: ${e}`);const s=this.rules.findIndex(i=>i.name===t);s>=0&&this.rules.splice(s,1),this.rules.splice(o,0,{name:t,fn:n,enabled:!0}),this.invalidateCache()}after(e,t,n){const o=this.rules.findIndex(i=>i.name===e);if(o<0)throw new Error(`Parser rule not found: ${e}`);const s=this.rules.findIndex(i=>i.name===t);s>=0&&this.rules.splice(s,1),this.rules.splice(o+1,0,{name:t,fn:n,enabled:!0}),this.invalidateCache()}enable(e,t){const n=Array.isArray(e)?e:[e],o=[];let s=!1;for(const i of n){const r=this.rules.findIndex(l=>l.name===i);if(r<0){if(!t)throw new Error(`Rules manager: invalid rule name ${i}`);continue}o.push(i),this.rules[r].enabled||(this.rules[r].enabled=!0,s=!0)}return s&&this.invalidateCache(),o}disable(e,t){const n=Array.isArray(e)?e:[e],o=[];let s=!1;for(const i of n){const r=this.rules.findIndex(l=>l.name===i);if(r<0){if(!t)throw new Error(`Rules manager: invalid rule name ${i}`);continue}o.push(i),this.rules[r].enabled&&(this.rules[r].enabled=!1,s=!0)}return s&&this.invalidateCache(),o}enableOnly(e){const t=new Set(e);let n=!1;for(const o of this.rules){const s=t.has(o.name);o.enabled!==s&&(o.enabled=s,n=!0)}n&&this.invalidateCache()}compileCache(){this.cache=this.rules.filter(e=>e.enabled).map(e=>e.fn),this.namedCache=this.rules.filter(e=>e.enabled).map(e=>({name:e.name,fn:e.fn}))}getRules(e=""){return this.cache||this.compileCache(),this.cache}getNamedRules(e=""){return this.namedCache||this.compileCache(),this.namedCache}};const gQ=/['"]/,Vb=/['"]/g,qb="’";function lh(e,t,n){return e.slice(0,t)+n+e.slice(t+1)}function vQ(e,t){let n;const o=[],s=t.md&&t.md.options&&t.md.options.quotes||"“”‘’";for(let i=0;i=0&&!(o[n].level<=l);n--);if(o.length=n+1,r.type!=="text")continue;let a=r.content,u=0,c=a.length;e:for(;u=0)m=a.charCodeAt(d.index-1);else for(n=i-1;n>=0&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n--)if(e[n].content){m=e[n].content.charCodeAt(e[n].content.length-1);break}let w=32;if(u=48&&m<=57&&(h=f=!1),f&&h&&(f=_,h=v),!f&&!h){g&&(r.content=lh(r.content,d.index,qb));continue}if(h)for(n=o.length-1;n>=0;n--){let x=o[n];if(o[n].level=0;t--){const n=e.tokens[t];if(n.type!=="inline")continue;const o=typeof n.content=="string"?n.content:(n.children||[]).map(s=>s.content||"").join("");!gQ.test(o)||!n.children||vQ(n.children,e)}}function kQ(e){const t=e.tokens||[],n=t.length;for(let o=0;o=4||s.charCodeAt(c)!==62)return!1;if(o)return!0;const h=[],g=[],m=[],w=[],_=e.md.block.ruler.getRulesForState(e,"blockquote"),v=e.parentType;e.parentType="blockquote";let k=!1,y;for(y=t;y=d)break;if(s.charCodeAt(c++)===62&&!I){let D=a[y]+1,T,L;s.charCodeAt(c)===32?(c++,D++,L=!1,T=!0):s.charCodeAt(c)===9?(T=!0,(u[y]+D)%4===3?(c++,D++,L=!1):L=!0):T=!1;let B=D;for(h.push(i[y]),i[y]=c;c=d,g.push(u[y]),u[y]=a[y]+1+(T?1:0),m.push(a[y]),a[y]=B-D,w.push(l[y]),l[y]=c-i[y];continue}if(k)break;let P=!1;for(let D=0,T=_.length;D";const $=[t,0];M.map=$,e.md.block.tokenize(e,t,y);const S=e.push("blockquote_close","blockquote",-1);S.markup=">",e.lineMax=f,e.parentType=v,$[1]=e.line;for(let I=0;I=4){o++,s=o;continue}break}e.line=s;const i=e.push("code_block","code",0);return i.content=`${e.getLines(t,s,4+e.blkIndent,!1)} +`,i.map=[t,e.line],!0}function SQ(e,t,n,o){let s=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||s+3>i)return!1;const r=e.src.charCodeAt(s);if(r!==126&&r!==96)return!1;let l=s;s=e.skipChars(s,r);let a=s-l;if(a<3)return!1;const u=e.src.slice(l,s),c=e.src.slice(s,i);if(r===96&&c.includes(String.fromCharCode(r)))return!1;if(o)return!0;let d=t,f=!1;for(;d++,!(d>=n||(s=l=e.bMarks[d]+e.tShift[d],i=e.eMarks[d],s=4)&&(s=e.skipChars(s,r),!(s-l=4)return!1;let c=s.charCodeAt(a);if(c!==35||a>=u)return!1;let d=1;for(c=s.charCodeAt(++a);c===35&&a6||aa&&Gb(s.charCodeAt(f-1))&&(u=f),e.line=t+1;const h=e.push("heading_open",Kb[d],1);h.markup=Zb[d],h.map=[t,e.line];const g=e.push("inline","",0);g.content=s.slice(a,u).trim(),g.map=[t,e.line],g.children=[];const m=e.push("heading_close",Kb[d],-1);return m.markup=Zb[d],!0}function MQ(e){switch(e){case 9:case 32:return!0}return!1}function TQ(e,t,n,o){const s=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let i=e.bMarks[t]+e.tShift[t];const r=e.src.charCodeAt(i++);if(r!==42&&r!==45&&r!==95)return!1;let l=1;for(;i|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp(`^|$))`,"i"),/^$/,!0],[new RegExp(`${$J.source}\\s*$`),/^$/,!1]];function EQ(e,t,n,o){let s=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(s)!==60)return!1;let r=e.src.slice(s,i),l=0;for(;l=48&&e<=57}var BE=class{src;md;env;tokens;bMarks=[];eMarks=[];tShift=[];sCount=[];bsCount=[];lineFlags=[];blkIndent=0;line=0;lineMax=0;tight=!1;ddIndent=-1;listIndent=-1;parentType="root";level=0;constructor(e,t,n,o){this.src=e,this.md=t,this.env=n,this.tokens=o;const s=this.src;let i=0,r=0,l=0,a=!1,u=0;for(let c=0,d=s.length;c0&&this.level++,this.tokens.push(o),o}isEmpty(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]}skipEmptyLines(e){const t=this.bMarks,n=this.tShift,o=this.eMarks;for(let s=this.lineMax;et;){const o=n.charCodeAt(--e);if(o!==9&&o!==32)return e+1}return e}skipChars(e,t){const n=this.src;for(let o=n.length;en;)if(t!==o.charCodeAt(--e))return e+1;return e}getLines(e,t,n,o){if(e>=t)return"";if(e+1===t){const c=e,d=this.bMarks[c];let f=d;const h=o?this.eMarks[c]+1:this.eMarks[c];let g=0;const m=this.src,w=this.bsCount,_=this.tShift;for(;fn?new Array(g-n+1).join(" ")+m.slice(f,h):m.slice(f,h)}const s=new Array(t-e),i=this.src,r=this.bMarks,l=this.eMarks,a=this.bsCount,u=this.tShift;for(let c=0,d=e;dn?s[c]=new Array(f-n+1).join(" ")+i.slice(g,m):s[c]=i.slice(g,m)}return s.join("")}};BE.prototype.Token=bs;function LQ(e,t,n){for(let o=t;o=s)return!1;const i=n.charCodeAt(o);switch(i){case 35:case 42:case 43:case 45:case 60:case 62:case 95:case 96:case 126:return!0}return i>=48&&i<=57?!0:LQ(n,o,s)}const Xb=["","h1","h2"];function $Q(e,t,n){const o=e.md.block.ruler.getRulesForState(e,"paragraph"),s=e.src,i=e.bMarks,r=e.tShift,l=e.eMarks,a=e.sCount,u=e.blkIndent,c=HE(e);if(a[t]-u>=4)return!1;const d=e.parentType;e.parentType="paragraph";let f=0,h,g=t+1;for(;g=x)break;if(a[g]-u>3)continue;if(a[g]>=u&&(h=s.charCodeAt(y),h===45||h===61)){let $=y+1,S=$;for(;$=x){f=h===61?1:2;break}if(S-y>1)continue}if(a[g]<0||c&&!zE(e,g,s,y,x))continue;let M=!1;for(let $=0,S=o.length;$y;){const M=s.charCodeAt(x-1);if(M!==9&&M!==32)break;x--}m=s.slice(y,x)}else m=e.getLines(t,g,u,!1).trim();e.line=g+1;const w=h===61?"=":"-",_=e.push("heading_open",Xb[f],1);_.markup=w,_.map=[t,e.line];const v=e.push("inline","",0);v.content=m,v.map=[t,e.line-1],v.children=[];const k=e.push("heading_close",Xb[f],-1);return k.markup=w,e.parentType=d,!0}function WE(e){switch(e){case 9:case 32:return!0}return!1}function Jb(e,t){const n=e.eMarks,o=e.bMarks,s=e.tShift,i=e.src,r=n[t];let l=o[t]+s[t];const a=i.charCodeAt(l++);return a!==42&&a!==45&&a!==43||l=l)return-1;let u=i.charCodeAt(a++);if(u<48||u>57)return-1;for(;;){if(a>=l)return-1;if(u=i.charCodeAt(a++),u>=48&&u<=57){if(a-r>=10)return-1;continue}if(u===41||u===46)break;return-1}return a0&&++s=4||e.listIndent>=0&&e.sCount[l]-e.listIndent>=4&&e.sCount[l]=e.blkIndent&&(u=!0);let c,d,f;const h=e.src,g=e.bMarks,m=e.tShift,w=e.eMarks,_=e.sCount,v=e.bsCount,k=g[l]+m[l];if(k>=w[l])return!1;const y=h.charCodeAt(k);if(y>=48&&y<=57){if(f=Qb(e,l),f<0||(c=!0,r=k,d=NQ(e,l,f),u&&d!==1))return!1}else if(y===42||y===45||y===43){if(f=Jb(e,l),f<0)return!1;c=!1}else return!1;if(u&&e.skipSpaces(f)>=w[l])return!1;if(o)return!0;const x=h.charCodeAt(f-1),M=String.fromCharCode(x);if(c){const T=e.push("ordered_list_open","ol",1);d!==void 0&&d!==1&&(T.attrs=[["start",String(d)]])}else e.push("bullet_list_open","ul",1);const $=[l,0];e.tokens[e.tokens.length-1].map=$,e.tokens[e.tokens.length-1].markup=M;let S=!1;const I=e.tokens.length-1,P=e.md.block.ruler.getRulesForState(e,"list"),D=e.parentType;for(e.parentType="list";l=s?H=1:H=L-T,H>4&&(H=1);const O=T+H,F=e.push("list_item_open","li",1);F.markup=M;const W=[l,0];F.map=W,c&&(F.info=f-r-1===1?FQ[h.charCodeAt(r)-48]:h.slice(r,f-1));const z=e.tight,U=e.tShift[l],q=e.sCount[l],K=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=O,e.tight=!0,e.tShift[l]=B-g[l],e.sCount[l]=L,B>=s&&e.isEmpty(l+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,l,n,!0),(!e.tight||S)&&(a=!1),S=e.line-l>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=K,e.tShift[l]=U,e.sCount[l]=q,e.tight=z,e.push("list_item_close","li",-1).markup=M,l=e.line,W[1]=l,l>=n||e.sCount[l]=4)break;let ie=!1;for(let ne=0,Y=P.length;ne3||u[f]<0)continue;if(s==="list"&&u[f]>=c){const k=r[f]+l[f],y=a[f];if(k=y||eC(i.charCodeAt(k+1)))break}else if(x>=48&&x<=57&&k+1=y){M=-1;break}const $=i.charCodeAt(M++);if($>=48&&$<=57){if(M-k>=10){M=-1;break}continue}if(($===41||$===46)&&(M>=y||eC(i.charCodeAt(M))))break;M=-1;break}if(M>=0)break}}}const w=r[f]+l[f],_=a[f];if(d&&!zE(e,f,i,w,_))continue;let v=!1;for(let k=0,y=o.length;k=4||e.src.charCodeAt(s)!==91)return!1;function a(k){const y=e.lineMax;if(k>=y||e.isEmpty(k))return null;let x=!1;if(e.sCount[k]-e.blkIndent>3&&(x=!0),e.sCount[k]<0&&(x=!0),!x){const S=e.parentType;e.parentType="reference";let I=!1;for(let P=0,D=l.length;P"u"&&(e.env.references={}),typeof e.env.references[v]>"u"&&(e.env.references[v]={title:_,href:f}),e.line=r),!0):!1}function v9(e){switch(e){case 9:case 32:return!0}return!1}const BQ=65536;function y9(e,t){const n=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];return e.src.slice(n,o)}function HQ(e,t){if(e.lineFlags)return(e.lineFlags[t]&H1.Pipe)!==0;for(let n=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];nn)return!1;let s=t+1;if(e.sCount[s]=4)return!1;let i=e.bMarks[s]+e.tShift[s];if(i>=e.eMarks[s])return!1;const r=e.src.charCodeAt(i++);if(r!==124&&r!==45&&r!==58||i>=e.eMarks[s])return!1;const l=e.src.charCodeAt(i++);if(l!==124&&l!==45&&l!==58&&!v9(l)||r===45&&v9(l)||!HQ(e,t))return!1;for(;i=4)return!1;u=tC(a),u.length&&u[0]===""&&u.shift(),u.length&&u[u.length-1]===""&&u.pop();const d=u.length;if(d===0||d!==c.length)return!1;if(o)return!0;const f=e.parentType;e.parentType="table";const h=e.md.block.ruler.getRulesForState(e,"blockquote"),g=e.push("table_open","table",1),m=[t,0];g.map=m;const w=e.push("thead_open","thead",1);w.map=[t,t+1];const _=e.push("tr_open","tr",1);_.map=[t,t+1];for(let y=0;y=4||(u=tC(a),u.length&&u[0]===""&&u.shift(),u.length&&u[u.length-1]===""&&u.pop(),k+=d-u.length,k>BQ))break;if(s===t+2){const M=e.push("tbody_open","tbody",1);M.map=v=[t+2,0]}const x=e.push("tr_open","tr",1);x.map=[s,s+1];for(let M=0;Mr.name===e);if(s<0)throw new Error(`Parser rule not found: ${e}`);const i=this._rules.findIndex(r=>r.name===t);i>=0&&this._rules.splice(i,1),this._rules.splice(s,0,{name:t,enabled:!0,fn:n,alt:o?.alt||[]}),this.invalidateCache()}after(e,t,n,o){const s=this._rules.findIndex(r=>r.name===e);if(s<0)throw new Error(`Parser rule not found: ${e}`);const i=this._rules.findIndex(r=>r.name===t);i>=0&&this._rules.splice(i,1),this._rules.splice(s+1,0,{name:t,enabled:!0,fn:n,alt:o?.alt||[]}),this.invalidateCache()}getRules(e){const t=e||"";return this.cache||this.compileCache(),this.cache[t]??[]}getNamedRules(e){const t=e||"";return this.namedCache||this.compileCache(),this.namedCache[t]??[]}getRulesForState(e,t){const n=e?.env;return n&&(Object.prototype.hasOwnProperty.call(n,"__mdtsRuleProfile")||Object.prototype.hasOwnProperty.call(n,"__mdtsProfileRules"))?this.getNamedRules(t).map(({name:o,fn:s})=>(i,r,l,a)=>{const u=typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now(),c=s(i,r,l,a),d=typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now();return Wd(i?.env,"block",o,d-u,c,!!a),c}):this.getRules(t)}at(e,t,n){const o=this._rules.findIndex(s=>s.name===e);if(o===-1)throw new Error(`Parser rule not found: ${e}`);this._rules[o].fn=t,n?.alt&&(this._rules[o].alt=n.alt),this.invalidateCache()}enable(e,t){const n=Array.isArray(e)?e:[e],o=[];let s=!1;return n.forEach(i=>{const r=this._rules.findIndex(l=>l.name===i);if(r===-1){if(t)return;throw new Error(`Rules manager: invalid rule name ${i}`)}o.push(i),this._rules[r].enabled||(this._rules[r].enabled=!0,s=!0)}),s&&this.invalidateCache(),o}disable(e,t){const n=Array.isArray(e)?e:[e],o=[];let s=!1;return n.forEach(i=>{const r=this._rules.findIndex(l=>l.name===i);if(r===-1){if(t)return;throw new Error(`Rules manager: invalid rule name ${i}`)}o.push(i),this._rules[r].enabled&&(this._rules[r].enabled=!1,s=!0)}),s&&this.invalidateCache(),o}enableOnly(e){const t=new Set(e);let n=!1;for(const o of this._rules){const s=t.has(o.name);o.enabled!==s&&(o.enabled=s,n=!0)}n&&this.invalidateCache()}compileCache(){const e=new Set([""]);for(const o of this._rules)if(o.enabled)for(const s of o.alt)e.add(s);const t=Object.create(null),n=Object.create(null);for(const o of e){const s=[],i=[];for(const r of this._rules)r.enabled&&(o!==""&&!r.alt.includes(o)||(s.push(r.fn),i.push({name:r.name,fn:r.fn})));t[o]=s,n[o]=i}this.cache=t,this.namedCache=n}};const uh=[["table",zQ,["paragraph","reference"]],["code",xQ],["fence",SQ,["paragraph","reference","blockquote","list"]],["blockquote",_Q,["paragraph","reference","blockquote","list"]],["hr",TQ,["paragraph","reference","blockquote","list"]],["list",OQ,["paragraph","reference","blockquote"]],["reference",DQ],["html_block",EQ,["paragraph","reference","blockquote"]],["heading",AQ,["paragraph","reference","blockquote"]],["lheading",$Q],["paragraph",PQ]];var UQ=class{ruler;cachedRulesVersion=-1;cachedRules=[];constructor(){this.ruler=new WQ;for(let e=0;e=a[c];)c++;if(e.line=c,c>=n||u[c]=i){e.line=n;break}const h=e.line;let g=!1;for(let m=0;m=e.line)throw new Error("block rule didn't increment state.line");break}if(!g)throw new Error("none of the block rules matched");e.tight=!d,r[e.line-1]+l[e.line-1]>=a[e.line-1]&&(d=!0),c=e.line,c=a[c]&&(d=!0,c++,e.line=c)}return}const f=this.ruler.getNamedRules("");for(;c=a[c];)c++;if(e.line=c,c>=n||u[c]=i){e.line=n;break}const h=e.line;let g=!1;for(let m=0;m=e.line)throw new Error("block rule didn't increment state.line");break}}if(!g)throw new Error("none of the block rules matched");e.tight=!d,r[e.line-1]+l[e.line-1]>=a[e.line-1]&&(d=!0),c=e.line,c=a[c]&&(d=!0,c++,e.line=c)}}parse(e,t,n,o){if(!e||e.length===0)return;const s=new BE(e,t,n,o);this.tokenize(s,s.line,s.lineMax)}getRules(){return this.cachedRulesVersion!==this.ruler.version&&(this.cachedRules=this.ruler.getRules(""),this.cachedRulesVersion=this.ruler.version),this.cachedRules}},UE=class{src;env;tokens;inlineMode;md;constructor(e,t,n={}){this.src=typeof e=="string"?e||"":e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}};UE.prototype.Token=bs;const nC=[["normalize",lQ],["block",hJ],["inline",JJ],["linkify",sQ],["replacements",hQ],["smartquotes",yQ],["text_join",kQ]],jQ={html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",maxNesting:100},VQ={parseLinkLabel:B8,parseLinkDestination:D8,parseLinkTitle:H8};function qQ(){return{...jQ}}function KQ(){return{...VQ}}var ZQ=class{fallbackParser;lastState=null;block;inline;ruler;linkifyInstance=null;cachedCoreRulesVersion=-1;cachedCoreRules=[];cachedCoreNamedRulesVersion=-1;cachedCoreNamedRules=[];constructor(){this.block=new UQ,this.inline=new XJ,this.ruler=new mQ;for(let e=0;e@[\]\\^_`{}~]/;function jm(e){return!GQ.test(e)}function k1(e,t){const n=e.indexOf(` +`,t);return n===-1?e.length:n}function Wh(e,t,n){for(let o=t;o3)return jm(e);for(let t=0;t=o||t.charCodeAt(r)!==32)return!1;let l=r+1;for(;ll&&t.charCodeAt(a-1)===32;)a--;let u=a;for(;u>l&&t.charCodeAt(u-1)===35;)u--;if(u>l&&t.charCodeAt(u-1)===32)for(a=u-1;a>l&&t.charCodeAt(a-1)===32;)a--;const c=t.slice(l,a);if(!jm(c))return!1;const d=XQ[i],f=JQ[i],h=br("heading_open",d,1,0);h.map=[s,s+1],h.markup=f,e.push(h),e.push(j8(c,s,1));const g=br("heading_close",d,-1,0);return g.markup=f,e.push(g),!0}function eee(e,t,n){const o=br("paragraph_open","p",1,0);o.map=[n,n+1],e.push(o),e.push(j8(t,n,1)),e.push(br("paragraph_close","p",-1,0))}function tee(e,t,n){const o=e.charCodeAt(n-1);return o===32||o===9?e.slice(t,n).trim():e.slice(t,n)}function w9(e,t){for(;t=1e5?sC:C9,s="",i=!1,r=!1,l=0,a=0;for(;l"]/,iC=/[&<>"]/g,aee=/&/g,uee=/[<>"]/g,cee={"&":"&","<":"<",">":">",'"':"""};function _9(e){return cee[e]||e}function Qn(e){if(e.length===0)return"";if(e.length<32)return lee.test(e)?e.replace(iC,_9):e;const t=e.includes("&"),n=e.includes("<"),o=e.includes(">"),s=e.includes('"');return!t&&!n&&!o&&!s?e:t&&!n&&!o&&!s?e.replace(aee,"&"):t?e.replace(iC,_9):e.replace(uee,_9)}const dee=new RegExp(`${/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g.source}|${/&([a-z#][a-z0-9]{1,31});/gi.source}`,"gi"),fee=/^#(?:x[a-f0-9]{1,8}|\d{1,8})$/i;function jE(e){return!e.includes("\\")&&!e.includes("&")?e:e.replace(dee,(t,n,o)=>{if(n)return n;if(fee.test(o)){const i=o[1].toLowerCase()==="x"?Number.parseInt(o.slice(2),16):Number.parseInt(o.slice(1),10);return v2(i)?Cp(i):"�"}const s=E8(t);return s!==t?s:t})}const pee=/[\n!#$%&*+\-:<=>@[\]\\^_`{}~]/,hee=/[\n!"#$%&*+\-:<=>@[\]\\^_`{}~]/,mee=/"/g;function Ad(e,t){const n=e.indexOf(` +`,t);return n===-1?e.length:n}function Vm(e,t,n){for(let o=t;o=e.length||e.charCodeAt(t)===10?!1:!Vm(e,t,Ad(e,t))}function rC(e,t,n){return t+2=n||e.charCodeAt(s)!==32)return null;let i=s+1;for(;ii&&e.charCodeAt(r-1)===32;)r--;let l=r;for(;l>i&&e.charCodeAt(l-1)===35;)l--;if(l>i&&e.charCodeAt(l-1)===32)for(r=l-1;r>i&&e.charCodeAt(r-1)===32;)r--;const a=V8(e.slice(i,r));return a===null?null:`${a} +`}function lC(e,t,n){return t+1" +`;case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return null}return`
    3. ${e[t]}
    4. +`}function bee(e,t,n){const o=t+2;if(n===o+1)return kee(e,o);const s=V8(e.slice(t+2,n));return s===null?null:`
    5. ${s}
    6. +`}function Cee(e,t,n){for(;tt;){const s=e.charCodeAt(n-1);if(s!==32&&s!==9)break;n--}let o=n;for(let s=t;s`:"
      ",o.lang=i,o.open=d),{html:`${d}${Qn(c)}
      +`,nextPos:u=25e4,i=[],r={lang:null,open:""};let l="",a="",u="",c="";for(;n +`;y +`,l=_,a=v}let k=ch(e,w);for(;k${w}

      +`,u=h,c=g}const m=de.core.parse(t,n,e).tokens);let r=Uh(t,s);if(s.maxChunks&&r.length>s.maxChunks&&(r=Mee(r,s.maxChunks)),jh(t,r))return m9(n,{count:1,fallback:!0,fallbackReason:"unsafe-chunk-boundary",maxChunkChars:s.maxChunkChars,maxChunkLines:s.maxChunkLines}),zd(n,i,()=>e.core.parse(t,n,e).tokens);let l=0;const a=[];return m9(n,{count:r.length,maxChunkChars:s.maxChunkChars,maxChunkLines:s.maxChunkLines,globalStateDetected:i||void 0,globalStateFallbackDisabled:s.fallbackOnGlobalState===!1&&!!i}),zd(n,i,()=>{for(let u=0;u=3&&(c?c.marker===k&&x>=c.length&&(c=null):c={marker:k,length:x})}}const w=g-f;s+=w,i+=1,l+=1,m?(a=0,u=0):(a+=1,u+=w);const _=m;if((s>=t.maxChunkChars||i>=t.maxChunkLines)&&!c)if(_)d(g);else{const v=Math.max(10,Math.floor(t.maxChunkLines*.5)),k=Math.max(t.maxChunkChars,8e3);(a>=v||u>=k)&&d(g)}f=g}return n&&d(e.length),o}function jh(e,t,n={rangesCoverWholeSource:!0}){const o=n.rangesCoverWholeSource?t.length-1:t.length;for(let s=0;se.length||e.charCodeAt(t-1)!==10)return!1;let n=t-2;for(;n>=0&&e.charCodeAt(n)!==10;)n--;for(let o=n+1;o=0;o--)n.push(e[o]);for(;n.length;){const o=n.pop();if(o.map&&(o.map[0]+=t,o.map[1]+=t),o.children)for(let s=o.children.length-1;s>=0;s--)n.push(o.children[s])}}function Aee(e,t){for(let n=0;n=0;o--)n.push(e[o]);for(;n.length;){const o=n.pop();if(o.map&&(o.map[0]+=t,o.map[1]+=t),o.children)for(let s=o.children.length-1;s>=0;s--)n.push(o.children[s])}}function Ca(e){return e.length===0?0:Ko(e)+(e.charCodeAt(e.length-1)===10?0:1)}function Fee(e,t,n){for(let o=t;o=3&&(n?n.marker===r&&a>=n.length&&(n=null):n={marker:r,length:a})}o=s===e.length?e.length:s+1}return n!==null}function Oee(e,t){if(e.length===0||e.charCodeAt(e.length-1)!==10)return!1;let n=e.length-2;for(;n>=0&&e.charCodeAt(n)!==10;)n--;return Fee(e,n+1,e.length-1)?!Ree(e,t):!1}function Pee(e,t,n,o={}){const s=o.mode??"full",i=o.fenceAware??(s==="stream"?e.options.streamChunkFenceAware??!0:e.options.fullChunkFenceAware??!0);if(o.maxChunkChars!==void 0||o.maxChunkLines!==void 0||o.autoTune===!1){const r=o.maxChunkChars??(s==="stream"?e.options.streamChunkSizeChars??Lee:e.options.fullChunkSizeChars??Eee),l=o.maxChunkLines??(s==="stream"?e.options.streamChunkSizeLines??$ee:e.options.fullChunkSizeLines??Iee);return{maxChunkChars:r,maxChunkLines:l,holdBelowChars:r,holdBelowLines:l,fenceAware:i}}return s==="stream"?t<=5e3?{maxChunkChars:16e3,maxChunkLines:250,holdBelowChars:16e3,holdBelowLines:250,fenceAware:i}:t<=2e4?{maxChunkChars:16e3,maxChunkLines:200,holdBelowChars:16e3,holdBelowLines:200,fenceAware:i}:t<=5e4?{maxChunkChars:16e3,maxChunkLines:250,holdBelowChars:16e3,holdBelowLines:250,fenceAware:i}:t<=5e5?{maxChunkChars:32e3,maxChunkLines:350,holdBelowChars:32e3,holdBelowLines:350,fenceAware:i}:{maxChunkChars:64e3,maxChunkLines:700,holdBelowChars:64e3,holdBelowLines:700,fenceAware:i}:t<=1e5&&n<=2500?{maxChunkChars:32e3,maxChunkLines:350,holdBelowChars:1e5,holdBelowLines:2500,fenceAware:i}:t<=2e5?{maxChunkChars:2e4,maxChunkLines:150,holdBelowChars:2e4,holdBelowLines:150,fenceAware:i}:t<=5e5?{maxChunkChars:32e3,maxChunkLines:350,holdBelowChars:32e3,holdBelowLines:350,fenceAware:i}:{maxChunkChars:64e3,maxChunkLines:700,holdBelowChars:64e3,holdBelowLines:700,fenceAware:i}}var jp=class{md;options;pending="";tokens=[];committedChars=0;committedLines=0;fedChunks=0;parsedChunks=0;globalStateEnv=null;markedGlobalStateReason=null;constructor(e,t={}){if(this.md=e,this.options={mode:"full",autoTune:!0,retainTokens:!0,...t},this.options.retainTokens===!1&&!this.options.onChunkTokens)throw new Error("UnboundedBuffer with retainTokens=false requires onChunkTokens")}feed(e){e&&(this.pending+=e,this.fedChunks+=1)}flushAvailable(e={}){if(!this.pending)return null;const t=this.resolveWindow(),n=Ca(this.pending);if(this.pending.length=o||n>=s}function YE(e,t,n){if(e.options.autoUnbounded===!1)return"no";if(t>=(e.options.autoUnboundedThresholdChars??qE))return"yes";const o=e.options.autoUnboundedThresholdLines??KE;return n!==void 0?n>=o?"yes":"no":t+1e.core.parse(t,n,e).tokens);const i=[],r=new jp(e,{mode:"full",...o,retainTokens:!1,onChunkTokens(l){ZE(i,l)}});if(s&&O8(n,s),r.feed(t),r.flushForce(n),s&&(P8(n),o.fallbackOnGlobalState===!1)){const l=ql(n)?.unbounded;l&&(l.globalStateDetected=s,l.globalStateFallbackDisabled=!0)}return i}const Ud=(e,t,n)=>en?n:e;function XE(e){return e.experimental?{...e,...e.experimental}:e}const cC=[{max:5e3,strategy:"discrete",maxChunkChars:32e3,maxChunkLines:150,maxChunks:8,notes:"<=5k"},{max:2e4,strategy:"discrete",maxChunkChars:24e3,maxChunkLines:200,maxChunks:12,notes:"<=20k"},{max:1e5,strategy:"plain",notes:"<=100k plain"},{max:2e5,strategy:"discrete",maxChunkChars:2e4,maxChunkLines:150,maxChunks:12,notes:"<=200k"},{max:5e5,strategy:"discrete",maxChunkChars:64e3,maxChunkLines:700,maxChunks:16,notes:"<=500k"},{max:5e6,strategy:"discrete",maxChunkChars:64e3,maxChunkLines:700,maxChunks:16,notes:"<=5M"}],dC=[{max:5e3,strategy:"discrete",maxChunkChars:16e3,maxChunkLines:250,maxChunks:8,notes:"<=5k"},{max:2e4,strategy:"discrete",maxChunkChars:2e4,maxChunkLines:200,maxChunks:24,notes:"<=20k"},{max:1e5,strategy:"discrete",maxChunkChars:2e4,maxChunkLines:200,maxChunks:24,notes:"<=100k"},{max:5e5,strategy:"discrete",maxChunkChars:64e3,maxChunkLines:700,maxChunks:32,notes:"<=500k"},{max:5e6,strategy:"discrete",maxChunkChars:64e3,maxChunkLines:700,maxChunks:32,notes:"<=5M"}];function JE(e,t){return{strategy:t.strategy,maxChunkChars:t.maxChunkChars,maxChunkLines:t.maxChunkLines,maxChunks:t.maxChunks,fenceAware:e,notes:t.notes}}function Wee(e,t=Math.max(0,e/40|0),n={}){const o=XE(n),s=o.fullChunkFenceAware??!0,i=o.fullChunkTargetChunks??8,r=o.fullChunkAdaptive!==!1;for(let l=0;l5e6?{strategy:"plain",fenceAware:s,notes:">5M plain"}:r?{strategy:"adaptive",maxChunkChars:Ud(Math.ceil(e/i),8e3,64e3),maxChunkLines:Ud(Math.ceil(t/i),150,700),maxChunks:Ud(Math.ceil(e/64e3),i,16),fenceAware:s,notes:"adaptive fallback"}:{strategy:"discrete",maxChunkChars:o.fullChunkSizeChars??1e4,maxChunkLines:o.fullChunkSizeLines??200,fenceAware:s,maxChunks:o.fullChunkMaxChunks}}function fC(e,t=Math.max(0,e/40|0),n={}){const o=XE(n),s=o.streamChunkFenceAware??!0,i=o.streamChunkTargetChunks??8,r=o.streamChunkAdaptive!==!1;for(let l=0;l5e6?{strategy:"plain",fenceAware:s,notes:">5M plain"}:r?{strategy:"adaptive",maxChunkChars:Ud(Math.ceil(e/i),8e3,64e3),maxChunkLines:Ud(Math.ceil(t/i),150,700),maxChunks:Ud(Math.ceil(e/64e3),i,32),fenceAware:s,notes:"adaptive fallback"}:{strategy:"discrete",maxChunkChars:o.streamChunkSizeChars??1e4,maxChunkLines:o.streamChunkSizeLines??200,maxChunks:o.streamChunkMaxChunks,fenceAware:s}}var Uee={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"]},inline2:{rules:["balance_pairs","emphasis","fragments_join"]}}},jee={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},Vee={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"]},inline2:{rules:["balance_pairs","fragments_join"]}}};function b2(e){return!!e&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function"}function Vh(e,t){if(b2(e))throw new TypeError(`Renderer rule "${t}" returned a Promise. Use renderAsync() instead.`);return e}const pC=e=>b2(e)?e:Promise.resolve(e);function W1(e){switch(e){case"alt":case"class":case"href":case"id":case"lang":case"rel":case"src":case"start":case"style":case"target":case"title":return e;default:return Qn(e)}}function Qa(e){if(!e||e.length===0)return"";const t=e[0];let n=` ${W1(t[0])}="${Qn(t[1])}"`;for(let o=1;o=e.length)return{langName:e,langAttrs:""};let n=t;for(;n${t} +`;const i=e.attrIndex("class"),r=e.attrs?e.attrs.slice():[],l=`${s.langPrefix??"language-"}${o}`;return i<0?r.push(["class",l]):(r[i]=r[i].slice(),r[i][1]+=` ${l}`),`
      ${t}
      +`}return`
      ${t}
      +`}function _p(e){return!e.attrs||e.attrs.length===0?`${Qn(e.content)}`:`${Qn(e.content)}`}function x3(e){const t=Qn(e.content);return e.attrs?`${t} +`:`
      ${t}
      +`}function qee(e,t){const n=e.attrs;if(!n||n.length===0)switch(e.type){case"paragraph_open":return`${t}

      `;case"heading_open":return`<${e.tag}>`;case"td_open":return`${t}`;case"th_open":return`${t}`;default:return null}if(n.length===1&&n[0][0]==="style"){if(e.type==="td_open")return`${t}`;if(e.type==="th_open")return`${t}`}return null}function hC(e){const t=e.attrs;return!t||t.length===0?"":t.length===1?``:t.length===2?``:``}function Kee(e){switch(e.type){case"text":case"text_special":case"softbreak":case"hardbreak":case"html_inline":case"code_inline":case"image":return!0;default:return!1}}function mC(e){switch(e.type){case"text":case"text_special":case"softbreak":case"hardbreak":case"html_inline":case"code_inline":return!0;default:return!1}}function Km(e,t){if(e.hidden)return"";const n=e.attrs,o=e.nesting,s=e.tag;if(!n||n.length===0)return o===0?t?`<${s} />`:`<${s}>`:o===-1?``:`<${s}>`;let i=(o===-1?"`}const Zee={langPrefix:"language-",xhtmlOut:!1,breaks:!1},dh=Object.prototype.hasOwnProperty,Fn={code_inline(e,t){return _p(e[t])},code_block(e,t){return x3(e[t])},fence(e,t,n,o,s){const i=e[t],r=i.info?jE(i.info).trim():"",{langName:l,langAttrs:a}=QE(r),u=n.highlight,c=Qn(i.content);if(!u)return U1(i,c,r,l,n);const d=u(i.content,l,a);return b2(d)?d.then(f=>U1(i,f||c,r,l,n)):U1(i,d||c,r,l,n)},image(e,t,n,o,s){const i=e[t],r=s.renderInlineAsText(i.children||[],n,o),l=i.attrIndex("alt");return l>=0&&i.attrs?i.attrs[l][1]=r:i.attrs?i.attrs.push(["alt",r]):i.attrs=[["alt",r]],Km(i,n.xhtmlOut===!0)},hardbreak(e,t,n){return n.xhtmlOut?`
      +`:`
      +`},softbreak(e,t,n){return n.breaks?n.xhtmlOut?`
      +`:`
      +`:` +`},text(e,t){return Qn(e[t].content)},text_special(e,t){return Qn(e[t].content)},html_block(e,t){return e[t].content},html_inline(e,t){return e[t].content}};function gC(e,t,n){const o=e.info?jE(e.info).trim():"",{langName:s,langAttrs:i}=QE(o),r=t.highlight,l=Qn(e.content);if(!r)return U1(e,l,o,s,t);const a=r(e.content,s,i);if(b2(a))throw new TypeError('Renderer rule "fence" returned a Promise. Use renderAsync() instead.');return U1(e,a||l,o,s,t)}function x9(e,t,n,o){switch(e.type){case"text":return t.text===Fn.text?e.content.length===0?"":Qn(e.content):null;case"text_special":return t.text_special===Fn.text_special?e.content.length===0?"":Qn(e.content):null;case"softbreak":return t.softbreak===Fn.softbreak?o:null;case"hardbreak":return t.hardbreak===Fn.hardbreak?n:null;case"html_inline":return t.html_inline===Fn.html_inline?e.content:null;case"code_inline":return t.code_inline===Fn.code_inline?_p(e):null;default:return null}}function Gee(e,t,n,o,s){const i=e[0];switch(i.type){case"text":if(s.text===Fn.text)return i.content.length===0?"":Qn(i.content);break;case"text_special":if(s.text_special===Fn.text_special)return i.content.length===0?"":Qn(i.content);break;case"softbreak":if(s.softbreak===Fn.softbreak)return t.breaks?t.xhtmlOut?`
      +`:`
      +`:` +`;break;case"hardbreak":if(s.hardbreak===Fn.hardbreak)return t.xhtmlOut?`
      +`:`
      +`;break;case"html_inline":if(s.html_inline===Fn.html_inline)return i.content;break;case"code_inline":if(s.code_inline===Fn.code_inline)return _p(i);break}const r=s[i.type];if(!r)return Km(i,t.xhtmlOut===!0);const l=r(e,0,t,n,o);return typeof l=="string"?l:Vh(l,i.type)}var Yee=class{rules;baseOptions;normalizedBase;constructor(e={}){this.baseOptions={...e},this.normalizedBase=this.buildNormalizedBase(),this.rules={...Fn}}set(e){return this.baseOptions={...this.baseOptions,...e},this.normalizedBase=this.buildNormalizedBase(),this}render(e,t,n){if(!Array.isArray(e))throw new TypeError("render expects token array as first argument");if(e.length===1)return this.renderSingleToken(e,e[0],t,n);const o=this.mergeOptions(t),s=n??{},i=this.rules,r=o.xhtmlOut===!0;let l,a,u,c,d,f,h="",g="",m=!1,w="";for(let _=0;_0&&e[_-1].hidden?` +`:"";if(k==="list_item_open"&&(!v.attrs||v.attrs.length===0)&&_+3${this.renderInlineTokens(S.children||[],o,s)}`,_+=3;continue}}if(_+2 +`,_+=2;continue}}}if(k==="inline"){const $=v.children||[];if($.length===1){m||(l=i.text,a=i.text_special,u=i.softbreak,c=i.hardbreak,d=i.html_inline,f=i.code_inline,h=o.xhtmlOut?`
      +`:`
      +`,g=o.breaks?h:` +`,m=!0);const S=$[0];switch(S.type){case"text":if(l===Fn.text){w+=Qn(S.content);continue}break;case"text_special":if(a===Fn.text_special){w+=Qn(S.content);continue}break;case"softbreak":if(u===Fn.softbreak){w+=g;continue}break;case"hardbreak":if(c===Fn.hardbreak){w+=h;continue}break;case"html_inline":if(d===Fn.html_inline){w+=S.content;continue}break;case"code_inline":if(f===Fn.code_inline){w+=_p(S);continue}break}}w+=this.renderInlineTokens($,o,s);continue}const x=i[k];if(!x){const $=v.attrs;if(!v.hidden){if(!$||$.length===0)switch(k){case"hr":w+=r?`


      +`:`
      +`;continue;case"heading_open":w+=`<${v.tag}>`;continue;case"heading_close":w+=` +`;continue;case"paragraph_open":w+=`${y}

      `;continue;case"paragraph_close":w+=`

      +`;continue;case"list_item_open":{const S=e[_+1];w+=y+(S&&(S.type==="inline"||S.hidden||S.nesting===-1&&S.tag==="li")?"
    7. ":`
    8. +`);continue}case"list_item_close":w+=`
    9. +`;continue;case"bullet_list_open":w+=`${y}
        +`;continue;case"bullet_list_close":w+=`
      +`;continue;case"blockquote_open":w+=y+(e[_+1]&&e[_+1].nesting===-1&&e[_+1].tag==="blockquote"?"
      ":`
      +`);continue;case"blockquote_close":w+=`
      +`;continue;case"ordered_list_open":w+=`${y}
        +`;continue;case"ordered_list_close":w+=`
      +`;continue;case"table_open":w+=`${y} +`;continue;case"table_close":w+=`
      +`;continue;case"thead_open":w+=`${y} +`;continue;case"thead_close":w+=` +`;continue;case"tbody_open":w+=`${y} +`;continue;case"tbody_close":w+=` +`;continue;case"tr_open":w+=`${y} +`;continue;case"tr_close":w+=` +`;continue;case"td_open":w+=`${y}`;continue;case"td_close":w+=` +`;continue;case"th_open":w+=`${y}`;continue;case"th_close":w+=` +`;continue}else if($.length===1){const S=$[0];if(k==="ordered_list_open"&&S[0]==="start"){w+=`${y}
        +`;continue}if(k==="td_open"&&S[0]==="style"){w+=`${y}`;continue}if(k==="th_open"&&S[0]==="style"){w+=`${y}`;continue}}}w+=this.renderToken(e,_,o);continue}if(k==="code_block"&&x===Fn.code_block){w+=x3(v);continue}if(k==="fence"&&x===Fn.fence){w+=gC(v,o);continue}if(k==="html_block"&&x===Fn.html_block){w+=v.content;continue}const M=x(e,_,o,s,this);typeof M=="string"?w+=M:w+=Vh(M,v.type)}return w}async renderAsync(e,t,n){if(!Array.isArray(e))throw new TypeError("render expects token array as first argument");const o=this.mergeOptions(t),s=n??{},i=this.rules;let r="";for(let l=0;l0&&e[t-1].hidden?` +`:"",c=a?`> +`:">";if(!l||l.length===0)return i===0?n.xhtmlOut?`${u}<${r} /${c}`:`${u}<${r}${c}`:i===-1?`${u}(n||(n={...t}),n);if(dh.call(e,"highlight")&&e.highlight!==t.highlight&&(o().highlight=e.highlight),dh.call(e,"langPrefix")){const s=e.langPrefix;s!==t.langPrefix&&(o().langPrefix=s)}if(dh.call(e,"xhtmlOut")){const s=e.xhtmlOut;s!==t.xhtmlOut&&(o().xhtmlOut=s)}if(dh.call(e,"breaks")){const s=e.breaks;s!==t.breaks&&(o().breaks=s)}return n||t}buildNormalizedBase(){return Object.freeze({...Zee,...this.baseOptions})}renderSingleToken(e,t,n,o){const s=this.rules,i=t.type;if(i==="code_block"&&s.code_block===Fn.code_block)return x3(t);if(i==="html_block"&&s.html_block===Fn.html_block)return t.content;const r=this.mergeOptions(n),l=o??{};if(i==="inline")return this.renderInlineTokens(t.children||[],r,l);const a=s[i];if(!a)return t.block?this.renderToken(e,0,r):Km(t,r.xhtmlOut===!0);if(i==="fence"&&a===Fn.fence)return gC(t,r);const u=a(e,0,r,l,this);return typeof u=="string"?u:Vh(u,i)}renderInlineTokens(e,t,n){if(!e||e.length===0)return"";const o=this.rules;if(e.length===1)return Gee(e,t,n,this,o);const s=t.xhtmlOut===!0,i=s?`
        +`:`
        +`,r=t.breaks?i:` +`,l=o.text,a=o.text_special,u=o.softbreak,c=o.hardbreak,d=o.html_inline,f=o.code_inline,h=o.link_open,g=o.link_close,m=o.em_open,w=o.em_close,_=o.strong_open,v=o.strong_close;let k="";for(let y=0;y`;if(u===Fn.softbreak&&y+3`,y+=1;continue}if(x.type==="em_open"&&!m&&!w&&y+2${I}`,y+=2;continue}}}if(x.type==="strong_open"&&!_&&!v&&y+2${I}`,y+=2;continue}}}switch(x.type){case"text":if(l===Fn.text){const S=x.content.length===0?"":Qn(x.content);if(d===Fn.html_inline&&y+1=4)return!0;continue}if(l===9){if(r+=4-r%4,i++,r>=4)return!0;continue}break}if(i0&&u<=6){if(a=3)return!0;break}default:if(l>=48&&l<=57){let a=i+1;for(;a57)break;a++}if(a=de,!oe&&he!==void 0&&(pe=Ko(e),oe=pe>=he)),oe){const G=this.parseFullDocument(e,L,n,pe,!1);return this.stats.total+=1,this.stats.fullParses+=1,this.stats.lastMode="full",ss(L,{area:"stream",path:"stream-full",reason:"skip-cache-large-one-shot",unbounded:!!ql(L)?.unbounded}),G.tokens}else if(W){const G=(ce,ue,Se)=>ceSe?Se:ce;pe===void 0&&(pe=Ko(e));const X=Y&&!ne?fC(e.length,pe,n.options):null,fe=X?.maxChunkChars??(z?G(Math.ceil(e.length/U),8e3,64e3):q??1e4),Ce=X?.maxChunkLines??(z?G(Math.ceil(pe/U),150,700):K??200),ge=X?.maxChunks??(z?G(Math.ceil(e.length/64e3),U,32):ie),Q=e.length>0&&e.charCodeAt(e.length-1)===10,ee=F&&e.length>=this.IMPLICIT_STREAM_CHUNK_MIN_CHARS&&X?.strategy!=="plain";if((O||ee)&&(e.length>=fe*2||pe>=Ce*2)&&Q){const ce=qm(n,e,L,{maxChunkChars:fe,maxChunkLines:Ce,fenceAware:X?.fenceAware??le,maxChunks:ge});return this.cache={src:e,tokens:ce,env:L,lineCount:pe,lastSegment:void 0,globalStateReason:Ni(e)},this.updateCacheLineCount(this.cache,pe),this.recordChunkedParseResult(L,O?"explicit-initial-large-doc":"default-initial-large-doc"),ce}}const ve=this.parseFullDocument(e,L,n,pe);return pe=ve.lineCount,this.cache={src:e,tokens:ve.tokens,env:L,lineCount:pe,lastSegment:void 0,globalStateReason:Ni(e)},this.updateCacheLineCount(this.cache,pe),this.stats.total+=1,this.stats.fullParses+=1,this.stats.lastMode="full",ss(L,{area:"stream",path:"stream-full",reason:"initial-parse",unbounded:!!ql(L)?.unbounded}),ve.tokens}if(e===s.src)return this.stats.total+=1,this.stats.cacheHits+=1,this.stats.lastMode="cache",ss(s.env,{area:"stream",path:"stream-cache",reason:"same-source"}),s.tokens;const i=e.startsWith(s.src)?e.slice(s.src.length):null;let r=s.globalStateReason;r===void 0&&(r=Ni(s.src),s.globalStateReason=r);const l=r?null:i!==null?this.detectGlobalStateForAppend(s,i):Ni(e),a=r||l;if(a){const L=o??s.env;aa(L);const B=Ni(e),H=this.parseFullDocument(e,L,n),O=H.tokens,F=H.lineCount;return this.cache={src:e,tokens:O,env:L,lineCount:F,lastSegment:void 0,globalStateReason:B},this.updateCacheLineCount(this.cache,F),this.stats.total+=1,this.stats.fullParses+=1,this.stats.lastMode="full",ss(L,{area:"stream",path:"stream-full",reason:`global-state:${a}`,unbounded:!!ql(L)?.unbounded}),O}const u=n.options?.streamOptimizationMinSize??this.MIN_SIZE_FOR_OPTIMIZATION;if(s.src.length5e3?B=8:c.length>1e3?B=6:c.length>200&&(B=4),B=Math.min(B,L);let H=null;const O=n.options?.streamContextParseStrategy??"chars",F=n.options?.streamContextParseMinChars??200,W=n.options?.streamContextParseMinLines??2;let z;const U=()=>(z===void 0&&(z=Ko(c)),z),q=this.canDirectlyParseAppend(s),K=q&&this.shouldUseUnboundedAppend(e,s,c);let ie=!1;if(!q)switch(O){case"lines":ie=U()>=W;break;case"constructs":if(c.length>=F){ie=!0;break}if(Qee(c)){ie=!0;break}ie=U()>=W;break;case"chars":default:ie=c.length>=F}if(B>0&&ie){const le=this.getTailLines(s.src,B)+c;try{const Ee=this.core.parse(le,s.env,n).tokens,de=Ee.findIndex(he=>he.map&&typeof he.map[1]=="number"&&he.map[1]>B);if(de!==-1){const he=Ee.slice(de),pe=L-B;pe!==0&&this.shiftTokenLines(he,pe),H={tokens:he}}}catch{H=null}}else H=null;if(!H){const le=L;if(K)H={tokens:z1(n,c,s.env,{mode:"stream"})},le>0&&this.shiftTokenLines(H.tokens,le);else{const Ee=this.core.parse(c,s.env,n);le>0&&this.shiftTokenLines(Ee.tokens,le),H=Ee}}let ne=0;if(s.tokens.length>0&&H.tokens.length>0){const le=s.tokens[s.tokens.length-1],Ee=H.tokens[0];try{le.type==="inline"&&Ee.type==="inline"&&(Ee.children&&Ee.children.length>0&&(le.children||(le.children=[]),this.appendTokens(le.children,Ee.children)),le.content=(le.content||"")+(Ee.content||""),ne=1)}catch{ne=0}}const Y=s.tokens.length;if(H.tokens.length>ne){const le=s.tokens,Ee=H.tokens,de=Math.min(le.length,Ee.length-ne);let he=0;for(let pe=de;pe>0;pe--){let oe=!0;for(let ve=0;ve0&&(ne+=he),Ee.length>ne&&this.appendTokens(s.tokens,Ee,ne)}if(s.src=e,s.globalStateReason=null,s.lineCount=L+(z??U()),s.tokens.length>Y){const le=this.getLastSegment(s.tokens,e,Y,s.tokens.length,e.length-c.length,L);le?s.lastSegment=le:s.lastSegment=void 0}else s.lastSegment=void 0;return this.stats.total+=1,this.stats.appendHits+=1,K&&(this.stats.unboundedAppendHits=(this.stats.unboundedAppendHits||0)+1),this.stats.lastMode="append",ss(s.env,{area:"stream",path:K?"stream-unbounded-append":"stream-append",reason:K?"large-delta":"safe-append",unbounded:K}),s.tokens}const d=o??s.env,f=this.tryTailSegmentReparse(e,s,d,n);if(f)return this.stats.total+=1,this.stats.tailHits+=1,this.stats.lastMode="tail",ss(d,{area:"stream",path:"stream-tail",reason:"tail-reparse"}),f;const h=!!n.__explicitStreamChunkFallbackSetting,g=typeof n.__canUseImplicitLargeInputStrategy=="function"?n.__canUseImplicitLargeInputStrategy():!0,m=!!n.options?.streamChunkedFallback,w=!h&&!c&&g,_=m||w,v=n.options?.streamChunkAdaptive!==!1,k=n.options?.streamChunkTargetChunks??8,y=n.options?.streamChunkSizeChars,x=n.options?.streamChunkSizeLines,M=n.options?.streamChunkMaxChunks,$=!!n.__explicitStreamChunkConfig,S=n.options?.autoTuneChunks!==!1,I=n.options?.streamChunkFenceAware??!0;let P=c&&s.lineCount!==void 0?s.lineCount+Ko(c):void 0;if(_){P===void 0&&(P=Ko(e));const L=(U,q,K)=>UK?K:U,B=S&&!$?fC(e.length,P,n.options):null,H=B?.maxChunkChars??(v?L(Math.ceil(e.length/k),8e3,64e3):y??1e4),O=B?.maxChunkLines??(v?L(Math.ceil(P/k),150,700):x??200),F=B?.maxChunks??(v?L(Math.ceil(e.length/64e3),k,32):M),W=e.length>0&&e.charCodeAt(e.length-1)===10,z=w&&e.length>=this.IMPLICIT_STREAM_CHUNK_MIN_CHARS&&B?.strategy!=="plain";if((m||z)&&(e.length>=H*2||P>=O*2)&&W){const U=qm(n,e,d,{maxChunkChars:H,maxChunkLines:O,fenceAware:B?.fenceAware??I,maxChunks:F});return this.cache={src:e,tokens:U,env:d,lineCount:P,lastSegment:void 0,globalStateReason:Ni(e)},this.updateCacheLineCount(this.cache,P),this.recordChunkedParseResult(d,m?"explicit-fallback-large-doc":"default-fallback-large-doc"),U}}const D=this.parseFullDocument(e,d,n,P),T=D.tokens;return P=D.lineCount,this.cache={src:e,tokens:T,env:d,lineCount:P,lastSegment:void 0,globalStateReason:Ni(e)},this.updateCacheLineCount(this.cache,P),this.stats.total+=1,this.stats.fullParses+=1,this.stats.lastMode="full",ss(d,{area:"stream",path:"stream-full",reason:"fallback-full",unbounded:!!ql(d)?.unbounded}),T}recordChunkedParseResult(e,t){const n=ql(e)?.chunk,o=n?.fallback?String(n.fallbackReason||"global-state"):null;if(this.stats.total+=1,o){this.stats.fullParses+=1,this.stats.lastMode="full",ss(e,{area:"stream",path:"stream-full",reason:`global-state:${o}`,unbounded:!!ql(e)?.unbounded});return}this.stats.chunkedParses=(this.stats.chunkedParses||0)+1,this.stats.lastMode="chunked",ss(e,{area:"stream",path:"stream-chunked",chunked:!0,reason:t})}parseFullDocument(e,t,n,o,s=!0){const i=Ni(e);Wp(t)&&aa(t);const r=typeof n.__canUseImplicitLargeInputStrategy!="function"||n.__canUseImplicitLargeInputStrategy()?YE(n,e.length,o):"no";if(r==="yes"){const a=z1(n,e,t);return ss(t,{area:"stream",path:"stream-full",reason:"auto-unbounded-char-threshold",unbounded:!0}),{tokens:a,lineCount:o??(s?Ko(e):0)}}let l=o;if(r==="need-lines"&&(l=Ko(e),GE(n,e.length,l))){const a=z1(n,e,t);return ss(t,{area:"stream",path:"stream-full",reason:"auto-unbounded-line-threshold",unbounded:!0}),{tokens:a,lineCount:l}}return l===void 0&&(l=s?Ko(e):0),{tokens:zd(t,i,()=>this.core.parse(e,t,n).tokens),lineCount:l}}shouldUseUnboundedAppend(e,t,n){return!n||e.length=this.MIN_UNBOUNDED_APPEND_CHARS?!0:Ko(n)>=this.MIN_UNBOUNDED_APPEND_LINES}getAppendedSegment(e,t,n){if(n===null||n===void 0&&!t.startsWith(e)||!e.endsWith(` +`))return null;const o=n??t.slice(e.length);if(!o)return null;const s=o.length;if(o.charCodeAt(s-1)!==10)return null;let i=0,r=-1;for(let a=0;a=2));a++);if(i<2)return null;const l=(r===-1?o:o.slice(0,r)).trim();if(l.length===0)return null;if(/^[-=]+$/.test(l)){const a=e.slice(0,-1),u=a.lastIndexOf(` +`);if(a.slice(u+1).trim().length>0)return null}return this.endsInsideOpenFence(e)||this.mayContainReferenceDefinition(o)?null:o}tryTailSegmentReparse(e,t,n,o){const s=this.ensureLastSegment(t);if(!s||s.srcOffset<=0&&s.tokenStart<=0)return null;const i=t.src.slice(0,s.srcOffset);if(!e.startsWith(i))return null;const r=t.src.slice(s.srcOffset),l=e.slice(s.srcOffset);if(l===r)return null;const a=e.startsWith(t.src)?e.slice(t.src.length):null;if(a){const u=this.tryContainerTailAppendMerge(e,t,n,o,s,a);if(u)return u}if(this.mayContainReferenceDefinition(r)||this.mayContainReferenceDefinition(l))return null;try{const u=this.core.parse(l,n,o),c=this.getLastSegment(u.tokens,l);return s.lineStart>0&&this.shiftTokenLines(u.tokens,s.lineStart),t.src=e,t.env=n,t.globalStateReason=null,t.globalStateCarry=void 0,t.tokens.length=s.tokenStart,this.appendTokens(t.tokens,u.tokens),t.lineCount=s.lineStart+Ko(l),c?t.lastSegment={tokenStart:s.tokenStart+c.tokenStart,tokenEnd:s.tokenStart+c.tokenEnd,lineStart:s.lineStart+c.lineStart,lineEnd:s.lineStart+c.lineEnd,srcOffset:s.srcOffset+c.srcOffset}:t.lastSegment=null,t.tokens}catch{return null}}getTailLines(e,t){if(t<=0)return"";let n=t;for(let o=e.length-1;o>=0;o--)if(e.charCodeAt(o)===10&&(n--,n===0))return e.slice(o+1);return e}endsInsideOpenFence(e){const n=e.length>4e3?e.length-4e3:0,o=e.slice(n),s=o.length;let i=null,r=0;for(;r<=s;){let l=o.indexOf(` +`,r);l===-1&&(l=s);let a=r;for(;a=3&&(i?i.marker===u&&d>=i.length&&(i=null):i={marker:u,length:d})}}if(l===s)break;r=l+1}return i!==null}peek(){return this.cache?.tokens??Jee}getStats(){return{...this.stats}}appendTokens(e,t,n=0,o=t.length){for(let s=n;sS9?n.slice(n.length-S9):n,o&&(e.globalStateReason=o),o}ensureLastSegment(e){return e.lastSegment!==void 0||(e.lastSegment=this.getLastSegment(e.tokens,e.src)),e.lastSegment}getLastSegment(e,t,n=0,o=e.length,s,i){if(o<=n)return null;let r=Number.POSITIVE_INFINITY,l=-1,a=0;for(let u=o-1;u>=n;u--){const c=e[u];if(c.map&&(c.map[0]l&&(l=c.map[1])),c.nesting<0){a+=-c.nesting;continue}if(c.nesting>0){if(a-=c.nesting,c.level===0&&a<=0){const d=Number.isFinite(r)?r:c.map?.[0]??0,f=l>=d?l:c.map?.[1]??d;return{tokenStart:u,tokenEnd:o,lineStart:d,lineEnd:f,srcOffset:this.getLineStartOffset(t,d,s,i)}}continue}if(c.level===0&&a===0){const d=Number.isFinite(r)?r:c.map?.[0]??0,f=l>=d?l:c.map?.[1]??d;return{tokenStart:u,tokenEnd:o,lineStart:d,lineEnd:f,srcOffset:this.getLineStartOffset(t,d,s,i)}}}return null}getLineStartOffset(e,t,n,o){if(n!==void 0&&o!==void 0&&t>=o)return this.getLineStartOffsetFrom(e,n,t-o);if(t<=0)return 0;let s=t,i=-1;for(;s>0;){if(i=e.indexOf(` +`,i+1),i===-1)return e.length;s--}return i+1}getLineStartOffsetFrom(e,t,n){if(n<=0)return t;let o=n,s=t-1;for(;o>0;){if(s=e.indexOf(` +`,s+1),s===-1)return e.length;o--}return s+1}mayContainReferenceDefinition(e){return e.includes("]:")?/(?:^|\n)[ \t]{0,3}\[[^\]\n]+\]:/.test(e):!1}canDirectlyParseAppend(e){if(!this.endsWithBlankLine(e.src))return!1;const t=this.ensureLastSegment(e);if(!t)return!1;switch(e.tokens[t.tokenStart]?.type){case"paragraph_open":case"heading_open":case"fence":case"code_block":case"html_block":case"hr":case"table_open":return!0;default:return!1}}tryContainerTailAppendMerge(e,t,n,o,s,i){if(!i||this.mayContainReferenceDefinition(i))return null;const r=t.tokens[s.tokenStart];switch(r?.type){case"bullet_list_open":case"ordered_list_open":return this.tryListTailAppendMerge(e,t,n,o,s,i,r);case"table_open":return this.tryTableTailAppendMerge(e,t,n,o,s,i,r);default:return null}}tryListTailAppendMerge(e,t,n,o,s,i,r){if(t.src.length===0||t.src.charCodeAt(t.src.length-1)!==10)return null;const l=s.lineEnd-s.lineStart,a=t.src.length-s.srcOffset;if(l0&&this.shiftTokenLines(d,f);const h=this.getListParagraphMode(t.tokens,s.tokenStart,t.tokens.length,r.level),g=this.getListParagraphMode(c,0,c.length,0);(h==="loose"||g==="loose"||this.endsWithBlankLine(t.src)||(c[0]?.map?.[0]??0)>0)&&(this.setListParagraphVisibility(t.tokens,s.tokenStart,t.tokens.length,r.level,!1),this.setListParagraphVisibility(d,0,d.length,r.level,!1)),t.tokens.splice(t.tokens.length-1,0,...d),t.src=e,t.env=n,t.globalStateReason=null;const m=f+Ko(i);t.lineCount=m;const w=this.getDocLineCount(e,m);return r.map&&(r.map[1]=w),t.lastSegment={tokenStart:s.tokenStart,tokenEnd:t.tokens.length,lineStart:s.lineStart,lineEnd:w,srcOffset:s.srcOffset},t.tokens}tryTableTailAppendMerge(e,t,n,o,s,i,r){if(t.src.length===0||t.src.charCodeAt(t.src.length-1)!==10||/(?:^|\n)[ \t]*\n/.test(i))return null;const l=s.lineEnd-s.lineStart,a=t.src.length-s.srcOffset;if(l=0?d.slice(f.tbodyOpenIndex+1,f.tbodyCloseIndex):d.slice(f.tbodyOpenIndex,f.tbodyCloseIndex+1);if(g.length===0)return null;const m=s.lineEnd-2;m!==0&&this.shiftTokenLines(g,m);const w=h.tbodyCloseIndex>=0?h.tbodyCloseIndex:h.tableCloseIndex,_=t.lineCount??Ko(t.src);t.tokens.splice(w,0,...g),t.src=e,t.env=n,t.globalStateReason=null;const v=_+Ko(i);t.lineCount=v;const k=this.getDocLineCount(e,v);if(r.map&&(r.map[1]=k),h.tbodyOpenIndex>=0){const y=t.tokens[h.tbodyOpenIndex];y?.map&&(y.map[1]=k)}return t.lastSegment={tokenStart:s.tokenStart,tokenEnd:t.tokens.length,lineStart:s.lineStart,lineEnd:k,srcOffset:s.srcOffset},t.tokens}getTableHeaderContext(e){const t=e.indexOf(` +`);if(t<0)return null;const n=e.indexOf(` +`,t+1);return n<0?null:e.slice(0,n+1)}getTableBodySection(e,t,n,o){if(t<0||t>=n||e[t]?.type!=="table_open")return null;let s=-1;for(let l=n-1;l>t;l--){const a=e[l];if(a.type==="table_close"&&a.level===o){s=l;break}}if(s<0)return null;let i=-1,r=-1;for(let l=t+1;l=0){for(let l=s-1;l>i;l--){const a=e[l];if(a.type==="tbody_close"&&a.level===o+1){r=l;break}}if(r<0)return null}return{tableCloseIndex:s,tbodyOpenIndex:i,tbodyCloseIndex:r}}isSingleTopLevelContainer(e,t,n,o){if(e.length<2)return!1;const s=e[0],i=e[e.length-1];if(s.type!==t||i.type!==n||s.level!==0||i.level!==0||o!==void 0&&s.markup!==o)return!1;let r=0;for(let l=0;l0&&l0||a.nesting<0)&&(r+=a.nesting)}return r===0}getListParagraphMode(e,t,n,o){let s=!1,i=!1;const r=o+2;for(let l=t;l=0;){const o=e.charCodeAt(n);if(o===32||o===9){n--;continue}return o===10}return!0}getDocLineCount(e,t=Ko(e)){return e.length===0?0:e.charCodeAt(e.length-1)===10?t:t+1}shiftTokenLines(e,t){if(t===0)return;let n=null;for(let o=0;o=0;i--)n.push(s.children[i]);for(;n.length>0;){const i=n.pop();if(i.map&&(i.map[0]+=t,i.map[1]+=t),i.children)for(let r=i.children.length-1;r>=0;r--)n.push(i.children[r])}}}}};const yC={default:jee,zero:Vee,commonmark:Uee};function ote(e){return{core:e.core.ruler.version,block:e.block.ruler.version,inline:e.inline.ruler.version,inline2:e.inline.ruler2.version}}function ste(e,t){return e.core.ruler.version!==t.core||e.block.ruler.version!==t.block||e.inline.ruler.version!==t.inline||e.inline.ruler2.version!==t.inline2}function kC(e){return e.experimental?{...e,...e.experimental}:e}function gr(e,t){if(!e)return!1;if(Object.prototype.hasOwnProperty.call(e,t)&&e[t]!==void 0)return!0;const n=e.experimental;return!!n&&Object.prototype.hasOwnProperty.call(n,t)&&n[t]!==void 0}function bC(e,t,n){for(let o=0;o=4?n.quotes=[S[0],S[1],S[2],S[3]]:n.quotes=["“","”","‘","’"]}let r=bC(i?.options,s,["fullChunkSizeChars","fullChunkSizeLines","fullChunkMaxChunks"]),l=bC(i?.options,s,["streamChunkSizeChars","streamChunkSizeLines","streamChunkMaxChunks"]),a=CC(i?.options,s,"fullChunkedFallback"),u=CC(i?.options,s,"streamChunkedFallback"),c=!1,d=null,f=null;const h=new ZQ;let g=null;const m=()=>(g||(g=new Xee(n)),g);let w=null;const _=()=>(w||(w=new nte(h)),w);let v=null;const k=()=>(v||(v=new rE),v),y=S=>!c&&!!d&&!ste(S,d),x=(S,I)=>o==="default"&&!c&&g===null&&f!==null&&S.parse===f&&y(S)&&!S.stream.enabled&&I<(S.options.autoUnboundedThresholdChars??4e6)&&S.options.html===!1&&S.options.xhtmlOut===!1&&S.options.breaks===!1&&S.options.langPrefix==="language-"&&S.options.linkify===!1&&S.options.typographer===!1&&S.options.highlight===null,M=(S,I)=>o==="default"&&!c&&y(S)&&!S.stream.enabled&&!S.options.fullChunkedFallback&&I<(S.options.autoUnboundedThresholdChars??4e6)&&S.options.html===!1&&S.options.linkify===!1&&S.options.typographer===!1,$={core:h,block:h.block,inline:h.inline,get linkify(){const S=k();return Object.defineProperty(this,"linkify",{value:S,writable:!0,configurable:!0}),S},get renderer(){const S=m();return Object.defineProperty(this,"renderer",{value:S,writable:!0,configurable:!0}),S},options:n,__explicitFullChunkConfig:r,__explicitStreamChunkConfig:l,__explicitFullChunkFallbackSetting:a,__explicitStreamChunkFallbackSetting:u,__canUseImplicitLargeInputStrategy(){return y(this)},set(S){const I=kC(S);return this.options={...this.options,...I},(gr(S,"fullChunkSizeChars")||gr(S,"fullChunkSizeLines")||gr(S,"fullChunkMaxChunks"))&&(r=!0,this.__explicitFullChunkConfig=!0),(gr(S,"streamChunkSizeChars")||gr(S,"streamChunkSizeLines")||gr(S,"streamChunkMaxChunks"))&&(l=!0,this.__explicitStreamChunkConfig=!0),gr(S,"fullChunkedFallback")&&(a=!0,this.__explicitFullChunkFallbackSetting=!0),gr(S,"streamChunkedFallback")&&(u=!0,this.__explicitStreamChunkFallbackSetting=!0),g&&g.set(I),typeof I.stream=="boolean"&&(this.stream.enabled=I.stream,w&&(w.reset(),w.resetStats())),this},configure(S){const I=typeof S=="string"?yC[S]:S;if(!I)throw new Error("Wrong `markdown-it` preset, can't be empty");if(I.options&&this.set(I.options),I.components){const P=I.components;P.core?.rules&&this.core.ruler.enableOnly(P.core.rules),P.block?.rules&&this.block.ruler.enableOnly(P.block.rules),P.inline?.rules&&this.inline.ruler.enableOnly(P.inline.rules),P.inline2?.rules&&this.inline.ruler2.enableOnly(P.inline2.rules)}return this},enable(S,I){const P=Array.isArray(S)?S:[S],D=[this.core?.ruler,this.block?.ruler,this.inline?.ruler,this.inline?.ruler2],T=new Set;for(const L of D){if(!L)continue;const B=L.enable(P,!0);for(let H=0;H!T.has(B));if(L.length)throw new Error(`Rules manager: invalid rule name ${L.join(", ")}`)}return this},disable(S,I){const P=Array.isArray(S)?S:[S],D=[this.core?.ruler,this.block?.ruler,this.inline?.ruler,this.inline?.ruler2],T=new Set;for(const L of D){if(!L)continue;const B=L.disable(P,!0);for(let H=0;H!T.has(B));if(L.length)throw new Error(`Rules manager: invalid rule name ${L.join(", ")}`)}return this},use(S,...I){const P=typeof S=="function"?S:S&&typeof S.default=="function"?S.default:void 0;if(!P)throw new TypeError("MarkdownIt.use: plugin must be a function");const D=[this,...I],T=S;return c=!0,P.apply(T,D),this},render(S,I){let P;if(x(this,S.length)){I!==void 0&&(mi(I),P=h9("render"));const L=P?rd():0,B=P?uC(S,P):aC(S);if(P&&(P.attemptMs=rd()-L,B===null&&(P.fallbackReason="unsupported-stock-subset"),t1(I,P)),B!==null)return I!==void 0&&ss(I,{area:"render",path:"stock-fast",reason:"stock-subset"}),B}const D=I??{},T=this.parse(S,D);return P&&t1(D,P),m().render(T,this.options,D)},async renderAsync(S,I){let P;if(x(this,S.length)){I!==void 0&&(mi(I),P=h9("render"));const L=P?rd():0,B=P?uC(S,P):aC(S);if(P&&(P.attemptMs=rd()-L,B===null&&(P.fallbackReason="unsupported-stock-subset"),t1(I,P)),B!==null)return I!==void 0&&ss(I,{area:"render",path:"stock-fast",reason:"stock-subset"}),B}const D=I??{},T=this.parse(S,D);return P&&t1(D,P),m().renderAsync(T,this.options,D)},renderIterable(S,I={}){const P=this.parseIterable(S,I);return m().render(P,this.options,I)},async renderAsyncIterable(S,I={}){const P=await this.parseAsyncIterable(S,I);return m().renderAsync(P,this.options,I)},renderInline(S,I={}){const P=this.parseInline(S,I);return m().render(P,this.options,I)},validateLink:OE,normalizeLink:PE,normalizeLinkText:DE,utils:xX,helpers:{...fJ},parse(S,I){if(typeof S!="string")throw new TypeError("Input data should be a String");if(I!==void 0&&mi(I),M(this,S.length)){const L=I===void 0?void 0:h9("parse"),B=L?rd():0,H=ree(S,L);if(L&&(L.attemptMs=rd()-B,H===null&&(L.fallbackReason="unsupported-stock-subset"),t1(I,L)),H!==null)return I!==void 0&&ss(I,{area:"parse",path:"stock-fast",reason:"stock-subset"}),H}const P=I??{};let D;if(!this.stream.enabled&&!this.options.fullChunkedFallback&&y(this)){const L=YE(this,S.length);if(L==="yes"){const B=z1(this,S,P);return ss(I,{area:"parse",path:"auto-unbounded",unbounded:!0,reason:"char-threshold"}),B}L==="need-lines"&&(D=Ko(S))}if(!this.stream.enabled){const L=S.length,B=this.options.autoTuneChunks!==!1,H=r,O=!a&&y(this),F=!!this.options.fullChunkedFallback,W=O&&L>=2e5;let z;(F||W||D!==void 0)&&(z=D??Ko(S));const U=(F||W)&&B&&!H?Wee(L,z,this.options):null;if(F||W){const q=z??0;if(F?L>=(this.options.fullChunkThresholdChars??2e4)||q>=(this.options.fullChunkThresholdLines??400):W){if(U&&U.strategy!=="plain"){const K=qm(this,S,P,{maxChunkChars:U.maxChunkChars,maxChunkLines:U.maxChunkLines,fenceAware:U.fenceAware,maxChunks:U.maxChunks});return I&&wC(I,F?"explicit-full-chunk":"default-large-string"),K}if(F){const K=(oe,ve,G)=>oeG?G:oe,ie=this.options.fullChunkAdaptive!==!1,ne=this.options.fullChunkTargetChunks??8,Y=K(Math.ceil(L/ne),8e3,64e3),le=K(Math.ceil(q/ne),150,700),Ee=ie?Y:this.options.fullChunkSizeChars??1e4,de=ie?le:this.options.fullChunkSizeLines??200,he=ie?K(Math.ceil(L/64e3),ne,32):this.options.fullChunkMaxChunks,pe=qm(this,S,P,{maxChunkChars:Ee,maxChunkLines:de,fenceAware:this.options.fullChunkFenceAware??!0,maxChunks:he});return I&&wC(I,"explicit-full-chunk"),pe}}}if(D!==void 0&&y(this)&&GE(this,L,z??D)){const q=z1(this,S,P);return ss(I,{area:"parse",path:"auto-unbounded",unbounded:!0,reason:"line-threshold"}),q}}const T=Ni(S);return ss(I,{area:"parse",path:"plain",reason:"default-plain"}),zd(P,T,()=>h.parse(S,P,this).tokens)},parseIterable(S,I={}){return mi(I),Dee(this,S,I)},parseAsyncIterable(S,I={}){return mi(I),Bee(this,S,I)},parseIterableToSink(S,I,P={}){return mi(P),Hee(this,S,I,P)},parseAsyncIterableToSink(S,I,P={}){return mi(P),zee(this,S,I,P)},parseInline(S,I={}){if(typeof S!="string")throw new TypeError("Input data should be a String");mi(I),Wp(I)&&aa(I);const P=h.createState(S,I,this);return P.inlineMode=!0,h.process(P),P.tokens}};if($.stream={enabled:!!n.stream,parse(S,I){return $.stream.enabled?_().parse(S,I,$):$.parse(S,I??{})},reset(){_().reset()},peek(){return w?w.peek():[]},stats(){return w?w.getStats():{total:0,cacheHits:0,appendHits:0,unboundedAppendHits:0,tailHits:0,fullParses:0,resets:0,chunkedParses:0,lastMode:"idle"}},resetStats(){w&&w.resetStats()}},i?.components){const S=i.components;S.core?.rules&&$.core.ruler.enableOnly(S.core.rules),S.block?.rules&&$.block.ruler.enableOnly(S.block.rules),S.inline?.rules&&$.inline.ruler.enableOnly(S.inline.rules),S.inline2?.rules&&$.inline.ruler2.enableOnly(S.inline2.rules)}return d=ote($),f=$.parse,$}var rte=ite;const tI=["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"],lte=["a","abbr","b","bdi","bdo","button","cite","code","data","del","dfn","em","font","i","ins","kbd","label","mark","q","s","samp","small","span","strong","sub","sup","time","u","var"],nI=["article","aside","blockquote","details","div","figcaption","figure","footer","header","h1","h2","h3","h4","h5","h6","li","main","nav","ol","p","pre","section","summary","table","tbody","td","th","thead","tr","ul"],ate=["svg","g","path"],ute=["address","audio","body","canvas","caption","colgroup","datalist","dd","dialog","dl","dt","fieldset","form","head","hgroup","html","iframe","legend","map","menu","meter","noscript","object","optgroup","option","output","picture","progress","rp","rt","ruby","script","select","style","template","textarea","tfoot","title","video"],cte=["onclick","onerror","onload","onmouseover","onmouseout","onmousedown","onmouseup","onkeydown","onkeyup","onfocus","onblur","onsubmit","onreset","onchange","onselect","ondblclick","ontouchstart","ontouchend","ontouchmove","ontouchcancel","onwheel","onscroll","oncopy","oncut","onpaste","oninput","oninvalid","onsearch","innerhtml","outerhtml","textcontent","innertext","srcdoc","ping"],dte=["action","data","href","src","srcset","poster","xlink:href","formaction"],fte=["script"],pte=["pre","iframe","picture","script","style","table","tbody","td","tfoot","th","thead","textarea","tr","title","video"],eu=new Set(tI),oI=new Set(nI),xp=new Set([...tI,...lte,...nI,...ate]),sI=new Set([...xp,...ute]),hte=new Set(cte),mte=new Set(dte),Vp=new Set(fte),iI=new Set(pte);function rI(e){let t="";for(const n of e){const o=n.charCodeAt(0);o<=31||o>=127&&o<=159||/\s/u.test(n)||(t+=n)}return t}const gte={amp:"&",bsol:"\\",colon:":",newline:` +`,sol:"/",tab:" "};function lI(e){return e.replace(/&(?:#(\d+)|#x([0-9a-f]+)|([a-z][a-z0-9]+));?/gi,(t,n,o,s)=>{const i=n??o;if(i){const r=Number.parseInt(i,n?10:16);try{return Number.isFinite(r)?String.fromCodePoint(r):""}catch{return""}}return gte[String(s??"").toLowerCase()]??t})}const fh=new Set(["http","https","mailto","tel"]),vte=new Set(["javascript","vbscript","data","file","ftp","blob","filesystem","intent","chrome","chrome-extension","moz-extension","ms-browser-extension","view-source"]),Lu=new Set(["http","https"]);function aI(e){return e.match(/^([a-z][a-z0-9+.-]*):/i)?.[1]?.toLowerCase()??""}const yte=/^https?:\/\//i;function kte(e){if(!yte.test(e))return!1;for(const t of e){const n=t.charCodeAt(0);if(t==="&"||n<=32||n>=127&&n<=159||n>127&&/\s/u.test(t))return!1}return!0}function bte(e,t,n){if(!j1(t,n)||!e.startsWith("file:///"))return!1;const o=e.charAt(8);return o!=="/"&&o!=="\\"}function j1(e,t){return e?(e==="a"||e==="area")&&(!t||t==="href"||t==="xlink:href"):!t||t==="href"}function Cte(e,t){return t==="href"||t==="xlink:href"?j1(e,t)?fh:Lu:t==="src"||t==="srcset"||t==="poster"||t==="action"||t==="formaction"||t==="data"?Lu:(j1(e,t),fh)}function ic(e,t={}){if(kte(e))return!1;const n=rI(lI(e)).toLowerCase(),o=String(t.tagName??"").toLowerCase(),s=String(t.attrName??"").toLowerCase();if(!n)return!1;if(n.startsWith("data:")){const r=/^data:image\/(?:png|gif|jpe?g|webp|avif|bmp);/i.test(n);return o==="img"&&s==="src"?!r:!0}if(/^[\\/]{2}/.test(n))return!0;if(n.startsWith("/")||n.startsWith("./")||n.startsWith("../")||n.startsWith("#")||n.startsWith("?"))return!1;const i=aI(n);return i?i==="file"?!bte(n,o,s):j1(o,s)?vte.has(i):!Cte(o,s).has(i):!1}function wte(e){const t=lI(String(e??"")).trim();if(!t||t.startsWith("#")||t.startsWith("/")||t.startsWith("./")||t.startsWith("../")||t.startsWith("?"))return!1;const n=aI(rI(t).toLowerCase());return n==="http"||n==="https"}function _te(e,t={}){const n=String(e??"").trim();return n?ic(n,t)?"":n:""}function _C(e){return _te(e,{tagName:"img",attrName:"src"})}function xte(e,t,n){function o(f){return f.trim().split(" ",2)[0]===t}function s(f,h,g,m,w){return f[h].nesting===1&&f[h].attrJoin("class",t),w.renderToken(f,h,g,m,w)}n=n||{};const i=3,r=n.marker||":",l=r.charCodeAt(0),a=r.length,u=n.validate||o,c=n.render||s;function d(f,h,g,m){let w,_=!1,v=f.bMarks[h]+f.tShift[h],k=f.eMarks[h];if(l!==f.src.charCodeAt(v))return!1;for(w=v+1;w<=k&&r[(w-v)%a]===f.src[w];w++);const y=Math.floor((w-v)/a);if(y=g||(v=f.bMarks[$]+f.tShift[$],k=f.eMarks[$],v=4)){for(w=v+1;w<=k&&r[(w-v)%a]===f.src[w];w++);if(!(Math.floor((w-v)/a)=2){const r=Number(i[0]),l=Number(i[1]);Number.isFinite(r)&&Number.isFinite(l)&&(s.map=[r+t,Math.min(l+t,n)])}Array.isArray(s.children)&&uI(s.children,t,n)}}function Ate(e){["admonition","info","warning","error","tip","danger","note","caution"].forEach(t=>{e.use(xte,t,{render(n,o){return n[o].nesting===1?`
        `:`
        +`}})}),e.block.ruler.before("fence","vmr_container_fallback",(t,n,o,s)=>{const i=t,r=i.bMarks[n]+i.tShift[n],l=i.eMarks[n],a=i.src.slice(r,l),u=a.match(/^:::\s*([^\s{]+)/);if(!u)return!1;const c=u[1];if(!c.trim())return!1;const d=a.slice(u[0].length).trim();let f,h;const g=d.indexOf("{"),m=g>=0?d.slice(g).trimStart():void 0;if(g===-1)f=d||void 0;else{if(f=d.slice(0,g).trim()||void 0,m?.startsWith("{")){let M=0,$=-1;for(let S=0;S0&&(h=m.slice(0,$))}h||(f=d||void 0)}if(s)return!0;const w=!!i.env.__markstreamFinal;let _=n+1,v=!1;for(;_<=o;){const M=i.bMarks[_]+i.tShift[_],$=i.eMarks[_];if(i.src.slice(M,$).trim()===":::"){v=!0;break}_++}v||(_=o);const k=i.push("vmr_container_open","div",1);if(k.attrSet("class",`vmr-container vmr-container-${c}`),k.map=[n,v?_:o],k.meta={...k.meta??{},unclosed:!v&&!w},f&&k.attrSet("data-args",f),h)try{const M=JSON.parse(h);for(const[$,S]of Object.entries(M)){const I=S!=null&&typeof S=="object";k.attrSet(`data-${$}`,I?JSON.stringify(S):String(S))}}catch{const M=Ste(h);if(M)for(const[$,S]of Object.entries(M)){const I=S!=null&&typeof S=="object";k.attrSet(`data-${$}`,I?JSON.stringify(S):String(S))}else k.attrSet("data-attrs",h)}const y=[];for(let M=n+1;M<_;M++){const $=i.bMarks[M]+i.tShift[M],S=i.eMarks[M];y.push(i.src.slice($,S))}if(y.some(M=>M.trim().length>0)){let M=y.join(` +`);M.endsWith(` +`)||(M+=` +`),M.endsWith(` + +`)||(M+=` +`);const $=i.tokens[i.tokens.length-1];$&&($.raw=M);const S=[];i.md.block.parse(M,i.md,i.env,S),uI(S,n+1,n+1+y.length),i.tokens.push(...S)}const x=i.push("vmr_container_close","div",-1);return v||(x.hidden=!0,x.map=[o,o]),i.line=v?_+1:_,!0},{alt:["paragraph","reference","blockquote","list"]})}function Gr(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Yo(e){let t=!1,n=!1;for(let o=0;o")return o}return-1}function C2(e){const t=[],n=/\s([\w:-]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'>]+)))?/g;let o;for(;(o=n.exec(e))!==null;){const s=o[1];if(!s)continue;const i=o[2]||o[3]||o[4]||"";t.push([s,i])}return t}const Mte=/^[a-z][a-z0-9_-]*$/;function xC(e){return Mte.test(String(e??"").trim().toLowerCase())}function xr(e){const t=String(e??"").trim();if(!t)return"";if(!t.startsWith("<"))return xC(t)?t.toLowerCase():"";let n=1;for(;n]/.test(i)?"":xC(s)?s:""}function Ec(e){if(!e||e.length===0)return[];const t=new Set,n=[];for(const o of e){const s=xr(o);!s||t.has(s)||(t.add(s),n.push(s))}return n}function Tte(...e){const t=new Set,n=[];for(const o of e)for(const s of Ec(o))t.has(s)||(t.add(s),n.push(s));return n}function Ete(e){const t=Ec(e);return{key:t.join(","),tags:t}}function cI(e){return xr(e)}function Ite(e,t){const n=String(e??""),o=xr(t);if(!o)return!1;const s=Gr(o),i=n.match(new RegExp(String.raw`^\s*<\s*${s}(?:\s[^>]*)?(\s*\/)?>`,"i"));return i?i[1]?!0:new RegExp(String.raw`<\s*\/\s*${s}\s*>`,"i").test(n):!1}function dI(e,t){const n=xr(t);return!!n&&!xp.has(n)&&!Ite(e,n)}function Lte(e,t){const n=String(e??""),o=xr(t);if(!o)return n;const s=Gr(o),i=new RegExp(String.raw`^\s*<\s*${s}(?:\s[^>]*)?>\s*`,"i"),r=new RegExp(String.raw`\s*<\s*\/\s*${s}\s*>\s*$`,"i");return n.replace(i,"").replace(r,"")}const fI=eu,$te=xp,pI=new Set(oI);pI.delete("details");const Nte=/<([A-Z][\w-]*)(?=[\s/>]|$)/gi,Fte=/<\/\s*([A-Z][\w-]*)(?=[\s/>]|$)/gi,S3=/^<\s*(?:\/\s*)?([A-Z][\w-]*)/i,Rte=/^<\s*([A-Z][\w:-]*)(?=[\s/>]|$)/i;function Zm(e){return(e.match(S3)?.[1]??"").toLowerCase()}function q8(e){return/^\s*<\s*\//.test(e)}function K8(e,t){return fI.has(t)||/\/\s*>\s*$/.test(e)}function Ote(e,t){let n=0;for(let o=0;o0&&n--;continue}K8(s,i)||n++}}return n}function SC(e,t,n=0){const o=new RegExp(String.raw`<\s*(\/?)\s*${Gr(t)}(?=[\s>/])[^>]*>`,"gi");o.lastIndex=Math.max(0,n);let s=0,i;for(;(i=o.exec(e))!==null;){const r=i[0]??"",l=!!i[1],a=!l&&/\/\s*>$/.test(r);if(l){if(s===0)return{start:i.index,end:i.index+r.length};s--;continue}a||s++}return null}function Dte(e,t){const n=new RegExp(String.raw`<\s*(\/?)\s*${Gr(t)}(?=[\s>/])[^>]*>`,"gi");let o=0,s;for(;(s=n.exec(e))!==null;){const i=s[0]??"",r=!!s[1],l=!r&&/\/\s*>$/.test(i);if(r){o>0&&o--;continue}l||o++}return o}function Gm(e){const t=e;return String(t.raw??t.content??t.markup??"")}function Bte(e){const t=e;return t.meta||(t.meta={}),t.meta}function A9(e,t,n){const o=Bte(e);o.markstreamCustomHtmlRaw=t,o.markstreamCustomHtmlInner=n}function Hte(e,t){if(!t.size)return;const n=Array.from(t,h=>new RegExp(String.raw`<\s*${Gr(h)}(?=[\s>/])`,"i")),o=[];let s=!1;const i=h=>h?n.some(g=>g.test(h)):!1,r=h=>{if(!(!h||!o.length))for(const g of o)g.raw+=h,g.inner+=h},l=()=>{!o.length||!s||(r(` +`),s=!1)},a=h=>{r(h)},u=h=>{for(let m=0;m{const g=o[o.length-1]?.tag;if(!g)return null;const m=new RegExp(String.raw`^\s*<\s*\/\s*${Gr(g)}\s*>`,"i");return h.match(m)?.[0]??null},d=h=>!!c(h),f=(h,g,m)=>{const w=m??(h.type==="html_inline"?Zm(g):"");if(!(w&&t.has(w))){r(g);return}const _=q8(g),v=!_&&K8(g,w);if(_){if(!o.length||o[o.length-1].tag!==w){r(g);return}u(g);return}if(r(g),v){A9(h,g,"");return}o.push({tag:w,token:h,raw:g,inner:""})};for(const h of e){if(h.type==="inline"&&Array.isArray(h.children)){const g=String(h.content??"");if(d(g)?s=!1:l(),!o.length&&!i(g)){s=!1;continue}let m=0,w=!0;for(const _ of h.children){const v=Gm(_),k=_.type==="html_inline"?Zm(v):"",y=k&&t.has(k);let x=v;if(w&&g&&v&&(o.length||y)){const M=g.indexOf(v,m);if(M!==-1)a(g.slice(m,M)),x=g.slice(M,M+v.length),m=M+v.length;else{if(o.length&&!y)continue;w=!1}}f(_,x,k)}w&&g&&m0;continue}if(o.length&&typeof h.content=="string"){const g=Gm(h),m=h.type==="html_block"?c(g):null;if(m){u(`${s?` +`:""}${m}`),s=o.length>0;continue}if(!h.content)continue;l(),r(h.content),s=!0}}for(const h of o)A9(h.token,h.raw,h.inner)}function zte(e){return/^\s*<\s*[!?]/.test(e)}function Wte(e){const t=new Set($te);if(e&&Array.isArray(e))for(const n of e){const o=String(n??"").trim();if(!o)continue;const s=o.match(/^[<\s/]*([A-Z][\w-]*)/i);s&&t.add(s[1].toLowerCase())}return t}function AC(e,t){if(t.has(e))return!0;for(const n of t)if(n.startsWith(e))return!0;return!1}function Ute(e,t){let n=null;for(const i of e.matchAll(Nte)){const r=i.index??-1;if(r<0)continue;const l=(i[1]??"").toLowerCase();AC(l,t)&&Yo(e.slice(r))===-1&&(!n||r")&&(!n||i")&&(!n||i{const h=f,g=new Set(n),m=Array.isArray(h.env?.__markstreamCustomHtmlTags)?h.env.__markstreamCustomHtmlTags:[];for(const k of m){const y=xr(String(k??""));y&&g.add(y)}const w=Wte(Array.from(g)),_=new Set(qte);for(const k of g)_.add(k);return{autoCloseInlineTagSet:_,commonHtmlTags:w,customTagSet:g,shouldMergeHtmlBlockTag:k=>g.has(k)||!w.has(k)||pI.has(k)}},s=f=>{if(f.type==="html_block")return String(f.content??"");if(f.type!=="inline"||!Array.isArray(f.children)||f.children.length!==1)return"";const h=f.children[0];return h?.type!=="html_block"?"":String(f.content??h.content??"")},i=(f,h)=>{f.type="html_block",f.content=h,f.raw=h,f.children=[]},r=f=>f.replace(/^(?:\r?\n)+/,""),l=f=>/^(?: {4}|\t)/.test(f),a=f=>f.replace(/^(?: {4}|\t)/gm,""),u=(f,h)=>{const g=r(f);if(!/\S/.test(g))return[];if(l(g))return[{type:"code_block",content:a(g),raw:g}];const m=g.replace(/^[\t ]+/,"");if(!m)return[];if(m.startsWith("<"))return[{type:"html_block",content:m}];const w={type:"inline",tag:"",nesting:0,content:m,children:[{type:"text",content:m,raw:m}]};return h==="paragraph"?[{type:"paragraph_open",tag:"p",nesting:1},w,{type:"paragraph_close",tag:"p",nesting:-1}]:h==="text"?[{type:"text",content:m,raw:m}]:[w]},c=(f,h,g)=>f[h-1]?.type==="paragraph_open"&&f[h+1]?.type==="paragraph_close"?"inline":g,d=(f,h)=>{const g=r(h);return!/\S/.test(g)||f.type!=="inline"||!Array.isArray(f.children)?!1:(f.content=`${String(f.content??"")}${g}`,f.children.push({type:"text",content:g,raw:g}),!0)};e.core.ruler.after("inline","fix_html_inline_streaming",f=>{const h=f.tokens??[],{commonHtmlTags:g,customTagSet:m}=o(f);for(const w of h){const _=w;if(_.type!=="inline"||!Array.isArray(_.children))continue;const v=String(_.content??""),k=_.children.length?_.children:v.includes("<")?[{type:"text",content:v,raw:v}]:null;if(k)try{const y=Vte(k,g);if(_.children=y.children,y.pendingBuffer){const x=v.lastIndexOf(y.pendingBuffer);if(x!==-1){const M=v.slice(0,x);_.content=M,typeof _.raw=="string"&&(_.raw=M)}}}catch(y){console.error("[applyFixHtmlInlineTokens] failed to fix streaming html inline",y)}}Hte(h,m)}),e.core.ruler.push("fix_html_inline_tokens",f=>{const h=f.tokens??[],{autoCloseInlineTagSet:g,customTagSet:m,shouldMergeHtmlBlockTag:w}=o(f),_=[];for(let v=0;v0){const[x,M]=_[_.length-1];if(v!==M){if(k.type==="paragraph_open"||k.type==="paragraph_close"){h.splice(v,1),v--;continue}const $=String(k.content??k.raw??"");if($){const S=h[M],I=`${String(S.content||"")} +${$}`,P=Yo(I),D=P===-1?null:SC(I,x,P+1);if(D){const T=I.slice(0,D.end),L=I.slice(D.end);S.content=T,S.loading=!1,h.splice(v,1),_.pop();const B=d(S,L)?[]:u(L,c(h,v,"paragraph"));B.length&&h.splice(v,0,...B),v--;continue}S.content=I,S.loading!==!1&&(S.loading=!0)}h.splice(v,1),v--;continue}}const y=s(k);if(y){if(zte(y))continue;const x=(y.match(/<\s*(?:\/\s*)?([^\s>/]+)/)?.[1]??"").toLowerCase(),M=/^\s*<\s*\//.test(y);if(!x||!w(x))continue;if(i(k,y),!M)x&&!new RegExp(`^\\s*<\\s*${x}\\b[^>]*\\/\\s*>`,"i").test(y)&&Dte(y,x)>0&&_.push([x,v]);else if(_.length>0&&x&&_[_.length-1][0]===x){const[,$]=_[_.length-1],S=h[$];S.content=`${String(S.content||"")} +${y}`,S.loading=!1,_.pop(),h.splice(v,1),v--}continue}else if(_.length>0){if(k.type==="paragraph_open"||k.type==="paragraph_close"){h.splice(v,1),v--;continue}const x=k.content||"",M=new RegExp(`<\\s*\\/\\s*${_[_.length-1][0]}\\s*>`,"i").test(x);if(x){const[,$]=_[_.length-1],S=h[$];S.content=`${S.content||""} +${x}`,S.loading!==!1&&(S.loading=!M)}M&&_.pop(),h.splice(v,1),v--}else continue}if(m.size>0){const v=new Map,k=new Map,y=$=>{let S=v.get($);return S||(S=new RegExp(`<\\s*${$}\\b`,"i"),v.set($,S)),S},x=$=>{let S=k.get($);return S||(S=new RegExp(`<\\s*\\/\\s*${$}\\s*>`,"i"),k.set($,S)),S},M=[];for(let $=0;$0){const D=M[M.length-1],T=h[D.index],L=S.type==="html_block"?x(D.tag).exec(I):null;if(L){const O=L.index+L[0].length,F=I.slice(0,O),W=I.slice(O);T.content=`${String(T.content??"")} +${F}`,Array.isArray(T.children)&&T.children.push({type:"html_inline",content:``,raw:``}),M.pop();const z=d(T,W)?[]:u(W,c(h,$,"paragraph"));z.length?h.splice($,1,...z):(h.splice($,1),$--);continue}if(S.type!=="inline")continue;const B=Array.isArray(S.children)?S.children:[],H=Ote(B,D.tag);if(H!==-1){const O=B.slice(0,H+1),F=B.slice(H+1),W=O.map(z=>String(z?.content??z?.raw??"")).join("");if(T.content=`${String(T.content??"")} +${W}`,Array.isArray(T.children)&&T.children.push(...O),F.length){const z=F.map(U=>String(U.content??U.raw??"")).join("");if(z.trim()){const U=z.replace(/^\s+/,"");if(d(T,z))h.splice($,1),$--;else if(U.startsWith("<"))h.splice($,1,{type:"html_block",content:U});else{const q=u(z,c(h,$,"paragraph"));h.splice($,1,...q)}}else h.splice($,1),$--}else h.splice($,1),$--;M.pop();continue}T.content=`${String(T.content??"")} +${I}`,Array.isArray(T.children)&&T.children.push(...B),h.splice($,1),$--;continue}if(S.type!=="inline")continue;const P=Array.isArray(S.children)?S.children:[];for(const D of m)if((P.length?Pte(P,D):y(D).test(I)&&!x(D).test(I)?1:0)>0){M.push({tag:D,index:$});break}}}{let v=0;for(let k=0;k0?v--:(h.splice(k,1),k--))}}for(let v=0;v/]+)/)?.[1]??"").toLowerCase();if(S.startsWith("!")||S.startsWith("?")){k.loading=!1;continue}if(m.has(S)){const H=String(k.content??""),O=Yo(H),F=O===-1?null:SC(H,S,O+1);k.loading=F?!1:k.loading!==void 0?k.loading:!0;const W=F?.start??-1,z=F?F.end-F.start:0;if(W!==-1){const U=H.slice(0,W+z);let q="";O!==-1&&O]+)))?/g;let P;for(;(P=I.exec(k.content||""))!==null;)P[1],P[2]||P[3]||P[4];const D=String(k.content??""),T=new RegExp(`<\\/\\s*${S}\\s*>`,"i").exec(D),L=T?T.index:-1,B=T?T[0].length:0;if(L!==-1){const H=D.slice(0,L+B),O=(D.slice(L+B)||"").replace(/^\s+/,"");k.children=[{type:"html_block",content:H,tag:S,loading:!1}],k.content=H,k.raw=H,O&&h.splice(v+1,0,O.startsWith("<")?{type:"html_block",content:O}:{type:"text",content:O,raw:O})}else k.children=[{type:"html_block",content:k.content,tag:S,loading:!0}];continue}if(!k||k.type!=="inline")continue;if(k.children.length===2&&k.children[0].type==="html_inline"){const S=(k.children[0].content?.match(/<([^\s>/]+)/)?.[1]??"").toLowerCase(),I=k.children[1],P=String(I?.content??"").match(/^<\s*\/\s*([^\s>]+)/)?.[1]?.toLowerCase()??"";if(I?.type==="html_inline"&&P===S)continue;g.has(S)?(k.children[0].loading=!0,k.children[0].tag=S,k.children.push({type:"html_inline",tag:S,loading:!0,content:``})):k.children=[{type:"html_block",loading:!0,tag:S,content:String(k.children[0]?.content??"")+String(k.children[1]?.content??"")}];continue}else if(k.children.length===3&&k.children[0].type==="html_inline"&&k.children[2].type==="html_inline"){const S=(k.children[0].content?.match(/<([^\s>/]+)/)?.[1]??"").toLowerCase();if(g.has(S))continue;k.children=[{type:"html_block",loading:!1,tag:S,content:k.children.map(I=>I.content).join("")}];continue}if(!k.content?.startsWith("<")||k.children?.length!==1)continue;const y=String(k.content),x=k,M=x.children[0];if(M?.type!=="html_inline"){/^<\s*(?:\/\s*)?[A-Z][\w:-]*\s*$/i.test(y)&&(x.children.length=0);continue}const $=String(M.content??y).match(Rte)?.[1]?.toLowerCase()??"";if($){if(/\/\s*>\s*$/.test(y)||fI.has($)){x.children=[{type:"html_inline",content:y}];continue}x.children.length=0}}})}function Zte(e){const t=e.trim();return!t||/^&[a-z0-9#]+;/i.test(t)?!1:!!(/^(?:const|let|var|function|class|import|export|if|for|while|return|await|async|yield|try|catch|throw|new|typeof|instanceof|switch|case|break|continue|def|ruby|perl|print|echo|true|false|null|undefined|NaN|Infinity|this)\b/.test(t)||/[a-z_$][\w$]*(?:\.[a-z_$][\w$]*|\['[^']*'\]|\["[^"]*"\]|\[\d+\])*\s*\(/i.test(t)||/[a-z_$][\w$]*(?:\.[a-z_$][\w$]*|\['[^']*'\]|\["[^"]*"\]|\[[\d+\]])+/i.test(t)||/\w+\s*(?:===?|!==?|<=?|>=?|\+\+|--|&&|\|\||\?\.)/.test(t)||/^(?:!!|\+\+|--)\s*\w/.test(t)||/[\w$]+\s*(?:\+=|-=|\*=|\/=|%=|\*\*=|=)/.test(t)||/^(?:https?:\/\/|ftp:\/\/|file:\/\/|\/\/|www\.)/i.test(t)||/`[^`]*\$\{[^}]*\}[^`]*`/.test(t)||/<\/?[A-Z][a-zA-Z0-9]*/.test(t)||/<[a-z][a-z0-9]*\s[^>]+>/.test(t)||/^(["'`]).*\1\s*[;,]?$/.test(t)||/^\[[\s\S]*\]$/.test(t)||/^\{[\s\S]*\}$/.test(t)||/^\(\s*\)$/.test(t)||/[\w$]+(?:\s*[+\-*/%<>=!&|^~:]+\s*[\w$]+|\s*\.\s*[\w$]+)/.test(t)||/=>|->|::/.test(t)||/^@[\w.$]+$/.test(t)||/^(?:0x[0-9a-fA-F]+|0b[01]+|0o[0-7]+|\d+(?:\.\d*)?(?:px|em|rem|%|vh|vw|deg|s|ms)?)$/.test(t)||/^\$[\w$]+\s*[=:]/.test(t)||/\|\s*\w+|\w+\s*\|/.test(t)||/^(?:git|npm|yarn|pnpm|bun|pip|cargo|go|rust|python|node|java|mvn|gradle|docker|kubectl)\s+/.test(t)||/(?:console|window|document|Math|JSON|Date|Array|Object|String|Number|Boolean)\.[a-zA-Z]/.test(t)||/^(?:\/\/|#|\/\*|\*\/|)/.test(t)||/^(?:<<<|<<\s*['"]?\w+['"]?)/.test(t))}function Gte(e,t={}){t.enabled!==!1&&e.core.ruler.after("inline","fix_indented_code_block",n=>{const o=n.tokens??[];for(let s=0;sa.trim().length>0);if(l.length===1&&!Zte(l[0]??"")){const a=l[0]??"",u=i.level??0;o.splice(s,1,{type:"paragraph_open",tag:"p",nesting:1,level:u},{type:"inline",tag:"",nesting:0,level:u,content:a,children:[{type:"text",content:a,level:u+1,raw:a}],block:!0},{type:"paragraph_close",tag:"p",nesting:-1,level:u}),s+=2}}})}const hI=/\.([a-z0-9]{1,15})$/i,Yte=/[_()[\]{}<>]/u,Xte=/^(?:https?:\/\/|ftp:\/\/|mailto:|www\.)/i,Jte=/[?#@]/u,Qte=/[\\/]/u,ene=/^[\p{L}\p{N}./\\-]+$/u,tne=/^[A-Za-z0-9-]{1,63}$/u,nne=/^xn--[a-z0-9-]{2,59}$/i,one=/^(?:[A-Z]{1,6}|\d{1,8})$/u,sne=/^(?=.{1,12}$)[A-Z0-9]+(?:[-.][A-Z0-9]+)*$/iu,ine=/文件名\s*[::]?|附件\s*[::]?|路径\s*[::]?|路徑\s*[::]?|文件列表\s*[::]?|文档列表\s*[::]?|文檔列表\s*[::]?|\bfile\s*names?\b\s*[::]?|\battachments?\b\s*[::]?|\bpaths?\b\s*[::]?|\bfile\s+lists?\b\s*[::]?|\bdocument\s+lists?\b\s*[::]?/iu,rne=/文件名\s*[::]?|文件\s*[::]?|附件\s*[::]?|档案\s*[::]?|檔案\s*[::]?|文档\s*[::]?|文檔\s*[::]?|资料\s*[::]?|資料\s*[::]?|路径\s*[::]?|路徑\s*[::]?|\bfile\s*name\b\s*[::]?|\battachments?\b\s*[::]?|\bfiles?\b\s*[::]?|\bdocuments?\b\s*[::]?|\bdocs?\b\s*[::]?|\bpaths?\b\s*[::]?/iu,lne=/股票代码|股票代碼|证券代码|證券代碼|(?:代码|代碼|交易所|后缀|後綴|市场|市場)(?=$|[\s::/|,,、()()])|\btickers?\b|\bsymbols?\b|\bexchanges?\b/iu,ane=2e3,une=512,cne={},dne=new Set(["ai","md","py","rs","sh","zip"]),mI=new Set(["as","bj","de","hk","l","ln","ny","pa","sh","ss","sz","t","us"]),fne=new Set([...mI,"at","ax","cn","co","it","jp","ks","mc","mx","nz","pl","sa","si","to","tw"]),pne=new Set(["com","dev","io","page","site"]),hne=new Set(["app","apk","dmg","exe","ipa","lock","log","markdown","webmanifest"]),mne=new Set(["7z","ai","astro","avi","bash","bz2","c","cjs","cpp","cs","csv","doc","docx","fish","flac","gif","go","gz","h","hpp","html","java","jpeg","jpg","js","json","jsx","kt","md","mdx","mjs","mov","mp3","mp4","pdf","php","png","ppt","pptx","ps1","py","rar","rb","rs","sh","sql","svg","swift","svelte","tar","tgz","toml","ts","tsx","txt","vue","wav","webp","xls","xlsx","xml","yaml","yml","zip","zsh"]),Xu=new Map;function MC(e,t){if(!e||e.length>une)return t;for(Xu.set(e,t);Xu.size>ane;){const n=Xu.keys().next().value;if(!n)break;Xu.delete(n)}return t}function Sp(e){return e?.filename===!0||e?.explicitFilename===!0||e?.marketTicker===!0}function M9(e,t){const n={filename:e?.filename||t?.filename,explicitFilename:e?.explicitFilename||t?.explicitFilename,marketTicker:e?.marketTicker||t?.marketTicker};return Sp(n)?n:void 0}function TC(e,t){if(!Sp(t))return e;const n=e?.__linkifyDemotionContext;return{...e,__linkifyDemotionContext:{filename:n?.filename||t?.filename,explicitFilename:n?.explicitFilename||t?.explicitFilename,marketTicker:n?.marketTicker||t?.marketTicker}}}function EC(e){const t=qp(e);return Sp(t)?t:void 0}function gne(e){return e.replace(/^[\s>*_`[\]((【《"'“‘]+/u,"").replace(/[\s<*_`\]))】》"'.。;;,,、::!?!?]+$/u,"")}function IC(e,t){if(!Sp(t))return;const n=String(e??"").trim().split(/\s+/u).map(gne).filter(Boolean);if(n.length===0)return;const o={};return t?.filename&&n.every(s=>Ym(s,{filename:!0,explicitFilename:t.explicitFilename}))&&(o.filename=!0),t?.explicitFilename&&o.filename&&(o.explicitFilename=!0),t?.marketTicker&&n.every(s=>Ym(s,{marketTicker:!0}))&&(o.marketTicker=!0),Sp(o)?o:void 0}function du(e,t=!1){let n;return{options(o){return t||o==null?TC(e,n):TC(e,M9(EC(o),IC(o,n)))},remember(o){const s=EC(o);n=t?M9(n,s):M9(s,IC(o,n))},reset(){n=void 0}}}function LC(e){return tne.test(e)&&!e.startsWith("-")&&!e.endsWith("-")}function vne(e){const t=e.split(".");if(t.length<2)return!1;const n=t[t.length-1]?.toLowerCase()??"";return LC(n)||nne.test(n)?t.every(LC):!1}function gI(e){return Array.from(e).some(t=>t.charCodeAt(0)>127)}function yne(e){return e.replace(/^[a-z][a-z0-9+.-]*:\/\//i,"").split(/[/?#]/,1)[0]??""}function kne(e){return e.split(".").some(t=>t.toLowerCase().startsWith("xn--"))}function vI(e,t,n){const o=yne(t);return gI(e)&&kne(o)&&String(n??"").toLowerCase().includes(o.toLowerCase())}function bne(e){if(!e)return!1;if(e.includes("文件")||e.includes("附件")||e.includes("路径")||e.includes("路徑")||e.includes("文档")||e.includes("文檔")||e.includes("档案")||e.includes("檔案")||e.includes("资料")||e.includes("資料")||e.includes("股票")||e.includes("证券")||e.includes("證券")||e.includes("代码")||e.includes("代碼")||e.includes("交易所")||e.includes("后缀")||e.includes("後綴")||e.includes("市场")||e.includes("市場"))return!0;const t=e.toLowerCase();return t.includes("file")||t.includes("attachment")||t.includes("document")||t.includes("doc")||t.includes("path")||t.includes("ticker")||t.includes("symbol")||t.includes("exchange")}function qp(e){const t=String(e??""),n=Xu.get(t);return n?(Xu.delete(t),Xu.set(t,n),n):bne(t)?MC(t,{explicitFilename:ine.test(t),filename:rne.test(t),marketTicker:lne.test(t)}):MC(t,cne)}function Cne(e){return vne(e.split(/[\\/]/)[0]??"")}function wne(e){const t=e.replace(/[^a-z]/gi,"");return t.length>=2&&t===t.toUpperCase()}function _ne(e){if(Yte.test(e)||!ene.test(e))return!0;if(Qte.test(e))return!Cne(e);const t=e.replace(hI,"");return gI(t)?!0:t.split(".").filter(Boolean).some(wne)}function xne(e,t,n){if(!(n?fne:mI).has(t))return!1;const o=e.slice(0,-(t.length+1));return o===""?e.startsWith("."):(n?sne:one).test(o)}function Ym(e,t={}){if(!e||Xte.test(e)||Jte.test(e))return!1;const n=e.match(hI);if(!n)return!1;const o=String(n[1]??"").toLowerCase();return xne(e,o,t.marketTicker===!0)?!0:mne.has(o)?!dne.has(o)||t.filename?!0:_ne(e):!!(t.explicitFilename&&pne.has(o)||t.filename&&hne.has(o))}const $C=["!"];function Ii(e){return{type:"text",content:e,raw:e}}function $u(e,t){t===1?e.push({type:"em_open",tag:"em",nesting:1}):t===2?e.push({type:"strong_open",tag:"strong",nesting:1}):t===3&&(e.push({type:"strong_open",tag:"strong",nesting:1}),e.push({type:"em_open",tag:"em",nesting:1}))}function Nu(e,t){t===1?e.push({type:"em_close",tag:"em",nesting:-1}):t===2?e.push({type:"strong_close",tag:"strong",nesting:-1}):t===3&&(e.push({type:"em_close",tag:"em",nesting:-1}),e.push({type:"strong_close",tag:"strong",nesting:-1}))}function wa(e,t,n){let o="";if(t.includes('"')){const s=t.split('"');t=s[0].trim(),o=s[1].trim()}return{type:"link",loading:n,href:t,title:o,text:e,children:[{type:"text",content:e,raw:e}],raw:`[${e}](${t})`}}function Sne(e,t){if(!(!e||!t)&&(e.href=String(e.href??"")+t,e.text=String(e.text??"")+t,e.raw=`[${e.text}](${e.href})`,Array.isArray(e.children)&&e.children.length)){const n=e.children[e.children.length-1];n?.type==="text"?(n.content=String(n.content??"")+t,n.raw=String(n.raw??"")+t):e.children.push(Ii(t))}}function NC(e,t){let n=-1;for(const o of t){const s=e.indexOf(o);s!==-1&&(n===-1||sn?.[0]==="href")?.[1];return typeof t=="string"?t:""}function Mne(e,t){if(!e)return;e.attrs=Array.isArray(e.attrs)?e.attrs:[];const n=e.attrs.findIndex(o=>o?.[0]==="href");n>=0?e.attrs[n][1]=t:e.attrs.push(["href",t])}function FC(e,t,n){let o="";for(let s=t+1;s{const n=t.tokens??[];for(let o=0;or.type==="code_inline"),o=new Map;let s=0;for(let r=0;r0&&u?RC(u):-1;if(c!==-1&&u)for(const d of u.slice(c))d==="("?s++:d===")"&&s>0&&s--}a!==-1&&(r=a);continue}if(!(l.type!=="text"||typeof l.content!="string"))for(const a of l.content)a==="("?s++:a===")"&&s>0&&s--}const i=qp(t);for(let r=0;r<=e.length-1;r++){r<0&&(r=0);const l=e[r];if(!l)break;if(l.type==="link_open"&&(l.markup==="linkify"||l.markup==="autolink")){let a=-1;for(let u=r+1;u0){const g=RC(u);g!==-1&&(d===-1||g=m.content.length){h-=m.content.length;continue}if(h<0)break;const w=m.content[h],_=m.content.slice(0,h);let v=m.content.slice(h);for(let x=g+1;x0&&(e.splice(g+1,k),a=g+1);let y=c;if(w==="!"&&f!==-1)y=c.slice(0,f);else if(v){const x=encodeURI(v);if(x&&c.endsWith(x))y=c.slice(0,c.length-x.length);else{const M=w?encodeURI(w):"",$=M?c.indexOf(M):-1;$!==-1&&(y=c.slice(0,$))}}y!==c&&Mne(l,y),v&&e.splice(a+1,0,Ii(v));break}}}if(!n){if(l?.type==="em_open"&&e[r-1]?.type==="text"&&e[r-1].content?.endsWith("*")){const a=e[r-1].content?.replace(/(\*+)$/,"")||"";e[r-1].content=a,l.type="strong_open",l.tag="strong",l.markup="**";for(let u=r+1;ud[0]==="href")?.[1]||"";if(e[r+3]?.type==="text"){const d=(e[r+3]?.content??"").indexOf(")"),f=d===-1;d===-1&&(c+=e[r+3]?.content?.slice(0,d)||"",e[r+3].content=""),a.push(wa(u,c,f));const h=e[r+3].content?.replace(/^\)\**/,"");h&&a.push(Ii(h)),e.splice(r-4,8,...a)}else a.push({type:"link",loading:!0,href:c,title:"",text:u,children:[{type:"text",content:c,raw:c}],raw:`[${u}](${c})`}),e.splice(r-4,7,...a);continue}else if(e[r-1].content==="]("&&e[r-3]?.type==="text"&&e[r-3].content?.endsWith(")"))if(e[r-2]?.type==="strong_open"){const[a,u]=e[r-3].content?.split("[**")||[];e[r+1].content=u||"",e[r-3].content=a||"",e[r-1].content=""}else if(e[r-2]?.type==="em_open"){const[a,u]=e[r-3].content?.split("[*")||[];e[r+1].content=u||"",e[r-3].content=a||"",e[r-1].content=""}else{const[a,u]=e[r-3].content?.split("[")||[];e[r+1].content=u||"",e[r-3].content=a||"",e[r-1].content=""}}if(l.type==="link_close"&&l.nesting===-1&&e[r-2]?.type==="link_open"&&e[r+1]?.type==="text"&&e[r-1]?.type==="text"){const a=e[r-1].content||"",u=e[r-2].attrs||[],c=u.find(_=>_[0]==="href")?.[1]||"",d=u.find(_=>_[0]==="title")?.[1]||"";let f=3,h=2;const g=(e[r-3]?.content||"").match(/^(\*+)$/),m=[];if(g){h+=1;const _=g[1].length;$u(m,_)}if(l.markup!=="linkify"&&e[r+1].type==="text"&&e[r+1]?.content?.startsWith("](")){f+=1;for(let _=r+1;_w[0]==="href")?.[1];e[r+5]?.type==="text"&&e[r+5].content==="."?(f=(m||f)+e[r+5].content,e[r+5].content=""):f=m||f,h+=3}let g=!0;if(l.nesting===-1&&(d=d.replace(/\*+$/,"")),e[r+2]?.type==="text"){const m=(e[r+2]?.content??"").indexOf(")");g=m===-1,m===-1&&(f+=e[r+2]?.content?.slice(0,m)||"",e[r+2].content="")}a.push(wa(d,f,g)),Nu(a,2),e.splice(r-2,h,...a)}if(l.type==="text"&&/\*+\[[^\]]*$/.test(l.content||"")&&e[r+1]?.type==="strong_open"&&e[r+2]?.type==="text"&&e[r+2].content==="]("&&e[r+3]?.type==="link_open"&&e[r+5]?.type==="link_close"&&e[r+6]?.type==="text"&&e[r+6].content===")"&&e[r+7]?.type==="strong_close"){const a=(l.content||"").match(/^(\*+)\[(.*)$/);if(a){const u=(a[2]||"")+a[1];let c=e[r+3]?.attrs?.find(f=>f[0]==="href")?.[1]||"";!c&&e[r+4]?.type==="text"&&(c=e[r+4].content||"");const d=[];$u(d,2),d.push(wa(u,c,!1)),Nu(d,2),e.splice(r,9,...d),r-=d.length-1;continue}}}}if(n)return e;for(let r=0;r{const n=t.tokens??[];for(let o=0;o{const n=t.tokens??[];for(let o=0;o=0&&e[g].type==="text"&&e[g].content==="";)g--;const m=e[g];let w=c+1;for(;w=0&&e[g].type==="text"&&e[g].content==="";)g--;const m=e[g];let w=c+1;for(;w{const n=t;try{const o=Wne(n.tokens??[],!!n.env?.__markstreamFinal,n.src??"");Array.isArray(o)&&(n.tokens=o)}catch(o){console.error("[applyFixTableTokens] failed to fix table tokens",o)}})}function OC(){return[{type:"table_open",tag:"table",attrs:null,map:null,children:null,content:"",markup:"",info:"",level:0,loading:!0,meta:null},{type:"thead_open",tag:"thead",attrs:null,block:!0,level:1,children:null},{type:"tr_open",tag:"tr",attrs:null,block:!0,level:2,children:null}]}function PC(){return[{type:"tr_close",tag:"tr",attrs:null,block:!0,level:2,children:null},{type:"thead_close",tag:"thead",attrs:null,block:!0,level:1,children:null},{type:"table_close",tag:"table",attrs:null,map:null,children:null,content:"",markup:"",info:"",level:0,meta:null}]}function DC(e){return[{type:"th_open",tag:"th",attrs:null,block:!0,level:3,children:null},{type:"inline",tag:"",children:null,content:e,level:4,attrs:null,block:!0},{type:"th_close",tag:"th",attrs:null,block:!0,level:3,children:null}]}function yI(e,t){if(!e.startsWith("|")||e.includes(` +`)||!e.endsWith("|"))return null;const n=e.slice(1).split("|");return n.at(-1)===""&&n.pop(),n.length>0&&n.every(o=>o.trim().length>0)?n:null}function T9(e){return yI(e)!==null}function kI(e){return/^:?-+:?$/.test(e.trim())}function Pne(e){if(!e.startsWith("|"))return!1;const t=e.slice(1).split("|");return t.at(-1)===""&&t.pop(),t.length>0&&t.every(kI)}function Dne(e){return/^(?:[::]-*|:?-+:?)?$/.test(e.trim())}function Bne(e){if(e==="")return!0;if(!e.startsWith("|"))return!1;const t=e.slice(1).split("|"),n=t.at(-1)??"";return t.slice(0,-1).every(kI)&&Dne(n)}function Hne(e){return e==="|"||e==="|:"}function zne(e){const t=yI(e);return t!==null&&t.every(n=>!n.includes(":"))}function Wne(e,t=!1,n=""){const o=[...e];if(e.length<3)return o;const s=e.length-2,i=e[s];if(i.type==="inline"){const r=String(i.content??""),l=r.split(` +`)[0]??"",[a="",u="",...c]=r.split(` +`),d=!t&&!r.includes(` +`)&&/\r?\n$/.test(n)&&T9(r);if(!t&&(r.includes(` +`)&&c.length===0&&T9(a)&&Bne(u)||d)){const f=l.slice(1,-1).split("|").map(g=>g.trim()).flatMap(g=>DC(g)),h=[...OC(),...f,...PC()];o.splice(s-1,3,...h)}else if(r.includes(` +`)&&c.length===0&&T9(a)&&Pne(u)){const f=l.slice(1,-1).split("|").map(g=>g.trim()).flatMap(g=>DC(g)),h=[...OC(),...f,...PC()];o.splice(s-1,3,...h)}else r.includes(` +`)&&c.length===0&&zne(a)&&Hne(u)&&(i.content=r.slice(0,-2),i.children.splice(2,1))}return o}function Une(e,t,n,o){const s=e.length;if(n==="$$"&&o==="$$"){let u=t;for(;u=0&&e[c]==="\\";)d++,c--;if(d%2===0)return u}u++}return-1}const i=n[n.length-1],r=o;let l=0,a=t;for(;a=0&&e[c]==="\\";)d++,c--;if(d%2===0){if(l===0)return a;l--,a+=r.length;continue}}const u=e[a];if(u==="\\"){a+=2;continue}u===i?l++:u===r[r.length-1]&&l>0&&l--,a++}return-1}var jne=Une;const Vne=["boldsymbol","mathbb","mathcal","mathfrak","mathrm","mathit","mathsf","vec","hat","bar","tilde","overline","underline","mathscr","mathnormal","operatorname","mathbf*"],Xm=Vne.map(e=>e.replace(/[.*+?^${}()|[\\]"\]/g,"\\$&")).join("|"),qne=/\\[a-z]+/i,bI="(?:\\\\|\\u0008)",Kne=new RegExp(String.raw`${bI}(?:${Xm})\s*\{[^}]+\}`,"i"),Zne=new RegExp(String.raw`(?:${bI})?(?:${Xm})\s*\{`,"i"),Gne=/\\(?:text|frac|left|right|times)/,Yne=/(?:^|[^+])\+(?!\+)|[=\-*/^<>]|\\times|\\pm|\\cdot|\\le|\\ge|\\neq/,Xne=/\b[A-Z]{2,}-[A-Z]{2,}\b/i,Jne=/[A-Z]+\s*\([^)]+\)/i,Qne=/^\(\s*[a-z](?:\s*,\s*[a-z])+\s*\)$/i,eoe=/\b(?:sin|cos|tan|log|ln|exp|sqrt|frac|sum|lim|int|prod)\b/,toe=/\b\d{4}\/\d{1,2}\/\d{1,2}(?:[ T]\d{1,2}:\d{2}(?::\d{2})?)?\b/,noe={"\b":"\\b","\v":"\\v","\f":"\\f"};function ooe(e){let t="";for(const n of e)t+=noe[n]??n;return t}function Ra(e){if(!e)return!1;const t=ooe(e),n=t.trim();if(toe.test(n)||n.includes("**"))return!1;if(n.length>2e3)return!0;const o=qne.test(t),s=Kne.test(t),i=Zne.test(t),r=Gne.test(t),l=/(?:^|[^\w\\])(?:[A-Z]|\\[A-Z]+)_(?:\{[^}]+\}|[A-Z0-9\\])/i.test(t)||/(?:^|[^\w\\])(?:[A-Z]|\\[A-Z]+)\^(?:\{[^}]+\}|[A-Z0-9\\])/i.test(t),a=Yne.test(t)&&!Xne.test(t),u=Jne.test(t),c=Qne.test(n),d=eoe.test(t),f=/^\([a-z]\)$/i.test(n)||/^(?:[a-z]|pi)$/i.test(n),h=/^(?:[A-Z][a-z]?(?:_\{?\d+\}?|\^\{?\d+\}?)?)+$/.test(n);return o||s||i||r||l||a||u||c||d||f||h}const CI="__markstreamMathPluginApplied",A3=80,wI=2e4,BC=wI+4096;function Z8(e){return!!e[CI]}function soe(e){e[CI]=!0}const _I=["ldots","cdots","quad","in","displaystyle","int_","lim","lim_","ce","pu","end","infty","perp","mid","operatorname","to","rightarrow","leftarrow","math","mathrm","mathit","mathbb","mathcal","mathfrak","implies","alpha","beta","gamma","delta","epsilon","lambda","sum","sum_","prod","sqrt","fbox","boxed","color","rule","edef","fcolorbox","hline","hdashline","cdot","times","pm","le","ge","neq","sin","cos","tan","log","ln","exp","frac","text","left","right"],ioe=["cdot","mathbf{","partial","mu_{"],xI=_I.slice().sort((e,t)=>t.length-e.length).map(e=>e.replace(/[.*+?^${}()|[\\]\\\]/g,"\\$&")).join("|"),SI="[ \r\b\f\v]",roe=new RegExp(`([^\\\\])(${ioe.map(e=>e).join("|")})+`,"g"),loe=/span\{([^}]+)\}/,aoe=/\\operatorname\{span\}\{((?:[^{}]|\{[^}]*\})+)\}/,uoe=/(^|[^\\])\\\r?\n/g,coe=/(^|[^\\])\\$/g,doe=/[\p{L}\p{M}\p{N}\p{Pe}\p{Pf}'′″‴|‖]/u,foe=new RegExp(`(${SI})|(${xI})\\b`,"g"),HC=new Map,zC=new Map;function poe(e){if(!e)return foe;const t=[...e];t.sort((r,l)=>l.length-r.length);const n=t.join(""),o=HC.get(n);if(o)return o;const s=`(?:${t.map(r=>r.replace(/[.*+?^${}()|[\\]\\"\]/g,"\\$&")).join("|")})`,i=new RegExp(`(${SI})|(${s})\\b`,"g");return HC.set(n,i),i}function hoe(e,t){const n=e?[]:[...t??[]];e||n.sort((l,a)=>a.length-l.length);const o=e?"__default__":n.join(""),s=zC.get(o);if(s)return s;const i=e?[Xm,xI].filter(Boolean).join("|"):[n.map(l=>l.replace(/[.*+?^${}()|[\\]\\\]/g,"\\$&")).join("|"),Xm].filter(Boolean).join("|"),r=new RegExp(`(^|[^\\\\\\w])(${i})\\s*\\{`,"g");return zC.set(o,r),r}const WC={" ":"t","\r":"r","\b":"b","\f":"f","\v":"v"};function UC(e){const t=/(^|[^\\])(__|\*\*)/g;let n=0;for(;t.exec(e)!==null;)n++;return n}function moe(e){return e.replace(/(^|[^\\])!+/gu,(t,n)=>{if(n&&doe.test(n))return t;const o=n?t.slice(n.length):t;return`${n}${"\\!".repeat(o.length)}`})}function jC(e){const t=/(^|[^\\])(__|\*\*)/g;let n,o=null;for(;(n=t.exec(e))!==null;)o={marker:n[2],index:n.index+(n[1]?.length??0)};return o}function _a(e,t){const n=t?.commands??_I,o=t?.escapeExclamation??!0,s=t?.commands==null,i=poe(s?void 0:n);let r=e.replace(i,(u,c,d,f,h)=>{if(c!==void 0&&WC[c]!==void 0)return`\\${WC[c]}`;if(d&&n.includes(d)){const g=h&&typeof f=="number"?h[f-1]:void 0;return g==="\\"||g&&/\w/.test(g)?u:`\\${d}`}return u});o&&(r=moe(r));let l=r;const a=hoe(s,s?void 0:n);return l=l.replace(a,(u,c,d)=>`${c}\\${d}{`),l=l.replace(loe,"span\\{$1\\}").replace(aoe,"\\operatorname{span}\\{$1\\}"),l=l.replace(uoe,`$1\\\\ +`),l=l.replace(coe,"$1\\\\"),l=l.replace(roe,"$1\\$2"),l}function VC(e){const t=e.trim();return!(!Ra(t)||/"[^"\n]{1,80}"\s*:\s*/.test(t)||!(/\\[a-z]+/i.test(t)||/[=+*/^<>]|\\times|\\pm|\\cdot|\\le|\\ge|\\neq/.test(t)||/[_^]/.test(t))&&/\s-\s/.test(t))}function AI(e){const t=[];let n=0;for(;n=n[0]&&t0;){if(e[i]==="\\"&&i+10;){if(e[l]==="\\"&&l+1=0&&e[n]==="\\";)o++,n--;return o%2===1}function M3(e,t){let n=t;for(;n0&&e[o-1]==="$"||o+1=l)break;const u=Jm(s,a);if(u){r=Math.max(a+Math.max(1,t.length),u[1]);continue}Kp(e,a)||i++,r=a+Math.max(1,t.length)}return i}function G8(e,t,n){const o=Mp(String(e??""));if(!o.endsWith(t))return-1;const s=o.length-t.length;if(s<=0||!Mp(o.slice(0,s)).trim()||Kp(o,s))return-1;const i=AI(o);if(Jm(i,s))return-1;const r=qC(o,t,0,s,i);if(t==="$$"){if(r%2===1)return-1}else if(r>qC(o,n,0,s,i))return-1;return s}function Ap(e){return e===" "||e===" "}function Mp(e){let t=e.length;for(;t>0&&Ap(e[t-1]);)t--;return e.slice(0,t)}function KC(e){let t=0;for(let n=0;n=48&&t<=57}function voe(e){if(e.length<3)return!1;const t=e[0];if(t!=="-"&&t!=="*"&&t!=="_"&&t!=="=")return!1;let n=0;for(let o=0;o=3}function yoe(e){const t=e.trim();if(!t)return!1;let n=0;t[n]===":"&&n++;let o=0;for(;t[n]==="-";)o++,n++;return o<3?!1:(t[n]===":"&&n++,n===t.length)}function koe(e){if(!e.includes("|"))return!1;const t=e[0]==="|"?e.slice(1):e;return(t.endsWith("|")?t.slice(0,-1):t).split("|").every(yoe)}function boe(e){let t=0;if(!ZC(e[t]))return!1;for(;ZC(e[t]);)t++;return e[t]!=="."&&e[t]!==")"?!1:Ap(e[t+1])}function MI(e){const t=e.trimStart();if(!t||t.startsWith("```")||t.startsWith("~~~")||t.startsWith(":::")||t[0]===">"||t[0]==="<")return!0;if(t[0]==="#"){let n=0;for(;t[n]==="#";)n++;if(n>=1&&n<=6&&Ap(t[n]))return!0}return!!((t[0]==="-"||t[0]==="+"||t[0]==="*")&&Ap(t[1])||boe(t)||voe(t)||koe(t))}function GC(e,t){return e?t?`${e} +${t}`:e:t}function T3(e){const t=String(e??"").trim();return t?Ra(t):!1}function YC(e){let t=0;for(let n=0;nA3){h=!0;break}const m=s[g],w=gd(m,c);if(w!==-1){const _=GC(f,m.slice(0,w));if(!T3(_)){h=!0;break}const v=m.slice(w+c.length),k=v.trim()?`suffix:${YC(v)}`:"nosuffix";return["closed",u,o+l,d,o+g,w,YC(_),k].join(":")}if(MI(m)){h=!0;break}if(f=GC(f,m),f.length>wI){h=!0;break}}if(!h&&T3(f))return["pending",u,o+l,d].join(":")}}return null}function I9(e,t){const n=String(e??"").trim();return!n||!/^\d[\d,.]*\s*[~~-]\s*$/.test(n)?!1:/\d/.test(String(t??""))}function woe(e){const t=String(e??"").trimStart(),n=t.match(/^\d+(?:,\d{3})*(?:\.\d+)?/);if(!n)return!1;const o=t.slice(n[0].length);return/^\s*(?:[+\-*/^_=<>]|\\[a-z]+)/i.test(o)?!1:o===""||/^[)\s,.!?;:]/.test(o)}function L9(e){const t=String(e??"").trim();return t?/^(?:\.{3,}|…+)$/.test(t):!1}function _oe(e,t){soe(e);const n=(r,l,a)=>{const u=String(l??"").replace(/^[\t ]+/,"").replace(/[\t ]+$/,"");if(!u)return;const c=r.push("paragraph_open","p",1);c.map=[a,a+1];const d=r.push("inline","",0);d.content=u,d.map=[a,a+1],d.children=[],r.push("paragraph_close","p",-1)},o=(r,l)=>{const a=r,u=!!t?.strictDelimiters,c=!a?.env?.__markstreamFinal,d=(v,k)=>{let y=k;for(;y=3&&(!y||/\s/.test(y))){const x=a.push("text","",0);return x.content=a.src.slice(a.pos,v),a.pos=v,!0}}const f=[["$$","$$"],["$","$"],["\\(","\\)"]],h=String(a.pending??""),g=Math.max(0,a.pos-h.length);let m=g,w=g;const _=g;for(const[v,k]of f){const y=a.src,x=AI(y),M=goe(y,c);let $=!1;v==="$$"&&m!==_&&(m=_);let S=-1,I=-1,P=0;const D=T=>{if((T==="undefined"||T==null)&&(T=""),T==="\\"){a.pos=a.pos+T.length,m=a.pos;return}if(T==="\\)"||T==="\\("){const H=a.push("text_special","",0);H.content=T==="\\)"?")":"(",H.markup=T,a.pos=a.pos+T.length,m=a.pos;return}if(!T)return;if(v==="$$"&&T.includes("$")){let H=0;for(;H0&&T[O-1]==="$"||O+10){const F=T.slice(0,L),W=a.push("text","",0);W.content=F,a.pos=a.pos+F.length,m=a.pos}const H=T.slice(L).match(/^!\[([^\]]*)\]\(([^)]+)\)/);if(H){const[,F,W]=H,z=W.match(/^(\S+)(?:\s+"([^"]+)")?\s*$/),U=z?z[1]:W,q=z&&z[2]?z[2]:null,K=a.push("image","img",0);K.attrs=[["src",U],["alt",F]],q&&K.attrs.push(["title",q]),K.content=F,K.children=[{type:"text",content:F,tag:""}],a.pos=a.pos+H[0].length,m=a.pos;const ie=T.slice(L+H[0].length);ie&&D(ie);return}const O=a.push("text","",0);O.content=T,a.pos=a.pos+T.length,m=a.pos;return}const B=a.push("text","",0);B.content=T,a.pos=a.pos+T.length,m=a.pos};for(;!(m>=y.length);){const T=y.indexOf(v,m);if(T===-1)break;if(Kp(y,T)){m=T+Math.max(1,v.length);continue}const L=Jm(x,T);if(L){m=L[1];continue}const B=Jm(M,T);if(B){m=B[1];continue}if(T===S&&m===I){if(P++,P>2){m=T+Math.max(1,v.length);continue}}else P=0,S=T,I=m;if(v==="("&&T>0){let ie=T-1;for(;ie>=0&&y[ie]===" ";)ie--;if(ie>=0&&y[ie]==="]"){m=T+v.length;continue}}if(v==="$"&&T>0&&y[T-1]==="$"){m=T+1;continue}if(v==="$"&&T=y.length);){const L=M3(y,T);if(L===-1)break;if(L+10&&y[L-1]==="$"){T=L+1;continue}const B=E9(y,L+1);if(B===-1)break;const H=y.slice(L+1,B),O=H.includes("`"),F=!H||!H.trim(),W=y[B+1],z=I9(H,W),U=L9(H);if(!O&&!F&&!z&&!U){const q=y.slice(m,L);q&&D(q);const K=a.push("math_inline","math",0);K.content=_a(H,t),K.markup="$",K.raw=`$${H}$`,K.loading=!1,m=B+1,T=B+1}else D("$"),T=L+1}T{const c=r,d=!c?.env?.__markstreamFinal,f=t?.strictDelimiters,h=f?[["\\[","\\]"],["$$","$$"]]:[["\\[","\\]"],["[","]"],["$$","$$"]],g=c.bMarks[l]+c.tShift[l];let m=c.src.slice(g,c.eMarks[l]).trim(),w=!1,_="",v="",k=!1,y="",x=!1;for(const[q,K]of h)if(m.startsWith(q))if(q.includes("[")){const ie=q==="\\["?m.slice(q.length):"";if(q==="\\["&&gd(ie,K)===-1&&!/^\s*!\[/.test(ie)&&!ie.includes("`")&&Ra(ie)){w=!0,_=q,v=K;break}if(t?.strictDelimiters){if(m.replace("\\","")==="["){if(l+1=0?"\\]":v,P=S>=0?S:gd(m,v,$);if(!k&&P>_.length){const q=m.slice(M+_.length,P),K=c.push("math_block","math",0);K.content=_a(q),K.markup=_==="$$"?"$$":_==="["?"[]":"\\[\\]",K.map=[l,l+1],K.raw=`${_}${q}${I}`,K.block=!0,K.loading=!1,c.line=l+1;const ie=m.slice(P+I.length);return ie.trim()&&n(c,ie,l),!0}let D=l,T="",L=!1,B="",H=l;const O=k?m:m===_?"":m.slice(_.length),F=!f&&_==="\\["?"]":"",W=gd(O,v);if(W!==-1){const q=W;T=O.slice(0,q),B=O.slice(q+v.length),H=k?l+1:l,L=!0,D=H}else for(O&&!k&&(T=O),D=l+1;D{const c=r,d=c.bMarks[l]+c.tShift[l],f=c.src.slice(d,c.eMarks[l]).trim();return!f.startsWith("$$")&&!f.startsWith("\\[")?!1:s(r,l,a,u)};e.inline.ruler.before("escape","math",o),e.block.ruler.before("lheading","explicit_math_block",i,{alt:["paragraph","reference","blockquote","list"]}),e.block.ruler.before("paragraph","math_block",s,{alt:["paragraph","reference","blockquote","list"]})}function xoe(e){const t=e.renderer.rules.image||function(n,o,s,i,r){const l=n,a=r;return a.renderToken?a.renderToken(l,o,s):""};e.renderer.rules.image=(n,o,s,i,r)=>{const l=n;return l[o].attrSet?.("loading","lazy"),t(l,o,s,i,r)},e.renderer.rules.fence=e.renderer.rules.fence||((n,o)=>{const s=n[o],i=String(s.info??"").trim();return`
        ${e.utils.escapeHtml(String(s.content??""))}
        `})}const Soe=/^\s]/i,Aoe=/^<\/a\s*>/i;function Moe(e,t){if(e?.type!=="inline")return!1;const n=e.children;if(!Array.isArray(n)||n.length===0)return t.pretest(String(e.content??""));let o=0;for(let s=n.length-1;s>=0;s--){const i=n[s];if(i?.type==="link_close"){for(s--;s>=0&&n[s]?.level!==i.level&&n[s]?.type!=="link_open";)s--;continue}if(i?.type==="html_inline"){const r=String(i.content??"");Soe.test(r)&&o>0&&o--,Aoe.test(r)&&o++}if(!(o>0)&&i?.type==="text"&&t.pretest(String(i.content??"")))return!0}return!1}function Toe(e){const t=e.core?.ruler,n=t.getNamedRules?.().find(o=>o.name==="linkify")?.fn;typeof n=="function"&&t.at("linkify",o=>{if(!o.md?.options?.linkify)return;const s=Array.isArray(o.tokens)?o.tokens:[],i=o.md.linkify;if(!i)return;const r=s.filter(l=>Moe(l,i));if(r.length)return n(Object.assign(Object.create(Object.getPrototypeOf(o)),o,{tokens:r}))})}function Eoe(e){const t=e.inline.ruler,n=t.getNamedRules?.(),o=n?.find(l=>l.name==="link")?.fn,s=n?.find(l=>l.name==="image")?.fn;if(typeof o!="function"||typeof s!="function")return;const i=e.validateLink,r=e;r.__markstreamOriginalValidateLink=i,t.at("link",(...l)=>{const a=l[0].md,u=a?.validateLink===i?a.options?.validateLink:a?.validateLink;if(!a||typeof u!="function")return o(...l);const c=a.validateLink;a.validateLink=u;try{return o(...l)}finally{a.validateLink=c}}),t.at("image",(...l)=>{const a=l[0].md;if(!a)return s(...l);const u=a.validateLink;a.validateLink=i;try{return s(...l)}finally{a.validateLink=u}})}function Ioe(e={}){const t=e.markdownItOptions??{},n=typeof t.experimental=="object"&&t.experimental!==null?t.experimental:{},o=Object.prototype.hasOwnProperty.call(t,"stream")?!!t.stream:!0,s=Object.prototype.hasOwnProperty.call(t,"validateLink"),i=new rte({html:!0,linkify:!0,typographer:!0,...t,experimental:{stream:o,...n}});return s||i.set({validateLink:r=>!ic(r,{tagName:"a",attrName:"href"})}),Eoe(i),Toe(i),(e.enableMath??!0)&&_oe(i,{...e.mathOptions??{}}),(e.enableContainers??!0)&&Ate(i),e.enableFixIndentedCodeBlock!==!1&&Gte(i),Tne(i),$ne(i),Ine(i),One(i),xoe(i),Kte(i,{customHtmlTags:e.customHtmlTags}),i}function rc(e){const t=Object.assign(Object.create(Object.getPrototypeOf(e)),e);return Array.isArray(e.attrs)&&(t.attrs=e.attrs.map(n=>[...n])),Array.isArray(e.map)&&(t.map=[...e.map]),Array.isArray(e.children)&&(t.children=e.children.map(n=>rc(n))),t}function Loe(e){const t=e.meta??{};return{type:"checkbox",checked:t.checked===!0,raw:t.checked?"[x]":"[ ]"}}function $oe(e){const t=e,n=t.attrGet?t.attrGet("checked"):void 0,o=n===""||n==="true";return{type:"checkbox_input",checked:o,raw:o?"[x]":"[ ]"}}function Noe(e){const t=String(e.content??"");return{type:"emoji",name:t,markup:String(e.markup??""),raw:`:${t}:`}}function ph(e,t,n){const o=[];let s="",i=t+1;const r=[];for(;in.startsWith(t)||t.startsWith(n)):!1}function JC(e,t,n,o){n.length>0&&e.push(...n),o.length>0&&t.push(...o),n.length=0,o.length=0}function QC(e,t){return!t&&e.startsWith(" ")&&!e.startsWith(" ")?` ${e}`:e}function Ooe(e,t){const n=[],o=[],s=[],i=[],r=e.split(Foe),l=/\r?\n$/.test(e),a=r.some(h=>h.startsWith("diff ")||h.startsWith("--- ")||h.startsWith("+++ ")||h.startsWith("@@ ")),u=h=>{const g=h;if(!II.some(m=>g.startsWith(m)))if(g.startsWith("-")){const m=g.slice(1);s.push(QC(m,a))}else if(g.startsWith("+")){const m=g.slice(1);i.push(QC(m,a))}else{JC(n,o,s,i);const m=a&&g.startsWith(" ")?g.slice(1):g;n.push(m),o.push(m)}},c=l?Math.max(0,r.length-1):r.length;for(let h=0;h0||i.length>0)&&JC(n,o,s,i);const d=n.join(` +`),f=o.join(` +`);return{original:t&&l&&d?`${d} +`:d,updated:t&&l&&f?`${f} +`:f}}function Y8(e){const t=Array.isArray(e.map)&&e.map.length===2,n=e.meta??{},o=typeof n.closed=="boolean"?n.closed:void 0,s=o===!0||o!==!1&&t,i=String(e.info??""),r=i.startsWith("diff"),l=r?(()=>{const u=i,c=u.indexOf(" ");return c===-1?"":String(u.slice(c+1)??"")})():i;let a=String(e.content??"");if(XC.test(a)&&(a=a.replace(XC,"")),r){const{original:u,updated:c}=Ooe(a,s===!0);return{type:"code_block",language:l,code:String(c??""),raw:String(a??""),diff:r,loading:o===!0?!1:o===!1?!0:!t,originalCode:u,updatedCode:c}}return{type:"code_block",language:l,code:String(a??""),raw:String(a??""),diff:r,loading:o===!0?!1:o===!1?!0:!t}}function Poe(e){const t=e.meta??{};return{type:"footnote_reference",id:String(t.label??""),raw:`[^${String(t.label??"")}]`}}function Doe(){return{type:"hardbreak",raw:`\\ +`}}function Boe(e,t,n){const o=[];let s="",i=t+1;const r=[];for(;i\s*$/.test(t)||eu.has(e)}function Hoe(e){if(!e||e.length===0)return ew();const t=N9.get(e);if(t)return t;const n=e.map(xr).filter(Boolean);if(!n.length){const s=ew();return N9.set(e,s),s}const o={customTagSet:new Set(n),allowedTagSet:S2({customHtmlTags:e})};return N9.set(e,o),o}function FI(e){const t=e,n=t.raw??t.content??t.markup??"";return String(n??"")}function zoe(e){const t=e.meta,n=t?.markstreamCustomHtmlRaw,o=t?.markstreamCustomHtmlInner;return typeof n=="string"&&typeof o=="string"?{raw:n,inner:o}:null}function Qm(e,t){const n=t.toLowerCase();for(let o=e.length-1;o>=0;o--){const[s,i]=e[o];if(String(s).toLowerCase()===n)return i}}function Woe(e,t,n){const o=e.slice();return Qm(o,"href")||o.push(["href",t]),n!=null&&!Qm(o,"title")&&o.push(["title",n]),o}function E3(e){return e.map(FI).join("")}function qh(e){const t=[],n=o=>{const s=String(o??"");if(!s)return;const i=t[t.length-1];if(i?.type==="text"){i.content=`${i.content}${s}`,i.raw=`${i.raw}${s}`;return}t.push({type:"text",content:s,raw:s})};for(const o of e)if(o){if(o.type==="reference"||o.type==="footnote_reference"){n(String(o.raw??""));continue}if("children"in o&&Array.isArray(o.children)){t.push({...o,children:qh(o.children)});continue}t.push(o)}return t}function Uoe(e,t,n){let o=0;for(let s=t;s`;m.toLowerCase().includes(x.toLowerCase())||(m+=x),_=!0,w=!0}const v=[],k=/\s([\w:-]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'>]+)))?/g;let y;for(;(y=k.exec(l))!==null;){const x=y[1],M=y[2]||y[3]||y[4]||"";v.push([x,M])}if(u?.has(a)){const x=zoe(e);return[{type:a,tag:a,attrs:v,content:x?x.inner:h.innerTokens.length?E3(h.innerTokens):"",children:h.innerTokens.length?o(h.innerTokens,s,i,r):[],raw:x?.raw??m,loading:e.loading||w,autoClosed:_},h.nextIndex]}return[{type:"html_inline",tag:a,attrs:v,content:m,children:g,raw:m,loading:w,autoClosed:_},h.nextIndex]}function RI(e){if(e.type==="math_inline"){if(e.raw)return String(e.raw);const t=e.markup==="$$"?"$$":"$";return`${t}${String(e.content??"")}${t}`}return Array.isArray(e.children)&&e.children.length>0?e.children.map(t=>RI(t)).join(""):String(e.content??"")}function Voe(e){return!e||!Array.isArray(e.children)||e.children.length===0?"":e.children.map(t=>RI(t)).join("")}function tw(e,t=!1){let n=e.attrs??[],o=null;if((!n||n.length===0)&&Array.isArray(e.children))for(const d of e.children){const f=d.attrs;if(Array.isArray(f)&&f.length>0){n=f,o=d;break}}const s=String(n.find(d=>d[0]==="src")?.[1]??""),i=n.find(d=>d[0]==="alt")?.[1],r=Voe(o??e);let l="";r?l=r:i!=null&&String(i).length>0?l=String(i):o?.content!=null&&String(o.content).length>0?l=String(o.content):Array.isArray(o?.children)&&o.children[0]?.content?l=String(o.children[0].content):Array.isArray(e.children)&&e.children[0]?.content?l=String(e.children[0].content):e.content!=null&&String(e.content).length>0&&(l=String(e.content));const a=n.find(d=>d[0]==="title")?.[1]??null,u=a===null?null:String(a),c=String(e.content??"");return{type:"image",src:s,alt:l,title:u,raw:c,loading:t}}function qoe(e){const t=String(e.content??"");return{type:"inline_code",code:t,raw:t}}function Koe(e,t,n){const o=[];let s="",i=t+1;const r=[];for(;i=0;o--){const[s,i]=e[o];if(String(s).toLowerCase()===n)return i}}function Goe(e,t,n){const o=e.slice();return eg(o,"href")||o.push(["href",t]),n!=null&&!eg(o,"title")&&o.push(["title",n]),o}function hh(e,t,n){const o=e[t],s=Zoe(o.attrs),i=String(eg(s,"href")??""),r=eg(s,"title"),l=r==null?null:String(r),a=Goe(s,i,l);let u=t+1;const c=[];let d=!0;for(;uw.type==="strong_open")){const w=String(h.content??""),_=String(h.raw??w),v=rc(h);v.content=w.slice(0,-2),v.raw=_.replace(/\*\*$/,""),f=c.slice(),f[f.length-1]=v}const g=No(f,void 0,void 0,n),m=g.map(w=>{const _=w;return"content"in w?String(_.content??""):String(_.raw??"")}).join("");return{node:{type:"link",href:i,title:l,text:m,children:g,raw:`[${m}](${i}${l?` "${l}"`:""})`,loading:d,attrs:a},nextIndex:u0?o:[{type:"text",content:a,raw:a}],raw:`~${a}~`},nextIndex:i0?o:[{type:"text",content:s||String(e[t].content??""),raw:s||String(e[t].content??"")}],raw:`^${s||String(e[t].content??"")}^`},nextIndex:i?@[\\\]^_`{|}~]/,ase=/\p{P}/u,use=/^[《「『【〔〖〘〚〈([{“‘﹁﹃﹙﹛﹝]$/u,cse=/^[》」』】〕〗〙〛〉)]}”’﹂﹄﹚﹜﹞]$/u,dse=/^(?:https?:\/\/|mailto:|ftp:\/\/)/i,fse=/:\/\//,I3=1,OI=2,pse=4,hse=8,PI=16,Ma=32,Kh=64,b1=128,DI=256,mse=512,C1=1024,gse=1982;function mh(e){let t=0;for(let n=0;n=t){n++,o++;continue}n++,o++;continue}if(s==="*"&&n>=t)return n;n++}return-1}function tu(e){return!!e&&rse.test(e)}function nu(e){return!!e&&(lse.test(e)||ase.test(e))}function HI(e,t){return!!e&&!!t&&/^\p{Script=Han}$/u.test(t)&&use.test(e)}function zI(e,t){return!!e&&!!t&&/^[\p{L}\p{N}]$/u.test(t)&&cse.test(e)}function yse(e,t){const n=t>0?e[t-1]:void 0,o=e[t+1];return!o||tu(o)?!1:!(nu(o)&&!HI(o,n)&&n&&!tu(n)&&!nu(n))}function kse(e,t){const n=t>0?e[t-1]:void 0,o=e[t+1];return!n||tu(n)?!1:!(nu(n)&&!zI(n,o)&&o&&!tu(o)&&!nu(o))}function bse(e,t,n=0){let o=n,s=!1;for(;o0?e[t-1]:void 0,o=e[t+2];return!o||tu(o)?!1:!(nu(o)&&!HI(o,n)&&n&&!tu(n)&&!nu(n))}function wse(e,t){const n=t>0?e[t-1]:void 0,o=e[t+2];return!n||tu(n)?!1:!(nu(n)&&!zI(n,o)&&o&&!tu(o)&&!nu(o))}function _se(e,t=0){let n=t,o=!1;for(;n=0&&e[i]==="\\";i--)s++;return s%2===1}const Mse=/[\p{L}\p{N}]/u,Tse=/^[\p{L}\p{N}]+$/u;function L3(e){return e?Mse.test(e):!1}function WI(e){return e?Tse.test(e):!1}function V1(e,t){let n=t;for(;n0?e[t-1]:void 0,s=n=2&&o.intraword&&t.push({start:n,end:s}),n=s}for(let n=0;n=3)return o;n=o+s.len}return-1}function $se(e){return e?dse.test(e)||fse.test(e):!1}function Nse(e,t){if(!e||!t)return null;const n=e.match(/\[([^\]\n]+)\]\(([^)]*)$/);return n&&n[2]===t?n[1]:null}function No(e,t,n,o){if(!e||e.length===0)return[];const s=o?.__linkifyDemotionContext,i=qp(t),r={filename:s?.filename||i.filename,explicitFilename:s?.explicitFilename||i.explicitFilename,marketTicker:s?.marketTicker||i.marketTicker};(r.filename||r.explicitFilename||r.marketTicker)&&(o={...o,__linkifyDemotionContext:r});const l=o,a=[];let u=null,c=0;const d=o?.requireClosingStrong,f=e;function h(){return e===f&&(e=e.slice()),e}function g(){u=null}function m(oe,ve){const G=e.length===1?t:String(ve.content??""),X=[],fe=Ese(oe);if(fe!==-1){x(oe.slice(0,fe),oe.slice(0,fe));const ge=oe.slice(fe);return ge&&(D({type:"text",content:ge,raw:ge}),c--),c++,!0}if(nse.test(oe)){const ge=oe.indexOf("~~");ge!==-1&&X.push({type:"strikethrough",index:ge})}if(ose.test(oe)){const ge=oe.indexOf("**");ge!==-1&&X.push({type:"strong",index:ge})}if(/[^*]*\*[^*]+/.test(oe)){const ge=G?BI(G,0):oe.indexOf("*");if(G&&ge===-1)return!1;ge!==-1&&X.push({type:"emphasis",index:ge})}X.sort((ge,Q)=>ge.index!==Q.index?ge.index-Q.index:ge.type===Q.type?0:ge.type==="strong"?-1:Q.type==="strong"?1:0);const Ce=X[0];if(!Ce)return!1;if(Ce.type==="strikethrough"){const ge=Ce.index,Q=ge>-1?oe.slice(0,ge):"";if(Q&&x(Q,Q),ge===-1)return c++,!0;const ee=oe.indexOf("~~",ge+2),ce=ee===-1?oe.slice(ge+2):oe.slice(ge+2,ee),ue=ee===-1?"":oe.slice(ee+2),{node:Se}=ow([{type:"s_open",tag:"s",content:"",markup:"~~",info:"",meta:null},{type:"text",tag:"",content:ce,markup:"",info:"",meta:null},{type:"s_close",tag:"s",content:"",markup:"~~",info:"",meta:null}],0,o);return g(),y(Se),ue&&(D({type:"text",content:ue,raw:ue}),c--),c++,!0}if(Ce.type==="strong"){const ge=Ce.index,Q=ge>-1?oe.slice(0,ge):"";if(Q&&x(Q,Q),ge===-1)return c++,!0;if(t&&ge===0){let _e=!1,Te=0;for(;Te=2)return x(oe,oe),c++,!0}}if(t&&(oe.match(/\*/g)||[]).length>vse(t))return x(oe.slice(Q.length),oe.slice(Q.length)),c++,!0;const ee=V1(oe,ge);if(ee.len>=3){const _e=Lse(oe,ge+ee.len);if(_e!==-1){const Te=oe.slice(ge+ee.len,_e);if(Ise(Te)){const{node:st}=n1([{type:"strong_open",tag:"strong",content:"",markup:"**",info:"",meta:null},{type:"em_open",tag:"em",content:"",markup:"*",info:"",meta:null},{type:"text",tag:"",content:Te,markup:"",info:"",meta:null},{type:"em_close",tag:"em",content:"",markup:"*",info:"",meta:null},{type:"strong_close",tag:"strong",content:"",markup:"**",info:"",meta:null}],0,t,o);g(),y(st);const Fe=oe.slice(_e+3);return Fe&&(D({type:"text",content:Fe,raw:Fe}),c--),c++,!0}}}if(!Cse(oe,ge)){const _e=oe.slice(ge,ge+ee.len);x(_e,_e);const Te=oe.slice(ge+ee.len);return Te&&(D({type:"text",content:Te,raw:Te}),c--),c++,!0}const ce=_se(oe,ge+2);let ue="",Se="";if(ce.index!==-1){ue=oe.slice(ge+2,ce.index),Se=oe.slice(ce.index+2);const _e=ce.index,Te=V1(oe,_e);if(ee.intraword&&Te.intraword&&!WI(ue)||!ue&&ee.len>=4&&ee.intraword)return x(oe.slice(Q.length),oe.slice(Q.length)),c++,!0}else{if(d||ce.sawInvalidClose||ee.intraword)return x(oe.slice(Q.length),oe.slice(Q.length)),c++,!0;ue=oe.slice(ge+2),Se=""}if(!ue&&/^\*+$/.test(Se))return x(oe,oe),c++,!0;const{node:Ue}=n1([{type:"strong_open",tag:"strong",content:"",markup:"**",info:"",meta:null},{type:"text",tag:"",content:ue,markup:"",info:"",meta:null},{type:"strong_close",tag:"strong",content:"",markup:"**",info:"",meta:null}],0,t,o);return g(),y(Ue),Se&&(D({type:"text",content:Se,raw:Se}),c--),c++,!0}if(Ce.type==="emphasis"){let ge=Ce.index;ge===-1&&(ge=0);const Q=oe.slice(0,ge);if(Q&&x(Q,Q),!yse(oe,ge)){x(oe[ge],oe[ge]);const _e=oe.slice(ge+1);return _e&&(D({type:"text",content:_e,raw:_e}),c--),c++,!0}const ee=V1(oe,ge),ce=bse(G,oe,ge+1),ue=ce.index,Se=e[c+1];if(o?.final&&Se?.type==="em_open"&&ue!==-1&&oe.slice(ge+1,ue).trim()!==oe.slice(ge+1,ue)||ue===-1&&(ce.sawInvalidClose||o?.final||ee.intraword||!L3(oe[ge+1])))return x(oe.slice(ge),oe.slice(ge)),c++,!0;const{node:Ue}=ph([{type:"em_open",tag:"em",content:"",markup:"*",info:"",meta:null},{type:"text",tag:"",content:ue>-1?oe.slice(ge+1,ue):oe.slice(ge+1),markup:"",info:"",meta:null},{type:"em_close",tag:"em",content:"",markup:"*",info:"",meta:null}],0,o);if(g(),y(Ue),ue!==-1&&ue{for(let Ue=0;Ue=0&&Se[Te]==="\\";Te--)_e++;if(_e%2===0)return Ue}return-1})(oe);if(X===-1)return!1;let fe=1;for(let Se=X+1;SeCe?.type==="math_inline")||!sse.test(oe))return null;const G=ve.parseInline(oe,{__markstreamFinal:!!o?.final});if(!Array.isArray(G)||G.length===0)return null;const X=(G.find(Ce=>Ce?.type==="inline")?.children??[]).filter(Ce=>!(Ce?.type==="text"&&String(Ce.content??"")===""));if(!X.length||!X.some(Ce=>Ce?.type!=="text")||X.length===1&&X[0]?.type==="text"&&String(X[0].content??"")===oe)return null;const fe=No(X,oe,n,o);return fe.length?fe:null}function v(oe){g(),a.push(oe)}function k(oe){g();const ve=rc(oe);a.push(ve)}function y(oe){v(oe)}function x(oe,ve){u?(u.content+=oe,u.raw+=ve??oe):(u={type:"text",content:String(oe??""),raw:String(ve??oe??"")},a.push(u))}function M(oe,ve){if(!oe)return;const G=No([{...ve,type:"text",content:oe,raw:oe}],oe,n,o);if(G.length===1&&G[0]?.type==="text"){const X=G[0];x(String(X.content??""),String(X.raw??X.content??""));return}for(const X of G)y(X)}function $(oe,ve){return String(oe.markup??"").startsWith(ve)}function S(oe){if(!u||oe.loading!==!0||oe.markup!=="\\(\\)")return;const ve=e[c-1];!ve||ve.type!=="text"||!$(ve,"\\(")||u.content.endsWith("(")&&(u.content=u.content.slice(0,-1),u.raw.endsWith("(")&&(u.raw=u.raw.slice(0,-1)),!u.content&&a[a.length-1]===u&&(a.pop(),u=null))}function I(oe){return oe.endsWith("](")?e[c+1]?.type==="link_open"&&e[c+1]?.markup==="linkify"&&e[c+2]?.type==="text"&&e[c+3]?.type==="link_close"&&e[c+4]?.type==="text"&&String(e[c+4]?.content??"").startsWith(")"):!1}function P(oe,ve,G=mh(oe)){let X=oe;const fe=String(ve.content??"");return(G&I3)!==0&&X.endsWith("\\")&&!$(ve,"\\\\")&&!fe.endsWith("\\\\")&&(X=X.slice(0,-1)),(G&C1)!==0&&X.endsWith("(")&&!$(ve,"\\(")&&!fe.endsWith("\\(")&&(X=X.slice(0,-1)),(G&OI)!==0&&/\*+$/.test(X)&&!$(ve,"\\*")&&!fe.endsWith("\\*")&&(X=X.replace(/\*+$/,"")),X}for(;c=0;_e--){const Te=a[_e];if(Te.type!=="text")break;ee=_e,ce=String(Te.content??"")+ce}eeQ==="href")?.[1],ge=String(Ce??"");if(t&&ge){const Q=t.indexOf("](");if(Q!==-1){const ee=t.indexOf(")",Q+2);ee===-1?ve.loading=!0:ve.loading&&t.slice(Q+2,ee).includes(ge)&&(ve.loading=!1)}}F(ve)||v(ve)}function H(oe){if(oe.markup!=="linkify")return!1;const{node:ve,nextIndex:G}=hh(e,c,o);return z(ve,G)?(c=G,!0):!1}function O(oe){g(),y(Yoe(oe)),c++}function F(oe){if(oe.type!=="link")return!1;const ve=a[a.length-1];if(!ve||ve.type!=="text")return!1;const G=String(ve.content??"").match(/^([^[]*)\[([^\]\n]+)\]\($/);if(!G)return!1;const X=oe,fe=String(X.href??""),Ce=String(X.text??""),ge=String(G[2]??""),Q=fe.replace(/^(?:https?:\/\/|mailto:|ftp:\/\/)/i,"");if(!fe||!(Ce===fe||Ce===Q||$se(Ce)))return!1;const ee=String(G[1]??"");return ee?(ve.content=ee,ve.raw=ee):a.pop(),v({...oe,text:ge,children:[{type:"text",content:ge,raw:ge}],raw:`[${ge}](${fe}${X.title?` "${X.title}"`:""})`}),!0}function W(oe){if(oe.type!=="link")return!1;const ve=oe,G=String(ve.href??"");return G?z({href:G,title:ve.title==null||ve.title===""?null:String(ve.title),loading:!!ve.loading},c+1):!1}function z(oe,ve){const G=a[a.length-1];if(G?.type!=="image"||G.src||!G.loading||!String(G.raw??"").endsWith("]("))return!1;const X=e[ve],fe=String(X?.content??"");if(X?.type!=="text"||!fe.startsWith(")"))return!1;a.pop(),u=null;const Ce=String(G.alt??"");v({type:"image",src:oe.href,alt:Ce,title:oe.title,raw:`![${Ce}](${oe.href}${oe.title?` "${oe.title}"`:""})`,loading:!!oe.loading});const ge=fe.slice(1),Q=rc(X);return Q.content=ge,Q.raw=ge,h()[ve]=Q,!0}function U(oe){if(oe.type!=="link")return!1;const ve=a[a.length-1],G=e[c-1];if(!ve||ve.type!=="text"||G?.type!=="text")return!1;const X=String(ve.content??""),fe=String(G.content??"");if(!X.endsWith("!")||!fe.endsWith("!")||$(G,"\\!"))return!1;const Ce=X.slice(0,-1);Ce?(ve.content=Ce,ve.raw=Ce,u=ve):(a.pop(),u=null);const ge=oe,Q=String(ge.text??ge.children?.map(ue=>String(ue?.content??ue?.raw??"")).join("")??""),ee=String(ge.href??""),ce=ge.title==null||ge.title===""?null:String(ge.title);return v({type:"image",src:ee,alt:Q,title:ce,raw:`![${Q}](${ee}${ce?` "${ce}"`:""})`,loading:!!ge.loading}),!0}function q(oe,ve="",G=null){const X=String(oe.alt??oe.raw??"");return{type:"link",href:ve,title:G,text:X,children:[oe],raw:`[${X}](${ve}${G?` "${G}"`:""})`,loading:!0}}function K(oe){const ve=oe.startsWith("![")?oe:`![${oe}`,G=ve.slice(2),X=G.indexOf("](");return{type:"image",src:"",alt:X===-1?G.replace(/\]$/,""):G.slice(0,X),title:null,raw:ve,loading:!0}}function ie(oe){const ve=oe.indexOf("[![");if(ve===-1||typeof t=="string"&&e.length===1&&Ase(t,ve,"["))return!1;const G=oe.slice(0,ve);return G&&x(G,G),v(q(K(oe.slice(ve+1)))),c++,!0}function ne(oe){if(o?.final)return!1;const ve=e[c-1];if(ve?.type!=="text"||!String(ve.content??"").endsWith("[")||$(ve,"\\["))return!1;const G=a[a.length-1];if(G?.type==="text"&&G.content.endsWith("[")){const X=G.content.slice(0,-1);X?(G.content=X,G.raw=X,u=G):(a.pop(),u=null)}return v(q(tw(oe))),c++,!0}function Y(oe){if(oe.type!=="link")return!1;const ve=oe,G=String(ve.raw??""),X=String(ve.text??"");if(!G.startsWith("[![")&&!X.startsWith("!["))return!1;const fe=ve.title==null||ve.title===""?null:String(ve.title);return v(q({type:"image",src:String(ve.href??""),alt:X.replace(/^!\[/,"").replace(/\]$/,""),title:fe,raw:G.startsWith("[![")?G.slice(1):G,loading:!0})),!0}function le(oe){if(!oe.startsWith("]("))return!1;const ve=e[c-2];if(ve?.type==="text"&&String(ve.content??"").endsWith("[")&&$(ve,"\\["))return!1;const G=a[a.length-1];if(G?.type!=="image"&&G?.type!=="link")return!1;const X=G,fe=G?.type==="link"&&Array.isArray(X.children)&&X.children.length===1&&X.children[0]?.type==="image"?a.pop():null,Ce=fe?fe.children[0]:a.pop();if(!Ce||Ce.type!=="image")return!1;const ge=e[c+1];let Q=String(fe?.href??""),ee=fe?.title==null?null:String(fe.title),ce=!0;if(ge?.type==="link_open"){const{node:Se,nextIndex:Ue}=hh(e,c+1,o);Q=Se.href,ee=Se.title,ce=!0,c=Ue}else{if(Q=oe.slice(2),Q.includes('"')){const Se=Q.split('"');Q=String(Se[0]??"").trim(),ee=Se[1]==null?null:String(Se[1]).trim()}c++}const ue=q(Ce,Q,ee);return ue.loading=ce,v(ue),!0}function Ee(){const oe=e[c-3];return e[c-2]?.type==="image"&&e[c-1]?.type==="text"&&String(e[c-1].content??"")==="]("&&oe?.type==="text"&&String(oe.content??"").endsWith("[")&&$(oe,"\\[")}function de(oe,ve){const G=oe.indexOf("[");if(G===-1)return!1;let X=oe.slice(0,G);const fe=oe.indexOf("](",G);if(fe!==-1){const Ce=e[c+2];let ge=oe.slice(G+1,fe);if(ge.includes("[")){const _e=ge.indexOf("[");X+=oe.slice(0,G+_e+1);const Te=G+_e+1;ge=oe.slice(Te+1,fe)}const Q=e[c+1];if(oe.endsWith("](")&&Q?.type==="link_open"&&Ce){const _e=e[c+4];let Te=4,st=!0;if(_e?.type==="text"){const Oe=String(_e.content??"");if(Oe.startsWith(")")){st=!1;const Ye=Oe.slice(1);if(Ye){const ft=rc(_e);ft.content=Ye,ft.raw=Ye,h()[c+4]=ft}else Te++}else Oe==="."&&Te++}M(X,ve);const Fe=String(Ce.content??"");return o?.validateLink&&!o.validateLink(Fe)?x(ge,ge):v({type:"link",href:Fe,title:null,text:ge,children:[{type:"text",content:ge,raw:ge}],loading:st}),c+=Te,!0}const ee=oe.indexOf(")",fe),ce=ee!==-1?oe.slice(fe+2,ee):"",ue=ee===-1;let Se=X.match(/\*+$/);if(Se&&(X=X.replace(/\*+$/,"")),M(X,ve),Se||(Se=ge.match(/^\*+/)),!d&&Se){const _e=Se[0].length;ge=ge.replace(/^\*+/,"").replace(/\*+$/,"");const Te=[];if(_e===1?Te.push({type:"em_open",tag:"em",nesting:1}):_e===2?Te.push({type:"strong_open",tag:"strong",nesting:1}):_e===3&&(Te.push({type:"strong_open",tag:"strong",nesting:1}),Te.push({type:"em_open",tag:"em",nesting:1})),Te.push({type:"link",href:ce,title:null,text:ge,children:[{type:"text",content:ge,raw:ge}],loading:ue}),_e===1){Te.push({type:"em_close",tag:"em",nesting:-1});const{node:st}=ph(Te,0,o);y(st)}else if(_e===2){Te.push({type:"strong_close",tag:"strong",nesting:-1});const{node:st}=n1(Te,0,void 0,o);y(st)}else if(_e===3){Te.push({type:"em_close",tag:"em",nesting:-1}),Te.push({type:"strong_close",tag:"strong",nesting:-1});const{node:st}=n1(Te,0,void 0,o);y(st)}else{const{node:st}=ph(Te,0,o);y(st)}}else o?.validateLink&&!o.validateLink(ce)?x(ge,ge):v({type:"link",href:ce,title:null,text:ge,children:[{type:"text",content:ge,raw:ge}],loading:ue});const Ue=ee!==-1?oe.slice(ee+1):"";return Ue&&(D({type:"text",content:Ue,raw:Ue}),c--),c++,!0}return!1}function he(oe){const ve=oe.indexOf("![");if(ve===-1)return!1;const G=oe.slice(0,ve);return G&&!u?u={type:"text",content:G,raw:G}:G&&u&&(u.content+=G),u&&(a.push(u),u=null),v(K(oe.slice(ve))),c++,!0}function pe(oe){if(!(oe?.startsWith("[")&&n?.type==="list_item_open"))return!1;const ve=oe.slice(1).match(/[^\s\]]/);if(ve===null)return c++,!0;if(ve&&/x/i.test(ve[0])){const G=ve[0]==="x"||ve[0]==="X";return v({type:"checkbox_input",checked:G,raw:G?"[x]":"[ ]"}),c++,!0}return!1}return a}function J8(e,t,n){const o=n?.__sourceLineMapper;if(!o)return{startLine:e,endLine:t};const s=o(e),i=t>e?o(t-1).endLine:o(t).startLine;return{startLine:s.startLine,endLine:Math.max(s.startLine,i)}}function sw(e,t){const n=Math.max(0,Math.min(e.length,Math.trunc(t)));let o=0;for(let s=0;so&&e[s-1]!==` +`&&r++,{startLine:i,endLine:r}}function Tp(e,t,n,o){const s=Fse(e,t,n);return J8(s.startLine,s.endLine,o)}function Rse(e,t){const n=e?.map;if(!Array.isArray(n)||n.length<2)return null;const o=Number(n[0]),s=Number(n[1]);return!Number.isFinite(o)||!Number.isFinite(s)?null:J8(o,s,t)}function On(e,t,n){if(!n?.includeSourceMap)return e;const o=Rse(t,n);if(!o)return e;if(e.sourceMap=o,e.type==="code_block"){const s=e;s.startLine=o.startLine,s.endLine=o.endLine}return e}function Ose(e,t,n,o){if(!o?.includeSourceMap)return e;const s=t?.map;if(!Array.isArray(s)||s.length<2)return e;const i=Number(s[0]),r=Number(s[1]),l=Number(n);return!Number.isFinite(i)||!Number.isFinite(r)||!Number.isFinite(l)||(e.sourceMap=J8(i,Math.max(r,l),o)),e}function Pse(e){const t=String(e.content??""),n=t.replace(/[ \t\r\n]+$/g,"");if(n===t)return;e.content=n;const o=e.children;if(!(!Array.isArray(o)||o.length===0))for(;o.length;){const s=o[o.length-1];if(!s){o.pop();continue}if(s.type==="softbreak"||s.type==="hardbreak"){o.pop();continue}if(s.type==="text"){const i=String(s.content??""),r=i.replace(/[ \t\r\n]+$/g,"");if(r===i)break;if(r){s.content=r;break}o.pop();continue}break}}function Dse(e){const t=String(e.content??""),n=t.match(/\r?\n\s*\d+[.)]?\s*$/);if(!n||typeof n.index!="number")return;e.content=t.slice(0,n.index);const o=e.children;if(!(!Array.isArray(o)||o.length===0))for(;o.length;){const s=o[o.length-1];if(!s){o.pop();continue}if(s.type==="softbreak"||s.type==="hardbreak"){o.pop();continue}if(s.type==="text"){const i=String(s.content??"");if(/^[ \t\r\n\d.)]*$/.test(i)){o.pop();continue}const r=i.replace(/[ \t\r\n\d.)]+$/g,"");r!==i&&(r?s.content=r:o.pop())}break}}function Bse(e){const t=String(e.content??"");return/[ \t\r\n]+$/.test(t)||/\r?\n\s*\d+[.)]?\s*$/.test(t)}function Cf(e,t,n){const o=e[t],s=[],i=du(n,!0);let r=t+1;for(;rd.raw).join("")};n?.includeSourceMap&&On(c,e[r],n),s.push(c),r=u+1}else r+=1;const l={type:"list",ordered:o.type==="ordered_list_open",start:(()=>{if(o.attrs&&o.attrs.length){const a=o.attrs.find(u=>u[0]==="start");if(a){const u=Number(a[1]);return Number.isFinite(u)&&u!==0?u:1}}})(),items:s,raw:s.map(a=>a.raw).join(` +`)};return n?.includeSourceMap&&On(l,o,n),[l,r+1]}function Hse(e,t,n,o){const s=String(n[1]??"note"),i=String(n[2]??s.charAt(0).toUpperCase()+s.slice(1)),r=[],l=du(o,!0);let a=t+1;for(;au.raw).join(` +`)} +:::`},a+1]}const zse=new Set(["warning","info","note","tip","danger","caution"]);function Wse(e){let t=0;for(;t=0;m--){const w=f[m];if(w.type==="text"&&/:+/.test(w.content)){h=m;break}}const g={type:"paragraph",children:No((h!==-1?f.slice(0,h):f)||[],void 0,void 0,a.options()),raw:String(d.content??"").replace(/\n:+$/,"").replace(/\n\s*:::\s*$/,"")};n?.includeSourceMap&&On(g,e[u],n),l.push(g),a.remember(g.raw)}u+=3}else if(e[u].type==="bullet_list_open"||e[u].type==="ordered_list_open"){const[d,f]=Cf(e,u,a.options());n?.includeSourceMap&&On(d,e[u],n),l.push(d),a.remember(d.raw),u=f}else if(e[u].type==="blockquote_open"){const[d,f]=wf(e,u,a.options());n?.includeSourceMap&&On(d,e[u],n),l.push(d),a.remember(d.raw),u=f}else{const d=w2(e,u,a.options());d?(l.push(d[0]),a.remember(d[0].raw),u=d[1]):u++}return[{type:"admonition",kind:s,title:i,children:l,raw:`:::${s} ${i} +${l.map(d=>d.raw).join(` +`)} +:::`},u+1]}const jse=/^::: ?(warning|info|note|tip|danger|caution|error) ?(.*)$/;function Vse(e,t,n){const o=e[t];if(o.type!=="container_open")return null;const s=jse.exec(String(o.info??""));return s?Hse(e,t,s,n):null}const Q8={parseContainer:(e,t,n)=>Use(e,t,n),matchAdmonition:Vse};function wf(e,t,n){const o=[],s=du(n,!0);let i=t+1;for(;il.raw).join(` +`)};return n?.includeSourceMap&&On(r,e[t],n),[r,i+1]}function qse(e){if(e.info?.startsWith("diff"))return Y8(e);const t=String(e.content??""),n=t.match(/ type="application\/vnd\.ant\.([^"]+)"/);let o=t;n?.[1]&&(o=t.replace(/]*>/g,"").replace(/<\/antArtifact>/g,""));const s=Array.isArray(e.map)&&e.map.length===2;return{type:"code_block",language:n?n[1]:String(e.info??""),code:o,raw:o,loading:!s}}function Kse(e,t,n){const o=[];let s=t+1,i=[],r=[];const l=du(n,!0);for(;su.raw).join("")),s+=3}else if(e[s].type==="dd_open"){let a=s+1;for(r=[];a0&&(o.push({type:"definition_item",term:i,definition:r,raw:`${i.map(u=>u.raw).join("")}: ${r.map(u=>u.raw).join(` +`)}`}),i=[]),s=a+1}else s++;return[{type:"definition_list",items:o,raw:o.map(a=>a.raw).join(` +`)},s+1]}function Zse(e,t,n){const o=e[t].meta??{},s=String(o?.label??"0"),i=[],r=du(n,!0);let l=t+1;for(;la.raw).join(` +`)}`},l+1]}function Gse(e,t,n){const o=e[t],s=o.attrs,i=Array.isArray(s)&&s.length?Object.fromEntries(s.filter(c=>Array.isArray(c)&&c.length>=1&&c[0]).map(([c,d])=>[String(c),d==null||d===""?!0:String(d)])):void 0,r=String(o.tag?.substring(1)??"1"),l=Number.parseInt(r,10),a=e[t+1],u=String(a.content??"");return{type:"heading",level:l,text:u,...i?{attrs:i}:{},children:No(a.children||[],u,void 0,n),raw:u}}function Yse(e,t,n){const o=t.toLowerCase(),s=new RegExp(String.raw`^<\s*${o}(?=\s|>|/)`,"i"),i=new RegExp(String.raw`^<\s*\/\s*${o}(?=\s|>)`,"i");let r=0,l=Math.max(0,n);for(;l$/.test(d)||r++,l=a+c+1;continue}l=a+1}return-1}function UI(e){const t=String(e.content??"");if(/^\s*");else if(a)a=!w.includes(">");else if(u)u=!w.includes("?>");else if(w.startsWith("");else if(w.startsWith("");else if(w.startsWith("");else{const _=s(w);if(_)if(_.closing){for(let v=r.length-1;v>=0;v--)if(r[v]===_.tag){r.length=v;break}}else _.selfClosing||i(_.after,_.tag)||r.push(_.tag)}}if(d===-1||d>=t)break;c=d+1}return l||a||u||r.length>0}function Nie(e,t,n){if(!n?.length)return!1;const o=new Set(Ec(n));if(!o.size)return!1;const s=c=>{const d=c.charCodeAt(0);return d>=65&&d<=90||d>=97&&d<=122||d>=48&&d<=57||c==="_"||c==="-"||c===":"},i=c=>c===" "||c===" ",r=c=>{if(c[0]!=="<")return null;let d=1;for(;d"&&m!=="/")return null;const w=c.indexOf(">",d);if(w===-1)return null;let _=w-1;for(;_>=0&&i(c[_]);)_--;return{closing:f,tag:g,selfClosing:!f&&c[_]==="/",after:c.slice(w+1)}},l=(c,d)=>{const f=c.toLowerCase();let h=0;for(;h")return!0}}return!1},a=[];let u=0;for(;u=t?t:c,f=e.slice(u,d),h=f.endsWith("\r")?f.slice(0,-1):f,g=_f(h);if(g){const m=r(h.slice(g.index));if(m)if(m.closing){for(let w=a.length-1;w>=0;w--)if(a[w]===m.tag){a.length=w;break}}else m.selfClosing||l(m.after,m.tag)||a.push(m.tag)}if(c===-1||c>=t)break;u=c+1}return a.length>0}function Fie(e,t){const n=fie.exec(e);if(!n)return null;const o=n[1]??"",s=n.index+o.length,i=e.indexOf(` +`,s),r=e.slice(s,i===-1?e.length:i);return!_f(r.endsWith("\r")?r.slice(0,-1):r)||Lie(e,s)||$ie(e,s)||Nie(e,s,t)?null:`${e.slice(0,n.index)}${o}`}function eL(e,t,n){let o=t;for(;oo&&(r=!0),t.inMath=!1,t.mathOpenOffset=null,i+=2;continue}i++;continue}if(t.inDollarMath){if(e.startsWith("$$",i)&&!o1(e,l)){o!=null&&s&&n+i+2>o&&(r=!0),t.inDollarMath=!1,t.dollarMathOpenOffset=null,i+=2;continue}i++;continue}if(e[i]==="`"&&!o1(e,l)){const a=eL(e,i,"`"),u=Rie(e,i+a,a);if(u===-1)break;i=u+a;continue}if(e.startsWith("\\[",i)&&!o1(e,l)){t.inMath=!0,t.mathOpenOffset=n+i,i+=2;continue}if(e.startsWith("$$",i)&&!o1(e,l)){t.inDollarMath=!0,t.dollarMathOpenOffset=n+i,i+=2;continue}i++}return r}function Oie(e,t){if(!Z8(t))return e;const n=t,o=uw.get(n),s=o?.source===e?o.state:o&&e.startsWith(o.source)?tL(o.state,e.slice(o.source.length),o.source.length-o.state.lineBuffer.length).state:x2(e).state;uw.set(n,{source:e,state:s});const{context:i}=s,r=i.inMath?i.mathOpenOffset:i.inDollarMath?i.dollarMathOpenOffset:null;if(r==null)return e;const l=e.slice(r+2),a=e.lastIndexOf(` +`,r-1)+1;if(e.slice(a,r).trim()!==""&&!/^\r?\n/.test(l)||/^\s*!\[/.test(l))return e;const u=l.trim(),c=/^(?:[a-z]|pi)$/i.test(u);return Ra(l)&&!c?e:e.slice(0,r)}function Pie(e,t,n,o,s){const i=n5(e),r=o5(e);if(t.inFence&&t.fenceInBlockquote&&e.trim()&&s5(e)==null&&B9(t),t.inFence&&t.fenceInList&&e.trim()&&i.column=t.fenceLen&&/^\s*$/.test(l.rest)&&B9(t):(t.inFence=!0,t.fenceChar=l.markerChar,t.fenceLen=l.markerLen,t.fenceInBlockquote=l.inBlockquote,t.fenceInList=l.inList||t.listContentIndent!=null&&!l.inBlockquote&&i.column>=t.listContentIndent,t.fenceListIndent=l.listIndent||t.listContentIndent||0);else if(!t.inFence)return pw(e,t,n,o,s)}else return pw(e,t,n,o,s);return!1}function x2(e,t=Aie(),n=null,o=!1,s=0){const i=q1(t);let r=q1(t),l="",a=!1,u=0;for(;uu&&e[c-1]==="\r"?c-1:d?c:e.length,h=e.slice(u,f);Pie(h,i,s+u,n,o)&&(a=!0),d?(r=q1(i),l=""):l=h,u=d?c+1:e.length}return{closedOpenMath:a,state:{committedContext:r,context:i,lineBuffer:l}}}function tL(e,t,n=0){return t&&!e.context.inMath&&!e.context.inDollarMath&&!e.context.inFence&&!e.committedContext.inFence&&!/[\\$`~\r\n]/.test(t)&&!(e.lineBuffer.endsWith("\\")&&(t[0]==="["||t[0]==="]"))?{closedOpenMath:!1,state:{committedContext:q1(e.committedContext),context:q1(e.context),lineBuffer:e.lineBuffer+t}}:x2(e.lineBuffer+t,e.committedContext,n+e.lineBuffer.length,e.context.inMath||e.context.inDollarMath,n)}function Die(e,t){if(!Z8(e))return;const n=e.stream;if(typeof n?.reset!="function")return;const o=e,s=_2.get(o);if(s?.source===t)return;const i=s?t.startsWith(s.source):!1,r=i&&s?t.slice(s.source.length):"",l=i&&s?tL(s.explicitBracketMath,r,s.source.length-s.explicitBracketMath.lineBuffer.length):x2(t),a=l.state,u=i&&s?l.closedOpenMath:!1;if(s&&i&&s.key===null&&s.pendingCandidate===!1&&!u&&!Iie(s.source,r)&&!Tie(t)){s.source=t,s.explicitBracketMath=a;return}const c=Coe(t);(s&&(s&&!i||s.key!==c||u)||!s&&c)&&n.reset(),Mie(e,t,c,a)}function Bie(e){return typeof e.preTransformTokens=="function"||typeof e.postTransformTokens=="function"}function Hie(e,t){const n=e?.map,o=t?.map;return n===o?!0:!Array.isArray(n)||!Array.isArray(o)?!1:n.length===o.length&&n.every((s,i)=>s===o[i])}function H9(e,t){return!!e&&!!t&&e.type===t.type&&e.tag===t.tag&&e.nesting===t.nesting&&e.markup===t.markup&&e.content===t.content&&Hie(e,t)}function hw(e,t){return e[t]?.type==="paragraph_open"&&e[t+1]?.type==="inline"&&e[t+2]?.type==="paragraph_close"}function zie(e){for(let t=0;t+5":""}function gw(e){return{type:"paragraph",children:e,raw:e.map(jie).join("")}}function vw(e,t){if(t.sourceMap)for(const n of e)n.sourceMap||(n.sourceMap=t.sourceMap)}function yw(e,t){if(e.type!=="paragraph")return null;const n=e.children,o=Array.isArray(n)?n:[];if(o.length===0)return null;const s=Cie(t);if(!s?.size)return null;let i=-1;for(let c=0;ch?.type==="hardbreak")){i=c;break}}if(i===-1)return null;const r=o.slice(0,i),l=o[i];if(!l)return null;const a=[];r.length&&a.push(gw(r)),a.push(l);const u=o.slice(i+1);return u.length&&a.push(gw(u)),a}function Vie(e){const t=e.trim();if(!t)return null;const n=/^(?:]*>\s*)?]*)?>/i.test(t),o=/<\/html>\s*$/i.test(t);return!n||!o?null:[{type:"html_block",tag:"html",raw:e,content:e,loading:!1}]}function K1(e){const t=e.raw;if(typeof t=="string")return t;const n=e.content;return typeof n=="string"?n:""}function qie(e,t){if(e.type!=="html_block"||!t)return!1;const n=String(e.raw??e.content??"");return new RegExp(String.raw`^\s*<\s*\/\s*${Gr(t)}\s*>\s*$`,"i").test(n)}const z9=new Set(["iframe","script","style","textarea","title"]);function Zp(e,t,n){if(!e||!t)return null;const o=t.toLowerCase(),s=f=>{if(e.startsWith("",f+4);return{closing:!1,end:k===-1?e.length:k+3,selfClosing:!1,tag:""}}if(e.startsWith("",f+9);return{closing:!1,end:k===-1?e.length:k+3,selfClosing:!1,tag:""}}const h=Yo(e.slice(f));if(h===-1)return null;const g=f+h+1,m=e.slice(f,g);if(/^<\s*[!?]/.test(m))return{closing:!1,end:g,selfClosing:!1,tag:""};let w=m.slice(1).trimStart();const _=w.startsWith("/");_&&(w=w.slice(1).trimStart());const v=w.match(/^([A-Z][\w:-]*)/i);return v?.[1]?{closing:_,end:g,selfClosing:/\/\s*>$/.test(m),tag:v[1].toLowerCase()}:{closing:!1,end:f+1,selfClosing:!1,tag:""}},i=(f,h)=>{const g=new RegExp(String.raw`<\s*\/\s*${Gr(f)}(?=\s|>)`,"gi");g.lastIndex=h;const m=g.exec(e);if(!m||m.index==null)return null;const w=s(m.index);return w?{start:m.index,end:w.end}:null};let r=-1,l=-1,a=Math.max(0,n);for(;a$/.test(u))return{raw:u,start:r,end:l+1,closed:!0};if(z9.has(o)){const f=i(o,l+1);return f?{raw:e.slice(r,f.end),start:r,end:f.end,closeStart:f.start,closed:!0}:{raw:e.slice(r),start:r,end:e.length,closed:!1}}let c=1,d=l+1;for(;d]*$/,"")} +`}function kw(e){return e.replace(/\r\n/g,` +`).replace(/(^|\n)[ \t]{1,4}/g,"$1")}function Gie(e,t,n){return n?e.includes(n,t)?!0:kw(e.slice(Math.max(0,t))).includes(kw(n)):!1}function Yie(e,t){let n=Math.max(0,t);for(;n)`,"gi");let o=-1,s;for(;(s=n.exec(e))!==null;)o=s.index;return o}function oL(e,t){return{final:t,__disableStreamParse:!0,requireClosingStrong:e.requireClosingStrong,customHtmlTags:e.customHtmlTags,validateLink:e.validateLink}}const Jie=new Set(["admonition","blockquote","code_block","definition_list","footnote","heading","list","math_block","table","thematic_break"]),Qie=/(?:^|\n)\s{0,3}(?:#{1,6}\s+\S|[-+*]\s+\S|\d+[.)]\s+\S|>\s*\S|`{3,}|~{3,}|(?:\*{3,}|-{3,}|_{3,})(?:\s|$)|\|.*\|)/m;function ere(e){return/\n\s*\n/.test(e)||Qie.test(e)}function tre(e,t){if(!e.trim()||t.length===0)return!1;if(t.some(o=>Jie.has(String(o?.type??"").toLowerCase()))||t.some(o=>{if(o?.type!=="html_block")return!1;const s=o;return Array.isArray(s.children)&&s.children.length>0}))return!0;if(!ere(e))return!1;if(t.length>1)return!0;const[n]=t;return!!(n&&n.type==="paragraph")}function nre(e){const t=[];let n=0;for(;n=e.length)break;const o=e.slice(n).match(/^<([A-Z][\w:-]*)/i);if(!o?.[1])return null;const s=Zp(e,o[1],n);if(!s||s.start!==n)return null;t.push(s.raw),n=s.end}return t.length>1?t:null}function ore(e,t,n,o){const s=n.customHtmlTags?.join("\0")??"",i=t,r=aw.get(i),l=r&&r.final===o&&r.customHtmlTags===s&&r.requireClosingStrong===n.requireClosingStrong&&r.validateLink===n.validateLink,a=e.map((u,c)=>l&&r.blocks[c]===u?r.children[c]:jd(u,t,n));return aw.set(i,{blocks:e,children:a,customHtmlTags:s,final:o,requireClosingStrong:n.requireClosingStrong,validateLink:n.validateLink}),a.flat()}function sre(e,t,n,o){return e.map(s=>{if(s?.type!=="html_block")return s;const i=s,r=String(i.tag??"").toLowerCase();if(!r||r==="details"||iI.has(r)||Array.isArray(i.children))return s;const l=String(s.raw??i.content??"");if(!l)return s;const a=Yo(l);if(a===-1)return s;const u=Zp(l,r,0),c=u?.closeStart??-1,d=u?.closed===!0&&c>=a+1,f=d?l.slice(a+1,c):l.slice(a+1);if(!f.trim())return s;const h=oL(n,o),g=d?null:nre(f),m=g?ore(g,t,h,o):jd(f,t,h);return tre(f,m)?{...s,children:m}:s})}function ire(e){for(const t of e)if(t?.type==="html_block")return!0;return!1}function jd(e,t,n){return e.trim()?iL(e,t,{...n,__disableStreamParse:!0}):[]}function rre(e,t,n){const o=jd(e,t,n),s=o[0];return o.length===1&&s?.type==="paragraph"&&Array.isArray(s.children)?s.children:o}function lre(e,t,n){const o=UI({content:e}),s=Yo(e),i=nL(e,"summary");if(s!==-1&&i!==-1&&i>=s+1){const r=rre(e.slice(s+1,i),t,n);r.length>0&&(o.children=r)}return o.raw=e,o}function are(e,t,n){const o=Yo(e);if(o===-1)return[];const s=e.slice(o+1);if(!s.trim())return[];const i=Zp(s,"summary",0);if(!i)return jd(s,t,n);const r=s.slice(0,i.start),l=s.slice(i.end);return[...jd(r,t,n),lre(i.raw,t,n),...jd(l,t,n)]}function sL(e,t,n,o,s,i=0){const r=[];let l=i;for(let a=0;a{const U=nL(f,"details");return U!==-1?f.slice(0,U):f})():f,[k]=sL(_?[]:m===-1?e.slice(a+1):e.slice(a+1,m),t,n,o,s,h+f.length),y=are(v,n,oL(o,s)),x=m===-1?"":String(e[m].raw??K1(e[m])??""),M=_||m!==-1&&w?.closed===!0,$=x.replace(/[\t\r\n ]+$/,""),S=M?(()=>{const U=(w?.raw??"").lastIndexOf($);return U===-1?t.length:h+U})():t.length,I=Yo(f),P=_&&I!==-1?h+I+1:h+f.length,D=t.slice(P,S===-1?t.length:S),T=n.parse(D,{__markstreamFinal:s}),L=n.renderer.render(T,n.options,{__markstreamFinal:s}),B=S+$.length,H=M?Math.max(S+x.length,Yie(t,B)):t.length,O=M?t.slice(S,H):x,F=M?t.slice(h,H):t.slice(h),W=_&&I!==-1?f.slice(0,I+1):f,z={...u,tag:"details",attrs:C2(f.slice(0,I+1)),raw:F,content:`${W}${L}${O}`,children:[...y,...k],loading:!s&&!M};if(o.includeSourceMap&&(z.sourceMap=Tp(t,h,M?H:t.length,o)),r.push(z),l=M?H:t.length,m===-1&&!_)break;m!==-1&&(a=m)}return[r,l]}function ure(e,t,n,o){if(!n)return e;const s=e.slice();let i=0;for(let r=0;r=d.start&&I.end<=d.end){s.splice(M,1);continue}break}x=S+$.length,s.splice(M,1)}}return s}function cre(e){const t=l=>l===" "||l===" "||l===` +`||l==="\r",n=l=>{if(!l||l[0]!=="<"||l.includes(">"))return!1;let a=1;if(a{const w=m.charCodeAt(0);return w>=65&&w<=90||w>=97&&w<=122},c=m=>{const w=m.charCodeAt(0);return w>=48&&w<=57},d=m=>m==="!"||u(m),f=m=>u(m)||c(m)||m===":"||m==="-",h=m=>u(m)||c(m)||m==="_"||m==="."||m===":"||m==="-",g=h;if(a>=l.length||!d(l[a]))return!1;for(a++;a=l.length)return!0;if(l[a]==="/"){for(a++;a=l.length}if(!h(l[a]))return!1;for(a++;a=l.length)return!0;const m=l[a];if(m==='"'||m==="'"){for(a++;a=l.length)return!0;a++}else{for(;a"||w==='"'||w==="'"||w==="`")break;a++}if(a>=l.length)return!0}}}return!0},o=(l,a)=>{let u=!1,c="",d=0;const f=v=>v===" "||v===" ",h=v=>{let k=0;for(;k{let k=0;for(;k";)for(y=!0,k++;k{const k=h(v);if(k)return k;const y=g(v);return y==null?null:h(y)};let w=0;const _=l.split(/\r?\n/);for(const v of _){const k=w,y=w+v.length;if(a=d&&/^\s*$/.test(x.rest)&&(u=!1,c="",d=0):(u=!0,c=M,d=$)}if(a<=y)break;w=y+1}return u},s=String(e??""),i=s.lastIndexOf("<");if(i===-1||o(s,i))return s;if(i>0){const l=s[i-1],a=l===" "||l===" "||l===` +`||l==="\r",u=s[i-2];if(!a&&!((l==="n"||l==="r")&&u==="\\"))return s}const r=s.slice(i);return r.includes(">")||r.length>1&&(r[1]===" "||r[1]===" "||r[1]===` +`||r[1]==="\r")||!n(r)?s:s.slice(0,i)}function Cw(e,t){if(e===t)return;const n=e.split(/\r?\n/),o=t.split(/\r?\n/),s=[];let i=0;for(let r=0;r{const l=Number.isFinite(r)?Math.max(0,Math.trunc(r)):0;if(lString(g??"").toLowerCase()).filter(Boolean));if(!n.size)return e;const o=g=>g===" "||g===" ",s=g=>{const m=g.charCodeAt(0);return m>=65&&m<=90||m>=97&&m<=122||m>=48&&m<=57||g==="_"||g==="-"||g===":"},i=g=>{if(!g)return!1;if(g[0]===" ")return!0;let m=0;for(let w=0;w=4)return!0;continue}if(_===" ")return!0;break}return!1},r=g=>{let m=!1,w=!1;for(let _=0;_")return _}return-1},l=g=>{let m=0;for(;m{if(i(g))return-1;const w=g.replace(/^[ \t]+/,"");if(!w||w.startsWith(">")||w.startsWith("|")||/^(?:[*+-]|\d+[.)])[\t ]+/.test(w))return-1;let _=!1,v=0;for(;v=x.length){_=!0,v++;continue}const $=x[M];if($==="!"||$==="?"){_=!0,v+=y+1;continue}if($==="/"){_=!0,v+=y+1;continue}const S=M;for(;M"&&P!=="/"){_=!0,v++;continue}const D=new RegExp(String.raw`<\s*\/\s*${I}\s*>`,"i"),T=/\/\s*>$/.test(x),L=D.test(g.slice(v+y+1)),B=D.test(e.slice(m+v+y+1)),H=/[\r\n]/.test(e.slice(m+v+y+1));if(_&&n.has(I)&&!T&&!L&&(B||H))return v;_=!0,v+=y+1}return-1};let u=!1,c="",d=0,f="",h=0;for(;hh&&e[g-1]==="\r",_=m?w?g-1:g:e.length,v=e.slice(h,_),k=m?w?`\r +`:` +`:"",y=l(v);let x=v;if(!u&&!y){const M=a(v,h);if(M!==-1){const $=k||` +`;x=`${v.slice(0,M).replace(/[ \t]+$/,"")}${$}${$}${v.slice(M).replace(/^[ \t]+/,"")}`}}f+=x,f+=k,y&&(u?y.markerChar===c&&y.markerLen>=d&&/^\s*$/.test(y.rest)&&(u=!1,c="",d=0):(u=!0,c=y.markerChar,d=y.markerLen)),h=m?g+1:e.length}return f}function fre(e,t){if(!e||!t.length)return e;const n=new Set(t.map(d=>String(d??"").toLowerCase()));if(!n.size)return e;const o=d=>d===" "||d===" ",s=d=>{const f=d.charCodeAt(0);return f>=65&&f<=90||f>=97&&f<=122||f>=48&&f<=57||d==="_"||d==="-"},i=d=>{let f=0;for(;f{let f=!1,h=!1;for(let g=0;g")return g}return-1},l=(d,f,h)=>{const g=h.toLowerCase();let m=d.indexOf("<",f);for(;m!==-1;){let w=m+1;for(;w=d.length||d[w]!=="/"){m=d.indexOf("<",m+1);continue}for(w++;wd.length){m=d.indexOf("<",m+1);continue}let _=!0;for(let k=0;k="A"&&y<="Z"?String.fromCharCode(y.charCodeAt(0)+32):y)!==g[k]){_=!1;break}}if(!_){m=d.indexOf("<",m+1);continue}let v=w+g.length;if(v")return!0;m=d.indexOf("<",m+1)}return!1},a=d=>{let f=0;for(;f=d.length||d[f]!=="<")return d;for(f++;f=d.length||d[f]==="/")return d;const h=f;for(;fc&&e[d-1]==="\r",h=f?d-1:d,g=e.slice(c,h);u+=a(g),u+=f?`\r +`:` +`,c=d+1}return u}function pre(e,t){if(!e||!t.length)return e;const n=new Set(t.map(f=>String(f??"").toLowerCase()));if(!n.size)return e;const o=f=>f===" "||f===" ",s=f=>{let h=0,g=!1,m=0;for(;h=f.length||f[h]!==">")break;for(g=!0,h++;h{let h=0;for(;hnew RegExp(String.raw`(<\s*\/\s*${f}\s*>)${"(?=[\\t ]*(?:#{1,6}[\\t ]+|>|(?:[*+-]|\\d+[.)])[\\t ]+|(?:`{3,}|~{3,})|\\||\\$\\$|:{3,}|\\[\\^[^\\]]+\\]:|(?:-{3,}|\\*{3,}|_{3,})))"}`,"gi"));let l=!1,a="",u=0,c="",d=0;for(;dd&&e[f-1]==="\r",m=h?g?f-1:f:e.length,w=e.slice(d,m),_=h?g?`\r +`:` +`:"",v=s(w),k=v?.prefix??"",y=v?.content??w,x=i(y);x&&(l?x.markerChar===a&&x.markerLen>=u&&/^\s*$/.test(x.rest)&&(l=!1,a="",u=0):(l=!0,a=x.markerChar,u=x.markerLen));let M=y;if(!l&&M.includes("{if(D.replace(/^[\t ]+/,"").startsWith("|"))return S;const T=D.slice(0,P).replace(/^[\t ]+/,"");if(T.length>0){const L=I.match(/^<\s*\/\s*([A-Z][\w:-]*)/i)?.[1]?.toLowerCase()??"",B=T.match(/^<\s*([A-Z][\w:-]*)/i)?.[1]?.toLowerCase()??"";if(!L||!B||L!==B)return S}return`${I} + +`});if(k){const $=k+M.split(` +`).join(` +${k}`);c+=$}else c+=M;c+=_,d=h?f+1:e.length}return c}function hre(e,t){if(!e||!t.length)return e;const n=new Set(t.map(T=>String(T??"").toLowerCase()));if(!n.size)return e;const o=T=>T===" "||T===" ",s=T=>{if(!T)return!1;if(T[0]===" ")return!0;let L=0;for(let B=0;B=4)return!0;continue}if(H===" ")return!0;break}return!1},i=T=>{const L=T.charCodeAt(0);return L>=65&&L<=90||L>=97&&L<=122||L>=48&&L<=57||T==="_"||T==="-"||T===":"},r=T=>{let L=0;for(;L{let L=0,B=!1,H=0;for(;L=T.length||T[L]!==">")break;for(B=!0,L++;Lr(T).startsWith("<"),u=T=>{for(let L=0;L{if(s(T))return"";const L=r(T);if(!L.startsWith("<"))return"";let B=1;for(;B=L.length||L[B]==="/"||L[B]==="!"||L[B]==="?")return"";const H=B;for(;B"&&F!=="/"?"":O},d=T=>{if(s(T))return null;const L=r(T);if(!L.startsWith("<"))return null;let B=1;for(;B=L.length)return null;const H=L[B]==="/";if(H)for(B++;B"&&z!=="/")return null;if(H)return{type:"close",name:W};if(/\/\s*>\s*$/.test(L))return{type:"open",name:W,complete:!0};const U=L.indexOf(">",B);if(U!==-1){const q=L.slice(U+1);if(new RegExp(`<\\s*\\/\\s*${W}\\s*>`,"i").test(q))return{type:"open",name:W,complete:!0}}return{type:"open",name:W,complete:!1}},f=T=>{if(s(T))return null;const L=r(T).replace(/[ \t]+$/,"");if(!L.startsWith("<")||/^<\s*(?:!--|!doctype\b|\?)/i.test(L))return null;const B=L.match(/^<\s*([A-Z][\w:-]*)\b[^>]*\/\s*>\s*$/i);if(B?.[1])return B[1].toLowerCase();const H=L.match(/^<\s*([A-Z][\w:-]*)\b[^>]*>[\s\S]*<\s*\/\s*([A-Z][\w:-]*)\s*>\s*$/i);if(!H?.[1]||!H[2])return null;const O=H[1].toLowerCase();return O===H[2].toLowerCase()?O:null};let h=!1,g="",m=0;const w=T=>{let L=0;for(;Lw(T),v=T=>{const L=r(T);return L?s(T)?!0:/^(?:#{1,6}[ \t]+|>|[*+-][ \t]+|\d+[.)][ \t]+|`{3,}|~{3,}|\||\$\$|:{3,}|\[\^[^\]]+\]:|-{3,}|\*{3,}|_{3,})/.test(L):!1},k=(T,L,B)=>{let H=T,O=0;for(;HH&&e[F-1]==="\r",U=W?z?F-1:F:e.length,q=e.slice(H,U),K=l(q),ie=K?.key??"";if(O>0&&L&&ie!==L)break;const ne=K?.content??q,Y=d(ne);if(Y?.name===B){if(Y.type==="open")Y.complete||O++;else if(O>0&&(O--,O===0))return!1}else if(O>0&&(u(ne)||v(ne)))return!0;if(W)H=F+1;else break}return!1};let y="",x=0,M=!0,$=!1,S=!1,I=` +`;const P=[];let D="";for(;xx&&e[T-1]==="\r",H=L?B?T-1:T:e.length,O=e.slice(x,H),F=L?B?`\r +`:` +`:"",W=l(O),z=W?.key??"",U=W?.content??O,q=_(U);q&&(h?q.markerChar===g&&q.markerLen>=m&&/^\s*$/.test(q.rest)&&(h=!1,g="",m=0):(h=!0,g=q.markerChar,m=q.markerLen));const K=P.length>0;if(!h&&!K){const ne=c(U),Y=!!ne&&!M&&$&&S&&k(x,z,ne);ne&&!M&&(!$||Y)&&(z&&D&&z===D?y+=`${z}${I}`:z||(y+=I))}if(y+=O,y+=F,F&&(I=F),!h){const ne=d(U);if(ne){if(ne.type==="open")ne.complete||P.push(ne.name);else for(let Y=P.length-1;Y>=0;Y--)if(P[Y]===ne.name){P.length=Y;break}}}const ie=u(U);M=ie,$=!ie&&a(U),S=!ie&&!!f(U),D=z,x=L?T+1:e.length}return y}function iL(e,t,n={}){const o=KI(n),s=o?af():0,i=!!n.final,r=(e??"").toString();let l=r.replace(/([^\\])\r(ight|ho)/g,"$1\\r$2").replace(/([^\\])\r?\n(abla|eq|ot|exists)/g,"$1\\n$2");if(xie(t,n)&&(t.stream.reset(),Sie(t)),i||(l.endsWith("- *")&&(l=l.replace(/- \*$/,"- \\*")),/(?:^|\n)\s*-\s*$/.test(l)?l=l.replace(/(?:^|\n)\s*-\s*$/,v=>v.startsWith(` +`)?` +`:""):/(?:^|\n)\s*--\s*$/.test(l)?l=l.replace(/(?:^|\n)\s*--\s*$/,v=>v.startsWith(` +`)?` +`:""):/(?:^|\n)\s*>\s*$/.test(l)?l=l.replace(/(?:^|\n)\s*>\s*$/,v=>v.startsWith(` +`)?` +`:""):/\n\s*[*+]\s*$/.test(l)?l=l.replace(/\n\s*[*+]\s*$/,` +`):/(?:^|\n)\s*\d+\s*$/.test(l)?/^\d+$/.test(l.trim())||(l=l.replace(/(?:^|\n)\s*\d+\s*$/,v=>v.startsWith(` +`)?` +`:"")):/(?:^|\n)\s*\d+[.)]\s+\*{1,3}\s*$/.test(l)?l=l.replace(/((?:^|\n)\s*\d+[.)]\s+)(\*{1,3})\s*$/,(v,k,y)=>`${k}${y.split("").map(()=>"\\*").join("")}`):/(?:^|\n)\s*\d+[.)]\s*$/.test(l)?l=l.replace(/(?:^|\n)\s*\d+[.)]\s*$/,v=>v.startsWith(` +`)?` +`:""):/\n[[(]\n*$/.test(l)&&(l=l.replace(/(\n\[|\n\()+\n*$/g,` +`)),l=Oie(l,t),l=Fie(l,n.customHtmlTags)??l),n.customHtmlTags?.length&&l.includes("<")){const v=Ec(n.customHtmlTags);if(v.length&&(l=dre(l,v),l=fre(l,v),l=hre(l,v),l=pre(l,v),l.includes("[\t ]*)(\r?\n)(?![\t ]*\r?\n|$)`,"gim");l=l.replace(y,"$1$2$2")}}i||(l=cre(l));const a=Vie(l);if(a){if(n.includeSourceMap){const y={...n,__sourceLineMapper:Cw(r,l)};a[0].sourceMap=Tp(l,0,l.length,y)}const v=n.preTransformTokens,k=n.postTransformTokens;if(t5(t,n)||typeof v=="function"||typeof k=="function"){const y=mw(t,l,{__markstreamFinal:i},n),x=typeof v=="function"&&v(y)||y;typeof k=="function"&&k(x)}return cw(a,n,o,s)}const u=mw(t,l,{__markstreamFinal:i},n);if(!u||!Array.isArray(u))return cw([],n,o,s);const c=n.preTransformTokens,d=n.postTransformTokens;let f=u;c&&typeof c=="function"&&(f=c(f)||f);const h=t,g=typeof h.validateLink=="function"&&h.__markstreamOriginalValidateLink&&h.validateLink!==h.__markstreamOriginalValidateLink?h.validateLink:void 0,m=n.validateLink??g??h.options?.validateLink??(typeof h.validateLink=="function"?h.validateLink:void 0),w={...n,validateLink:m,__markdownIt:t,__sourceLineMapper:n.includeSourceMap===!0?Cw(r,l):void 0,__sourceMarkdown:l,__customHtmlBlockCursor:0};let _=bie(t,l,f,w,o);if(d&&typeof d=="function"){const v=d(f);if(Array.isArray(v)){const k=v[0],y=k?.type;k&&typeof y=="string"?_=Zh(v,{...w,__customHtmlBlockCursor:0},o):_=v}}if(ire(_)&&(_=ure(_,i,l,w),_=sL(_,l,t,w,i)[0],_=sre(_,t,w,i)),i){const v=new WeakSet,k=y=>{if(!y||typeof y!="object"||v.has(y))return;if(v.add(y),Array.isArray(y)){for(const M of y)k(M);return}const x=y;x.type==="html_block"&&x.loading===!0&&(x.loading=!1);for(const M of Object.values(x))k(M)};k(_)}return _=GI(_,n),n.debug&&console.log("Parsed Markdown Tree Structure:",_),ZI(_,o,s)}function ww(e,t){if(!e||!Array.isArray(e))return[];const n=[],o=du(t),s=t?.includeSourceMap===!0;let i=0;for(;ic.type==="html_block")){if(s)for(const c of u)On(c,l,t);for(const c of u)al(c,l,t);n.push(...u)}else{const c={type:"paragraph",raw:a,children:u};s&&On(c,l,t);const d=yw(c,t);if(d){s&&vw(d,c);for(const f of d)al(f,l,t);n.push(...d)}else al(c,l,t),n.push(c)}o.remember(a)}i+=1;break;default:i+=1;break}}return n}const mre=/^([a-z][\w-]*)(?=[\t\n\f\r />]|$)/i,gre=new Set([...Vp,"base","button","datalist","dialog","embed","fieldset","form","iframe","input","legend","link","meta","object","optgroup","option","output","param","select","style","template","textarea","title"]),vre=new Set(["a","abbr","b","blockquote","br","caption","code","col","colgroup","dd","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","ins","kbd","li","mark","ol","p","picture","pre","s","small","source","span","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","ul"]);function _w(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function yre(e){return typeof e=="string"?e:e==null?"":String(e)}function rL(e){return/^[^\s"'<>`=]+$/.test(e)&&!/^on/i.test(e)}function Oa(e){return yre(e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function lL(e){return Oa(e).replace(/`/g,"`")}function A2(e){return String(e??"").trim().toLowerCase()}function i5(e,t="safe"){const n=A2(e);return n?t==="escape"?!0:t==="trusted"?Vp.has(n):!vre.has(n):!1}function aL(e,t="safe"){const n=A2(e);return n?t==="escape"?!0:t==="trusted"?Vp.has(n):gre.has(n):!1}function xw(e){const t=Object.entries(e);return t.length===0?"":t.map(([n,o])=>o===""?` ${n}`:` ${n}="${lL(o)}"`).join("")}function uL(e){const t=e.startsWith("/"),n=t?e.slice(1):e,o=n.match(mre);return o?{attrsStr:t?"":n.slice(o[0].length).trimStart(),isClosing:t,isSelfClosing:!t&&e.trimEnd().endsWith("/"),tagName:o[1]}:null}function kre(e,t){const n=e.split(",").map(o=>o.trim()).filter(Boolean);return n.length===0?!1:n.some(o=>{const s=o.split(/\s+/,1)[0]??"";return!s||ic(s,{tagName:t,attrName:"srcset"})})}function cL(e,t,n,o){return hte.has(e)||n==="safe"&&e==="style"?!0:e==="srcset"?kre(t,o):!!(mte.has(e)&&t&&ic(t,{tagName:o,attrName:e}))}function Ku(e,t){const n=t.toLowerCase();return Object.keys(e).find(o=>o.toLowerCase()===n)}function dL(e,t,n,o=!1){if(t!=="safe"||A2(n)!=="a")return e;const s=Ku(e,"href");if(o&&(!s||!e[s])){const a=Ku(e,"target"),u=Ku(e,"rel");return a&&delete e[a],u&&delete e[u],e}const i=Ku(e,"target");if((i?String(e[i]).trim():"").toLowerCase()!=="_blank")return e;const r=Ku(e,"rel"),l=new Set(String(r?e[r]:"").split(/\s+/).map(a=>a.trim()).filter(Boolean).filter(a=>a.toLowerCase()!=="opener"));return l.add("noopener"),l.add("noreferrer"),r&&r!=="rel"&&delete e[r],e.rel=Array.from(l).join(" "),e}function Sw(e,t="safe",n){const o={};for(const[s,i]of Object.entries(e)){const r=s.trim(),l=r.toLowerCase();!r||!rL(r)||cL(l,i,t,n)||(o[r]=i)}return dL(o,t,n,!!Ku(e,"href"))}function fL(e,t){const n=e.toLowerCase();return sI.has(n)?!1:_w(t,n)||_w(t,e)}function r5(e,t="safe",n){const o={};for(const[s,i]of Object.entries(e)){const r=s.trim(),l=r.toLowerCase();!r||!rL(r)||cL(l,i,t,n)||(o[r]=i)}return dL(o,t,n,!!Ku(e,"href"))}function Z1(e){const t={};if(!Array.isArray(e)||e.length===0)return t;for(const[n,o]of e)n&&(t[String(n)]=o==null?"":String(o));return t}function Gh(e,t="safe",n){const o=r5(Z1(e),t,n),s=Object.entries(o).map(([i,r])=>[i,r]);return s.length>0?s:void 0}function bre(e,t){const n=t.toLowerCase();if(["checked","disabled","readonly","required","autofocus","multiple","hidden"].includes(n))return e==="true"||e===""||e===t;if(["value","min","max","step","width","height","size","maxlength"].includes(n)){const o=Number(e);if(e!==""&&!Number.isNaN(o))return o}return e}function Cre(e){const t={};for(const[n,o]of Object.entries(e))t[n]=bre(o,n);return t}function W9(e){return e.trim().length>0}function pL(e){const t=[];let n=0;for(;n",n);if(r!==-1){n=r+3;continue}break}const o=e.indexOf("<",n);if(o===-1){if(nn){const r=e.slice(n,o);W9(r)&&t.push({type:"text",content:r})}if(e.startsWith("![CDATA[",o+1)){const r=e.indexOf("]]>",o);if(r!==-1){t.push({type:"text",content:e.slice(o,r+3)}),n=r+3;continue}break}if(e.startsWith("!",o+1)){const r=e.indexOf(">",o);if(r!==-1){n=r+1;continue}break}const s=e.indexOf(">",o);if(s===-1)break;const i=uL(e.slice(o+1,s));if(!i){const r=e.slice(o,s+1);W9(r)&&t.push({type:"text",content:r}),n=s+1;continue}if(i.isClosing)t.push({type:"tag_close",tagName:i.tagName});else{const r={};if(i.attrsStr){const l=/([^\s=]+)(?:=(?:"([^"]*)"|'([^']*)'|(\S*)))?/g;let a;for(;(a=l.exec(i.attrsStr))!==null;){const u=a[1],c=a[2]??a[3]??a[4]??"";u&&!u.endsWith("/")&&(r[u]=c)}}t.push({type:i.isSelfClosing||eu.has(i.tagName.toLowerCase())?"self_closing":"tag_open",tagName:i.tagName,attrs:r})}n=s+1}return t}function wre(e){const t=[];let n=0;for(;n",n);if(l!==-1){n=l+3;continue}break}const o=e.indexOf("<",n);if(o===-1){nn&&t.push({type:"text",content:e.slice(n,o)}),e.startsWith("![CDATA[",o+1)){const l=e.indexOf("]]>",o);if(l!==-1){t.push({type:"text",content:e.slice(o,l+3)}),n=l+3;continue}break}if(e.startsWith("!",o+1)){const l=e.indexOf(">",o);if(l!==-1){n=l+1;continue}break}const s=e.indexOf(">",o);if(s===-1)break;const i=uL(e.slice(o+1,s));if(!i){t.push({type:"text",content:e.slice(o,s+1)}),n=s+1;continue}if(i.isClosing){t.push({type:"tag_close",tagName:i.tagName}),n=s+1;continue}const r={};if(i.attrsStr){const l=/([^\s=]+)(?:=(?:"([^"]*)"|'([^']*)'|(\S*)))?/g;let a;for(;(a=l.exec(i.attrsStr))!==null;){const u=a[1],c=a[2]??a[3]??a[4]??"";u&&!u.endsWith("/")&&(r[u]=c)}}t.push({type:i.isSelfClosing||eu.has(i.tagName.toLowerCase())?"self_closing":"tag_open",tagName:i.tagName,attrs:r}),n=s+1}return t}function _re(e){const t=String(e.tagName??"").trim();if(!t)return"";if(e.type==="tag_close")return`</${Oa(t)}>`;const n=Object.entries(e.attrs??{}).map(([o,s])=>s===""?` ${Oa(o)}`:` ${Oa(o)}="${lL(s)}"`).join("");return e.type==="self_closing"?`<${Oa(t)}${n} />`:`<${Oa(t)}${n}>`}function xre(e,t){if(!e||!e.includes("<")||!t||Object.keys(t).length===0)return!1;for(const n of pL(e))if((n.type==="tag_open"||n.type==="self_closing")&&fL(n.tagName??"",t))return!0;return!1}function Vd(e,t="safe"){if(!e)return"";if(t==="escape")return Oa(e);const n=wre(e),o=[],s=[],i=[];for(const r of n){if(r.type==="text"){i.length===0&&s.push(Oa(r.content??""));continue}const l=A2(r.tagName);if(!l)continue;if(aL(l,t)){r.type==="tag_open"?i.push(l):r.type==="tag_close"&&i[i.length-1]===l&&i.pop();continue}if(i.length>0)continue;if(t==="safe"&&i5(l,t)){s.push(_re(r));continue}if(r.type==="self_closing"){s.push(`<${l}${xw(Sw(r.attrs??{},t,l))}>`);continue}if(r.type==="tag_open"){s.push(`<${l}${xw(Sw(r.attrs??{},t,l))}>`),eu.has(l)||o.push(l);continue}const a=o.lastIndexOf(l);if(a===-1)continue;for(;o.length>a+1;){const c=o.pop();c&&s.push(``)}const u=o.pop();u&&s.push(``)}for(;o.length>0;){const r=o.pop();r&&s.push(``)}return s.join("")}const Sre=[/javascript:/i,/vbscript:/i,/data:text\/html/i,/expression\s*\(/i,/@import/i],Aw="http://www.w3.org/2000/svg",Are=new Set(["script","style","iframe","object","embed","link","meta"]),Mre=new Set(["svg","style","g","a","defs","marker","path","rect","circle","ellipse","line","polyline","polygon","text","tspan","title","desc","use","image","lineargradient","radialgradient","stop","clippath","mask","pattern"]),Tre=new Set(["href","xlink:href","src","srcdoc","action","data","formaction","poster"]),Ere=new Set(["clip-path","fill","filter","marker-end","marker-mid","marker-start","mask","stroke"]),Ire=new Set(["circle","ellipse","image","line","path","polygon","polyline","rect","text","tspan","use"]);function Lre(e){return(e.getAttribute("href")||e.getAttribute("xlink:href"))?.startsWith("#")===!0}function $re(e){return!!(e.getAttribute("href")||e.getAttribute("xlink:href")||e.getAttribute("src"))}function Nre(e){const t=e.nodeName.toLowerCase();return t==="use"?Lre(e):t==="image"?$re(e):t==="text"||t==="tspan"?!!e.textContent?.trim():Ire.has(t)}function Fre(e){return e.replace(/(["'])\s*javascript:/gi,"$1#").replace(/\bjavascript:/gi,"#").replace(/(["'])\s*vbscript:/gi,"$1#").replace(/\bvbscript:/gi,"#").replace(/\bdata:text\/html/gi,"#")}function Rre(e,t,n){const o=e.toLowerCase(),s=t.toLowerCase(),i=String(n??"").trim();return i?(o==="use"||o==="marker"||o==="clippath"||o==="mask")&&(s==="href"||s==="xlink:href")?i.startsWith("#")?i:"":o==="a"&&(s==="href"||s==="xlink:href")?ic(i,{tagName:"a",attrName:"href"})?"":i:o==="image"&&(s==="href"||s==="xlink:href"||s==="src")?ic(i,{tagName:"img",attrName:"src"})?"":i:s==="href"||s==="xlink:href"?i.startsWith("#")?i:"":ic(i,{tagName:o,attrName:s})?"":i:""}function Ore(e,t){let n=t+4;for(;n{const o=n.trim();if(/^[0-9a-f]+$/i.test(o)){const s=Number.parseInt(o,16);try{return Number.isFinite(s)?String.fromCodePoint(s):""}catch{return""}}return String(n).trim()})}function mL(e){const t=hL(e),n=t.toLowerCase();let o=0;for(;on.test(t))||mL(t)}function Pre(e){if(e.tagName.toLowerCase()!=="a"||e.getAttribute("target")?.trim().toLowerCase()!=="_blank")return;const t=new Set(String(e.getAttribute("rel")??"").split(/\s+/).map(n=>n.trim()).filter(Boolean).filter(n=>n.toLowerCase()!=="opener"));t.add("noopener"),t.add("noreferrer"),e.setAttribute("rel",Array.from(t).join(" "))}function vh(e){const t=Number.parseFloat(String(e??""));return Number.isFinite(t)?t:0}function gL(e,t){if(e.nodeType===Node.TEXT_NODE){const s=e.textContent??"";s&&t.push(s);return}if(e.nodeType!==Node.ELEMENT_NODE)return;const n=e,o=n.tagName.toLowerCase();if(!Are.has(o)){if(o==="br"){t.push(` +`);return}for(const s of Array.from(n.childNodes))gL(s,t)}}function Dre(e){for(const t of Array.from(e.querySelectorAll("foreignObject"))){const n=[];gL(t,n);const o=n.join("").split(/\r?\n/).map(c=>c.trim()).filter(Boolean);if(!o.length){t.remove();continue}const s=vh(t.getAttribute("width")),i=vh(t.getAttribute("height")),r=vh(t.getAttribute("x")),l=vh(t.getAttribute("y")),a=e.ownerDocument.createElementNS(Aw,"text");a.setAttribute("x",String(r+s/2)),a.setAttribute("y",String(l+i/2)),a.setAttribute("text-anchor","middle"),a.setAttribute("dominant-baseline","central");const u=t.querySelector(".nodeLabel");if(u?.getAttribute("class")&&a.setAttribute("class",u.getAttribute("class")),o.length===1)a.textContent=o[0];else{const c=-.6*(o.length-1);for(const[d,f]of o.entries()){const h=e.ownerDocument.createElementNS(Aw,"tspan");h.setAttribute("x",String(r+s/2)),h.setAttribute("dy",d===0?`${c}em`:"1.2em"),h.textContent=f,a.appendChild(h)}}t.parentNode?.replaceChild(a,t)}}function Bre(e){Dre(e);const t=[e,...Array.from(e.querySelectorAll("*"))];for(const n of t){const o=n.tagName.toLowerCase();if(!Mre.has(o)){n.remove();continue}if(o==="style"&&Mw(n.textContent??"")){n.remove();continue}const s=Array.from(n.attributes);for(const i of s){const r=i.name.toLowerCase();if(/^on/i.test(r)){n.removeAttribute(i.name);continue}if(r==="style"&&i.value&&Mw(i.value)){n.removeAttribute(i.name);continue}if(r==="srcdoc"){n.removeAttribute(i.name);continue}if(Tre.has(r)&&i.value){const l=Rre(o,r,i.value);if(!l){n.removeAttribute(i.name);continue}l!==i.value&&n.setAttribute(i.name,l);continue}if(Ere.has(r)&&i.value&&mL(i.value)){n.removeAttribute(i.name);continue}if(i.value){const l=Fre(i.value);l!==i.value&&n.setAttribute(i.name,l)}}Pre(n)}}function tVe(e){if(typeof DOMParser>"u"||!e)return null;try{const t=new DOMParser().parseFromString(e,"image/svg+xml").documentElement;if(!t||t.nodeName.toLowerCase()!=="svg")return null;const n=t;return Bre(n),Hre(n)?null:n}catch{return null}}function Hre(e){const t=e.getAttribute("viewBox");if(t){const s=t.trim().split(/[\s,]+/);if(s.length===4){const i=Number.parseFloat(s[2]||""),r=Number.parseFloat(s[3]||"");if(!Number.isFinite(i)||!Number.isFinite(r)||i<=0||r<=0)return!0}}const n=[e,...Array.from(e.querySelectorAll("*"))];let o=!1;for(const s of n){Nre(s)&&(o=!0);for(const i of Array.from(s.attributes))if(/\bNaN\b/i.test(i.value)||i.name==="style"&&/max-width:\s*0(?:px)?/i.test(i.value))return!0}return!o}const yh=[];function U9(e){return String(e??"").replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function zre(e){return(String(e||"text").trim().split(/\s+/)[0]||"text").replace(/[^\w+.#:-]/g,"-").replace(/-+/g,"-")||"text"}function Wre(e){return e.replace(/[^\w:.+-]/g,"-").replace(/-+/g,"-")}function Tw(e=`editor-${Date.now()}`,t={}){const n=Ioe(t),o=n;o.__markstreamRegisteredPluginCount=yh.length,o.__markstreamHasCustomParserExtensions=!!(t.plugin?.length||t.apply?.length||yh.length);const s={"common.copy":"Copy"};let i;if(typeof t.i18n=="function")i=t.i18n;else if(t.i18n&&typeof t.i18n=="object"){const g=t.i18n;i=m=>g[m]??s[m]??m}else i=g=>s[g]??g;if(Array.isArray(t.plugin))for(const g of t.plugin){const m=g;if(Array.isArray(m)){const[w,..._]=m;typeof w=="function"&&n.use(w,..._)}else typeof m=="function"&&n.use(m)}if(Array.isArray(t.apply))for(const g of t.apply)try{g(n)}catch(m){console.error("[getMarkdown] apply function threw an error",m)}if(yh.length)for(const g of yh)if(Array.isArray(g)){const[m,...w]=g;typeof m=="function"&&n.use(m,...w)}else typeof g=="function"&&n.use(g);n.use(qY),n.use(GY),n.use(UY);const r=uX,l=r.default??r;n.use(l),n.use(WY),n.use(zY),n.core.ruler.after("block","mark_fence_closed",g=>{const m=g,w=m.src,_=!!m.env?.__markstreamFinal,v=w.split(/\r?\n/);for(const k of m.tokens){if(k.type!=="fence"||!k.map||!k.markup)continue;const y=k.map[0],x=k.map[1],M=k.markup,$=M[0],S=M.length,I=v[Math.max(0,x-1)]??"";let P=0;for(;Py+1&&D>=S&&T===I.length,B=k;B.meta=B.meta??{},B.meta.unclosed=!L,B.meta.closed=!!L}});const a=(g,m)=>{const w=g,_=w.pos;if(w.src[_]!=="~")return!1;const v=w.src[_-1],k=w.src[_+1];if(/\d/.test(v)&&/\d/.test(k)){if(!m){const y=w.push("text","",0);y.content="~"}return w.pos+=1,!0}return!1};n.inline.ruler.before("sub","wave",a),n.renderer.rules.fence=(g,m)=>{const w=g[m],_=String(w.info??"").trim(),v=String(w.content??""),k=btoa(unescape(encodeURIComponent(v))),y=zre(_),x=U9(y),M=Wre(`editor-${e}-${m}-${y}`),$=U9(i("common.copy"));return`
        +
        + ${U9(y.toUpperCase())} + +
        +
        +
        `};const u=/^\[(\d+)\]/,c=/^\[([^\]\n]+)\]/,d=g=>{if(!g.startsWith("["))return!1;const m=c.exec(g);if(!m)return g!=="["&&!/^\[\d+$/.test(g);const w=String(m[1]??"");return g.slice(m[0].length).startsWith("(")?!1:!/^\d+$/.test(w)},f=(g,m)=>{const w=g;if(w.src[w.pos]!=="[")return!1;const _=u.exec(w.src.slice(w.pos));if(!_)return!1;const v=w.src.slice(Math.max(0,w.pos-120),w.pos);if(/"[^"\n]{1,80}"\s*:\s*$/.test(v))return!1;const k=w.src.slice(w.pos+_[0].length);if(k.startsWith("](")||k.startsWith("(")||d(k))return!1;if(!m){const y=_[1],x=w.push("reference","span",0);x.content=y,x.markup=_[0],x.raw=_[0]}return w.pos+=_[0].length,!0};n.inline.ruler.before("escape","reference",f),n.renderer.rules.reference=(g,m)=>{const _=String(g[m].content??"");return`${_}`};const h=n.use.bind(n);return n.use=((...g)=>(o.__markstreamHasCustomParserExtensions=!0,h(...g))),n}function Ure({nextContent:e,previousContent:t,typewriterEnabled:n}){return n?e===t?{settledContent:e,streamedDelta:"",appended:!1}:t&&e.startsWith(t)&&e.length>t.length?{settledContent:t,streamedDelta:e.slice(t.length),appended:!0}:{settledContent:e,streamedDelta:"",appended:!1}:{settledContent:e,streamedDelta:"",appended:!1}}function vL({nextContent:e,persistedContent:t,currentState:n,typewriterEnabled:o,streamRenderVersionChanged:s=!1}){const i=`${n.settledContent}${n.streamedDelta}`;return o?n.streamedDelta&&i===e?s?{settledContent:i,streamedDelta:"",appended:!1}:{settledContent:n.settledContent,streamedDelta:n.streamedDelta,appended:!1}:Ure({nextContent:e,previousContent:t??i,typewriterEnabled:o}):{settledContent:e,streamedDelta:"",appended:!1}}const jre={plain:"plaintext",text:"plaintext",txt:"plaintext",js:"javascript",mjs:"javascript",cjs:"javascript",ts:"typescript",mts:"typescript",cts:"typescript",golang:"go",py:"python",rb:"ruby",rs:"rust",kt:"kotlin",kts:"kotlin",md:"markdown",yml:"yaml",sh:"shellscript",bash:"shellscript",zsh:"shellscript",shell:"shellscript",shellscript:"shellscript",ps:"powershell",ps1:"powershell",pwsh:"powershell","c++":"cpp","c#":"csharp",cs:"csharp",objc:"objective-c",objectivec:"objective-c","objective-c":"objective-c",objectivecpp:"objective-cpp","objective-c++":"objective-cpp","objective-cpp":"objective-cpp"};function Vre(e){const t=String(e??"").trim();if(!t)return"";const[n=""]=t.split(/\s+/);return n.split(":")[0]?.trim().toLowerCase()??""}function yL(e){const t=Vre(e);return jre[t]??t}function qre(e){if(!Array.isArray(e))return;const t=e.filter(o=>typeof o=="string").map(o=>yL(o)).filter(Boolean),n=Array.from(new Set(t)).sort();return n.length>0?n:void 0}function Kre(e){if(!Array.isArray(e))return;const t=[],n=new Set;for(const o of e){if(typeof o!="string")continue;const s=o.trim();!s||n.has(s)||(n.add(s),t.push(s))}return t.length>0?t:void 0}function Zre(e){return Kre(e)?.join("\0")??""}function Gre(e,t){return`${Zre(e)}\0\0${qre(t)?.join("\0")??""}`}function ld(e,t,n=1){const o=Number(e);return Number.isFinite(o)?Math.max(n,o):t}function Ew(e,t){const n=Number(e);return Number.isFinite(n)?Math.max(0,n):t}var Yre=class{constructor(e={},t){this.source="",this.visible="",this.done=!1,this.paused=!1,this.listeners=new Set,this.rafId=0,this.startedAt=0,this.lastTick=0,this.charBudget=0,this.hasStarted=!1,this.destroyed=!1,this.getSnapshot=()=>({source:this.source,visible:this.visible,done:this.done,paused:this.paused,pendingChars:this.pendingChars,caughtUp:this.caughtUp,final:this.final}),this.subscribe=d=>this.destroyed?()=>{}:(this.listeners.add(d),()=>{this.listeners.delete(d)}),this.enqueue=d=>{if(this.destroyed||!d)return;this.done&&(this.done=!1);const f=this.source.length>0,h=this.pendingChars<=0;if(this.source+=d,h){const g=Iw();this.startedAt=f&&this.hasStarted?g-this.normalizedStartDelayMs:g,this.lastTick=g,this.charBudget=0}this.hasStarted=!0,this.emit(),this.ensureLoop()},this.finish=(d={})=>{if(!this.destroyed){if(this.done=!0,d.flush??this.flushOnFinish){this.visible=this.source,this.charBudget=0,this.currentCps=this.minCharsPerSecond,this.cancelLoop(),this.emit();return}this.emit(),this.ensureLoop()}},this.flush=()=>{this.destroyed||(this.visible=this.source,this.charBudget=0,this.currentCps=this.minCharsPerSecond,this.cancelLoop(),this.emit())},this.reset=(d="")=>{this.destroyed||(this.cancelLoop(),this.source=d,this.visible=d,this.done=!1,this.paused=!1,this.hasStarted=!1,this.startedAt=0,this.lastTick=0,this.charBudget=0,this.currentCps=this.minCharsPerSecond,this.emit())},this.pause=()=>{this.destroyed||this.paused||(this.paused=!0,this.cancelLoop(),this.emit())},this.resume=()=>{if(this.destroyed||!this.paused)return;this.paused=!1;const d=Iw();this.lastTick=d,this.startedAt||=d,this.emit(),this.ensureLoop()},this.destroy=()=>{this.destroyed||(this.destroyed=!0,this.cancelLoop(),this.listeners.clear())},this.dispose=()=>{this.destroy()},this.tick=d=>{if(this.rafId=0,this.destroyed||this.paused)return;if(this.pendingChars<=0){this.startedAt=0,this.lastTick=0,this.charBudget=0,this.currentCps=this.minCharsPerSecond;return}if(d-this.startedAtthis.normalizedCatchUpThreshold?this.normalizedCatchUpLatencyMs:this.normalizedTargetLatencyMs,w=ele(g/Math.max(.001,m/1e3),this.minCharsPerSecond,this.maxCharsPerSecond);if(this.currentCps+=(w-this.currentCps)*.2,this.charBudget+=this.currentCps*(h/1e3),this.charBudget<1){this.ensureLoop();return}const _=Math.min(Math.floor(this.charBudget),this.maxCharsPerCommit),v=Qre(this.source.slice(this.visible.length),_,this.segmenter);v.text&&(this.visible+=v.text,this.charBudget=Math.max(0,this.charBudget-v.graphemeCount),this.emit()),this.ensureLoop()};const{minCharsPerSecond:n=40,maxCharsPerSecond:o=1e3,targetLatencyMs:s=900,catchUpLatencyMs:i=350,catchUpThreshold:r=600,maxCommitFps:l=30,startDelayMs:a=80,maxCharsPerCommit:u=80,flushOnFinish:c=!1}=e;this.minCharsPerSecond=ld(n,40,1),this.maxCharsPerSecond=Math.max(this.minCharsPerSecond,ld(o,1e3,1)),this.normalizedTargetLatencyMs=ld(s,900,1),this.normalizedCatchUpLatencyMs=ld(i,350,1),this.normalizedCatchUpThreshold=Ew(r,600),this.normalizedStartDelayMs=Ew(a,80),this.maxCommitFps=Math.trunc(ld(l,30,1)),this.maxCharsPerCommit=Math.trunc(ld(u,80,1)),this.flushOnFinish=c,this.segmenter=Jre(),t&&this.listeners.add(t),this.currentCps=this.minCharsPerSecond}get pendingChars(){return Math.max(0,this.source.length-this.visible.length)}get caughtUp(){return this.pendingChars===0}get final(){return this.done&&this.caughtUp}ensureLoop(){if(!(this.destroyed||this.rafId||this.paused||this.pendingChars<=0)){if(typeof requestAnimationFrame!="function"){this.flush();return}this.rafId=requestAnimationFrame(this.tick)}}cancelLoop(){this.rafId&&(typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(this.rafId),this.rafId=0)}emit(){if(!this.destroyed)for(const e of this.listeners)e()}};function Xre(e={},t){const n=new Yre(e,t);return{getSnapshot:n.getSnapshot,subscribe:n.subscribe,enqueue:n.enqueue,finish:n.finish,flush:n.flush,reset:n.reset,pause:n.pause,resume:n.resume,destroy:n.destroy,dispose:n.dispose}}function Jre(){if(typeof Intl>"u")return null;const e=Intl.Segmenter;return e?new e(void 0,{granularity:"grapheme"}):null}function Qre(e,t,n){if(!e||t<=0)return{text:"",graphemeCount:0};if(!n){const i=Array.from(e).slice(0,t);return{text:i.join(""),graphemeCount:i.length}}let o="",s=0;for(const i of n.segment(e)){if(s>=t)break;o+=i.segment,s++}return{text:o,graphemeCount:s}}function Iw(){return typeof performance<"u"?performance.now():Date.now()}function ele(e,t,n){return Math.min(n,Math.max(t,e))}var tle=(e,t,n)=>new Promise((o,s)=>{var i=a=>{try{l(n.next(a))}catch(u){s(u)}},r=a=>{try{l(n.throw(a))}catch(u){s(u)}},l=a=>a.done?o(a.value):Promise.resolve(a.value).then(i,r);l((n=n.apply(e,t)).next())});const F3=Symbol.for("markstream-vue:node-lifecycle");function nVe(){}const l5=new Map;let kL="material";const Md=new Map,Lw=new Map;let R3=null;function nle(e){l5.set(e.id,e)}function ole(e){const t=l5.get(kL);if(!t)return;const n=t.core[e];if(n)return n;const o=Md.get(t.id);if(o){const s=o[e];if(s)return s}t.loadExtended&&!Md.has(t.id)&&ile(t)}function sle(){var e,t;return(t=(e=l5.get(kL))==null?void 0:e.fallback)!=null?t:""}function ile(e){return tle(this,null,function*(){var t,n,o;if(Md.has(e.id))return(t=Md.get(e.id))!=null?t:null;let s=Lw.get(e.id);return s||(s=((o=(n=e.loadExtended)==null?void 0:n.call(e))!=null?o:Promise.resolve(null)).then(i=>(Md.set(e.id,i),R3?.(),i)).catch(()=>(Md.set(e.id,null),null)),Lw.set(e.id,s)),s})}const $w='',Nw='',rle={id:"material",core:{"":Nw,plain:'',text:Nw,javascript:'',typescript:'',jsx:'',tsx:'',html:'',css:'',scss:'',json:'',python:'',ruby:'',go:'',java:'',kotlin:'',c:'',cpp:'',cs:$w,csharp:$w,php:'',shell:'',powershell:'',sql:'',yaml:'',markdown:'',xml:'',rust:'',vue:'',mermaid:''},fallback:'',loadExtended:()=>Go(()=>import("./extended-p72mFE2C.js"),[]).then(e=>e.materialExtendedMap)},lle=Xr(0);R3=()=>{lle.value++},nle(rle);const ale={"":"",javascript:"javascript",js:"javascript",mjs:"javascript",cjs:"javascript",typescript:"typescript",ts:"typescript",jsx:"jsx",tsx:"tsx",golang:"go",py:"python",rb:"ruby",sh:"shell",bash:"shell",zsh:"shell",shellscript:"shell",bat:"shell",batch:"shell",ps1:"powershell",plaintext:"plain",text:"plain",txt:"plain","c++":"cpp","c#":"csharp",cs:"csharp","objective-c":"objectivec","objective-c++":"objectivecpp",yml:"yaml",md:"markdown",rs:"rust",kt:"kotlin"};function M2(e){var t;const n=(function(o){if(!o)return"";const s=o.trim();if(!s)return"";const[i]=s.split(/\s+/),[r]=i.split(":");return r.toLowerCase()})(e);return(t=ale[n])!=null?t:n}function oVe(e){const t=M2(e);if(!t)return"plaintext";switch(t){case"plain":return"plaintext";case"jsx":return"javascript";case"tsx":return"typescript";case"objectivec":return"objective-c";case"objectivecpp":return"objective-cpp";default:return t}}function sVe(e){return ole(M2(e))||sle()}const Fw={js:"JavaScript",javascript:"JavaScript",ts:"TypeScript",jsx:"JSX",tsx:"TSX",html:"HTML",css:"CSS",scss:"SCSS",json:"JSON",py:"Python",python:"Python",rb:"Ruby",go:"Go",java:"Java",c:"C",cpp:"C++",cs:"C#",csharp:"C#",php:"PHP",sh:"Shell",bash:"Bash",sql:"SQL",yaml:"YAML",md:"Markdown",d2:"D2",d2lang:"D2","":"Plain Text",plain:"Plain Text"};var T2=(e,t,n)=>new Promise((o,s)=>{var i=a=>{try{l(n.next(a))}catch(u){s(u)}},r=a=>{try{l(n.throw(a))}catch(u){s(u)}},l=a=>a.done?o(a.value):Promise.resolve(a.value).then(i,r);l((n=n.apply(e,t)).next())});let vi=null,Ju=!1,Qu=null,E2=u5;function Gp(e){var t;const n=(t=e?.default)!=null?t:e;return n&&typeof n.renderToString=="function"?n:null}function a5(){try{const e=globalThis;return Gp(e?.katex)}catch{return null}}function u5(){return T2(null,null,function*(){const e=a5();if(e)return e;const t=yield Go(()=>import("./katex-DnlPpQZa.js"),[]);try{yield Go(()=>import("./mhchem-DtR62fUK.js"),__vite__mapDeps([0,1]))}catch{}return Gp(t)})}function bL(e){const t=Promise.resolve(e).then(n=>{var o;return Qu===t&&n?(vi=(o=Gp(n))!=null?o:n,vi):null}).catch(()=>null).finally(()=>{Qu===t&&(Qu=null)});return Qu=t,Ju=!0,t}function ule(e){E2=e,vi=null,Ju=!1,Qu=null}function cle(e){ule(u5)}function CL(){return typeof E2=="function"}function iVe(){var e;const t=E2;if(!t||t===u5)return null;if(vi)return vi;const n=a5();if(n)return vi=n,vi;if(Ju)return null;try{const o=t();return o?typeof o?.then=="function"?(bL(o),null):(vi=(e=Gp(o))!=null?e:o,vi):null}catch{return null}}function wL(){return T2(this,null,function*(){var e;const t=a5();if(t)return vi=t,vi;if(vi)return vi;if(Qu)return Qu;if(Ju)return null;const n=E2;if(!n)return Ju=!0,null;try{const o=n();if(typeof o?.then=="function")return bL(o);if(o)return vi=(e=Gp(o))!=null?e:o,Ju=!0,vi}catch{}return Ju=!0,null})}function _L(e){return e?e.replace(/·/g,"⋅").replace(/℃/g,"°C"):""}let Ba=null,$a=null;const Bs=new Map,ta=new Map;let Ip=5;const lc=new Set;function G1(){if(Bs.size{const{id:n,html:o,error:s}=t.data,i=Bs.get(n);if(i)if(Bs.delete(n),clearTimeout(i.timeoutId),i.cleanup(),G1(),s)i.aborted||i.reject(new Error(s));else{const{content:r,displayMode:l}=t.data;if(r){const a=`${l?"d":"i"}:${r}`;if(ta.set(a,o),ta.size>200){const u=ta.keys().next().value;ta.delete(u)}}i.aborted||i.resolve(o)}},Ba.onerror=t=>{console.error("[katexWorkerClient] Worker error:",t);for(const[n,o]of Bs.entries())clearTimeout(o.timeoutId),o.cleanup(),o.aborted||o.reject(new Error(`Worker error: ${t.message}`));Bs.clear(),xL()}}function fle(){var e;for(const t of Bs.values())clearTimeout(t.timeoutId),t.cleanup(),t.aborted||t.reject(new Error("Worker cleared"));Bs.clear(),xL(),Ba&&((e=Ba.terminate)==null||e.call(Ba)),Ba=null,$a=null}function ple(e,t=!0,n=2e3,o){return T2(this,null,function*(){performance.now();const s=_L(e);if(!CL()){const a=new Error("KaTeX rendering disabled");return a.name="KaTeXDisabled",a.code="KATEX_DISABLED",Promise.reject(a)}if($a)return Promise.reject($a);const i=`${t?"d":"i"}:${s}`,r=ta.get(i);if(r)return G1(),Promise.resolve(r);const l=Ba||($a=new Error("[katexWorkerClient] No worker instance set. Please inject a Worker via setKaTeXWorker()."),$a.name="WorkerInitError",$a.code="WORKER_INIT_ERROR",null);if(!l)return Promise.reject($a);if(Bs.size>=Ip){const a=new Error("Worker busy");return a.name="WorkerBusy",a.code="WORKER_BUSY",a.busy=!0,a.inFlight=Bs.size,a.max=Ip,Promise.reject(a)}return new Promise((a,u)=>{if(o?.aborted){const m=new Error("Aborted");return m.name="AbortError",void u(m)}const c=Math.random().toString(36).slice(2);let d=null;const f=globalThis.setTimeout(()=>{const m=Bs.get(c);if(!m)return;Bs.delete(c),m.cleanup();const w=new Error("Worker render timed out");w.name="WorkerTimeout",w.code="WORKER_TIMEOUT",m.aborted||m.reject(w),G1()},n);d=()=>{const m=Bs.get(c);if(!m||m.aborted)return;m.aborted=!0,m.cleanup();const w=new Error("Aborted");w.name="AbortError",u(w)},o&&o.addEventListener("abort",d,{once:!0});const h=a,g=u;Bs.set(c,{resolve:m=>{h(m)},reject:m=>{g(m)},timeoutId:f,aborted:!1,cleanup:()=>{o&&d&&o.removeEventListener("abort",d),d=null}});try{l.postMessage({id:c,content:s,displayMode:t})}catch(m){const w=Bs.get(c);Bs.delete(c),clearTimeout(f),w?.cleanup(),w?.reject(m),G1()}})})}function rVe(e,t=!0,n){const o=`${t?"d":"i"}:${_L(e)}`;if(ta.set(o,n),ta.size>200){const s=ta.keys().next().value;ta.delete(s)}}const hle="WORKER_BUSY";function mle(e=2e3,t){return Bs.size{let s,i=!1,r=null,l=()=>{};const a=()=>{s&&globalThis.clearTimeout(s),lc.delete(l),t&&r&&t.removeEventListener("abort",r),r=null};l=()=>{i||(i=!0,a(),n())},lc.add(l),s=globalThis.setTimeout(()=>{if(i)return;i=!0,a();const u=new Error("Wait for worker slot timed out");u.name="WorkerBusyTimeout",u.code="WORKER_BUSY_TIMEOUT",o(u)},e),queueMicrotask(()=>G1()),t&&(r=()=>{if(i)return;i=!0,a();const u=new Error("Aborted");u.name="AbortError",o(u)},t.aborted?r():t.addEventListener("abort",r,{once:!0}))})}const s1={timeout:2e3,waitTimeout:1500,backoffMs:30,maxRetries:1};function lVe(e){return T2(this,arguments,function*(t,n=!0,o={}){var s,i,r,l;if(!CL()){const m=new Error("KaTeX rendering disabled");throw m.name="KaTeXDisabled",m.code="KATEX_DISABLED",m}const a=(s=o.timeout)!=null?s:s1.timeout,u=(i=o.waitTimeout)!=null?i:s1.waitTimeout,c=(r=o.backoffMs)!=null?r:s1.backoffMs,d=(l=o.maxRetries)!=null?l:s1.maxRetries,f=Number.isFinite(d)?Math.max(0,Math.min(Math.floor(d),8)):s1.maxRetries,h=o.signal;let g=0;for(;;){if(h?.aborted){const m=new Error("Aborted");throw m.name="AbortError",m}try{return yield ple(t,n,a,h)}catch(m){if(m?.code!==hle||g>=f)throw m;if(g++,yield mle(u,h).catch(()=>{}),h?.aborted){const w=new Error("Aborted");throw w.name="AbortError",w}c>0&&(yield new Promise(w=>globalThis.setTimeout(w,c*g)))}}})}function Td(e){const t=typeof e=="number"?e:Number.parseFloat(String(e??""));return Number.isFinite(t)&&t>0?t:null}function gle(e){var t;for(const n of e.split(/\r?\n/)){const o=n.trim();if(!o||o.startsWith("%%"))continue;const s=o.match(/^([A-Z][\w-]*)\b/i);return((t=s?.[1])==null?void 0:t.toLowerCase())||""}return""}function ng(e){const t=e.split(/\r?\n/).map(s=>s.trim()).filter(s=>s&&!s.startsWith("%%")),n=Math.max(1,t.length),o=gle(e);return o==="gantt"?220+28*n:o==="sequencediagram"?180+26*n:o==="classdiagram"||o==="statediagram"||o==="erdiagram"?180+24*n:o==="flowchart"||o==="graph"?170+28*n:200+22*n}function og(e){const t=e.split(/\r?\n/).filter(n=>/^\s*-\s+/.test(n)).length;return t>=3?500:t>0?280+60*t:360}function SL(e,t=360,n=500){return n==null?Math.max(t,e):Math.min(Math.max(t,e),n)}function sg(e,t=360,n=500){return SL(e,t,n)}function ig(e,t=360,n=500){return SL(e,t,n)}var vle=Object.defineProperty,yle=Object.defineProperties,kle=Object.getOwnPropertyDescriptors,Rw=Object.getOwnPropertySymbols,ble=Object.prototype.hasOwnProperty,Cle=Object.prototype.propertyIsEnumerable,Ow=(e,t,n)=>t in e?vle(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,AL=(e,t)=>{for(var n in t||(t={}))ble.call(t,n)&&Ow(e,n,t[n]);if(Rw)for(var n of Rw(t))Cle.call(t,n)&&Ow(e,n,t[n]);return e},Pw=(e,t,n)=>new Promise((o,s)=>{var i=a=>{try{l(n.next(a))}catch(u){s(u)}},r=a=>{try{l(n.throw(a))}catch(u){s(u)}},l=a=>a.done?o(a.value):Promise.resolve(a.value).then(i,r);l((n=n.apply(e,t)).next())});const rg=()=>Go(()=>import("./mermaid.core-Cahi9cr1.js").then(e=>e.bp),__vite__mapDeps([2,3]));let jl=null,Ed=rg,_1=null,O3=!1,P3=!1,x1=0;function wle(e){Ed=e,x1++,jl=null,_1=null,O3=!1,P3=!1}function _le(e){wle(rg)}function Dw(){return typeof Ed=="function"}function Bw(e){if(!e)return e;const t=e&&e.default?e.default:e;if(t&&(typeof t.render=="function"||typeof t.parse=="function"||typeof t.initialize=="function"))return t;if(t&&t.mermaidAPI&&(typeof t.mermaidAPI.render=="function"||typeof t.mermaidAPI.parse=="function")){const s=t.mermaidAPI;return n=AL({},t),o={render:s.render.bind(s),parse:s.parse?s.parse.bind(s):void 0,initialize:i=>typeof t.initialize=="function"?t.initialize(i):s.initialize?s.initialize(i):void 0},yle(n,kle(o))}var n,o;return e.mermaid&&typeof e.mermaid.render=="function"?e.mermaid:t}function Hw(e){if(e)try{const t=e?.initialize;e.initialize=n=>{const o=AL({suppressErrorRendering:!0},n||{});return typeof t=="function"?t.call(e,o):e?.mermaidAPI&&typeof e.mermaidAPI.initialize=="function"?e.mermaidAPI.initialize(o):void 0}}catch{}}function aVe(){return Pw(this,null,function*(){if(jl)return jl;const e=(function(){try{const o=globalThis;return Bw(o?.mermaid)}catch{return null}})();if(e)return jl=e,Hw(jl),jl;const t=Ed,n=x1;return t?t===rg&&O3?null:_1||(_1=Pw(null,null,function*(){let o;try{o=yield t()}catch(s){if(t===rg)return n===x1&&t===Ed&&(O3=!0,(function(i){P3||(P3=!0,console.warn('[markstream-vue] Optional dependency "mermaid" is not installed. Mermaid blocks will render as source.',i))})(s)),null;throw s}finally{n===x1&&t===Ed&&(_1=null)}return n!==x1||t!==Ed?null:o?(jl=Bw(o),Hw(jl),jl):null}),_1):null})}let Fi=null,Na=null;const Pr=new Map,Wu=new Map;function Yh(e){for(const t of Pr.values())t.reject(e);Pr.clear(),Wu.clear()}let zw=5,Ww=!1;const xle="WORKER_BUSY",Uw="MERMAID_DISABLED";function Sle(e){if(Fi&&Fi!==e){const n=new Error("Worker replaced");n.code="WORKER_REPLACED",Yh(n)}Fi=e,Na=null;const t=e;Fi.onmessage=n=>{if(Fi!==t)return;const{id:o,ok:s,result:i,error:r}=n.data,l=Pr.get(o);l&&(s===!1||r?l.reject(new Error(r||"Unknown error")):l.resolve(i))},Fi.onerror=n=>{var o,s;if(Fi===t)if(Pr.size!==0){try{Ww?console.error("[mermaidWorkerClient] Worker error:",n?.message||n):(s=console.debug)==null||s.call(console,"[mermaidWorkerClient] Worker error:",n?.message||n)}catch{}Yh(new Error(`Worker error: ${n.message}`))}else(o=console.debug)==null||o.call(console,"[mermaidWorkerClient] Worker error (no pending):",n?.message||n)},Fi.onmessageerror=n=>{var o,s;if(Fi===t)if(Pr.size!==0){try{Ww?console.error("[mermaidWorkerClient] Worker messageerror:",n):(s=console.debug)==null||s.call(console,"[mermaidWorkerClient] Worker messageerror:",n)}catch{}Yh(new Error("Worker messageerror"))}else(o=console.debug)==null||o.call(console,"[mermaidWorkerClient] Worker messageerror (no pending):",n)}}function Ale(){var e;if(Fi)try{Yh(new Error("Worker cleared")),(e=Fi.terminate)==null||e.call(Fi)}catch{}Fi=null,Na=null}function ML(e,t,n,o){if(!Dw()){const r=new Error("Mermaid rendering disabled");return r.name="MermaidDisabled",r.code=Uw,Promise.reject(r)}const s=`${e}\0${t.theme}\0${n}\0${t.code}`;let i=Wu.get(s);return i||(i=(function(r,l,a=1400){if(!Dw()){const c=new Error("Mermaid rendering disabled");return c.name="MermaidDisabled",c.code=Uw,Promise.reject(c)}if(Na)return Promise.reject(Na);const u=Fi||(Na=new Error("[mermaidWorkerClient] No worker instance set. Please inject a Worker via setMermaidWorker()."),Na.name="WorkerInitError",Na.code="WORKER_INIT_ERROR",null);if(!u)return Promise.reject(Na);if(Pr.size>=zw){const c=new Error("Worker busy");return c.name="WorkerBusy",c.code=xle,c.inFlight=Pr.size,c.max=zw,Promise.reject(c)}return new Promise((c,d)=>{const f=Math.random().toString(36).slice(2);let h,g=!1;const m=()=>{g||(g=!0,h!=null&&globalThis.clearTimeout(h),Pr.delete(f))},w={resolve:_=>{m(),c(_)},reject:_=>{m(),d(_)}};Pr.set(f,w);try{u.postMessage({id:f,action:r,payload:l})}catch(_){return Pr.delete(f),void d(_)}h=globalThis.setTimeout(()=>{const _=new Error("Worker call timed out");_.name="WorkerTimeout",_.code="WORKER_TIMEOUT";const v=Pr.get(f);v&&v.reject(_)},a)})})(e,t,n),Wu.set(s,i),i.then(()=>{Wu.get(s)===i&&Wu.delete(s)},()=>{Wu.get(s)===i&&Wu.delete(s)})),(function(r,l){if(!l)return r;if(l.aborted){const a=new Error("Aborted");return a.name="AbortError",Promise.reject(a)}return new Promise((a,u)=>{let c=()=>{};const d=()=>l.removeEventListener("abort",c);c=()=>{d();const f=new Error("Aborted");f.name="AbortError",u(f)},l.addEventListener("abort",c,{once:!0}),r.then(f=>{d(),a(f)},f=>{d(),u(f)})})})(i,o)}function uVe(e,t,n=1400,o){return ML("canParse",{code:e,theme:t},n,o)}function cVe(e,t,n=1400,o){return ML("findPrefix",{code:e,theme:t},n,o)}var Mle=Object.defineProperty,Tle=Object.defineProperties,Ele=Object.getOwnPropertyDescriptors,jw=Object.getOwnPropertySymbols,Ile=Object.prototype.hasOwnProperty,Lle=Object.prototype.propertyIsEnumerable,Vw=(e,t,n)=>t in e?Mle(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,mt=(e,t)=>{for(var n in t||(t={}))Ile.call(t,n)&&Vw(e,n,t[n]);if(jw)for(var n of jw(t))Lle.call(t,n)&&Vw(e,n,t[n]);return e},rn=(e,t)=>Tle(e,Ele(t)),vo=(e,t,n)=>new Promise((o,s)=>{var i=a=>{try{l(n.next(a))}catch(u){s(u)}},r=a=>{try{l(n.throw(a))}catch(u){s(u)}},l=a=>a.done?o(a.value):Promise.resolve(a.value).then(i,r);l((n=n.apply(e,t)).next())});const $le="__global__",j9="__MARKSTREAM_VUE_CUSTOM_COMPONENTS_STORE__",D3=(()=>{const e=globalThis;if(e[j9])return e[j9];const t={scopedCustomComponents:{},revision:Xr(0)};return e[j9]=t,t})(),qw=D3.revision,Nle=Symbol("markstreamCustomComponents"),Fle=new Set(["text","paragraph","heading","code_block","list","list_item","blockquote","table","table_row","table_cell","definition_list","definition_item","footnote","footnote_reference","footnote_anchor","admonition","hardbreak","link","image","thematic_break","math_inline","math_block","strong","emphasis","strikethrough","highlight","insert","subscript","superscript","emoji","checkbox","checkbox_input","inline_code","html_inline","html_block","reference","mermaid","infographic","d2","vmr_container"]);function Yp(e){return Fle.has(String(e).trim().toLowerCase())}function Rle(e){return e.trim().replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/[_\s]+/g,"-").toLowerCase()}function V9(e={}){const t={};for(const[n,o]of Object.entries(e))if(o!=null){t[n]=o;for(const s of new Set([xr(n),xr(Rle(n))]))!s||Yp(s)||Object.prototype.hasOwnProperty.call(t,s)||(t[s]=o)}return t}function fs(e){const t=on(Nle,null);return R(()=>{var n;return qw.value,(function(o,s={}){return qw.value,mt(mt(mt({},V9(D3.scopedCustomComponents[$le]||{})),V9(s)),V9((function(i){return i&&D3.scopedCustomComponents[i]||{}})(o)))})(e?.(),(n=t?.value)!=null?n:{})})}const Ole=["aria-label"],Ple={key:0,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",class:"checkbox-icon checkbox-unchecked"},Dle={key:1,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",class:"checkbox-icon checkbox-checked"},Kn=(e,t)=>{const n=e.__vccOpts||e;for(const[o,s]of t)n[o]=s;return n},er=Kn(tt({__name:"CheckboxNode",props:{node:{}},setup:e=>(t,n)=>(b(),A("span",{class:"checkbox-node",role:"img","aria-label":e.node.checked?"checked":"unchecked"},[e.node.checked?(b(),A("svg",Dle,[...n[1]||(n[1]=[C("rect",{x:"3",y:"3",width:"18",height:"18",rx:"4",fill:"currentColor"},null,-1),C("path",{d:"M9 12l2 2 4-4",stroke:"hsl(var(--ms-background))","stroke-width":"2.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])):(b(),A("svg",Ple,[...n[0]||(n[0]=[C("rect",{x:"3",y:"3",width:"18",height:"18",rx:"4",stroke:"currentColor","stroke-width":"2"},null,-1)])]))],8,Ole))}),[["__scopeId","data-v-be21ab83"]]);er.install=e=>{e.component(er.__name,er)};const Ble={class:"emoji-node"},Bi=Kn(tt({__name:"EmojiNode",props:{node:{}},setup:e=>(t,n)=>(b(),A("span",Ble,N(e.node.name),1))}),[["__scopeId","data-v-de55dc97"]]);Bi.install=e=>{e.component(Bi.__name,Bi)};const Hle=["id"],zle=["title"],tr=Kn(tt({__name:"FootnoteReferenceNode",props:{node:{}},setup(e){const t=`#fnref--${e.node.id}`;function n(){if(typeof document>"u")return;const o=document.querySelector(t);o?o.scrollIntoView({behavior:"smooth"}):console.warn(`Element with href: ${t} not found`)}return(o,s)=>(b(),A("sup",{id:`fnref-${e.node.id}`,class:"footnote-reference",onClick:n},[C("span",{href:t,title:`查看脚注 ${e.node.id}`,class:"footnote-link cursor-pointer"},"["+N(e.node.id)+"]",9,zle)],8,Hle))}}),[["__scopeId","data-v-c1463a29"]]);tr.install=e=>{e.component(tr.__name,tr)};const TL=(()=>{try{return!1}catch{}return!1})();function q9(e){TL&&console.warn(e)}function Kw(e,t="safe",n){return r5(e,t,n)}function EL(e){return Cre(e)}function K9(e){return e===!0?"":e===!1?"false":e==null?null:String(e)}function c5(e,t="safe"){const n=String(e.tag||e.type||"").trim(),o=Gh((s=e.attrs)?Array.isArray(s)?s.every(Array.isArray)?s.map(([r,l])=>[String(r),K9(l)]):s.filter(r=>r&&typeof r=="object"&&!Array.isArray(r)&&"name"in r).map(r=>[String(r.name),K9(r.value)]):Object.entries(s).map(([r,l])=>[r,K9(l)]):null,t,n);var s;if(!o)return;const i=EL(Z1(o));return Object.keys(i).length>0?i:void 0}function Zw(e,t,n=!1){const o=Object.entries(t??{}),s=o.length>0?o.map(([i,r])=>r===""?` ${i}`:` ${i}="${r}"`).join(""):"";return n?`<${e}${s} />`:`<${e}${s}>`}function i1(e,t){Array.isArray(t)?e.push(...t):t!=null&&e.push(t)}function Z9(e,t,n,o,s,i,r=!1){const l=(function(d,f){return fL(d,f)})(e,o);if(Vp.has(e.toLowerCase())||!l&&aL(e,i))return null;if(!l&&i5(e,i))return r?[Zw(e,t,!0)]:[Zw(e,t),...n,``];const a=r5(t,i,e),u=a.key,c=u!=null&&u!==""?u:s;if(l){const d=o[e]||o[e.toLowerCase()],f=EL(a);return nn(d,rn(mt({},f),{key:c}),n.length>0?n:void 0)}return nn(e,rn(mt({},a),{innerHTML:void 0,key:c}),n.length>0?n:void 0)}function IL(e,t){return xre(e,t)}function lg(e,t,n="safe"){if(!e)return[];try{return(function(i,r,l="safe"){let a=0;const u=[],c=[];for(const d of i)if(d.type==="text")(u.length>0?u[u.length-1].children:c).push(d.content);else if(d.type==="self_closing"){const f=Z9(d.tagName,d.attrs||{},[],r,"ms-html-"+a++,l,!0);i1(u.length>0?u[u.length-1].children:c,f)}else if(d.type==="tag_open")u.push({tagName:d.tagName,children:[],attrs:d.attrs,autoKey:"ms-html-"+a++});else if(d.type==="tag_close"){const f=d.tagName.toLowerCase();let h=-1;for(let g=u.length-1;g>=0;g--)if(u[g].tagName.toLowerCase()===f){h=g;break}if(h!==-1)for(;u.length>h;){const g=u.pop(),m=Z9(g.tagName,g.attrs||{},g.children,r,g.autoKey,l);u.length>0?i1(u[u.length-1].children,m):i1(c,m),g.tagName.toLowerCase()!==f&&u.length>h&&q9(`Auto-closing unclosed tag: <${g.tagName}>`)}else q9(`Ignoring closing tag with no matching opening tag: `)}for(;u.length>0;){const d=u.pop(),f=Z9(d.tagName,d.attrs||{},d.children,r,d.autoKey,l);u.length>0?i1(u[u.length-1].children,f):i1(c,f),q9(`Auto-closing unclosed tag: <${d.tagName}>`)}return c})(pL(e),t,n)}catch(s){return o=s,TL&&console.error("Failed to parse HTML to VNodes:",o),null}var o}const Wle=["innerHTML"],nr=Kn(tt({__name:"HtmlInlineNode",props:{node:{},customId:{},htmlPolicy:{}},setup(e){const t=e,n=on("markstreamHtmlPolicy",void 0),o=R(()=>{var l,a;return(a=(l=t.htmlPolicy)!=null?l:n?.value)!=null?a:"safe"}),s=fs(()=>t.customId),i=tt({name:"DynamicRenderer",props:{nodes:{type:Array,required:!0}},render(){return this.nodes}}),r=R(()=>{const l=t.node.content;if(!l)return{mode:"html",content:""};if(o.value==="escape")return{mode:"html",content:Vd(l,o.value)};if(t.node.loading&&!t.node.autoClosed)return{mode:"text",content:l};if(t.node.loading&&t.node.autoClosed){const u=lg(l,s.value,o.value);if(u!==null)return{mode:"dynamic",nodes:u}}if(!IL(l,s.value))return{mode:"html",content:Vd(l,o.value)};const a=lg(l,s.value,o.value);return a===null?{mode:"html",content:Vd(l,o.value)}:{mode:"dynamic",nodes:a}});return(l,a)=>r.value.mode==="dynamic"?(b(),A("span",{key:0,class:Re(["html-inline-node",{"html-inline-node--loading":t.node.loading}])},[V(p(i),{nodes:r.value.nodes},null,8,["nodes"])],2)):r.value.mode==="text"?(b(),A("span",{key:1,class:Re(["html-inline-node",{"html-inline-node--loading":t.node.loading}])},N(r.value.content),3)):(b(),A("span",{key:2,class:Re(["html-inline-node",{"html-inline-node--loading":t.node.loading}]),innerHTML:r.value.content},null,10,Wle))}}),[["__scopeId","data-v-d17f12b0"]]);nr.install=e=>{e.component(nr.__name,nr)};const Ule={class:"inline-code"},jle={key:0},ii=Kn(tt({__name:"InlineCodeNode",props:{node:{}},setup(e){const t=e,n=mf(),o=on("markstreamFade",void 0),s=on("markstreamTextStreamState",void 0),i=on("markstreamStreamVersion",void 0),r=R(()=>{const v=n.fade;return v===""||v===!0||v==="true"||v!==!1&&v!=="false"&&void 0}),l=R(()=>typeof r.value=="boolean"?r.value:typeof o?.value!="boolean"||o.value),a=R(()=>{var v;return String((v=t.node.code)!=null?v:"")}),u=R(()=>!l.value),c=R(()=>{var v;const k=(v=n["index-key"])!=null?v:n.indexKey;return k==null||k===""?"":String(k)}),d=Z(t.node.code),f=Z(""),h=Z(0);let g;function m(){g?.(),g=void 0}function w(){m(),f.value&&(d.value=d.value+f.value,f.value="")}et([()=>t.node.code,c,l],([v])=>{const k=String(v??""),y=c.value,x=vL({nextContent:k,persistedContent:y?s?.get(y):void 0,currentState:{settledContent:d.value,streamedDelta:f.value},typewriterEnabled:l.value});d.value=x.settledContent,f.value=x.streamedDelta,x.appended?(h.value+=1,(function(){if(!f.value||g||!i)return;const M=i.value;g=et(()=>i.value,$=>{$!==M&&w()},{flush:"sync"})})()):f.value||m(),y&&s?.set(y,k)},{immediate:!0}),pf(m);const _=R(()=>h.value%2==0?"inline-code-stream-delta--a":"inline-code-stream-delta--b");return(v,k)=>(b(),A("code",Ule,[u.value?(b(),A(Pe,{key:0},[Ve(N(a.value),1)],64)):(b(),A(Pe,{key:1},[d.value?(b(),A("span",jle,N(d.value),1)):te("",!0),f.value?(b(),A("span",{key:1,class:Re(["inline-code-stream-delta",[_.value]]),onAnimationend:w},N(f.value),35)):te("",!0)],64))]))}}),[["__scopeId","data-v-4e331c97"]]);ii.install=e=>{e.component(ii.__name,ii)};const B3=Z(!1),Gw=Z(""),Yw=Z("top"),Y1=Z(null),X1=Z(null),H3=Z(null),z3=Z(null),Xw=Z(null);let Xh=null,Jh=null,W3=0;function LL(){Xh&&(clearTimeout(Xh),Xh=null),Jh&&(clearTimeout(Jh),Jh=null)}let kh=!1,bh=null,Jw=!1;function Vle(e,t,n="top",o=!1,s,i){if(!e)return;const r=++W3;LL();const l=()=>vo(null,null,function*(){var a,u;if(yield(function(){return vo(this,null,function*(){if(!kh&&!Jw&&typeof document<"u"){bh!=null||(bh=vo(null,null,function*(){const[{createApp:c,h:d},{default:f}]=yield Promise.all([Go(()=>import("./vue.runtime.esm-bundler-BX4cWW2k.js"),[]),Go(()=>import("./Tooltip-CPKMqLZA.js"),[])]),h=document.createElement("div");h.setAttribute("data-singleton-tooltip","1"),document.body.appendChild(h),c({setup:()=>()=>{var g;return d(f,{visible:B3.value,"anchor-el":Y1.value,content:Gw.value,placement:Yw.value,id:X1.value,originX:H3.value,originY:z3.value,isDark:(g=Xw.value)!=null?g:void 0})}}).mount(h),kh=!0}));try{yield bh}catch(c){kh=!1,bh=null,Jw=!0,console.warn("[markstream-vue] Failed to mount Tooltip component. Tooltips will be disabled.",c)}}})})(),kh&&r===W3){X1.value=`tooltip-${Date.now()}-${Math.floor(1e3*Math.random())}`,Y1.value=e,Gw.value=t,Yw.value=n,H3.value=(a=s?.x)!=null?a:null,z3.value=(u=s?.y)!=null?u:null,Xw.value=typeof i=="boolean"?i:null,B3.value=!0;try{e.setAttribute("aria-describedby",X1.value)}catch{}}});o?l():Xh=setTimeout(l,80)}function qle(e=!1){W3+=1,LL();const t=()=>{if(Y1.value&&X1.value)try{Y1.value.removeAttribute("aria-describedby")}catch{}B3.value=!1,Y1.value=null,X1.value=null,H3.value=null,z3.value=null};e?t():Jh=setTimeout(t,120)}const Kle={"common.copy":"Copy","common.copied":"Copied","common.decrease":"Decrease","common.reset":"Reset","common.increase":"Increase","common.expand":"Expand","common.collapse":"Collapse","common.preview":"Preview","common.source":"Source","common.export":"Export","common.open":"Open","common.minimize":"Minimize","common.zoomIn":"Zoom in","common.zoomOut":"Zoom out","common.resetZoom":"Reset zoom","image.loadError":"Image failed to load","image.loading":"Loading image..."},Zle=Symbol("markstreamI18nFallback");function $L(e,t){var n;return(n=t?.[e])!=null?n:Kle[e]}const U3=(e,t)=>{var n;return(n=$L(e,t))!=null?n:(function(o){return(o.split(".").pop()||o).replace(/[_-]/g," ").replace(/([A-Z])/g," $1").replace(/\s+/g," ").replace(/\b\w/g,s=>s.toUpperCase()).trim()})(e)};function Qw(e,t){return{t(n){const o=$L(n,t);if(e.te&&o!=null&&!e.te(n))return U3(n,t);const s=e.t(n);return s===n&&o!=null?U3(n,t):s}}}function Gle(){const e=(function(){var n,o,s;try{const i=ds(),r=Zle,l=i?.provides,a=(n=i?.appContext)==null?void 0:n.provides;return(s=(o=l?.[r])!=null?o:a?.[r])!=null?s:null}catch{}return null})(),t=(function(){var n,o;try{const s=ds(),i=s?.proxy,r=i?.$t;if(typeof r=="function"){const u=i?.$te;return{t:r.bind(i),te:typeof u=="function"?u.bind(i):void 0}}const l=(o=(n=s?.appContext)==null?void 0:n.config)==null?void 0:o.globalProperties,a=l?.$t;if(typeof a=="function"){const u=l?.$te;return{t:a.bind(l),te:typeof u=="function"?u.bind(l):void 0}}}catch{}return null})();if(t)return Qw(t,e);try{const n=globalThis.$vueI18nUse||null;if(n&&typeof n=="function")try{const o=n();if(o&&typeof o.t=="function")return Qw({t:o.t.bind(o),te:typeof o.te=="function"?o.te.bind(o):void 0},e)}catch{}}catch{}return{t:n=>U3(n,e)}}const NL=Symbol("ViewportPriority"),FL=Symbol("ViewportPriorityOptions"),RL=Symbol("OffscreenHeavyNodeDeferral"),Yle=R(()=>!1),gc="400px";function d5(){return on(FL,void 0)}function f5(){return on(RL,Yle)}function Xle(e,t){var n,o;const s=typeof window<"u"&&typeof document<"u",i=typeof t=="boolean"?Z(t):t,r=s?(n=window.requestIdleCallback)!=null?n:$=>window.setTimeout(()=>$({didTimeout:!0,timeRemaining:()=>0}),16):null,l=s?(o=window.cancelIdleCallback)!=null?o:$=>window.clearTimeout($):null,a=new WeakMap;let u=1;const c=new Map,d=new Map,f=new Set;let h=null,g=null;function m($){if(!$)return"viewport";let S=a.get($);return S||(S=u++,a.set($,S)),String(S)}function w(){if(h!=null){try{l?.(h)}catch{}h=null}}function _($){if($){const S=c.get($);if(S&&!S.targets.size){try{S.io.disconnect()}catch{}c.delete($)}}d.size||f.size||w()}function v($){const S=d.get($);if(!S)return;const I=c.get(S.bucketKey);if(!S.visible.value){S.visible.value=!0;try{S.resolve()}catch{}}try{I?.io.unobserve($)}catch{}I?.targets.delete($),d.delete($),f.delete($),_(S.bucketKey)}function k(){window.__MARKSTREAM_DISABLE_VIEWPORT_PRIORITY_IDLE_DRAIN__!==!0&&r&&h==null&&f.size&&(h=r(()=>{h=null;const $=f.values().next().value;$&&(f.delete($),v($),f.size&&k())},{timeout:1200}))}function y($,S){if(!s||typeof IntersectionObserver>"u")return null;const I=(function(H,O){var F,W,z;return{root:(F=e?.(H??null))!=null?F:null,rootMargin:(W=O?.rootMargin)!=null?W:gc,threshold:(z=O?.threshold)!=null?z:0}})($,S),P=[m((D=I).root),D.rootMargin,D.threshold].join("\0");var D;const T=c.get(P);if(T)return{key:P,bucket:T};let L;try{L=new IntersectionObserver(H=>{for(const O of H)(O.isIntersecting||O.intersectionRatio>0)&&v(O.target)},{root:I.root,rootMargin:I.rootMargin,threshold:I.threshold})}catch{return null}const B={io:L,targets:new Map};return c.set(P,B),{key:P,bucket:B}}function x(){if(s&&i.value)for(const[$,S]of Array.from(d.entries())){const I=y($,S.opts);if(!I){v($);continue}if(I.key===S.bucketKey)continue;const P=S.bucketKey,D=c.get(P);try{D?.io.unobserve($)}catch{}D?.targets.delete($),S.bucketKey=I.key,I.bucket.targets.set($,S),I.bucket.io.observe($),_(P)}}et(i,$=>{if(!$){for(const S of Array.from(d.keys()))v(S);w()}},{flush:"sync"});const M=($,S)=>{const I=Z(!1);let P,D=!1;const T=new Promise(O=>{P=()=>{D||(D=!0,O())}}),L=()=>{const O=d.get($);if(!O)return f.delete($),void _();const F=c.get(O.bucketKey);try{F?.io.unobserve($)}catch{}F?.targets.delete($),d.delete($),f.delete($),_(O.bucketKey)};if(!s||!i.value)return I.value=!0,P(),{isVisible:I,whenVisible:T,destroy:L};const B=y($,S);if(!B)return I.value=!0,P(),{isVisible:I,whenVisible:T,destroy:L};const H={resolve:P,visible:I,bucketKey:B.key,opts:S};return d.set($,H),B.bucket.targets.set($,H),B.bucket.io.observe($),s&&g==null&&(g=window.requestAnimationFrame(()=>{g=null,x()})),S?.allowIdle!==!1&&(f.add($),k()),{isVisible:I,whenVisible:T,destroy:L}};return M.refresh=x,En(NL,M),M}function p5(){var e,t;const n=on(NL,void 0);if(n)return n;const o=new WeakMap,s=new Map,i=new Set;let r=null;const l=typeof window<"u"?(e=window.requestIdleCallback)!=null?e:h=>window.setTimeout(()=>h({didTimeout:!0,timeRemaining:()=>0}),16):null,a=typeof window<"u"?(t=window.cancelIdleCallback)!=null?t:h=>window.clearTimeout(h):null,u=()=>{if(r!=null){try{a?.(r)}catch{}r=null}},c=h=>{if(!h)return;const g=s.get(h);if(g&&!g.targets.size){try{g.io.disconnect()}catch{}s.delete(h)}},d=h=>{const g=o.get(h);if(!g)return;const m=s.get(g.bucketKey);if(!g.visible.value){g.visible.value=!0;try{g.resolve()}catch{}}try{m?.io.unobserve(h)}catch{}o.delete(h),m?.targets.delete(h),i.delete(h),c(g.bucketKey),i.size||u()},f=()=>{window.__MARKSTREAM_DISABLE_VIEWPORT_PRIORITY_IDLE_DRAIN__!==!0&&l&&r==null&&i.size&&(r=l(()=>{r=null;const h=i.values().next().value;h&&(i.delete(h),d(h),i.size&&f())},{timeout:1200}))};return(h,g)=>{const m=Z(!1);let w,_=!1;const v=new Promise(x=>{w=()=>{_||(_=!0,x())}}),k=()=>{const x=o.get(h);if(!x)return i.delete(h),void(i.size||u());const M=s.get(x.bucketKey);try{M?.io.unobserve(h)}catch{}o.delete(h),M?.targets.delete(h),i.delete(h),c(x.bucketKey),i.size||u()},y=(x=>{var M,$;if(typeof window>"u"||typeof IntersectionObserver>"u")return null;const S=(L=>{var B,H;return[(B=L?.rootMargin)!=null?B:gc,(H=L?.threshold)!=null?H:0].join("\0")})(x),I=s.get(S);if(I)return{key:S,bucket:I};const P=(M=x?.rootMargin)!=null?M:gc;let D;try{D=new IntersectionObserver(L=>{for(const B of L)(B.isIntersecting||B.intersectionRatio>0)&&d(B.target)},{root:null,rootMargin:P,threshold:($=x?.threshold)!=null?$:0})}catch{return null}const T={io:D,targets:new Set};return s.set(S,T),{key:S,bucket:T}})(g);return y?(o.set(h,{resolve:w,visible:m,bucketKey:y.key}),y.bucket.targets.add(h),y.bucket.io.observe(h),g?.allowIdle!==!1&&(i.add(h),f()),{isVisible:m,whenVisible:v,destroy:k}):(m.value=!0,w(),{isVisible:m,whenVisible:v,destroy:k})}}function Jle(e,t){var n,o;const s=(o=(n=e.indexKey)!=null?n:t["index-key"])!=null?o:t.indexKey;return s==null||s===""?"":String(s)}const Qle=["data-markstream-viewport-pending"],eae=["src","alt","title","loading","fetchpriority","decoding","tabindex","aria-label"],tae={key:1,class:"image-placeholder"},nae={key:1,class:"image-node__raw-text"},oae={key:2,class:"image-shimmer-overlay"},sae={key:1,class:"image-node__raw-text"},iae={key:3,class:"image-error"},Va=Kn(tt({__name:"ImageNode",props:{node:{},fallbackSrc:{default:""},lazy:{type:Boolean,default:!1},usePlaceholder:{type:Boolean,default:!0}},emits:["load","error","click"],setup(e,{emit:t}){var n,o,s;const i=e,r=t,l=Z(!1),a=Z(!1),u=Z(""),c=Z("primary"),d=Z(null),f=mf(),h=on(F3,null),g=p5(),m=d5(),w=f5(),_=R(()=>_C(i.node.src)),v=R(()=>_C(i.fallbackSrc)),k=(s=(o=(n=ds())==null?void 0:n.vnode.el)==null?void 0:o.querySelector)==null?void 0:s.call(o,"img"),y=typeof window<"u"&&k?.getAttribute("src")===(_.value||v.value),x=Z(typeof window>"u"||y||!w.value),M=Xr(null);let $="",S=null;const I=R(()=>u.value),P=R(()=>!i.lazy),D=R(()=>typeof window<"u"&&w.value&&!y),T=R(()=>!D.value||x.value),L=R(()=>T.value?I.value:""),B=R(()=>{var de,he;return(he=(de=m?.value.heavyBlockMargin)!=null?de:m?.value.rootMargin)!=null?he:gc}),H=R(()=>!i.node.loading&&c.value!=="failed"&&u.value.length>0),O=R(()=>c.value==="failed"),F=R(()=>(!P.value||D.value&&!x.value)&&!l.value&&!a.value&&c.value!=="failed"&&u.value.length>0),W=R(()=>Jle(i,f));function z(de=W.value){de&&d.value&&h?.reportHeight(de,d.value.offsetHeight)}function U(de=W.value){de&&yt(()=>{z(de)})}function q(){S&&(clearTimeout(S),S=null)}function K(){const de=W.value;de&&$!==de&&($&&h?.markSettled($),q(),$=de,h?.markPending(de),typeof window<"u"&&(S=window.setTimeout(()=>{$===de&&(U(de),ie())},8e3)))}function ie(){return vo(this,null,function*(){const de=$;de&&(q(),$="",yield yt(),z(de),h?.markSettled(de))})}function ne(){if(c.value==="primary"&&v.value&&v.value!==u.value)return c.value="fallback",u.value=v.value,l.value=!1,a.value=!1,void U();c.value="failed",a.value=!0,r("error",u.value),U()}function Y(){l.value=!0,a.value=!1,r("load",I.value),U()}function le(de){de.preventDefault(),l.value&&!a.value&&r("click",[de,I.value])}const{t:Ee}=Gle();return et([_,v,()=>i.node.loading],()=>(l.value=!1,a.value=!1,i.node.loading||_.value?(u.value=_.value,void(c.value="primary")):v.value?(u.value=v.value,void(c.value="fallback")):(u.value="",c.value="failed",void(a.value=!0))),{immediate:!0}),typeof window<"u"&&et([d,D],([de,he],pe,oe)=>{var ve;if((ve=M.value)==null||ve.destroy(),M.value=null,!he||x.value)return void(x.value=!0);if(!de)return void(x.value=!1);let G=!0;const X=g(de,{rootMargin:B.value,allowIdle:!1});M.value=X,x.value=X.isVisible.value,X.whenVisible.then(()=>{G&&M.value===X&&(x.value=!0)}),oe(()=>{G=!1,X.destroy(),M.value===X&&(M.value=null)})},{immediate:!0}),et([H,l,a,I,()=>i.lazy,T],([de,he,pe,oe,ve,G])=>de&&oe&&!pe&&G?he?(ie(),void U()):ve?(K(),void U()):void(he||pe||K()):(ie(),void U()),{flush:"post",immediate:!0}),Un(()=>{var de;(de=M.value)==null||de.destroy(),M.value=null,(function(){const he=$;he&&(q(),$="",h?.markSettled(he))})()}),(de,he)=>{var pe,oe,ve,G,X;return b(),A("span",{ref_key:"rootRef",ref:d,class:"image-node-container","data-markstream-viewport-pending":D.value&&!x.value?"true":void 0},[H.value?(b(),A("img",{key:0,src:L.value||void 0,alt:String((oe=(pe=i.node.alt)!=null?pe:i.node.title)!=null?oe:""),title:String((G=(ve=i.node.title)!=null?ve:i.node.alt)!=null?G:""),class:Re(["image-node__img",{"is-loading":!P.value&&!l.value,"is-loaded":P.value||l.value,"has-natural-size":l.value,"cursor-pointer":l.value}]),loading:i.lazy?"lazy":void 0,fetchpriority:P.value?"high":void 0,decoding:P.value?"sync":"async",tabindex:l.value?0:-1,"aria-label":(X=i.node.alt)!=null?X:p(Ee)("image.preview"),onError:ne,onLoad:Y,onClick:le},null,42,eae)):te("",!0),e.node.loading&&!a.value?(b(),A("span",tae,[i.usePlaceholder?Cn(de.$slots,"placeholder",{key:0,node:i.node,displaySrc:I.value,imageLoaded:l.value,hasError:a.value,fallbackSrc:i.fallbackSrc,lazy:i.lazy},()=>[he[0]||(he[0]=C("span",{class:"image-shimmer"},null,-1))],!0):(b(),A("span",nae,N(e.node.raw),1))])):te("",!0),F.value&&!e.node.loading?(b(),A("span",oae,[i.usePlaceholder?Cn(de.$slots,"placeholder",{key:0,node:i.node,displaySrc:I.value,imageLoaded:l.value,hasError:a.value,fallbackSrc:i.fallbackSrc,lazy:i.lazy},()=>[he[1]||(he[1]=C("span",{class:"image-shimmer"},null,-1))],!0):(b(),A("span",sae,N(e.node.raw),1))])):te("",!0),O.value?(b(),A("span",iae,[Cn(de.$slots,"error",{node:i.node,displaySrc:I.value,imageLoaded:l.value,hasError:a.value,fallbackSrc:i.fallbackSrc,lazy:i.lazy},()=>[he[2]||(he[2]=C("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24"},[C("path",{fill:"currentColor",d:"M2 2h20v10h-2V4H4v9.586l5-5L14.414 14L13 15.414l-4-4l-5 5V20h8v2H2zm13.547 5a1 1 0 1 0 0 2a1 1 0 0 0 0-2m-3 1a3 3 0 1 1 6 0a3 3 0 0 1-6 0m3.625 6.757L19 17.586l2.828-2.829l1.415 1.415L20.414 19l2.829 2.828l-1.415 1.415L19 20.414l-2.828 2.829l-1.415-1.415L17.586 19l-2.829-2.828z"})],-1)),C("span",null,N(p(Ee)("image.loadError")),1)],!0)])):te("",!0)],8,Qle)}}}),[["__scopeId","data-v-046e82ac"]]);Va.install=e=>{e.component(Va.__name,Va)};const rae={key:2},El=tt({__name:"NodeChildRenderer",props:{node:{},components:{},customId:{},indexKey:{},fallbackToText:{type:Boolean,default:!1}},setup(e){const t=e,n=fs(()=>t.customId),o=on("markstreamHtmlPolicy",void 0),s=on("markstreamNestedRendererProps",void 0),i=R(()=>{var g;return(g=o?.value)!=null?g:"safe"}),r=R(()=>{var g,m;const w=(g=s?.value)!=null?g:{};return rn(mt({},w),{customId:(m=t.customId)!=null?m:w.customId,htmlPolicy:i.value})}),l=zr({loader:()=>Promise.resolve().then(()=>x5),suspensible:!1}),a=R(()=>t.components[String(t.node.type)]),u=R(()=>!!(a.value&&n.value[t.node.type]&&!Yp(String(t.node.type)))),c=R(()=>u.value?c5(t.node,i.value):void 0),d=R(()=>Array.isArray(t.node.children)&&t.node.children.length>0),f=R(()=>{var g;return String((g=t.node.content)!=null?g:"")}),h=R(()=>{var g,m;return String((m=(g=t.node.content)!=null?g:t.node.raw)!=null?m:"")});return(g,m)=>a.value&&u.value?(b(),me(ys(a.value),Dn({key:0},c.value,{node:e.node,loading:e.node.loading,"index-key":e.indexKey,"custom-id":e.customId,"is-dark":r.value.isDark}),{default:ke(()=>[d.value?(b(),me(p(l),Dn({key:0},r.value,{nodes:e.node.children,"index-key":e.indexKey,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes","index-key"])):f.value?(b(),me(p(l),Dn({key:1},r.value,{content:f.value,final:!e.node.loading,"index-key":`${e.indexKey||"child"}-content`,"smooth-streaming":!1,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["content","final","index-key"])):te("",!0)]),_:1},16,["node","loading","index-key","custom-id","is-dark"])):a.value?(b(),me(ys(a.value),{key:1,node:e.node,"custom-id":e.customId,"index-key":e.indexKey},null,8,["node","custom-id","index-key"])):e.fallbackToText?(b(),A("span",rae,N(h.value),1)):te("",!0)}}),e_=Object.freeze({enabled:!0,contextLineCount:2,minimumLineCount:4,revealLineCount:5});function lae(e){var t;if(typeof e=="boolean")return e;if(e&&typeof e=="object"){const n=e;return rn(mt(mt({},e_),n),{enabled:(t=n.enabled)==null||t})}return mt({},e_)}function h5(e,t){if(e.renderSideBySide===!1)return!0;if(e.useInlineViewWhenSpaceIsLimited!==!0)return!1;const n=e.renderSideBySideInlineBreakpoint,o=typeof n=="number"&&Number.isFinite(n)?n:900;return t>0&&t<=o}function OL(e){var t,n;const o=(n=(t=String(e??"").split(/\r?\n/,1)[0])==null?void 0:t.trim())!=null?n:"";if(o.length<3)return"";const s=o[0];if(s!=="`"&&s!=="~"||o[1]!==s||o[2]!==s)return"";let i=3;for(;o[i]===s;)i+=1;return o.slice(i).trim()}function t_(e){var t;return((t=String(e??"").trim().split(/\s+/,1)[0])!=null?t:"")==="diff"}function aae(e){var t;return e.diff===!0||t_(e.language)||t_(OL(String((t=e.raw)!=null?t:"")))}function uae(e,t,n){const o=(function(s){const i=OL(s);if(!i)return"";const r=i.split(/\s+/).filter(Boolean);if(!r.length)return"";const l=r[0]==="diff"?r.slice(1):r;for(const a of l){const u=a.includes(":")?a.slice(a.indexOf(":")+1):a;if(u&&/[./\\-]/.test(u))return u}return""})(e);return{title:o||t,caption:o?n?`Diff / ${t}`:t:""}}const cae=["aria-busy","aria-label","data-language","data-markstream-line-numbers"],dae={key:0,translate:"no",class:"markstream-pre__diff-code"},fae={class:"markstream-pre__diff-pane-content"},pae={class:"markstream-pre__diff-number","aria-hidden":"true"},hae={class:"markstream-pre__diff-content"},mae={class:"markstream-pre__diff-content-inner"},gae={key:0,class:"markstream-pre__line-numbers","aria-hidden":"true"},vae=["textContent"],yae=["textContent"],Ri=tt({__name:"PreCodeNode",props:{node:{},loading:{type:Boolean},showLineNumbers:{type:Boolean},diffInline:{type:Boolean},diffHideUnchangedRegions:{type:[Boolean,Object]},reservedHeightPx:{}},setup(e){const t=e;function n(Y,le){const Ee=String(Y??"");return le?Ee:Ee.replace(/\r\n$|\n$|\r$/,"")}const o=R(()=>{var Y,le,Ee;const de=String((le=(Y=t.node)==null?void 0:Y.language)!=null?le:"");return String((Ee=String(de).split(/\s+/g)[0])!=null?Ee:"").toLowerCase().replace(/[^\w-]/g,"")||"plaintext"}),s=R(()=>`language-${o.value}`),i=R(()=>{var Y;return t.loading===!0||((Y=t.node)==null?void 0:Y.loading)===!0}),r=R(()=>{var Y;return n((Y=t.node)==null?void 0:Y.code,i.value)});let l="",a=1;const u=R(()=>(function(Y){let le=0,Ee=1;Y.startsWith(l)&&(le=l.length,Ee=a,le>0&&Y[le-1]==="\r"&&Y[le]===` +`&&le++);for(let de=le;der.value.split(/\r\n|\n|\r/));let d=0,f="";const h=R(()=>{const Y=u.value;Y{var Y;return t.showLineNumbers===!0&&((Y=t.node)==null?void 0:Y.diff)===!0}),m=R(()=>g.value&&t.diffInline===!0),w=R(()=>{const Y=Number(t.reservedHeightPx);if(!Number.isFinite(Y)||Y<=0)return;const le=`${Math.ceil(Y)}px`;return i.value?{maxHeight:le,overflow:"auto"}:{height:le,minHeight:le,maxHeight:le,overflow:"auto"}}),_=["diff ","index ","--- ","+++ ","@@ "];function v(Y){return String(Y??"").trim().length===0}function k(Y,le="context",Ee={}){const de=v(Y);return{code:Y,kind:de&&le!=="hunk"&&le!=="spacer"&&!Ee.preserveBlankKind?"context":le,empty:de}}function y(Y){const le=n(Y,i.value);return le?le.split(/\r\n|\n|\r/):[]}function x(Y,le){return!v(Y[le])||le_.some(Ee=>le.startsWith(Ee)))}function I(Y,le){return le||!Y.startsWith(" ")||Y.startsWith(" ")?Y:` ${Y}`}function P(Y,le){const Ee=Y.length,de=le.length,he=[];let pe=0;for(;pe=pe&&G>=pe&&Y[ve]===le[G];)oe.unshift({originalIndex:ve,modifiedIndex:G}),ve--,G--;const X=ve-pe+1,fe=G-pe+1;if(X<=0||fe<=0||i.value||(X+1)*(fe+1)>15e5)return he.concat(oe);const Ce=fe+1,ge=new Uint32Array((X+1)*(fe+1));for(let ue=X-1;ue>=0;ue--)for(let Se=fe-1;Se>=0;Se--){const Ue=ue*Ce+Se;if(Y[pe+ue]===le[pe+Se])ge[Ue]=ge[(ue+1)*Ce+Se+1]+1;else{const _e=ge[(ue+1)*Ce+Se],Te=ge[ue*Ce+Se+1];ge[Ue]=_e>=Te?_e:Te}}const Q=[];let ee=0,ce=0;for(;ee=ge[ee*Ce+ce+1]?ee++:ce++;return he.concat(Q,oe)}function D(Y){var le;const Ee=(function(){var G,X;const fe=t.diffHideUnchangedRegions;if(fe==null||fe===!1)return null;const Ce=fe===!0?{}:fe;return Ce.enabled===!1?null:{contextLineCount:Math.max(0,Math.floor((G=Ce.contextLineCount)!=null?G:2)),minimumLineCount:Math.max(1,Math.floor((X=Ce.minimumLineCount)!=null?X:4))}})();if(!Ee||Y.length<1||Y.length>2||Y.length===2&&Y[0].lines.length!==Y[1].lines.length)return Y;const de=Y[0].lines,he=(le=Y[1])==null?void 0:le.lines,pe=G=>de[G].kind==="context"&&(he===void 0||he[G].kind==="context"&&de[G].code===he[G].code),oe=[];let ve=0;for(;ve=Ee.minimumLineCount){const fe=G+(G===0?0:Ee.contextLineCount),Ce=X-(X===de.length?0:Ee.contextLineCount);Ce-fe>=Ee.minimumLineCount&&oe.push({start:fe,end:Ce})}ve===G&&ve++}return oe.length?Y.map((G,X)=>{const fe=[];let Ce=0;for(const ge of oe)fe.push(...G.lines.slice(Ce,ge.start)),fe.push({code:X===0?"Unmodified lines":"",kind:"collapsed",empty:!1,key:`${G.key}-collapsed-${ge.start}-${ge.end}`,number:""}),Ce=ge.end;return fe.push(...G.lines.slice(Ce)),rn(mt({},G),{lines:fe})}):Y}const T=R(()=>{var Y,le,Ee,de;if(!g.value)return[];const he=(function(X){const fe=X.some(ge=>M(ge)),Ce=X.some(ge=>$(ge));return fe&&Ce||(function(){var ge,Q,ee,ce;if(o.value==="diff")return!0;const ue=(ce=(ee=String((Q=(ge=t.node)==null?void 0:ge.raw)!=null?Q:"").split(/\r?\n/,1)[0])==null?void 0:ee.trim())!=null?ce:"";return/^`{3,}\s*diff(?:\s|$)|^~{3,}\s*diff(?:\s|$)/.test(ue)})()&&(fe||Ce)})(c.value),pe=(function(){var X,fe;return((X=t.node)==null?void 0:X.originalCode)!=null||((fe=t.node)==null?void 0:fe.updatedCode)!=null})();if(m.value){const X=pe?(function(fe,Ce){const ge=y(fe),Q=y(Ce),ee=P(ge,Q);if(ee.length>0){const Te=[];let st=0,Fe=0;for(const Oe of ee){for(;st=ue&&Ue>=ue&&ge[Se]===Q[Ue];)_e.unshift(rn(mt({},k(Q[Ue])),{key:`inline-suffix-${Ue}`,number:Ue+1})),Se--,Ue--;for(let Te=ue;Te<=Se;Te++)ce.push(rn(mt({},k(ge[Te],"removed",{preserveBlankKind:x(ge,Te)})),{key:`inline-removed-source-${Te}`,number:Te+1}));for(let Te=ue;Te<=Ue;Te++)ce.push(rn(mt({},k(Q[Te],"added",{preserveBlankKind:x(Q,Te)})),{key:`inline-added-source-${Te}`,number:Te+1}));return ce.concat(_e)})((Y=t.node)==null?void 0:Y.originalCode,(le=t.node)==null?void 0:le.updatedCode):(function(fe){const Ce=[];let ge=1,Q=1;const ee=S(fe);for(const[ce,ue]of fe.entries())if(ue.startsWith("@@")){const Se=ue.match(/^@@\s+-(\d+)(?:,\d+)?\s+\+(\d+)(?:,\d+)?\s+@@/);Se&&(ge=Number(Se[1]),Q=Number(Se[2])),Ce.push(rn(mt({},k(ue,"hunk")),{key:`inline-hunk-${ce}`,number:""}))}else if(M(ue))Ce.push(rn(mt({},k(I(ue.slice(1),ee),"removed",{preserveBlankKind:!0})),{key:`inline-removed-${ce}`,number:ge++}));else if($(ue))Ce.push(rn(mt({},k(I(ue.slice(1),ee),"added",{preserveBlankKind:!0})),{key:`inline-added-${ce}`,number:Q++}));else{const Se=ee&&ue.startsWith(" ")?ue.slice(1):ue;Ce.push(rn(mt({},k(Se)),{key:`inline-context-${ce}`,number:Q})),ge++,Q++}return Ce})(c.value);return D([{key:"inline",className:"markstream-pre__diff-pane--inline",lines:X}])}if(!he&&pe)return(function(X,fe){const Ce=y(X),ge=y(fe),Q=P(Ce,ge),ee=[],ce=[];let ue=0,Se=0,Ue=0;const _e=(Te,st)=>{const Fe=Math.max(Te-ue,st-Se);for(let Oe=0;Oern(mt({},X),{key:`original-${fe}`,number:fe+1}))},{key:"modified",className:"markstream-pre__diff-pane--modified",lines:ve.map((X,fe)=>rn(mt({},X),{key:`modified-${fe}`,number:fe+1}))}])}),L=R(()=>T.value.some(Y=>Y.lines.some(le=>le.kind==="collapsed"))),B=R(()=>{const Y=o.value;return Y?`Code block: ${Y}`:"Code block"}),H=Z(null),O=Z([]);let F=null,W=!1,z=null;function U(Y){const le=Number.parseFloat(String(Y??""));return Number.isFinite(le)&&le>0?le:0}function q(Y,le){var Ee;if(!Y)return le;if(Y.classList.contains("markstream-pre__diff-line--collapsed"))return 32;const de=Y.querySelector(".markstream-pre__diff-content"),he=de?.getBoundingClientRect(),pe=(Ee=he?.height)!=null?Ee:0;return Math.max(le,Math.ceil(pe))}function K(){W||typeof window>"u"||(F!=null&&window.cancelAnimationFrame(F),F=window.requestAnimationFrame(()=>{F=null,W||(function(){var Y,le;F=null;const Ee=H.value;if(!Ee||!g.value||m.value||!Ee.classList.contains("is-wrap"))return void(O.value.length&&(O.value=[]));const de=(function(fe){const Ce=window.getComputedStyle(fe),ge=U(Ce.getPropertyValue("--markstream-pre-diff-line-height"));if(ge>0)return ge;const Q=U(Ce.lineHeight);return Q>0?Q:18})(Ee),he=Array.from(Ee.querySelectorAll(".markstream-pre__diff-pane--original .markstream-pre__diff-line")),pe=Array.from(Ee.querySelectorAll(".markstream-pre__diff-pane--modified .markstream-pre__diff-line")),oe=Math.max(he.length,pe.length),ve=[];for(let fe=0;fe{const ge=X[Ce];return ge&&Math.abs(fe.rowHeight-ge.rowHeight)<=.5&&Math.abs(fe.originalHeight-ge.originalHeight)<=.5&&Math.abs(fe.modifiedHeight-ge.modifiedHeight)<=.5})||(O.value=ve)})()}))}function ie(Y){z?.disconnect(),z=null,Y&&g.value&&!m.value&&typeof ResizeObserver<"u"&&(z=new ResizeObserver(()=>{K()}),z.observe(Y))}function ne(Y,le){const Ee=O.value[Y];if(!Ee)return;const de=le==="original"?Ee.originalHeight:Ee.modifiedHeight;return{"--markstream-pre-diff-synced-row-height":`${Math.ceil(Ee.rowHeight)}px`,"--markstream-pre-diff-content-height":`${Math.ceil(de)}px`}}return et(H,Y=>{ie(Y),yt(()=>K())},{flush:"post"}),et([g,m,T],()=>{ie(H.value),yt(()=>K())},{flush:"post",immediate:!0}),Un(()=>{W=!0,F!=null&&(window.cancelAnimationFrame(F),F=null),z?.disconnect(),z=null}),(Y,le)=>(b(),A("pre",{ref_key:"preRef",ref:H,style:Gt(w.value),class:Re([s.value,{"markstream-pre--line-numbers":t.showLineNumbers,"markstream-pre--diff-preview":g.value,"markstream-pre--diff-inline":m.value,"markstream-pre--diff-collapsed":L.value}]),"aria-busy":i.value,"aria-label":B.value,"data-language":o.value,"data-markstream-line-numbers":t.showLineNumbers?"1":void 0,"data-markstream-pre":"1",tabindex:"0"},[g.value?(b(),A("code",dae,[(b(!0),A(Pe,null,pt(T.value,Ee=>(b(),A("span",{key:Ee.key,class:Re(["markstream-pre__diff-pane",Ee.className])},[C("span",fae,[(b(!0),A(Pe,null,pt(Ee.lines,(de,he)=>(b(),A("span",{key:de.key,class:Re(["markstream-pre__diff-line",[`markstream-pre__diff-line--${de.kind}`,{"markstream-pre__diff-line--empty":de.empty}]]),style:Gt(ne(he,Ee.key))},[le[0]||(le[0]=C("span",{class:"markstream-pre__diff-rail","aria-hidden":"true"},null,-1)),C("span",pae,N(de.number),1),C("span",hae,[C("span",mae,N(de.code),1)])],6))),128))])],2))),128))])):(b(),A(Pe,{key:1},[t.showLineNumbers?(b(),A("span",gae,[C("span",{class:"markstream-pre__line-numbers-text",textContent:N(h.value)},null,8,vae)])):te("",!0),C("code",{translate:"no",class:"markstream-pre__code",textContent:N(r.value)},null,8,yae)],64))],14,cae))}});Ri.install=e=>{e.component(Ri.__name,Ri)};const kae={key:0},Xo=Kn(tt({__name:"TextNode",props:{node:{}},emits:["copy"],setup(e){const t=e,n=mf(),o=on("markstreamFade",void 0),s=on("markstreamTextStreamState",void 0),i=on("markstreamStreamVersion",void 0),r=R(()=>{const w=n.fade;return w===""||w===!0||w==="true"||w!==!1&&w!=="false"&&void 0}),l=R(()=>typeof r.value=="boolean"?r.value:typeof o?.value!="boolean"||o.value),a=R(()=>{var w;const _=(w=n["index-key"])!=null?w:n.indexKey;return _==null||_===""?"":String(_)}),u=Z(t.node.content),c=Z(""),d=Z(0);let f;function h(){f?.(),f=void 0}function g(){h(),c.value&&(u.value=u.value+c.value,c.value="")}et([()=>t.node.content,a,l],([w])=>{const _=String(w??""),v=a.value,k=vL({nextContent:_,persistedContent:v?s?.get(v):void 0,currentState:{settledContent:u.value,streamedDelta:c.value},typewriterEnabled:l.value});u.value=k.settledContent,c.value=k.streamedDelta,k.appended?(d.value+=1,(function(){if(!c.value||f||!i)return;const y=i.value;f=et(()=>i.value,x=>{x!==y&&g()},{flush:"sync"})})()):c.value||h(),v&&s?.set(v,_)},{immediate:!0}),pf(h);const m=R(()=>d.value%2==0?"text-node-stream-delta--a":"text-node-stream-delta--b");return(w,_)=>(b(),A("span",{class:Re([[e.node.center?"text-node-center":""],"text-node"])},[u.value?(b(),A("span",kae,N(u.value),1)):te("",!0),c.value?(b(),A("span",{key:1,class:Re(["text-node-stream-delta",[m.value]]),onAnimationend:g},N(c.value),35)):te("",!0)],2))}}),[["__scopeId","data-v-a7e90764"]]);function S1(e,t,n){return tt({name:e,inheritAttrs:!1,setup(o,{attrs:s,slots:i}){var r,l;const a=p5(),u=d5(),c=f5(),d=typeof window<"u"&&((l=(r=ds())==null?void 0:r.vnode.el)==null?void 0:l.nodeType)===1,f=Z(typeof window>"u"||d||!c.value),h=Xr(null);let g=null;function m(w){const _=w&&"$el"in w?w.$el:w;h.value=_ instanceof HTMLElement?_:null}return typeof window<"u"&&et([h,c],([w,_],v,k)=>{if(g?.destroy(),g=null,!_||f.value)return void(f.value=!0);if(!w)return;let y=!0;const x=a(w,{rootMargin:u?.value.heavyBlockMargin,allowIdle:!1});g=x,f.value=x.isVisible.value,x.whenVisible.then(()=>{y&&g===x&&(f.value=!0)}),k(()=>{y=!1,x.destroy(),g===x&&(g=null)})},{immediate:!0}),Un(()=>{g?.destroy(),g=null}),()=>nn(f.value?t:n,rn(mt({},s),{ref:m}),i)}})}Xo.install=e=>{e.component(Xo.__name,Xo)};const ag=tt({name:"CodeBlockNodeLoading",inheritAttrs:!1,props:["node","isDark","loading","stream","theme","darkTheme","lightTheme","isShowPreview","monacoOptions","enableFontSizeControl","minWidth","maxWidth","themes","showHeader","showCopyButton","showExpandButton","showPreviewButton","showCollapseButton","showFontSizeButtons","showTooltips","htmlPreviewAllowScripts","htmlPreviewSandbox","customId","estimatedHeightPx","estimatedContentHeightPx","estimatedDiffInline"],emits:["previewCode","copy"],setup(e,{attrs:t}){const n=e;return()=>{var o,s,i,r,l,a,u;const c=M2(String((s=(o=n.node)==null?void 0:o.language)!=null?s:"")),d=Fw[c]||(c?c.charAt(0).toUpperCase()+c.slice(1):Fw[""]),f=aae(n.node),h=uae(String((r=(i=n.node)==null?void 0:i.raw)!=null?r:""),d,f),g=n.monacoOptions,m=f&&((l=n.estimatedDiffInline)!=null?l:h5(g??{},typeof window>"u"?0:window.innerWidth)),w=g?.diffAppearance,_=w==="dark"||w!=="light"&&n.isDark===!0,v=typeof g?.fontSize=="number"&&Number.isFinite(g.fontSize)&&g.fontSize>0?g.fontSize:12,k=typeof g?.lineHeight=="number"&&Number.isFinite(g.lineHeight)&&g.lineHeight>0?g.lineHeight:v===12?18:Math.max(12,Math.round(1.5*v)),y=typeof g?.tabSize=="number"&&Number.isFinite(g.tabSize)&&g.tabSize>0?g.tabSize:4,x=f?0:8,M=typeof((a=g?.padding)==null?void 0:a.top)=="number"&&Number.isFinite(g.padding.top)&&g.padding.top>=0?g.padding.top:x,$=typeof((u=g?.padding)==null?void 0:u.bottom)=="number"&&Number.isFinite(g.padding.bottom)&&g.padding.bottom>=0?g.padding.bottom:x,S=typeof g?.fontFamily=="string"?g.fontFamily.trim():"",I=mt(mt({fontSize:`${v}px`,lineHeight:`${k}px`,tabSize:y,paddingTop:`${M}px`,paddingBottom:`${$}px`,"--markstream-pre-line-number-top":`${M}px`},f?{"--markstream-pre-diff-line-height":`${k}px`}:{}),S?{"--markstream-code-font-family":S}:{}),P=()=>nn("button",{class:"code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0","aria-hidden":"true",disabled:!0,tabindex:-1,type:"button"},[nn("svg",{class:"action-icon"})]),D=n.isShowPreview!==!1&&(c==="html"||c==="svg"),T=n.showFontSizeButtons!==!1&&n.enableFontSizeControl!==!1||n.showExpandButton!==!1||D&&n.showPreviewButton!==!1,L=H=>{if(H!=null)return typeof H=="number"?`${H}px`:String(H)},B=mt(mt(mt({"--markstream-code-layout-character-width":"1ch"},L(n.minWidth)?{minWidth:L(n.minWidth)}:{}),L(n.maxWidth)?{maxWidth:L(n.maxWidth)}:{}),f?{}:{color:"var(--vscode-editor-foreground, var(--markstream-code-fallback-fg, var(--code-fg)))",backgroundColor:"var(--vscode-editor-background, var(--markstream-code-fallback-bg, var(--code-bg)))",borderColor:"var(--markstream-code-border-color, var(--code-border))"});return nn("div",rn(mt({},t),{class:["code-block-container","rounded-lg","border",{dark:n.isDark===!0,"is-rendering":n.loading!==!1,"is-dark":_,"is-diff":f,"is-plain-text":c===""||c==="plaintext"||c==="text"},t.class],style:[B,t.style],"data-markstream-code-block":"1","data-markstream-enhanced":"false","data-markstream-code-block-state":n.loading?"streaming":"settled","data-markstream-code-loading":"1"}),[n.showHeader===!1?null:nn("div",{class:"code-block-header flex justify-between items-center border-b px-[var(--ms-inset-panel-x)] py-[var(--ms-inset-panel-y)] border-[var(--code-border)] bg-[var(--code-header-bg)] text-[var(--code-fg)]"},[nn("div",{class:"code-header-main"},[nn("span",{class:"icon-slot h-4 w-4 flex-shrink-0"}),nn("div",{class:"code-header-copy"},[nn("div",{class:"code-header-title"},h.title),h.caption?nn("div",{class:"code-header-caption"},h.caption):null])]),nn("div",{class:"flex items-center gap-0.5",style:{visibility:"hidden"}},[f?nn("div",{class:"code-diff-stats","aria-hidden":"true"},[nn("span",{class:"code-diff-stat removed"},"-0"),nn("span",{class:"code-diff-stat added"},"+0")]):null,n.showCopyButton===!1?null:P(),n.showCollapseButton===!1?null:P(),T?nn("div",{class:"relative"},[P()]):null])]),nn("div",{class:"code-block-shell-content",style:n.stream!==!1||n.loading===!1?void 0:{display:"none"}},[nn(Ri,{node:n.node,loading:n.loading,showLineNumbers:!0,reservedHeightPx:f?void 0:n.estimatedContentHeightPx,diffInline:m,diffHideUnchangedRegions:f?lae(g?.diffHideUnchangedRegions):void 0,class:"code-pre-fallback",style:I,"data-markstream-code-loading":"1"})]),nn("div",{class:"code-loading-placeholder",style:n.stream===!1&&n.loading!==!1?void 0:{display:"none"}},[nn("div",{class:"loading-skeleton"},[nn("div",{class:"skeleton-line"}),nn("div",{class:"skeleton-line"}),nn("div",{class:"skeleton-line short"})])]),nn("span",{class:"sr-only","aria-live":"polite",role:"status"})])}}}),G9=S1("ViewportDeferredCodeBlockNode",zr({loader:()=>vo(null,null,function*(){try{return(yield Go(()=>import("./CodeBlockNode-ZZ-0lk3E.js"),__vite__mapDeps([4,5]))).default}catch(e){return console.warn('[markstream-vue] Optional peer dependency stream-diffs is missing. Falling back to preformatted code rendering. To enable enhanced code block features, please install "stream-diffs".',e),Ri}}),loadingComponent:ag,delay:0,suspensible:!1}),ag),Jr=zr(()=>vo(null,null,function*(){var e;if(((e=(function(){const t=Reflect.get(globalThis,"process");return t?.env})())==null?void 0:e.NODE_ENV)==="test"&&typeof window<"u")return t=>{var n,o,s,i;return nn(Xo,rn(mt({},t),{node:{type:"text",content:(o=t.node.raw)!=null?o:`$${(n=t.node.content)!=null?n:""}$`,raw:(i=t.node.raw)!=null?i:`$${(s=t.node.content)!=null?s:""}$`}}))};try{return yield wL(),(yield Go(()=>import("./index7-CjjTl3F3.js"),[])).default}catch(t){console.warn('[markstream-vue] Optional peer dependencies for MathInlineNode are missing. Falling back to text rendering. To enable full math rendering features, please install "katex".',t)}return t=>{var n,o,s,i;return nn(Xo,rn(mt({},t),{node:{type:"text",content:(o=t.node.raw)!=null?o:`$${(n=t.node.content)!=null?n:""}$`,raw:(i=t.node.raw)!=null?i:`$${(s=t.node.content)!=null?s:""}$`}}))}})),PL=zr(()=>vo(null,null,function*(){try{return yield wL(),(yield Go(()=>import("./index6-BS7x8iLz.js"),[])).default}catch(e){console.warn('[markstream-vue] Optional peer dependencies for MathBlockNode are missing. Falling back to text rendering. To enable full math rendering features, please install "katex".',e)}return e=>{var t,n,o,s;return nn(Xo,rn(mt({},e),{node:{type:"text",content:(n=e.node.raw)!=null?n:`$$${(t=e.node.content)!=null?t:""}$$`,raw:(s=e.node.raw)!=null?s:`$$${(o=e.node.content)!=null?o:""}$$`}}))}})),wi=Kn(tt({__name:"ReferenceNode",props:{node:{},messageId:{},threadId:{}},emits:["click","mouseEnter","mouseLeave"],setup:e=>(t,n)=>(b(),A("span",{class:"reference-node cursor-pointer text-xs rounded-md px-1.5 mx-0.5",role:"button",tabindex:"0",onClick:n[0]||(n[0]=o=>t.$emit("click",o,e.node.id,e.messageId,e.threadId)),onMouseenter:n[1]||(n[1]=o=>t.$emit("mouseEnter",o,e.node.id,e.messageId,e.threadId)),onMouseleave:n[2]||(n[2]=o=>t.$emit("mouseLeave",o,e.node.id,e.messageId,e.threadId))},N(e.node.id),33))}),[["__scopeId","data-v-775c65e4"]]);wi.install=e=>{e.component(wi.__name,wi)};const bae={class:"superscript-node"},Hi=Kn(tt({__name:"SuperscriptNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=fs(()=>t.customId),o=R(()=>mt({text:Xo,inline_code:ii,link:Si,html_inline:nr,strong:_i,emphasis:Ai,footnote_reference:tr,strikethrough:xi,highlight:or,insert:Wi,subscript:zi,emoji:Bi,math_inline:Jr,reference:wi},n.value));return(s,i)=>(b(),A("sup",bae,[(b(!0),A(Pe,null,pt(e.node.children,(r,l)=>(b(),me(p(El),{key:`${e.indexKey||"superscript"}-${l}`,components:o.value,node:r,"custom-id":t.customId,"index-key":`${e.indexKey||"superscript"}-${l}`,"fallback-to-text":""},null,8,["components","node","custom-id","index-key"]))),128))]))}}),[["__scopeId","data-v-24160b22"]]);Hi.install=e=>{e.component(Hi.__name,Hi)};const Cae={class:"subscript-node"},zi=Kn(tt({__name:"SubscriptNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=fs(()=>t.customId),o=R(()=>mt({text:Xo,inline_code:ii,link:Si,html_inline:nr,strong:_i,emphasis:Ai,footnote_reference:tr,strikethrough:xi,highlight:or,insert:Wi,superscript:Hi,emoji:Bi,math_inline:Jr,reference:wi},n.value));return(s,i)=>(b(),A("sub",Cae,[(b(!0),A(Pe,null,pt(e.node.children,(r,l)=>(b(),me(p(El),{key:`${e.indexKey||"subscript"}-${l}`,components:o.value,node:r,"custom-id":t.customId,"index-key":`${e.indexKey||"subscript"}-${l}`,"fallback-to-text":""},null,8,["components","node","custom-id","index-key"]))),128))]))}}),[["__scopeId","data-v-197fa13b"]]);zi.install=e=>{e.component(zi.__name,zi)};const wae={class:"strong-node"},_i=Kn(tt({__name:"StrongNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=fs(()=>t.customId),o=R(()=>mt({text:Xo,inline_code:ii,link:Si,html_inline:nr,emphasis:Ai,strikethrough:xi,highlight:or,insert:Wi,subscript:zi,superscript:Hi,emoji:Bi,footnote_reference:tr,math_inline:Jr,reference:wi},n.value));return(s,i)=>(b(),A("strong",wae,[(b(!0),A(Pe,null,pt(e.node.children,(r,l)=>(b(),me(p(El),{key:`${e.indexKey||"strong"}-${l}`,components:o.value,node:r,"index-key":`${e.indexKey||"strong"}-${l}`,"custom-id":t.customId},null,8,["components","node","index-key","custom-id"]))),128))]))}}),[["__scopeId","data-v-a8647104"]]);_i.install=e=>{e.component(_i.__name,_i)};const _ae={class:"strikethrough-node"},xi=Kn(tt({__name:"StrikethroughNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=fs(()=>t.customId),o=R(()=>mt({text:Xo,inline_code:ii,link:Si,html_inline:nr,strong:_i,emphasis:Ai,highlight:or,insert:Wi,subscript:zi,superscript:Hi,emoji:Bi,footnote_reference:tr,math_inline:Jr,reference:wi},n.value));return(s,i)=>(b(),A("del",_ae,[(b(!0),A(Pe,null,pt(e.node.children,(r,l)=>(b(),me(p(El),{key:`${e.indexKey||"strikethrough"}-${l}`,components:o.value,node:r,"custom-id":t.customId,"index-key":`${e.indexKey||"strikethrough"}-${l}`},null,8,["components","node","custom-id","index-key"]))),128))]))}}),[["__scopeId","data-v-b7a531fa"]]);xi.install=e=>{e.component(xi.__name,xi)};const xae=["href","title","aria-label","aria-hidden","target","rel"],Sae=["aria-hidden"],Aae={class:"link-text-wrapper relative inline-flex"},Mae={class:"leading-[normal] link-text"},Si=Kn(tt({__name:"LinkNode",props:{node:{},indexKey:{},customId:{},showTooltip:{type:Boolean,default:!0},color:{},underlineHeight:{},underlineBottom:{},animationDuration:{},animationOpacity:{},animationTiming:{},animationIteration:{}},setup(e){const t=e,n=on("markstreamShowTooltips",void 0),o=R(()=>{const _=n?.value;return typeof _=="boolean"?_:t.showTooltip}),s=R(()=>{var _,v,k,y,x;const M=t.underlineBottom!==void 0?typeof t.underlineBottom=="number"?`${t.underlineBottom}px`:String(t.underlineBottom):"-3px",$=(_=t.animationOpacity)!=null?_:.35,S=Math.max(.12,Math.min(.5*$,$)),I={"--underline-height":`${(v=t.underlineHeight)!=null?v:2}px`,"--underline-bottom":M,"--underline-opacity":String($),"--underline-rest-opacity":String(S),"--underline-duration":`${(k=t.animationDuration)!=null?k:1.6}s`,"--underline-timing":(y=t.animationTiming)!=null?y:"ease-in-out","--underline-iteration":typeof t.animationIteration=="number"?String(t.animationIteration):(x=t.animationIteration)!=null?x:"infinite"};return t.color&&(I["--link-color"]=t.color),I}),i=fs(()=>t.customId),r=R(()=>mt({text:Xo,strong:_i,strikethrough:xi,emphasis:Ai,image:Va,html_inline:nr,inline_code:ii},i.value)),l=mf(),a=R(()=>{var _,v;const k=(_=t.node)==null?void 0:_.attrs;if(!k||typeof k!="object")return{};const y={};if(Array.isArray(k))for(const x of k)Array.isArray(x)&&x[0]&&(y[String(x[0])]=String((v=x[1])!=null?v:""));else for(const[x,M]of Object.entries(k))x&&M!=null&&M!==!1&&(y[x]=M===!0?"":String(M));return Kw(y,"safe","a")}),u=R(()=>mt(mt({},l),a.value)),c=R(()=>{var _,v;return Kw({href:String((v=(_=t.node)==null?void 0:_.href)!=null?v:"")},"safe","a").href}),d=R(()=>{if(!c.value)return;const _=u.value.target;return(typeof _=="string"?_.trim():String(_??"").trim())||(wte(c.value)?"_blank":void 0)}),f=R(()=>{var _;return String((_=d.value)!=null?_:"").trim().toLowerCase()==="_blank"}),h=R(()=>{if(!c.value)return;const _=u.value.rel,v=new Set((typeof _=="string"?_:String(_??"")).split(/\s+/).filter(Boolean)),k=new Set(Array.from(v).filter(y=>y.toLowerCase()!=="opener"));return f.value&&(k.add("noopener"),k.add("noreferrer")),k.size>0?Array.from(k).join(" "):void 0}),g=R(()=>{const _=mt({},u.value);return delete _.title,delete _.href,delete _.target,delete _.rel,_});function m(){o.value&&qle()}const w=R(()=>{var _,v;const k=(_=t.node)==null?void 0:_.title;return typeof k=="string"&&k.trim().length>0?k:String((v=c.value)!=null?v:"")});return(_,v)=>{var k,y;return e.node.loading?(b(),A("span",Dn({key:1,class:"link-loading inline-flex items-baseline gap-1.5","aria-hidden":e.node.loading?"false":"true"},p(l),{style:s.value}),[C("span",Aae,[C("span",Mae,[V(p(Xo),{class:"leading-[normal] link-text",node:{type:"text",content:String((k=e.node.text)!=null?k:""),raw:String((y=e.node.text)!=null?y:"")},"index-key":`${e.indexKey||"link-text"}-loading`},null,8,["node","index-key"])]),v[1]||(v[1]=C("span",{class:"link-loading-indicator","aria-hidden":"true"},null,-1))])],16,Sae)):(b(),A("a",Dn({key:0,class:"link-node",href:c.value,title:o.value?"":w.value,"aria-label":`Link: ${w.value}`,"aria-hidden":e.node.loading?"true":"false",target:d.value,rel:h.value},g.value,{style:s.value,onMouseenter:v[0]||(v[0]=x=>(function(M){var $,S,I,P;if(!o.value)return;const D=M,T=D?.clientX!=null&&D?.clientY!=null?{x:D.clientX,y:D.clientY}:void 0,L=(($=t.node)==null?void 0:$.title)||((S=c.value)!=null&&S.includes("xn--")&&((P=(I=t.node)==null?void 0:I.text)!=null&&P.includes("://"))?t.node.text:c.value)||"";Vle(M.currentTarget,L,"top",!1,T)})(x)),onMouseleave:m}),[(b(!0),A(Pe,null,pt(e.node.children,(x,M)=>(b(),me(p(El),{key:`${e.indexKey||"emphasis"}-${M}`,components:r.value,node:x,"custom-id":t.customId,"index-key":`${e.indexKey||"link-text"}-${M}`},null,8,["components","node","custom-id","index-key"]))),128))],16,xae))}}}),[["__scopeId","data-v-367e6ca4"]]);Si.install=e=>{e.component(Si.__name,Si)};const Tae={class:"insert-node"},Wi=Kn(tt({__name:"InsertNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=fs(()=>t.customId),o=R(()=>mt({text:Xo,inline_code:ii,link:Si,html_inline:nr,strong:_i,emphasis:Ai,strikethrough:xi,highlight:or,subscript:zi,superscript:Hi,emoji:Bi,footnote_reference:tr,math_inline:Jr,reference:wi},n.value));return(s,i)=>(b(),A("ins",Tae,[(b(!0),A(Pe,null,pt(e.node.children,(r,l)=>(b(),me(p(El),{key:`${e.indexKey||"insert"}-${l}`,components:o.value,node:r,"custom-id":t.customId,"index-key":`${e.indexKey||"insert"}-${l}`},null,8,["components","node","custom-id","index-key"]))),128))]))}}),[["__scopeId","data-v-1e2c29d4"]]);Wi.install=e=>{e.component(Wi.__name,Wi)};const Eae={class:"highlight-node"},or=Kn(tt({__name:"HighlightNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=fs(()=>t.customId),o=R(()=>mt({text:Xo,inline_code:ii,link:Si,html_inline:nr,strong:_i,emphasis:Ai,strikethrough:xi,insert:Wi,subscript:zi,superscript:Hi,emoji:Bi,footnote_reference:tr,math_inline:Jr,reference:wi},n.value));return(s,i)=>(b(),A("mark",Eae,[(b(!0),A(Pe,null,pt(e.node.children,(r,l)=>(b(),me(p(El),{key:`${e.indexKey||"highlight"}-${l}`,components:o.value,node:r,"custom-id":t.customId,"index-key":`${e.indexKey||"highlight"}-${l}`},null,8,["components","node","custom-id","index-key"]))),128))]))}}),[["__scopeId","data-v-7a62982a"]]);or.install=e=>{e.component(or.__name,or)};const Iae={class:"emphasis-node"},Ai=Kn(tt({__name:"EmphasisNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=fs(()=>t.customId),o=R(()=>mt({text:Xo,inline_code:ii,link:Si,html_inline:nr,strong:_i,strikethrough:xi,highlight:or,insert:Wi,subscript:zi,superscript:Hi,emoji:Bi,footnote_reference:tr,math_inline:Jr,reference:wi},n.value));return(s,i)=>(b(),A("em",Iae,[(b(!0),A(Pe,null,pt(e.node.children,(r,l)=>(b(),me(p(El),{key:`${e.indexKey||"emphasis"}-${l}`,components:o.value,node:r,"custom-id":t.customId,"index-key":`${e.indexKey||"emphasis"}-${l}`},null,8,["components","node","custom-id","index-key"]))),128))]))}}),[["__scopeId","data-v-2a5aafbf"]]);Ai.install=e=>{e.component(Ai.__name,Ai)};const Lae={class:"hard-break"},qa=Kn(tt({__name:"HardBreakNode",props:{node:{}},setup:e=>(t,n)=>(b(),A("br",Lae))}),[["__scopeId","data-v-50c58f70"]]);qa.install=e=>{e.component(qa.__name,qa)};const Lp=tt({__name:"SimpleInlineRenderer",props:{nodes:{},customId:{},indexKey:{}},setup(e){const t=e,n=kt({checkbox:er,checkbox_input:er,emoji:Bi,emphasis:Ai,hardbreak:qa,highlight:or,inline_code:ii,insert:Wi,link:Si,reference:wi,strikethrough:xi,strong:_i,subscript:zi,superscript:Hi,text:Xo}),o=fs(()=>t.customId),s=R(()=>{const i=o.value;return Object.keys(i).length>0?mt(mt({},n),i):n});return(i,r)=>(b(!0),A(Pe,null,pt(e.nodes,(l,a)=>(b(),me(p(El),{key:a,components:s.value,node:l,"custom-id":t.customId,"index-key":`${e.indexKey||"inline"}-${a}`},null,8,["components","node","custom-id","index-key"]))),128))}});function j3(e){if(!e||typeof e!="object")return!1;const t=`|${e.type}|`;if(!"|checkbox|checkbox_input|emoji|emphasis|hardbreak|highlight|inline_code|insert|link|reference|strikethrough|strong|subscript|superscript|text|".includes(t))return!1;if(!"|emphasis|highlight|insert|link|strikethrough|strong|subscript|superscript|".includes(t))return!0;const n=e.children;return Array.isArray(n)&&n.every(j3)}function ug(e,t=!0,n=!1){if(!e||!n&&e.length===0)return null;if(e.every(j3))return e;if(!t||e.length!==1)return null;const o=e[0];if(o?.type!=="paragraph"||!Array.isArray(o.children))return null;const s=o.children;return(n||s.length>0)&&s.every(j3)?s:null}function vc(e){var t,n;if(!e?.length)return null;let o="";for(const s of e){if(s?.type!=="text"||s.center===!0)return null;o+=String((n=(t=s.content)!=null?t:s.raw)!=null?n:"")}return o}const $ae=["cite"],Nae={key:0,dir:"auto",class:"paragraph-node"},Fae=["custom-id"],Qh=Kn(tt({__name:"BlockquoteNode",props:{node:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},customId:{},showTooltips:{type:Boolean}},emits:["copy"],setup(e){const t=e,n=fs(()=>t.customId),o=R(()=>!!n.value.paragraph),s=R(()=>!!n.value.text),i=R(()=>ug(t.node.children,!o.value)),r=R(()=>t.fade!==!1||s.value?null:vc(i.value));return En("markstreamShowTooltips",R(()=>t.showTooltips)),En("markstreamFade",R(()=>t.fade)),(l,a)=>(b(),A("blockquote",{class:"blockquote blockquote-node",dir:"auto",cite:e.node.cite},[i.value?(b(),A("p",Nae,[r.value!==null?(b(),A("span",{key:0,class:"text-node","custom-id":t.customId},N(r.value),9,Fae)):(b(),me(p(Lp),{key:1,nodes:i.value,"custom-id":t.customId,"index-key":`blockquote-${t.indexKey}-paragraph`},null,8,["nodes","custom-id","index-key"]))])):(b(),me(p(Ui),{key:1,"show-tooltips":t.showTooltips,"index-key":`blockquote-${t.indexKey}`,nodes:t.node.children||[],"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,onCopy:a[0]||(a[0]=u=>l.$emit("copy",u))},null,8,["show-tooltips","index-key","nodes","custom-id","typewriter","fade"]))],8,$ae))}}),[["__scopeId","data-v-abfecebc"]]);Qh.install=e=>{e.component(Qh.__name,Qh)};const Rae={class:"definition-list"},Oae={class:"definition-term"},Pae={class:"definition-desc"},em=Kn(tt({__name:"DefinitionListNode",props:{node:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},emits:["copy"],setup(e){const t=e;return(n,o)=>(b(),A("dl",Rae,[(b(!0),A(Pe,null,pt(t.node.items,(s,i)=>(b(),A(Pe,{key:i},[C("dt",Oae,[V(p(Ui),{"index-key":`definition-term-${t.indexKey}-${i}`,nodes:s.term,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,onCopy:o[0]||(o[0]=r=>n.$emit("copy",r))},null,8,["index-key","nodes","custom-id","typewriter","fade"])]),C("dd",Pae,[V(p(Ui),{"index-key":`definition-desc-${t.indexKey}-${i}`,nodes:s.definition,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,onCopy:o[1]||(o[1]=r=>n.$emit("copy",r))},null,8,["index-key","nodes","custom-id","typewriter","fade"])])],64))),128))]))}}),[["__scopeId","data-v-4e103b30"]]);em.install=e=>{e.component(em.__name,em)};const Dae=["href","title"],J1=Kn(tt({__name:"FootnoteAnchorNode",props:{node:{}},setup(e){const t=e;function n(o){var s;if(o.preventDefault(),typeof document>"u")return;const i=`fnref-${String((s=t.node.id)!=null?s:"")}`,r=document.getElementById(i);r&&r.scrollIntoView({behavior:"smooth",block:"center"})}return(o,s)=>(b(),A("a",{class:"footnote-anchor text-sm hover:underline cursor-pointer",href:`#fnref-${e.node.id}`,title:`返回引用 ${e.node.id}`,onClick:n}," ↩︎ ",8,Dae))}}),[["__scopeId","data-v-e1eb37b6"]]);J1.install=e=>{e.component(J1.__name,J1)};const Bae=["id"],Hae={class:"flex-1"},tm=tt({__name:"FootnoteNode",props:{node:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},emits:["copy"],setup(e){const t=e;return(n,o)=>(b(),A("div",{id:`fnref--${e.node.id}`,class:"footnote-node flex text-sm leading-relaxed border-t border-[var(--footnote-border)] pt-2"},[C("div",Hae,[V(p(Ui),{"index-key":`footnote-${t.indexKey}`,nodes:t.node.children,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,onCopy:o[0]||(o[0]=s=>n.$emit("copy",s))},null,8,["index-key","nodes","custom-id","typewriter","fade"])])],8,Bae))}});tm.install=e=>{e.component(tm.__name,tm)};const zae=["custom-id"],V3=Kn(tt({__name:"HeadingNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=fs(()=>t.customId),o=on("markstreamFade",void 0),s=R(()=>o?.value!==!1||n.value.text?null:vc(t.node.children)),i=R(()=>mt({text:Xo,inline_code:ii,link:Si,image:Va,strong:_i,emphasis:Ai,strikethrough:xi,highlight:or,insert:Wi,subscript:zi,superscript:Hi,emoji:Bi,checkbox:er,checkbox_input:er,footnote_reference:tr,hardbreak:qa,math_inline:Jr,reference:wi},n.value));return(r,l)=>(b(),me(ys(`h${e.node.level}`),Dn({class:["heading-node",[`heading-${e.node.level}`]],dir:"auto"},e.node.attrs),{default:ke(()=>[s.value!==null?(b(),A("span",{key:0,class:"text-node","custom-id":t.customId},N(s.value),9,zae)):(b(!0),A(Pe,{key:1},pt(e.node.children,(a,u)=>(b(),me(p(El),{key:u,components:i.value,"custom-id":t.customId,node:a,"index-key":`${e.indexKey||"heading"}-${u}`},null,8,["components","custom-id","node","index-key"]))),128))]),_:1},16,["class"]))}}),[["__scopeId","data-v-7122dbe1"]]),I2=V3;I2.install=e=>{e.component(V3.__name,V3)};const Wae={key:0,dir:"auto",class:"paragraph-node"},Uae=["custom-id"],jae={dir:"auto",class:"paragraph-node"},Vae=["custom-id"],qd=Kn(tt({__name:"ListItemNode",props:{node:{},item:{},indexKey:{},customId:{},typewriter:{type:Boolean},fade:{type:Boolean},showTooltips:{type:Boolean},value:{},isDark:{type:Boolean}},emits:["copy"],setup(e){const t=e,n=R(()=>{var h;return(h=t.node)!=null?h:t.item}),o=fs(()=>t.customId),s=R(()=>!!o.value.paragraph),i=R(()=>!!o.value.text),r=R(()=>{var h;return ug((h=n.value)==null?void 0:h.children,!s.value)}),l=R(()=>{var h;if(s.value)return null;const g=(h=n.value)==null?void 0:h.children;if(!Array.isArray(g)||g.length<2)return null;const m=g[0];if(m?.type!=="paragraph"||!Array.isArray(m.children))return null;const w=g.slice(1);if(!w.every(v=>v?.type==="list"))return null;const _=ug([m]);return _?{paragraphChildren:_,nestedLists:w}:null});function a(){return t.fade===!1&&!i.value}const u=R(()=>a()?vc(r.value):null),c=R(()=>{var h;return a()?vc((h=l.value)==null?void 0:h.paragraphChildren):null}),d=Object.freeze({}),f=R(()=>{const{value:h}=t;return typeof h=="number"&&Number.isFinite(h)?{value:h}:d});return En("markstreamShowTooltips",R(()=>t.showTooltips)),En("markstreamFade",R(()=>t.fade)),(h,g)=>{var m,w;return b(),A("li",Dn({class:"list-item",dir:"auto"},f.value),[r.value?(b(),A("p",Wae,[u.value!==null?(b(),A("span",{key:0,class:"text-node","custom-id":t.customId},N(u.value),9,Uae)):(b(),me(p(Lp),{key:1,nodes:r.value,"custom-id":t.customId,"index-key":`list-item-${t.indexKey}-paragraph`},null,8,["nodes","custom-id","index-key"]))])):l.value?(b(),A(Pe,{key:1},[C("p",jae,[c.value!==null?(b(),A("span",{key:0,class:"text-node","custom-id":t.customId},N(c.value),9,Vae)):(b(),me(p(Lp),{key:1,nodes:l.value.paragraphChildren,"custom-id":t.customId,"index-key":`list-item-${t.indexKey}-paragraph`},null,8,["nodes","custom-id","index-key"]))]),(b(!0),A(Pe,null,pt(l.value.nestedLists,(_,v)=>(b(),me(p(Ui),{key:v,nodes:[_],"custom-id":t.customId,"index-key":`list-item-${t.indexKey}-nested-${v}`,"show-tooltips":t.showTooltips,typewriter:t.typewriter,fade:t.fade,"is-dark":t.isDark,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0,onCopy:g[0]||(g[0]=k=>h.$emit("copy",k))},null,8,["nodes","custom-id","index-key","show-tooltips","typewriter","fade","is-dark"]))),128))],64)):(b(),me(p(Ui),{key:2,"show-tooltips":t.showTooltips,"index-key":`list-item-${t.indexKey}`,nodes:(w=(m=n.value)==null?void 0:m.children)!=null?w:[],"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,"is-dark":t.isDark,"batch-rendering":!1,onCopy:g[1]||(g[1]=_=>h.$emit("copy",_))},null,8,["show-tooltips","index-key","nodes","custom-id","typewriter","fade","is-dark"]))],16)}}}),[["__scopeId","data-v-617214f9"]]);qd.install=e=>{e.component(qd.__name,qd)};const Kd=Kn(tt({__name:"ListNode",props:{node:{},customId:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},showTooltips:{type:Boolean},isDark:{type:Boolean}},emits:["copy"],setup(e){const t=fs(()=>e.customId),n=R(()=>t.value.list_item||qd);return(o,s)=>(b(),me(ys(e.node.ordered?"ol":"ul"),{class:Re(["list-node",{"list-decimal":e.node.ordered,"list-disc":!e.node.ordered}])},{default:ke(()=>[(b(!0),A(Pe,null,pt(e.node.items,(i,r)=>{var l;return b(),me(ys(n.value),Dn({key:`${e.indexKey||"list"}-${r}`},{ref_for:!0},{showTooltips:e.showTooltips},{node:i,"custom-id":e.customId,"index-key":`${e.indexKey||"list"}-${r}`,typewriter:e.typewriter,fade:e.fade,"is-dark":e.isDark,value:e.node.ordered?((l=e.node.start)!=null?l:1)+r:void 0,onCopy:s[0]||(s[0]=a=>o.$emit("copy",a))}),null,16,["node","custom-id","index-key","typewriter","fade","is-dark","value"])}),128))]),_:1},8,["class"]))}}),[["__scopeId","data-v-99cb95e0"]]);Kd.install=e=>{e.component(Kd.__name,Kd)};const qae={key:2,class:"html-block-node__raw"},Kae=["innerHTML"],Zae={key:1,class:"html-block-node__placeholder"},Q1=Kn(tt({__name:"HtmlBlockNode",props:{node:{},customId:{},htmlPolicy:{}},setup(e){const t=e,n=on("markstreamHtmlPolicy",void 0),o=on("markstreamNestedRendererProps",void 0),s=R(()=>{var T,L;return(L=(T=t.htmlPolicy)!=null?T:n?.value)!=null?L:"safe"}),i=R(()=>{var T,L;const B=(T=o?.value)!=null?T:{};return rn(mt({},B),{customId:(L=t.customId)!=null?L:B.customId,htmlPolicy:s.value})}),r=zr({loader:()=>Promise.resolve().then(()=>x5),suspensible:!1}),l=R(()=>{const T=Gh(t.node.attrs,s.value);if(!T)return;const L=Z1(T);return Object.keys(L).length>0?L:void 0}),a=R(()=>{const T=String(t.node.tag||"").trim(),L=Gh(t.node.attrs,s.value,T);if(!L)return;const B=Z1(L);return Object.keys(B).length>0?B:void 0}),u=fs(()=>t.customId),c=tt({name:"DynamicRenderer",props:{nodes:{type:Array,required:!0}},render(){return this.nodes}}),d=Z(null),f=Z(typeof window>"u"),h=Z(t.node.content),g=R(()=>Array.isArray(t.node.children)?t.node.children:[]),m=R(()=>String(t.node.tag||"div")),w=R(()=>{var T;if(m.value.trim().toLowerCase()!=="details"||(T=t.node.attrs)!=null&&T.some(([B])=>String(B).toLowerCase()==="open"))return null;const L=g.value[0];return L?.type==="html_block"&&String(L.tag||"").toLowerCase()==="summary"?L:null}),_=R(()=>{var T;return vc((T=w.value)==null?void 0:T.children)}),v=R(()=>{const T=w.value;if(!T)return;const L=Gh(T.attrs,s.value,"summary");if(!L)return;const B=Z1(L);return Object.keys(B).length>0?B:void 0}),k=R(()=>_.value==null?g.value:g.value.slice(1)),y=R(()=>{const T=m.value.trim().toLowerCase();return iI.has(T)||i5(T,s.value)}),x=R(()=>g.value.length>0&&!!t.node.tag&&!y.value),M=R(()=>{var T,L,B;if(x.value)return{mode:"structured"};if(!f.value)return{mode:"html",content:(T=h.value)!=null?T:""};const H=(L=h.value)!=null?L:t.node.content;if(!H)return{mode:"html",content:""};if(s.value==="escape")return{mode:"html",content:Vd(H,s.value)};if(t.node.loading){const F=lg(H,u.value,s.value);return F===null?{mode:"text",content:(B=t.node.raw)!=null?B:H}:{mode:"dynamic",nodes:F}}if(!IL(H,u.value))return{mode:"html",content:Vd(H,s.value)};const O=lg(H,u.value,s.value);return O===null?{mode:"html",content:Vd(H,s.value)}:{mode:"dynamic",nodes:O}}),$=p5(),S=d5(),I=f5(),P=Xr(null),D=!!t.node.loading;return typeof window<"u"?(et([()=>d.value,()=>S?.value.heavyBlockMargin,()=>S?.value.rootMargin],([T],L,B)=>{var H,O,F,W;if((O=(H=P.value)==null?void 0:H.destroy)==null||O.call(H),P.value=null,!D)return f.value=!0,void(h.value=t.node.content);if(!T)return void(f.value=!1);let z=!0;const U=(W=(F=S?.value.heavyBlockMargin)!=null?F:S?.value.rootMargin)!=null?W:gc,q=$(T,{rootMargin:U,allowIdle:!I.value});P.value=q,f.value=f.value||q.isVisible.value,q.whenVisible.then(()=>{z&&P.value===q&&(f.value=!0)}),B(()=>{z=!1,q.destroy(),P.value===q&&(P.value=null)})},{immediate:!0}),et(()=>t.node.content,T=>{D&&!f.value||(h.value=T)})):f.value=!0,Un(()=>{var T,L;(L=(T=P.value)==null?void 0:T.destroy)==null||L.call(T),P.value=null}),(T,L)=>(b(),me(ys(x.value?m.value:"div"),Dn({ref_key:"htmlRef",ref:d,class:"html-block-node","data-markstream-viewport-pending":p(I)&&!f.value?"true":void 0},x.value?a.value:void 0),{default:ke(()=>[f.value?(b(),A(Pe,{key:0},[M.value.mode==="structured"?(b(),A(Pe,{key:0},[_.value!==null?(b(),A(Pe,{key:0},[C("summary",bR(FA(v.value)),N(_.value),17),k.value.length?(b(),me(p(r),Dn({key:0},i.value,{nodes:k.value,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes"])):te("",!0)],64)):(b(),me(p(r),Dn({key:1},i.value,{nodes:g.value,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes"]))],64)):M.value.mode==="dynamic"?(b(),me(p(c),{key:1,nodes:M.value.nodes},null,8,["nodes"])):M.value.mode==="text"?(b(),A("pre",qae,N(M.value.content),1)):(b(),A("div",Dn({key:3},l.value,{innerHTML:M.value.content}),null,16,Kae))],64)):(b(),A("div",Zae,[Cn(T.$slots,"placeholder",{node:e.node},()=>[L[0]||(L[0]=C("span",{class:"html-block-node__placeholder-bar"},null,-1)),L[1]||(L[1]=C("span",{class:"html-block-node__placeholder-bar w-4/5"},null,-1)),L[2]||(L[2]=C("span",{class:"html-block-node__placeholder-bar w-2/3"},null,-1))],!0)]))]),_:3},16,["data-markstream-viewport-pending"]))}}),[["__scopeId","data-v-e140a874"]]);Q1.install=e=>{e.component(Q1.__name,Q1)};const Gae={dir:"auto",class:"paragraph-node"},Yae=["custom-id"],ac=Kn(tt({__name:"ParagraphNode",props:{node:{},customId:{},indexKey:{},customHtmlTags:{},parseOptions:{},customMarkdownIt:{type:Function}},setup(e){const t=e,n=fs(()=>t.customId),o=on("markstreamHtmlPolicy",void 0),s=on("markstreamFade",void 0),i=on("markstreamParseOptions",void 0),r=on("markstreamCustomMarkdownIt",void 0),l=on("markstreamNestedRendererProps",void 0),a=R(()=>{var S;return(S=o?.value)!=null?S:"safe"}),u=R(()=>{var S;return(S=t.parseOptions)!=null?S:i?.value}),c=R(()=>{var S;return(S=t.customMarkdownIt)!=null?S:r?.value}),d=R(()=>{var S,I;return(I=t.customHtmlTags)!=null?I:(S=l?.value)==null?void 0:S.customHtmlTags}),f=R(()=>{var S,I;const P=(S=l?.value)!=null?S:{};return rn(mt({},P),{customId:(I=t.customId)!=null?I:P.customId,customHtmlTags:d.value,parseOptions:u.value,customMarkdownIt:c.value,htmlPolicy:a.value})}),h=zr({loader:()=>Promise.resolve().then(()=>x5),suspensible:!1});function g(S){var I;return S.type==="text"&&String((I=S.content)!=null?I:"").trim()===""}const m=R(()=>t.node.children.filter(S=>!g(S))),w=R(()=>m.value.length>0&&m.value.every(S=>S.type==="image"||(function(I){var P;const D=(function(T){return T.type==="link"&&Array.isArray(T.children)?T.children.filter(L=>!g(L)):[]})(I);return D.length===1&&((P=D[0])==null?void 0:P.type)==="image"})(S))),_=R(()=>new Set(Ec(d.value))),v=R(()=>{if(!w.value||m.value.length<=1)return t.node.children;const S=[];for(let I=0;I0,T=t.node.children.slice(I+1).some(L=>!g(L));D&&T&&S.push(rn(mt({},P),{content:" ",raw:" "}))}return S}),k=R(()=>s?.value===!1&&!n.value.text),y=R(()=>k.value?vc(v.value):null);function x(S,I){return{node:S,"index-key":`${t.indexKey}-${I}`,"custom-id":t.customId,"custom-html-tags":d.value}}const M=R(()=>mt({inline_code:ii,image:Va,link:Si,hardbreak:qa,emphasis:Ai,strong:_i,strikethrough:xi,highlight:or,insert:Wi,subscript:zi,superscript:Hi,html_inline:nr,html_block:Q1,emoji:Bi,checkbox:er,math_inline:Jr,checkbox_input:er,reference:wi,footnote_anchor:J1,footnote_reference:tr,text:Xo},n.value)),$=R(()=>v.value.map((S,I)=>{var P;const D=(function(T){var L,B,H,O;if(T.type==="html_block"||T.type==="html_inline"){const F=String((L=T.tag)!=null?L:"").trim().toLowerCase()||cI(T.content);if(F&&!_.value.has(F)&&dI((B=T.content)!=null?B:T.raw,F)){const W=String((O=(H=T.content)!=null?H:T.raw)!=null?O:"");return{child:{type:"text",content:W,raw:W},component:Xo,isCustomComponent:!1}}}return{child:T,component:M.value[T.type],isCustomComponent:!!(n.value[T.type]&&!Yp(String(T.type)))}})(S);return rn(mt({},D),{index:I,key:`${t.indexKey||"paragraph"}-${I}`,customAttrs:D.isCustomComponent?c5(D.child,a.value):void 0,hasSlotChildren:Array.isArray(D.child.children)&&D.child.children.length>0,slotContent:String((P=D.child.content)!=null?P:""),originalChild:S})}));return(S,I)=>(b(),A("p",Gae,[y.value!==null?(b(),A("span",{key:0,class:"text-node","custom-id":t.customId},N(y.value),9,Yae)):(b(!0),A(Pe,{key:1},pt($.value,P=>{return b(),A(Pe,{key:P.key},[w.value&&g(P.originalChild)?(b(),A(Pe,{key:0},[Ve(N((D=P.originalChild,String((T=D.content)!=null?T:""))),1)],64)):P.isCustomComponent?(b(),me(ys(P.component),Dn({key:1,ref_for:!0},P.customAttrs,{node:P.child,loading:P.child.loading,"index-key":P.key,"custom-id":t.customId,"custom-html-tags":d.value,"is-dark":f.value.isDark}),{default:ke(()=>[P.hasSlotChildren?(b(),me(p(h),Dn({key:0,ref_for:!0},f.value,{nodes:P.child.children,"index-key":P.key,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes","index-key"])):P.slotContent?(b(),me(p(h),Dn({key:1,ref_for:!0},f.value,{content:P.slotContent,final:!P.child.loading,"index-key":`${P.key}-content`,"smooth-streaming":!1,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["content","final","index-key"])):te("",!0)]),_:2},1040,["node","loading","index-key","custom-id","custom-html-tags","is-dark"])):(b(),me(ys(P.component),Dn({key:2,ref_for:!0},x(P.child,P.index)),null,16))],64);var D,T}),128))]))}}),[["__scopeId","data-v-c59ff506"]]);ac.install=e=>{e.component(ac.__name,ac)};const Xae={class:"table-node-wrapper"},Jae=["aria-busy"],Qae={key:0},eue=["custom-id"],tue=["aria-label","onPointerdown"],nue=["custom-id"],oue={key:0,class:"table-node__loading",role:"status","aria-live":"polite"},ep=Kn(tt({__name:"TableNode",props:{node:{},indexKey:{},isDark:{type:Boolean},typewriter:{type:Boolean},fade:{type:Boolean},customId:{},showTooltips:{type:Boolean}},emits:["copy"],setup(e){const t=e,n=R(()=>{var _;return(_=t.node.loading)!=null&&_}),o=R(()=>{var _;return(_=t.node.rows)!=null?_:[]}),s=Z(null),i=Z([]);let r=null;const l=R(()=>t.node.header.cells.length),a=R(()=>i.value.some(_=>Number.isFinite(_)&&_>0)),u=R(()=>a.value?i.value.map(_=>_>0?{width:`${_}px`}:void 0):[]);En("markstreamShowTooltips",R(()=>t.showTooltips)),En("markstreamFade",R(()=>t.fade));const c=fs(()=>t.customId),d=R(()=>!!c.value.text),f=R(()=>!!c.value.paragraph),h=new WeakMap;function g(_){const v=t.fade===!1&&!d.value,k=!f.value,y=h.get(_);if(y?.children===_.children&&y.textFastPath===v&&y.paragraphFastPath===k)return y.info;const x=ug(_.children,k,!0),M={simpleChildren:x,plainText:x&&v?vc(x):null};return h.set(_,{children:_.children,textFastPath:v,paragraphFastPath:k,info:M}),M}function m(_){if(!r)return;_.preventDefault();const v=r.startWidth+r.nextStartWidth,k=Math.min(48,Math.floor(v/2)),y=Math.max(k,Math.min(v-k,Math.round(r.startWidth+_.clientX-r.startX))),x=[...r.widths];x[r.index]=y,x[r.index+1]=v-y,i.value=x}function w(){r&&(window.removeEventListener("pointermove",m),window.removeEventListener("pointerup",w),window.removeEventListener("pointercancel",w),r=null)}return et(l,()=>{w(),i.value=[]}),Un(w),(_,v)=>(b(),A("div",Xae,[C("table",{ref_key:"tableRef",ref:s,class:Re(["table-node",{"table-node--loading":n.value}]),"aria-busy":n.value},[a.value?(b(),A("colgroup",Qae,[(b(!0),A(Pe,null,pt(e.node.header.cells,(k,y)=>(b(),A("col",{key:y,style:Gt(u.value[y])},null,4))),128))])):te("",!0),C("thead",null,[C("tr",null,[(b(!0),A(Pe,null,pt(e.node.header.cells,(k,y)=>(b(),A("th",{key:y,dir:"auto",class:Re([k.align==="right"?"text-right":k.align==="center"?"text-center":"text-left"])},[g(k).plainText!==null?(b(),A("span",{key:0,class:"text-node","custom-id":t.customId},N(g(k).plainText),9,eue)):g(k).simpleChildren?(b(),me(p(Lp),{key:1,nodes:g(k).simpleChildren,"custom-id":t.customId,"index-key":`table-th-${t.indexKey}-${y}`},null,8,["nodes","custom-id","index-key"])):(b(),me(p(Ui),{key:2,nodes:k.children,"index-key":`table-th-${t.indexKey}`,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,"show-tooltips":t.showTooltips,onCopy:v[0]||(v[0]=x=>_.$emit("copy",x))},null,8,["nodes","index-key","custom-id","typewriter","fade","show-tooltips"])),y(function(M,$){if($.button!==0)return;const S=(function(){var D;const T=(D=s.value)==null?void 0:D.querySelectorAll("thead th");return Array.from(T??[],L=>Math.round(L.getBoundingClientRect().width))})(),I=S[M],P=S[M+1];I&&P&&($.preventDefault(),r={index:M,startX:$.clientX,startWidth:I,nextStartWidth:P,widths:S},i.value=S,window.addEventListener("pointermove",m),window.addEventListener("pointerup",w),window.addEventListener("pointercancel",w))})(y,x)},null,40,tue)):te("",!0)],2))),128))])]),C("tbody",null,[(b(!0),A(Pe,null,pt(o.value,(k,y)=>(b(),A("tr",{key:y},[(b(!0),A(Pe,null,pt(k.cells,(x,M)=>(b(),A("td",{key:M,class:Re([x.align==="right"?"text-right":x.align==="center"?"text-center":"text-left"]),dir:"auto"},[g(x).plainText!==null?(b(),A("span",{key:0,class:"text-node","custom-id":t.customId},N(g(x).plainText),9,nue)):g(x).simpleChildren?(b(),me(p(Lp),{key:1,nodes:g(x).simpleChildren,"custom-id":t.customId,"index-key":`table-td-${t.indexKey}-${y}-${M}`},null,8,["nodes","custom-id","index-key"])):(b(),me(p(Ui),{key:2,nodes:x.children,"index-key":`table-td-${t.indexKey}`,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,"show-tooltips":t.showTooltips,onCopy:v[1]||(v[1]=$=>_.$emit("copy",$))},null,8,["nodes","index-key","custom-id","typewriter","fade","show-tooltips"]))],2))),128))]))),128))])],10,Jae),V(as,{name:"table-node-fade"},{default:ke(()=>[n.value?(b(),A("div",oue,[Cn(_.$slots,"loading",{isLoading:n.value},()=>[v[2]||(v[2]=C("span",{class:"table-node__spinner animate-spin","aria-hidden":"true"},null,-1)),v[3]||(v[3]=C("span",{class:"sr-only"},"Loading",-1))],!0)])):te("",!0)]),_:3})]))}}),[["__scopeId","data-v-39f87b5d"]]);ep.install=e=>{e.component(ep.__name,ep)};const sue={class:"hr-node"},nm=Kn({},[["render",function(e,t){return b(),A("hr",sue)}],["__scopeId","data-v-39b2349c"]]);nm.install=e=>{e.component(nm.__name,nm)};const iue={class:"unknown-node"},q3=tt({__name:"FallbackComponent",props:{node:{}},setup:e=>(t,n)=>(b(),A("div",iue,N(e.node.raw),1))}),om=Kn(tt({__name:"VmrContainerNode",props:{node:{},indexKey:{},isDark:{type:Boolean},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},setup(e){const t=e,n=R(()=>`vmr-container vmr-container-${t.node.name}`),o=fs(()=>t.customId),s=R(()=>mt({text:Xo,paragraph:ac,heading:I2,inline_code:ii,link:Si,image:Va,strong:_i,emphasis:Ai,strikethrough:xi,insert:Wi,subscript:zi,superscript:Hi,checkbox:er,checkbox_input:er,hardbreak:qa,math_inline:Jr,reference:wi,list:Kd,math_block:PL,table:ep},o.value));return(i,r)=>(b(),A("div",Dn({class:n.value},e.node.attrs),[(b(!0),A(Pe,null,pt(e.node.children,(l,a)=>{return b(),me(ys((u=l.type,s.value[u]||q3)),{key:`${e.indexKey||"vmr-container"}-${a}`,"custom-id":t.customId,node:l,"index-key":`${e.indexKey||"vmr-container"}-${a}`,typewriter:t.typewriter,fade:t.fade},null,8,["custom-id","node","index-key","typewriter","fade"]);var u}),128))],16))}}),[["__scopeId","data-v-911e41c4"]]);om.install=e=>{e.component(om.__name,om)};const rue=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","ON","ON","ET","ET","ET","ON","ON","ON","ON","ON","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","ON","ET","ET","ET","ET","ON","ON","ON","ON","L","ON","ON","BN","ON","ON","ET","ET","EN","EN","ON","L","ON","ON","ON","EN","L","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L"],n_=[[697,698,"ON"],[706,719,"ON"],[722,735,"ON"],[741,749,"ON"],[751,767,"ON"],[768,879,"NSM"],[884,885,"ON"],[894,894,"ON"],[900,901,"ON"],[903,903,"ON"],[1014,1014,"ON"],[1155,1161,"NSM"],[1418,1418,"ON"],[1421,1422,"ON"],[1423,1423,"ET"],[1424,1424,"R"],[1425,1469,"NSM"],[1470,1470,"R"],[1471,1471,"NSM"],[1472,1472,"R"],[1473,1474,"NSM"],[1475,1475,"R"],[1476,1477,"NSM"],[1478,1478,"R"],[1479,1479,"NSM"],[1480,1535,"R"],[1536,1541,"AN"],[1542,1543,"ON"],[1544,1544,"AL"],[1545,1546,"ET"],[1547,1547,"AL"],[1548,1548,"CS"],[1549,1549,"AL"],[1550,1551,"ON"],[1552,1562,"NSM"],[1563,1610,"AL"],[1611,1631,"NSM"],[1632,1641,"AN"],[1642,1642,"ET"],[1643,1644,"AN"],[1645,1647,"AL"],[1648,1648,"NSM"],[1649,1749,"AL"],[1750,1756,"NSM"],[1757,1757,"AN"],[1758,1758,"ON"],[1759,1764,"NSM"],[1765,1766,"AL"],[1767,1768,"NSM"],[1769,1769,"ON"],[1770,1773,"NSM"],[1774,1775,"AL"],[1776,1785,"EN"],[1786,1808,"AL"],[1809,1809,"NSM"],[1810,1839,"AL"],[1840,1866,"NSM"],[1867,1957,"AL"],[1958,1968,"NSM"],[1969,1983,"AL"],[1984,2026,"R"],[2027,2035,"NSM"],[2036,2037,"R"],[2038,2041,"ON"],[2042,2044,"R"],[2045,2045,"NSM"],[2046,2069,"R"],[2070,2073,"NSM"],[2074,2074,"R"],[2075,2083,"NSM"],[2084,2084,"R"],[2085,2087,"NSM"],[2088,2088,"R"],[2089,2093,"NSM"],[2094,2136,"R"],[2137,2139,"NSM"],[2140,2143,"R"],[2144,2191,"AL"],[2192,2193,"AN"],[2194,2198,"AL"],[2199,2207,"NSM"],[2208,2249,"AL"],[2250,2273,"NSM"],[2274,2274,"AN"],[2275,2306,"NSM"],[2362,2362,"NSM"],[2364,2364,"NSM"],[2369,2376,"NSM"],[2381,2381,"NSM"],[2385,2391,"NSM"],[2402,2403,"NSM"],[2433,2433,"NSM"],[2492,2492,"NSM"],[2497,2500,"NSM"],[2509,2509,"NSM"],[2530,2531,"NSM"],[2546,2547,"ET"],[2555,2555,"ET"],[2558,2558,"NSM"],[2561,2562,"NSM"],[2620,2620,"NSM"],[2625,2626,"NSM"],[2631,2632,"NSM"],[2635,2637,"NSM"],[2641,2641,"NSM"],[2672,2673,"NSM"],[2677,2677,"NSM"],[2689,2690,"NSM"],[2748,2748,"NSM"],[2753,2757,"NSM"],[2759,2760,"NSM"],[2765,2765,"NSM"],[2786,2787,"NSM"],[2801,2801,"ET"],[2810,2815,"NSM"],[2817,2817,"NSM"],[2876,2876,"NSM"],[2879,2879,"NSM"],[2881,2884,"NSM"],[2893,2893,"NSM"],[2901,2902,"NSM"],[2914,2915,"NSM"],[2946,2946,"NSM"],[3008,3008,"NSM"],[3021,3021,"NSM"],[3059,3064,"ON"],[3065,3065,"ET"],[3066,3066,"ON"],[3072,3072,"NSM"],[3076,3076,"NSM"],[3132,3132,"NSM"],[3134,3136,"NSM"],[3142,3144,"NSM"],[3146,3149,"NSM"],[3157,3158,"NSM"],[3170,3171,"NSM"],[3192,3198,"ON"],[3201,3201,"NSM"],[3260,3260,"NSM"],[3276,3277,"NSM"],[3298,3299,"NSM"],[3328,3329,"NSM"],[3387,3388,"NSM"],[3393,3396,"NSM"],[3405,3405,"NSM"],[3426,3427,"NSM"],[3457,3457,"NSM"],[3530,3530,"NSM"],[3538,3540,"NSM"],[3542,3542,"NSM"],[3633,3633,"NSM"],[3636,3642,"NSM"],[3647,3647,"ET"],[3655,3662,"NSM"],[3761,3761,"NSM"],[3764,3772,"NSM"],[3784,3790,"NSM"],[3864,3865,"NSM"],[3893,3893,"NSM"],[3895,3895,"NSM"],[3897,3897,"NSM"],[3898,3901,"ON"],[3953,3966,"NSM"],[3968,3972,"NSM"],[3974,3975,"NSM"],[3981,3991,"NSM"],[3993,4028,"NSM"],[4038,4038,"NSM"],[4141,4144,"NSM"],[4146,4151,"NSM"],[4153,4154,"NSM"],[4157,4158,"NSM"],[4184,4185,"NSM"],[4190,4192,"NSM"],[4209,4212,"NSM"],[4226,4226,"NSM"],[4229,4230,"NSM"],[4237,4237,"NSM"],[4253,4253,"NSM"],[4957,4959,"NSM"],[5008,5017,"ON"],[5120,5120,"ON"],[5760,5760,"WS"],[5787,5788,"ON"],[5906,5908,"NSM"],[5938,5939,"NSM"],[5970,5971,"NSM"],[6002,6003,"NSM"],[6068,6069,"NSM"],[6071,6077,"NSM"],[6086,6086,"NSM"],[6089,6099,"NSM"],[6107,6107,"ET"],[6109,6109,"NSM"],[6128,6137,"ON"],[6144,6154,"ON"],[6155,6157,"NSM"],[6158,6158,"BN"],[6159,6159,"NSM"],[6277,6278,"NSM"],[6313,6313,"NSM"],[6432,6434,"NSM"],[6439,6440,"NSM"],[6450,6450,"NSM"],[6457,6459,"NSM"],[6464,6464,"ON"],[6468,6469,"ON"],[6622,6655,"ON"],[6679,6680,"NSM"],[6683,6683,"NSM"],[6742,6742,"NSM"],[6744,6750,"NSM"],[6752,6752,"NSM"],[6754,6754,"NSM"],[6757,6764,"NSM"],[6771,6780,"NSM"],[6783,6783,"NSM"],[6832,6877,"NSM"],[6880,6891,"NSM"],[6912,6915,"NSM"],[6964,6964,"NSM"],[6966,6970,"NSM"],[6972,6972,"NSM"],[6978,6978,"NSM"],[7019,7027,"NSM"],[7040,7041,"NSM"],[7074,7077,"NSM"],[7080,7081,"NSM"],[7083,7085,"NSM"],[7142,7142,"NSM"],[7144,7145,"NSM"],[7149,7149,"NSM"],[7151,7153,"NSM"],[7212,7219,"NSM"],[7222,7223,"NSM"],[7376,7378,"NSM"],[7380,7392,"NSM"],[7394,7400,"NSM"],[7405,7405,"NSM"],[7412,7412,"NSM"],[7416,7417,"NSM"],[7616,7679,"NSM"],[8125,8125,"ON"],[8127,8129,"ON"],[8141,8143,"ON"],[8157,8159,"ON"],[8173,8175,"ON"],[8189,8190,"ON"],[8192,8202,"WS"],[8203,8205,"BN"],[8207,8207,"R"],[8208,8231,"ON"],[8232,8232,"WS"],[8233,8233,"B"],[8234,8238,"BN"],[8239,8239,"CS"],[8240,8244,"ET"],[8245,8259,"ON"],[8260,8260,"CS"],[8261,8286,"ON"],[8287,8287,"WS"],[8288,8303,"BN"],[8304,8304,"EN"],[8308,8313,"EN"],[8314,8315,"ES"],[8316,8318,"ON"],[8320,8329,"EN"],[8330,8331,"ES"],[8332,8334,"ON"],[8352,8399,"ET"],[8400,8432,"NSM"],[8448,8449,"ON"],[8451,8454,"ON"],[8456,8457,"ON"],[8468,8468,"ON"],[8470,8472,"ON"],[8478,8483,"ON"],[8485,8485,"ON"],[8487,8487,"ON"],[8489,8489,"ON"],[8494,8494,"ET"],[8506,8507,"ON"],[8512,8516,"ON"],[8522,8525,"ON"],[8528,8543,"ON"],[8585,8587,"ON"],[8592,8721,"ON"],[8722,8722,"ES"],[8723,8723,"ET"],[8724,9013,"ON"],[9083,9108,"ON"],[9110,9257,"ON"],[9280,9290,"ON"],[9312,9351,"ON"],[9352,9371,"EN"],[9450,9899,"ON"],[9901,10239,"ON"],[10496,11123,"ON"],[11126,11263,"ON"],[11493,11498,"ON"],[11503,11505,"NSM"],[11513,11519,"ON"],[11647,11647,"NSM"],[11744,11775,"NSM"],[11776,11869,"ON"],[11904,11929,"ON"],[11931,12019,"ON"],[12032,12245,"ON"],[12272,12287,"ON"],[12288,12288,"WS"],[12289,12292,"ON"],[12296,12320,"ON"],[12330,12333,"NSM"],[12336,12336,"ON"],[12342,12343,"ON"],[12349,12351,"ON"],[12441,12442,"NSM"],[12443,12444,"ON"],[12448,12448,"ON"],[12539,12539,"ON"],[12736,12773,"ON"],[12783,12783,"ON"],[12829,12830,"ON"],[12880,12895,"ON"],[12924,12926,"ON"],[12977,12991,"ON"],[13004,13007,"ON"],[13175,13178,"ON"],[13278,13279,"ON"],[13311,13311,"ON"],[19904,19967,"ON"],[42128,42182,"ON"],[42509,42511,"ON"],[42607,42610,"NSM"],[42611,42611,"ON"],[42612,42621,"NSM"],[42622,42623,"ON"],[42654,42655,"NSM"],[42736,42737,"NSM"],[42752,42785,"ON"],[42888,42888,"ON"],[43010,43010,"NSM"],[43014,43014,"NSM"],[43019,43019,"NSM"],[43045,43046,"NSM"],[43048,43051,"ON"],[43052,43052,"NSM"],[43064,43065,"ET"],[43124,43127,"ON"],[43204,43205,"NSM"],[43232,43249,"NSM"],[43263,43263,"NSM"],[43302,43309,"NSM"],[43335,43345,"NSM"],[43392,43394,"NSM"],[43443,43443,"NSM"],[43446,43449,"NSM"],[43452,43453,"NSM"],[43493,43493,"NSM"],[43561,43566,"NSM"],[43569,43570,"NSM"],[43573,43574,"NSM"],[43587,43587,"NSM"],[43596,43596,"NSM"],[43644,43644,"NSM"],[43696,43696,"NSM"],[43698,43700,"NSM"],[43703,43704,"NSM"],[43710,43711,"NSM"],[43713,43713,"NSM"],[43756,43757,"NSM"],[43766,43766,"NSM"],[43882,43883,"ON"],[44005,44005,"NSM"],[44008,44008,"NSM"],[44013,44013,"NSM"],[64285,64285,"R"],[64286,64286,"NSM"],[64287,64296,"R"],[64297,64297,"ES"],[64298,64335,"R"],[64336,64450,"AL"],[64451,64466,"ON"],[64467,64829,"AL"],[64830,64847,"ON"],[64848,64911,"AL"],[64912,64913,"ON"],[64914,64967,"AL"],[64968,64975,"ON"],[64976,65007,"BN"],[65008,65020,"AL"],[65021,65023,"ON"],[65024,65039,"NSM"],[65040,65049,"ON"],[65056,65071,"NSM"],[65072,65103,"ON"],[65104,65104,"CS"],[65105,65105,"ON"],[65106,65106,"CS"],[65108,65108,"ON"],[65109,65109,"CS"],[65110,65118,"ON"],[65119,65119,"ET"],[65120,65121,"ON"],[65122,65123,"ES"],[65124,65126,"ON"],[65128,65128,"ON"],[65129,65130,"ET"],[65131,65131,"ON"],[65136,65278,"AL"],[65279,65279,"BN"],[65281,65282,"ON"],[65283,65285,"ET"],[65286,65290,"ON"],[65291,65291,"ES"],[65292,65292,"CS"],[65293,65293,"ES"],[65294,65295,"CS"],[65296,65305,"EN"],[65306,65306,"CS"],[65307,65312,"ON"],[65339,65344,"ON"],[65371,65381,"ON"],[65504,65505,"ET"],[65506,65508,"ON"],[65509,65510,"ET"],[65512,65518,"ON"],[65520,65528,"BN"],[65529,65533,"ON"],[65534,65535,"BN"],[65793,65793,"ON"],[65856,65932,"ON"],[65936,65948,"ON"],[65952,65952,"ON"],[66045,66045,"NSM"],[66272,66272,"NSM"],[66273,66299,"EN"],[66422,66426,"NSM"],[67584,67870,"R"],[67871,67871,"ON"],[67872,68096,"R"],[68097,68099,"NSM"],[68100,68100,"R"],[68101,68102,"NSM"],[68103,68107,"R"],[68108,68111,"NSM"],[68112,68151,"R"],[68152,68154,"NSM"],[68155,68158,"R"],[68159,68159,"NSM"],[68160,68324,"R"],[68325,68326,"NSM"],[68327,68408,"R"],[68409,68415,"ON"],[68416,68863,"R"],[68864,68899,"AL"],[68900,68903,"NSM"],[68904,68911,"AL"],[68912,68921,"AN"],[68922,68927,"AL"],[68928,68937,"AN"],[68938,68968,"R"],[68969,68973,"NSM"],[68974,68974,"ON"],[68975,69215,"R"],[69216,69246,"AN"],[69247,69290,"R"],[69291,69292,"NSM"],[69293,69311,"R"],[69312,69327,"AL"],[69328,69336,"ON"],[69337,69369,"AL"],[69370,69375,"NSM"],[69376,69423,"R"],[69424,69445,"AL"],[69446,69456,"NSM"],[69457,69487,"AL"],[69488,69505,"R"],[69506,69509,"NSM"],[69510,69631,"R"],[69633,69633,"NSM"],[69688,69702,"NSM"],[69714,69733,"ON"],[69744,69744,"NSM"],[69747,69748,"NSM"],[69759,69761,"NSM"],[69811,69814,"NSM"],[69817,69818,"NSM"],[69826,69826,"NSM"],[69888,69890,"NSM"],[69927,69931,"NSM"],[69933,69940,"NSM"],[70003,70003,"NSM"],[70016,70017,"NSM"],[70070,70078,"NSM"],[70089,70092,"NSM"],[70095,70095,"NSM"],[70191,70193,"NSM"],[70196,70196,"NSM"],[70198,70199,"NSM"],[70206,70206,"NSM"],[70209,70209,"NSM"],[70367,70367,"NSM"],[70371,70378,"NSM"],[70400,70401,"NSM"],[70459,70460,"NSM"],[70464,70464,"NSM"],[70502,70508,"NSM"],[70512,70516,"NSM"],[70587,70592,"NSM"],[70606,70606,"NSM"],[70608,70608,"NSM"],[70610,70610,"NSM"],[70625,70626,"NSM"],[70712,70719,"NSM"],[70722,70724,"NSM"],[70726,70726,"NSM"],[70750,70750,"NSM"],[70835,70840,"NSM"],[70842,70842,"NSM"],[70847,70848,"NSM"],[70850,70851,"NSM"],[71090,71093,"NSM"],[71100,71101,"NSM"],[71103,71104,"NSM"],[71132,71133,"NSM"],[71219,71226,"NSM"],[71229,71229,"NSM"],[71231,71232,"NSM"],[71264,71276,"ON"],[71339,71339,"NSM"],[71341,71341,"NSM"],[71344,71349,"NSM"],[71351,71351,"NSM"],[71453,71453,"NSM"],[71455,71455,"NSM"],[71458,71461,"NSM"],[71463,71467,"NSM"],[71727,71735,"NSM"],[71737,71738,"NSM"],[71995,71996,"NSM"],[71998,71998,"NSM"],[72003,72003,"NSM"],[72148,72151,"NSM"],[72154,72155,"NSM"],[72160,72160,"NSM"],[72193,72198,"NSM"],[72201,72202,"NSM"],[72243,72248,"NSM"],[72251,72254,"NSM"],[72263,72263,"NSM"],[72273,72278,"NSM"],[72281,72283,"NSM"],[72330,72342,"NSM"],[72344,72345,"NSM"],[72544,72544,"NSM"],[72546,72548,"NSM"],[72550,72550,"NSM"],[72752,72758,"NSM"],[72760,72765,"NSM"],[72850,72871,"NSM"],[72874,72880,"NSM"],[72882,72883,"NSM"],[72885,72886,"NSM"],[73009,73014,"NSM"],[73018,73018,"NSM"],[73020,73021,"NSM"],[73023,73029,"NSM"],[73031,73031,"NSM"],[73104,73105,"NSM"],[73109,73109,"NSM"],[73111,73111,"NSM"],[73459,73460,"NSM"],[73472,73473,"NSM"],[73526,73530,"NSM"],[73536,73536,"NSM"],[73538,73538,"NSM"],[73562,73562,"NSM"],[73685,73692,"ON"],[73693,73696,"ET"],[73697,73713,"ON"],[78912,78912,"NSM"],[78919,78933,"NSM"],[90398,90409,"NSM"],[90413,90415,"NSM"],[92912,92916,"NSM"],[92976,92982,"NSM"],[94031,94031,"NSM"],[94095,94098,"NSM"],[94178,94178,"ON"],[94180,94180,"NSM"],[113821,113822,"NSM"],[113824,113827,"BN"],[117760,117973,"ON"],[118e3,118009,"EN"],[118010,118012,"ON"],[118016,118451,"ON"],[118458,118480,"ON"],[118496,118512,"ON"],[118528,118573,"NSM"],[118576,118598,"NSM"],[119143,119145,"NSM"],[119155,119162,"BN"],[119163,119170,"NSM"],[119173,119179,"NSM"],[119210,119213,"NSM"],[119273,119274,"ON"],[119296,119361,"ON"],[119362,119364,"NSM"],[119365,119365,"ON"],[119552,119638,"ON"],[120513,120513,"ON"],[120539,120539,"ON"],[120571,120571,"ON"],[120597,120597,"ON"],[120629,120629,"ON"],[120655,120655,"ON"],[120687,120687,"ON"],[120713,120713,"ON"],[120745,120745,"ON"],[120771,120771,"ON"],[120782,120831,"EN"],[121344,121398,"NSM"],[121403,121452,"NSM"],[121461,121461,"NSM"],[121476,121476,"NSM"],[121499,121503,"NSM"],[121505,121519,"NSM"],[122880,122886,"NSM"],[122888,122904,"NSM"],[122907,122913,"NSM"],[122915,122916,"NSM"],[122918,122922,"NSM"],[123023,123023,"NSM"],[123184,123190,"NSM"],[123566,123566,"NSM"],[123628,123631,"NSM"],[123647,123647,"ET"],[124140,124143,"NSM"],[124398,124399,"NSM"],[124643,124643,"NSM"],[124646,124646,"NSM"],[124654,124655,"NSM"],[124661,124661,"NSM"],[124928,125135,"R"],[125136,125142,"NSM"],[125143,125251,"R"],[125252,125258,"NSM"],[125259,126063,"R"],[126064,126143,"AL"],[126144,126207,"R"],[126208,126287,"AL"],[126288,126463,"R"],[126464,126703,"AL"],[126704,126705,"ON"],[126706,126719,"AL"],[126720,126975,"R"],[126976,127019,"ON"],[127024,127123,"ON"],[127136,127150,"ON"],[127153,127167,"ON"],[127169,127183,"ON"],[127185,127221,"ON"],[127232,127242,"EN"],[127243,127247,"ON"],[127279,127279,"ON"],[127338,127343,"ON"],[127405,127405,"ON"],[127584,127589,"ON"],[127744,128728,"ON"],[128732,128748,"ON"],[128752,128764,"ON"],[128768,128985,"ON"],[128992,129003,"ON"],[129008,129008,"ON"],[129024,129035,"ON"],[129040,129095,"ON"],[129104,129113,"ON"],[129120,129159,"ON"],[129168,129197,"ON"],[129200,129211,"ON"],[129216,129217,"ON"],[129232,129240,"ON"],[129280,129623,"ON"],[129632,129645,"ON"],[129648,129660,"ON"],[129664,129674,"ON"],[129678,129734,"ON"],[129736,129736,"ON"],[129741,129756,"ON"],[129759,129770,"ON"],[129775,129784,"ON"],[129792,129938,"ON"],[129940,130031,"ON"],[130032,130041,"EN"],[130042,130042,"ON"],[131070,131071,"BN"],[196606,196607,"BN"],[262142,262143,"BN"],[327678,327679,"BN"],[393214,393215,"BN"],[458750,458751,"BN"],[524286,524287,"BN"],[589822,589823,"BN"],[655358,655359,"BN"],[720894,720895,"BN"],[786430,786431,"BN"],[851966,851967,"BN"],[917502,917759,"BN"],[917760,917999,"NSM"],[918e3,921599,"BN"],[983038,983039,"BN"],[1048574,1048575,"BN"],[1114110,1114111,"BN"]];function lue(e){if(e<=255)return rue[e];let t=0,n=n_.length-1;for(;t<=n;){const o=t+n>>1,s=n_[o];if(es[1]))return s[2];t=o+1}}return"L"}const aue=/[ \t\n\r\f]+/g,uue=/[\t\n\r\f]| {2,}|^ | $/;let Y9=null;const cue=new RegExp("\\p{Script=Arabic}","u"),ou=new RegExp("\\p{M}","u"),m5=new RegExp("\\p{Nd}","u");function o_(e){return cue.test(e)}function s_(e){return e>=19968&&e<=40959||e>=13312&&e<=19903||e>=131072&&e<=173791||e>=173824&&e<=177983||e>=177984&&e<=178207||e>=178208&&e<=183983||e>=183984&&e<=191471||e>=191472&&e<=192093||e>=194560&&e<=195103||e>=196608&&e<=201551||e>=201552&&e<=205743||e>=205744&&e<=210041||e>=63744&&e<=64255||e>=12288&&e<=12351||e>=12352&&e<=12447||e>=12448&&e<=12543||e>=12592&&e<=12687||e>=44032&&e<=55215||e>=65280&&e<=65519}function vl(e){for(let t=0;t=55296&&n<=56319&&t+1=56320&&o<=57343){if(s_(o-56320+(n-55296<<10)+65536))return!0;t++;continue}}if(s_(n))return!0}}return!1}const due=new Set([" "," ","⁠","\uFEFF"]),fue=new Set(["-","‐","–","—"]);function DL(e,t){return!((function(n){const o=tp(n);return o!==null&&due.has(o)})(e)||t&&((function(n){const o=tp(n);return o!==null&&(g5.has(o)||yc.has(o))})(e)||(function(n){const o=tp(n);return o!==null&&fue.has(o)})(e)))}const g5=new Set([",",".","!",":",";","?","、","。","・",")","〕","〉","》","」","』","】","〗","〙","〛","ー","々","〻","ゝ","ゞ","ヽ","ヾ"]),L2=new Set(['"',"(","[","{","¡","¿","“","‘","‚","„","«","‹","⸘","(","〔","〈","《","「","『","【","〖","〘","〚"]),v5=new Set(["'","’"]),yc=new Set([".",",","!","?",":",";","،","؛","؟","।","॥","၊","။","၌","၍","၏",")","]","}","%",'"',"”","’","»","›","…"]),pue=new Set([":",".","،","؛"]),hue=new Set(["၏"]),mue=new Set(["”","’","»","›","」","』","】","》","〉","〕",")"]);function gue(e){if(y5(e))return!0;let t=!1;for(const n of e)if(yc.has(n)||dg(n))t=!0;else if(!t||!ou.test(n))return!1;return t}function vue(e){for(const t of e)if(!g5.has(t)&&!yc.has(t))return!1;return e.length>0}function yue(e){if(y5(e))return!0;for(const t of e)if(!(L2.has(t)||v5.has(t)||ou.test(t)||dg(t)))return!1;return e.length>0}function y5(e){let t=!1;for(const n of e)if(n!=="\\"&&!ou.test(n)){if(!(L2.has(n)||yc.has(n)||v5.has(n)))return!1;t=!0}return t}function cg(e,t){const n=t-1;if(n<=0)return Math.max(n,0);const o=e.charCodeAt(n);if(o<56320||o>57343)return n;const s=n-1;if(s<0)return n;const i=e.charCodeAt(s);return i>=55296&&i<=56319?s:n}function tp(e){if(e.length===0)return null;const t=cg(e,e.length);return e.slice(t)}const kue=[36,37,43,43,92,92,162,165,176,177,1423,1423,1545,1547,1642,1642,2046,2047,2546,2547,2553,2555,2801,2801,3065,3065,3449,3449,3647,3647,6107,6107,8240,8247,8279,8279,8352,8399,8451,8451,8457,8457,8470,8470,8722,8723,43064,43064,65020,65020,65129,65130,65284,65285,65504,65505,65509,65510,73693,73696,123647,123647,126124,126124,126128,126128];function dg(e){const t=e.codePointAt(0);return t!==void 0&&(function(n,o){for(let s=0;s=o[s]&&n<=o[s+1])return!0;return!1})(t,kue)}function bue(e){const t=(function(n){for(const o of n)if(!ou.test(o))return o;return null})(e);return t!==null&&m5.test(t)}function Cue(e){const t=Array.from(e);let n=t.length;for(;n>0;){const o=t[n-1];if(ou.test(o))n--;else{if(!L2.has(o)&&!v5.has(o))break;n--}}return n<=0||n===t.length?null:{head:t.slice(0,n).join(""),tail:t.slice(n).join("")}}function wue(e,t,n){return n!=="text"||t||e.length!==1||e==="-"||e==="—"?null:e}function i_(e,t,n,o){const s=t[o],i=e[o];if(s==null)return i;const r=n[o];if(i.length===r)return i;const l=s.repeat(r);return e[o]=l,l}function r_(e,t){return e&&t!==null&&pue.has(t)}function _ue(e){const t=tp(e);return t!==null&&hue.has(t)}function xue(e){if(e.length<2||e[0]!==" ")return null;const t=e.slice(1);return new RegExp("^\\p{M}+$","u").test(t)?{space:" ",marks:t}:null}function K3(e){let t=e.length;for(;t>0;){const n=cg(e,t),o=e.slice(n,t);if(mue.has(o))return!0;if(!yc.has(o))return!1;t=n}return!1}function Sue(e,t){if(t.preserveOrdinarySpaces||t.preserveHardBreaks){if(e===" ")return"preserved-space";if(e===" ")return"tab";if(t.preserveHardBreaks&&e===` +`)return"hard-break"}return e===" "?"space":e===" "||e===" "||e==="⁠"||e==="\uFEFF"?"glue":e==="​"?"zero-width-break":e==="­"?"soft-hyphen":"text"}const Aue=/[\x20\t\n\xA0\xAD\u200B\u202F\u2060\uFEFF]/;function Or(e){return e.length===1?e[0]:e.join("")}function Mue(e,t){const n=[];for(let o=e.length-1;o>=0;o--)n.push(e[o]);return n.push(t),Or(n)}function Tue(e,t,n,o){if(!Aue.test(e))return[{text:e,isWordLike:t,kind:"text",start:n}];const s=[];let i=null,r=[],l=n,a=!1,u=0;for(const c of e){const d=Sue(c,o),f=d==="text"&&t;i===null||d!==i||f!==a?(i!==null&&s.push({text:Or(r),isWordLike:a,kind:i,start:l}),i=d,r=[c],l=n+u,a=f,u+=c.length):(r.push(c),u+=c.length)}return i!==null&&s.push({text:Or(r),isWordLike:a,kind:i,start:l}),s}function X9(e){return e==="space"||e==="preserved-space"||e==="zero-width-break"||e==="hard-break"}const Eue=/^[A-Za-z][A-Za-z0-9+.-]*:$/;function Iue(e,t){const n=e.texts[t];return!!n.startsWith("www.")||Eue.test(n)&&t+1=33&&n<=47&&n!==45||n>=58&&n<=64&&n!==63||n>=91&&n<=96||n>=123&&n<=126})(t):!Rue.has(e)&&!Fue.test(e)&&Nue.test(e)}function l_(e){let t=!1;for(const n of e)if(!ou.test(n)){if(!BL(n))return!1;t=!0}return t}function Oue(e,t,n,o){const s=!t&&l_(e),i=!o&&l_(n),r=(function(a){const u=(function(c){for(let d=c.length;d>0;){const f=cg(c,d),h=c.slice(f,d);if(!ou.test(h))return h;d=f}return null})(a);return u!==null&&dg(u)})(e),l=(t||r)&&(function(a){for(let u=a.length;u>0;){const c=cg(a,u),d=a.slice(c,u);if(!ou.test(d))return BL(d)||dg(d);u=c}return!1})(e);return!!(s||i||l)&&!vl(e)&&!vl(n)&&(t||s||r)&&(o||i)}function a_(e){for(const t of e)if(m5.test(t))return!0;return!1}function sm(e){if(e.length===0)return!1;for(const t of e)if(!m5.test(t)&&!$ue.has(t))return!1;return!0}function Pue(e,t){if(e.len===0)return[];if(!t.preserveHardBreaks)return[{startSegmentIndex:0,endSegmentIndex:e.len,consumedEndSegmentIndex:e.len}];const n=[];let o=0;for(let s=0;s0&&u.charCodeAt(u.length-1)===32&&(u=u.slice(0,-1)),u})(e);if(i.length===0)return{normalized:i,chunks:[],len:0,texts:[],isWordLike:[],kinds:[],starts:[]};const r=(function(a,u,c){var d,f,h;const g=(Y9===null&&(Y9=new Intl.Segmenter(void 0,{granularity:"word"})),Y9);let m=0;const w=[],_=[],v=[],k=[],y=[],x=[],M=[],$=[],S=[],I=[],P=[],D=[];for(const O of g.segment(a))for(const F of Tue(O.segment,(d=O.isWordLike)!=null&&d,O.index,c)){let W=function(){x[le]!==null&&(_[le]=[i_(w,x,M,le)],x[le]=null),_[le].push(F.text),v[le]=v[le]||F.isWordLike,$[le]=$[le]||q,S[le]=S[le]||K,I[le]=ne,P[le]=Y,D[le]=r_(S[le],ie)};const z=F.kind==="text",U=wue(F.text,F.isWordLike,F.kind),q=vl(F.text),K=o_(F.text),ie=tp(F.text),ne=K3(F.text),Y=_ue(F.text),le=m-1;u.carryCJKAfterClosingQuote&&z&&m>0&&k[le]==="text"&&q&&$[le]&&I[le]||z&&m>0&&k[le]==="text"&&vue(F.text)&&$[le]||z&&m>0&&k[le]==="text"&&P[le]?W():z&&m>0&&k[le]==="text"&&F.isWordLike&&K&&D[le]?(W(),v[le]=!0):U!==null&&m>0&&k[le]==="text"&&x[le]===U?M[le]=((f=M[le])!=null?f:1)+1:z&&!F.isWordLike&&m>0&&k[le]==="text"&&!$[le]&&(gue(F.text)||F.text==="-"&&v[le])?W():(w[m]=F.text,_[m]=[F.text],v[m]=F.isWordLike,k[m]=F.kind,y[m]=F.start,x[m]=U,M[m]=U===null?0:1,$[m]=q,S[m]=K,I[m]=ne,P[m]=Y,D[m]=r_(K,ie),m++)}for(let O=0;Onull);let L=-1;for(let O=m-1;O>=0;O--){const F=w[O];if(F.length!==0){if(k[O]==="text"&&!v[O]&&L>=0&&k[L]==="text"&&(yue(F)||F==="-"&&bue(w[L]))){const W=(h=T[L])!=null?h:[];W.push(F),T[L]=W,y[L]=y[O],w[O]="";continue}L=O}}for(let O=0;Oq+1){F.push(Or(Y)),W.push(Ee),z.push("text"),U.push(O.starts[q]),q=le;continue}}F.push(K),W.push(ne),z.push(ie),U.push(O.starts[q]),q++}return{len:F.length,texts:F,isWordLike:W,kinds:z,starts:U}})((function(O){const F=[],W=[],z=[],U=[];for(let q=0;q1;for(let Y=0;Y=O.len||X9(O.kinds[ie]))continue;const ne=[],Y=O.starts[ie];let le=ie;for(;le0&&(F.push(Or(ne)),W.push(!0),z.push("text"),U.push(Y),q=le-1)}return{len:F.length,texts:F,isWordLike:W,kinds:z,starts:U}})((function(O){const F=O.texts.slice(),W=O.isWordLike.slice(),z=O.kinds.slice(),U=O.starts.slice();for(let K=0;K=0&&!DL(u.texts[k-1],c)&&v(k),m<0&&(m=k),w=w||vl(y))}return v(u.len),{len:d.length,texts:d,isWordLike:f,kinds:h,starts:g}})(i,r,t.breakKeepAllAfterPunctuation):r;return mt({normalized:i,chunks:Pue(l,s)},l)}let ad=null;const u_=new Map;let ud=null;const Bue=new RegExp("\\p{Emoji_Presentation}","u"),Hue=/[\p{Emoji_Presentation}\p{Extended_Pictographic}\p{Regional_Indicator}\uFE0F\u20E3]/u;let J9=null;const c_=new Map;function Z3(){if(ad!==null)return ad;if(typeof OffscreenCanvas<"u")return ad=new OffscreenCanvas(1,1).getContext("2d"),ad;if(typeof document<"u")return ad=document.createElement("canvas").getContext("2d"),ad;throw new Error("Text measurement requires OffscreenCanvas or a DOM canvas context.")}function xa(e,t){let n=t.get(e);return n===void 0&&(n={width:Z3().measureText(e).width,containsCJK:vl(e)},t.set(e,n)),n}function fg(){if(ud!==null)return ud;if(typeof navigator>"u")return ud={lineFitEpsilon:.005,carryCJKAfterClosingQuote:!1,breakKeepAllAfterPunctuation:!0,preferPrefixWidthsForBreakableRuns:!1,preferEarlySoftHyphenBreak:!1},ud;const e=navigator.userAgent,t=navigator.vendor==="Apple Computer, Inc."&&e.includes("Safari/")&&!e.includes("Chrome/")&&!e.includes("Chromium/")&&!e.includes("CriOS/")&&!e.includes("FxiOS/")&&!e.includes("EdgiOS/"),n=e.includes("Chrome/")||e.includes("Chromium/")||e.includes("CriOS/")||e.includes("Edg/");return ud={lineFitEpsilon:t?1/64:.005,carryCJKAfterClosingQuote:n,breakKeepAllAfterPunctuation:!t,preferPrefixWidthsForBreakableRuns:t,preferEarlySoftHyphenBreak:t},ud}function HL(){return J9===null&&(J9=new Intl.Segmenter(void 0,{granularity:"grapheme"})),J9}function zue(e){return Bue.test(e)||e.includes("️")}function Fu(e,t,n){return n===0?t.width:t.width-(function(o,s){return s.emojiCount===void 0&&(s.emojiCount=(function(i){let r=0;const l=HL();for(const a of l.segment(i))zue(a.segment)&&r++;return r})(o)),s.emojiCount})(e,t)*n}function Wue(e){return e==="space"||e==="zero-width-break"||e==="soft-hyphen"}function d_(e){return e==="space"||e==="preserved-space"||e==="tab"||e==="zero-width-break"||e==="soft-hyphen"}function f_(e,t,n=e.widths.length){for(;t0?e.letterSpacing:0}function k5(e,t){return t===0?0:e+t}function Vue(e,t,n,o,s){return k5(o,t==="tab"?s+(function(i,r){return i.letterSpacing!==0&&i.spacingGraphemeCounts[r]>0?i.letterSpacing:0})(e,n):e.lineEndFitAdvances[n])}function p_(e,t,n,o){return k5(o,t==="tab"?0:e.lineEndFitAdvances[n])}function h_(e,t,n,o,s){return k5(o,t==="tab"?s:e.lineEndPaintAdvances[n])}function que(e,t,n){return e.letterSpacing!==0&&t?n+e.letterSpacing:n}function Kue(e,t){return e.letterSpacing===0?t:t+e.letterSpacing}function Ch(e,t,n){let o=t;for(;oW){if(Ce!==null&&Q>G){le(ve,Q,ee),ce=Q,ge=Ch(Ce,ge,ce+1),Q=-1,ee=0;continue}le(),de(ve,ce,ue)}else U+=ue,K=ve,ie=ce+1;else de(ve,ce,ue);const Se=ce+1;Ce!==null&&Ce[ge]===Se&&(Q=Se,ee=U,ge++),ce++}q&&K===ve&&ie===fe.length&&(K=ve+1,ie=0)}let oe=0;for(;oe=B.length)));){const ve=B[oe],G=d_(H[oe]);if(q)if(U+ve>W){if(G){he(oe,ve),le(oe+1,0,U-ve),oe++;continue}if(ne>=0){if(K>ne||K===ne&&ie>0){le();continue}le(ne,0,Y);continue}if(ve>W&&O[oe]!==null){le(),pe(oe,0),oe++;continue}le()}else he(oe,ve),G&&(ne=oe+1,Y=U-ve),oe++;else ve>W&&O[oe]!==null?pe(oe,0):Ee(oe,ve),G&&(ne=oe+1,Y=U-ve),oe++}return q&&le(),z})(n,o);const{widths:s,kinds:i,breakableFitAdvances:r,breakablePreferredBreaks:l,discretionaryHyphenWidth:a,chunks:u}=n;if(s.length===0||u.length===0)return 0;const c=fg(),d=o+c.lineFitEpsilon;let f=0,h=0,g=!1,m=0,w=0,_=-1,v=0,k=null;function y(){_=-1,v=0,k=null}function x(T=m,L=w,B){f++,h=0,g=!1,y()}function M(T,L){g=!0,m=T+1,w=0,h=L}function $(T,L,B){g=!0,m=T,w=L+1,h=B}function S(T,L){g?(h+=L,m=T+1,w=0):M(T,L)}function I(T,L,B,H,O,F){if(!L)return;const W=p_(n,T,B,O);h_(n,T,B,O,H),_=B+1,v=h-F+W,k=T}function P(T,L){var B;const H=r[T],O=(B=l[T])!=null?B:null;let F=O===null?-1:Ch(O,0,L+1),W=-1,z=L;for(;zd){if(O!==null&&W>L){x(T,W),z=W,F=Ch(O,F,z+1),W=-1;continue}x(),$(T,z,U)}else h=ie,m=T,w=z+1}else $(T,z,U);const q=z+1;O!==null&&O[F]===q&&(W=q,F++),z++}g&&m===T&&w===H.length&&(m=T+1,w=0)}function D(T){f++,y()}for(let T=0;T=L.endSegmentIndex)));){const H=i[B],O=d_(H),F=jue(n,g,B),W=H==="tab"?Uue(h+F,n.tabStopAdvance):s[B],z=F+W,U=Vue(n,H,B,F,W);if(H!=="soft-hyphen")if(g){if(h+U>d){const q=h+p_(n,H,B,F);if(h_(n,H,B,F,W),k==="soft-hyphen"&&c.preferEarlySoftHyphenBreak&&v<=d){x(_,0);continue}if(O&&q<=d){S(B,z),x(B+1,0),B++;continue}if(_>=0&&v<=d){if(m>_||m===_&&w>0){x();continue}const K=_;x(K,0),B=K;continue}if(U>d&&r[B]!==null){x(),P(B,0),B++;continue}x();continue}S(B,z),I(H,O,B,W,F,z),B++}else U>d&&r[B]!==null?P(B,0):M(B,W),I(H,O,B,W,F,z),B++;else g&&(m=B+1,w=0,_=B+1,v=h+a,k=H),B++}g&&(L.consumedEndSegmentIndex,x(L.consumedEndSegmentIndex,0))}return f})(e,t)}let Q9=null;function b5(){return Q9===null&&(Q9=new Intl.Segmenter(void 0,{granularity:"grapheme"})),Q9}function Gue(e,t){const n=[];let o=[],s=0,i=!1,r=!1,l=!1;function a(){o.length!==0&&(n.push({text:o.length===1?o[0]:o.join(""),start:s}),o=[],i=!1,r=!1,l=!1)}function u(d,f,h){o=[d],s=f,i=h,r=K3(d),l=L2.has(d)}function c(d,f){o.push(d),i=i||f;const h=K3(d);r=d.length===1&&yc.has(d)&&r||h,l=!1}for(const d of b5().segment(e)){const f=d.segment,h=vl(f);o.length!==0?l||g5.has(f)||yc.has(f)||t.carryCJKAfterClosingQuote&&h&&r?c(f,h):i||h?(a(),u(f,d.index,h)):c(f,h):u(f,d.index,h)}return a(),n}function Yue(e,t,n){if(t.length<=1)return t;const o=[];let s=-1,i=!1;function r(l){if(!(s<0)){if(i)s+1===l?o.push(t[s]):(function(a,u){const c=t[a].start,d=u=0&&!DL(t[l-1].text,n)&&r(l),s<0&&(s=l),i=i||vl(a.text)}return r(t.length),o}function m_(e,t){if(t==="zero-width-break"||t==="soft-hyphen"||t==="hard-break")return 0;if(t==="tab")return 1;let n=0;const o=b5();for(const s of o.segment(e))n++;return n}function Xue(e){return e==="-"||e==="֊"||e==="‐"||e==="‒"||e==="–"||e==="—"}function Jue(e,t,n,o,s){const i=fg(),{cache:r,emojiCorrection:l}=(function(D,T){Z3().font=D;const L=(function(O){let F=u_.get(O);return F||(F=new Map,u_.set(O,F)),F})(D),B=(function(O){const F=O.match(/(\d+(?:\.\d+)?)\s*px/);return F?parseFloat(F[1]):16})(D),H=T?(function(O,F){let W=c_.get(O);if(W!==void 0)return W;const z=Z3();z.font=O;const U=z.measureText("😀").width;if(W=0,U>F+.5&&typeof document<"u"&&document.body!==null){const q=document.createElement("span");q.style.font=O,q.style.display="inline-block",q.style.visibility="hidden",q.style.position="absolute",q.textContent="😀",document.body.appendChild(q);const K=q.getBoundingClientRect().width;document.body.removeChild(q),U-K>.5&&(W=U-K)}return c_.set(O,W),W})(D,B):0;return{cache:L,fontSize:B,emojiCorrection:H}})(t,(a=e.normalized,Hue.test(a)));var a;const u=Fu("-",xa("-",r),l)+(s===0?0:2*s),c=8*Fu(" ",xa(" ",r),l),d=s!==0;if(e.len===0)return{widths:[],lineEndFitAdvances:[],lineEndPaintAdvances:[],kinds:[],simpleLineWalkFastPath:!0,segLevels:null,breakableFitAdvances:[],breakablePreferredBreaks:[],letterSpacing:0,spacingGraphemeCounts:[],discretionaryHyphenWidth:0,tabStopAdvance:0,chunks:[]};const f=[],h=[],g=[],m=[];let w=e.chunks.length<=1&&!d;const _=null,v=[],k=[],y=[],x=null,M=Array.from({length:e.len});function $(D,T,L,B,H,O,F,W,z){H!=="text"&&H!=="space"&&H!=="zero-width-break"&&(w=!1),f.push(T),h.push(L),g.push(B),m.push(H),v.push(F),k.push(W),d&&y.push(z)}function S(D,T,L,B,H){const O=xa(D,r),F=d?m_(D,T):0,W=(function(K,ie,ne){return ie>1?K+(ie-1)*ne:K})(Fu(D,O,l),F,s),z=T==="space"||T==="preserved-space"||T==="zero-width-break"?0:W,U=z===0?0:z+(F>0?s:0),q=T==="space"||T==="zero-width-break"?0:W;if(H&&B&&D.length>1){let K="sum-graphemes";s!==0?K="segment-prefixes":sm(D)?K="pair-context":i.preferPrefixWidthsForBreakableRuns&&(K="segment-prefixes");const ie=(function(Y,le,Ee,de,he){if(le.breakableFitAdvances!==void 0&&le.breakableFitMode===he)return le.breakableFitAdvances;le.breakableFitMode=he;const pe=HL(),oe=[];for(const fe of pe.segment(Y))oe.push(fe.segment);if(oe.length<=1)return le.breakableFitAdvances=null,le.breakableFitAdvances;if(he==="sum-graphemes"){const fe=[];for(const Ce of oe){const ge=xa(Ce,Ee);fe.push(Fu(Ce,ge,de))}return le.breakableFitAdvances=fe,le.breakableFitAdvances}if(he==="pair-context"||oe.length>96){const fe=[];let Ce=null,ge=0;for(const Q of oe){const ee=Fu(Q,xa(Q,Ee),de);if(Ce===null)fe.push(ee);else{const ce=Ce+Q,ue=xa(ce,Ee);fe.push(Fu(ce,ue,de)-ge)}Ce=Q,ge=ee}return le.breakableFitAdvances=fe,le.breakableFitAdvances}const ve=[];let G="",X=0;for(const fe of oe){G+=fe;const Ce=Fu(G,xa(G,Ee),de);ve.push(Ce-X),X=Ce}return le.breakableFitAdvances=ve,le.breakableFitAdvances})(D,O,r,l,K),ne=ie===null||o==="keep-all"?null:(function(Y){if(!/[-\u058A\u2010\u2012\u2013\u2014]/u.test(Y))return null;const le=[];let Ee=0;for(const de of b5().segment(Y))Ee++,Xue(de.segment)&&le.push(Ee);return le.length===0?null:le})(D);return void $(D,W,U,q,T,L,ie,ne,F)}$(D,W,U,q,T,L,null,null,F)}for(let D=0;D=55296&&Y<=56319&&ne+1=56320&&he<=57343&&(le=he-56320+(Y-55296<<10)+65536,Ee=2)}const de=lue(le);de!=="R"&&de!=="AL"&&de!=="AN"||(W=!0);for(let he=0;he=0&&F[Y]==="ET";Y--)F[Y]="EN";for(Y=ne+1;Y0?F[ne-1]:K)!=="L"?"R":"L";if(le===((Y{const e=globalThis;if(e[e4])return e[e4];const t={configs:{},controllers:{},revision:Xr(0),preparedCache:new Map,blockEstimateCache:new Map};return e[e4]=t,t})();let r1=null;const t4=gs.revision;function g_(e){var t;return e&&(t=gs.configs[e])!=null?t:null}function v_(e,t){const n=Number.parseFloat(String(e??""));return Number.isFinite(n)&&n>0?n:t}function ece(e){return e?.type==="text"||e?.type==="emoji"||e?.type==="hardbreak"}function n4(e){var t,n,o;if(!Array.isArray(e)||e.length===0)return null;let s="";for(const i of e){if(!ece(i))return null;i.type==="text"?s+=String((t=i.content)!=null?t:""):i.type==="emoji"?s+=String((o=(n=i.name)!=null?n:i.raw)!=null?o:""):i.type==="hardbreak"&&(s+=` +`)}return s.length>0?s:null}function o4(e,t,n){var o,s;if(!e||!Number.isFinite(t)||t<=0||!(function(){var i;if(r1!=null)return r1;if(typeof document>"u")return!1;try{const r=document.createElement("canvas");return r1=!!((i=r.getContext)!=null&&i.call(r,"2d")),r1}catch{return r1=!1,!1}})())return null;try{const i=Math.round(100*t)/100,r=[(o=n.whiteSpace)!=null?o:"pre-wrap",n.font,n.lineHeight,n.wrapperOverhead,n.widthAdjustment,i,e].join("\0"),l=gs.blockEstimateCache.get(r);if(l)return gs.blockEstimateCache.delete(r),gs.blockEstimateCache.set(r,l),{kind:"simple-text",height:l.height,contentHeight:l.contentHeight};const a=(s=n.whiteSpace)!=null?s:"pre-wrap",u=(function(h,g,m){const w=`${m}\0${g}\0${h}`,_=gs.preparedCache.get(w);if(_)return gs.preparedCache.delete(w),gs.preparedCache.set(w,_),_.prepared;const v=(function(k,y,x){return(function(M,$,S,I){var P,D;const T=(P=I?.wordBreak)!=null?P:"normal",L=(D=I?.letterSpacing)!=null?D:0;return Jue(Due(M,fg(),I?.whiteSpace,T),$,!1,T,L)})(k,y,0,x)})(h,g,{whiteSpace:m});for(gs.preparedCache.set(w,{prepared:v});gs.preparedCache.size>240;){const k=gs.preparedCache.keys().next().value;if(!k)break;gs.preparedCache.delete(k)}return v})(e,n.font,a),c=(function(h,g,m){const w=Zue(h,g);return{lineCount:w,height:w*m}})(u,Math.max(24,i-n.widthAdjustment),n.lineHeight),d=Math.max(n.lineHeight,c.height),f=Math.max(n.lineHeight,Math.round(d+n.wrapperOverhead));for(gs.blockEstimateCache.set(r,{height:f,contentHeight:Math.round(d)});gs.blockEstimateCache.size>4e3;){const h=gs.blockEstimateCache.keys().next().value;if(!h)break;gs.blockEstimateCache.delete(h)}return{kind:"simple-text",height:f,contentHeight:Math.round(d)}}catch{return null}}function zL(e,t,n){var o,s;if(!n||!e||!Number.isFinite(t)||t<=0)return null;if(e.type==="paragraph"){const i=n4(e.children);return i&&n.paragraph?o4(i,t,n.paragraph):null}if(e.type==="heading"){const i=Number(e.level||0),r=n4(e.children),l=n.headings[i];return r&&l?o4(r,t,l):null}if(e.type==="list_item"){const i=Array.isArray(e.children)?e.children:[];if(i.length!==1||((o=i[0])==null?void 0:o.type)!=="paragraph"||!n.listItem)return null;const r=n4((s=i[0])==null?void 0:s.children);return r?o4(r,t,n.listItem):null}if(e.type==="list"){const i=Array.isArray(e.items)?e.items:[];if(!i.length)return null;let r=Math.max(0,n.listWrapperOverhead);for(const l of i){const a=zL(l,t,n);if(!a)return null;r+=a.height}return{kind:"simple-text",height:Math.max(1,Math.round(r)),contentHeight:Math.max(1,Math.round(r))}}return null}function l1(e){if(!e)return 1;const t=String(e).split(/\r?\n/);return Math.max(1,t.length)}function Ru(e,t){const n=String(e??"");return t?n:n.replace(/\r\n$|\n$|\r$/,"")}function s4(e,t,n=0){return e.diff?h5(t??{},n)?(function(o){const s=Ru(o.raw);if(s){const i=s.split(/\r?\n/);return o.originalCode!=null||o.updatedCode!=null?Math.max(1,i.filter(r=>!Que.some(l=>r.startsWith(l))).length):Math.max(1,i.length)}return l1(Ru(o.originalCode))+l1(Ru(o.updatedCode))})(e):(function(o){const s=o.originalCode,i=o.updatedCode;if(s!=null||i!=null)return Math.max(l1(Ru(s)),l1(Ru(i)));const r=Ru(o.code).split(/\r?\n/);let l=0,a=0;for(const u of r)u.startsWith("+")&&!u.startsWith("+++")?a++:u.startsWith("-")&&!u.startsWith("---")?l++:(l++,a++);return Math.max(1,l,a)})(e):l1(Ru(e.code,e.loading===!0))}function tce(e){return e?`${e.fontStyle||"normal"} ${e.fontWeight||"400"} ${e.fontSize||"16px"} ${e.fontFamily||"sans-serif"}`:""}function i4(e,t,n="pre-wrap"){if(!e||!t||typeof window>"u")return null;const o=window.getComputedStyle(t),s=e.offsetHeight,i=v_(o.lineHeight,1.5*v_(o.fontSize,16)),r=e.getBoundingClientRect().width,l=t.getBoundingClientRect().width;return{font:tce(o),lineHeight:i,wrapperOverhead:Math.max(0,s-i),widthAdjustment:Math.max(0,r-l),whiteSpace:n}}const nce=new Set(["node","key","ref","ctx","renderNode","indexKey","__proto__","prototype","constructor"]);function y_(e,t={}){var n;const o={},s=new Set((n=t.omit)!=null?n:[]);if(!e||typeof e!="object")return o;const i=Object.getOwnPropertyDescriptors(e);for(const[r,l]of Object.entries(i))nce.has(r)||s.has(r)||l.enumerable&&"value"in l&&(o[r]=l.value);return o}function k_(e,t,n,o){var s;const i=(function(f){return Math.max(0,Math.ceil(f.scrollHeight||0)-Math.ceil(f.clientHeight||0))})(e),r=(function(f,h){return Number.isFinite(f)?Math.min(Math.max(0,f),h):0})(n,i);if(!o.isReverseFlexScrollRoot(e))return void(e.scrollTop=r);const l=Math.max(0,i-r),a=[-l,l];let u=a[0],c=Number.POSITIVE_INFINITY;for(const f of a){e.scrollTop=f;const h=o.getNormalizedScrollTop(e,t,!1),g=Math.abs(h-r);gd&&(e.scrollTop=u)}function b_(e,t){let n=0,o=null,s=null;const i=()=>{const r=s;s=null,o=null,r&&(n=Date.now(),e(...r))};return function(...r){const l=Date.now(),a=t-(l-n);s=r,a<=0?(o&&(clearTimeout(o),o=null),n=l,s=null,e(...r)):o||(o=setTimeout(i,a))}}function C_(e){return e==="simple"?"simple":e===!0||e==="true"||e==="precise"?"precise":"off"}const WL=Symbol("MarkstreamMathBlockMinHeightCache");function dVe(){return on(WL,null)}const oce=new Set(["text","inline_code","emoji","footnote_reference"]),sce=new Set(["strong","emphasis","strikethrough","highlight","insert","subscript","superscript","link"]);function a1(e){const t=Number(e);return!Number.isFinite(t)||t<=0?-1:Math.round(t/32)}function Ou(e,t,n,o=22){const s=String(e??"");if(!s)return n;const i=Math.max(18,Math.floor(Math.max(320,t)/8)),r=s.split(/\r?\n/).length,l=Math.ceil(s.length/i),a=Math.max(1,r,l);return Math.max(n,Math.ceil(a*o+12))}function UL(e){var t;if(!e||typeof e!="object")return!1;const n=e,o=String((t=n.type)!=null?t:"");if(oce.has(o))return!0;if(!sce.has(o))return!1;const s=n.children;return!Array.isArray(s)||!s.length||s.every(UL)}function G3(e){var t,n,o,s,i,r,l,a;if(!e||typeof e!="object")return"";const u=e,c=String((t=u.type)!=null?t:"");if(c==="text")return String((o=(n=u.content)!=null?n:u.raw)!=null?o:"");if(c==="inline_code")return String((r=(i=(s=u.code)!=null?s:u.content)!=null?i:u.raw)!=null?r:"");if(c==="emoji")return String((a=(l=u.name)!=null?l:u.raw)!=null?a:"");if(typeof u.text=="string")return u.text;const d=[];for(const f of["children","items","cells","rows"]){const h=u[f];if(Array.isArray(h)){const g=h.map(G3).filter(Boolean).join(" ");g&&d.push(g)}}return d.join(" ").replace(/\s+/g," ").trim()}function jL(e){if(!e||typeof e!="object")return!1;const t=e;return t.type==="inline_code"||["children","items","cells","rows"].some(n=>{const o=t[n];return Array.isArray(o)&&o.some(jL)})}function ice(e,t){if(!e)return 30;const n=Math.max(18,Math.floor(Math.max(320,t)/8)),o=e.split(/\r?\n/).length,s=Math.ceil(e.length/n),i=Math.max(1,o,s);return 30+26*Math.max(0,i-1)}function rce(e,t){var n,o,s,i,r,l,a,u,c,d,f,h,g,m;if(!e||typeof e!="object")return 32;const w=e,_=String((n=w.type)!=null?n:""),v=Number.isFinite(t)&&t>0?t:640;switch(_){case"heading":return(function(k){var y;const x=Number((y=k.level)!=null?y:k.depth);return x>=4?20:x===3?30:x===2?32:44})(w);case"paragraph":return(function(k,y){const x=String(k??"");if(!x)return 28;const M=Math.max(18,Math.floor(Math.max(320,y)/8)),$=x.split(/\r?\n/).length,S=Math.ceil(x.length/M);return Math.max(1,$,S)<=1?28:Ou(x,y,34)})(String((s=(o=w.raw)!=null?o:w.content)!=null?s:""),v);case"list":return(function(k,y){var x;const M=Array.isArray(k.items)?k.items:[];if(!M.length)return 48;const $=Math.max(48,30*M.length+12);let S=12;for(const D of M)S+=ice(G3(D)||String((x=D.raw)!=null?x:""),y);const I=Math.max(0,S-$);if(M.length>20){const D=Math.round(2.4*M.length);return Math.round($+Math.max(D,Math.min(I,3*M.length)))}if(I<=0)return $;const P=M.length>8?8*M.length:I;return Math.round($+Math.min(I,P))})(w,v);case"list_item":return Ou(String((r=(i=w.raw)!=null?i:w.content)!=null?r:""),v,34);case"blockquote":return Ou(String((a=(l=w.raw)!=null?l:w.content)!=null?a:""),v,56);case"table":return(function(k,y){const x=[...k.header?[k.header]:[],...Array.isArray(k.rows)?k.rows:[]];if(!x.length){const M=Array.isArray(k.children)?k.children.length:3;return Math.max(120,38*M+48)}return Math.max(120,Math.round(4+x.reduce((M,$)=>M+(function(S,I){const P=Math.max(1,S.length),D=Math.max(80,(I-32)/P),T=Math.max(10,Math.floor(D/8)),L=Math.max(1,...S.map(B=>{var H;const O=G3(B)||String((H=B?.raw)!=null?H:"");return Math.ceil(O.length/T)||1}));return 54+34*Math.max(0,L-1)+(P<=3&&S.some(jL)?14:0)})((function(S){var I;return Array.isArray(S?.cells)&&(I=S.cells)!=null?I:[]})($),y),0)))})(w,v);case"code_block":{const k=String((u=w.language)!=null?u:"").trim().toLowerCase(),y=String((d=(c=w.code)!=null?c:w.raw)!=null?d:"");return k==="mermaid"?sg(ng(y)):k==="infographic"?ig(og(y)):Ou(y,v,96,20)}case"math_block":return 72;case"image":return 220;case"admonition":case"vmr_container":case"html_block":return(function(k,y){var x,M,$;const S=k.match(/^\s*]*)>/i);return S&&!/(?:^|\s)open(?:\s|=|$)/i.test((x=S[1])!=null?x:"")?Ou((($=(M=k.match(/]*>([\s\S]*?)<\/summary>/i))==null?void 0:M[1])==null?void 0:$.replace(/<[^>]*>/g,"").trim())||"Details",y,28,28):Ou(k,y,96)})(String((h=(f=w.raw)!=null?f:w.content)!=null?h:""),v);case"thematic_break":return 24;default:return Ou(String((m=(g=w.raw)!=null?g:w.content)!=null?m:""),v,40)}}function w_(e,t,n){return Math.min(Math.max(e,t),n)}const lce=["total","cacheHits","appendHits","tailHits","fullParses","chunkedParses"],ace=["tokenCloneMs","processTokensInputTokens","processTokensReusedTopLevelNodes","processTokensMs","parseMarkdownToStructureTotalMs"],uce=new Set(["attrs","data","items","header","payload","props","rows","cells","term","definition","sourceMap"]),VL=["raw","content","code","originalCode","updatedCode"],__=new WeakMap,x_=new WeakMap;let cce=1;function Rr(){return typeof performance<"u"?performance.now():Date.now()}function S_(e){const t=e.stream;return t&&typeof t.stats=="function"?t.stats():null}function Xi(e){if(typeof e!="object"&&typeof e!="function"||e===null)return"";const t=e;let n=__.get(t);return n||(n=cce++,__.set(t,n)),String(n)}function A_(e,t,n,o={}){var s,i;const r=o.includeFinal!==!1,l={md:Xi(t),customMarkdownIt:Xi(n),requireClosingStrong:e.requireClosingStrong===!0,customHtmlTags:(s=e.customHtmlTags)!=null?s:[],includeSourceMap:e.includeSourceMap===!0,streamParse:(i=e.streamParse)!=null?i:"auto",validateLink:Xi(e.validateLink),preTransformTokens:Xi(e.preTransformTokens),postTransformTokens:Xi(e.postTransformTokens),postTransformNodes:Xi(e.postTransformNodes)};return r&&(l.final=e.final===!0),JSON.stringify(l)}function M_(e){let t=e.length;for(;t>0&&e.charCodeAt(t-1)===10;)t-=1;const n=e.lastIndexOf(` +`,t-1)+1;return e.slice(n,t).trim()}function T_(e){const t=qL(e);return t.length>=2&&t.every(n=>{const o=n.trim();return o.length>=1&&o.replace(/^:/,"").replace(/:$/,"").split("").every(s=>s==="-")})}function qL(e){return e.includes("|")?e.replace(/^\|/,"").replace(/\|$/,"").split("|"):[]}function KL(e){let t=2166136261;for(let n=0;n>>0).toString(36)}function C5(e){const t=String(e??"");return`${t.length}:${KL(t)}`}function Y3(e,t=new WeakMap,n=0){if(e==null||typeof e=="number"||typeof e=="boolean")return String(e);if(typeof e=="string")return`s:${(function(r){return r.length<=8192?C5(r):`${r.length}:${KL(r.slice(0,8192))}:truncated`})(e)}`;if(typeof e=="function")return`fn:${Xi(e)}`;if(typeof e!="object")return typeof e;const o=e,s=t.get(o);if(s)return`cycle:${s}`;if(n>=6)return`object:${Xi(o)}`;const i=Xi(o);if(t.set(o,i),Array.isArray(e)){const r=e.slice(0,200);return`a:${e.length}:${r.map(l=>Y3(l,t,n+1)).join(",")}`}if(typeof e=="object"){const r=e,l=Object.keys(r).sort(),a=l.slice(0,80);return`o:${l.length}:${a.sort().map(u=>`${u}:${Y3(r[u],t,n+1)}`).join(";")}`}return typeof e}function pg(e){return typeof e=="object"&&e!==null&&typeof e.type=="string"&&typeof e.raw=="string"}function ZL(e,t=new WeakMap,n=0){return Array.isArray(e)?`a:${e.length}:${e.slice(0,200).map(o=>pg(o)?su(o,t,n+1):ZL(o,t,n+1)).join(",")}`:pg(e)?su(e,t,n):Y3(e,t,n)}function dce(e,t,n){return Object.keys(e).sort().filter(o=>o!=="children"&&!VL.includes(o)).map(o=>{const s=e[o];return typeof s=="string"?`${o}=s:${C5(s)}`:typeof s=="number"||typeof s=="boolean"||s==null?`${o}=${String(s)}`:typeof s=="function"?`${o}=fn:${Xi(s)}`:uce.has(o)&&(Array.isArray(s)||typeof s=="object")?`${o}=${ZL(s,t,n+1)}`:s&&typeof s=="object"?`${o}=object:${Xi(s)}`:""}).filter(Boolean).join(";")}function fce(e){return VL.map(t=>{const n=e[t];return typeof n=="string"?`${t}=s:${C5(n)}`:""}).filter(Boolean).join(";")}function su(e,t=new WeakMap,n=0){const o=x_.get(e);if(o)return o;const s=e,i=t.get(s);if(i)return`node-cycle:${i}`;if(n>=6)return`node:${e.type}:${Xi(s)}`;const r=Xi(s);t.set(s,r);const l=(function(a,u,c){const d=a,f=Array.isArray(d.children)?d.children:[],h=f.length?f.slice(0,200).map(g=>su(g,u,c+1)).join("|"):"";return[a.type,fce(d),dce(d,u,c),f.length,h].join(":")})(e,t,n);return x_.set(s,l),l}function GL(e,t){return su(e)===su(t)}function w5(e,t,n){const o=Rr(),s=t==="stabilizeSignatureMs"?"stabilizeSignatureCallCount":"primeSignatureCallCount";try{return n()}finally{e[t]+=Rr()-o,e[s]+=1,e.signatureMs=e.stabilizeSignatureMs+e.primeSignatureMs,e.signatureCallCount=e.stabilizeSignatureCallCount+e.primeSignatureCallCount}}function E_(e,t,n){return w5(t,n,()=>su(e))}function YL(e,t,n){return E_(e,n,"stabilizeSignatureMs")===E_(t,n,"stabilizeSignatureMs")}function wh(e){return{reusedNodeCount:0,dirtyStartIndex:e>0?0:-1,stablePrefixNodeCount:0,dirtyTailNodeCount:e}}function I_(e,t,n){return e<0?0:Math.max(t.length,n.length)-e}function L_(e){return e.__markstreamHasCustomParserExtensions===!0||(function(t){var n;return Number((n=t.__markstreamRegisteredPluginCount)!=null?n:0)>0})(e)}function pce(e,t){return e.length===t.length&&e===t}function _5(e,t,n=0){if(n>=4)return null;if(e.type!==t.type)return!1;const o=e,s=t,i=Object.keys(o).filter(c=>c!=="type"&&c!=="children").sort(),r=Object.keys(s).filter(c=>c!=="type"&&c!=="children").sort();if(i.length!==r.length)return!1;for(let c=0;c{o=_5(e,t)}),o??YL(e,t,n)}function gce(e,t){const n={};for(const o of lce){const s=e[o],i=t?.[o];typeof s=="number"&&(n[o]=s-(typeof i=="number"?i:0))}return n}function vce(e,t){var n;const o=Tw(t.instanceMsgId),s=new Map,i=(n=t.smoothStreamingEnabled)!=null?n:R(()=>!1),r=Z(t.renderContent.value);let l=[],a="",u="",c="",d=!1;const f=(function(){let B="",H=0,O=!1,F=!1,W=!1,z=!1;function U(){B="",H=0,O=!1,F=!1,W=!1,z=!1}function q(K){let ie=!1;for(let ne=0;ne{if(!K||!ie.startsWith(K)||ie.length<=K.length)return U(),[!0,0];let ne=0;B!==K&&(U(),q(K),ne=K.length);const Y=ie.slice(K.length),le=q(Y);return B=ie,[le,ne+Y.length]}})();let h,g=0,m=0,w=Rr(),_=-1,v=0;function k(B){_=Number.isInteger(B)?B:0,v+=1}function y(){h&&(clearTimeout(h),h=void 0)}function x(){y();const B=t.renderContent.value;r.value!==B&&(r.value=B),w=Rr()}et([t.renderContent,t.effectiveFinal,i],([B,H,O])=>{r.value!==B&&(!O||H||(function(F,W){if(!F&&W||W.length<=80||W.length\s*|`{3,}|~{3,})/.test(z))||z.endsWith(` +`)&&!(function(U){const q=M_(U);if(T_(q))return!1;const K=qL(q);return K.length>=2&&K.some(ie=>ie.trim())})(W))})(r.value,B)?x():(function(){if(m+=1,h)return;const F=Math.max(0,(function(W){const z=W.parseCoalesceMs;return typeof z=="number"&&Number.isFinite(z)&&z>=0?z:80})(e)-(Rr()-w));F<=0?x():h=setTimeout(x,F)})())},{flush:"sync",immediate:!0}),pf(y);const M=R(()=>{var B,H,O,F;return Tte(e.customHtmlTags,(B=e.parseOptions)==null?void 0:B.customHtmlTags,(F=(O=(H=t.customComponentsMap)==null?void 0:H.value)!=null?O:{},Object.entries(F).map(([W,z])=>{const U=xr(W);return z==null||!U||Yp(U)||sI.has(U)||Vp.has(U)?"":U}).filter(Boolean)))}),$=R(()=>{const{key:B,tags:H}=Ete(M.value);if(!B)return o;const O=s.get(B);if(O)return O;const F=Tw(t.instanceMsgId,{customHtmlTags:H});return s.set(B,F),F}),S=R(()=>{const B=$.value;if(!e.customMarkdownIt)return B;const H=e.customMarkdownIt(B);return B.__markstreamHasCustomParserExtensions=!0,H.__markstreamHasCustomParserExtensions=!0,H}),I=R(()=>{var B,H;const O=(B=e.parseOptions)!=null?B:{},F=t.effectiveFinal.value,W=M.value,z=F!=null,U=W.length>0;return z||U||O.streamParse==null?mt(mt(rn(mt({},O),{streamParse:(H=O.streamParse)==null||H}),z?{final:F}:{}),U?{customHtmlTags:W}:{}):O}),P=R(()=>{var B;return new Set(((B=I.value.customHtmlTags)!=null?B:[]).map(H=>String(H).trim().toLowerCase()).filter(Boolean))}),D=R(()=>A_(I.value,S.value,e.customMarkdownIt,{includeFinal:!0})),T=R(()=>A_(I.value,S.value,e.customMarkdownIt,{includeFinal:!1}));et([D,T],([B,H],[O,F])=>{O&&(B===O&&H===F||(x(),H!==F&&(l=[],c="")))},{flush:"sync"});const L=R(()=>{var B,H,O,F,W,z,U,q,K,ie,ne;if((B=e.nodes)!=null&&B.length)return l=[],c="",k(0),kt(e.nodes.slice());const Y=r.value;if(!Y)return l=[],c="",k(-1),[];const le=t.debugPerformanceEnabled.value,Ee=le?Rr():0,de=S.value,he=D.value,pe=T.value;a&&he!==a&&(function(Fe){var Oe,Ye;(Ye=(Oe=Fe.stream)==null?void 0:Oe.reset)==null||Ye.call(Oe)})(de),u&&pe!==u&&(l=[],c="");const oe=Object.keys((O=(H=t.customComponentsMap)==null?void 0:H.value)!=null?O:{}).length>0||typeof I.value.postTransformNodes=="function";oe!==d&&(l=[],c="");const ve=!oe&&l.length>0&&Y.startsWith(c)&&pe===u,G=le?S_(de):null,X=le?{}:void 0,fe=L_(de),Ce=!fe&&!oe,ge=mt(mt(rn(mt({},I.value),{__reuseStableTopLevelNodes:Ce}),fe?{__disableStreamParse:!0}:{}),X?{__timing:X}:{}),Q=iL(Y,de,ge),ee=le?Rr():0,ce=le?{signatureMs:0,stabilizeSignatureMs:0,primeSignatureMs:0,signatureCallCount:0,stabilizeSignatureCallCount:0,primeSignatureCallCount:0}:void 0;let ue,Se=le?wh(Q.length):void 0,Ue=0,_e=0,Te=0;if(ve){const Fe=le?Rr():0,[Oe,Ye]=(function($t){var Ht,Yt;const[_n,je]=$t.scanGlobalReferenceAppend($t.previousContent,$t.content),Ke=$t.parseOptions;return[$t.previousDirtyStartIndex>0&&Ke.final!==!0&&!$t.customMarkdownIt&&!L_($t.md)&&!_n&&typeof Ke.preTransformTokens!="function"&&typeof Ke.postTransformTokens!="function"&&typeof Ke.postTransformNodes!="function"&&((Yt=(Ht=Ke.customHtmlTags)==null?void 0:Ht.length)!=null?Yt:0)===0?$t.previousDirtyStartIndex:0,je]})({content:Y,previousContent:c,previousDirtyStartIndex:_,parseOptions:I.value,customMarkdownIt:e.customMarkdownIt,md:de,scanGlobalReferenceAppend:f});Te=Ye;const ft=Oe<=0;if(ce){const $t=(function(Ht,Yt,_n,je={}){var Ke;if(!Yt.length)return{nodes:Ht,metrics:wh(Ht.length)};const Ze=(Ke=je.scanStartIndex)!=null?Ke:0,zt=je.reuseDirtyTail!==!1,at=(function(fn,Sn,to,An=0){const ao=Math.min(fn.length,Sn.length);for(let Kt=Math.min(ao,Math.max(0,An));Ktsu(Fe[ft]))})(ue,ce,_e):(function(Fe,Oe=0){for(let Ye=Math.max(0,Oe);Ye((W=G?.total)!=null?W:0);t.logPerf(Oe?"parse(stream)":"parse(sync)",mt(mt(mt({rendererId:t.instanceMsgId,ms:Math.round(Rr()-Ee),nodes:ue.length,contentLength:Y.length,parseCommitCount:g,parseCoalescedCount:m,nodeReuseMs:st,referenceDefinitionScanChars:Te,signatureMs:(z=ce?.signatureMs)!=null?z:0,stabilizeSignatureMs:(U=ce?.stabilizeSignatureMs)!=null?U:0,primeSignatureMs:(q=ce?.primeSignatureMs)!=null?q:0,signatureCallCount:(K=ce?.signatureCallCount)!=null?K:0,stabilizeSignatureCallCount:(ie=ce?.stabilizeSignatureCallCount)!=null?ie:0,primeSignatureCallCount:(ne=ce?.primeSignatureCallCount)!=null?ne:0,stabilizeMs:Ue},Se??{}),X?Object.fromEntries(ace.map(Ye=>{var ft;return[Ye,(ft=X[Ye])!=null?ft:0]})):{}),Fe?{streamMode:Fe.lastMode,streamDelta:gce(Fe,G),streamStats:Fe}:{}))}return kt(ue)});return{effectiveCustomHtmlTags:M,effectiveCustomHtmlTagsSet:P,mdBase:$,mdInstance:S,mergedParseOptions:I,getParsedNodesDirtyStartIndex:()=>_,getParsedNodesRevision:()=>v,parsedNodes:L}}function yce(e){const{isClient:t}=e,n=Z(new Set),o=new Map,s=new Map,i=new Map;function r(u){if(!t)return;const c=i.get(u);c!=null&&(window.clearTimeout(c),i.delete(u))}function l(){if(t)for(const u of i.values())window.clearTimeout(u);i.clear()}function a(){n.value=new Set}return{visibleNodeIndices:n,nodeVisibilityHandles:o,nodeVisibilityWatchStops:s,nodeVisibilityFallbackTimers:i,clearVisibilityFallback:r,clearAllVisibilityFallbacks:l,markNodeVisible:function(u,c=!0){var d;c&&r(u),(function(f,h){if((m=(g=e.shouldTrackVisibleNodeIndices)==null?void 0:g.call(e))!=null&&!m)return;var g,m;const w=n.value,_=w.has(f);if(h){if(_)return;const k=new Set(w);return k.add(f),void(n.value=k)}if(!_)return;const v=new Set(w);v.delete(f),n.value=v})(u,c),c&&((d=e.onNodeMarkedVisible)==null||d.call(e,u))},resetNodeVisibleState:a,cleanupNodeVisibility:function(u){var c;if(e.shouldCleanupNodeVisibility&&!e.shouldCleanupNodeVisibility())return;for(const[f,h]of s.entries())f{const c=s.getSnapshot();t.value=c.source,n.value=c.visible,o.value=c.done},r=s.subscribe(i);i();const l=R(()=>Math.max(0,t.value.length-n.value.length)),a=R(()=>l.value===0),u=R(()=>o.value&&a.value);return Zg()&&pf(()=>{r(),s.destroy()}),{source:t,visible:n,done:o,final:u,caughtUp:a,pendingChars:l,enqueue:c=>s.enqueue(c),finish:c=>s.finish(c),flush:()=>s.flush(),reset:c=>s.reset(c),pause:()=>s.pause(),resume:()=>s.resume()}}const bce={maxCharsPerSecond:3e3,maxCommitFps:20,maxCharsPerCommit:160,catchUpLatencyMs:220,catchUpThreshold:400},$_=/auto|scroll|overlay/i;function Cce(e){if(!e)return!1;const t=(e.overflowY||"").toLowerCase(),n=(e.overflow||"").toLowerCase();return $_.test(t)||$_.test(n)}function wce(e){const t=Math.ceil(e.scrollHeight)>Math.ceil(e.clientHeight)+1,n=Math.ceil(e.scrollWidth)>Math.ceil(e.clientWidth)+1;return t||n}const _ce={class:"m-0 p-0"},xce=["data-probe"],Sce=Kn(tt(rn(mt({},{name:"HeightEstimationProbes"}),{__name:"HeightEstimationProbes",props:{width:{},flowRoot:{type:Boolean},paragraphNode:{},listItemNode:{},listNode:{},headingNodes:{},setParagraphWrapper:{type:Function},setListItemWrapper:{type:Function},setListWrapper:{type:Function},setHeadingWrapper:{type:Function}},setup(e){const t=e;function n(o){var s,i;return(i=(s=t.headingNodes)==null?void 0:s[o])!=null?i:null}return(o,s)=>(b(),A("div",{class:"height-estimation-probes",style:Gt({width:`${e.width}px`}),"aria-hidden":"true"},[C("div",{ref:i=>e.setParagraphWrapper(i),class:Re(["node-content",{"node-content-flow-root":e.flowRoot}]),"data-probe":"paragraph"},[V(p(ac),{node:e.paragraphNode,"index-key":"probe-paragraph"},null,8,["node"])],2),C("div",{ref:i=>e.setListItemWrapper(i),class:Re(["node-content",{"node-content-flow-root":e.flowRoot}]),"data-probe":"list-item"},[C("ul",_ce,[V(p(qd),{node:e.listItemNode,"index-key":"probe-list-item"},null,8,["node"])])],2),C("div",{ref:i=>e.setListWrapper(i),class:Re(["node-content",{"node-content-flow-root":e.flowRoot}]),"data-probe":"list"},[V(p(Kd),{node:e.listNode,"index-key":"probe-list"},null,8,["node"])],2),(b(),A(Pe,null,pt(6,i=>C("div",{key:`probe-heading-${i}`,ref_for:!0,ref:r=>e.setHeadingWrapper(i,r),class:Re(["node-content",{"node-content-flow-root":e.flowRoot}]),"data-probe":`heading-${i}`},[V(p(I2),{node:n(i),"index-key":`probe-heading-${i}`},null,8,["node","index-key"])],10,xce)),64))],4))}})),[["__scopeId","data-v-3e0766e2"]]),N_=tt({name:"InfographicBlockNodeLoading",props:{node:{type:Object,required:!0},showHeader:{type:Boolean,default:!0},estimatedPreviewHeightPx:{type:Number,default:void 0}},setup(e){const t=R(()=>{var n,o;return ig((o=Td(e.estimatedPreviewHeightPx))!=null?o:og(String((n=e.node.code)!=null?n:"")))});return()=>{var n;return nn("div",{class:"infographic-block-container rounded-lg border overflow-hidden",style:{margin:"var(--ms-flow-diagram-y) 0",background:"var(--diagram-bg)",borderColor:"var(--diagram-border)",color:"hsl(var(--ms-foreground))"},"data-markstream-infographic":"1","data-markstream-mode":"pending"},[e.showHeader?nn("div",{class:"infographic-block-header flex justify-between items-center border-b",style:{padding:"var(--ms-inset-panel-y) var(--ms-inset-panel-x)",background:"var(--diagram-header-bg)",borderColor:"var(--diagram-border)",minHeight:"calc(var(--ms-action-btn-icon) + var(--ms-action-btn-padding) + var(--ms-action-btn-padding) + var(--ms-inset-panel-y) + var(--ms-inset-panel-y) + 1px)"}},[nn("div",{class:"flex items-center gap-x-2 overflow-hidden"},[nn("span",{class:"icon-slot action-icon shrink-0",style:{display:"inline-flex",width:"var(--ms-action-btn-icon)",height:"var(--ms-action-btn-icon)"}}),nn("span",{class:"infographic-label font-medium font-mono truncate",style:{fontSize:"var(--ms-text-label)",color:"hsl(var(--ms-muted-foreground))"}},"Infographic")]),nn("div",{class:"infographic-header-actions flex items-center opacity-0 pointer-events-none",style:{gap:"var(--ms-gap-header-actions)"},"aria-hidden":"true"},Array.from({length:4},()=>nn("span",{class:"infographic-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded",style:{width:"calc(var(--ms-action-btn-icon) + var(--ms-action-btn-padding) + var(--ms-action-btn-padding))",height:"calc(var(--ms-action-btn-icon) + var(--ms-action-btn-padding) + var(--ms-action-btn-padding))"}})))]):null,nn("div",{class:"infographic-preview relative overflow-hidden block",style:{height:`${t.value}px`,minHeight:"var(--ms-size-diagram-min-height)",background:"var(--diagram-bg)"}},[nn("pre",{class:"infographic-pending-source text-sm font-mono whitespace-pre-wrap",style:{position:"absolute",inset:"0",zIndex:"1",margin:"0",padding:"var(--ms-inset-panel-body)",overflow:"auto",textAlign:"left"}},String((n=e.node.code)!=null?n:"")),nn("div",{class:"absolute inset-0"},[nn("div",{class:"w-full text-center flex items-center justify-center min-h-full"})])])])}}}),F_=tt({name:"MermaidBlockNodeLoading",props:{node:{type:Object,required:!0},showHeader:{type:Boolean,default:!0},estimatedPreviewHeightPx:{type:Number,default:void 0}},setup(e){const t=R(()=>{var n,o;return sg((o=Td(e.estimatedPreviewHeightPx))!=null?o:ng(String((n=e.node.code)!=null?n:"")))});return()=>{var n;return nn("div",{class:"mermaid-block-container rounded-lg border overflow-hidden",style:{margin:"var(--ms-flow-diagram-y) 0",borderColor:"var(--diagram-border)"},"data-markstream-mermaid":"1","data-markstream-mode":"pending"},[e.showHeader?nn("div",{class:"mermaid-block-header flex justify-between items-center border-b px-[var(--ms-inset-panel-x)] py-[var(--ms-inset-panel-y)]",style:{background:"var(--diagram-header-bg)",borderColor:"var(--diagram-border)"}},[nn("div",{class:"flex items-center gap-x-2 overflow-hidden"},[nn("span",{class:"mermaid-label-text text-[length:var(--ms-text-label)] font-medium font-mono truncate",style:{color:"var(--code-action-fg)"}},"Mermaid")]),nn("div",{class:"mermaid-header-actions flex items-center gap-[var(--ms-gap-header-actions)] opacity-0 pointer-events-none","aria-hidden":"true"},Array.from({length:4},()=>nn("span",{class:"mermaid-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded"},[nn("span",{class:"action-icon block"})])))]):null,nn("div",{class:"mermaid-preview-area relative overflow-hidden block",style:{height:`${t.value}px`,minHeight:"var(--ms-size-diagram-min-height)",background:"var(--diagram-bg)"}},[nn("pre",{class:"mermaid-source-code text-sm font-mono whitespace-pre-wrap",style:{position:"absolute",inset:"0",margin:"0",padding:"var(--ms-inset-panel-body)",overflow:"auto",textAlign:"left"}},String((n=e.node.code)!=null?n:"")),nn("div",{class:"_mermaid w-full text-center flex items-center justify-center min-h-full",style:{fontFamily:"inherit",contentVisibility:"auto",contain:"content",containIntrinsicSize:"var(--ms-size-diagram-min-height) 240px"}})])])}}}),Ace={docs:{showTooltips:!0,fade:!0,batchRendering:!0,initialRenderBatchSize:40,renderBatchSize:80,renderBatchDelay:16,renderBatchBudgetMs:6,renderBatchIdleTimeoutMs:120,deferNodesUntilVisible:!0,maxLiveNodes:220,liveNodeBuffer:60,nodeVirtual:"auto"},chat:{showTooltips:!1,fade:!1,batchRendering:!0,initialRenderBatchSize:32,renderBatchSize:48,renderBatchDelay:6,renderBatchBudgetMs:8,renderBatchIdleTimeoutMs:60,deferNodesUntilVisible:!0,maxLiveNodes:0,liveNodeBuffer:0,nodeVirtual:"auto"},minimal:{showTooltips:!1,fade:!1,batchRendering:!0,initialRenderBatchSize:32,renderBatchSize:48,renderBatchDelay:6,renderBatchBudgetMs:8,renderBatchIdleTimeoutMs:60,deferNodesUntilVisible:!0,maxLiveNodes:0,liveNodeBuffer:0,nodeVirtual:"auto"}};function xs(e){if(e==null)return"";if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return String(e);try{return JSON.stringify(e)}catch{return String(e)}}const Mce=["data-custom-id"],Tce=["data-node-index","data-node-type"],R_="typewriter-simple-cursor-target",XL=Kn(tt(rn(mt({},{name:"NodeRenderer"}),{__name:"NodeRenderer",props:{content:{},nodes:{},final:{type:Boolean},parseOptions:{},customMarkdownIt:{},debugPerformance:{type:Boolean,default:!1},customHtmlTags:{},mode:{},domMode:{},htmlPolicy:{},viewportPriority:{type:Boolean,default:void 0},viewportPriorityOptions:{},codeBlockStream:{type:Boolean,default:!0},codeBlockDarkTheme:{},codeBlockLightTheme:{},codeBlockMonacoOptions:{},codeRenderer:{},renderCodeBlocksAsPre:{type:Boolean,default:void 0},codeBlockMinWidth:{},codeBlockMaxWidth:{},codeBlockProps:{},mermaidProps:{},d2Props:{},infographicProps:{},showTooltips:{type:Boolean,default:void 0},themes:{},langs:{},isDark:{type:Boolean},customId:{},indexKey:{},typewriter:{type:[Boolean,String],default:!1},smoothStreaming:{type:[Boolean,String],default:"auto"},smoothStreamingOptions:{},parseCoalesceMs:{},fade:{type:Boolean,default:void 0},batchRendering:{type:Boolean,default:void 0},initialRenderBatchSize:{},renderBatchSize:{},renderBatchDelay:{},renderBatchBudgetMs:{},renderBatchIdleTimeoutMs:{},deferNodesUntilVisible:{type:Boolean,default:void 0},maxLiveNodes:{},liveNodeBuffer:{},nodeVirtual:{type:[Boolean,String],default:void 0},virtualScroll:{},renderAsFragment:{type:Boolean}},emits:["copy","copy-code","handleArtifactClick","click","mouseover","mouseout","virtual-state-change","height-change","render-settled","render-final","anchor-change"],setup(e,{expose:t,emit:n}){const o=e,s=n;function i(E){if(!(typeof Event<"u"&&E instanceof Event))return typeof E=="string"&&s("copy-code",E),void s("copy",E)}const r=ds(),l=on("markstreamNestedRendererProps",void 0);function a(E){const j=r?.vnode.props;return!!j&&(Object.prototype.hasOwnProperty.call(j,E)||Object.prototype.hasOwnProperty.call(j,String(E).replace(/[A-Z]/g,re=>`-${re.toLowerCase()}`)))}function u(E){var j,re;const ae=o[E];return a(E)?ae:(re=(j=l?.value)==null?void 0:j[E])!=null?re:ae}const c=R(()=>{return(E=u("mode"))==="chat"||E==="minimal"||E==="docs"?E:"docs";var E}),d=R(()=>C_(u("typewriter"))),f=R(()=>d.value!=="off"),h=R(()=>u("domMode")==="minimal"?"minimal":"full"),g=R(()=>{return(E={mode:c.value,codeRenderer:u("codeRenderer"),renderCodeBlocksAsPre:u("renderCodeBlocksAsPre")}).renderCodeBlocksAsPre===!0?"pre":E.codeRenderer==="pre"||E.codeRenderer==="shiki"||E.codeRenderer==="monaco"?E.codeRenderer:E.renderCodeBlocksAsPre===!1||E.mode==="docs"?"monaco":"pre";var E}),m=R(()=>Ace[c.value]),w=R(()=>{var E;return(E=u("showTooltips"))!=null?E:m.value.showTooltips}),_=R(()=>{var E;return(E=u("fade"))!=null?E:m.value.fade}),v=R(()=>{var E;return(E=u("batchRendering"))!=null?E:m.value.batchRendering}),k=R(()=>{var E;return(E=u("initialRenderBatchSize"))!=null?E:m.value.initialRenderBatchSize}),y=R(()=>{var E;return(E=u("renderBatchSize"))!=null?E:m.value.renderBatchSize}),x=R(()=>{var E;return(E=u("renderBatchDelay"))!=null?E:m.value.renderBatchDelay}),M=R(()=>{var E;return(E=u("renderBatchBudgetMs"))!=null?E:m.value.renderBatchBudgetMs}),$=R(()=>{var E;return(E=u("renderBatchIdleTimeoutMs"))!=null?E:m.value.renderBatchIdleTimeoutMs}),S=R(()=>{var E;return(E=u("deferNodesUntilVisible"))!=null?E:m.value.deferNodesUntilVisible}),I=R(()=>{var E;return(E=u("maxLiveNodes"))!=null?E:m.value.maxLiveNodes}),P=R(()=>{var E;return(E=u("liveNodeBuffer"))!=null?E:m.value.liveNodeBuffer}),D=R(()=>{var E;return(E=u("nodeVirtual"))!=null?E:m.value.nodeVirtual}),T={get content(){return o.content},get nodes(){return o.nodes},get final(){return o.final},get parseOptions(){return u("parseOptions")},get customMarkdownIt(){return u("customMarkdownIt")},get debugPerformance(){return o.debugPerformance},get customHtmlTags(){return u("customHtmlTags")},get mode(){return u("mode")},get domMode(){return h.value},get htmlPolicy(){return u("htmlPolicy")},get viewportPriority(){return u("viewportPriority")},get viewportPriorityOptions(){return u("viewportPriorityOptions")},get codeBlockStream(){return u("codeBlockStream")},get codeBlockDarkTheme(){return u("codeBlockDarkTheme")},get codeBlockLightTheme(){return u("codeBlockLightTheme")},get codeBlockMonacoOptions(){return u("codeBlockMonacoOptions")},get codeRenderer(){return u("codeRenderer")},get renderCodeBlocksAsPre(){return u("renderCodeBlocksAsPre")},get codeBlockMinWidth(){return u("codeBlockMinWidth")},get codeBlockMaxWidth(){return u("codeBlockMaxWidth")},get codeBlockProps(){return u("codeBlockProps")},get mermaidProps(){return u("mermaidProps")},get d2Props(){return u("d2Props")},get infographicProps(){return u("infographicProps")},get showTooltips(){return w.value},get themes(){return u("themes")},get langs(){return u("langs")},get isDark(){return u("isDark")},get customId(){return u("customId")},get indexKey(){return o.indexKey},get typewriter(){return u("typewriter")},get smoothStreaming(){return o.smoothStreaming},get smoothStreamingOptions(){return u("smoothStreamingOptions")},get parseCoalesceMs(){return u("parseCoalesceMs")},get fade(){return _.value},get batchRendering(){return v.value},get initialRenderBatchSize(){return k.value},get renderBatchSize(){return y.value},get renderBatchDelay(){return x.value},get renderBatchBudgetMs(){return M.value},get renderBatchIdleTimeoutMs(){return $.value},get deferNodesUntilVisible(){return S.value},get maxLiveNodes(){return I.value},get liveNodeBuffer(){return P.value},get nodeVirtual(){return D.value},get virtualScroll(){return o.virtualScroll},get renderAsFragment(){return o.renderAsFragment}};function L(E){s("height-change",E)}function B(E){s("virtual-state-change",E)}function H(E){s("anchor-change",E)}const O=Z(),F=Z(null),W=Z(null),z=Z(null),U=Jo({1:null,2:null,3:null,4:null,5:null,6:null}),q=Z(!1),K=new Map,ie=Z(0),ne=Z(0),Y=Z({paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}});function le(E,j){return typeof E!="string"?j:E.trim()||j}function Ee(E){const j=Number(E);return Number.isFinite(j)&&j>0?Math.max(1,Math.trunc(j)):640}const de=R(()=>{var E;const j=(E=T.viewportPriorityOptions)!=null?E:{},re=le(j.rootMargin,gc);return{rootMargin:re,heavyBlockMargin:le(j.heavyBlockMargin,re),maxTargets:Ee(j.maxTargets)}}),he=R(()=>{var E;return(E=de.value.rootMargin)!=null?E:gc}),pe=R(()=>{var E;return(E=de.value.maxTargets)!=null?E:640});function oe(){var E,j;if(((E=o.virtualScroll)==null?void 0:E.enabled)!==!0)return null;const re=(j=o.virtualScroll)==null?void 0:j.scrollRoot;return ve(typeof re=="function"?re():re)}function ve(E){return E?typeof HTMLElement<"u"&&E instanceof HTMLElement?E:typeof E=="object"&&"value"in E?ve(E.value):typeof E=="object"&&"$el"in E?ve(E.$el):null:null}En(FL,de);const{isClient:G,renderAsFragment:X,debugPerformanceEnabled:fe,resolvedShowTooltips:Ce,resolvedHtmlPolicy:ge,inheritedSmoothStreaming:Q,ownsTypewriterCursor:ee}=(function(E){const j=typeof window<"u",re=mf(),ae=on("markstreamHtmlPolicy",void 0),be=on("markstreamTypewriterCursor",void 0),Ne=on("markstreamSmoothStreaming",void 0),De=R(()=>E.renderAsFragment===!0),ze=R(()=>!!(E.debugPerformance&&j&&typeof console<"u")),ot=R(()=>{var nt;if(typeof E.showTooltips=="boolean")return E.showTooltips;const Be=(nt=re.showTooltips)!=null?nt:re["show-tooltips"];return Be===""||Be===!0||Be==="true"||Be!==!1&&Be!=="false"&&void 0}),We=R(()=>{var nt,Be;return(Be=(nt=E.htmlPolicy)!=null?nt:ae?.value)!=null?Be:"safe"}),Xe=R(()=>be?.value!==!0);return{isClient:j,renderAsFragment:De,debugPerformanceEnabled:ze,resolvedShowTooltips:ot,resolvedHtmlPolicy:We,inheritedSmoothStreaming:Ne,inheritedTypewriterCursor:be,ownsTypewriterCursor:Xe}})(T),{resolveViewportRoot:ce,resolveScrollContainer:ue,isReverseFlexScrollRoot:Se,getNormalizedScrollTop:Ue,getOffsetTopWithinRoot:_e}=(function(E,j){function re(){var ze,ot;return(ot=(ze=j.scrollRoot)==null?void 0:ze.call(j))!=null?ot:null}function ae(ze){if(typeof window>"u")return null;const ot=re();if(ot)return ot;const We=ze??E.value;if(!We)return null;const Xe=We.ownerDocument||document,nt=Xe.scrollingElement||Xe.documentElement;let Be=We;for(;Be&&Be!==Xe.body&&Be!==nt;){if(Cce(window.getComputedStyle(Be))&&wce(Be))return Be;Be=Be.parentElement}return null}function be(ze){if(!j.isClient)return!1;try{const ot=window.getComputedStyle(ze);return!!(ot.display||"").toLowerCase().includes("flex")&&(ot.flexDirection||"").toLowerCase().endsWith("reverse")}catch{return!1}}function Ne(ze,ot,We){var Xe,nt;if(We)return De(ot);const Be=ze.scrollTop;if(!be(ze))return Be;const Je=Be<0?-Be:Be;return Math.max(0,((Xe=ze.scrollHeight)!=null?Xe:0)-((nt=ze.clientHeight)!=null?nt:0))-Je}function De(ze){var ot,We,Xe,nt,Be;const Je=Number((ot=ze.scrollingElement)==null?void 0:ot.scrollTop),lt=Number((Xe=(We=ze.documentElement)==null?void 0:We.scrollTop)!=null?Xe:0),rt=Number((Be=(nt=ze.body)==null?void 0:nt.scrollTop)!=null?Be:0);return Math.max(0,Number.isFinite(Je)?Je:0,Number.isFinite(lt)?lt:0,Number.isFinite(rt)?rt:0)}return{resolveViewportRoot:ae,resolveScrollContainer:function(ze){var ot,We,Xe,nt;const Be=re();if(Be)return Be;const Je=ae((ot=ze??E.value)!=null?ot:null);if(Je)return Je;const lt=(nt=(Xe=ze?.ownerDocument)!=null?Xe:(We=E.value)==null?void 0:We.ownerDocument)!=null?nt:typeof document<"u"?document:null;return lt?.scrollingElement||lt?.documentElement||null},isReverseFlexScrollRoot:be,getNormalizedScrollTop:Ne,getOffsetTopWithinRoot:function(ze,ot){const We=ot.ownerDocument||ze.ownerDocument||document;if((function(Je,lt){return Je===lt.documentElement||Je===lt.body||Je===lt.scrollingElement})(ot,We))return ze.getBoundingClientRect().top+De(We);const Xe=ot.getBoundingClientRect(),nt=ze.getBoundingClientRect(),Be=Ne(ot,We,!1);return nt.top-Xe.top+Be}}})(O,{isClient:G,scrollRoot:oe});En("markstreamShowTooltips",Ce),En("markstreamHtmlPolicy",ge),En("markstreamTypewriter",f),En("markstreamFade",R(()=>T.fade!==!1)),En("markstreamTypewriterCursor",R(()=>!0)),En("markstreamTextStreamState",K),En("markstreamStreamVersion",ie),En("markstreamParseOptions",R(()=>T.parseOptions)),En("markstreamCustomMarkdownIt",R(()=>T.customMarkdownIt));const{smoothStreamingEnabled:Te,renderContent:st,requestedFinal:Fe,effectiveFinal:Oe}=(function(E,j){const re=kce(mt(mt({},bce),E.smoothStreamingOptions)),ae=R(()=>{var Be,Je,lt;return E.smoothStreaming!==!1&&!((Be=E.nodes)!=null&&Be.length)&&(E.smoothStreaming===!0||!((Je=j.inheritedSmoothStreaming)!=null&&Je.value))&&(E.smoothStreaming===!0||C_(E.typewriter)!=="off"||((lt=E.maxLiveNodes)!=null?lt:0)<=0)}),be=Z(!j.isClient||E.smoothStreaming===!0);dn(()=>{be.value=!0});const Ne=R(()=>be.value&&ae.value),De=R(()=>{var Be;return Ne.value?re.visible.value:(Be=E.content)!=null?Be:""}),ze=R(()=>{var Be,Je;const lt=(Be=E.parseOptions)!=null?Be:{};return(Je=E.final)!=null?Je:lt.final}),ot=R(()=>{const Be=ze.value;return Ne.value&&Be!=null?!!Be&&re.caughtUp.value:Be});let We=0,Xe=!1;function nt(){We=0,Xe=!1}return et([()=>E.content,()=>E.nodes,Ne,ze],([Be,Je,lt,rt])=>{if(Je?.length)return nt(),void re.reset("");const wt=Be??"";if(!lt)return nt(),re.reset(wt),void(rt&&re.finish({flush:!0}));const dt=re.source.value;if(wt){if(wt!==dt)if(wt.startsWith(dt)){const Nt=wt.slice(dt.length),Dt=re.pendingChars.value;Nt.length<=8?(We++,Xe||We>=2&&Dt<=8?(Xe=!0,re.reset(wt)):re.enqueue(Nt)):(nt(),re.enqueue(Nt))}else nt(),re.reset(wt)}else nt(),re.reset("");rt&&re.finish()},{immediate:!0}),{smoothStream:re,smoothStreamingEligible:ae,smoothStreamingEnabled:Ne,renderContent:De,requestedFinal:ze,effectiveFinal:ot}})(T,{isClient:G,inheritedSmoothStreaming:Q}),Ye=Fe.value===!0;En("markstreamSmoothStreaming",Te);const ft=Z(!1),$t=Z(!1),Ht=Z(!1);let Yt="",_n=!1,je=null;function Ke(){G&&je!=null&&(window.clearTimeout(je),je=null)}function Ze(){ft.value=!1,Ke()}function zt(E,j){if(!fe.value)return;const re=(function(){if(!fe.value)return null;const ae=Sn(at),be=Sn(tn),Ne=Math.max(fn,be);if(ae<=0&&Ne<=0)return null;const De={total:ae,maxPerFrame:Ne,byLabel:(ze=at,Object.fromEntries(Array.from(ze.entries()).sort((ot,We)=>We[1]-ot[1]||ot[0].localeCompare(We[0]))))};var ze;return at.clear(),tn.clear(),fn=0,De})();console.info(`[markstream-vue][perf] ${E}`,re?rn(mt({},j),{layoutReads:re}):j)}et([()=>T.indexKey,()=>T.customId],()=>{var E,j;Ze(),$t.value=!1,Ht.value=!((E=o.nodes)!=null&&E.length)&&Fe.value!==!0&&!!o.content,Yt=(j=st.value)!=null?j:"",_n=Yt.length>0},{flush:"sync"}),et([()=>o.content,()=>o.nodes,Fe],([E,j,re])=>{!j?.length&&re!==!0&&E&&(Ht.value=!0)},{flush:"sync",immediate:!0}),et([st,()=>o.nodes,Fe],([E,j,re])=>{const ae=E??"";return j?.length||re===!0?(Ze(),$t.value=!1,Yt=ae,void(_n=!0)):(ae.length>0&&(Ht.value=!0),_n?(Yt&&ae.length>Yt.length&&ae.startsWith(Yt)?(ft.value=!0,$t.value=!0,G&&(Ke(),je=window.setTimeout(()=>{var be;je=null,Oe.value===!0||(be=o.nodes)!=null&&be.length||(Kc(),ft.value=!1,Pl())},1200))):(ae.length"u")return null;const Ne=window;if(Ne.__markstreamLayoutReadPerformance)return Ne.__markstreamLayoutReadPerformance;const De={total:0,maxPerFrame:0,byLabel:{}};return Ne.__markstreamLayoutReadPerformance=De,De})();be&&(be.total=Number(be.total||0)+1,be.byLabel[ae]=Number(be.byLabel[ae]||0)+1,be.currentFrameTotal=Number(be.currentFrameTotal||0)+1,be.frameScheduled||(be.frameScheduled=!0,typeof window.requestAnimationFrame!="function"?typeof queueMicrotask!="function"?setTimeout(()=>An(be),0):queueMicrotask(()=>An(be)):window.requestAnimationFrame(()=>An(be))))})(E),Wt||(Wt=!0,G&&typeof window<"u"&&typeof window.requestAnimationFrame=="function"?window.requestAnimationFrame(to):typeof queueMicrotask!="function"?setTimeout(to,0):queueMicrotask(to)))}function Kt(E,j){return ao(E),j()}const Co=T.customId?`renderer-${T.customId}`:`renderer-${Date.now()}-${Math.random().toString(36).slice(2)}`,Po=(function(E){const j=new Map;return{scope:E,cache:j,clear:()=>j.clear()}})(Co),Mn=Co;En(WL,Po);const bn=fs(()=>T.customId),{effectiveCustomHtmlTagsSet:Do,mergedParseOptions:po,parsedNodes:At,getParsedNodesDirtyStartIndex:qs,getParsedNodesRevision:Bo}=vce(T,{instanceMsgId:Co,renderContent:st,effectiveFinal:Oe,smoothStreamingEnabled:Te,debugPerformanceEnabled:fe,customComponentsMap:bn,logPerf:zt});et(At,()=>{ft.value||Po.clear(),ie.value+=1},{immediate:!0});const To=R(()=>({customId:T.customId,customHtmlTags:po.value.customHtmlTags,parseOptions:T.parseOptions,customMarkdownIt:T.customMarkdownIt,htmlPolicy:ge.value,viewportPriority:T.viewportPriority,viewportPriorityOptions:de.value,mode:c.value,domMode:T.domMode,codeRenderer:g.value,codeBlockStream:T.codeBlockStream,codeBlockDarkTheme:T.codeBlockDarkTheme,codeBlockLightTheme:T.codeBlockLightTheme,codeBlockMonacoOptions:T.codeBlockMonacoOptions,renderCodeBlocksAsPre:T.renderCodeBlocksAsPre,codeBlockMinWidth:T.codeBlockMinWidth,codeBlockMaxWidth:T.codeBlockMaxWidth,codeBlockProps:T.codeBlockProps,mermaidProps:T.mermaidProps,d2Props:T.d2Props,infographicProps:T.infographicProps,showTooltips:Ce.value,themes:T.themes,langs:T.langs,isDark:T.isDark,typewriter:f.value,smoothStreamingOptions:T.smoothStreamingOptions,parseCoalesceMs:T.parseCoalesceMs,fade:T.fade}));En("markstreamNestedRendererProps",To);const ai=R(()=>At.value),Tn=R(()=>At.value.length),no=Z(null),Ks=Z(null),ps=Z(null),ui=Z(null),$s=o.indexKey!=null&&String(o.indexKey).startsWith("list-item-"),yo=!$s&&T.customId?g_(T.customId):null,oo=R(()=>yo?(t4.value,g_(T.customId)):null),uo=R(()=>{var E;return!!(!X.value&&T.customId&&!$s&&((E=oo.value)!=null&&E.enabled))}),Xn=R(()=>!!(G&&uo.value)),co=R(()=>{var E;return!!(!X.value&&((E=o.virtualScroll)!=null&&E.enabled))}),Qe=R(()=>co.value),it=Z(!1);dn(()=>{it.value=!0});const Ct=R(()=>!!(G&&co.value));En("markstreamHostScrollManaged",Ct);const en=R(()=>!!(it.value&&Ct.value)),yn=R(()=>Xn.value||Ct.value),Ho=R(()=>Xn.value||en.value),Eo=R(()=>{var E;return yn.value&&((E=oo.value)==null?void 0:E.textEstimation)!==!1});function Io(){const E=ne.value||Kt("getMeasuredContainerWidth.clientWidth",()=>{var j;return((j=O.value)==null?void 0:j.clientWidth)||0});return Number.isFinite(E)&&E>0?E:0}const Zs=R(()=>{const E=Io();return E>0?Math.max(1,Math.round(E)):640}),zo=R(()=>{var E,j;return!(Oe.value!==!0||co.value||c.value!=="chat"&&c.value!=="minimal"||a("maxLiveNodes")||a("liveNodeBuffer")||(E=o.nodes)!=null&&E.length||Ht.value||!(((j=T.maxLiveNodes)!=null?j:0)<=0))}),Lo=R(()=>{var E;return zo.value?50:Math.max(1,(E=T.maxLiveNodes)!=null?E:320)}),Wo=R(()=>{var E;return zo.value?16:Math.max(0,(E=T.liveNodeBuffer)!=null?E:60)}),sn=R(()=>{var E;return!X.value&&T.nodeVirtual!==!1&&!(((E=T.maxLiveNodes)!=null?E:0)<=0&&!zo.value)&&(T.nodeVirtual===!0?At.value.length>0:At.value.length>Lo.value)}),ws=R(()=>sn.value||Xn.value||Ct.value),Uo=R(()=>T.viewportPriority!==!1),Mr=R(()=>!!Uo.value&&!q.value);var Gs;Gs=R(()=>Uo.value),En(RL,Gs);const Vi=R(()=>{var E;return!(X.value||T.deferNodesUntilVisible===!1||((E=T.maxLiveNodes)!=null?E:0)<=0||sn.value||At.value.length>900||T.viewportPriority===!1)}),Ys=Xle(E=>{var j;return ce((j=E??O.value)!=null?j:null)},Uo),{requestFrame:jo,cancelFrame:Vo,hasIdleCallback:Il,isTestEnv:cr}=(function(E){const j=E.isClient&&typeof window.requestAnimationFrame=="function"?window.requestAnimationFrame.bind(window):null,re=E.isClient&&typeof window.cancelAnimationFrame=="function"?window.cancelAnimationFrame.bind(window):null,ae=E.isClient&&typeof window.requestIdleCallback=="function",be=(function(){var Ne;if(typeof globalThis>"u"||!("process"in globalThis))return;const De=(Ne=Object.getOwnPropertyDescriptor(globalThis,"process"))==null?void 0:Ne.value;return De?.env})();return{requestFrame:j,cancelFrame:re,hasIdleCallback:ae,isTestEnv:be?.NODE_ENV==="test"}})({isClient:G}),Tr=R(()=>Oe.value===!0&&!co.value),{resolvedBatchSize:ho,resolvedInitialBatch:ko,batchingEnabled:qi,incrementalRenderingActive:gt,renderedCount:Le,previousRenderContext:Ge,adaptiveBatchSize:Xt,previousBatchConfig:hs}=(function(E,j){var re;const ae=R(()=>{var nt;const Be=Math.trunc((nt=E.renderBatchSize)!=null?nt:80);return Number.isFinite(Be)?Math.max(0,Be):0}),be=R(()=>{var nt;const Be=Math.trunc((nt=E.initialRenderBatchSize)!=null?nt:ae.value);return Number.isFinite(Be)?Math.max(0,Be):ae.value}),Ne=R(()=>!j.renderAsFragment.value&&E.batchRendering!==!1&&ae.value>0&&j.isClient&&!j.isTestEnv),De=Z(0),ze=Z({key:E.indexKey,total:0}),ot=Z(Math.max(1,ae.value||1)),We=R(()=>{var nt,Be,Je;return Ne.value&&!((nt=j.continuousStreaming)!=null&&nt.value)&&!((Be=j.forceFullRenderFinalContent)!=null&&Be.value)&&((Je=E.maxLiveNodes)!=null?Je:0)<=0}),Xe=Z({batchSize:ae.value,initial:be.value,delay:(re=E.renderBatchDelay)!=null?re:16,enabled:We.value});return{resolvedBatchSize:ae,resolvedInitialBatch:be,batchingEnabled:Ne,incrementalRenderingActive:We,renderedCount:De,previousRenderContext:ze,adaptiveBatchSize:ot,previousBatchConfig:Xe}})(T,{isClient:G,isTestEnv:cr,renderAsFragment:X,forceFullRenderFinalContent:Tr,continuousStreaming:R(()=>$t.value&&Oe.value!==!0)}),ts=R(()=>{var E;return!X.value&&T.batchRendering!==!1&&ho.value>0&&!cr&&((E=T.maxLiveNodes)!=null?E:0)<=0&&!Tr.value}),Ll=R(()=>ts.value),tl=R(()=>yn.value||Ll.value),Mi=R(()=>{var E;return tl.value&&((E=oo.value)==null?void 0:E.codeBlockEstimation)!==!1}),fo=new Map,Ki=new Map,Er=new WeakMap;let ci=null;const $l=new WeakMap,qo=new Map,Ir=[];let Xs=[],di=[],se=-1;const xe=Xr(Ir),J=new Set,we=Z(0);let $e=0;const He=Z(0),vt=R(()=>(He.value,Array.from(fo.entries()).sort((E,j)=>E[0]-j[0]))),ut=Z(null),Pt=Z(null);let Tt,ln=null,so=0,Rt=null;function Ot(){Tt.markFallbackHeightPrefixDirty()}function Zn(E){return Tt.getFallbackNodeHeight(E)}function bo(E,j){return Tt.estimateHeightRange(E,j)}function ms(E){return Tt.estimateIndexForOffset(E)}const{activeRestoreAnchor:Ns,getRelativeScrollTopWithinContainer:Js,setRelativeScrollTopWithinContainer:$c,resolveAnchorOffset:V2,clearRestoreReconcile:Nc,scheduleRestoreReconcile:vu,captureRestoreAnchor:Fc,restoreAnchor:Rc,getAnchorDrift:q2}=(function(E){const{isClient:j,containerRef:re,parsedNodeCount:ae,requestFrame:be,cancelFrame:Ne,resolveScrollContainer:De,getNormalizedScrollTop:ze,getOffsetTopWithinRoot:ot,isReverseFlexScrollRoot:We,estimateIndexForOffset:Xe,estimateHeightRange:nt,getFallbackNodeHeight:Be,clamp:Je}=E,lt=Z(null);let rt=null,wt=[];function dt(){const Zt=De(),pn=re.value;if(!Zt||!pn)return null;const vn=Zt.ownerDocument||pn.ownerDocument||document;if(Zt===vn.documentElement||Zt===vn.body||Zt===vn.scrollingElement){const Jn=pn.getBoundingClientRect();return Math.max(0,-Jn.top)}return Math.max(0,ze(Zt,vn,!1)-ot(pn,Zt))}function Nt(Zt){var pn;const vn=De(),Jn=re.value;if(!vn||!Jn)return;const Ps=Math.max(0,Zt),_s=vn.ownerDocument||Jn.ownerDocument||document,$r=_s.defaultView||(typeof window<"u"?window:null);if(vn===_s.documentElement||vn===_s.body||vn===_s.scrollingElement){const il=ze(vn,_s,!0)+Jn.getBoundingClientRect().top;return void((pn=$r?.scrollTo)==null||pn.call($r,0,Math.max(0,il+Ps)))}k_(vn,_s,ot(Jn,vn)+Ps,{isReverseFlexScrollRoot:il=>{var Zf;return(Zf=We?.(il))!=null&&Zf},getNormalizedScrollTop:ze})}function Dt(Zt){const pn=ae.value,vn=Je(Zt.nodeIndex,0,Math.max(0,pn-1));return nt(0,vn)+Math.max(0,Zt.offsetWithinNodePx)}function qt(){if(rt!=null&&(Ne?.(rt),rt=null),j)for(const Zt of wt)window.clearTimeout(Zt);wt=[]}function Ut(Zt){const pn=Dt(Zt),vn=dt();vn!=null&&Math.abs(vn-pn)<=.5||Nt(pn)}return{activeRestoreAnchor:lt,getRelativeScrollTopWithinContainer:dt,setRelativeScrollTopWithinContainer:Nt,resolveAnchorOffset:Dt,clearRestoreReconcile:qt,applyRestoreAnchor:Ut,scheduleRestoreReconcile:function(){lt.value&&j&&rt==null&&(rt=be?be(()=>{rt=null,lt.value&&Ut(lt.value)}):null,rt==null&<.value&&Ut(lt.value))},captureRestoreAnchor:function(){const Zt=dt(),pn=ae.value;if(Zt==null||pn<=0)return null;const vn=Je(Xe(Zt+1),0,pn-1),Jn=nt(0,vn),Ps=Be(vn);return{nodeIndex:vn,offsetWithinNodePx:Je(Zt-Jn,0,Math.max(0,Ps-1))}},restoreAnchor:function(Zt){const pn=ae.value;if(lt.value={nodeIndex:Je(Zt.nodeIndex,0,Math.max(0,pn-1)),offsetWithinNodePx:Math.max(0,Zt.offsetWithinNodePx)},qt(),Ut(lt.value),j)for(const vn of[0,120,280,480])wt.push(window.setTimeout(()=>{lt.value&&Ut(lt.value)},vn))},getAnchorDrift:function(Zt){const pn=dt();return pn==null?null:pn-Dt(Zt)}}})({isClient:G,containerRef:O,parsedNodeCount:Tn,requestFrame:jo,cancelFrame:Vo,resolveScrollContainer:()=>ut.value||ue(),getNormalizedScrollTop:Ue,getOffsetTopWithinRoot:_e,isReverseFlexScrollRoot:Se,estimateIndexForOffset:ms,estimateHeightRange:bo,getFallbackNodeHeight:Zn,clamp:Os}),{nodeHeights:Nl,heightStats:fi,heightTreeSize:Sf,heightSumTree:l0,heightKnownTree:a0,averageNodeHeight:Af,resetHeightMeasurements:u0,pruneHeightMeasurements:c0,rebuildHeightTrees:Oc,recordNodeHeight:K2,removeNodeHeights:Z2,exportHeightCache:ye,importHeightCache:Ae,fenwickRangeSum:qe}=(function(E={}){const j=Jo({}),re=Jo({total:0,count:0}),ae=Z(0),be=Z([]),Ne=Z([]);function De(){for(const Be of Object.keys(j))delete j[Number(Be)];re.total=0,re.count=0,ae.value=0,be.value=[],Ne.value=[]}function ze(Be,Je,lt){for(let rt=Je+1;rt0;rt-=rt&-rt)lt+=Be[rt];return lt}function We(Be){ae.value=Be;const Je=new Array(Be+1).fill(0),lt=new Array(Be+1).fill(0);for(const[rt,wt]of Object.entries(j)){const dt=Number(rt),Nt=Number(wt);!Number.isFinite(dt)||dt<0||dt>=Be||!Number.isFinite(Nt)||Nt<=0||(ze(Je,dt,Nt),ze(lt,dt,1))}be.value=Je,Ne.value=lt}function Xe(Be){if(!Number.isInteger(Be)||Be<0)return!1;const Je=j[Be];if(!Number.isFinite(Je)||Je<=0)return!1;if(delete j[Be],re.total=Math.max(0,re.total-Je),re.count=Math.max(0,re.count-1),ae.value>Be){const lt=be.value,rt=Ne.value;lt.length&&rt.length&&(ze(lt,Be,-Je),ze(rt,Be,-1))}return!0}const nt=R(()=>re.count>0?Math.max(12,re.total/re.count):32);return{nodeHeights:j,heightStats:re,heightTreeSize:ae,heightSumTree:be,heightKnownTree:Ne,averageNodeHeight:nt,resetHeightMeasurements:De,pruneHeightMeasurements:function(Be){if(Be<=0)return void De();let Je=0,lt=0;for(const[rt,wt]of Object.entries(j)){const dt=Number(rt),Nt=Number(wt);!Number.isFinite(dt)||dt<0||dt>=Be||!Number.isFinite(Nt)||Nt<=0?delete j[dt]:(Je+=Nt,lt++)}re.total=Je,re.count=lt},rebuildHeightTrees:We,recordNodeHeight:function(Be,Je,lt={}){(function(rt,wt,dt={}){var Nt;if(!Number.isFinite(wt)||wt<=0)return!1;const Dt=j[rt];if(Dt&&(dt.allowShrink===!1&&wtrt){const qt=be.value,Ut=Ne.value;if(qt.length&&Ut.length)if(Dt){const Zt=wt-Dt;Zt!==0&&ze(qt,rt,Zt)}else ze(qt,rt,wt),ze(Ut,rt,1)}dt.notify!==!1&&((Nt=E.onHeightRecorded)==null||Nt.call(E))})(Be,Je,rn(mt({},lt),{notify:!0}))},removeNodeHeight:function(Be,Je={}){var lt;const rt=Xe(Be);return rt&&Je.notify!==!1&&((lt=E.onHeightRecorded)==null||lt.call(E)),rt},removeNodeHeights:function(Be,Je={}){var lt;let rt=0;for(const wt of Be)Xe(Number(wt))&&rt++;return rt>0&&Je.notify!==!1&&((lt=E.onHeightRecorded)==null||lt.call(E)),rt},exportHeightCache:function(){return Object.entries(j).map(([Be,Je])=>({index:Number(Be),height:Number(Je)})).filter(Be=>Number.isFinite(Be.index)&&Be.index>=0&&Number.isFinite(Be.height)&&Be.height>0).sort((Be,Je)=>Be.index-Je.index)},importHeightCache:function(Be,Je={}){var lt;if(!Array.isArray(Be))return;const rt=ae.value;let wt=!1;if(Je.mode!=="merge"){const dt=Object.keys(j);if(dt.length>0){for(const Nt of dt)delete j[Number(Nt)];wt=!0}}for(const dt of Be){const Nt=Number(dt.index),Dt=Number(dt.height);if(!Number.isInteger(Nt)||Nt<0||rt>0&&Nt>=rt||!Number.isFinite(Dt)||Dt<=0)continue;const qt=j[Nt];qt&&Math.abs(qt-Dt)<=1||(j[Nt]=Dt,wt=!0)}wt&&((function(){let dt=0,Nt=0;const Dt=ae.value;for(const[qt,Ut]of Object.entries(j)){const Zt=Number(qt),pn=Number(Ut);!Number.isFinite(Zt)||Zt<0||Dt>0&&Zt>=Dt||!Number.isFinite(pn)||pn<=0?delete j[Zt]:(dt+=pn,Nt++)}re.total=dt,re.count=Nt})(),rt>0&&We(rt),(lt=E.onHeightRecorded)==null||lt.call(E))},fenwickRangeSum:function(Be,Je,lt){if(lt<=Je)return 0;const rt=ot(Be,lt-1);return Je<=0?rt:rt-ot(Be,Je-1)}}})({onHeightRecorded:()=>{Ot(),Ct.value&&Wf(),Ns.value&&vu(),Pt.value&&jc(),mo("node-resize")}});function Mt(E){Number.isInteger(E)&&E>=0&&J.add(E)}function Jt(E){for(const j of E)Mt(Number(j))}function an(E){$e++;let j=!0;try{const re=E();return j=re!==!1,re}finally{$e--,$e===0&&j&&we.value++}}function $n(){Xs=[],di=[],se=-1,J.clear(),xe.value=Ir}function io(){$n(),an(()=>u0()),qo.clear()}function Fs(E){!Number.isInteger(E)||E<0||E>=At.value.length||qo.set(E,Lf(E))}function yu(E,j,re={}){const ae=Nl[E];Mt(E),K2(E,j,re);const be=Nl[E];return Object.is(ae,be)?(J.delete(E),!1):(be&&be>0?Fs(E):ae&&qo.delete(E),!0)}function Mf(E,j){const re=Kt("getNodeLayoutHeight.slot.offsetHeight",()=>{var ae,be;return(be=(ae=fo.get(E))==null?void 0:ae.offsetHeight)!=null?be:0});return re>0?re:Kt("getNodeLayoutHeight.content.offsetHeight",()=>j.offsetHeight)}function r6(E,j={}){j.mode!=="merge"?$n():Jt(E.map(re=>re.index)),an(()=>Ae(E,j)),wv()}const nl=R(()=>Vi.value&&Mr.value),yF=R(()=>{var E;return!X.value&&T.batchRendering!==!1&&ho.value>0&&((E=T.maxLiveNodes)!=null?E:0)<=0}),kF=R(()=>!X.value&&Ye&&Oe.value===!0&&!sn.value&&!co.value&&!uo.value&&!nl.value&&!yF.value),l6=R(()=>!!Ys&&nl.value),a6=R(()=>sn.value||Ct.value),{focusIndex:Fl,liveRange:Rs,updateLiveRange:Tf}=(function(E,j){const{parsedNodeCount:re,virtualizationEnabled:ae,maxLiveNodesResolved:be,liveNodeBufferResolved:Ne,clamp:De}=j,ze=Ne??R(()=>{var Xe;return Math.max(0,(Xe=E.liveNodeBuffer)!=null?Xe:60)}),ot=Z(0),We=Jo({start:0,end:0});return{liveNodeBufferResolved:ze,focusIndex:ot,liveRange:We,updateLiveRange:function(){const Xe=re.value;if(!ae.value||Xe===0)return We.start=0,void(We.end=Xe);const nt=Math.min(be.value,Xe),Be=ze.value,Je=De(ot.value-Be,0,Math.max(0,Xe-nt));We.start=Je,We.end=Math.min(Xe,Je+nt)}}})(T,{parsedNodeCount:Tn,virtualizationEnabled:sn,maxLiveNodesResolved:Lo,liveNodeBufferResolved:Wo,clamp:Os}),ol=new Map,ku=new Map,fa=new Map,d0=[],Rl=new Map,pa=new Set,u6=Z(0);let G2=!1;const c6=R(()=>(u6.value,pa.size)),Zi=new Map,sl=new Map,d6=Z(0),Y2=R(()=>{d6.value;let E=0;for(const j of Zi.values())E+=Math.max(0,j);return E});let Gi=null;const f0=R(()=>{if(!sn.value)return At.value.length;const E=Wo.value,j=Math.max(Rs.end+E,ko.value),re=Math.min(At.value.length,j);return Math.max(Le.value,re)});function p0(){G2||(G2=!0,queueMicrotask(()=>{G2=!1,u6.value+=1}))}function f6(E,j,re="node-resize"){if(!G||typeof window>"u")return null;const ae=window.setTimeout(()=>{pa.delete(ae)&&p0();try{j()}finally{mo(re)}},Math.max(0,E));return pa.add(ae),p0(),ae}function h0(E){G&&E!=null&&(pa.delete(E)&&p0(),window.clearTimeout(E))}function p6(){if(G&&typeof window<"u")for(const E of pa)window.clearTimeout(E);pa.size&&(pa.clear(),p0()),d0.length=0,fa.clear()}function bF(E){F.value=E}function CF(E){W.value=E}function wF(E){z.value=E}const{cancelScheduledFocusSync:X2,scheduleFocusSync:Lr}=(function(E){const{isClient:j,containerRef:re,virtualizationEnabled:ae,requestFrame:be,cancelFrame:Ne,syncFocusToScroll:De}=E;let ze=null;function ot(){var Xe,nt,Be;return(Be=(nt=(Xe=re.value)==null?void 0:Xe.ownerDocument)==null?void 0:nt.defaultView)!=null?Be:typeof window<"u"?window:null}function We(){if(!ze)return;const Xe=ot();ze.viaTimeout?Xe?Xe.clearTimeout(ze.id):clearTimeout(ze.id):Ne?.(ze.id),ze=null}return{cancelScheduledFocusSync:We,scheduleFocusSync:function(Xe={}){if(!ae.value)return;if(!j)return void De(!0);if(Xe.immediate)return We(),void De(!0);if(ze)return;const nt=()=>{ze=null,De()};if(be)return void(ze={id:be(nt),viaTimeout:!1});const Be=ot();ze={id:Be?Be.setTimeout(nt,16):setTimeout(nt,16),viaTimeout:!0}}}})({isClient:G,containerRef:O,virtualizationEnabled:sn,requestFrame:jo,cancelFrame:Vo,syncFocusToScroll:function(E=!1){var j;if(!sn.value)return;const re=ut.value||ue();if(!re)return;const ae=re.ownerDocument||((j=O.value)==null?void 0:j.ownerDocument)||document,be=ae?.defaultView||(typeof window<"u"?window:null),Ne=re===ae?.documentElement||re===ae?.body,De=At.value.length;if(De<=0)return;if(!Ne&&De>0&&Se(re)){const rt=Kt("syncFocusToScroll.clientHeight",()=>re.clientHeight||0),wt=Kt("syncFocusToScroll.scrollTop",()=>re.scrollTop),dt=wt<0?-wt:wt;return void v0(Os((ze=Math.max(0,dt)+.5*Math.max(0,rt),Tt.estimateIndexForOffsetFromEnd(ze)),0,Math.max(0,De-1)),E)}var ze;const ot=(function(rt,wt,dt,Nt){const Dt=O.value;if(!Dt)return null;const qt=Nt?0:Kt("syncFocusToScroll.model.root.getBoundingClientRect",()=>rt.getBoundingClientRect().top),Ut=Kt("syncFocusToScroll.model.container.getBoundingClientRect",()=>Dt.getBoundingClientRect().top),Zt=Math.max(0,qt-Ut),pn=Nt?Kt("syncFocusToScroll.model.viewport.clientHeight",()=>{var vn,Jn,Ps,_s;return(_s=(Ps=(Jn=dt?.innerHeight)!=null?Jn:(vn=wt.documentElement)==null?void 0:vn.clientHeight)!=null?Ps:rt.clientHeight)!=null?_s:0}):Kt("syncFocusToScroll.model.root.clientHeight",()=>rt.clientHeight);return Os(ms(Zt+.5*Math.max(0,pn)),0,Math.max(0,At.value.length-1))})(re,ae,be,Ne);if(ot!=null)return void v0(ot,E);const We=Ne?null:Kt("syncFocusToScroll.root.getBoundingClientRect",()=>re.getBoundingClientRect()),Xe=Ne?0:We.top,nt=Ne?Kt("syncFocusToScroll.viewport.clientHeight",()=>{var rt,wt;return(wt=(rt=be?.innerHeight)!=null?rt:re.clientHeight)!=null?wt:0}):We.bottom,Be=vt.value;let Je=null,lt=null;for(const[rt,wt]of Be){if(!wt)continue;const dt=Kt("syncFocusToScroll.slot.getBoundingClientRect",()=>wt.getBoundingClientRect());dt.bottom<=Xe||dt.top>=nt||(Je==null&&(Je=rt),lt=rt)}if(Je==null||lt==null){const rt=O.value;if(!rt)return;const wt=Ne?{top:0}:Kt("syncFocusToScroll.fallback.root.getBoundingClientRect",()=>re.getBoundingClientRect()),dt=Kt("syncFocusToScroll.fallback.scrollTop",()=>Ue(re,ae,Ne)),Nt=Ne?(()=>{const qt=Kt("syncFocusToScroll.fallback.container.getBoundingClientRect",()=>rt.getBoundingClientRect()),Ut=(Ne?0:wt.top)-qt.top;return Math.max(0,Ut)})():(()=>{const qt=_e(rt,re);return Math.max(0,dt-qt)})(),Dt=Ne?Kt("syncFocusToScroll.fallback.viewport.clientHeight",()=>{var qt,Ut,Zt,pn;return(pn=(Zt=(Ut=be?.innerHeight)!=null?Ut:(qt=ae?.documentElement)==null?void 0:qt.clientHeight)!=null?Zt:re.clientHeight)!=null?pn:0}):Kt("syncFocusToScroll.fallback.root.clientHeight",()=>re.clientHeight);return void v0(Os(ms(Nt+.5*Math.max(0,Dt)),0,Math.max(0,At.value.length-1)),!0)}v0(Math.round((Je+lt)/2),E)}}),{visibleNodeIndices:J2,nodeVisibilityHandles:Pc,nodeVisibilityWatchStops:m0,nodeVisibilityFallbackTimers:h6,clearVisibilityFallback:g0,markNodeVisible:ha,cleanupNodeVisibility:_F,destroyNodeVisibilityState:Q2}=yce({isClient:G,shouldTrackVisibleNodeIndices:()=>nl.value,shouldCleanupNodeVisibility:()=>sn.value,onNodeMarkedVisible:E=>{sn.value?Lr():Fl.value=Os(E,0,Math.max(0,At.value.length-1))},onNodeVisibilityCleaned:E=>{fo.delete(E)&&W6()}}),{cleanupScrollListener:m6,setupScrollListener:xF}=(function(E){const{isClient:j,virtualizationEnabled:re,listenerEnabled:ae,scrollRootElement:be,resolveScrollContainer:Ne,scheduleFocusSync:De,onScroll:ze}=E;let ot=null,We=null;function Xe(){ot&&(ot(),ot=null),We=null,be.value=null}function nt(Be){const Je=E.getScrollTop?E.getScrollTop(Be):Be.scrollTop;return Math.max(0,Number.isFinite(Je)?Math.abs(Je):0)}return{cleanupScrollListener:Xe,setupScrollListener:function(){if(!j)return;if(!((Be=ae?.value)!=null?Be:re.value))return void Xe();var Be;const Je=Ne();if(!Je)return void Xe();if(be.value===Je&&ot)return;Xe(),We=nt(Je);const lt=()=>{if(ze?.(),re.value){const rt=(function(wt){const dt=nt(wt),Nt=We;We=dt;const Dt=Math.max(480,.75*(wt.clientHeight||0));return Nt==null?dt>Dt?{immediate:!0}:void 0:Math.abs(dt-Nt)>Dt?{immediate:!0}:void 0})(Je);rt?De(rt):De()}};Je.addEventListener("scroll",lt,{passive:!0}),be.value=Je,ot=()=>{Je.removeEventListener("scroll",lt)}}}})({isClient:G,virtualizationEnabled:sn,listenerEnabled:a6,scrollRootElement:ut,resolveScrollContainer:ue,scheduleFocusSync:Lr,onScroll:function(){const E=Pt.value;if(!E)return;const j=If();if(!j||(function(ae){if(Of()>=so)return Rt=null,!1;const be=Rt;if(be==null)return!0;const Ne=Math.abs(ae.scrollTop-be)<=2;return Ne||(Rt=null),Ne})(j))return;const re=I6(j);re!=null?(re<-32||Math.abs(Math.max(0,re)-Math.max(0,E.distanceFromBottomPx))>32)&&Uc("restore"):Uc("restore")},getScrollTop:E=>{var j;const re=E.ownerDocument||((j=O.value)==null?void 0:j.ownerDocument)||document,ae=E===re.documentElement||E===re.body||E===re.scrollingElement;return Kt("scrollListener.getScrollTop",()=>Ue(E,re,ae))}});function v0(E,j=!1){const re=Os(E,0,Math.max(0,At.value.length-1));!j&&Math.abs(re-Fl.value)<=1||(Fl.value=re,Tf())}function Os(E,j,re){return Math.min(Math.max(E,j),re)}function ev(E=At.value.length){const j=qs();return!Number.isInteger(j)||j<0?E:Os(j,0,E)}function tv(E){return E?.firstElementChild}function g6(E,j){var re;return E?(re=E.matches)!=null&&re.call(E,j)?E:E.querySelector(j):null}function SF(E,j){E<1||E>6||(U[E]=j)}function v6(){if(!yn.value)return void(ne.value=0);const E=Kt("updateExperimentContainerWidth.clientWidth",()=>{var j,re;return(re=(j=O.value)==null?void 0:j.clientWidth)!=null?re:0});ne.value=E>0?E:0}let Ef=null;function nv(){Ef?.disconnect(),Ef=null}const y6=S1("ViewportDeferredMarkdownCodeBlockNode",zr({loader:()=>vo(null,null,function*(){return(yield Go(()=>import("./index5-DRizs5us.js"),__vite__mapDeps([6,4,5]))).default}),loadingComponent:ag,delay:0,suspensible:!1}),ag);function k6(E){return E===y6}const b6=R(()=>g.value==="pre"?Ri:g.value==="shiki"?y6:G9);function C6(){var E;return((E=T.codeBlockProps)==null?void 0:E.showHeader)!==!1}function w6(E,j,re){const ae=Nl[j],be=typeof ae=="number"&&ae>0;if(Eo.value&&!be&&!(function(Ne){return!!bn.value.paragraph&&(Ne.type==="paragraph"||Ne.type==="list_item"||Ne.type==="list")})(E)){const Ne=zL(E,re,Y.value);if(Ne)return Ne}if(Mi.value&&E.type==="code_block"){const Ne=(function(De){if(De.type!=="code_block")return null;const ze=e7(De,M0(De));return k6(ze)?"markdown":ze===Ri?"pre":ze===b6.value||ze===G9?"monaco":null})(E);if(Ne==="monaco"||Ne==="markdown"||Ne==="pre")return(function(De,ze){var ot,We,Xe;if(!De||De.type!=="code_block")return null;const nt=ze.rendererKind,Be=nt!=="pre"&&ze.showHeader!==!1,Je=!!De.diff;let lt=0,rt=500;if(nt==="monaco"){const dt=(ot=ze.monacoOptions)!=null?ot:{},Nt=s4(De,dt,ze.width),Dt=(function(Ut){const Zt=typeof Ut?.fontSize=="number"&&Ut.fontSize>0?Ut.fontSize:12;return typeof Ut?.lineHeight=="number"&&Ut.lineHeight>0?Ut.lineHeight:Math.round(1.5*Zt)})(dt),qt=(function(Ut,Zt){var pn,vn;const Jn=typeof((pn=Ut?.padding)==null?void 0:pn.top)=="number"?Ut.padding.top:Zt?0:8,Ps=typeof((vn=Ut?.padding)==null?void 0:vn.bottom)=="number"?Ut.padding.bottom:Zt?0:8;return Math.max(0,Jn)+Math.max(0,Ps)})(dt,Je);rt=typeof dt.MAX_HEIGHT=="number"&&dt.MAX_HEIGHT>0?dt.MAX_HEIGHT:500,lt=Math.round(Nt*Dt+qt)}else if(nt==="markdown"){const dt=s4(De);lt=Math.round(21*dt+32)}else{const dt=s4(De);lt=Math.round(28*dt),rt=Number.POSITIVE_INFINITY}const wt=Math.max(1,Math.min(lt,rt));return mt({kind:"code-block",height:Math.round(wt+(Be?40:0)),contentHeight:wt,rendererKind:nt},Je&&nt==="monaco"?{diffInline:h5((We=ze.monacoOptions)!=null?We:{},(Xe=ze.width)!=null?Xe:0)}:{})})(E,{rendererKind:Ne,monacoOptions:T.codeBlockMonacoOptions,showHeader:C6(),width:re})}return null}JS(()=>{if(we.value,$e>0)return;const E=At.value,j=Bo();if(!E.length||!tl.value)return Xs=[],di=[],se=-1,J.clear(),void(xe.value=Ir);const re=ne.value||Kt("estimatedNodeHeights.clientWidth",()=>{var We;return((We=O.value)==null?void 0:We.clientWidth)||0});if(!Number.isFinite(re)||re<=0)return Xs=[],di=[],se=-1,J.clear(),void(xe.value=Ir);const ae=(function(We){return[Math.round(We),Eo.value,Mi.value,Y.value,T.codeBlockMonacoOptions,C6(),g.value,bn.value,t4.value]})(re),be=Xs.length<=E.length&&(De=ae,(Ne=di).length===De.length&&Ne.every((We,Xe)=>Object.is(We,De[Xe])));var Ne,De;const ze=be&&se===j?E.length:be?ev(E.length):0,ot=be?Array.from(J):[];Xs.length=E.length;for(let We=ze;We=0&&Wexe.value);Tt=(function(E){let j=!0,re=[0],ae="";function be(Xe){var nt;const Be=E.nodeHeights[Xe];if(Number.isFinite(Be)&&Be>0)return Be;const Je=E.parsedNodes.value[Xe],lt=Je?.type,rt=!!((nt=E.hasCustomParagraphComponent)!=null&&nt.call(E)),wt=E.estimatedNodeHeights.value[Xe],dt=wt?.height;if(!(function(Dt,qt,Ut){return!!(Ut&&qt?.kind==="simple-text"&&(Dt==="paragraph"||Dt==="list_item"||Dt==="list"))})(lt,wt,rt)&&Number.isFinite(dt)&&dt>0)return dt;const Nt=rce(Je,E.getContainerWidth()||640);return lt==="heading"||lt==="paragraph"&&Nt<=28&&(function(Dt,qt){if(qt)return!1;const Ut=Dt.children;return!Array.isArray(Ut)||!Ut.length||Ut.every(UL)})(Je,rt)?Nt:Math.max(E.averageNodeHeight.value,Nt)}function Ne(){var Xe;const nt=E.parsedNodes.value.length,Be=E.getPrefixCacheKeyParts().join(":");if(!j&&ae===Be)return re;const Je=new Array(nt+1);Je[0]=0;for(let lt=0;lt=((nt=lt[Je])!=null?nt:0))return Je-1;let rt=0,wt=Je-1,dt=Je-1;for(;rt<=wt;){const Nt=rt+wt>>1;((Be=lt[Nt+1])!=null?Be:0)>=Xe?(dt=Nt,wt=Nt-1):rt=Nt+1}return dt}function ze(Xe,nt){var Be,Je;if(Xe>=nt)return 0;if(E.heightEstimationActive.value)return(function(wt,dt){var Nt,Dt;const qt=E.parsedNodes.value.length,Ut=w_(Math.trunc(wt),0,qt),Zt=w_(Math.trunc(dt),Ut,qt);if(Ut>=Zt)return 0;const pn=Ne();return((Nt=pn[Zt])!=null?Nt:0)-((Dt=pn[Ut])!=null?Dt:0)})(Xe,nt);if(E.heightTreeSize.value!==E.parsedNodes.value.length){let wt=0;for(let dt=Xe;dtUt<=0?0:E.fenwickRangeSum(rt,0,Ut)+(Ut-E.fenwickRangeSum(wt,0,Ut))*lt;let Nt=0,Dt=Be.length-1,qt=Be.length-1;for(;Nt<=Dt;){const Ut=Nt+Dt>>1;dt(Ut+1)>=Xe?(qt=Ut,Dt=Ut-1):Nt=Ut+1}return qt}let Je=Xe;for(let lt=0;lt0||Xe++}return Xe}return{markFallbackHeightPrefixDirty:function(){j=!0},getFallbackNodeHeight:be,estimateHeightRange:ze,estimateIndexForOffset:ot,estimateIndexForOffsetFromEnd:function(Xe){var nt,Be;const Je=E.parsedNodes.value;if(!Je.length)return 0;if(Xe<=0)return Math.max(0,Je.length-1);if(E.heightEstimationActive.value){const rt=(nt=Ne()[Je.length])!=null?nt:0;return De(Math.max(0,rt-Xe))}if(E.heightTreeSize.value===Je.length){const rt=ze(0,Je.length);return ot(Math.max(0,rt-Xe))}let lt=Xe;for(let rt=Je.length-1;rt>=0;rt--){const wt=(Be=E.nodeHeights[rt])!=null?Be:E.averageNodeHeight.value;if(lt<=wt)return rt;lt-=wt}return 0},getEstimatedNodeHeightCount:We,buildVirtualHeightSummary:function(Xe){var nt;const Be=E.parsedNodes.value.length;return{totalNodes:Be,measuredCount:E.heightStats.count,estimatedCount:We(),averageNodeHeight:E.averageNodeHeight.value,topSpacerHeight:Xe.topSpacerHeight,bottomSpacerHeight:Xe.bottomSpacerHeight,estimatedTotalHeight:ze(0,Be),width:(nt=Xe.width)!=null?nt:E.getContainerWidth()}}}})({parsedNodes:At,nodeHeights:Nl,heightStats:fi,heightTreeSize:Sf,heightSumTree:l0,heightKnownTree:a0,averageNodeHeight:Af,heightEstimationActive:yn,estimatedNodeHeights:Dc,getContainerWidth:Io,hasCustomParagraphComponent:()=>!!bn.value.paragraph,getPrefixCacheKeyParts:()=>{var E;const j=a1(ne.value||Kt("getFallbackHeightPrefix.clientWidth",()=>{var ae;return((ae=O.value)==null?void 0:ae.clientWidth)||0})),re=((E=o.virtualScroll)==null?void 0:E.measurementKey)==null?"":String(o.virtualScroll.measurementKey);return[At.value.length,fi.count,Math.round(fi.total),Math.round(100*Af.value),re,j,yn.value?1:0,t4.value,ie.value,bn.value.paragraph?1:0]},fenwickRangeSum:qe}),et(()=>At.value.length,E=>{var j;Ot(),E<=0?io():(Ec0(j))),E!==Sf.value&&Oc(E))},{immediate:!0});const AF=R(()=>{if(!sn.value)return At.value.map((ae,be)=>({node:ae,index:be}));const E=At.value.length,j=Os(Rs.start,0,E),re=Os(Rs.end,j,E);return At.value.slice(j,re).map((ae,be)=>({node:ae,index:j+be}))}),ov=R(()=>sn.value?bo(0,Math.min(Rs.start,At.value.length)):0),sv=R(()=>{if(!sn.value)return 0;const E=At.value.length;return bo(Math.min(Rs.end,E),E)});function _6(){return Tt.buildVirtualHeightSummary({topSpacerHeight:ov.value,bottomSpacerHeight:sv.value,width:bu()})}function MF(){const E=At.value,j=_6();return rn(mt({},j),{probe:{paragraphReady:!!Y.value.paragraph,listItemReady:!!Y.value.listItem,listWrapperOverhead:Y.value.listWrapperOverhead,headingReadyLevels:Object.entries(Y.value.headings).filter(([,re])=>!!re).map(([re])=>Number(re))},nodes:E.map((re,ae)=>{var be,Ne,De,ze,ot,We,Xe,nt,Be;return{index:ae,type:re.type,estimateKind:(Ne=(be=Dc.value[ae])==null?void 0:be.kind)!=null?Ne:null,rendererKind:(ze=(De=Dc.value[ae])==null?void 0:De.rendererKind)!=null?ze:null,estimatedHeight:(We=(ot=Dc.value[ae])==null?void 0:ot.height)!=null?We:null,estimatedContentHeight:(nt=(Xe=Dc.value[ae])==null?void 0:Xe.contentHeight)!=null?nt:null,measuredHeight:(Be=Nl[ae])!=null?Be:null}})})}function iv(){return o.indexKey!=null?String(o.indexKey):co.value?`virtual-${wo()}`:"markdown-renderer"}function x6(E){const j=String(E),re=`${iv()}-`;if(!j.startsWith(re))return null;const ae=j.slice(re.length).match(/^(\d+)(?:$|-)/);if(!ae)return null;const be=Number(ae[1]);return!Number.isInteger(be)||be<0||be>=At.value.length?null:be}function wo(){var E,j,re;const ae=(E=o.virtualScroll)==null?void 0:E.sessionKey;return String(ae!=null&&ae!==""?ae:(re=(j=o.indexKey)!=null?j:T.customId)!=null?re:Co)}function ns(){var E;const j=(E=o.virtualScroll)==null?void 0:E.threadKey;return j==null||j===""?void 0:String(j)}const TF=R(()=>{var E,j,re;return(re=ns())!=null?re:String((j=(E=o.indexKey)!=null?E:T.customId)!=null?j:Co)});function rv(E){var j;return(E??"")===((j=ns())!=null?j:"")}function Ol(){var E,j,re;return j=(E=o.virtualScroll)==null?void 0:E.measurementKey,re=(function(){const ae=g.value;return(function(be){var Ne,De;const ze=be.renderer,ot=ze==="monaco"?be.codeBlockMonacoOptions:void 0,We=be.codeBlockProps,Xe=ze==="shiki";return[be.isDark?"dark":"light",ze==="monaco"?"code-rich":ze==="pre"?"code-pre":"code-shiki",be.codeBlockStream===!1?"code-static":"code-stream",xs(be.codeBlockMinWidth),xs(be.codeBlockMaxWidth),...Xe?[Gre((Ne=We?.themes)!=null?Ne:be.themes,(De=We?.langs)!=null?De:be.langs)]:[],xs(ot?.fontSize),xs(ot?.lineHeight),xs(ot?.fontFamily),xs(ot?.tabSize),xs(ot?.MAX_HEIGHT),xs(ot?.wordWrap),xs(ot?.wrappingIndent),xs(ot?.padding),xs(We?.showHeader),xs(We?.showCopyButton),xs(We?.showExpandButton),xs(We?.showPreviewButton),xs(We?.showCollapseButton),xs(We?.showFontSizeButtons)].join("\0")})({renderer:ae,isDark:T.isDark,codeBlockStream:T.codeBlockStream,codeBlockMinWidth:T.codeBlockMinWidth,codeBlockMaxWidth:T.codeBlockMaxWidth,codeBlockMonacoOptions:ae==="monaco"?T.codeBlockMonacoOptions:void 0,codeBlockProps:T.codeBlockProps,themes:ae==="shiki"?T.themes:void 0,langs:ae==="shiki"?T.langs:void 0})})(),[j==null?"":String(j),re].join("\0")}function bu(){return Io()}const y0=R(()=>a1(bu())),Yi=R(()=>[Ol(),y0.value].join("\0")),EF=R(()=>{var E;return co.value?["virtual",(E=ns())!=null?E:"",wo(),Yi.value].join("\0"):o.indexKey});function Bc(){d6.value+=1}function lv(E){return!(!E||!Number.isInteger(E.index)||E.index<0||E.index>=At.value.length||E.sessionKey!==wo()||E.threadKey!==ns()||E.layoutEpochKey!==Yi.value)}function S6(E){const j=String(E),re=sl.get(j);return re?lv(re)?re.index:null:x6(j)}function A6(E="async-node"){(Zi.size||sl.size)&&(Zi.clear(),sl.clear(),Bc(),mo(E))}const Hc=on(F3,null),av={reportHeight(E,j){if(!Ct.value)return;const re=S6(E);if(re==null)return;const ae=ol.get(re);if(!ae)return;const be=Number(j),Ne=Mf(re,ae);(function(De,ze,ot={}){an(()=>yu(De,ze,ot))})(re,Number.isFinite(be)&&be>0?Math.max(be,Ne||0):Ne)},markPending(E){if(!Ct.value)return;const j=x6(E);j!=null&&(function(re,ae){var be;const Ne=sl.get(re);if(Ne&&lv(Ne))return Zi.set(re,Math.max(0,(be=Zi.get(re))!=null?be:0)+1),Bc(),void mo("async-node");Zi.set(re,1),sl.set(re,(function(De){return{index:De,sessionKey:wo(),threadKey:ns(),layoutEpochKey:Yi.value}})(ae)),Bc(),mo("async-node")})(String(E),j)},markSettled(E){if(!Ct.value)return;const j=String(E),re=S6(E);(re!=null||(function(ae){return Zi.has(String(ae))})(j))&&(function(ae){var be;const Ne=(be=Zi.get(ae))!=null?be:0;return!(Ne<=0||(Ne<=1?(Zi.delete(ae),sl.delete(ae)):Zi.set(ae,Ne-1),Bc(),Ne===1&&mo("async-node"),0))})(j)&&re!=null&&Pl()}};function IF(){let E=0;for(const j of ol.values())E+=Kt("getVisibleDomHeight.offsetHeight",()=>{var re;return(re=j?.offsetHeight)!=null?re:0});return Math.ceil(Math.max(0,E))}En(F3,{reportHeight(E,j){av.reportHeight(E,j),Hc?.reportHeight(E,j)},markPending(E){av.markPending(E),Hc?.markPending(E)},markSettled(E){av.markSettled(E),Hc?.markSettled(E)}});let uv,cv=null,zc=null;function k0(E){return E!==!1&&E!=null&&E!==""}function M6(){return sn.value?(function(){if(!sn.value)return!0;const E=At.value.length,j=Os(Rs.start,0,E),re=Os(Rs.end,j,E);if(j>=re)return!0;for(let ae=j;ae=f0.value}function dv(){return Oe.value===!0&&!ft.value&&Y2.value===0&&pa.size===0&&Rl.size===0&&Gi==null&&M6()}function T6(){var E,j;if(((E=o.virtualScroll)==null?void 0:E.settleMode)!=="manual"||cv===wo()&&uv===ns())return!0;const re=(j=o.virtualScroll)==null?void 0:j.settledToken;return!!k0(re)&&zc===Uf(re)}function fv(){return dv()&&T6()}function LF(E,j){return j.totalNodes<=0?E==="final"?"final":"estimate":j.measuredCount>=j.totalNodes?E==="final"?"final":"measured":j.measuredCount>0||j.estimatedCount>0?"mixed":"estimate"}function Cu(E="manual",j){const re=_6(),ae=(function(be){return be||(Oe.value!==!0?At.value.length>0?"streaming":"estimating":!M6()||Rl.size>0||Gi!=null?"measuring":fv()?"settled":"settling")})(j);return{sessionKey:wo(),threadKey:ns(),phase:ae,nodeCount:re.totalNodes,liveRange:{start:Rs.start,end:Rs.end},renderedCount:Le.value,measuredCount:re.measuredCount,estimatedCount:re.estimatedCount,averageNodeHeight:re.averageNodeHeight,topSpacerHeight:re.topSpacerHeight,bottomSpacerHeight:re.bottomSpacerHeight,visibleDomHeight:IF(),totalHeight:E6(),width:re.width,final:Oe.value===!0,stable:fv(),confidence:LF(ae,re),reason:E}}function If(){const E=ut.value||ue(),j=O.value;if(!E||!j)return null;const re=E.ownerDocument||j.ownerDocument||document,ae=E===re.documentElement||E===re.body||E===re.scrollingElement,be=Kt("getScrollBox.scrollTop",()=>Ue(E,re,ae)),Ne=Kt("getScrollBox.scrollHeight",()=>{var ze,ot,We,Xe,nt;return ae?Math.max((ot=(ze=re.documentElement)==null?void 0:ze.scrollHeight)!=null?ot:0,(Xe=(We=re.body)==null?void 0:We.scrollHeight)!=null?Xe:0,(nt=E.scrollHeight)!=null?nt:0):E.scrollHeight}),De=Kt("getScrollBox.clientHeight",()=>{var ze;return ae?((ze=re.documentElement)==null?void 0:ze.clientHeight)||E.clientHeight||0:E.clientHeight});return{root:E,doc:re,isViewportRoot:ae,scrollTop:be,scrollHeight:Ne,clientHeight:De}}function E6(){const E=At.value.length,j=Math.max(0,bo(0,E)),re=Kt("getRendererLogicalHeight.offsetHeight",()=>{var be,Ne;return(Ne=(be=O.value)==null?void 0:be.offsetHeight)!=null?Ne:0}),ae=Math.max(0,re>0?re:Kt("getRendererLogicalHeight.scrollHeight",()=>{var be,Ne;return(Ne=(be=O.value)==null?void 0:be.scrollHeight)!=null?Ne:0}));return E<=0?Math.ceil(re):sn.value?j>0?Math.max(1,Math.ceil(j),(function(){let be=ov.value+sv.value;for(const Ne of fo.values())Ne&&(be+=Math.max(0,Kt("getVirtualizedDomLogicalHeight.offsetHeight",()=>Ne.offsetHeight||0)));return Math.ceil(Math.max(0,be))})(),(function(be,Ne){return be<=0||Ne<=0?0:Ne<=be+Math.max(512,.05*be)?Math.ceil(Ne):0})(j,ae)):Math.max(1,Math.ceil(ae)):Ct.value?j>0||fi.count>0||Tt.getEstimatedNodeHeightCount()>0?(gt.value&&Le.value,Math.max(1,Math.ceil(ae),Math.ceil(j))):Math.ceil(ae):Math.max(1,Math.ceil(ae),Math.ceil(j))}function I6(E){const j=O.value;if(!j)return null;const re=Kt("getRendererBottomDistanceFromViewport.getBoundingClientRect",()=>j.getBoundingClientRect());return(function(be){return be.isViewportRoot?be.clientHeight:Kt("getViewportBottomInRoot.getBoundingClientRect",()=>be.root.getBoundingClientRect().bottom)})(E)-re.bottom}function $F(E={}){const j=E.requireViewport!==!1,re=(function(Ne=64){const De=If(),ze=O.value;if(!De||!ze)return!1;const ot=(function(Xe){if(Xe.isViewportRoot)return{top:0,bottom:Xe.clientHeight};const nt=Kt("getVirtualViewportRect.getBoundingClientRect",()=>Xe.root.getBoundingClientRect());return{top:nt.top,bottom:nt.bottom}})(De),We=Kt("isRendererNearVirtualViewport.getBoundingClientRect",()=>ze.getBoundingClientRect());return We.bottom>=ot.top-Ne&&We.top<=ot.bottom+Ne})();if(j&&!re)return null;const ae=(function(){const Ne=If(),De=O.value;if(!Ne||!De||Math.max(0,Ne.scrollHeight-Ne.scrollTop-Ne.clientHeight)>64)return null;const ze=I6(Ne);return ze==null?null:ze>=-8&&ze<=160?{type:"bottom",distanceFromBottomPx:Math.max(0,ze)}:null})();if(ae)return{anchor:ae,captured:!0};const be=Fc();if(be)return{anchor:{type:"node",nodeIndex:be.nodeIndex,offsetWithinNodePx:be.offsetWithinNodePx},captured:re};if(E.allowFallback===!0){const Ne=(function(){const De=At.value.length;return De<=0?null:{type:"node",nodeIndex:Os(Fl.value,0,Math.max(0,De-1)),offsetWithinNodePx:0}})();return Ne?{anchor:Ne,captured:!1}:null}return null}function pv(E){let j=2166136261;for(let re=0;re>>0).toString(36)}function NF(E,j){let re=E;for(let ae=0;ae8192?`${ae.slice(0,8192)}...${ae.length}`:ae;return`${ae.length}:${pv(be)}`})(E)}`;if(typeof E=="function")return"fn";if(typeof E!="object")return typeof E;if(j.has(E))return"cycle";if(re>=6)return"max-depth";j.add(E);try{if(Array.isArray(E)){if(E.length<=160){const We=[];for(let Xe=0;Xe=ze&&De.push(Xe)}return[`a:${E.length}`,`h=${Ne.join(",")}`,`t=${De.join(",")}`,`all=${(ot>>>0).toString(36)}`].join(":")}const ae=E,be=Object.keys(ae).filter(Ne=>{const De=ae[Ne];return Ne!=="parent"&&Ne!=="el"&&Ne!=="component"&&(De==null||typeof De=="string"||typeof De=="number"||typeof De=="boolean"||FF.has(Ne))}).sort();return`o:${be.length}:${be.map(Ne=>`${Ne}=${b0(ae[Ne],j,re+1)}`).join(";")}`}finally{j.delete(E)}}let hv=-1,mv="",wu=[2166136261];function Lf(E){const j=At.value[E];return j?pv(b0(j)):""}function RF(E,j){let re=E;for(let ae=0;ae>>0}function gv(){var E,j;const re=ie.value;if(hv===re)return mv;const ae=At.value.length;let be=ev(ae);(hv!==re-1||be>ae||wu.length>>0).toString(36),hv=re,mv}function Wc(E,j={}){var re;const ae=j.includeHeightCache===!0,be=(re=j.includeContentHash)!=null?re:ae,Ne=ae?(function(ze){const ot=(function(){var rt,wt;const dt=Number((wt=(rt=o.virtualScroll)==null?void 0:rt.heightCacheLimit)!=null?wt:5e3);return!Number.isFinite(dt)||dt<=0?Number.POSITIVE_INFINITY:Math.max(1,Math.trunc(dt))})();if(!Number.isFinite(ot)||ze.length<=ot)return ze;const We=new Map,Xe=rt=>{!rt||We.size>=ot||We.set(rt.index,rt)},nt=At.value.length,Be=Os(Rs.start-2*Wo.value,0,nt),Je=Os(Rs.end+2*Wo.value,Be,nt);for(const rt of ze)rt.index>=Be&&rt.index=0&&We.sizert.index-wt.index).slice(0,ot)})(ye().map(ze=>{var ot;const We=At.value[ze.index];return We?rn(mt({},ze),{nodeType:String((ot=We.type)!=null?ot:""),signature:Lf(ze.index)}):null}).filter(ze=>!!ze)):[],De=$F({allowFallback:j.allowAnchorFallback===!0,requireViewport:j.requireViewport});return De||Ne.length||j.includeEmptyState===!0?rn(mt({sessionKey:E.sessionKey,threadKey:E.threadKey},De?{anchor:De.anchor,anchorCaptured:De.captured}:{anchorCaptured:!1}),{metrics:E,width:E.width,contentHash:be?gv():void 0,measurementKey:Ol()||void 0,heightCache:Ne.length?Ne:void 0}):null}function vv(E){var j,re;const ae=If();if(!ae)return;const be=(function(ze){const ot=O.value;if(!ot)return null;const We=_e(ot,ze.root),Xe=At.value.length,nt=Kt("getRendererBottomOffsetWithinRoot.offsetHeight",()=>ot.offsetHeight||0),Be=Math.max(0,nt>0?nt:Xe>0?Kt("getRendererBottomOffsetWithinRoot.scrollHeight",()=>ot.scrollHeight||0):0),Je=E6();return We+Math.max(Be,Je)})(ae);if(be==null)return;const Ne=Math.max(0,E.distanceFromBottomPx),De=Math.max(0,be-ae.clientHeight-Ne);(function(ze){so=Of()+120,Rt=ze})(De),ae.isViewportRoot?(re=(j=ae.doc.defaultView)==null?void 0:j.scrollTo)==null||re.call(j,0,De):k_(ae.root,ae.doc,De,{isReverseFlexScrollRoot:Se,getNormalizedScrollTop:Ue})}const yv=[];function L6(){if(G)for(ln!=null&&(Vo?.(ln),ln=null);yv.length;){const E=yv.pop();E!=null&&window.clearTimeout(E)}}function Uc(E){const j=!!Pt.value;Pt.value=null,so=0,Rt=null,L6(),j&&E&&mo(E)}function jc(){if(!Pt.value||!G||ln!=null)return;const E=()=>{ln=null;const j=Pt.value;j&&vv(j)};ln=jo?jo(E):null,ln==null&&E()}function $6(E,j={}){const re=At.value.length;return re<=0?[]:E.filter(ae=>!(!Number.isInteger(ae.index)||ae.index<0||ae.index>=re)&&!(!Number.isFinite(ae.height)||ae.height<=0)&&!(j.requireSignature&&!ae.signature)&&!(j.requireCompatibilityMetadata&&!ae.nodeType&&!ae.signature)&&(function(be){var Ne;const De=At.value[be.index];return!(!De||be.nodeType&&be.nodeType!==String((Ne=De.type)!=null?Ne:"")||be.signature&&be.signature!==Lf(be.index))})(ae))}function N6(E){const j=a1(bu()),re=a1(E);return j!==-1&&re!==-1&&j===re}function kv(E){var j;const re=Number(E?.width);if(Number.isFinite(re)&&re>0)return re;const ae=Number((j=E?.metrics)==null?void 0:j.width);return Number.isFinite(ae)&&ae>0?ae:null}function F6(E){var j;return E.sessionKey===wo()&&!!rv(E.threadKey)&&((j=E.measurementKey)!=null?j:"")===Ol()&&!!N6(kv(E))&&!!(function(re){const ae=re.heightCache;return!!ae?.length&&(R6(re)?ae.some(be=>!!(be.nodeType||be.signature)):ae.some(be=>!!be.signature))})(E)}function R6(E){return!!(E.contentHash&&E.contentHash===gv())}function OF(E){return!R6(E)}let _u=null,xu=null,C0=null,$f=null,Nf=null;function bv(E){var j;const re=E.map(be=>{var Ne,De;return[be.index,Math.round(10*be.height),(Ne=be.nodeType)!=null?Ne:"",(De=be.signature)!=null?De:""].join("")}).join(""),ae=a1(bu());return[(j=ns())!=null?j:"",wo(),Ol(),At.value.length,ae,E.length,pv(re)].join(":")}function O6(E=(j=>(j=o.virtualScroll)==null?void 0:j.heightCache)()){if(!Ct.value||!E?.length||At.value.length<=0||!N6((j=o.virtualScroll)==null?void 0:j.heightCacheWidth))return!1;var j;const re=$6(E,{requireSignature:!0});if(!re.length)return!1;const ae=bv(re);return ae===_u?(xu="standalone",!0):(r6(re,{mode:"merge"}),Ot(),_u=ae,xu="standalone",Df(),mo("restore"),!0)}function Cv(E,j={}){var re,ae,be;if(!Ct.value||!E||E.sessionKey!==wo()||!rv(E.threadKey)||At.value.length<=0)return!1;const Ne=!!((re=E.heightCache)!=null&&re.length)&&!w0(),De=!E.anchor||E.anchorCaptured===!1&&j.allowUncapturedAnchor!==!0?null:E.anchor,ze=j.restoreAnchor===!0&&!!De&&!w0()&&Number(kv(E))>0;let ot=!1;if((ae=E.heightCache)!=null&&ae.length&&F6(E)){const Xe=$6(E.heightCache,{requireCompatibilityMetadata:!E.contentHash,requireSignature:OF(E)});Xe.length&&(r6(Xe,{mode:"merge"}),Ot(),_u=bv(Xe),xu="restore",Df(),ot=!0)}if(Ne||ze)return!1;if(!j.restoreAnchor||!De)return ot&&mo("restore"),!0;const We=(function(Xe,nt){var Be;const Je=Xe.anchor,lt=Je?Je.type==="bottom"?`bottom:${Math.round(Je.distanceFromBottomPx)}`:`node:${Je.nodeIndex}:${Math.round(Je.offsetWithinNodePx)}`:"none";return[(Be=ns())!=null?Be:"",wo(),Ol(),y0.value,nt,lt].join(":")})(E,(be=j.restoreToken)!=null?be:"imperative");return C0===We?(ot&&mo("restore"),!0):(C0=We,(function(Xe){const nt=()=>{if(Xe.type==="node")return Uc(),void Rc({nodeIndex:Xe.nodeIndex,offsetWithinNodePx:Xe.offsetWithinNodePx});if(Nc(),Ns.value=null,Pt.value=Xe,L6(),vv(Xe),G)for(const Be of[0,120,280,480])yv.push(window.setTimeout(()=>{const Je=Pt.value;Je&&vv(Je)},Be))};(function(Be){if(!sn.value)return!1;const Je=At.value.length;return!(Je<=0||(Fl.value=Be.type==="node"?Os(Be.nodeIndex,0,Je-1):Je-1,Tf(),0))})(Xe)?yt(nt):nt()})(De),mo("restore"),!0)}function w0(){const E=bu();return Number.isFinite(E)&&E>0}function P6(E){var j;return E.sessionKey===wo()&&!!rv(E.threadKey)&&(At.value.length<=0||!(!((j=E.heightCache)!=null&&j.length)||w0())||!(!(E.anchor&&Number(kv(E))>0)||w0()))}function wv(){qo.clear();for(const E of Object.keys(Nl)){const j=Number(E);Number.isInteger(j)&&j>=0&&j{let j=!1,re=null;const ae=()=>{j||(j=!0,re!=null&&window.clearTimeout(re),E())};if(jo)return jo(ae),void(re=window.setTimeout(ae,50));re=window.setTimeout(ae,0)})}function _v(E,j=ns(),re=Yi.value){return wo()===E&&ns()===j&&Yi.value===re}function xv(){return vo(this,arguments,function*(E={}){var j,re,ae,be,Ne;const De=wo(),ze=ns(),ot=Yi.value,We=(j=E.frames)!=null?j:2,Xe=(re=E.timeoutMs)!=null?re:120,nt=(ae=E.reason)!=null?ae:"manual",Be=E.expectedSettledTokenKey,Je=E.flushPendingTimers===!0,lt=Cu(nt),rt=()=>rn(mt({},lt),{phase:lt.final?"settling":lt.phase,stable:!1,confidence:lt.confidence==="final"?"mixed":lt.confidence,reason:nt}),wt=()=>_v(De,ze,ot)&&(Be==null||Pf()===Be);for(let qt=0;qtwindow.setTimeout(Ut,qt))})(Xe),!wt()||(Je&&p6(),Pl(),Ff(),!wt()))return rt();const dt=dv();dt&&(cv=De,uv=ze,((be=o.virtualScroll)==null?void 0:be.settleMode)==="manual"&&Be!=null&&k0((Ne=o.virtualScroll)==null?void 0:Ne.settledToken)&&Pf()===Be&&(zc=Uf(o.virtualScroll.settledToken)));const Nt=wt()&&dt&&T6(),Dt=Cu(nt,Nt?"final":void 0);return Ev(Dt,!0),Dt})}let Sv="content",Su=null,Au=null,Av=0,Rf=null,Vc=null,Mv=null,Tv=null;function Of(){return typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now()}function B6(E){var j,re;const ae=Rf;if(!ae)return!0;const be=(re=(j=o.virtualScroll)==null?void 0:j.heightDiffThresholdPx)!=null?re:1;return Math.abs(E.totalHeight-ae.totalHeight)>be||E.sessionKey!==ae.sessionKey||E.phase!==ae.phase||E.stable!==ae.stable||E.final!==ae.final||E.threadKey!==ae.threadKey||E.nodeCount!==ae.nodeCount||E.measuredCount!==ae.measuredCount||E.width!==ae.width}function Pf(E=(j=>(j=o.virtualScroll)==null?void 0:j.settledToken)()){return xs(E)}function H6(E,j){var re,ae;return[E,j.sessionKey,(re=j.threadKey)!=null?re:"",Ol(),gv(),xs((ae=o.virtualScroll)==null?void 0:ae.settledToken),Math.round(j.totalHeight),Math.round(j.width)].join("\0")}function Df(){Mv=null,Tv=null,Vc=null}function PF(E){const j=E.heightCache;return j?.length?bv(j):""}function Bf(E){var j,re,ae;const be=E.metrics,Ne=E.anchor?(De=E.anchor).type==="bottom"?`bottom:${Math.round(De.distanceFromBottomPx)}`:`node:${De.nodeIndex}:${Math.round(De.offsetWithinNodePx)}`:"none";var De;return[E.sessionKey,(j=E.threadKey)!=null?j:"",(re=E.measurementKey)!=null?re:Ol(),(ae=E.contentHash)!=null?ae:"",PF(E),Ne,E.anchorCaptured?1:0,be.liveRange.start,be.liveRange.end,be.renderedCount,be.nodeCount,Math.round(be.totalHeight),Math.round(be.width),be.phase,be.stable?1:0].join("\0")}function Ev(E,j=!1){if(!Ct.value||(function(De=!1){return!De&&co.value&&!en.value})(j))return;const re=j||B6(E),ae=(function(De,ze=!1){return ze||De.stable||De.phase==="final"?{state:Wc(De,{includeHeightCache:!0})}:{state:Wc(De)}})(E,j),be=ae.state,Ne=!!(be&&(re||(function(De,ze=!1){return!!ze||Bf(De)!==Vc})(be,j)));if(re&&(L(E),Rf=E,Av=Of()),be&&Ne&&(B(be),be.anchor&&H(be.anchor),Vc=Bf(be)),E.stable){const De=H6("settled",E);if(De!==Mv){Mv=De;const ze=Wc(E,{includeHeightCache:!0});ze&&(B(ze),Vc=Bf(ze)),(function(ot){s("render-settled",ot)})(E)}}if(E.phase==="final"){const De=H6("final",E);if(De!==Tv){Tv=De;const ze=Wc(E,{includeHeightCache:!0});ze&&(B(ze),Vc=Bf(ze)),(function(ot){s("render-final",ot)})(E)}}}function Iv(){Su!=null&&(Vo?.(Su),Su=null),Au!=null&&G&&(window.clearTimeout(Au),Au=null)}function z6(){Su=null,Au=null,(function(E){if(Rl.size>0||Gi!=null)return!0;switch(E){case"node-resize":case"async-node":case"resize":case"restore":case"final":case"manual":return!0;default:return!1}})(Sv)&&(Pl(),Ff()),Ev(Cu(Sv))}function mo(E){var j,re;if(!Ct.value||(Sv=E,Su!=null||Au!=null))return;const ae=Math.max(0,(re=(j=o.virtualScroll)==null?void 0:j.emitIntervalMs)!=null?re:32),be=Math.max(0,ae-(Of()-Av)),Ne=()=>{Au=null,Su=jo?jo(z6):null,Su==null&&z6()};G&&be>0?Au=window.setTimeout(Ne,be):Ne()}function W6(){He.value+=1}function _0(E){if(gt.value&&E>=Le.value){const j=At.value[E],re=Fe.value===!0&&Oe.value!==!0&&E>=At.value.length-2,ae=j?.type==="code_block"||j?.type==="image"||j?.type==="mermaid"||j?.type==="infographic";if(!re||ae)return!1}return!nl.value||E=pe.value&&(q.value||(q.value=!0,Q2()),!l6.value||!Ys))return qc(E),void(j&&ha(E,!0));if(E{if(h6.delete(Ne),!nl.value||J2.value.has(Ne))return;const ot=fo.get(Ne);if(!ot)return;const We=ue(ot),Xe=ot.ownerDocument||document,nt=Xe.defaultView||window,Be=!We||We===Xe.documentElement||We===Xe.body,Je=!Be&&We?Kt("nodeVisibilityFallback.root.getBoundingClientRect",()=>We.getBoundingClientRect()):null,lt=Be?0:Je.top,rt=Be?Kt("nodeVisibilityFallback.clientHeight",()=>{var dt,Nt;return(Nt=(dt=nt.innerHeight)!=null?dt:We?.clientHeight)!=null?Nt:0}):Je.bottom,wt=Kt("nodeVisibilityFallback.node.getBoundingClientRect",()=>ot.getBoundingClientRect());wt.bottom>=lt-500&&wt.top<=rt+500&&ha(Ne,!0)},1800+De);h6.set(Ne,ze)})(E);let be=null;be=et(()=>ae.isVisible.value,Ne=>{if(Ne){g0(E),ha(E,!0),be?.(),m0.delete(E),Pc.get(E)===ae&&Pc.delete(E);try{ae.destroy()}catch{}}},{immediate:!0}),m0.set(E,be),sn.value&&Lr()}function Lv(){Gi=null,an(()=>{let E=!1;for(const[j,re]of Rl)Rl.delete(j),ol.get(j)===re.el&&ku.get(j)===re.version&&(E=yu(j,re.height,{allowShrink:re.allowShrink})||E);return E})}function Kc(){Gi!=null&&(Vo?.(Gi),Gi=null),Rl.clear()}function S0(E,j){(function(re,ae,be){var Ne;if(!Number.isFinite(be)||be<=0||ol.get(re)!==ae)return;const De=ku.get(re);if(De==null)return;const ze=At.value[re],ot=ft.value&&Oe.value!==!0&&!((Ne=o.nodes)!=null&&Ne.length)&&re>=At.value.length-2,We=!(ze?.loading===!0||ot),Xe=Rl.get(re),nt=Xe?Xe.allowShrink&&We:We,Be=Xe&&!nt?Math.max(Xe.height,be):be;Rl.set(re,{height:Be,allowShrink:nt,version:De,el:ae}),Gi==null&&(Gi=jo?jo(Lv):null,Gi==null&&Lv())})(E,j,Mf(E,j))}function Pl(){for(const[E,j]of ol)j&&S0(E,j)}function U6(){ci?.disconnect(),ci=null,Ki.clear()}function $v(){for(;d0.length;)h0(d0.pop())}et(en,E=>{E&&mo("content")},{flush:"post"}),t({getVirtualMetrics:Cu,captureVirtualState:function(E={}){var j;return Wc(Cu("manual"),{includeHeightCache:!0,includeContentHash:!0,allowAnchorFallback:E.allowFallbackAnchor===!0,requireViewport:E.requireViewport===!0,includeEmptyState:(j=E.includeEmptyState)==null||j})},restoreVirtualState:function(E,j={}){const re=j.restoreAnchor===!0,ae=j.restoreToken==null?"imperative":String(j.restoreToken);$f=E,Nf={restoreAnchor:re,restoreToken:ae,allowUncapturedAnchor:j.allowUncapturedAnchor===!0},!Cv(E,{restoreAnchor:re,restoreToken:ae,allowUncapturedAnchor:j.allowUncapturedAnchor===!0})&&P6(E)||($f=null,Nf=null)},forceMeasure:function(E="manual"){return vo(this,null,function*(){yield yt(),yield D6(),Pl(),Ff(),yield yt();const j=Cu(E);return Ev(j,!0),j})},settle:xv,scrollToNode:function(E,j="start"){Uc(),Nc();const re=At.value.length;if(re<=0)return;const ae=Os(E,0,re-1),be=()=>{var Ne;const De=V2({nodeIndex:ae,offsetWithinNodePx:0}),ze=Zn(ae),ot=If(),We=(Ne=ot?.clientHeight)!=null?Ne:0,Xe=Js();let nt=De;if(j==="center")nt=De-We/2+ze/2;else if(j==="end")nt=De-We+ze;else if(j==="nearest"&&Xe!=null){if(De>=Xe&&De+ze<=Xe+We)return;nt=Dews.value,E=>{if(!E){U6();for(const j of fa.values())for(const re of j)h0(re);fa.clear(),ku.clear(),$v(),Kc()}},{immediate:!0}),et(Oe,E=>{E&&(function(){if(G&&Oe.value&&ol.size){$v();for(const j of[80,240,640]){const re=f6(j,()=>{for(const[ae,be]of ol)be&&S0(ae,be)},"final");re!=null&&d0.push(re)}}})(),mo(E?"final":"content")});const DF=b_(()=>mo("content"),16),BF=b_(()=>mo("batch"),16);et([()=>At.value.length,()=>Le.value],()=>{Pt.value&&jc(),DF()},{flush:"post",immediate:!0}),et([()=>Rs.start,()=>Rs.end],()=>{BF()},{flush:"post"});const{cleanupBatchScheduler:HF}=(function(E){const{props:j,isClient:re,isTestEnv:ae,parsedNodesIdentity:be,parsedNodeCount:Ne,desiredRenderedCount:De,datasetKey:ze,batchingEnabled:ot,incrementalRenderingActive:We,resolvedBatchSize:Xe,resolvedInitialBatch:nt,renderedCount:Be,adaptiveBatchSize:Je,previousRenderContext:lt,previousBatchConfig:rt,requestFrame:wt,cancelFrame:dt,hasIdleCallback:Nt,cleanupNodeVisibility:Dt,onDatasetKeyChanged:qt,onDatasetChanged:Ut}=E;let Zt=null,pn="raf",vn=null,Jn=0,Ps=!1,_s=!1;const $r=new Set,il=new Set;function Zf(){if(re){Zt!=null&&(pn==="raf"&&dt?dt(Zt):pn==="idle"&&typeof window.cancelIdleCallback=="function"?window.cancelIdleCallback(Zt):pn==="timeout"&&window.clearTimeout(Zt),Zt=null),Jn+=1;for(const Qs of $r)dt&&dt(Qs);for(const Qs of il)window.clearTimeout(Qs);$r.clear(),il.clear(),vn=null,Ps=!1,_s=!1}}function F0(){return typeof performance<"u"?performance.now():Date.now()}function l7(Qs){(function(Dl){var ga;if(!We.value)return;const Bl=Math.max(2,(ga=j.renderBatchBudgetMs)!=null?ga:6),Hl=Math.max(1,Xe.value||1),Nr=Math.max(1,Math.floor(Hl/4));Dl>1.5*Bl?Je.value=Math.max(Nr,Math.floor(.8*Je.value)):Dl<.6*Bl&&Je.value=Bl)return;const Hl=Math.max(1,Qs),Nr=()=>{const Yc=F0();Zt=null;const Gf=vn??Hl;vn=null;const Xc=F0();Be.value=Math.min(Bl,Be.value+Gf),Dt(Be.value),(function(Bv,R0){if(!re)return void l7(R0);Ps=!0;const d7=++Jn;yt().then(()=>{var f7;if(d7!==Jn)return;const lR=F0(),aR=Math.max(R0,lR-Bv),p7=()=>{d7===Jn&&l7(aR)};if(wt){let Tu=null,Jc=null,m7=!1;const g7=()=>{m7||(m7=!0,Tu!==null&&($r.delete(Tu),Tu=null),Jc!==null&&(il.delete(Jc),window.clearTimeout(Jc),Jc=null),p7())};return Tu=wt(()=>{g7()}),$r.add(Tu),Jc=window.setTimeout(()=>{Tu!==null&&dt&&dt(Tu),g7()},Math.max(32,(f7=j.renderBatchIdleTimeoutMs)!=null?f7:120)),void il.add(Jc)}const h7=window.setTimeout(()=>{il.delete(h7),p7()},0);il.add(h7)})})(Yc,F0()-Xc)};if(!re||Ei.immediate)return void Nr();const va=Math.max(0,(Dl=j.renderBatchDelay)!=null?Dl:16);if(vn=vn!=null?Math.max(vn,Hl):Hl,Zt==null){if(!ae&&Nt&&window.requestIdleCallback){const Yc=Math.max(0,(ga=j.renderBatchIdleTimeoutMs)!=null?ga:120);return pn="idle",void(Zt=window.requestIdleCallback(()=>Nr(),{timeout:Yc}))}if(wt&&!ae)return pn="raf",void(Zt=wt(()=>{va===0?Nr():(pn="timeout",Zt=window.setTimeout(()=>Nr(),va))}));pn="timeout",Zt=window.setTimeout(()=>Nr(),va)}}function u7(Qs,Ei={}){Ps?_s=!0:Qs==null?c7():a7(Qs,Ei)}function c7(){We.value&&a7(ot.value?Math.max(1,Math.round(Je.value)):Math.max(1,Xe.value))}return et([be,Ne,ze,We,Xe,nt,()=>j.renderBatchDelay],()=>{var Qs;const Ei=Ne.value,Dl=lt.value,ga=ze.value,Bl=!Object.is(ga,Dl.key),Hl=Ei!==Dl.total,Nr=Bl||Hl;lt.value={key:ga,total:Ei};const va=rt.value,Yc=(Qs=j.renderBatchDelay)!=null?Qs:16,Gf=va.batchSize!==Xe.value||va.initial!==nt.value||va.delay!==Yc||va.enabled!==We.value;rt.value={batchSize:Xe.value,initial:nt.value,delay:Yc,enabled:We.value},Bl&&qt(Ei),(Nr||Gf||!We.value)&&Zf(),(Nr||Gf)&&(Je.value=Math.max(1,Xe.value||1)),Nr&&Ut();const Xc=De.value;if(!Ei)return Be.value=0,void Dt(0);if(!We.value)return Be.value=Xc,void Dt(Be.value);const Bv=Bl||Dl.total===0;Be.value=Bv||Gf?Math.min(Xc,nt.value):Math.min(Be.value,Xc);const R0=Math.max(1,nt.value||Xe.value||Ei);Be.value{We.value&&(typeof Ei=="number"&&Qs<=Ei||Qs>Be.value&&u7())}),{cleanupBatchScheduler:Zf}})({props:T,isClient:G,isTestEnv:cr,parsedNodesIdentity:ai,parsedNodeCount:Tn,desiredRenderedCount:f0,datasetKey:EF,batchingEnabled:qi,incrementalRenderingActive:gt,resolvedBatchSize:ho,resolvedInitialBatch:ko,renderedCount:Le,adaptiveBatchSize:Xt,previousRenderContext:Ge,previousBatchConfig:hs,requestFrame:jo,cancelFrame:Vo,hasIdleCallback:Il,cleanupNodeVisibility:_F,onDatasetKeyChanged:E=>{Kc(),io(),Ot(),Df(),E>0&&Oc(E)},onDatasetChanged:()=>{sn.value&&Lr({immediate:!0})}});et([a6,sn,()=>O.value,()=>oe()],([E,j])=>{if(!E)return m6(),void X2();xF(),j?Lr({immediate:!0}):X2()},{flush:"post",immediate:!0}),et([()=>At.value.length,()=>sn.value],E=>vo(null,[E],function*([j,re]){re&&j&&G&&(yield yt(),Lr({immediate:!0}))}),{flush:"post"}),et(yn,E=>{E&&(function(){var j;if(no.value&&Ks.value&&ps.value&&((j=ui.value)!=null&&j[1]))return;const re=kt({type:"paragraph",children:[{type:"text",content:"Probe paragraph text",raw:"Probe paragraph text"}],raw:"Probe paragraph text"}),ae=kt({type:"list_item",children:[re],raw:"- Probe paragraph text"}),be=kt({type:"list",ordered:!1,items:[ae],raw:"- Probe paragraph text"});no.value=re,Ks.value=ae,ps.value=be;const Ne={1:null,2:null,3:null,4:null,5:null,6:null};for(let De=1;De<=6;De++)Ne[De]=kt({type:"heading",level:De,text:"Probe heading",children:[{type:"text",content:"Probe heading",raw:"Probe heading"}],raw:`${"#".repeat(De)} Probe heading`});ui.value=Ne})()},{immediate:!0}),et([()=>O.value,yn],()=>{if(!yn.value)return nv(),void(ne.value=0);v6(),nv(),yn.value&&O.value&&typeof ResizeObserver<"u"&&(Ef=new ResizeObserver(()=>{v6(),Ns.value&&vu(),Pt.value&&jc(),mo("resize")}),Ef.observe(O.value))},{immediate:!0}),et([yn,Zs,Yi],()=>vo(null,null,function*(){if(!yn.value)return Y.value={paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}},void Ot();yield yt(),(function(){if(!yn.value||typeof window>"u")return Y.value={paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}},void Ot();const E={paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}},j=g6(tv(F.value),".paragraph-node");E.paragraph=i4(F.value,j,"pre-wrap");const re=tv(W.value),ae=re?.querySelector(".paragraph-node");E.listItem=i4(W.value,ae,"pre-wrap");const be=Kt("readSimpleTextProbeProfile.list.offsetHeight",()=>{var De,ze;return(ze=(De=z.value)==null?void 0:De.offsetHeight)!=null?ze:0}),Ne=Kt("readSimpleTextProbeProfile.listItem.offsetHeight",()=>{var De,ze;return(ze=(De=W.value)==null?void 0:De.offsetHeight)!=null?ze:0});E.listWrapperOverhead=Math.max(0,be-Ne);for(let De=1;De<=6;De++){const ze=g6(tv(U[De]),`h${De}`);E.headings[De]=i4(U[De],ze,"pre-wrap")}Y.value=E,Ot()})()}),{flush:"post",immediate:!0}),et(()=>At.value.length,()=>{sn.value&&Lr({immediate:!0})}),et([yn,ne],()=>{Ot(),sn.value&&Lr({immediate:!0}),Ns.value&&vu(),Pt.value&&jc(),mo("resize")},{immediate:!1}),et(()=>nl.value,E=>{if(E)for(const[j,re]of fo)x0(j,re);else if(Q2(),sn.value)Lr({immediate:!0});else for(const[j,re]of fo)re&&ha(j,!0)},{immediate:!1}),et([he,pe,()=>oe()],()=>{var E;(E=Ys.refresh)==null||E.call(Ys);for(const[j,re]of fo)x0(j,re)},{immediate:!1}),et([()=>T.viewportPriority,()=>At.value.length,pe],([E,j,re])=>{if(E!==!1){if(q.value&&(j<=200||j<=re)){q.value=!1;for(const[ae,be]of fo)x0(ae,be)}}else q.value=!1}),et(()=>Le.value,()=>{sn.value&&Lr({immediate:!0})}),et([Fl,Lo,Wo,()=>At.value.length,sn],()=>{Tf()},{immediate:!0});let Hf=null,zf=!1,Zc=null;function Wf(){Hf=null,cv=null,uv=void 0,zc=null,Df()}function Nv(){Kc(),io(),Ot(),qo.clear();const E=At.value.length;E>0&&Oc(E),wv()}function Fv(){Iv(),p6(),Rf=null,_u=null,xu=null,C0=null,$f=null,Nf=null,zf=!1,Wf(),A6("restore"),Nc(),Uc()}function Uf(E){var j;return[(j=ns())!=null?j:"",wo(),Ol(),y0.value,Pf(E),At.value.length,Math.round(bo(0,At.value.length)),Math.round(bu()),fi.count,Math.round(fi.total)].join(":")}function j6(){return vo(this,null,function*(){var E,j,re,ae;const be=(E=o.virtualScroll)==null?void 0:E.settledToken,Ne=Pf(be),De=wo(),ze=ns(),ot=Yi.value;if(Ct.value&&((j=o.virtualScroll)==null?void 0:j.settleMode)==="manual"&&k0(be))if(dv()){if(Uf(be)!==zc&&!zf){zf=!0;try{const We=yield xv({reason:"manual",expectedSettledTokenKey:Ne}),Xe=Pf()===Ne;_v(De,ze,ot)&&We.sessionKey===De&&We.threadKey===ze&&Xe&&We.stable&&We.phase==="final"&&(zc=Uf((re=o.virtualScroll)==null?void 0:re.settledToken))}finally{zf=!1,yield yt();const We=(ae=o.virtualScroll)==null?void 0:ae.settledToken,Xe=k0(We)?Uf(We):"";_v(De,ze,ot)&&Xe&&zc!==Xe&&j6()}}}else mo("manual")})}et(Ct,(E,j)=>{if(E!==j){if(!E)return Fv(),void Iv();Fv(),Nv(),Zc=Yi.value,mo("content")}},{flush:"post"}),et([Ct,Yi],([E,j])=>{E?Zc!=null?Zc!==j&&(Zc=j,(function(re="resize"){Kc(),io(),Ot(),qo.clear();const ae=At.value.length;ae>0&&Oc(ae),wv(),_u=null,xu=null,C0=null,Rf=null,zf=!1,Wf(),O6(),yt(()=>{Pl(),Ns.value&&vu(),Pt.value&&jc(),mo(re)})})("resize")):Zc=j:Zc=null},{flush:"post",immediate:!0}),et([Ct,()=>wo(),()=>ns()],([E])=>{E&&(Fv(),Nv(),A6("content"),mo("content"))}),et([Ct,()=>wo(),()=>ns(),Yi,()=>At.value.length],([E])=>{E&&(function(j="async-node"){let re=!1;for(const[ae,be]of Array.from(sl.entries()))lv(be)||(sl.delete(ae),Zi.delete(ae),re=!0);re&&(Bc(),mo(j))})("async-node")},{flush:"post"}),et([Ct,()=>{var E;return(E=o.virtualScroll)==null?void 0:E.sessionKey},()=>{var E;return(E=o.virtualScroll)==null?void 0:E.measurementKey},()=>o.indexKey,()=>ie.value],([E])=>{E&&(Df(),(function(j="content"){if(!Ct.value)return;const re=[],ae=At.value.length,be=ev(ae);for(const Ne of Array.from(qo.keys())){if(Ne>=ae){re.push(Ne);continue}if(Ne=ae&&qo.delete(Ne);re.length&&((function(Ne,De={}){const ze=Array.from(Ne,Number);Jt(ze);let ot=0;if(an(()=>(ot=Z2(ze,De),ot>0)),ot>0)(function(We){for(const Xe of We)qo.delete(Xe)})(ze);else for(const We of ze)J.delete(We)})(re,{notify:!1}),Ot(),Wf(),Ns.value&&vu(),Pt.value&&jc(),mo(j))})("content"))},{flush:"post",immediate:!0}),et([Ct,()=>At.value.length,()=>wo(),()=>ns()],([E,j,re,ae],[be,Ne,De,ze])=>{E&&be&&re===De&&ae===ze&&j!==Ne&&Wf()},{flush:"post"}),et([Ct,()=>{var E;return(E=o.virtualScroll)==null?void 0:E.heightCache},()=>{var E;return(E=o.virtualScroll)==null?void 0:E.heightCacheWidth},()=>{var E;return(E=o.virtualScroll)==null?void 0:E.restoreState},()=>{var E;return(E=o.virtualScroll)==null?void 0:E.measurementKey},()=>At.value.length,()=>wo(),ne],()=>{O6()},{flush:"post",immediate:!0}),et([Ct,()=>{var E;return(E=o.virtualScroll)==null?void 0:E.restoreState},()=>{var E;return(E=o.virtualScroll)==null?void 0:E.restoreAnchor},()=>{var E;return(E=o.virtualScroll)==null?void 0:E.measurementKey},()=>At.value.length,()=>wo(),ne],E=>vo(null,[E],function*([j,re]){if(!j||!re)return;yield yt();const ae=(function(){var be;const Ne=(be=o.virtualScroll)==null?void 0:be.restoreAnchor;return Ne==null||Ne===!1?null:Ne===!0?"true":String(Ne)})();Cv(re,{restoreAnchor:ae!=null,restoreToken:ae??void 0})}),{flush:"post",immediate:!0}),et([Ct,ne,()=>{var E;return(E=o.virtualScroll)==null?void 0:E.restoreState},()=>{var E;return(E=o.virtualScroll)==null?void 0:E.measurementKey}],([E])=>{var j;if(!E)return;const re=(j=o.virtualScroll)==null?void 0:j.restoreState;re&&_u&&xu==="restore"&&(F6(re)||(Nv(),_u=null,xu=null,mo("resize")))},{flush:"post"}),et([Ct,()=>At.value.length,()=>wo(),ne],E=>vo(null,[E],function*([j]){var re;const ae=$f,be=Nf;j&&ae&&(yield yt(),!Cv(ae,{restoreAnchor:be?.restoreAnchor===!0,restoreToken:(re=be?.restoreToken)!=null?re:"imperative",allowUncapturedAnchor:be?.allowUncapturedAnchor===!0})&&P6(ae)||($f=null,Nf=null))}),{flush:"post",immediate:!0}),et([Ct,Oe,()=>{var E;return(E=o.virtualScroll)==null?void 0:E.settleMode},()=>wo(),()=>ns(),Yi,Y2,c6,()=>Le.value,f0,()=>fi.count,()=>fi.total],([E,j,re])=>{if(!E||j!==!0||re==="manual"||!fv())return;const ae=(function(){var be;const Ne=At.value.length;return[(be=ns())!=null?be:"",wo(),Ol(),y0.value,Ne,Math.round(bo(0,Ne)),Math.round(bu()),fi.count,Math.round(fi.total)].join(":")})();Hf!==ae&&(Hf=ae,xv({reason:"final"}).then(be=>{be.stable||Hf!==ae||(Hf=null)}))},{flush:"post",immediate:!0}),et([Ct,Oe,()=>{var E;return(E=o.virtualScroll)==null?void 0:E.settleMode},()=>{var E;return(E=o.virtualScroll)==null?void 0:E.settledToken},()=>wo(),()=>ns(),Yi,Y2,c6,()=>Le.value,f0,()=>At.value.length,()=>fi.count,()=>fi.total],()=>{j6()},{flush:"post",immediate:!0}),et([()=>At.value.length,sn,Lo,Wo,()=>Rs.start,()=>Rs.end],([E,j,re,ae,be,Ne])=>{fe.value&&zt("virtualization",{nodes:E,virtualization:j,maxLiveNodes:re,buffer:ae,focusIndex:Fl.value,scroll:j?(()=>{const De=ut.value||ue();return De?{reverse:Se(De),scrollTop:Math.round(De.scrollTop),scrollTopAbs:Math.round(Math.abs(De.scrollTop)),scrollHeight:Math.round(De.scrollHeight),clientHeight:Math.round(De.clientHeight)}:null})():null,liveRange:{start:be,end:Ne},rendered:Le.value})}),et([()=>T.customId],([E],j,re)=>{if(!E||$s)return;const ae=(function(be,Ne){return be?(gs.controllers[be]=Ne,()=>{gs.controllers[be]===Ne&&delete gs.controllers[be]}):()=>{}})(E,{captureRestoreAnchor:Fc,restoreAnchor:Rc,getAnchorDrift:q2,getReport:MF});re(()=>{ae()})},{immediate:!0}),Un(()=>{(function(){if(Ct.value)try{Pl(),Ff();const E=Cu("manual");B6(E)&&(L(E),Rf=E,Av=Of());const j=Wc(E,{includeHeightCache:!0,includeContentHash:!0,allowAnchorFallback:!1,requireViewport:!0,includeEmptyState:!0});j&&(B(j),j.anchor&&H(j.anchor),Vc=Bf(j))}catch{}})(),HF(),Q2(),Ke(),U6();for(const E of fa.values())for(const j of E)h0(j);fa.clear(),ku.clear(),qo.clear(),$v(),Kc(),nv(),Nc(),Uc(),Iv(),m6(),X2()});const zF=S1("ViewportDeferredMermaidBlockNode",zr({loader:()=>vo(null,null,function*(){try{return(yield Go(()=>import("./index11-DvlSNaLO.js"),__vite__mapDeps([7,5]))).default}catch(E){return console.warn('[markstream-vue] Optional peer dependencies for MermaidBlockNode are missing. Falling back to preformatted code rendering. To enable Mermaid rendering, please install "mermaid".',E),Ri}}),loadingComponent:F_,delay:0}),F_),WF=S1("ViewportDeferredInfographicBlockNode",zr({loader:()=>vo(null,null,function*(){try{return(yield Go(()=>import("./index10-BZ-Q5Z-w.js"),[])).default}catch(E){return console.warn('[markstream-vue] Failed to load InfographicBlockNode. Falling back to preformatted code rendering. To enable Infographic rendering, install "@antv/infographic" and configure setInfographicLoader with a dynamic loader.',E),Ri}}),loadingComponent:N_,delay:0}),N_),UF=S1("ViewportDeferredD2BlockNode",zr(()=>vo(null,null,function*(){try{return(yield Go(()=>import("./index8-BwJHsPMm.js"),[])).default}catch(E){return console.warn('[markstream-vue] Optional peer dependencies for D2BlockNode are missing. Falling back to preformatted code rendering. To enable D2 rendering, please install "@terrastruct/d2".',E),Ri}})),Ri),V6={text:Xo,paragraph:ac,heading:I2,code_block:G9,list:Kd,list_item:qd,blockquote:Qh,table:ep,definition_list:em,footnote:tm,footnote_reference:tr,footnote_anchor:J1,admonition:im,vmr_container:om,hardbreak:qa,link:Si,image:Va,thematic_break:nm,math_inline:Jr,math_block:PL,strong:_i,emphasis:Ai,strikethrough:xi,highlight:or,insert:Wi,subscript:zi,superscript:Hi,emoji:Bi,checkbox:er,checkbox_input:er,inline_code:ii,html_inline:nr,reference:wi,html_block:Q1},jF=R(()=>iv()),q6=R(()=>y_(T.codeBlockProps)),VF=R(()=>y_(T.codeBlockProps,{omit:["langs"]})),K6=R(()=>mt(mt({stream:T.codeBlockStream,darkTheme:T.codeBlockDarkTheme,lightTheme:T.codeBlockLightTheme,monacoOptions:T.codeBlockMonacoOptions,themes:T.themes,langs:g.value==="shiki"?T.langs:void 0,minWidth:T.codeBlockMinWidth,maxWidth:T.codeBlockMaxWidth},typeof Ce.value=="boolean"?{showTooltips:Ce.value}:{}),VF.value)),Z6=R(()=>mt(rn(mt({},K6.value),{langs:T.langs}),q6.value));function G6(E){return typeof E=="boolean"?E:void 0}const qF=R(()=>{const E=T.codeBlockProps||{},j={},re=G6(E.showLineNumbers);re!==void 0&&(j.showLineNumbers=re);const ae=G6(E.diffInline);ae!==void 0&&(j.diffInline=ae);const be=(function(Ne){const De=Number(Ne);return Number.isFinite(De)&&De>0?De:void 0})(E.reservedHeightPx);return be!==void 0&&(j.reservedHeightPx=be),j}),KF=R(()=>mt(mt({stream:T.codeBlockStream,darkTheme:T.codeBlockDarkTheme,lightTheme:T.codeBlockLightTheme,themes:T.themes,langs:T.langs,minWidth:T.codeBlockMinWidth,maxWidth:T.codeBlockMaxWidth},typeof Ce.value=="boolean"?{showTooltips:Ce.value}:{}),q6.value)),ZF=R(()=>mt({},T.mermaidProps||{})),Y6=R(()=>mt({},T.d2Props||{})),GF=R(()=>mt({},T.infographicProps||{})),jf=R(()=>({typewriter:f.value,fade:T.fade,customHtmlTags:po.value.customHtmlTags})),YF=R(()=>mt(mt({},jf.value),typeof Ce.value=="boolean"?{showTooltip:Ce.value}:{})),XF=R(()=>mt(mt({},jf.value),typeof Ce.value=="boolean"?{showTooltips:Ce.value}:{})),JF=R(()=>mt(mt({},jf.value),typeof Ce.value=="boolean"?{showTooltips:Ce.value}:{})),QF=R(()=>mt(mt({},jf.value),typeof Ce.value=="boolean"?{showTooltips:Ce.value}:{}));function eR(E){return Array.isArray(E.children)&&E.children.length>0}const A0=R(()=>AF.value.map(E=>{var j,re,ae,be,Ne,De,ze,ot;let We=(function(dt){var Nt,Dt,qt,Ut,Zt,pn,vn;if(dt.type!=="code_block")return dt;const Jn=dt,Ps=[String((Nt=Jn.language)!=null?Nt:""),String((Dt=Jn.loading)!=null?Dt:""),String((qt=Jn.diff)!=null?qt:""),String((Ut=Jn.code)!=null?Ut:""),String((Zt=Jn.originalCode)!=null?Zt:""),String((pn=Jn.updatedCode)!=null?pn:""),String((vn=Jn.raw)!=null?vn:"")].join("\0"),_s=$l.get(Jn);if(_s&&_s.signature===Ps)return _s.node;const $r=mt({},Jn);return $l.set(Jn,{signature:Ps,node:$r}),$r})(E.node);const Xe=M0(We);let nt=e7(We,Xe);if((We.type==="html_block"||We.type==="html_inline")&&nt===V6[We.type]){const dt=We,Nt=String((j=dt.tag)!=null?j:"").trim().toLowerCase()||cI(dt.content);if(Nt){const Dt=bn.value[Nt];if(Do.value.has(Nt)&&Dt)nt=Dt,We=rn(mt({},dt),{type:Nt,tag:Nt,content:Lte(dt.content,Nt)});else if(dI((re=dt.content)!=null?re:dt.raw,Nt)){const qt=String((be=(ae=dt.content)!=null?ae:dt.raw)!=null?be:"");We.type==="html_inline"?(nt=Xo,We={type:"text",content:qt,raw:qt}):(nt=ac,We={type:"paragraph",children:[{type:"text",content:qt,raw:qt}],raw:qt})}}}const Be=We.type==="code_block"&&g.value==="pre"&&nt===Ri&&!Rv(bn.value,Xe);let Je=mt({},(function(dt,Nt,Dt){const qt=Nt??M0(dt);if(dt.type==="code_block"){const Ut=qt?Rv(bn.value,qt):void 0;if(Dt&&g.value==="pre"&&!Ut&&Dt===Ri)return qF.value;if(Dt&&qt&&Dt===Ut)return qt==="mermaid"?J6(dt):qt==="infographic"?Q6(dt):qt==="d2"||qt==="d2lang"?Y6.value:Z6.value;if(Dt&&Dt===bn.value.code_block)return Z6.value;if(k6(Dt))return KF.value}return qt==="mermaid"?J6(dt):qt==="infographic"?Q6(dt):qt==="d2"||qt==="d2lang"?Y6.value:dt.type==="link"?YF.value:dt.type==="list"?XF.value:dt.type==="blockquote"?JF.value:dt.type==="table"?QF.value:dt.type==="code_block"?K6.value:jf.value})(We,Xe,nt));const lt=yn.value?Dc.value[E.index]:null;We.type==="code_block"&<?.kind==="code-block"&&(Je=rn(mt({},Je),Be?{reservedHeightPx:(Ne=lt.height)!=null?Ne:lt.contentHeight}:{estimatedHeightPx:lt.height,estimatedContentHeightPx:lt.contentHeight,estimatedDiffInline:lt.diffInline})),Be||We.type!=="code_block"||Xe!=="mermaid"||Td(Je.estimatedPreviewHeightPx)!=null||(Je=rn(mt({},Je),{estimatedPreviewHeightPx:sg(ng(String((De=We.code)!=null?De:"")))})),Be||We.type!=="code_block"||Xe!=="infographic"||Td(Je.estimatedPreviewHeightPx)!=null||(Je=rn(mt({},Je),{estimatedPreviewHeightPx:ig(og(String((ze=We.code)!=null?ze:"")))})),We.type==="math_block"&&(Je=rn(mt({},Je),{cacheScope:Mn}));const rt=(function(dt,Nt){const Dt=String(dt.type);return!Yp(Dt)&&bn.value[Dt]===Nt})(We,nt),wt=rt?c5(We,ge.value):void 0;return rn(mt({},E),{node:We,component:nt,bindings:Je,customBindings:mt(mt({},wt??{}),Je),rendersCustomNode:rt,hasSlotChildren:eR(We),slotContent:String((ot=We.content)!=null?ot:""),isCodeBlock:We.type==="code_block",indexKey:`${jF.value}-${E.index}`,vnodeKey:`${TF.value}\0${E.index}\0${We.type}`})}));function M0(E){var j;return E?.type==="code_block"?String((j=E.language)!=null?j:"").trim().toLowerCase():""}function Rv(E,j){const re=j.trim().toLowerCase();if(re)for(const ae of[re,M2(re),yL(re)]){const be=ae&&E[ae];if(be)return be}}function X6(E,j,re,ae){var be,Ne;const De=mt({},E.value);return Td(De.estimatedPreviewHeightPx)==null&&(De.estimatedPreviewHeightPx=ae(re(String((be=j?.code)!=null?be:"")),void 0,De.maxHeight==="none"?null:(Ne=Td(De.maxHeight))!=null?Ne:void 0)),De}function J6(E){return X6(ZF,E,ng,sg)}function Q6(E){return X6(GF,E,og,ig)}function e7(E,j){if(!E)return q3;const re=bn.value,ae=re[String(E.type)];if(E.type==="code_block"){const be=j??M0(E),Ne=be?Rv(re,be):void 0;return Ne||(g.value==="pre"?re.code_block||Ri:be==="mermaid"?re.mermaid||zF:be==="infographic"?re.infographic||WF:be==="d2"||be==="d2lang"?re.d2||UF:ae||re.code_block||b6.value)}return ae||V6[String(E.type)]||q3}function Ov(E){s("click",E)}function tR(E){var j;(j=E.target)!=null&&j.closest("[data-node-index]")&&s("mouseover",E)}function nR(E){var j;(j=E.target)!=null&&j.closest("[data-node-index]")&&s("mouseout",E)}function t7(E){s("mouseover",E)}function n7(E){s("mouseout",E)}const Mu=Z(null),Ti=Z(!1),Vf=Z(null),oR=R(()=>!(T.domMode!=="minimal"||X.value||T.fade!==!1||f.value||Ti.value||ts.value||sn.value||Qe.value||uo.value||Vi.value||Object.keys(bn.value).length!==0));let qf,Gc=null,Pv=0,T0=0,E0=0;const o7=["code_block","admonition","table","math_block","html_block","image","thematic_break"],sR=new Set(o7),s7=[".typewriter-cursor",".height-estimation-probes",...o7.map(E=>`[data-node-type="${E}"]`),"script","style"].join(",");function i7(E){if(!E||typeof E!="object")return!1;const j=E.type;return typeof j=="string"&&sR.has(j)}function I0(E){var j,re;if(!E||typeof E!="object")return 0;const ae=E,be=(re=(j=ae.raw)!=null?j:ae.content)!=null?re:ae.code;if(typeof be=="string")return be.length;const Ne=ae.children;if(Array.isArray(Ne))return Ne.reduce((ze,ot)=>ze+I0(ot),0);const De=ae.items;return Array.isArray(De)?De.reduce((ze,ot)=>ze+I0(ot),0):0}function L0(){qf&&(clearTimeout(qf),qf=void 0)}function Dv(){Pv+=1,Gc!=null&&(Vo?.(Gc),Gc=null)}function Kf(){Dv(),ma(),Mu.value&&(Mu.value.style.visibility="hidden")}function iR(E){var j;if(E.nodeType!==Node.TEXT_NODE||!((j=E.textContent)!=null?j:"").trim())return!1;const re=E.parentElement;return!!re&&!re.closest(s7)}function rR(E){let j=E.lastChild;for(;j;){if(iR(j))return j;if(j.nodeType===Node.ELEMENT_NODE){const re=j;if(!re.matches(s7)&&re.lastChild){j=re.lastChild;continue}}for(;j&&j!==E&&!j.previousSibling;)j=j.parentNode;if(!j||j===E)break;j=j.previousSibling}return null}function r7(){const E=A0.value;for(let j=E.length-1;j>=0;j--){const re=E[j];if(!re||i7(re.node)||!_0(re.index))continue;const ae=fo.get(re.index);if(!ae)continue;const be=rR(ae);if(be)return be}return null}function ma(){Vf.value&&(Vf.value.classList.remove(R_),Vf.value=null)}function $0(){if(d.value!=="simple"||!G||!Ti.value||!O.value)return void ma();const E=r7(),j=E?(function(re){var ae;const be=(ae=re.parentElement)==null?void 0:ae.closest(".text-node");return be instanceof HTMLElement?be:re.parentElement})(E):null;j!==Vf.value&&(ma(),j&&(j.classList.add(R_),Vf.value=j))}function N0(){if(d.value!=="precise"||!G||!Ti.value||Gc!=null)return;const E=Pv,j=()=>{Gc=null,E===Pv&&(function(){var re,ae;if(d.value!=="precise"||!(G&&Ti.value&&O.value&&Mu.value))return;const be=O.value,Ne=Mu.value;Ne.style.visibility="hidden";const De=r7();if(!De)return;let ze=0,ot=0,We=20,Xe=!1;if(De?.textContent){const nt=De.textContent.length,Be=document.createRange();Be.setStart(De,Math.max(0,nt-1)),Be.setEnd(De,nt);const Je=typeof Be.getClientRects=="function"?Be.getClientRects():void 0,lt=(ae=Je?.[Je.length-1])!=null?ae:(re=De.parentElement)==null?void 0:re.getBoundingClientRect();if(lt){const rt=Kt("typewriterCursor.root.getBoundingClientRect",()=>be.getBoundingClientRect());ze=lt.right-rt.left+be.scrollLeft,ot=lt.top-rt.top+be.scrollTop,We=lt.height||We,Xe=!0}Be.detach()}Xe&&(Ne.style.transform=`translate(${Math.max(0,ze)}px, ${Math.max(0,ot)}px)`,Ne.style.height=`${We}px`,Ne.style.visibility="visible")})()};jo?Gc=jo(j):j()}return et([st,()=>o.content,()=>o.nodes,()=>T.typewriter,Oe],()=>vo(null,null,function*(){var E,j;if(!G||X.value||!ee.value)return;if(Oe.value)return Ti.value=!1,L0(),void Kf();if((E=o.nodes)!=null&&E.length)return Ti.value=!1,L0(),Kf(),T0=((j=o.content)!=null?j:"").length,void(E0=st.value.length);const re=(function(){var ze,ot;return(ze=o.nodes)!=null&&ze.length?o.nodes.reduce((We,Xe)=>We+I0(Xe),0):((ot=o.content)!=null?ot:"").length})(),ae=(function(){var ze;return(ze=o.nodes)!=null&&ze.length?o.nodes.reduce((ot,We)=>ot+I0(We),0):st.value.length})(),be=!i7(At.value[At.value.length-1]),Ne=re>T0,De=ae>E0;if(!f.value||!be||!Ne&&!De)return f.value&&be||(Ti.value=!1,Kf()),T0=re,void(E0=ae);T0=re,E0=ae,Ti.value=!0,d.value==="precise"&&Mu.value&&(Mu.value.style.visibility="hidden"),L0(),yield yt(),d.value==="simple"?$0():(ma(),N0()),qf=setTimeout(()=>{qf=void 0,Ti.value=!1},3e3)}),{flush:"post",immediate:!0}),et(Ti,E=>vo(null,null,function*(){E?(yield yt(),d.value!=="simple"?(ma(),d.value==="precise"&&N0()):$0()):Kf()}),{flush:"post"}),et(d,()=>vo(null,null,function*(){if(G&&!X.value&&ee.value&&Ti.value){if(yield yt(),d.value==="simple")return Dv(),void $0();ma(),d.value!=="precise"?Kf():N0()}}),{flush:"post"}),et([()=>Le.value,()=>Rs.start,()=>Rs.end],()=>vo(null,null,function*(){G&&!X.value&&ee.value&&Ti.value&&(yield yt(),d.value!=="simple"?(ma(),d.value==="precise"&&N0()):$0())}),{flush:"post"}),Un(()=>{L0(),Dv(),ma(),Po.clear()}),(E,j)=>{const re=PO("NodeRenderer",!0);return p(X)?(b(!0),A(Pe,{key:0},pt(A0.value,ae=>(b(),A(Pe,{key:ae.vnodeKey},[ae.rendersCustomNode?(b(),me(ys(ae.component),Dn({key:0,ref_for:!0},ae.customBindings,{node:ae.node,loading:ae.node.loading,"index-key":ae.indexKey,"custom-id":T.customId,"is-dark":T.isDark,onClick:Ov,onMouseover:t7,onMouseout:n7,onCopy:j[0]||(j[0]=be=>i(be)),onHandleArtifactClick:j[1]||(j[1]=be=>s("handleArtifactClick",be))}),{default:ke(()=>[ae.hasSlotChildren?(b(),me(re,Dn({key:0,ref_for:!0},To.value,{nodes:ae.node.children,"index-key":ae.indexKey,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes","index-key"])):ae.slotContent?(b(),me(re,Dn({key:1,ref_for:!0},To.value,{content:ae.slotContent,final:!ae.node.loading,"index-key":`${ae.indexKey}-content`,"smooth-streaming":!1,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["content","final","index-key"])):te("",!0)]),_:2},1040,["node","loading","index-key","custom-id","is-dark"])):(b(),me(ys(ae.component),Dn({key:1,node:ae.node,loading:ae.node.loading,"index-key":ae.indexKey},{ref_for:!0},ae.bindings,{"custom-id":T.customId,"is-dark":T.isDark,onClick:Ov,onMouseover:t7,onMouseout:n7,onCopy:j[2]||(j[2]=be=>i(be)),onHandleArtifactClick:j[3]||(j[3]=be=>s("handleArtifactClick",be))}),null,16,["node","loading","index-key","custom-id","is-dark"]))],64))),128)):(b(),A("div",{key:1,ref_key:"containerRef",ref:O,class:Re(["markstream-vue markdown-renderer",[{dark:T.isDark},{virtualized:sn.value},{"virtual-scroll-coordinated":en.value},{"stable-layout":kF.value},{"typewriter-simple-cursor":Ti.value&&d.value==="simple"}]]),"data-custom-id":T.customId,onClick:Ov,onMouseover:tR,onMouseout:nR},[Ho.value||sn.value?(b(),A(Pe,{key:0},[Ho.value?(b(),me(Sce,{key:0,width:Zs.value,"flow-root":sn.value||en.value,"paragraph-node":no.value,"list-item-node":Ks.value,"list-node":ps.value,"heading-nodes":ui.value,"set-paragraph-wrapper":bF,"set-list-item-wrapper":CF,"set-list-wrapper":wF,"set-heading-wrapper":SF},null,8,["width","flow-root","paragraph-node","list-item-node","list-node","heading-nodes"])):te("",!0),sn.value?(b(),A("div",{key:1,class:"node-spacer",style:Gt({height:`${ov.value}px`}),"aria-hidden":"true"},null,4)):te("",!0)],64)):te("",!0),oR.value?(b(!0),A(Pe,{key:1},pt(A0.value,ae=>(b(),A(Pe,{key:ae.vnodeKey},[_0(ae.index)?(b(),me(ys(ae.component),Dn({key:0,node:ae.node,loading:ae.node.loading,"index-key":ae.indexKey},{ref_for:!0},ae.bindings,{"custom-id":T.customId,"is-dark":T.isDark,onMouseover:j[4]||(j[4]=be=>s("mouseover",be)),onMouseout:j[5]||(j[5]=be=>s("mouseout",be)),onCopy:j[6]||(j[6]=be=>i(be)),onHandleArtifactClick:j[7]||(j[7]=be=>s("handleArtifactClick",be))}),null,16,["node","loading","index-key","custom-id","is-dark"])):te("",!0)],64))),128)):(b(!0),A(Pe,{key:2},pt(A0.value,ae=>(b(),A("div",{key:ae.vnodeKey,ref_for:!0,ref:be=>x0(ae.index,be),class:"node-slot","data-node-index":ae.index,"data-node-type":ae.node.type},[_0(ae.index)?(b(),A("div",{key:0,ref_for:!0,ref:be=>(function(Ne,De){var ze;De||(function(nt){const Be=`${iv()}-${nt}`;let Je=!1;for(const lt of Array.from(Zi.keys())){const rt=sl.get(lt);(rt?.index===nt||lt===Be||lt.startsWith(`${Be}-`))&&(Zi.delete(lt),sl.delete(lt),Je=!0)}Je&&(Bc(),mo("async-node"))})(Ne),Rl.delete(Ne),(function(nt){var Be;const Je=((Be=ku.get(nt))!=null?Be:0)+1;ku.set(nt,Je)})(Ne);const ot=fa.get(Ne);if(ot){for(const nt of ot)h0(nt);fa.delete(Ne)}if((function(nt){const Be=Ki.get(nt);Be&&(ci?.unobserve(Be),Er.delete(Be),Ki.delete(nt))})(Ne),!De||!ws.value)return ol.delete(Ne),void ku.delete(Ne);ol.set(Ne,De);const We=()=>{S0(Ne,De)};queueMicrotask(We);const Xe=(ci||typeof ResizeObserver>"u"||(ci=new ResizeObserver(nt=>{if(nt.length)for(const Be of nt){const Je=Er.get(Be.target),lt=Ki.get(Je??-1);Je!=null&<&&S0(Je,lt)}else Pl()})),ci);if(Xe&&(Ki.set(Ne,De),Er.set(De,Ne),Xe.observe(De)),typeof window<"u"){const nt=((ze=At.value[Ne])==null?void 0:ze.type)==="code_block"?[16,80,240,800]:Oe.value?[80]:[];if(nt.length){const Be=nt.map(Je=>f6(Je,We,"node-resize")).filter(Je=>Je!=null);Be.length&&fa.set(Ne,Be)}}})(ae.index,be),class:"node-content"},[ae.isCodeBlock?ae.rendersCustomNode?(b(),me(ys(ae.component),Dn({key:1,ref_for:!0},ae.customBindings,{node:ae.node,loading:ae.node.loading,"index-key":ae.indexKey,"custom-id":T.customId,"is-dark":T.isDark,onCopy:j[12]||(j[12]=be=>i(be)),onHandleArtifactClick:j[13]||(j[13]=be=>s("handleArtifactClick",be))}),{default:ke(()=>[ae.hasSlotChildren?(b(),me(re,Dn({key:0,ref_for:!0},To.value,{nodes:ae.node.children,"index-key":ae.indexKey,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes","index-key"])):ae.slotContent?(b(),me(re,Dn({key:1,ref_for:!0},To.value,{content:ae.slotContent,final:!ae.node.loading,"index-key":`${ae.indexKey}-content`,"smooth-streaming":!1,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["content","final","index-key"])):te("",!0)]),_:2},1040,["node","loading","index-key","custom-id","is-dark"])):(b(),me(ys(ae.component),Dn({key:2,node:ae.node,loading:ae.node.loading,"index-key":ae.indexKey},{ref_for:!0},ae.bindings,{"custom-id":T.customId,"is-dark":T.isDark,onCopy:j[14]||(j[14]=be=>i(be)),onHandleArtifactClick:j[15]||(j[15]=be=>s("handleArtifactClick",be))}),null,16,["node","loading","index-key","custom-id","is-dark"])):(b(),me(as,{key:0,name:"fade",css:T.fade!==!1,appear:T.fade!==!1},{default:ke(()=>[ae.rendersCustomNode?(b(),me(ys(ae.component),Dn({key:0,ref_for:!0},ae.customBindings,{node:ae.node,loading:ae.node.loading,"index-key":ae.indexKey,"custom-id":T.customId,"is-dark":T.isDark,onCopy:j[8]||(j[8]=be=>i(be)),onHandleArtifactClick:j[9]||(j[9]=be=>s("handleArtifactClick",be))}),{default:ke(()=>[ae.hasSlotChildren?(b(),me(re,Dn({key:0,ref_for:!0},To.value,{nodes:ae.node.children,"index-key":ae.indexKey,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes","index-key"])):ae.slotContent?(b(),me(re,Dn({key:1,ref_for:!0},To.value,{content:ae.slotContent,final:!ae.node.loading,"index-key":`${ae.indexKey}-content`,"smooth-streaming":!1,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["content","final","index-key"])):te("",!0)]),_:2},1040,["node","loading","index-key","custom-id","is-dark"])):(b(),me(ys(ae.component),Dn({key:1,node:ae.node,loading:ae.node.loading,"index-key":ae.indexKey},{ref_for:!0},ae.bindings,{"custom-id":T.customId,"is-dark":T.isDark,onCopy:j[10]||(j[10]=be=>i(be)),onHandleArtifactClick:j[11]||(j[11]=be=>s("handleArtifactClick",be))}),null,16,["node","loading","index-key","custom-id","is-dark"]))]),_:2},1032,["css","appear"]))],512)):(b(),A("div",{key:1,class:"node-placeholder",style:Gt({height:`${Zn(ae.index)}px`})},null,4))],8,Tce))),128)),Ti.value&&d.value==="precise"?(b(),A("span",{key:3,ref_key:"typewriterCursorRef",ref:Mu,class:"typewriter-cursor","aria-hidden":"true"},null,512)):te("",!0),sn.value?(b(),A("div",{key:4,class:"node-spacer",style:Gt({height:`${sv.value}px`}),"aria-hidden":"true"},null,4)):te("",!0)],42,Mce))}}})),[["__scopeId","data-v-a9489508"]]),Ui=XL;Ui.install=e=>{const t=new Set(["MarkdownRender","NodeRenderer",Ui.__name,Ui.name].filter(n=>!!n));for(const n of t)e.component(n,XL)};const x5=Object.freeze(Object.defineProperty({__proto__:null,default:Ui},Symbol.toStringTag,{value:"Module"})),Ece={key:0,xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"admonition-icon"},Ice={key:1,xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"admonition-icon"},Lce={key:2,xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"admonition-icon"},$ce={key:3,xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"admonition-icon"},Nce={class:"admonition-title"},Fce=["aria-expanded","aria-controls"],Rce=["id"],im=Kn(tt({__name:"AdmonitionNode",props:{node:{},indexKey:{},isDark:{type:Boolean},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},emits:["copy"],setup(e,{emit:t}){var n;const o=e,s=t,i=R(()=>{if(o.node.title&&o.node.title.trim().length)return o.node.title;const u=o.node.kind||"note";return u.charAt(0).toUpperCase()+u.slice(1)}),r=Z(!!o.node.collapsible&&!((n=o.node.open)==null||n));function l(){o.node.collapsible&&(r.value=!r.value)}const a=`admonition-${Math.random().toString(36).slice(2,9)}`;return(u,c)=>(b(),A("div",{class:Re(["admonition",[`admonition-${o.node.kind}`]])},[C("div",{id:a,class:"admonition-legend"},[o.node.kind==="note"||o.node.kind==="info"?(b(),A("svg",Ece,[...c[1]||(c[1]=[C("circle",{cx:"12",cy:"12",r:"10"},null,-1),C("path",{d:"M12 16v-4"},null,-1),C("path",{d:"M12 8h.01"},null,-1)])])):o.node.kind==="tip"?(b(),A("svg",Ice,[...c[2]||(c[2]=[C("path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5"},null,-1),C("path",{d:"M9 18h6"},null,-1),C("path",{d:"M10 22h4"},null,-1)])])):o.node.kind==="warning"||o.node.kind==="caution"?(b(),A("svg",Lce,[...c[3]||(c[3]=[C("path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"},null,-1),C("path",{d:"M12 9v4"},null,-1),C("path",{d:"M12 17h.01"},null,-1)])])):o.node.kind==="danger"||o.node.kind==="error"?(b(),A("svg",$ce,[...c[4]||(c[4]=[C("polygon",{points:"7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2"},null,-1),C("path",{d:"M12 8v4"},null,-1),C("path",{d:"M12 16h.01"},null,-1)])])):te("",!0),C("span",Nce,N(i.value),1),o.node.collapsible?(b(),A("button",{key:4,class:"admonition-toggle","aria-expanded":!r.value,"aria-controls":`${a}-content`,onClick:l},[(b(),A("svg",{style:Gt({rotate:r.value?"0deg":"90deg"}),xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[...c[5]||(c[5]=[C("path",{d:"m9 18 6-6-6-6"},null,-1)])],4))],8,Fce)):te("",!0)]),In(C("div",{id:`${a}-content`,class:"admonition-content","aria-labelledby":a},[V(p(Ui),{"index-key":`admonition-${e.indexKey}`,nodes:o.node.children,"custom-id":o.customId,typewriter:o.typewriter,fade:o.fade,onCopy:c[0]||(c[0]=d=>s("copy",d))},null,8,["index-key","nodes","custom-id","typewriter","fade"])],8,Rce),[[Es,!r.value]])],2))}}),[["__scopeId","data-v-a83480e1"]]);im.install=e=>{e.component(im.__name,im)};const X3=()=>Go(()=>import("./d2_markstream-vue-yoD6TSFD.js"),[]);let _h=null,xh=X3,Sh=null,O_=!1,P_=!1;function fVe(){return vo(this,null,function*(){if(_h)return _h;const e=xh;return e?e===X3&&O_?null:Sh||(Sh=vo(null,null,function*(){let t;try{t=yield e()}catch(n){if(e===X3)return e===xh&&(O_=!0,(function(o){P_||(P_=!0,console.warn('[markstream-vue] Optional dependency "@terrastruct/d2" is not installed. D2 blocks will render as source.',o))})(n)),null;throw n}finally{e===xh&&(Sh=null)}return e!==xh?null:t?(_h=(function(n){var o;if(!n)return n;if(n.D2&&typeof n.D2=="function")return n.D2;if(n.default&&n.default.D2&&typeof n.default.D2=="function")return n.default.D2;const s=(o=n.default)!=null?o:n;return typeof s=="function"?s:s?.D2&&typeof s.D2=="function"?s.D2:s})(t),_h):null}),Sh):null})}let Ah=null,JL=null,Mh=null;function pVe(){return typeof JL=="function"}function hVe(){return vo(this,null,function*(){if(Ah)return Ah;const e=JL;return e?Mh||(Mh=vo(null,null,function*(){const t=yield e(),n=(function(o){var s,i,r;if(!o)return null;const l=(s=o.default)!=null?s:o,a=typeof l=="function"&&typeof((i=l.prototype)==null?void 0:i.render)=="function"?l:(r=o.Infographic)!=null?r:l?.Infographic;return typeof a=="function"?a:null})(t);return n?(Ah=n,Ah):null}).finally(()=>{Mh=null}),Mh):null})}const mVe=Symbol("markstreamLanguageIconResolver"),QL=["cjs","css","csv","gif","htm","html","jpeg","jpg","js","json","jsx","log","md","mjs","pdf","png","scss","svg","ts","tsx","txt","vue","webp","xml","yaml","yml"],Oce=new Set(["AGENTS.md","CHANGELOG.md","Dockerfile","LICENSE","Makefile","README.md","package.json","pnpm-lock.yaml","pnpm-workspace.yaml","tsconfig.json","vite.config.ts"]),J3=[...QL].sort((e,t)=>t.length-e.length).join("|"),r4=new RegExp([String.raw`(?:^|[\s([{"'`+"`"+String.raw`])`,String.raw`(`,String.raw`(?:~|\.{1,2}|/)?(?:[A-Za-z0-9_.@+()[\]-]+/)+[A-Za-z0-9_.@+()[\]-]+(?:\.(?:${J3}))?`,String.raw`|`,String.raw`[A-Za-z0-9_.@+()[\]-]+\.(?:${J3})`,String.raw`)`,String.raw`(?:#L?(\d+)|:(\d+))?`,String.raw`(?=$|[\s)"'\]}>.,;!?,。;!?)])`].join(""),"gi"),e$=/[),.;!?,。;!?)]+$/;function Pce(e){const t=e.toLowerCase();return QL.some(n=>t.endsWith(`.${n}`))}function Dce(e){const t=new Map,n=new RegExp(String.raw`\b(?:path|src)=["'](\/[^"']+\.(?:${J3}))["']`,"gi");let o;for(;(o=n.exec(e))!==null;){const s=o[1];if(!s)continue;const i=s.split("/").pop();i&&t.set(i,s)}return t}function Bce(e,t={}){const n=e.trim();if(!n||/^[a-z][a-z0-9+.-]*:\/\//i.test(n))return null;const o=n.match(/^(.*?)(?:#L?(\d+)|:(\d+))?$/i);if(!o)return null;let s=(o[1]??"").replace(e$,"");if(!s)return null;const i=s.split("/").pop()??s,r=s.includes("/"),l=Oce.has(i),a=Pce(i);if(r&&!l&&!a)return null;if(!r&&!l){const d=t.aliases?.get(i);if(!d)return null;s=d}const u=o[2]??o[3],c=u?Number(u):void 0;return{path:s,line:c!==void 0&&Number.isFinite(c)&&c>0?c:void 0}}function Hce(e,t={}){const n=[];r4.lastIndex=0;let o;for(;(o=r4.exec(e))!==null;){const s=o[0]??"",i=o[1]??"",r=s.indexOf(i);if(r<0)continue;const l=o[2]??o[3];let a=i+(l?s.slice(r+i.length):"");const u=a.replace(e$,""),c=a.length-u.length;a=u;const d=Bce(a,t);if(!d)continue;const f=o.index+r,h=f+a.length;n.push({...d,start:f,end:h,text:a}),c>0&&(r4.lastIndex-=c)}return n}function l4(e,t){let n=0,o=t-1;for(;o>=0&&e[o]==="\\";)n++,o--;return n%2===1}const zce=/\s/,Wce=/\p{Nd}/u;function kc(e,t){const n=e.codePointAt(t);return n===void 0?void 0:String.fromCodePoint(n)}function Uce(e,t){if(t<=0)return;const n=e.charCodeAt(t-1),o=n>=56320&&n<=57343&&t>1?t-2:t-1,s=e.codePointAt(o);return s===void 0?void 0:String.fromCodePoint(s)}function D_(e){return e!==void 0&&zce.test(e)}function uf(e){return e!==void 0&&Wce.test(e)}function jce(e,t){const n=e[t+1];return uf(kc(e,t+1))?!0:(n==="-"||n==="+"||n==="."||n==="−"||n==="+"||n==="-")&&uf(kc(e,t+2))}function hg(e){return e!==void 0&&e>="A"&&e<="Z"}const t$=new RegExp(String.raw`^(?:AED|AFN|ALL|AMD|ANG|AOA|ARS|AUD|AWG|AZN|BAM|BBD|BDT|BGN|BHD|BIF|BMD|BND|BOB|BRL|BSD|BTN|BWP|BYN|BZD|CAD|CDF|CHF|CLF|CLP|CNY|COP|CRC|CUC|CUP|CVE|CZK|DJF|DKK|DOP|DZD|EGP|ERN|ETB|EUR|FJD|FKP|GBP|GEL|GHS|GIP|GMD|GNF|GTQ|GYD|HKD|HNL|HRK|HTG|HUF|IDR|ILS|INR|IQD|IRR|ISK|JMD|JOD|JPY|KES|KGS|KHR|KMF|KPW|KRW|KWD|KYD|KZT|LAK|LBP|LKR|LRD|LSL|LYD|MAD|MDL|MGA|MKD|MMK|MNT|MOP|MRU|MUR|MVR|MWK|MXN|MYR|MZN|NAD|NGN|NIO|NOK|NPR|NZD|OMR|PAB|PEN|PGK|PHP|PKR|PLN|PYG|QAR|RON|RSD|RUB|RWF|SAR|SBD|SCR|SDG|SEK|SGD|SHP|SLE|SLL|SOS|SRD|SSP|STN|SVC|SYP|SZL|THB|TJS|TMT|TND|TOP|TRY|TTD|TWD|TZS|UAH|UGX|USD|UYU|UZS|VED|VES|VND|VUV|WST|XAF|XCD|XOF|XPF|YER|ZAR|ZMW|ZWL|HK|US|SG|AU|CA|NZ|NT|TW|RMB|MEX|TT|BZ|EU|UK)$`);function Vce(e,t){if(!hg(e[t-1]))return!1;let n=t-1;for(;n>0&&hg(e[n-1]);)n--;return t$.test(e.slice(n,t))||uf(kc(e,t+1))?!0:t-n<=2&&!/[\p{L}\p{Nd}]/u.test(e[n-1]??"")&&!/\p{L}/u.test(kc(e,t+1)??"")}function qce(e,t){if(!hg(e[t-1]))return!1;let n=t-1;for(;n>0&&hg(e[n-1]);)n--;return t$.test(e.slice(n,t))?!0:t-n<=2&&!/[\p{L}\p{Nd}]/u.test(e[n-1]??"")}const Kce=/^[-–—,,、;;::~~(([【//]$/;function Zce(e,t){const n=e[t+1];if(n!=="-"&&n!=="+"&&n!=="."||!uf(kc(e,t+2)))return!1;const o=e[t-1];return o!==void 0&&Kce.test(o)}function Gce(e){const t=String.raw`[、,,;;::~~\-–—至到//\s()()=*×=]|和|跟|与|及|或|and|or`;let n=e.replace(new RegExp(String.raw`^(?:${t})+`,"u"),"");for(;;){const s=n.replace(new RegExp(String.raw`^\p{L}+(?:${t})+`,"u"),"").replace(/^[\p{L}][\p{L} ]*(?=\p{Nd})/u,"");if(s===n)break;n=s}if(!/\p{Nd}/u.test(n))return!1;const o=String.raw`[-+]?[\p{Nd}][\p{Nd},.'’]*`;return new RegExp(String.raw`^${o}(?:\p{L}+)?(?:(?:${t})+${o}(?:\p{L}+)?)*$`,"u").test(n)}const ul=-1,B_=1,H_=2,z_=3;function Yce(e){const t=e.length,n=new Uint8Array(t),o=new Int32Array(t+1).fill(ul),s=new Int32Array(t+1),i=new Int32Array(t+1),r=[],l=[];{const F=[];for(let q=0;q{for(;a=(l[a]?.[1]??0);)a++;const W=l[a];return W!==void 0&&F>=W[0]},c=new Set(' \n\r)。,、;:!?"<>`「」『』【】〔〕()*—–“”‘’'),d=[];for(const F of e.matchAll(/\b(?:https?:\/\/|ftp:\/\/|mailto:|www\.)/gi))d.push(F.index);for(const F of e.matchAll(/\b(?:localhost|(?:\d{1,3}\.){3}\d{1,3}|[\w-]+(?:\.[\w-]+)*\.[a-zA-Z]{2,})(?=(?:\/|\?|:\d))/gi))d.push(F.index);for(const F of e.matchAll(/(?:\.{1,2})?\/[\p{L}\p{Nd}._-]+(?:\/[\p{L}\p{Nd}._-]*)*\?/gu))(F.index===0||!/[\w~/.-]/.test(e[F.index-1]))&&d.push(F.index);d.sort((F,W)=>F-W);let f=-1;for(const F of d){if(FF+7&&!/[\w/?#@~.+&=%-]/.test(e[W+1]??""))break}W++}r.push([F,W]),f=W}const h=[];for(let F=0;F]/.test(q))continue;let K=W,ie=ul,ne=ul;for(;K"){ne=K;break}if(!z&&Y==="/"&&e[K+1]===">"){ne=K+1;break}if(!/\s/.test(Y)){ie=K;break}for(;K"){ne=K;break}if(z){ie=K;break}if(le==="/"&&e[K+1]===">"){ne=K+1;break}const Ee=/^[a-zA-Z_:][\w:.-]*/.exec(e.slice(K));if(!Ee){ie=K;break}K+=Ee[0].length;let de=K;for(;de`]+/.exec(e.slice(de));if(!pe){ie=de;break}K=de+pe[0].length}}}if(ne!==ul)h.push([F,ne+1]),F=ne;else if(ie!==ul){const Y=e.indexOf("<",F+1);F=(Y!==-1&&Y",F+2);ie===-1?m=!1:(h.push([F,ie+2]),F=ie+1,z=!0)}else if(W==="!"){if(e[F+2]==="-"&&e[F+3]==="-"){if(g){const ie=e.indexOf("-->",F+4);ie===-1?g=!1:(h.push([F,ie+3]),F=ie+2,z=!0)}}else if(e.startsWith("[CDATA[",F+2)){if(w){const ie=e.indexOf("]]>",F+9);ie===-1?w=!1:(h.push([F,ie+3]),F=ie+2,z=!0)}}else if(_&&/[A-Z]/.test(e[F+2]??"")){const ie=e.indexOf(">",F+3);ie===-1?_=!1:(h.push([F,ie+1]),F=ie,z=!0)}}if(z)continue;if(W!==void 0&&/[a-zA-Z]/.test(W)){const ie=/^[a-zA-Z][a-zA-Z0-9+.-]{1,31}:/.exec(e.slice(F+1));if(ie){let ne=F+1+ie[0].length;for(;ne"&&e[ne]!=="<"&&!/\s/.test(e[ne]);)ne++;if(e[ne]===">"){h.push([F,ne+1]),F=ne;continue}}}if(W===void 0||!/[\w.!#$%&'*+/=?^`{|}~-]/.test(W))continue;let U=F+1;for(;U"&&(h.push([F,U+1]),F=U)}}h.sort((F,W)=>F[0]-W[0]);const v=[];for(const[F,W]of h){const z=v[v.length-1];z&&F<=z[1]?z[1]=Math.max(z[1],W):v.push([F,W])}r.push(...v);let k=0;const y=F=>{for(;k=(v[k]?.[1]??0);)k++;const W=v[k];return W!==void 0&&F>=W[0]},x=[];let M=null,$=0,S=!1;for(let F=0;F"&&(S=!1);else if(!(u(F)||y(F))){if(M!==null)e[F]===M&&(M=null);else if(x.length>0&&(e[F]==='"'||e[F]==="'")&&F>0&&/\s/.test(e[F-1]))M=e[F];else if(e[F]==="[")$++;else if(e[F]==="]")$>0&&e[F+1]==="("&&(x.push(F),S=e[F+2]==="<",F++),$=Math.max(0,$-1);else if(e[F]==="("&&x.length>0)x.push(-1);else if(e[F]===")"&&x.length>0){const W=x.pop();if(W!==void 0&&W>=0){const z=e.slice(W+2,F);(/\s/.exec(z)===null||z.startsWith("<")&&/^<(?:\\[<>]|[^<>])*>$/.test(z)||/^[^\s]*\s+("([^"\\]|\\.)*"|'([^'\\]|\\.)*'|\(([^()\\]|\\.)*\))$/.test(z))&&r.push([W,F+1])}}}r.sort((F,W)=>F[0]-W[0]);const I=[];for(const[F,W]of r){const z=I[I.length-1];z&&F<=z[1]?z[1]=Math.max(z[1],W):I.push([F,W])}const P=F=>{let W=0,z=I.length-1;for(;W<=z;){const U=W+z>>1,q=I[U];if(q===void 0)return!1;if(F=q[1])W=U+1;else return!0}return!1};for(let F=0;F=0;F--)n[F]===z_&&(D=F),o[F]=D;const T=/^[\p{L}\p{Nd}\\|{([+.¬°-±×÷′-″←-⇿∀-⋿^_<>=-]$/u,L=/[^\p{L}\p{Nd}\s]$/u,B=/[^\s\u0020-\u007E\u0370-\u03FF\u{1D400}-\u{1D7FF}\p{Nd}¬°-±×÷′-″←-⇿∀-⋿]/u,H=/(?:^|\s)[a-z]{2,}/,O=(F,W)=>{const z=kc(e,F+1);if(z===void 0||!T.test(z))return!1;const U=o[F+1]??ul;if(U!==ul){const q=e.slice(F+1,U);return!(q.length===((q.codePointAt(0)??0)>65535?2:1))&&B.test(q)||/[,;:!?]$/.test(q)||/^[a-z]{2,}$/.test(q)?!1:(s[U]??0)-(s[F+1]??0)===0&&(i[U]??0)-(i[F+1]??0)===0}return L.test(W)||B.test(W)||H.test(W)};return(F,W=-1)=>{if(e[F]!=="$"||n[F]===B_||e[F+1]==="$"||e[F-1]==="$"&&W!==F||Vce(e,F)||F+1>=t||D_(e[F+1]))return null;const z=o[F+1]??ul;if(z===ul||(s[z]??0)-(s[F+1]??0)>0||(i[z]??0)-(i[F+1]??0)>0)return null;const U=e.slice(F+1,z);return/^\{[A-Z_][A-Z0-9_]*(?:\}$|[:-])/.test(U)||e[z+1]==="{"&&/^\{[A-Za-z_][A-Za-z0-9_]*(?:[:-][^{}]*)?\}$/.test(U)||uf(Uce(e,F))&&Gce(U)||jce(e,F)&&(O(z,U)||qce(e,z)||/\s/.test(U)&&/\p{Nd}$/u.test(U)&&!/[+\-*/^=_<>|\\¬°-±×÷′-″←-⇿∀-⋿]/.test(U)||e[z+1]==="$"&&!/\p{L}/u.test(U)&&/[^\p{L}\p{Nd}\s]$/u.test(U))?null:{content:U,end:z+1}}}const W_=new WeakMap;function Xce(e,t){if(e.src[e.pos]!=="$")return!1;let n=W_.get(e);(!n||n.src!==e.src)&&(n={src:e.src,match:Yce(e.src),lastEnd:-1},W_.set(e,n));const o=n.match(e.pos,n.lastEnd);if(!o||o.end>e.posMax)return!1;if(n.lastEnd=o.end,t)return e.pos=o.end,!0;const s=e.push("math_inline","math",0);return s.content=o.content,s.markup="$",s.raw=e.src.slice(e.pos,o.end),s.loading=!1,e.pos=o.end,!0}function Jce(e){return e.inline.ruler.disable("math"),e.inline.ruler.before("escape","math",Xce),e}const Qce=12e4,ede=6e4,tde=32,nde=3e4,U_=/(^|\n)(`{3,}|~{3,})[^\n]*\n([\s\S]*?)(?:\n)?\2(?=\n|$)/g;function ode(e){let t=0,n=0,o=0;U_.lastIndex=0;let s;for(;(s=U_.exec(e))!==null;){const r=s[3]??"";t+=1,n+=r.length,o=Math.max(o,r.length)}return{codeRenderer:e.length>=Qce||n>=ede||t>=tde||o>=nde?"pre":"shiki",codeFenceCount:t,codeChars:n}}async function n$(e){const t=typeof navigator<"u"?navigator.clipboard:void 0;if(t&&typeof t.writeText=="function")try{return await t.writeText(e),!0}catch{}return ide(e)}function sde(e){if(typeof e!="string")return;const t=typeof navigator<"u"?navigator.clipboard:void 0;t&&typeof t.writeText=="function"||n$(e)}function ide(e){if(typeof document>"u"||typeof document.execCommand!="function")return!1;const t=document.createElement("textarea");t.value=e,t.setAttribute("readonly",""),t.style.position="fixed",t.style.top="-9999px",t.style.left="-9999px",t.style.opacity="0",document.body.appendChild(t);let n=!1;try{t.focus(),t.select(),n=document.execCommand("copy")}catch{n=!1}finally{document.body.removeChild(t)}return n}const o$="md-table-wide",s$="md-table-toggle",i$="md-table-fade",j_="md-table-toggle--show",rde="md-table-at-end",lde="kimi-table-layout",r$='',ade='';function Xp(e){return e.querySelector(`button.${s$}`)}function l$(e){return e.querySelector(`.${i$}`)}const ude=26;function cde(e){const t=Xp(e);if(!t)return;const n=e.querySelector("thead tr")??e.querySelector("tr");if(!n)return;const o=n.getBoundingClientRect(),s=e.getBoundingClientRect().top,i=Math.max(2,Math.round(o.top-s+(o.height-ude)/2));t.style.top=`${i}px`,t.style.right=`${i}px`}function dde(e){return e.closest(".a-msg .msg")!==null}function fde(e){const t=e.querySelector("table");return t!==null&&t.scrollWidth>e.clientWidth+1}function a$(e){const t=`translateX(${e.scrollLeft}px)`,n=l$(e);n&&(n.style.transform=t);const o=Xp(e);o&&(o.style.transform=t);const s=e.scrollLeft+e.clientWidth>=e.scrollWidth-2;e.classList.toggle(rde,s)}function pde(e,t){const n=Xp(e);if(n)return n;if(!dde(e))return null;const o=document.createElement("div");o.className=i$,o.setAttribute("aria-hidden","true");const s=document.createElement("button");return s.type="button",s.className=s$,s.innerHTML=r$,s.setAttribute("aria-label",t.widen),s.title=t.widen,s.addEventListener("click",i=>{i.preventDefault(),i.stopPropagation(),hde(e,t)}),e.appendChild(o),e.appendChild(s),e.addEventListener("scroll",()=>a$(e),{passive:!0}),S5(e),s}function hde(e,t){const n=e.classList.toggle(o$),o=Xp(e);if(o){o.innerHTML=n?ade:r$;const s=n?t.restore:t.widen;o.setAttribute("aria-label",s),o.title=s}S5(e),e.dispatchEvent(new CustomEvent(lde,{bubbles:!0}))}function S5(e){const t=Xp(e);if(!t)return;const n=fde(e),o=e.classList.contains(o$);t.classList.toggle(j_,n||o);const s=l$(e);s&&s.classList.toggle(j_,n),cde(e),a$(e)}function mde(e){return new Worker("/assets/katexRenderer.worker-CO_gEm4q.js",{type:"module",name:e?.name})}function gde(e){return new Worker("/assets/mermaidParser.worker-BFSlSHEW.js",{type:"module",name:e?.name})}const vde={key:1,class:"diff-wrap"},yde={class:"diff-bar"},kde=["aria-label","onClick"],bde={class:"diff-pre"},Cde={key:0,class:"diff-sign"},wde={class:"diff-text"},_de="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",V_="github-light",q_="github-dark",xde=tt({__name:"Markdown",props:{text:{},openFile:{},streaming:{type:Boolean,default:!1}},setup(e){cle(),_le(),fle(),Ale(),dle(new mde),Sle(new gde);const{t}=vf(),n=on("resolveImage"),o=Z(null),s=e,i=R(()=>!s.streaming),r=R(()=>Dce(s.text??"")),l=R(()=>s.streaming?{codeRenderer:"shiki",codeFenceCount:0,codeChars:0}:ode(s.text??"")),a=p2(),u=R(()=>!s.streaming),c=Jo(new Map),d=new Set,f=/(!\[[^\]]*\]\()\s*([^)\s]+)([^)]*\))/g,h=/(]*?\bsrc=")([^"]+)(")/gi;function g(F){return!/^(https?:|data:|blob:)/i.test(F)}function m(F){if(!n)return;const W=[];for(const z of[f,h]){z.lastIndex=0;let U;for(;(U=z.exec(F))!==null;)W.push(U[2]??"")}for(const z of W)!z||!g(z)||c.has(z)||d.has(z)||(d.add(z),n(z).then(U=>{c.set(z,U!==z?U:"")}).catch(()=>{c.set(z,"")}).finally(()=>{d.delete(z)}))}function w(F){if(!n)return F;const W=z=>{if(!g(z))return null;const U=c.get(z);return U===void 0?_de:U===""?null:U};return F.replace(f,(z,U,q,K)=>{const ie=W(q);return ie===null?z:`${U}${ie}${K}`}).replace(h,(z,U,q,K)=>{const ie=W(q);return ie===null?z:`${U}${ie}${K}`})}et(()=>s.text,F=>m(F??""),{immediate:!0});function _(){if(!o.value||!s.openFile||s.streaming)return;const F=document.createTreeWalker(o.value,NodeFilter.SHOW_TEXT),W=[];let z=F.nextNode();for(;z;){const U=z,q=U.parentElement;q&&!q.closest("a, pre, .md-file-link, svg")&&U.data.trim().length>0&&W.push(U),z=F.nextNode()}for(const U of W){const q=Hce(U.data,{aliases:r.value});if(q.length===0||!U.parentNode)continue;const K=document.createDocumentFragment();let ie=0;for(const ne of q){ne.start>ie&&K.append(document.createTextNode(U.data.slice(ie,ne.start)));const Y=document.createElement("button");Y.type="button",Y.className="md-file-link",Y.textContent=ne.text,Y.title=ne.line?`${ne.path}:${ne.line}`:ne.path,Y.addEventListener("click",le=>{le.preventDefault(),le.stopPropagation(),s.openFile?.({path:ne.path,line:ne.line})}),K.append(Y),ie=ne.end}ie{U.preventDefault(),U.stopPropagation(),s.openFile?.({path:k(z)})}))}}function x(){return{widen:t("conversation.widenTable"),restore:t("conversation.restoreTableWidth")}}function M(){if(!o.value||s.streaming)return;const F=x();for(const W of o.value.querySelectorAll(".table-node-wrapper"))pde(W,F)}function $(){if(!(!o.value||s.streaming))for(const F of o.value.querySelectorAll(".table-node-wrapper"))S5(F)}function S(){yt().then(()=>{_(),y(),M()})}et(()=>s.text,S),et(()=>s.streaming,S);let I=null,P=null;dn(()=>{S(),o.value&&(I=new MutationObserver(S),I.observe(o.value,{childList:!0,subtree:!0}),P=new ResizeObserver($),P.observe(o.value))}),kn(()=>{I?.disconnect(),P?.disconnect()});const D={showHeader:!0,showCopyButton:!0,showExpandButton:!1,showPreviewButton:!1,showCollapseButton:!1,showFontSizeButtons:!1,loading:!1,monacoOptions:{lineNumbers:!1,fontSize:13,fontFamily:"var(--font-mono)",padding:{top:12,bottom:12}}},T=/(^|\n)(?:```|~~~)diff\b[^\n]*\n([\s\S]*?)(?:\n)?(?:```|~~~)(?=\n|$)/g,L=R(()=>{const F=w(s.text??""),W=[];let z=0;T.lastIndex=0;let U;for(;(U=T.exec(F))!==null;){const K=U[1]??"",ie=F.slice(z,U.index)+(K||"");ie.trim()&&W.push({kind:"md",text:ie}),W.push({kind:"diff",code:U[2]??""}),z=T.lastIndex}const q=F.slice(z);return(q.trim()||W.length===0)&&W.push({kind:"md",text:q}),W});function B(F){return F.split(` +`).map(W=>W.startsWith("@@")?{type:"hunk",sign:"",text:W}:/^\+(?!\+\+)/.test(W)?{type:"add",sign:"+",text:W.slice(1)}:/^-(?!--)/.test(W)?{type:"del",sign:"-",text:W.slice(1)}:W.startsWith(" ")?{type:"ctx",sign:"",text:W.slice(1)}:{type:"ctx",sign:"",text:W})}const H=Z(null);function O(F,W){n$(F).then(z=>{z&&(H.value=W,setTimeout(()=>{H.value=null},1400))})}return(F,W)=>(b(),A("div",{ref_key:"mdRef",ref:o,class:"md"},[(b(!0),A(Pe,null,pt(L.value,(z,U)=>(b(),A(Pe,{key:U},[z.kind==="md"?(b(),me(p(Ui),{key:0,content:z.text,"custom-markdown-it":p(Jce),mode:"chat","code-renderer":l.value.codeRenderer,"is-dark":p(a),"code-block-light-theme":V_,"code-block-dark-theme":q_,themes:[V_,q_],"code-block-props":D,final:i.value,"smooth-streaming":e.streaming,"batch-rendering":u.value,"defer-nodes-until-visible":!1,onCopy:p(sde)},null,8,["content","custom-markdown-it","code-renderer","is-dark","themes","final","smooth-streaming","batch-rendering","onCopy"])):(b(),A("div",vde,[C("div",yde,[W[0]||(W[0]=C("span",{class:"diff-lang"},"diff",-1)),V(p(Pn),{text:p(t)("filePreview.copyCode")},{default:ke(()=>[C("button",{class:"diff-copy","aria-label":p(t)("filePreview.copyCode"),onClick:q=>O(z.code,U)},[V(p(Ie),{name:H.value===U?"check":"copy",size:"sm"},null,8,["name"])],8,kde)]),_:2},1032,["text"])]),C("pre",bde,[C("code",null,[(b(!0),A(Pe,null,pt(B(z.code),(q,K)=>(b(),A("span",{key:K,class:Re(["diff-line",`diff-${q.type}`])},[q.type!=="hunk"?(b(),A("span",Cde,N(q.sign),1)):te("",!0),C("span",wde,N(q.text),1)],2))),128))])])]))],64))),128))],512))}}),Ic=ht(xde,[["__scopeId","data-v-2ec518c1"]]),Sde={state:"idle"};function Ade(e){const t=Z(Sde),n=Z(li(cn.updateSkippedVersion)),o=Z(!1);if(typeof e?.getUpdateAutoDownload=="function"&&e.getUpdateAutoDownload().then(i=>{o.value=i}).catch(()=>{}),e!==void 0){let i=!1;e.onUpdateStatus(r=>{i=!0,t.value=r}),e.getUpdateStatus().then(r=>{i||(t.value=r)}).catch(()=>{})}const s=R(()=>{const i=t.value;return!(i.state==="idle"||i.state==="available"&&i.version!==void 0&&i.version===n.value)});return{status:t,visible:s,canCheck:typeof e?.checkForUpdates=="function",autoDownload:o,canToggleAutoDownload:typeof e?.getUpdateAutoDownload=="function"&&typeof e?.setUpdateAutoDownload=="function",setAutoDownload:i=>{o.value=i,e?.setUpdateAutoDownload?.(i).catch(()=>{})},skipVersion:()=>{const i=t.value.version;t.value.state==="available"&&i!==void 0&&(n.value=i,Ls(cn.updateSkippedVersion,i))},check:async()=>{if(typeof e?.checkForUpdates!="function")return Promise.resolve({outcome:"unsupported"});const i=await e.checkForUpdates().catch(()=>({outcome:"error",message:"bridge call failed"}));return i.outcome==="available"&&i.version!==void 0&&i.version===n.value&&(n.value=null,lr(cn.updateSkippedVersion)),i},download:()=>{e?.downloadUpdate().catch(()=>{})},install:()=>{e?.installUpdate().catch(()=>{})}}}let a4=null;function u$(){return a4===null&&(a4=Ade(window.kimiDesktop)),a4}const Mde=["data-state"],Tde=["aria-label"],Ede={class:"upd-pill-text"},Ide={key:0,class:"upd-meta"},Lde={key:1,class:"upd-notes"},$de={class:"upd-notes-title"},Nde={key:2,class:"upd-progress"},Fde={key:3,class:"upd-message"},Rde={class:"upd-foot"},Ode={class:"upd-foot-actions"},Pde=tt({__name:"UpdateIndicator",setup(e){const{t,locale:n}=Lt(),{status:o,visible:s,skipVersion:i,download:r,install:l,autoDownload:a,setAutoDownload:u,canToggleAutoDownload:c}=u$(),d=Z(!1),f="0.33.0".trim()?"0.33.0":"",h=R(()=>{switch(o.value.state){case"available":return t("sidebar.update");case"downloading":return`${o.value.percent??0}%`;case"downloaded":return t("sidebar.updateDone");case"error":return t("sidebar.updateFailed");default:return""}}),g=R(()=>{switch(o.value.state){case"available":return t("sidebar.updateAvailable",{version:o.value.version??""});case"downloading":return t("sidebar.updateDownloading",{percent:o.value.percent??0});case"downloaded":return t("sidebar.updateReady",{version:o.value.version??""});case"error":return t("sidebar.updateFailed");default:return""}}),m=R(()=>{const $=o.value.releaseDate;if($===void 0||$==="")return"";const S=new Date($),I=Number.isNaN(S.getTime())?$:S.toLocaleDateString();return t("sidebar.updateReleaseDate",{date:I})}),w=R(()=>{const $=[];return m.value!==""&&$.push(m.value),f!==""&&$.push(t("sidebar.updateCurrentVersion",{version:f})),$.join(" · ")}),_=R(()=>o.value.percent??0),v=R(()=>{const $=o.value.releaseNotes;return $===void 0?"":((n.value.toLowerCase().startsWith("zh")?$.zh:$.en)??$.zh??$.en??"").trim()}),k=R(()=>{switch(o.value.state){case"error":return"alert-triangle";default:return"download"}});function y(){r()}function x(){i(),d.value=!1}function M(){l(),d.value=!1}return($,S)=>p(s)?(b(),A("span",{key:0,class:"upd","data-state":p(o).state},[C("button",{class:"upd-pill",type:"button","aria-label":h.value,onClick:S[0]||(S[0]=I=>d.value=!0)},[V(p(Ie),{class:"upd-pill-icon",name:k.value,size:"sm"},null,8,["name"]),C("span",Ede,N(h.value),1)],8,Tde),V(p(ca),{open:d.value,title:g.value,size:"lg","onUpdate:open":S[4]||(S[4]=I=>d.value=I)},{foot:ke(()=>[C("div",Rde,[C("div",Ode,[p(o).state==="available"?(b(),A(Pe,{key:0},[V(p(Ft),{variant:"ghost",onClick:x},{default:ke(()=>[Ve(N(p(t)("sidebar.updateSkip")),1)]),_:1}),V(p(Ft),{onClick:y},{default:ke(()=>[Ve(N(p(t)("sidebar.updateDownloadNow")),1)]),_:1})],64)):p(o).state==="downloading"?(b(),me(p(Ft),{key:1,variant:"secondary",onClick:S[1]||(S[1]=I=>d.value=!1)},{default:ke(()=>[Ve(N(p(t)("sidebar.updateBackground")),1)]),_:1})):p(o).state==="downloaded"?(b(),A(Pe,{key:2},[V(p(Ft),{variant:"ghost",onClick:S[2]||(S[2]=I=>d.value=!1)},{default:ke(()=>[Ve(N(p(t)("sidebar.updateRestartLater")),1)]),_:1}),V(p(Ft),{onClick:M},{default:ke(()=>[Ve(N(p(t)("sidebar.updateRestartNow")),1)]),_:1})],64)):p(o).state==="error"?(b(),me(p(Ft),{key:3,variant:"danger-soft",onClick:y},{default:ke(()=>[Ve(N(p(t)("sidebar.updateRetry")),1)]),_:1})):te("",!0)]),p(c)?(b(),me(p(eW),{key:0,class:"upd-auto","model-value":p(a),"onUpdate:modelValue":S[3]||(S[3]=I=>p(u)(I))},{default:ke(()=>[Ve(N(p(t)("sidebar.updateAutoDownload")),1)]),_:1},8,["model-value"])):te("",!0)])]),default:ke(()=>[(p(o).state==="available"||p(o).state==="downloaded")&&w.value?(b(),A("p",Ide,N(w.value),1)):te("",!0),v.value?(b(),A("section",Lde,[C("h4",$de,N(p(t)("sidebar.updateWhatsNew")),1),V(p(Ic),{text:v.value},null,8,["text"])])):te("",!0),p(o).state==="downloading"?(b(),A("div",Nde,[C("div",{class:"upd-progress-fill",style:Gt({width:`${_.value}%`})},null,4)])):te("",!0),p(o).state==="error"&&p(o).message?(b(),A("p",Fde,N(p(o).message),1)):te("",!0)]),_:1},8,["open","title"])],8,Mde)):te("",!0)}}),Dde=ht(Pde,[["__scopeId","data-v-fdb68462"]]),mg=[{code:"en",label:"English"},{code:"zh",label:"简体中文"}],Wn=_z({locale:IM()});function A5(e){Wn.global.locale.value=e,Ls(cn.locale,e)}function Bde(){return window.kimiDesktop}function c$(e,t,n){const o=n.length===0?void 0:n.length===1?n[0]:n;try{Bde()?.log?.(e,t,o)}catch{}}function gl(e,...t){console.warn(e,...t),c$("warn",e,t)}function Jl(e,...t){console.error(e,...t),c$("error",e,t)}const Hde=["app:load:start","app:load:complete","export:start","export:accepted","export:failed","prompt:start","prompt:accepted","prompt:failed","session:snapshot:start","session:snapshot:accepted","session:snapshot:failed","operation:failed","window:error","window:unhandled-rejection","ws:connection","ws:error","ws:resync","ws:stale-reconnect"],d$=500,gg=256*1024,K_=200,u4=16384,c4=500,d4=50,f4=50,zde=6,Wde=/api[_-]?key|authorization|token|secret|password|cookie|credential|email|phone|nickname|avatar/i,Ude=/^[A-Za-z0-9+/=_-]{200,}$/;let p4=null;function Qr(){if(p4!==null)return p4;let e=!1;try{if(typeof location<"u"){const t=new URLSearchParams(location.search).get("debug");(t==="1"||t==="true")&&(e=!0)}}catch{}return e||(e=li(cn.debug)==="1"),p4=e,e}const Ka=[],Id=[];let A1=0;const Zu=[];let M1=0,jde=1;const vg=new TextEncoder,Vde=new Set(Hde),M5=Z(0),T1=Xr(!1);function qde(){return Ka}function Kde(){Ka.length=0,Id.length=0,A1=0,Zu.length=0,M1=0,M5.value++}function da(e){if(!T1.value){try{const t={id:jde++,ts:Date.now(),source:e.source,kind:String(Zd(e.kind)),label:String(Zd(e.label)),sessionId:e.sessionId===void 0?void 0:String(Zd(e.sessionId)),method:e.method,path:e.path,eventType:e.eventType,seq:e.seq,offset:e.offset,status:e.status,code:e.code,requestId:e.requestId,durationMs:e.durationMs,detail:fu(e.detail)},n=JSON.stringify(t),o=vg.encode(n).byteLength;if(o>gg)return;for(Ka.push(t),Id.push(n),A1+=o+(Id.length>1?1:0);Ka.length>d$||A1>gg;){const s=Id.shift();Ka.shift(),s!==void 0&&(A1-=vg.encode(s).byteLength,Id.length>0&&(A1-=1))}}catch{return}M5.value++}}function Pu(e){if(typeof e=="string")return e.length<=K_?e:e.slice(0,K_)}function pr(e){return typeof e=="number"&&Number.isFinite(e)?e:void 0}function Zde(e,t){if(Vde.has(e))try{const n={ts:Date.now(),event:e,sessionId:Pu(t?.sessionId),status:Pu(t?.status),operation:Pu(t?.operation),seq:pr(t?.seq),durationMs:pr(t?.durationMs),messageCount:pr(t?.messageCount),contentCount:pr(t?.contentCount),mediaCount:pr(t?.mediaCount),sessionCount:pr(t?.sessionCount),workspaceCount:pr(t?.workspaceCount),promptId:Pu(t?.promptId),zipBytes:pr(t?.zipBytes),errorName:Pu(t?.errorName),errorCode:pr(t?.errorCode),requestId:Pu(t?.requestId),phase:Pu(t?.phase),httpStatus:pr(t?.httpStatus),fatal:typeof t?.fatal=="boolean"?t.fatal:void 0,line:pr(t?.line),col:pr(t?.col)},o=JSON.stringify(n),s=vg.encode(o).byteLength;if(s>gg)return;for(Zu.push(o),M1+=s+(Zu.length>1?1:0);Zu.length>d$||M1>gg;){const i=Zu.shift();i!==void 0&&(M1-=vg.encode(i).byteLength,Zu.length>0&&(M1-=1))}}catch{return}}function Zd(e,t=0){if(e==null)return e;const n=typeof e;if(n==="number"||n==="boolean")return e;if(n==="string"){const i=e;return Ude.test(i)?`[base64-like, ${i.length} chars omitted]`:i.length>c4?`${i.slice(0,c4)}… [+${i.length-c4} chars]`:i}if(n!=="object")return String(e);if(t>=zde)return"[max depth]";if(Array.isArray(e)){const i=e.slice(0,d4).map(r=>Zd(r,t+1));return e.length>d4&&i.push(`[+${e.length-d4} more items]`),i}const o={},s=Object.entries(e);for(const[i,r]of s.slice(0,f4))o[i]=Wde.test(i)?"[redacted]":Zd(r,t+1);return s.length>f4&&(o._truncatedKeys=s.length-f4),o}function fu(e){if(e===void 0)return;const t=Zd(e);try{const n=JSON.stringify(t);if(n!==void 0&&n.length>u4)return{_truncated:`detail JSON was ${n.length} chars; first ${u4} kept`,preview:n.slice(0,u4)}}catch{return"[unserializable detail]"}return t}function Gde(e){Qr()&&da({source:"rest",kind:"rest:request",label:`→ ${e.method} ${e.path}`,method:e.method,path:e.path,requestId:e.requestId,detail:{url:e.url,body:fu(e.body)}})}function Yde(e){if(!Qr())return;const t=e.code!==0;da({source:"rest",kind:t?"rest:error":"rest:response",label:`← ${e.method} ${e.path} ${e.status} code=${e.code}${t?` "${e.msg}"`:""} ${Math.round(e.durationMs)}ms`,method:e.method,path:e.path,requestId:e.requestId,status:e.status,code:e.code,durationMs:e.durationMs,detail:{envelope:{code:e.code,msg:e.msg,request_id:e.envelopeRequestId},data:fu(e.data)}})}function Xde(e){Qr()&&da({source:"rest",kind:"rest:error",label:`✕ ${e.method} ${e.path} ${e.phase} error${e.status!==void 0?` (HTTP ${e.status})`:""} ${Math.round(e.durationMs)}ms`,method:e.method,path:e.path,requestId:e.requestId,status:e.status,durationMs:e.durationMs,detail:{phase:e.phase,error:String(e.error)}})}function Jde(e,t){Qr()&&da({source:"ws",kind:"ws:lifecycle",eventType:e,label:`ws ${e}`,detail:fu(t)})}function Qde(e){if(!Qr())return;const t=e??{},n=typeof t.type=="string"?t.type:"(unknown)",o=t.payload,s=typeof o?.session_id=="string"?o.session_id:void 0;da({source:"ws",kind:"ws:out",eventType:n,sessionId:s,label:`→ ${n}`,detail:fu(e)})}function efe(e){if(!Qr())return;const t=e??{},n=typeof t.type=="string"?t.type:"(unknown)",o=typeof t.session_id=="string"?t.session_id:typeof t.payload?.session_id=="string"?t.payload.session_id:void 0,s=typeof t.seq=="number"?t.seq:void 0,i=typeof t.offset=="number"?t.offset:void 0,r=[o,s!==void 0?`seq=${s}`:void 0,i!==void 0?`offset=${i}`:void 0,t.volatile===!0?"volatile":void 0].filter(Boolean);da({source:"ws",kind:"ws:in",eventType:n,sessionId:o,seq:s,offset:i,label:`← ${n}${r.length>0?` (${r.join(" ")})`:""}`,detail:fu(t.payload)})}const tfe={error:"✕",warn:"⚠",info:"ℹ",debug:"·",log:"·"};function nfe(e,t,n){Qr()&&da({source:"client",kind:`client:${e}`,label:`${tfe[e]} ${t}`,detail:fu(n)})}function ofe(e,t){Qr()&&da({source:"client",kind:"client:event",label:`· ${e}`,detail:fu(t)})}function yi(e,t){Zde(e,t),da({source:"client",kind:"client:key",label:e,sessionId:typeof t?.sessionId=="string"?t.sessionId:void 0,seq:typeof t?.seq=="number"?t.seq:void 0,durationMs:typeof t?.durationMs=="number"?t.durationMs:void 0,detail:t})}let h4=!1,Th=null;function sfe(){if(h4)return()=>Th?.();h4=!0;const e=[];try{if(typeof window<"u"){const n=s=>{yi("window:error",{status:"failed",errorName:s.error instanceof Error?s.error.name:"Error",line:s.lineno,col:s.colno}),Jl(`[kimi-web] window error: ${s.message}`,s.error instanceof Error?s.error.stack:void 0)},o=s=>{const i=s.reason;yi("window:unhandled-rejection",{status:"failed",errorName:i instanceof Error?i.name:typeof i}),Jl(`[kimi-web] unhandled rejection: ${rfe(i)}`,i instanceof Error?i.stack:void 0)};window.addEventListener("error",n),window.addEventListener("unhandledrejection",o),e.push(()=>{window.removeEventListener("error",n)}),e.push(()=>{window.removeEventListener("unhandledrejection",o)})}}catch{}if(Qr())for(const n of["error","warn","log","info","debug"]){const o=console[n];if(typeof o!="function")continue;const s=(...i)=>{try{nfe(n,i.map(ife).join(" "),i.length>1?i:i[0])}catch{}o.apply(console,i)};console[n]=s,e.push(()=>{console[n]===s&&(console[n]=o)})}const t=()=>{if(Th===t){for(const n of e.toReversed())n();Th=null,h4=!1}};return Th=t,t}function ife(e){if(typeof e=="string")return e;if(e instanceof Error)return`${e.name}: ${e.message}`;try{return JSON.stringify(e)}catch{return String(e)}}function rfe(e){if(e instanceof Error)return e.message;try{return String(e)}catch{return"[unstringifiable reason]"}}function f$(e=Ka){if(typeof document>"u")return;const t=new Blob([lfe(e)],{type:"application/x-ndjson"}),n=URL.createObjectURL(t);let o;try{o=document.createElement("a"),o.href=n,o.download=`kimi-web-log-${new Date().toISOString().replaceAll(/[:.]/g,"-")}.jsonl`,document.body.append(o),o.click()}finally{o?.remove(),setTimeout(()=>{try{URL.revokeObjectURL(n)}catch{}},0)}}function lfe(e=Ka){return e===Ka?Id.join(` +`):e.map(t=>JSON.stringify(t)).join(` +`)}function afe(){return Zu.join(` +`)}const Ds="kimi-web.server-credential",ufe="token",cfe=10080*60*1e3;let yl;const Q3=new Set;function dfe(){if(typeof window>"u")return;const e=window.location.hash??"";if(!e.startsWith("#"))return;const n=new URLSearchParams(e.slice(1)).get(ufe);if(!n)return;const o=new URL(window.location.href);return o.hash="",window.history.replaceState(window.history.state,"",`${o.pathname}${o.search}`),n}function ey(e){return{version:1,credential:e,expiresAt:Date.now()+cfe}}function ffe(e){return JSON.stringify(e)}function T5(e){try{const t=JSON.parse(e);if(typeof t!="object"||t===null)return;const n=t;return n.version!==1||typeof n.credential!="string"||n.credential.length===0||typeof n.expiresAt!="number"||!Number.isFinite(n.expiresAt)?void 0:{version:1,credential:n.credential,expiresAt:n.expiresAt}}catch{return}}function ty(e){globalThis.localStorage?.setItem(Ds,ffe(e))}function pfe(){try{const e=globalThis.localStorage?.getItem(Ds);if(e){const n=T5(e);if(n===void 0){const o=ey(e);let s=!1;try{ty(o),s=!0}catch{}if(!s)try{globalThis.localStorage?.getItem(Ds)===e&&globalThis.localStorage?.removeItem(Ds),s=!0}catch{}try{globalThis.sessionStorage?.removeItem(Ds)}catch{}return s?o:void 0}if(n.expiresAt>Date.now())return n;globalThis.sessionStorage?.removeItem(Ds),globalThis.localStorage?.getItem(Ds)===e&&globalThis.localStorage?.removeItem(Ds);return}const t=globalThis.sessionStorage?.getItem(Ds);if(t){const n=ey(t);let o=!1;try{ty(n),o=!0}catch{}try{globalThis.sessionStorage?.removeItem(Ds),o=!0}catch{}return o?n:void 0}return}catch{return}}function hfe(){const e=dfe();return e?(p$(e),!0):(yl=pfe(),yl!==void 0)}function mfe(){if(yl!==void 0){if(yl.expiresAt<=Date.now()){gfe(yl);return}return yl.credential}}function gfe(e){yl=void 0;try{globalThis.sessionStorage?.removeItem(Ds);const t=globalThis.localStorage?.getItem(Ds),n=t==null?void 0:T5(t);(n===void 0?t===e.credential:n.credential===e.credential&&n.expiresAt===e.expiresAt)&&globalThis.localStorage?.removeItem(Ds)}catch{}}function p$(e){const t=ey(e);yl=t;try{ty(t)}catch{}try{globalThis.sessionStorage?.removeItem(Ds)}catch{}}function vfe(){const e=yl;yl=void 0;try{const t=globalThis.localStorage?.getItem(Ds),o=(t==null?void 0:T5(t))?.credential??t;e!==void 0&&o===e.credential&&globalThis.localStorage?.removeItem(Ds),globalThis.sessionStorage?.removeItem(Ds)}catch{}}function yfe(e){return Q3.add(e),()=>{Q3.delete(e)}}function kfe(){vfe();for(const e of Q3)try{e()}catch{}}const Z_=cn.clientId,bfe="kimi-code-web",Cfe="web";function wfe(){return{serverHttpUrl:xfe(),clientId:Afe(),clientName:bfe,clientVersion:Mfe(),clientUiMode:Cfe}}function _fe(){return typeof window<"u"&&window.location?.origin?window.location.origin:"http://127.0.0.1:58627"}function xfe(){const e=h$();return ny(e||void 0)}const G_="kimi-desktop-server-origin";function h$(){if(typeof window>"u")return;const e=new URLSearchParams(window.location.search).get("kimi_origin");try{return e?(window.sessionStorage.setItem(G_,e),e):window.sessionStorage.getItem(G_)??void 0}catch{return e??void 0}}function ny(e){const t=e&&e.trim()?e:_fe(),n=new URL(t);return n.pathname=n.pathname.replace(/\/v1\/?$/,"").replace(/\/$/,""),n.search="",n.hash="",n.toString().replace(/\/$/,"")}function Y_(e){return e.replace(/^https?:\/\//,"").replace(/\/$/,"")}function Sfe(){if(typeof window<"u"){const t=h$();if(t)return Y_(ny(t))}const e=typeof window<"u"&&window.location?.origin?window.location.origin:"";return Y_(e)}function Afe(){const e=li(Z_);if(e)return e;const t=`web_${globalThis.crypto?.randomUUID?.()||Math.random().toString(36).slice(2)}`;return Ls(Z_,t),t}function Mfe(){return"0.33.0".trim()?"0.33.0":"0.0.0-dev"}const Tfe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Efe(e,t){return b(),A("svg",Tfe,[...t[0]||(t[0]=[C("path",{d:"M12.0684 2.03418C12.5654 2.03421 12.9687 2.43755 12.9688 2.93457V11.0996H21.0654C21.5625 11.0996 21.9658 11.503 21.9658 12C21.9658 12.497 21.5625 12.9004 21.0654 12.9004H12.9688V21.0654C12.9687 21.5624 12.5654 21.9658 12.0684 21.9658C11.5713 21.9658 11.168 21.5625 11.168 21.0654V12.9004H2.93457C2.43751 12.9004 2.03418 12.4971 2.03418 12C2.03418 11.5029 2.43751 11.0996 2.93457 11.0996H11.168V2.93457C11.168 2.43753 11.5713 2.03418 12.0684 2.03418Z",fill:"currentColor"},null,-1)])])}const Ife=kt({name:"kimi-add",render:Efe}),Lfe={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function $fe(e,t){return b(),A("svg",Lfe,[...t[0]||(t[0]=[C("path",{id:"p0",d:"M 0 -9.9 C -5.468 -9.9 -9.9 -5.468 -9.9 0 C -9.9 1.923 -9.351 3.719 -8.402 5.239 C -8.402 5.239 -9.483 7.821 -9.483 7.821 C -9.896 8.809 -9.171 9.9 -8.099 9.9 C -8.099 9.9 0 9.9 0 9.9 C 5.468 9.9 9.9 5.468 9.9 0 C 9.9 -5.468 5.468 -9.9 0 -9.9 Z M -8.1 0 C -8.1 -4.474 -4.474 -8.1 0 -8.1 C 4.473 -8.1 8.1 -4.474 8.1 0 C 8.1 4.473 4.473 8.1 -0.001 8.1 C -0.001 8.1 -7.648 8.1 -7.648 8.1 L -6.365 5.035 C -6.365 5.035 -6.648 4.629 -6.648 4.629 C -7.563 3.317 -8.1 1.723 -8.1 0 Z",transform:"matrix(1 0 0 1 12 12)",fill:"currentColor","fill-rule":"evenodd"},null,-1),C("path",{id:"p1",d:"M 3.6 0.5 L -2.6 0.5 M 0.5 -2.573 L 0.5 3.573",transform:"translate(11.5 11.5)",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round"},null,-1)])])}const Nfe=kt({name:"kimi-add-conversation",render:$fe}),Ffe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Rfe(e,t){return b(),A("svg",Ffe,[...t[0]||(t[0]=[C("path",{d:"M15.0996 12C15.5967 12 16 12.4033 16 12.9004C15.9998 13.3973 15.5965 13.7998 15.0996 13.7998H8.90039C8.40346 13.7998 8.00021 13.3973 8 12.9004C8 12.4033 8.40333 12 8.90039 12H15.0996Z",fill:"currentColor"},null,-1),C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M19 3.2002C20.5464 3.2002 21.7998 4.4536 21.7998 6V7C21.7998 8.03565 21.2363 8.93754 20.4004 9.42188V17C20.4004 19.1539 18.6539 20.9004 16.5 20.9004H7.5C5.34609 20.9004 3.59961 19.1539 3.59961 17V9.42188C2.76374 8.93754 2.2002 8.03565 2.2002 7V6C2.2002 4.4536 3.4536 3.2002 5 3.2002H19ZM5.40039 17C5.40039 18.1598 6.3402 19.0996 7.5 19.0996H16.5C17.6598 19.0996 18.5996 18.1598 18.5996 17V9.7998H5.40039V17ZM4.89746 5.00488C4.39333 5.05621 4 5.48232 4 6V7L4.00488 7.10254C4.05278 7.57297 4.42703 7.94722 4.89746 7.99512L5 8H19C19.5523 8 20 7.55228 20 7V6C20 5.44772 19.5523 5 19 5H5L4.89746 5.00488Z",fill:"currentColor"},null,-1)])])}const Ofe=kt({name:"kimi-archive",render:Rfe}),Pfe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Dfe(e,t){return b(),A("svg",Pfe,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.386 21.6387C11.7378 21.988 12.3059 21.987 12.6565 21.6364L18.1949 16.098C18.5464 15.7465 18.5464 15.1766 18.1949 14.8252C17.8434 14.4737 17.2736 14.4737 16.9221 14.8252L12.9201 18.8272V3.00002C12.9201 2.50297 12.5171 2.10003 12.0201 2.10003C11.523 2.10003 11.1201 2.50297 11.1201 3.00002V18.8383L7.07554 14.8229C6.7228 14.4727 6.15295 14.4747 5.80275 14.8275C5.45255 15.1802 5.45461 15.7501 5.80735 16.1003L11.386 21.6387Z",fill:"currentColor"},null,-1)])])}const Bfe=kt({name:"kimi-arrow-down",render:Dfe}),Hfe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function zfe(e,t){return b(),A("svg",Hfe,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.16127 12.814C1.81197 12.4622 1.81299 11.8941 2.16357 11.5435L7.70203 6.00506C8.0535 5.65359 8.62335 5.65359 8.97482 6.00506C9.32629 6.35653 9.32629 6.92638 8.97482 7.27785L4.97276 11.2799H20.8C21.297 11.2799 21.7 11.6829 21.7 12.1799C21.7 12.677 21.297 13.0799 20.8 13.0799H4.96171L8.97712 17.1244C9.32732 17.4772 9.32526 18.047 8.97252 18.3972C8.61978 18.7474 8.04993 18.7454 7.69973 18.3926L2.16127 12.814Z",fill:"currentColor"},null,-1)])])}const Wfe=kt({name:"kimi-arrow-left",render:zfe}),Ufe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function jfe(e,t){return b(),A("svg",Ufe,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M21.4387 12.814C21.788 12.4622 21.787 11.8941 21.4364 11.5436L15.8979 6.0051C15.5464 5.65363 14.9766 5.65363 14.6251 6.0051C14.2737 6.35657 14.2737 6.92642 14.6251 7.27789L18.6272 11.28H2.79998C2.30293 11.28 1.89998 11.6829 1.89998 12.18C1.89998 12.677 2.30293 13.08 2.79998 13.08H18.6382L14.6228 17.1245C14.2726 17.4772 14.2747 18.0471 14.6274 18.3973C14.9802 18.7475 15.55 18.7454 15.9002 18.3927L21.4387 12.814Z",fill:"currentColor"},null,-1)])])}const Vfe=kt({name:"kimi-arrow-right",render:jfe}),qfe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Kfe(e,t){return b(),A("svg",qfe,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.386 2.36129C11.7378 2.01198 12.3059 2.013 12.6565 2.36358L18.1949 7.90204C18.5464 8.25351 18.5464 8.82336 18.1949 9.17483C17.8434 9.52631 17.2736 9.52631 16.9221 9.17483L12.9201 5.17277V21C12.9201 21.497 12.5171 21.9 12.0201 21.9C11.523 21.9 11.1201 21.497 11.1201 21V5.16172L7.07554 9.17713C6.7228 9.52733 6.15295 9.52527 5.80275 9.17253C5.45255 8.81979 5.45461 8.24995 5.80735 7.89975L11.386 2.36129Z",fill:"currentColor"},null,-1)])])}const Zfe=kt({name:"kimi-arrow-up",render:Kfe}),Gfe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Yfe(e,t){return b(),A("svg",Gfe,[...t[0]||(t[0]=[C("path",{d:"M19.3027 5.9053C19.6542 5.55397 20.2247 5.55388 20.5761 5.9053C20.9273 6.25675 20.9273 6.82734 20.5761 7.17874L9.65911 18.0948C9.30773 18.4461 8.73814 18.446 8.38665 18.0948L3.42376 13.1328C3.0726 12.7814 3.07263 12.2118 3.42376 11.8604C3.77524 11.509 4.34575 11.5089 4.6972 11.8604L9.02239 16.1856L19.3027 5.9053Z",fill:"currentColor"},null,-1)])])}const Xfe=kt({name:"kimi-check",render:Yfe}),Jfe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Qfe(e,t){return b(),A("svg",Jfe,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.3912 16.7134C11.743 17.0627 12.3111 17.0617 12.6617 16.7111L19.6364 9.73641C19.9878 9.38494 19.9878 8.81509 19.6364 8.46362C19.2849 8.11215 18.7151 8.11215 18.3636 8.46362L12.023 14.8042L5.63407 8.46132C5.28133 8.11112 4.71149 8.11318 4.36129 8.46592C4.01109 8.81866 4.01314 9.3885 4.36588 9.73871L11.3912 16.7134Z",fill:"currentColor"},null,-1)])])}const e1e=kt({name:"kimi-chevron-down",render:Qfe}),t1e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function n1e(e,t){return b(),A("svg",t1e,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M16.1261 12.6088C16.4754 12.257 16.4743 11.6889 16.1238 11.3383L9.14904 4.36363C8.79757 4.01216 8.22772 4.01216 7.87625 4.36363C7.52477 4.7151 7.52477 5.28495 7.87625 5.63642L14.2169 11.977L7.87395 18.3659C7.52375 18.7187 7.52581 19.2885 7.87855 19.6387C8.23129 19.9889 8.80113 19.9869 9.15133 19.6341L16.1261 12.6088Z",fill:"currentColor"},null,-1)])])}const o1e=kt({name:"kimi-chevron-right",render:n1e}),s1e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function i1e(e,t){return b(),A("svg",s1e,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.3912 8.46132C11.743 8.11202 12.3111 8.11304 12.6617 8.46362L19.6364 15.4383C19.9878 15.7898 19.9878 16.3597 19.6364 16.7111C19.2849 17.0626 18.7151 17.0626 18.3636 16.7111L12.023 10.3705L5.63407 16.7134C5.28133 17.0636 4.71149 17.0616 4.36129 16.7088C4.01109 16.3561 4.01314 15.7862 4.36588 15.436L11.3912 8.46132Z",fill:"currentColor"},null,-1)])])}const r1e=kt({name:"kimi-chevron-up",render:i1e}),l1e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function a1e(e,t){return b(),A("svg",l1e,[...t[0]||(t[0]=[C("path",{d:"M11.8999 6.79965C12.397 6.79965 12.7997 7.20235 12.7997 7.69941V11.7266L14.7359 13.6629C15.0873 14.0143 15.0879 14.584 14.7366 14.9355C14.3852 15.287 13.8148 15.287 13.4633 14.9355L11.2632 12.7355C11.0947 12.5668 11.0002 12.338 11.0001 12.0995V7.69941C11.0001 7.20238 11.4029 6.7997 11.8999 6.79965Z",fill:"currentColor"},null,-1),C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12 1.89893C17.4677 1.89893 21.9001 6.33147 21.9002 11.7991C21.9002 17.2669 17.4678 21.6993 12 21.6993C6.53228 21.6993 2.09985 17.2669 2.09985 11.7991C2.09998 6.33147 6.53236 1.89893 12 1.89893ZM20.1 11.7998C20.1 7.32616 16.4737 3.69984 12 3.69984C7.5264 3.69984 3.90008 7.32616 3.90008 11.7998C3.90032 16.2732 7.52655 19.8998 12 19.8998C16.4735 19.8998 20.0998 16.2732 20.1 11.7998Z",fill:"currentColor"},null,-1)])])}const u1e=kt({name:"kimi-clock",render:a1e}),c1e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function d1e(e,t){return b(),A("svg",c1e,[...t[0]||(t[0]=[C("path",{d:"M17.9542 4.77253C18.3056 4.42106 18.8761 4.42106 19.2276 4.77253C19.579 5.12401 19.579 5.69452 19.2276 6.04597L13.2735 12.0001L19.2276 17.9542C19.5791 18.3056 19.5791 18.8761 19.2276 19.2276C18.8761 19.5791 18.3056 19.5791 17.9542 19.2276L12.0001 13.2735L6.04595 19.2276C5.69451 19.5791 5.12399 19.579 4.77252 19.2276C4.42104 18.8761 4.42104 18.3056 4.77252 17.9542L10.7266 12.0001L4.77252 6.04597C4.42104 5.6945 4.42104 5.124 4.77252 4.77253C5.12399 4.42107 5.69448 4.42106 6.04595 4.77253L12.0001 10.7266L17.9542 4.77253Z",fill:"currentColor"},null,-1)])])}const f1e=kt({name:"kimi-close",render:d1e}),p1e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function h1e(e,t){return b(),A("svg",p1e,[...t[0]||(t[0]=[C("path",{d:"M9.85815 11.957C10.9074 11.957 11.7583 12.8083 11.7585 13.8574V19.8574C11.7585 20.3545 11.3552 20.7578 10.8582 20.7578C10.3611 20.7578 9.95776 20.3545 9.95776 19.8574V13.8574C9.95755 13.8024 9.91325 13.7578 9.85815 13.7578H3.85815C3.3611 13.7578 2.95776 13.3545 2.95776 12.8574C2.95798 12.3605 3.36123 11.957 3.85815 11.957H9.85815Z",fill:"currentColor"},null,-1),C("path",{d:"M12.8582 2.95703C13.3551 2.95703 13.7583 3.36054 13.7585 3.85742V9.85742C13.7585 9.91265 13.8029 9.95703 13.8582 9.95703H19.8582C20.3551 9.95703 20.7583 10.3605 20.7585 10.8574C20.7585 11.3545 20.3552 11.7578 19.8582 11.7578H13.8582C12.8088 11.7578 11.9578 10.9068 11.9578 9.85742V3.85742C11.958 3.36054 12.3612 2.95703 12.8582 2.95703Z",fill:"currentColor"},null,-1)])])}const m1e=kt({name:"kimi-collapse",render:h1e}),g1e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function v1e(e,t){return b(),A("svg",g1e,[...t[0]||(t[0]=[C("path",{d:"M11.9004 2.19995C17.3678 2.20016 21.7998 6.63285 21.7998 12.1003C21.7996 17.5677 17.3677 21.9995 11.9004 21.9998H3.80078C2.72946 21.9996 2.00334 20.9089 2.41699 19.9207L3.49805 17.3386C2.54871 15.8189 2.00007 14.0226 2 12.1003C2 6.63272 6.43277 2.19995 11.9004 2.19995ZM11.9004 3.99976C7.42688 3.99976 3.7998 7.62684 3.7998 12.1003C3.79989 13.8228 4.33669 15.4175 5.25195 16.7292L5.53516 17.1345L4.25195 20.2H11.8994C16.3727 20.1999 19.9998 16.5736 20 12.1003C20 7.62697 16.3737 3.99997 11.9004 3.99976ZM8.9541 10.8005C9.75473 10.8006 10.4041 11.4491 10.4043 12.2498C10.4043 13.0505 9.75482 13.6998 8.9541 13.7C8.15329 13.7 7.50391 13.0506 7.50391 12.2498C7.50406 11.4491 8.15339 10.8005 8.9541 10.8005ZM15.1533 10.8005C15.9539 10.8006 16.6034 11.4491 16.6035 12.2498C16.6035 13.0505 15.954 13.6998 15.1533 13.7C14.3525 13.7 13.7031 13.0506 13.7031 12.2498C13.7033 11.4491 14.3526 10.8005 15.1533 10.8005Z",fill:"currentColor"},null,-1)])])}const y1e=kt({name:"kimi-comment",render:v1e}),k1e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function b1e(e,t){return b(),A("svg",k1e,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M17 7.09961C19.1539 7.09961 20.9004 8.84609 20.9004 11V17C20.9004 19.1539 19.1539 20.9004 17 20.9004H11C8.84609 20.9004 7.09961 19.1539 7.09961 17V11C7.09961 8.84609 8.84609 7.09961 11 7.09961H17ZM11 8.90039C9.8402 8.90039 8.90039 9.8402 8.90039 11V17C8.90039 18.1598 9.8402 19.0996 11 19.0996H17C18.1598 19.0996 19.0996 18.1598 19.0996 17V11C19.0996 9.8402 18.1598 8.90039 17 8.90039H11Z",fill:"currentColor"},null,-1),C("path",{d:"M13 3.09961C14.4447 3.09961 15.705 3.88644 16.3779 5.0498C16.6265 5.47999 16.4789 6.03049 16.0488 6.2793C15.6186 6.52781 15.0681 6.38029 14.8193 5.9502C14.4548 5.32041 13.776 4.90039 13 4.90039H7C5.8402 4.90039 4.90039 5.8402 4.90039 7V13C4.90039 13.776 5.32041 14.4548 5.9502 14.8193C6.38029 15.0681 6.52781 15.6186 6.2793 16.0488C6.03049 16.4789 5.47999 16.6265 5.0498 16.3779C3.88644 15.705 3.09961 14.4447 3.09961 13V7C3.09961 4.84609 4.84609 3.09961 7 3.09961H13Z",fill:"currentColor"},null,-1)])])}const C1e=kt({name:"kimi-copy",render:b1e}),w1e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function _1e(e,t){return b(),A("svg",w1e,[...t[0]||(t[0]=[C("path",{d:"M12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 10.2797 2.43414 8.66074 3.19922 7.24707C3.20172 7.24246 3.20453 7.23801 3.20703 7.2334C3.33385 6.99995 3.47181 6.77351 3.61621 6.55176C3.73214 6.37355 3.85079 6.19744 3.97754 6.02734C5.35905 4.17471 7.36856 2.81959 9.68945 2.27051C9.69952 2.26813 9.70965 2.26602 9.71973 2.26367C9.85224 2.23276 9.98563 2.2043 10.1201 2.17871C10.1542 2.17221 10.1884 2.16631 10.2227 2.16016C10.3466 2.13791 10.4712 2.11724 10.5967 2.09961C10.6301 2.09489 10.6637 2.0913 10.6973 2.08691C10.8216 2.07073 10.9465 2.05552 11.0723 2.04395C11.1125 2.04022 11.153 2.0384 11.1934 2.03516C11.4595 2.0139 11.7284 2 12 2ZM11.9941 3.7998C11.9968 3.86623 12 3.93292 12 4C12 6.76142 9.76142 9 7 9C6.14209 9 5.33517 8.78324 4.62988 8.40234C4.09862 9.48861 3.7998 10.7093 3.7998 12C3.7998 12.4438 3.83644 12.8791 3.9043 13.3037C4.52807 12.5673 5.45945 12.0996 6.5 12.0996C8.37777 12.0996 9.90039 13.6222 9.90039 15.5C9.90039 17.0702 8.83532 18.3903 7.38867 18.7812C8.70267 19.6765 10.2901 20.2002 12 20.2002C12.468 20.2002 12.9264 20.1583 13.373 20.083C13.1323 19.4342 13 18.7327 13 18C13 14.6863 15.6863 12 19 12C19.4098 12 19.8098 12.0416 20.1963 12.1201C20.1969 12.0801 20.2002 12.0401 20.2002 12C20.2002 7.47126 16.5287 3.7998 12 3.7998H11.9941ZM19 13.7998C16.6804 13.7998 14.7998 15.6804 14.7998 18C14.7998 18.5617 14.9112 19.0972 15.1113 19.5869C17.5225 18.597 19.3558 16.4929 19.9727 13.9141C19.6605 13.8399 19.3349 13.7998 19 13.7998ZM6.5 13.9004C5.61634 13.9004 4.90039 14.6163 4.90039 15.5C4.90039 16.3837 5.61634 17.0996 6.5 17.0996C7.38366 17.0996 8.09961 16.3837 8.09961 15.5C8.09961 14.6163 7.38366 13.9004 6.5 13.9004ZM15.5 6.09961C16.8255 6.09961 17.9004 7.17452 17.9004 8.5C17.9004 9.82548 16.8255 10.9004 15.5 10.9004C14.1745 10.9004 13.0996 9.82548 13.0996 8.5C13.0996 7.17452 14.1745 6.09961 15.5 6.09961ZM15.5 7.90039C15.1686 7.90039 14.9004 8.16863 14.9004 8.5C14.9004 8.83137 15.1686 9.09961 15.5 9.09961C15.8314 9.09961 16.0996 8.83137 16.0996 8.5C16.0996 8.16863 15.8314 7.90039 15.5 7.90039ZM10.1992 4C8.35326 4.41375 6.74333 5.44923 5.59961 6.87598C6.02235 7.08306 6.49716 7.2002 7 7.2002C8.76731 7.2002 10.1992 5.76731 10.1992 4Z",fill:"currentColor"},null,-1)])])}const x1e=kt({name:"kimi-dark-mode",render:_1e}),S1e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function A1e(e,t){return b(),A("svg",S1e,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12 2.90002C12.4971 2.90002 12.9 3.30297 12.9 3.80002V12.2939L15.8081 9.38585C16.1595 9.03438 16.7294 9.03438 17.0808 9.38585C17.4323 9.73732 17.4323 10.3072 17.0808 10.6586L12.6364 15.1031C12.4676 15.2719 12.2387 15.3667 12 15.3667C11.7613 15.3667 11.5324 15.2719 11.3636 15.1031L6.91917 10.6586C6.5677 10.3072 6.5677 9.73732 6.91917 9.38585C7.27064 9.03438 7.84049 9.03438 8.19196 9.38585L11.1 12.2939V3.80002C11.1 3.30297 11.503 2.90002 12 2.90002ZM4.00001 13.5874C4.49706 13.5874 4.90001 13.9903 4.90001 14.4874V18.043C4.90001 18.2758 4.99249 18.499 5.1571 18.6636C5.32172 18.8282 5.54498 18.9207 5.77778 18.9207H18.2222C18.455 18.9207 18.6783 18.8283 18.8429 18.6636C19.0075 18.499 19.1 18.2758 19.1 18.043V14.4874C19.1 13.9903 19.5029 13.5874 20 13.5874C20.4971 13.5874 20.9 13.9903 20.9 14.4874V18.043C20.9 18.7531 20.6179 19.4342 20.1157 19.9364C19.6135 20.4386 18.9324 20.7207 18.2222 20.7207H5.77778C5.06759 20.7207 4.38649 20.4386 3.88431 19.9364C3.38213 19.4342 3.10001 18.7531 3.10001 18.043V14.4874C3.10001 13.9903 3.50295 13.5874 4.00001 13.5874Z",fill:"currentColor"},null,-1)])])}const M1e=kt({name:"kimi-download",render:A1e}),T1e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function E1e(e,t){return b(),A("svg",T1e,[...t[0]||(t[0]=[C("path",{d:"M18.0179 3.09998C18.3963 3.10003 18.7709 3.17491 19.1205 3.31971C19.4701 3.46454 19.7884 3.67614 20.056 3.94373C20.3237 4.21144 20.5362 4.52965 20.681 4.87928C20.8258 5.22887 20.8997 5.60423 20.8997 5.9828C20.8997 6.36118 20.8257 6.73591 20.681 7.08533C20.5362 7.43497 20.3237 7.75317 20.056 8.02088L17.639 10.4379L9.15756 18.9183C8.5296 19.5463 7.74274 19.992 6.8812 20.2074L4.21811 20.8734C3.91148 20.95 3.5871 20.8596 3.36362 20.6361C3.14017 20.4126 3.05063 20.0883 3.12729 19.7816L3.79233 17.1185C4.00771 16.257 4.45344 15.4701 5.08139 14.8422L15.9798 3.94373C16.5203 3.40346 17.2536 3.09998 18.0179 3.09998ZM19.0003 19.1C19.4972 19.1002 19.8997 19.5034 19.8997 20.0004C19.8995 20.4971 19.4971 20.8996 19.0003 20.8998H12.0003C11.5034 20.8998 11.1001 20.4973 11.0999 20.0004C11.0999 19.5033 11.5033 19.1 12.0003 19.1H19.0003ZM18.0179 4.89979C17.7309 4.89979 17.4553 5.01417 17.2523 5.21717L6.35385 16.1146C5.95661 16.5119 5.67469 17.01 5.53842 17.5551L5.23666 18.7631L6.44467 18.4613C6.98971 18.3251 7.48782 18.0431 7.8851 17.6459L18.7826 6.74744C18.883 6.64702 18.9635 6.52821 19.0179 6.39686C19.0723 6.26558 19.0999 6.1247 19.0999 5.9828C19.0999 5.84075 19.0723 5.69916 19.0179 5.56776C18.9635 5.43645 18.883 5.31757 18.7826 5.21717C18.6821 5.11678 18.5631 5.03716 18.432 4.9828C18.3008 4.92845 18.16 4.89983 18.0179 4.89979Z",fill:"currentColor"},null,-1)])])}const I1e=kt({name:"kimi-edit",render:E1e}),L1e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function $1e(e,t){return b(),A("svg",L1e,[...t[0]||(t[0]=[C("path",{d:"M5 11.0996C5.49693 11.0996 5.90018 11.5031 5.90039 12V18C5.90039 18.0552 5.94477 18.0996 6 18.0996H12C12.4969 18.0996 12.9002 18.5031 12.9004 19C12.9004 19.4971 12.4971 19.9004 12 19.9004H6C4.95066 19.9004 4.09961 19.0493 4.09961 18V12C4.09982 11.5031 4.50307 11.0996 5 11.0996ZM18 4.09961C19.0492 4.09961 19.9002 4.95084 19.9004 6V12C19.9004 12.4971 19.4971 12.9004 19 12.9004C18.5029 12.9004 18.0996 12.4971 18.0996 12V6C18.0994 5.94495 18.0551 5.90039 18 5.90039H12C11.5029 5.90039 11.0996 5.49706 11.0996 5C11.0998 4.50312 11.5031 4.09961 12 4.09961H18Z",fill:"currentColor"},null,-1)])])}const N1e=kt({name:"kimi-expand",render:$1e}),F1e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function R1e(e,t){return b(),A("svg",F1e,[...t[0]||(t[0]=[C("g",null,[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13.1723 2.1001C13.9413 2.10018 14.6793 2.40592 15.2231 2.94971L19.0512 6.77783C19.595 7.32162 19.9007 8.0596 19.9008 8.82861V18.0005C19.9008 20.1544 18.1543 21.9009 16.0004 21.9009H8.0004C5.84649 21.9009 4.10001 20.1544 4.10001 18.0005V6.00049C4.10001 3.84658 5.84649 2.1001 8.0004 2.1001H13.1723ZM8.0004 3.90088C6.8406 3.90088 5.90079 4.84069 5.90079 6.00049V18.0005C5.90079 19.1603 6.8406 20.1001 8.0004 20.1001H16.0004C17.1602 20.1001 18.1 19.1603 18.1 18.0005V9.90088H15.0004C13.3988 9.90088 12.1 8.60211 12.1 7.00049V3.90088H8.0004ZM13.9008 7.00049C13.9008 7.608 14.3929 8.1001 15.0004 8.1001H17.8217C17.8072 8.08375 17.7933 8.06681 17.7777 8.05127L13.9496 4.22314C13.9339 4.20745 13.9173 4.19286 13.9008 4.17822V7.00049Z",fill:"currentColor"})],-1)])])}const X_=kt({name:"kimi-file",render:R1e}),O1e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function P1e(e,t){return b(),A("svg",O1e,[...t[0]||(t[0]=[C("path",{d:"M15.4795 15.4971C15.9765 15.4971 16.3799 15.9004 16.3799 16.3975C16.3799 16.8945 15.9765 17.2978 15.4795 17.2979H8.52051C8.02345 17.2979 7.62012 16.8945 7.62012 16.3975C7.62012 15.9004 8.02345 15.4971 8.52051 15.4971H15.4795Z",fill:"currentColor"},null,-1),C("path",{d:"M12.3359 11.0996C12.8329 11.0997 13.2354 11.503 13.2354 12C13.2354 12.497 12.8329 12.9003 12.3359 12.9004H8.52051C8.02345 12.9004 7.62012 12.4971 7.62012 12C7.62012 11.5029 8.02345 11.0996 8.52051 11.0996H12.3359Z",fill:"currentColor"},null,-1),C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13.1719 2.09961C13.9408 2.09969 14.6789 2.40555 15.2227 2.94922L19.0508 6.77734C19.5946 7.32113 19.9003 8.05911 19.9004 8.82812V18C19.9004 20.1539 18.1539 21.9004 16 21.9004H8C5.84626 21.9002 4.09961 20.1538 4.09961 18V6C4.09961 3.84621 5.84626 2.09981 8 2.09961H13.1719ZM8 3.90039C6.84037 3.90059 5.90039 4.84032 5.90039 6V18C5.90039 19.1597 6.84037 20.0994 8 20.0996H16C17.1598 20.0996 18.0996 19.1598 18.0996 18V9.90039H15C13.3985 9.90019 12.0996 8.6015 12.0996 7V3.90039H8ZM13.9004 7C13.9004 7.60739 14.3927 8.09941 15 8.09961H17.8213C17.8068 8.08333 17.7928 8.06626 17.7773 8.05078L13.9492 4.22266C13.9335 4.20696 13.9169 4.19237 13.9004 4.17773V7Z",fill:"currentColor"},null,-1)])])}const D1e=kt({name:"kimi-file-text",render:P1e}),B1e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function H1e(e,t){return b(),A("svg",B1e,[...t[0]||(t[0]=[C("path",{d:"M9.2373 3.7002C10.4169 3.7002 11.5297 4.24779 12.249 5.18262L12.4424 5.43359H18C20.0987 5.43359 21.7998 7.13472 21.7998 9.2334V16.5C21.7998 18.5987 20.0987 20.2998 18 20.2998H6C3.90132 20.2998 2.2002 18.5987 2.2002 16.5V7.5C2.2002 5.40132 3.90132 3.7002 6 3.7002H9.2373ZM6 5.5C4.89543 5.5 4 6.39543 4 7.5V16.5C4 17.6046 4.89543 18.5 6 18.5H18C19.0357 18.5 19.887 17.7128 19.9893 16.7041L20 16.5V9.2334C20 8.19775 19.2128 7.34641 18.2041 7.24414L18 7.2334H12.0479L11.9326 7.22656C11.666 7.19561 11.4205 7.05812 11.2549 6.84277L10.8223 6.28027C10.4437 5.78834 9.85808 5.5 9.2373 5.5H6ZM16 9.59961C16.4971 9.59961 16.9004 10.0029 16.9004 10.5C16.9004 10.9971 16.4971 11.4004 16 11.4004H8C7.50294 11.4004 7.09961 10.9971 7.09961 10.5C7.09961 10.0029 7.50294 9.59961 8 9.59961H16Z",fill:"currentColor"},null,-1)])])}const z1e=kt({name:"kimi-folder",render:H1e}),W1e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function U1e(e,t){return b(),A("svg",W1e,[...t[0]||(t[0]=[C("g",null,[C("path",{d:"M18.3623 9.99976L18.209 8.48999C18.2031 8.43161 18.2004 8.37289 18.2002 8.31421C18.1988 8.31196 18.1956 8.30842 18.1904 8.30347C18.1718 8.28559 18.1302 8.26245 18.0713 8.26245H11C10.261 8.26245 9.59753 7.81016 9.32617 7.1228L8.9082 6.06421C8.88101 5.9953 8.85737 5.92501 8.83887 5.85327C8.83778 5.85099 8.833 5.84268 8.81836 5.83179C8.79454 5.81475 8.7549 5.79939 8.70605 5.80054H3.92871C3.86986 5.80054 3.82825 5.82368 3.80957 5.84155C3.80816 5.8429 3.80675 5.84428 3.80566 5.84546L4.47559 14.0955L3.62109 17.5154L5.12109 11.5154C5.34367 10.6251 6.1438 9.99977 7.06152 9.99976H18.3623ZM7.06152 11.7996C6.96976 11.7996 6.88944 11.8629 6.86719 11.9519L5.36719 17.9519C5.33598 18.078 5.43158 18.1999 5.56152 18.2H19.4385C19.5302 18.1999 19.6106 18.1376 19.6328 18.0486L21.1328 12.0486C21.1644 11.9224 21.0686 11.7996 20.9385 11.7996H7.06152ZM20.9385 9.99976C22.2396 9.99977 23.1945 11.2228 22.8789 12.4851L21.3789 18.4851C21.1563 19.3754 20.3562 19.9997 19.4385 19.9998H4.92871C4.41722 19.9998 3.92613 19.8059 3.56445 19.4597C3.20281 19.1135 3.00004 18.6436 3 18.1541L2 5.84644C2.00006 5.35711 2.20311 4.88786 2.56445 4.54175C2.92613 4.19554 3.41722 4.00073 3.92871 4.00073H8.66406C9.10133 3.99051 9.5296 4.1225 9.87793 4.37573C10.2285 4.63118 10.4767 4.99457 10.582 5.40405L11 6.46167H18.0713C18.5828 6.46167 19.0739 6.65648 19.4355 7.00269C19.7971 7.34888 20 7.81883 20 8.30835L20.1719 9.99976H20.9385Z",fill:"currentColor"})],-1)])])}const j1e=kt({name:"kimi-folder-open",render:U1e}),V1e={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function q1e(e,t){return b(),A("svg",V1e,[...t[0]||(t[0]=[C("path",{id:"af-p0",d:"M -2.619 -8.3 C -1.815 -8.3 -1.048 -7.97 -0.499 -7.39 C -0.499 -7.39 0.141 -6.712 0.141 -6.712 C 0.141 -6.712 5.75 -6.712 5.75 -6.712 C 7.904 -6.712 9.65 -4.986 9.65 -2.858 C 9.65 -2.858 9.65 -1.71 9.65 -1.71 C 9.65 -1.219 9.247 -0.821 8.75 -0.821 C 8.253 -0.821 7.85 -1.219 7.85 -1.71 C 7.85 -1.71 7.85 -2.858 7.85 -2.858 C 7.849 -4.004 6.91 -4.934 5.75 -4.934 C 5.75 -4.934 -0.207 -4.934 -0.207 -4.934 C -0.484 -4.934 -0.749 -5.047 -0.938 -5.247 C -0.938 -5.247 -1.815 -6.177 -1.815 -6.177 C -2.023 -6.397 -2.315 -6.521 -2.619 -6.521 C -2.619 -6.521 -6.25 -6.521 -6.25 -6.521 C -7.41 -6.521 -8.35 -5.592 -8.35 -4.446 C -8.35 -4.446 -8.35 4.446 -8.35 4.446 C -8.35 5.592 -7.41 6.521 -6.25 6.521 C -6.25 6.521 1.25 6.521 1.25 6.521 C 1.747 6.521 2.15 6.919 2.15 7.41 C 2.15 7.901 1.747 8.3 1.25 8.3 C 1.25 8.3 -6.25 8.3 -6.25 8.3 C -8.404 8.3 -10.15 6.574 -10.15 4.446 C -10.15 4.446 -10.15 -4.446 -10.15 -4.446 C -10.15 -6.574 -8.404 -8.3 -6.25 -8.3 C -6.25 -8.3 -2.619 -8.3 -2.619 -8.3 Z M 3.75 -2.5 C 4.247 -2.5 4.65 -2.097 4.65 -1.6 C 4.65 -1.103 4.247 -0.699 3.75 -0.699 C 3.75 -0.699 -4.25 -0.699 -4.25 -0.699 C -4.747 -0.699 -5.15 -1.103 -5.15 -1.6 C -5.15 -2.097 -4.747 -2.5 -4.25 -2.5 C -4.25 -2.5 3.75 -2.5 3.75 -2.5 Z",transform:"matrix(1 0 0 1 11.75 12)",fill:"currentColor"},null,-1),C("g",{id:"af-p1"},[C("path",{d:"M 2.635 0 L -2.635 0 M 0 -2.635 L 0 2.635",transform:"matrix(1 0 0 1 18.4 16.3)",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round"})],-1)])])}const K1e=kt({name:"kimi-folder-plus",render:q1e}),Z1e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function G1e(e,t){return b(),A("svg",Z1e,[...t[0]||(t[0]=[C("path",{d:"M12 3C16.9706 3 21 7.02944 21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3ZM12 19.2002C15.9764 19.2002 19.2002 15.9764 19.2002 12C19.2002 8.02355 15.9764 4.7998 12 4.7998V19.2002Z",fill:"currentColor"},null,-1)])])}const Y1e=kt({name:"kimi-follow-system",render:G1e}),X1e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function J1e(e,t){return b(),A("svg",X1e,[...t[0]||(t[0]=[C("path",{d:"M17 2C19.2091 2 21 3.79086 21 6V15.7646C21 17.2361 20.192 18.5884 18.8965 19.2861L13.8965 21.9785C12.7126 22.616 11.2874 22.616 10.1035 21.9785L5.10352 19.2861C3.80802 18.5884 3 17.2361 3 15.7646V6C3 3.79086 4.79086 2 7 2H17ZM7 3.7998C5.78498 3.7998 4.79981 4.78497 4.7998 6V15.7646C4.7998 16.574 5.24443 17.3184 5.95703 17.7021L10.957 20.3936C11.6082 20.7442 12.3918 20.7442 13.043 20.3936L18.043 17.7021C18.7556 17.3184 19.2002 16.574 19.2002 15.7646V6C19.2002 4.78497 18.215 3.7998 17 3.7998H7ZM12 15.6992C12.4968 15.6992 12.8994 16.1028 12.8994 16.5996C12.8994 17.0964 12.4968 17.5 12 17.5C11.5024 17.5 11.0996 17.0964 11.0996 16.5996C11.0996 16.1028 11.5024 15.6992 12 15.6992ZM12 6.49902C12.4969 6.49922 12.8994 6.86908 12.8994 7.3252V13.6729C12.8994 14.129 12.4969 14.4988 12 14.499C11.5029 14.499 11.0996 14.1291 11.0996 13.6729V7.3252C11.0996 6.86896 11.5029 6.49902 12 6.49902Z",fill:"currentColor"},null,-1)])])}const Q1e=kt({name:"kimi-full-access",render:J1e}),epe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function tpe(e,t){return b(),A("svg",epe,[...t[0]||(t[0]=[C("path",{d:"M12.5092 2.11279C17.7402 2.37781 21.8998 6.70364 21.8998 12.0005C21.8996 17.4153 17.5524 21.8108 12.1576 21.895C12.1056 21.898 12.0532 21.8999 12.0004 21.8999C11.948 21.8999 11.8954 21.8968 11.8432 21.896L11.8422 21.895C6.44751 21.8107 2.10022 17.4152 2.10001 12.0005C2.10001 6.53287 6.53278 2.1001 12.0004 2.1001L12.5092 2.11279ZM8.92715 13.0005C9.02896 14.9787 9.42581 16.721 9.99356 17.9985C10.3249 18.7441 10.6971 19.292 11.0639 19.6411C11.4259 19.9855 11.741 20.1001 12.0004 20.1001C12.2598 20.1 12.5749 19.9856 12.9369 19.6411C13.3037 19.292 13.6749 18.7441 14.0063 17.9985C14.574 16.721 14.9718 14.9788 15.0736 13.0005H8.92715ZM3.96329 13.0005C4.31462 15.8522 6.14714 18.2427 8.66837 19.3823C8.55544 19.1733 8.44916 18.9552 8.34903 18.73C7.66574 17.1926 7.22657 15.1926 7.12344 13.0005H3.96329ZM16.8764 13.0005C16.7732 15.1926 16.3341 17.1926 15.6508 18.73C15.5506 18.9554 15.4435 19.1732 15.3305 19.3823C17.8522 18.2429 19.6851 15.8525 20.0365 13.0005H16.8764ZM8.66934 4.6167C6.08869 5.78266 4.22826 8.25964 3.93985 11.1997H7.11661C7.20176 8.92954 7.64512 6.85497 8.34903 5.271C8.4494 5.04516 8.5561 4.82619 8.66934 4.6167ZM12.0004 3.8999C11.7411 3.8999 11.4259 4.01454 11.0639 4.35889C10.6971 4.70797 10.3249 5.25587 9.99356 6.00146C9.40671 7.32188 9.00186 9.13885 8.91739 11.1997H15.0834C14.9989 9.13884 14.5931 7.32189 14.0063 6.00146C13.6749 5.2559 13.3037 4.70796 12.9369 4.35889C12.5749 4.0144 12.2598 3.90002 12.0004 3.8999ZM15.3295 4.61572C15.443 4.82559 15.5502 5.04471 15.6508 5.271C16.3547 6.85498 16.799 8.92949 16.8842 11.1997H20.06C19.7715 8.25914 17.9108 5.78143 15.3295 4.61572Z",fill:"currentColor"},null,-1)])])}const npe=kt({name:"kimi-globe",render:tpe}),ope={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function spe(e,t){return b(),A("svg",ope,[...t[0]||(t[0]=[C("path",{d:"M8 17C8.82834 17 9.5 17.6717 9.5 18.5C9.5 19.3283 8.82834 20 8 20C7.17166 20 6.5 19.3283 6.5 18.5C6.5 17.6717 7.17166 17 8 17ZM16 17C16.8283 17 17.5 17.6717 17.5 18.5C17.5 19.3283 16.8283 20 16 20C15.1717 20 14.5 19.3283 14.5 18.5C14.5 17.6717 15.1717 17 16 17ZM8 10.5C8.82834 10.5 9.5 11.1717 9.5 12C9.5 12.8283 8.82834 13.5 8 13.5C7.17166 13.5 6.5 12.8283 6.5 12C6.5 11.1717 7.17166 10.5 8 10.5ZM16 10.5C16.8283 10.5 17.5 11.1717 17.5 12C17.5 12.8283 16.8283 13.5 16 13.5C15.1717 13.5 14.5 12.8283 14.5 12C14.5 11.1717 15.1717 10.5 16 10.5ZM8 4C8.82834 4 9.5 4.67166 9.5 5.5C9.5 6.32834 8.82834 7 8 7C7.17166 7 6.5 6.32834 6.5 5.5C6.5 4.67166 7.17166 4 8 4ZM16 4C16.8283 4 17.5 4.67166 17.5 5.5C17.5 6.32834 16.8283 7 16 7C15.1717 7 14.5 6.32834 14.5 5.5C14.5 4.67166 15.1717 4 16 4Z",fill:"currentColor"},null,-1)])])}const ipe=kt({name:"kimi-grip",render:spe}),rpe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function lpe(e,t){return b(),A("svg",rpe,[...t[0]||(t[0]=[C("path",{d:"M7.22264 6.10352C7.22264 5.5078 7.48259 4.95449 7.91405 4.56055C8.34271 4.16918 8.90831 3.96198 9.48241 3.96191C9.64155 3.96191 9.80001 3.97936 9.95507 4.01074C10.0127 3.5042 10.2586 3.04178 10.6338 2.69922C11.0625 2.30778 11.6279 2.09961 12.2021 2.09961C12.7763 2.09966 13.3418 2.30783 13.7705 2.69922C13.9947 2.90401 14.1709 3.15244 14.29 3.42676C14.4947 3.37044 14.7071 3.34182 14.9209 3.3418C15.4951 3.3418 16.0605 3.549 16.4892 3.94043C16.8644 4.28293 17.1093 4.74548 17.167 5.25195C17.3223 5.22045 17.4812 5.20312 17.6406 5.20312C18.2147 5.20318 18.7803 5.41135 19.209 5.80273C19.6402 6.19663 19.9004 6.74922 19.9004 7.34473V14.6543C19.9004 17.413 19.2914 19.0434 18.0137 20.21C16.82 21.2998 15.2175 21.9004 13.5615 21.9004C11.7538 21.9004 10.2315 21.5696 8.95702 20.8535C7.67664 20.1341 6.71683 19.0652 5.97362 17.708L3.3496 12.916C3.18848 12.6213 3.10112 12.2914 3.0996 11.9531C3.09812 11.6147 3.18309 11.2835 3.34179 10.9873C3.5001 10.692 3.72639 10.4416 3.99706 10.251C4.26771 10.0604 4.57776 9.93235 4.90136 9.87305C5.56617 9.75102 6.25934 9.84517 6.86425 10.1445C6.9942 10.2088 7.11461 10.2788 7.22264 10.3477V6.10352ZM9.02343 12.7969C9.02336 13.1912 8.76624 13.5395 8.38964 13.6562C8.0129 13.773 7.60387 13.6309 7.38085 13.3057L6.53514 12.0723C6.51218 12.0529 6.48411 12.0282 6.45018 12.002C6.34595 11.9213 6.20986 11.8289 6.06639 11.7578C5.81525 11.6335 5.51637 11.5904 5.22655 11.6436H5.22557C5.15055 11.6573 5.08558 11.6865 5.03417 11.7227C4.98289 11.7588 4.94815 11.7998 4.92772 11.8379C4.90762 11.8755 4.90023 11.9122 4.90038 11.9453C4.90057 11.9782 4.9084 12.0144 4.9287 12.0518L7.55272 16.8438C8.16912 17.9693 8.90989 18.7622 9.83886 19.2842C10.7737 19.8094 11.9704 20.0996 13.5615 20.0996C14.7902 20.0996 15.9536 19.6533 16.7998 18.8809C17.5619 18.185 18.0996 17.1383 18.0996 14.6543V7.34473C18.0996 7.28204 18.0734 7.20342 17.9951 7.13184C17.9139 7.05771 17.7875 7.00396 17.6406 7.00391C17.4937 7.00391 17.3674 7.05771 17.2861 7.13184C17.2077 7.20347 17.1807 7.28199 17.1807 7.34473V11.0693C17.1805 11.5661 16.778 11.9685 16.2812 11.9688C15.7843 11.9688 15.381 11.5662 15.3808 11.0693V5.48242C15.3808 5.41973 15.3537 5.34107 15.2754 5.26953C15.1941 5.19547 15.0677 5.1416 14.9209 5.1416C14.774 5.14166 14.6476 5.19541 14.5664 5.26953C14.4881 5.34105 14.462 5.41974 14.4619 5.48242V11.0693C14.4617 11.5662 14.0584 11.9688 13.5615 11.9688C13.0646 11.9687 12.6613 11.5662 12.6611 11.0693V4.24121C12.6611 4.17852 12.635 4.09989 12.5566 4.02832C12.4754 3.95419 12.349 3.90045 12.2021 3.90039C12.0552 3.90039 11.9289 3.95421 11.8476 4.02832C11.7692 4.09992 11.7422 4.17849 11.7422 4.24121V11.0693C11.742 11.5661 11.3395 11.9685 10.8428 11.9688C10.3458 11.9688 9.94257 11.5662 9.94237 11.0693V6.10352L9.93651 6.05371C9.92534 6.00177 9.89573 5.94433 9.8369 5.89062C9.75567 5.81647 9.62938 5.76172 9.48241 5.76172C9.33554 5.76179 9.2091 5.81651 9.12792 5.89062C9.04964 5.96222 9.02343 6.04084 9.02343 6.10352V12.7969Z",fill:"currentColor"},null,-1)])])}const ape=kt({name:"kimi-hand",render:lpe}),upe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function cpe(e,t){return b(),A("svg",upe,[...t[0]||(t[0]=[C("path",{d:"M4 3.33203C4.55224 3.33203 4.99993 3.7798 5 4.33203V18.0908H20.0674C20.6195 18.0908 21.0671 18.5388 21.0674 19.0908C21.0674 19.6431 20.6197 20.0908 20.0674 20.0908H5C3.89543 20.0908 3 19.1954 3 18.0908V4.33203C3.00007 3.7798 3.44776 3.33203 4 3.33203ZM8.19922 9.28418C8.7515 9.28418 9.19922 9.73189 9.19922 10.2842V15.6045C9.19908 16.1567 8.75142 16.6045 8.19922 16.6045C7.64719 16.6043 7.19936 16.1565 7.19922 15.6045V10.2842C7.19922 9.73202 7.6471 9.28438 8.19922 9.28418ZM17.2227 6.85645C17.7748 6.85658 18.2226 7.3043 18.2227 7.85645V15.6045C18.2225 16.1566 17.7747 16.6044 17.2227 16.6045C16.6705 16.6045 16.2228 16.1566 16.2227 15.6045V7.85645C16.2227 7.30422 16.6704 6.85645 17.2227 6.85645ZM12.7109 3.96387C13.2631 3.96387 13.7107 4.41175 13.7109 4.96387V15.6035C13.7109 16.1558 13.2632 16.6035 12.7109 16.6035C12.1587 16.6035 11.7109 16.1558 11.7109 15.6035V4.96387C11.7111 4.41175 12.1588 3.96387 12.7109 3.96387Z",fill:"currentColor"},null,-1)])])}const dpe=kt({name:"kimi-histogram",render:cpe}),fpe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function ppe(e,t){return b(),A("svg",fpe,[...t[0]||(t[0]=[C("path",{d:"M8.00916 7.50488C8.47326 7.50488 8.91828 7.68943 9.24646 8.01758C9.57465 8.34577 9.75916 8.79075 9.75916 9.25488C9.75916 9.71901 9.57465 10.164 9.24646 10.4922C8.91828 10.8203 8.47326 11.0049 8.00916 11.0049C7.54507 11.0049 7.10001 10.8203 6.77185 10.4922C6.4437 10.164 6.25916 9.71898 6.25916 9.25488C6.25916 8.79078 6.4437 8.34576 6.77185 8.01758C7.10001 7.68942 7.54507 7.50492 8.00916 7.50488Z",fill:"currentColor"},null,-1),C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M17.8998 4.09961C20.0537 4.09961 21.8002 5.84609 21.8002 8V16C21.8002 18.1539 20.0537 19.9004 17.8998 19.9004H5.89978C3.74598 19.9003 1.99939 18.1538 1.99939 16V8C1.99939 5.84617 3.74598 4.09974 5.89978 4.09961H17.8998ZM15.4867 12.2539C15.448 12.2184 15.3885 12.2192 15.351 12.2559L11.7338 15.8027C11.0146 16.5079 9.87305 16.5222 9.13708 15.835L6.98669 13.8262C6.95049 13.7924 6.89516 13.791 6.85681 13.8223L3.82361 16.2988C3.96873 17.3168 4.84165 18.0995 5.89978 18.0996H17.8998C18.9375 18.0996 19.7964 17.3466 19.9662 16.3574L15.4867 12.2539ZM5.89978 5.90039C4.74009 5.90052 3.80017 6.84028 3.80017 8V14.002L5.73181 12.4238C6.46046 11.8286 7.51253 11.8634 8.20056 12.5059L10.351 14.5146C10.3897 14.5508 10.4498 14.5497 10.4877 14.5127L14.1049 10.9658C14.819 10.2656 15.9506 10.2466 16.6879 10.9219L19.9994 13.9551V8C19.9994 6.8402 19.0596 5.90039 17.8998 5.90039H5.89978Z",fill:"currentColor"},null,-1)])])}const hpe=kt({name:"kimi-image",render:ppe}),mpe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function gpe(e,t){return b(),A("svg",mpe,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.09375 2.81174C5.4825 2.50796 6.04376 2.56488 6.34766 2.93869L20.1855 19.9602C20.4895 20.3341 20.421 20.8836 20.0322 21.1877C19.6435 21.4917 19.0823 21.4355 18.7783 21.0617L17.9971 20.1008H5.99609C3.84224 20.1008 2.0958 18.3552 2.0957 16.2014V8.13889C2.09589 6.26755 3.41429 4.70428 5.17285 4.32639L4.93945 4.03928C4.63577 3.66536 4.7051 3.11573 5.09375 2.81174ZM7.13184 14.1096C7.09416 14.0738 7.03659 14.0713 6.99609 14.1037L3.92871 16.5569C4.09761 17.5472 4.95753 18.301 5.99609 18.301H16.5342L13.373 14.4133L11.9072 15.9455C11.1531 16.7324 9.92202 16.7621 9.13281 16.0119L7.13184 14.1096ZM5.99609 6.03928C4.83643 6.03928 3.89669 6.97927 3.89648 8.13889V14.1408L5.83496 12.5901C6.60469 11.9742 7.69929 12.022 8.41504 12.7024L10.416 14.6037C10.4575 14.6431 10.5218 14.642 10.5615 14.6008L12.1641 12.926L9.78906 10.0051C9.70282 10.2646 9.55682 10.5038 9.35645 10.7004C9.02202 11.0285 8.56767 11.2131 8.09473 11.2131C7.62195 11.213 7.1683 11.0284 6.83398 10.7004C6.49961 10.3724 6.31152 9.92701 6.31152 9.46311C6.3116 8.99941 6.49981 8.55474 6.83398 8.22678C7.12986 7.93654 7.51931 7.75901 7.93262 7.7219L6.56543 6.03928H5.99609Z",fill:"currentColor"},null,-1),C("path",{d:"M18.0049 4.31272C20.1587 4.31288 21.9043 6.0593 21.9043 8.21311V13.718C21.9039 15.4743 19.7248 16.2906 18.5713 14.966L14.9141 10.7658C14.5882 10.3912 14.6278 9.82271 15.002 9.49631C15.3768 9.16994 15.9451 9.20948 16.2715 9.5842L19.9287 13.7844C19.9528 13.812 19.9696 13.8167 19.9775 13.8186C19.9908 13.8216 20.0141 13.8213 20.04 13.8117C20.0655 13.8021 20.0826 13.7875 20.0908 13.7766C20.0955 13.7702 20.1044 13.7552 20.1045 13.718V8.21311C20.1045 7.05341 19.1645 6.11366 18.0049 6.1135H10.6328C10.1361 6.11327 9.73267 5.70981 9.73242 5.21311C9.73242 4.71619 10.136 4.31295 10.6328 4.31272H18.0049Z",fill:"currentColor"},null,-1)])])}const vpe=kt({name:"kimi-image-failed",render:gpe}),ype={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function kpe(e,t){return b(),A("svg",ype,[...t[0]||(t[0]=[C("path",{d:"M12 2.1001C17.4676 2.10031 21.8994 6.53286 21.8994 12.0005C21.8992 17.4679 17.4674 21.8997 12 21.8999C6.53237 21.8999 2.09982 17.4681 2.09961 12.0005C2.09961 6.53273 6.53224 2.1001 12 2.1001ZM12 3.8999C7.52636 3.8999 3.89941 7.52684 3.89941 12.0005C3.89963 16.474 7.52649 20.1001 12 20.1001C16.4733 20.0999 20.0994 16.4738 20.0996 12.0005C20.0996 7.52697 16.4735 3.90011 12 3.8999ZM12 9.50049C12.4969 9.50068 12.8994 9.87055 12.8994 10.3267V16.6743C12.8992 17.1303 12.4968 17.5003 12 17.5005C11.503 17.5005 11.0998 17.1304 11.0996 16.6743V10.3267C11.0996 9.87043 11.5029 9.50049 12 9.50049ZM12 6.49951C12.4968 6.49951 12.8994 6.90313 12.8994 7.3999C12.8992 7.8965 12.4966 8.30029 12 8.30029C11.5025 8.30028 11.0998 7.8965 11.0996 7.3999C11.0996 6.90313 11.5024 6.49952 12 6.49951Z",fill:"currentColor"},null,-1)])])}const bpe=kt({name:"kimi-info",render:kpe}),Cpe={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function wpe(e,t){return b(),A("svg",Cpe,[...t[0]||(t[0]=[C("path",{id:"bar-divider",d:"M 9.3 18.951 L 9.3 4.3",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),C("path",{id:"bar-box",d:"M -7.9 -4.8 C -7.9 -6.512 -6.512 -7.9 -4.8 -7.9 L 4.8 -7.9 C 6.512 -7.9 7.9 -6.512 7.9 -4.8 L 7.9 4.8 C 7.9 6.512 6.512 7.9 4.8 7.9 L -4.8 7.9 C -6.512 7.9 -7.9 6.512 -7.9 4.8 L -7.9 -4.8 Z",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"butt","stroke-linejoin":"miter",transform:"matrix(1 0 0 1 11.8 11.8)"},null,-1),C("path",{id:"bar-arrow",d:"M -1.25 -2.5 L 1.25 0 L -1.25 2.5",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])}const _pe=kt({name:"kimi-left-panel",render:wpe}),xpe={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function Spe(e,t){return b(),A("svg",xpe,[...t[0]||(t[0]=[C("path",{id:"bar-divider",d:"M 9.3 18.951 L 9.3 4.3",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),C("path",{id:"bar-box",d:"M -7.9 -4.8 C -7.9 -6.512 -6.512 -7.9 -4.8 -7.9 L 4.8 -7.9 C 6.512 -7.9 7.9 -6.512 7.9 -4.8 L 7.9 4.8 C 7.9 6.512 6.512 7.9 4.8 7.9 L -4.8 7.9 C -6.512 7.9 -7.9 6.512 -7.9 4.8 L -7.9 -4.8 Z",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"butt","stroke-linejoin":"miter",transform:"matrix(1 0 0 1 11.8 11.8)"},null,-1),C("path",{id:"bar-arrow-expand",d:"M -1.25 -2.5 L 1.25 0 L -1.25 2.5",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])}const Ape=kt({name:"kimi-left-panel-expand",render:Spe}),Mpe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Tpe(e,t){return b(),A("svg",Mpe,[...t[0]||(t[0]=[Ac('',1)])])}const Epe=kt({name:"kimi-light-mode",render:Tpe}),Ipe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Lpe(e,t){return b(),A("svg",Ipe,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.97427 8.06961C4.99348 7.33581 6.18946 7.1 7.00001 7.1H9.00001C9.49706 7.1 9.90001 7.50294 9.90001 8C9.90001 8.49706 9.49706 8.9 9.00001 8.9H7.00001C6.47755 8.9 5.67353 9.06419 5.02599 9.53039C4.42434 9.96356 3.90001 10.6934 3.90001 12C3.90001 13.3066 4.42434 14.0364 5.02599 14.4696C5.67353 14.9358 6.47755 15.1 7.00001 15.1H9.00001C9.49706 15.1 9.90001 15.5029 9.90001 16C9.90001 16.4971 9.49706 16.9 9.00001 16.9H7.00001C6.18946 16.9 4.99348 16.6642 3.97427 15.9304C2.90917 15.1636 2.10001 13.8934 2.10001 12C2.10001 10.1066 2.90917 8.83644 3.97427 8.06961ZM14.1 8C14.1 7.50294 14.5029 7.1 15 7.1H17C17.8105 7.1 19.0065 7.33581 20.0257 8.06961C21.0908 8.83644 21.9 10.1066 21.9 12C21.9 13.8934 21.0908 15.1636 20.0257 15.9304C19.0065 16.6642 17.8105 16.9 17 16.9H15C14.5029 16.9 14.1 16.4971 14.1 16C14.1 15.5029 14.5029 15.1 15 15.1H17C17.5225 15.1 18.3265 14.9358 18.974 14.4696C19.5757 14.0364 20.1 13.3066 20.1 12C20.1 10.6934 19.5757 9.96356 18.974 9.53039C18.3265 9.06419 17.5225 8.9 17 8.9H15C14.5029 8.9 14.1 8.49706 14.1 8ZM7.10001 12C7.10001 11.5029 7.50295 11.1 8.00001 11.1H16C16.4971 11.1 16.9 11.5029 16.9 12C16.9 12.4971 16.4971 12.9 16 12.9H8.00001C7.50295 12.9 7.10001 12.4971 7.10001 12Z",fill:"currentColor"},null,-1)])])}const $pe=kt({name:"kimi-link",render:Lpe}),Npe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Fpe(e,t){return b(),A("svg",Npe,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4.10001 5.99998C4.10001 5.50292 4.50295 5.09998 5.00001 5.09998H19C19.4971 5.09998 19.9 5.50292 19.9 5.99998C19.9 6.49703 19.4971 6.89998 19 6.89998H5.00001C4.50295 6.89998 4.10001 6.49703 4.10001 5.99998ZM4.10001 12C4.10001 11.5029 4.50295 11.1 5.00001 11.1H19C19.4971 11.1 19.9 11.5029 19.9 12C19.9 12.497 19.4971 12.9 19 12.9H5.00001C4.50295 12.9 4.10001 12.497 4.10001 12ZM4.10001 18C4.10001 17.5029 4.50295 17.1 5.00001 17.1H19C19.4971 17.1 19.9 17.5029 19.9 18C19.9 18.497 19.4971 18.9 19 18.9H5.00001C4.50295 18.9 4.10001 18.497 4.10001 18Z",fill:"currentColor"},null,-1)])])}const Rpe=kt({name:"kimi-list",render:Fpe}),Ope={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Ppe(e,t){return b(),A("svg",Ope,[...t[0]||(t[0]=[C("g",null,[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M18 4.09961C20.1539 4.09961 21.9004 5.84609 21.9004 8V16C21.9004 18.1539 20.1539 19.9004 18 19.9004H6C3.84609 19.9004 2.09961 18.1539 2.09961 16V8C2.09961 5.84609 3.84609 4.09961 6 4.09961H18ZM3.90039 16C3.90039 17.1598 4.8402 18.0996 6 18.0996H18C19.1598 18.0996 20.0996 17.1598 20.0996 16V9.49805L13.5361 13.5361C12.5955 14.1147 11.4075 14.1084 10.4727 13.5205L3.90039 9.38672V16ZM6 5.90039C5.0746 5.90039 4.29039 6.49909 4.01074 7.33008L11.4316 11.9971C11.7861 12.2199 12.2361 12.2222 12.5928 12.0029L20.0195 7.43457C19.7725 6.54993 18.9636 5.90039 18 5.90039H6Z",fill:"currentColor"})],-1)])])}const Dpe=kt({name:"kimi-mail",render:Ppe}),Bpe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Hpe(e,t){return b(),A("svg",Bpe,[...t[0]||(t[0]=[C("path",{d:"M17 11.0996C17.4971 11.0996 17.9004 11.5029 17.9004 12C17.9004 12.4971 17.4971 12.9004 17 12.9004H7C6.50294 12.9004 6.09961 12.4971 6.09961 12C6.09961 11.5029 6.50294 11.0996 7 11.0996H17Z",fill:"currentColor"},null,-1)])])}const zpe=kt({name:"kimi-minus",render:Hpe}),Wpe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Upe(e,t){return b(),A("svg",Wpe,[...t[0]||(t[0]=[C("path",{d:"M15.182 3.32802C15.9304 2.72235 17.0309 2.76978 17.724 3.46767L18.5424 4.29189L18.6722 4.43642C19.2377 5.13495 19.234 6.1404 18.6635 6.83486L18.5326 6.97841L18.0248 7.48232C17.9549 7.55172 17.8793 7.61254 17.8021 7.66884C17.9794 8.18027 17.9316 8.7498 17.6595 9.22841C17.6847 9.24522 17.7091 9.2635 17.7328 9.2831L17.8002 9.3456L17.9847 9.53798C19.8515 11.5442 20.4549 14.0022 19.6224 16.2196C19.1921 17.3657 18.4025 18.3827 17.2992 19.203H19.0873L19.1801 19.2079C19.6337 19.2542 19.9877 19.6375 19.9877 20.1034C19.9876 20.5692 19.6337 20.9527 19.1801 20.9989L19.0873 21.0028H13.0385C13.0244 21.0033 13.0104 21.0031 12.9965 21.0028H4.9115C4.41448 21.0028 4.01117 20.6004 4.01111 20.1034C4.01111 19.6064 4.41444 19.203 4.9115 19.203H12.9047C15.7614 18.5471 17.3679 17.1023 17.9369 15.5868C18.4678 14.1726 18.179 12.4782 16.807 10.9188L16.5189 10.6093L16.4574 10.5399C16.4549 10.5368 16.453 10.5333 16.4506 10.5302L12.3011 14.6522C11.6031 15.3454 10.5023 15.3845 9.75818 14.7733L9.61365 14.6425L7.31091 12.3231C6.5717 11.5786 6.57617 10.376 7.32068 9.63662L12.3676 4.62392L12.5121 4.49404C13.0358 4.06988 13.7318 3.96755 14.3402 4.18251C14.3969 4.10597 14.4591 4.03197 14.5287 3.96279L15.0365 3.45791L15.182 3.32802ZM4.83044 12.9335C5.16112 12.6052 5.68305 12.5863 6.03552 12.8759L6.10291 12.9384L9.07361 15.9286L9.13513 15.997C9.42218 16.3514 9.3992 16.8727 9.06873 17.2011C8.7381 17.5294 8.21712 17.5482 7.86462 17.2587L7.79626 17.1972L4.82654 14.2069L4.76501 14.1376C4.47792 13.7831 4.49979 13.2619 4.83044 12.9335ZM13.6693 5.87978L13.6361 5.90126L8.58826 10.914C8.54935 10.9529 8.54943 11.0165 8.58826 11.0556L10.891 13.3739L10.9242 13.3964C10.9602 13.4111 11.0032 13.404 11.0326 13.3749L16.0795 8.3622L16.1019 8.329C16.1117 8.3049 16.1117 8.2779 16.1019 8.2538L16.0804 8.2206L13.7777 5.90224C13.7486 5.87289 13.7054 5.86535 13.6693 5.87978ZM16.3383 4.71376L16.3051 4.73525L15.7972 5.24013C15.7584 5.27904 15.7585 5.34166 15.7972 5.38076L16.6146 6.20498L16.6478 6.22744C16.6838 6.24221 16.7268 6.23487 16.7562 6.20595L17.264 5.70107L17.2865 5.66787C17.2962 5.64382 17.2963 5.61672 17.2865 5.59267L17.265 5.55947L16.4467 4.73623C16.4174 4.70681 16.3744 4.6992 16.3383 4.71376Z",fill:"currentColor"},null,-1)])])}const jpe=kt({name:"kimi-microscope",render:Upe}),Vpe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function qpe(e,t){return b(),A("svg",Vpe,[...t[0]||(t[0]=[C("path",{d:"M6 12C6 12.8283 5.32834 13.5 4.5 13.5C3.67166 13.5 3 12.8283 3 12C3 11.1717 3.67166 10.5 4.5 10.5C5.32834 10.5 6 11.1717 6 12Z",fill:"currentColor"},null,-1),C("path",{d:"M13.5 12C13.5 12.8283 12.8283 13.5 12 13.5C11.1717 13.5 10.5 12.8283 10.5 12C10.5 11.1717 11.1717 10.5 12 10.5C12.8283 10.5 13.5 11.1717 13.5 12Z",fill:"currentColor"},null,-1),C("path",{d:"M19.5002 13.5C20.3287 13.5 21 12.8287 21 12.0002C21 11.1718 20.3287 10.5 19.5002 10.5C18.6718 10.5 18 11.1718 18 12.0002C18 12.8287 18.6718 13.5 19.5002 13.5Z",fill:"currentColor"},null,-1)])])}const Kpe=kt({name:"kimi-more",render:qpe}),Zpe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Gpe(e,t){return b(),A("svg",Zpe,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8 12.0993C8.49691 12.0993 8.90016 12.5028 8.90039 12.9997V17.9997C8.90039 19.6013 7.60163 20.9001 6 20.9001C4.39837 20.9001 3.09961 19.6013 3.09961 17.9997C3.09984 16.3982 4.39852 15.0993 6 15.0993C6.38939 15.0993 6.76033 15.1778 7.09961 15.317V12.9997C7.09984 12.5028 7.50309 12.0993 8 12.0993ZM6 16.9001C5.39263 16.9001 4.90062 17.3923 4.90039 17.9997C4.90039 18.6072 5.39249 19.0993 6 19.0993C6.60751 19.0993 7.09961 18.6072 7.09961 17.9997C7.09938 17.3923 6.60737 16.9001 6 16.9001Z",fill:"currentColor"},null,-1),C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M18.627 3.35611C19.8025 3.12106 20.9001 4.02068 20.9004 5.21939V15.9997C20.9004 17.6013 19.6016 18.9001 18 18.9001C16.3984 18.9001 15.0996 17.6013 15.0996 15.9997C15.0998 14.3982 16.3985 13.0993 18 13.0993C18.3894 13.0993 18.7603 13.1778 19.0996 13.317V9.21939C19.0993 9.15657 19.0421 9.10946 18.9805 9.12173L12.6768 10.3825C12.1894 10.4799 11.7148 10.1637 11.6172 9.67642C11.52 9.18922 11.8361 8.71439 12.3232 8.61685L18.627 7.35611C18.7868 7.32415 18.9452 7.31502 19.0996 7.32291V5.21939C19.0993 5.15657 19.0421 5.10946 18.9805 5.12173L12.6768 6.38248C12.1894 6.47994 11.7148 6.16372 11.6172 5.67642C11.52 5.18922 11.8361 4.71439 12.3232 4.61685L18.627 3.35611ZM18 14.9001C17.3926 14.9001 16.9006 15.3923 16.9004 15.9997C16.9004 16.6072 17.3925 17.0993 18 17.0993C18.6075 17.0993 19.0996 16.6072 19.0996 15.9997C19.0994 15.3923 18.6074 14.9001 18 14.9001Z",fill:"currentColor"},null,-1),C("path",{d:"M7.32422 5.38931C7.61669 4.87032 8.38346 4.87015 8.67578 5.38931L8.73047 5.50845L8.89551 5.95376L8.97949 6.1481C9.19937 6.58817 9.57968 6.93145 10.0459 7.10415L10.4912 7.26919C11.127 7.50461 11.1666 8.36217 10.6104 8.67544L10.4912 8.73013L10.0459 8.89517C9.5799 9.06783 9.19939 9.41141 8.97949 9.85123L8.89551 10.0456L8.73047 10.4909C8.49495 11.1267 7.63737 11.1665 7.32422 10.61L7.26953 10.4909L7.10449 10.0456C6.93172 9.57931 6.58767 9.19898 6.14746 8.97916L5.9541 8.89517L5.50879 8.73013C4.83054 8.47903 4.83061 7.52037 5.50879 7.26919L5.9541 7.10415L6.14746 7.02017C6.58757 6.80032 6.93176 6.41995 7.10449 5.95376L7.26953 5.50845L7.32422 5.38931Z",fill:"currentColor"},null,-1)])])}const Ype=kt({name:"kimi-music",render:Gpe}),Xpe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Jpe(e,t){return b(),A("svg",Xpe,[...t[0]||(t[0]=[C("path",{d:"M17.9551 6.32648C17.955 5.82951 17.5517 5.42706 17.0547 5.42706H15.4844C14.9875 5.42717 14.5851 5.82958 14.585 6.32648V17.6732C14.585 18.1701 14.9874 18.5734 15.4844 18.5735H17.0547C17.5518 18.5735 17.9551 18.1702 17.9551 17.6732V6.32648ZM19.7549 17.6732C19.7549 19.1643 18.5459 20.3734 17.0547 20.3734H15.4844C13.9933 20.3732 12.7842 19.1643 12.7842 17.6732V6.32648C12.7843 4.83546 13.9934 3.62639 15.4844 3.62628H17.0547C18.5458 3.62628 19.7548 4.8354 19.7549 6.32648V17.6732Z",fill:"currentColor"},null,-1),C("path",{d:"M9.41571 6.32648C9.41561 5.82951 9.01231 5.42706 8.51532 5.42706H6.94501C6.44811 5.42717 6.0457 5.82958 6.04559 6.32648V17.6732C6.04559 18.1701 6.44804 18.5734 6.94501 18.5735H8.51532C9.01238 18.5735 9.41571 18.1702 9.41571 17.6732V6.32648ZM11.2155 17.6732C11.2155 19.1643 10.0065 20.3734 8.51532 20.3734H6.94501C5.45393 20.3732 4.24481 19.1643 4.24481 17.6732V6.32648C4.24492 4.83546 5.45399 3.62639 6.94501 3.62628H8.51532C10.0064 3.62628 11.2154 4.8354 11.2155 6.32648V17.6732Z",fill:"currentColor"},null,-1)])])}const Qpe=kt({name:"kimi-pause",render:Jpe}),e0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function t0e(e,t){return b(),A("svg",e0e,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M18.0176 4.89998C17.7305 4.89998 17.4552 5.014 17.2522 5.217L6.35429 16.1149C5.957 16.5122 5.67517 17.01 5.53889 17.5551L5.23691 18.763L6.44486 18.4611C6.98994 18.3248 7.48773 18.0429 7.88502 17.6456L18.783 6.74773C18.8834 6.64728 18.9631 6.52797 19.0176 6.39658C19.072 6.26517 19.1 6.12441 19.1 5.98236C19.1 5.84031 19.072 5.69956 19.0176 5.56815C18.9631 5.43676 18.8834 5.31745 18.783 5.217C18.6825 5.11649 18.5631 5.03676 18.4318 4.98237C18.3005 4.92798 18.1597 4.89998 18.0176 4.89998ZM15.9794 3.94421C16.52 3.40366 17.2531 3.09998 18.0176 3.09998C18.3961 3.09998 18.7709 3.17452 19.1207 3.31938C19.4704 3.46424 19.7881 3.67656 20.0558 3.94421C20.3235 4.21192 20.5357 4.52969 20.6805 4.87932C20.8254 5.22895 20.9 5.60375 20.9 5.98236C20.9 6.36098 20.8254 6.73578 20.6805 7.08541C20.5357 7.43504 20.3235 7.75281 20.0558 8.02052L17.6385 10.4378L9.15781 18.9184C8.52984 19.5464 7.74301 19.9919 6.88142 20.2073L4.21828 20.8731C3.91158 20.9498 3.58714 20.8599 3.3636 20.6364C3.14006 20.4128 3.05019 20.0884 3.12686 19.7817L3.79264 17.1185C4.00803 16.257 4.45351 15.4701 5.0815 14.8421L15.9794 3.94421Z",fill:"currentColor"},null,-1)])])}const n0e=kt({name:"kimi-pencil",render:t0e}),o0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function s0e(e,t){return b(),A("svg",o0e,[...t[0]||(t[0]=[C("path",{d:"M7.76251 3.10547C8.25776 3.10552 8.74422 3.23849 9.17072 3.49023L19.533 9.60742C20.8536 10.3869 21.2922 12.0901 20.5174 13.4121C20.2785 13.8195 19.9398 14.1604 19.533 14.4004L9.16974 20.5156C7.84721 21.2958 6.14595 20.8511 5.36993 19.5273C5.1196 19.1003 4.98719 18.6142 4.98712 18.1191V5.88672C4.98716 4.3537 6.2273 3.10547 7.76251 3.10547ZM6.7879 18.1191C6.78797 18.2945 6.8343 18.4664 6.92267 18.6172C7.19638 19.0841 7.79336 19.2377 8.25568 18.9648L18.618 12.8496C18.7607 12.7654 18.8803 12.6458 18.9647 12.502C19.2393 12.0334 19.082 11.4311 18.618 11.1572L8.25568 5.04102C8.1061 4.95273 7.93562 4.9063 7.76251 4.90625C7.22703 4.90625 6.78794 5.34218 6.7879 5.88672V18.1191Z",fill:"currentColor"},null,-1)])])}const i0e=kt({name:"kimi-play",render:s0e}),r0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function l0e(e,t){return b(),A("svg",r0e,[...t[0]||(t[0]=[C("path",{d:"M11.999 15.0049C12.6208 15.0049 13.1259 15.5091 13.126 16.1309C13.126 16.7528 12.6209 17.2578 11.999 17.2578C11.3773 17.2576 10.873 16.7526 10.873 16.1309C10.8732 15.5092 11.3774 15.0051 11.999 15.0049Z",fill:"currentColor"},null,-1),C("path",{d:"M10.1611 7.37109C10.9017 6.79576 11.8605 6.60385 12.7881 6.8457C13.808 7.10861 14.6385 7.93756 14.9014 8.95898C15.2694 10.3845 14.5793 11.8629 13.2598 12.4736C13.0803 12.557 12.75 12.9552 12.75 13.3525V13.502C12.75 13.9172 12.4142 14.2527 11.999 14.2529C11.5837 14.2529 11.248 13.9173 11.248 13.502V13.3525C11.248 12.313 11.9587 11.4215 12.6279 11.1113C13.1777 10.8567 13.6681 10.192 13.4473 9.33496C13.3195 8.84253 12.9038 8.42684 12.4121 8.2998C11.9292 8.17289 11.4573 8.26727 11.0811 8.55859C10.71 8.84626 10.4971 9.28012 10.4971 9.74805C10.4968 10.1632 10.1613 10.499 9.74609 10.499C9.33092 10.499 8.99536 10.1632 8.99512 9.74805C8.99512 8.81152 9.41918 7.94493 10.1611 7.37109Z",fill:"currentColor"},null,-1),C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2ZM12 3.7998C7.47126 3.7998 3.7998 7.47126 3.7998 12C3.7998 16.5287 7.47126 20.2002 12 20.2002C16.5287 20.2002 20.2002 16.5287 20.2002 12C20.2002 7.47126 16.5287 3.7998 12 3.7998Z",fill:"currentColor"},null,-1)])])}const a0e=kt({name:"kimi-question",render:l0e}),u0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function c0e(e,t){return b(),A("svg",u0e,[...t[0]||(t[0]=[C("path",{d:"M12 2C13.1046 2 14 2.89543 14 4C14 4.78019 13.552 5.45353 12.9004 5.7832V7H16.5C18.1569 7 19.5 8.34315 19.5 10V17C19.5 18.6051 18.2394 19.9158 16.6543 19.9961L16.5 20H7.5L7.3457 19.9961C5.81166 19.9184 4.58163 18.6883 4.50391 17.1543L4.5 17V10C4.5 8.34315 5.84315 7 7.5 7H11.0996V5.7832C10.448 5.45353 10 4.78019 10 4C10 2.89543 10.8954 2 12 2ZM7.5 8.7998C6.83726 8.7998 6.2998 9.33726 6.2998 10V17C6.2998 17.6627 6.83726 18.2002 7.5 18.2002H16.5C17.1627 18.2002 17.7002 17.6627 17.7002 17V10C17.7002 9.33726 17.1627 8.7998 16.5 8.7998H7.5ZM3 10.7666C3.49706 10.7666 3.90039 11.1699 3.90039 11.667V15C3.90039 15.4971 3.49706 15.9004 3 15.9004C2.50294 15.9004 2.09961 15.4971 2.09961 15V11.667C2.09961 11.1699 2.50294 10.7666 3 10.7666ZM21 10.7666C21.4971 10.7666 21.9004 11.1699 21.9004 11.667V15C21.9004 15.4971 21.4971 15.9004 21 15.9004C20.5029 15.9004 20.0996 15.4971 20.0996 15V11.667C20.0996 11.1699 20.5029 10.7666 21 10.7666ZM9.5 11.0996C9.99706 11.0996 10.4004 11.5029 10.4004 12V14.5C10.4004 14.9971 9.99706 15.4004 9.5 15.4004C9.00294 15.4004 8.59961 14.9971 8.59961 14.5V12C8.59961 11.5029 9.00294 11.0996 9.5 11.0996ZM14.5 11.0996C14.9971 11.0996 15.4004 11.5029 15.4004 12V14.5C15.4004 14.9971 14.9971 15.4004 14.5 15.4004C14.0029 15.4004 13.5996 14.9971 13.5996 14.5V12C13.5996 11.5029 14.0029 11.0996 14.5 11.0996ZM12 3.5C11.7239 3.5 11.5 3.72386 11.5 4C11.5 4.27614 11.7239 4.5 12 4.5C12.2761 4.5 12.5 4.27614 12.5 4C12.5 3.72386 12.2761 3.5 12 3.5Z",fill:"currentColor"},null,-1)])])}const d0e=kt({name:"kimi-robot",render:c0e}),f0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function p0e(e,t){return b(),A("svg",f0e,[...t[0]||(t[0]=[C("path",{d:"M11.5 3C16.1944 3 20 6.80558 20 11.5C20 13.523 19.2933 15.381 18.1132 16.8404L21.1364 19.8636C21.4879 20.2151 21.4879 20.7849 21.1364 21.1364C20.7849 21.4879 20.2151 21.4879 19.8636 21.1364L16.8404 18.1132C15.381 19.2933 13.523 20 11.5 20C6.80558 20 3 16.1944 3 11.5C3 6.80558 6.80558 3 11.5 3ZM11.5 18.2C15.2003 18.2 18.2 15.2003 18.2 11.5C18.2 7.79969 15.2003 4.8 11.5 4.8C7.79969 4.8 4.8 7.79969 4.8 11.5C4.8 15.2003 7.79969 18.2 11.5 18.2Z",fill:"currentColor"},null,-1)])])}const h0e=kt({name:"kimi-search",render:p0e}),m0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function g0e(e,t){return b(),A("svg",m0e,[...t[0]||(t[0]=[C("path",{d:"M16.5364 10.1636C16.8879 10.5151 16.8879 11.0849 16.5364 11.4364C16.1849 11.7879 15.6151 11.7879 15.2636 11.4364L12.9 9.07281V17.1C12.9 17.597 12.4971 18 12 18C11.503 18 11.1 17.597 11.1 17.1V9.07281L8.73641 11.4364C8.38494 11.7879 7.81509 11.7879 7.46362 11.4364C7.11214 11.0849 7.11214 10.5151 7.46362 10.1636L11.3636 6.2636C11.7151 5.91211 12.2849 5.91211 12.6364 6.2636L16.5364 10.1636Z",fill:"currentColor"},null,-1)])])}const v0e=kt({name:"kimi-send",render:g0e}),y0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function k0e(e,t){return b(),A("svg",y0e,[...t[0]||(t[0]=[C("path",{d:"M16.0404 12C16.0404 9.76874 14.2313 7.9596 12.0001 7.9596C9.76883 7.9596 7.95972 9.76874 7.95972 12C7.95972 14.2313 9.76883 16.0404 12.0001 16.0404C14.2313 16.0404 16.0404 14.2313 16.0404 12ZM14.2222 12C14.2222 13.2271 13.2271 14.2222 12 14.2222C10.7729 14.2222 9.77783 13.2271 9.77783 12C9.77783 10.7729 10.7729 9.77778 12 9.77778C13.2271 9.77778 14.2222 10.7729 14.2222 12Z",fill:"currentColor"},null,-1),C("path",{d:"M9.91145 21.8009C9.29001 21.6797 8.76914 21.2612 8.50632 20.6922L8.07372 19.7556C7.88838 19.3544 7.43553 19.1048 6.95371 19.1549L5.89572 19.2647C5.2733 19.3293 4.64823 19.114 4.22298 18.6611C3.74343 18.1504 3.32454 17.6037 2.97033 17.0181C2.61571 16.4318 2.32839 15.8106 2.10407 15.1566C1.89769 14.5549 2.02148 13.8954 2.4089 13.3902L3.0376 12.5704C3.30043 12.2277 3.30042 11.7722 3.03758 11.4295L2.40413 10.6035C2.01474 10.0958 1.891 9.43198 2.10208 8.82826C2.55037 7.54612 3.27017 6.35997 4.22 5.34259C4.64518 4.8872 5.27275 4.67067 5.89701 4.73544L6.95383 4.84514C7.43561 4.89515 7.88844 4.6456 8.07377 4.24441L8.50266 3.31593C8.76494 2.74818 9.28448 2.33019 9.90423 2.20761C11.2916 1.9332 12.7148 1.93127 14.0885 2.19913C14.7099 2.32029 15.2308 2.73881 15.4937 3.3078L15.9263 4.24441C16.1116 4.6456 16.5644 4.89514 17.0462 4.84514L18.1043 4.73532C18.7267 4.67072 19.3518 4.88603 19.777 5.33886C20.2566 5.84953 20.6755 6.3963 21.0297 6.98193C21.3843 7.56823 21.6716 8.18942 21.8959 8.84339C22.1023 9.44509 21.9785 10.1046 21.5911 10.6098L20.9624 11.4295C20.6996 11.7722 20.6996 12.2278 20.9624 12.5705L21.5959 13.3964C21.9853 13.9042 22.109 14.568 21.8979 15.1717C21.4497 16.4538 20.7299 17.6399 19.7801 18.6573C19.3549 19.1128 18.7273 19.3294 18.103 19.2646L17.0462 19.1549C16.5645 19.1049 16.1116 19.3544 15.9263 19.7556L15.4974 20.6841C15.2351 21.2518 14.7156 21.6698 14.0958 21.7924C12.7083 22.0668 11.2852 22.0687 9.91145 21.8009ZM13.7432 20.0088C13.7844 20.0006 13.8259 19.9673 13.847 19.9216L14.2758 18.9931C14.7915 17.8768 15.9886 17.2171 17.2341 17.3464L18.2909 17.4561C18.3649 17.4638 18.4272 17.4423 18.4512 17.4166C19.2296 16.5828 19.8171 15.6146 20.1817 14.5716C20.1845 14.5636 20.1796 14.5373 20.1532 14.5029L19.5198 13.677C18.7564 12.6815 18.7564 11.3185 19.5198 10.323L20.1485 9.5033C20.1746 9.46927 20.1795 9.4429 20.1762 9.43327C19.9932 8.89965 19.7603 8.39623 19.4741 7.92293C19.1873 7.4489 18.846 7.00333 18.4517 6.58351C18.4272 6.55739 18.3656 6.53616 18.2921 6.54378L17.234 6.65361C15.9886 6.78287 14.7915 6.12317 14.2758 5.00689L13.8432 4.07027C13.822 4.02448 13.7811 3.9916 13.7406 3.98371C12.5983 3.76097 11.4132 3.76258 10.2571 3.99124C10.2158 3.99941 10.1744 4.03271 10.1533 4.07842L9.72441 5.00689C9.20875 6.12317 8.01164 6.7829 6.76619 6.6536L5.70942 6.54391C5.63535 6.53623 5.573 6.55774 5.54905 6.5834C4.77067 7.41713 4.18312 8.38534 3.81845 9.42835C3.81564 9.43637 3.82054 9.46265 3.84693 9.49706L4.48038 10.323C5.24381 11.3185 5.24383 12.6815 4.48041 13.6769L3.85171 14.4967C3.82561 14.5307 3.82066 14.5571 3.82396 14.5667C4.00701 15.1004 4.23986 15.6038 4.52613 16.0771C4.81284 16.5511 5.15421 16.9967 5.54845 17.4165C5.57298 17.4426 5.63461 17.4638 5.70811 17.4562L6.76608 17.3464C8.01157 17.2171 9.20871 17.8768 9.72438 18.9932L10.157 19.9297C10.1781 19.9755 10.2191 20.0084 10.2595 20.0163C11.4018 20.239 12.587 20.2374 13.7432 20.0088Z",fill:"currentColor"},null,-1)])])}const b0e=kt({name:"kimi-setting",render:k0e}),C0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function w0e(e,t){return b(),A("svg",C0e,[...t[0]||(t[0]=[C("path",{d:"M17 2C19.2091 2 21 3.79086 21 6V15.7646C21 17.2361 20.192 18.5884 18.8965 19.2861L13.8965 21.9785C12.7126 22.616 11.2874 22.616 10.1035 21.9785L5.10352 19.2861C3.80802 18.5884 3 17.2361 3 15.7646V6C3 3.79086 4.79086 2 7 2H17ZM7 3.7998C5.78498 3.7998 4.79981 4.78497 4.7998 6V15.7646C4.7998 16.574 5.24443 17.3184 5.95703 17.7021L10.957 20.3936C11.6082 20.7442 12.3918 20.7442 13.043 20.3936L18.043 17.7021C18.7556 17.3184 19.2002 16.574 19.2002 15.7646V6C19.2002 4.78497 18.215 3.7998 17 3.7998H7Z",fill:"currentColor"},null,-1),C("path",{d:"M10.1611 7.37109C10.9017 6.79576 11.8605 6.60385 12.7881 6.8457C13.808 7.10861 14.6385 7.93756 14.9014 8.95898C15.2694 10.3845 14.5793 11.8629 13.2598 12.4736C13.0803 12.557 12.75 12.9552 12.75 13.3525V13.502C12.75 13.9172 12.4142 14.2527 11.999 14.2529C11.5837 14.2529 11.248 13.9173 11.248 13.502V13.3525C11.248 12.313 11.9587 11.4215 12.6279 11.1113C13.1777 10.8567 13.6681 10.192 13.4473 9.33496C13.3195 8.84253 12.9038 8.42684 12.4121 8.2998C11.9292 8.17289 11.4573 8.26727 11.0811 8.55859C10.71 8.84626 10.4971 9.28012 10.4971 9.74805C10.4968 10.1632 10.1613 10.499 9.74609 10.499C9.33092 10.499 8.99536 10.1632 8.99512 9.74805C8.99512 8.81152 9.41918 7.94493 10.1611 7.37109Z",fill:"currentColor"},null,-1),C("path",{d:"M11.999 15.0049C12.6208 15.0049 13.1259 15.5091 13.126 16.1309C13.126 16.7528 12.6209 17.2578 11.999 17.2578C11.3773 17.2576 10.873 16.7526 10.873 16.1309C10.8732 15.5092 11.3774 15.0051 11.999 15.0049Z",fill:"currentColor"},null,-1)])])}const _0e=kt({name:"kimi-shield-question",render:w0e}),x0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function S0e(e,t){return b(),A("svg",x0e,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.90005 12C2.90005 11.503 3.303 11.1 3.80005 11.1H12.2939L9.38588 8.19197C9.03441 7.8405 9.03441 7.27065 9.38588 6.91918C9.73735 6.56771 10.3072 6.56771 10.6587 6.91918L15.1031 11.3636C15.2719 11.5324 15.3667 11.7613 15.3667 12C15.3667 12.2387 15.2719 12.4676 15.1031 12.6364L10.6587 17.0809C10.3072 17.4323 9.73735 17.4323 9.38588 17.0809C9.03441 16.7294 9.03441 16.1595 9.38588 15.8081L12.2939 12.9H3.80005C3.303 12.9 2.90005 12.4971 2.90005 12ZM13.5874 20C13.5874 19.503 13.9904 19.1 14.4874 19.1H18.043C18.2758 19.1 18.4991 19.0075 18.6637 18.8429C18.8283 18.6783 18.9208 18.455 18.9208 18.2222V5.7778C18.9208 5.545 18.8283 5.32174 18.6637 5.15712C18.499 4.9925 18.2758 4.90002 18.043 4.90002H14.4874C13.9904 4.90002 13.5874 4.49708 13.5874 4.00002C13.5874 3.50297 13.9904 3.10003 14.4874 3.10003H18.043C18.7532 3.10003 19.4343 3.38215 19.9365 3.88433C20.4386 4.38651 20.7208 5.06761 20.7208 5.7778V18.2222C20.7208 18.9324 20.4386 19.6135 19.9365 20.1157C19.4343 20.6179 18.7532 20.9 18.043 20.9H14.4874C13.9904 20.9 13.5874 20.4971 13.5874 20Z",fill:"currentColor"},null,-1)])])}const A0e=kt({name:"kimi-sign-in",render:S0e}),M0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function T0e(e,t){return b(),A("svg",M0e,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M20.6364 11.3636C20.9879 11.7151 20.9879 12.2849 20.6364 12.6364L16.1919 17.0808C15.8405 17.4323 15.2706 17.4323 14.9192 17.0808C14.5677 16.7293 14.5677 16.1595 14.9192 15.808L17.8272 12.9H9.33333C8.83627 12.9 8.43333 12.497 8.43333 12C8.43333 11.5029 8.83627 11.1 9.33333 11.1H17.8272L14.9192 8.19193C14.5677 7.84046 14.5677 7.27061 14.9192 6.91914C15.2706 6.56766 15.8405 6.56766 16.1919 6.91914L20.6364 11.3636ZM10.2333 3.99998C10.2333 4.49703 9.83038 4.89998 9.33333 4.89998H5.77777C5.54497 4.89998 5.3217 4.99246 5.15709 5.15707C4.99247 5.32169 4.89999 5.54495 4.89999 5.77775V18.2222C4.89999 18.455 4.99247 18.6783 5.15709 18.8429C5.32171 19.0075 5.54497 19.1 5.77777 19.1H9.33333C9.83038 19.1 10.2333 19.5029 10.2333 20C10.2333 20.497 9.83038 20.9 9.33333 20.9H5.77777C5.06758 20.9 4.38648 20.6179 3.8843 20.1157C3.38212 19.6135 3.09999 18.9324 3.09999 18.2222V5.77775C3.09999 5.06756 3.38212 4.38646 3.8843 3.88428C4.38648 3.3821 5.06758 3.09998 5.77777 3.09998H9.33333C9.83038 3.09998 10.2333 3.50292 10.2333 3.99998Z",fill:"currentColor"},null,-1)])])}const E0e=kt({name:"kimi-sign-out",render:T0e}),I0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function L0e(e,t){return b(),A("svg",I0e,[...t[0]||(t[0]=[Ac('',9)])])}const $0e=kt({name:"kimi-sliders",render:L0e}),N0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function F0e(e,t){return b(),A("svg",N0e,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7.78027 8.90405C7.5 9.45411 7.5 10.1742 7.5 11.6144V12.3856C7.5 13.8258 7.5 14.5459 7.78027 15.096C8.02681 15.5798 8.42019 15.9732 8.90405 16.2197C9.45411 16.5 10.1742 16.5 11.6144 16.5H12.3856C13.8258 16.5 14.5459 16.5 15.096 16.2197C15.5798 15.9732 15.9732 15.5798 16.2197 15.096C16.5 14.5459 16.5 13.8258 16.5 12.3856V11.6144C16.5 10.1742 16.5 9.45411 16.2197 8.90405C15.9732 8.42019 15.5798 8.02681 15.096 7.78027C14.5459 7.5 13.8258 7.5 12.3856 7.5H11.6144C10.1742 7.5 9.45411 7.5 8.90405 7.78027C8.42019 8.02681 8.02681 8.42019 7.78027 8.90405Z",fill:"currentColor"},null,-1)])])}const R0e=kt({name:"kimi-stop",render:F0e}),O0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function P0e(e,t){return b(),A("svg",O0e,[...t[0]||(t[0]=[C("path",{d:"M7.01562 3.41459C7.4446 3.16449 7.9954 3.30924 8.24609 3.73784C8.49645 4.167 8.35189 4.71868 7.92285 4.96928C5.51497 6.37506 3.90054 8.98498 3.90039 11.9703C3.90076 16.4435 7.52672 20.0699 12 20.0699C16.4733 20.0699 20.0992 16.4435 20.0996 11.9703C20.0996 11.2291 20 10.5116 19.8145 9.83159C19.6838 9.35222 19.967 8.85702 20.4463 8.72612C20.9256 8.59541 21.4207 8.87778 21.5518 9.35698C21.7792 10.1901 21.9004 11.0674 21.9004 11.9703C21.9 17.4376 17.4674 21.8697 12 21.8697C6.53261 21.8697 2.09998 17.4376 2.09961 11.9703C2.09976 8.31904 4.07782 5.12972 7.01562 3.41459ZM8.39258 8.24077C8.75015 7.89591 9.3199 7.90591 9.66504 8.26323C10.01 8.62076 9.99985 9.19051 9.64258 9.53569C9.00203 10.1541 8.60558 11.02 8.60547 11.979C8.60584 13.8536 10.1253 15.3736 12 15.3736C13.8746 15.3735 15.3942 13.8536 15.3945 11.979C15.3945 11.6847 15.3577 11.3989 15.2881 11.1285C15.1646 10.6474 15.4536 10.1568 15.9346 10.0328C16.4158 9.9089 16.9071 10.1991 17.0312 10.6802C17.1383 11.096 17.1943 11.5321 17.1943 11.979C17.194 14.8477 14.8688 17.1733 12 17.1734C9.1312 17.1734 6.80506 14.8478 6.80469 11.979C6.8048 10.5117 7.41519 9.18431 8.39258 8.24077ZM11.5459 1.12651C11.8216 0.965605 12.1631 0.963306 12.4414 1.11967L19.1953 4.91752C19.4859 5.08108 19.662 5.39277 19.6533 5.72612C19.6443 6.05972 19.4515 6.36154 19.1523 6.50932L12.9004 9.5933V12.2583C12.9004 12.7554 12.4971 13.1587 12 13.1587C11.5029 13.1587 11.0996 12.7554 11.0996 12.2583V1.90385C11.0999 1.58444 11.2702 1.2878 11.5459 1.12651ZM12.9004 7.58549L16.8252 5.64897L12.9004 3.44194V7.58549Z",fill:"currentColor"},null,-1)])])}const D0e=kt({name:"kimi-target",render:P0e}),B0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function H0e(e,t){return b(),A("svg",B0e,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M18.9893 6.60743C20.5897 6.60757 21.8877 7.8926 21.8877 9.47736C21.8877 10.7416 21.0607 11.8129 19.9141 12.1955V14.257C19.914 15.8428 18.6152 17.1288 17.0137 17.1289H12.8438V20.1381C12.8437 20.6301 12.4412 21.0293 11.9443 21.0296C11.4473 21.0296 11.044 20.6302 11.0439 20.1381V16.4356C11.0441 15.8343 11.5363 15.3461 12.1436 15.3458H17.0137C17.6211 15.3457 18.1133 14.8585 18.1133 14.257V12.2129C16.9408 11.8451 16.0909 10.7598 16.0908 9.47736C16.0908 7.89251 17.3887 6.60743 18.9893 6.60743ZM18.9893 8.38953C18.3828 8.38953 17.8906 8.87684 17.8906 9.47736C17.8907 10.0778 18.3828 10.5642 18.9893 10.5642C19.5956 10.5641 20.0869 10.0777 20.0869 9.47736C20.0869 8.87693 19.5956 8.38967 18.9893 8.38953Z",fill:"currentColor"},null,-1),C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4.89844 6.60743C6.49899 6.60747 7.79688 7.89254 7.79688 9.47736C7.79684 10.7388 6.97371 11.8078 5.83105 12.1926V14.4021C5.83105 15.0036 6.32315 15.4918 6.93066 15.4918H8.37109C8.86789 15.492 9.27038 15.8905 9.27051 16.3824C9.27051 16.8744 8.86797 17.2737 8.37109 17.2739H6.93066C5.32904 17.2739 4.03027 15.9879 4.03027 14.4021V12.2158C2.85382 11.8504 2.00004 10.7627 2 9.47736C2 7.89251 3.29784 6.60743 4.89844 6.60743ZM4.89844 8.38953C4.29196 8.38953 3.7998 8.87684 3.7998 9.47736C3.79985 10.0778 4.29198 10.5642 4.89844 10.5642C5.50485 10.5642 5.99605 10.0778 5.99609 9.47736C5.99609 8.87687 5.50488 8.38958 4.89844 8.38953Z",fill:"currentColor"},null,-1),C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.9434 2.9707C13.5439 2.97075 14.8418 4.25581 14.8418 5.84063C14.8418 7.11413 14.0035 8.1923 12.8438 8.56745V13.0135C12.8436 13.5056 12.4403 13.9041 11.9434 13.9041C11.4466 13.9039 11.0431 13.5055 11.043 13.0135V8.56745C9.8836 8.19209 9.04496 7.11387 9.04492 5.84063C9.04492 4.25592 10.343 2.97093 11.9434 2.9707ZM11.9434 4.75281C11.3371 4.75303 10.8447 5.24026 10.8447 5.84063C10.8448 6.44097 11.3371 6.92726 11.9434 6.92749C12.5498 6.92745 13.041 6.44108 13.041 5.84063C13.041 5.24014 12.5498 4.75285 11.9434 4.75281Z",fill:"currentColor"},null,-1)])])}const z0e=kt({name:"kimi-task",render:H0e}),W0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function U0e(e,t){return b(),A("svg",W0e,[...t[0]||(t[0]=[C("path",{d:"M16.5293 15.0596C16.9496 15.1021 17.2772 15.4572 17.2773 15.8887C17.2773 16.3202 16.9497 16.6753 16.5293 16.7178L16.4443 16.7217H12C11.5399 16.7216 11.167 16.3488 11.167 15.8887C11.1671 15.4286 11.54 15.0558 12 15.0557H16.4443L16.5293 15.0596Z",fill:"currentColor"},null,-1),C("path",{d:"M6.96582 7.52246C7.27077 7.21751 7.75375 7.1983 8.08105 7.46484L8.14453 7.52246L10.8232 10.2002C11.5102 10.8872 11.5102 12.0014 10.8232 12.6885L8.14453 15.3672L8.08105 15.4248C7.75377 15.6913 7.27075 15.6721 6.96582 15.3672C6.66114 15.0621 6.64234 14.5791 6.90918 14.252L6.96582 14.1885L9.64453 11.5098C9.68057 11.4736 9.68062 11.415 9.64453 11.3789L6.96582 8.7002C6.64116 8.37488 6.6411 7.84774 6.96582 7.52246Z",fill:"currentColor"},null,-1),C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M17 3.09961C19.1539 3.09966 20.9004 4.84612 20.9004 7V17C20.9004 19.1539 19.1539 20.9003 17 20.9004H7C4.84609 20.9004 3.09961 19.1539 3.09961 17V7C3.09961 4.84609 4.84609 3.09961 7 3.09961H17ZM7 4.90039C5.8402 4.90039 4.90039 5.8402 4.90039 7V17C4.90039 18.1598 5.8402 19.0996 7 19.0996H17C18.1598 19.0996 19.0996 18.1598 19.0996 17V7C19.0996 5.84024 18.1598 4.90044 17 4.90039H7Z",fill:"currentColor"},null,-1)])])}const j0e=kt({name:"kimi-terminal",render:U0e}),V0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function q0e(e,t){return b(),A("svg",V0e,[...t[0]||(t[0]=[C("path",{d:"M16.9971 3.90597C15.9799 2.99725 14.7342 2.38312 13.394 2.12966C12.0538 1.8762 10.6699 1.99301 9.39111 2.46751C8.11236 2.94202 6.98721 3.75626 6.13676 4.82261C5.2863 5.88896 4.74274 7.16703 4.56457 8.5193C4.40455 9.70501 4.53253 10.9118 4.93767 12.0376C5.34281 13.1634 6.01318 14.175 6.89207 14.9868C7.43557 15.4634 7.87413 16.0477 8.17997 16.7027C8.48581 17.3577 8.65224 18.0691 8.66873 18.7918V18.926C8.66962 19.7412 8.99387 20.5229 9.57035 21.0993C10.1468 21.6758 10.9285 22.0001 11.7437 22.001H12.2604C13.0757 22.0001 13.8573 21.6758 14.4338 21.0993C15.0103 20.5229 15.3345 19.7412 15.3354 18.926V18.4685C15.3479 17.8297 15.4982 17.2011 15.7761 16.6258C16.0539 16.0505 16.4528 15.542 16.9454 15.1351C17.7442 14.4355 18.3853 13.5741 18.826 12.608C19.2668 11.642 19.4973 10.5932 19.5022 9.53136C19.5071 8.46948 19.2863 7.41869 18.8544 6.4486C18.4225 5.4785 17.7894 4.61125 16.9971 3.9043V3.90597ZM12.2604 20.3343H11.7437C11.3704 20.3339 11.0124 20.1853 10.7484 19.9213C10.4844 19.6573 10.3358 19.2993 10.3354 18.926C10.3354 18.926 10.3296 18.7093 10.3287 18.6676H13.6687V18.926C13.6683 19.2993 13.5198 19.6573 13.2558 19.9213C12.9917 20.1853 12.6338 20.3339 12.2604 20.3343ZM15.8437 13.8835C14.8949 14.7064 14.2097 15.7908 13.8737 17.001H12.8354V11.0143C13.3212 10.8426 13.742 10.5249 14.0403 10.1049C14.3387 9.68482 14.4999 9.18285 14.5021 8.66763C14.5021 8.44662 14.4143 8.23466 14.258 8.07838C14.1017 7.9221 13.8897 7.8343 13.6687 7.8343C13.4477 7.8343 13.2358 7.9221 13.0795 8.07838C12.9232 8.23466 12.8354 8.44662 12.8354 8.66763C12.8354 8.88865 12.7476 9.10061 12.5913 9.25689C12.435 9.41317 12.2231 9.50097 12.0021 9.50097C11.7811 9.50097 11.5691 9.41317 11.4128 9.25689C11.2565 9.10061 11.1687 8.88865 11.1687 8.66763C11.1687 8.44662 11.0809 8.23466 10.9247 8.07838C10.7684 7.9221 10.5564 7.8343 10.3354 7.8343C10.1144 7.8343 9.90242 7.9221 9.74614 8.07838C9.58986 8.23466 9.50207 8.44662 9.50207 8.66763C9.5042 9.18285 9.66547 9.68482 9.96381 10.1049C10.2621 10.5249 10.683 10.8426 11.1687 11.0143V17.001H10.0671C9.69123 15.7586 8.98633 14.6411 8.02707 13.7668C7.21286 13.0081 6.63267 12.0324 6.35496 10.9547C6.07725 9.87703 6.1136 8.7424 6.45974 7.68471C6.80588 6.62702 7.44735 5.69042 8.30846 4.98543C9.16956 4.28045 10.2144 3.83649 11.3196 3.70597C11.5487 3.68039 11.779 3.66759 12.0096 3.66763C13.4409 3.66338 14.8226 4.19149 15.8862 5.1493C16.5026 5.69896 16.9952 6.37337 17.3312 7.12782C17.6672 7.88227 17.839 8.69952 17.8352 9.5254C17.8314 10.3513 17.6522 11.1669 17.3092 11.9183C16.9663 12.6696 16.4677 13.3395 15.8462 13.8835H15.8437Z",fill:"currentColor"},null,-1)])])}const K0e=kt({name:"kimi-thinking",render:q0e}),Z0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function G0e(e,t){return b(),A("svg",Z0e,[...t[0]||(t[0]=[Ac('',6)])])}const Y0e=kt({name:"kimi-todo",render:G0e}),X0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function J0e(e,t){return b(),A("svg",X0e,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.09752 2.19507C8.5421 1.97278 9.08271 2.15298 9.305 2.59756L10.0562 4.10005H13.5C13.9971 4.10005 14.4 4.50299 14.4 5.00005C14.4 5.49711 13.9971 5.90005 13.5 5.90005H12.3106C12.2556 6.2319 12.1667 6.64073 12.0226 7.0987C11.7254 8.04355 11.191 9.20402 10.2334 10.3239C11.4166 11.196 12.5606 11.7524 13.4512 12.0987C13.978 12.3036 14.4136 12.434 14.7124 12.5122L14.7348 12.5181L15.695 10.5976C15.8475 10.2927 16.1591 10.1 16.5 10.1C16.8409 10.1 17.1525 10.2927 17.305 10.5976L20.7969 17.5814L20.8044 17.5959L20.8137 17.615L21.805 19.5976C22.0273 20.0421 21.8471 20.5827 21.4025 20.805C20.9579 21.0273 20.4173 20.8471 20.195 20.4025L19.4438 18.9H13.5562L12.805 20.4025C12.5827 20.8471 12.0421 21.0273 11.5975 20.805C11.1529 20.5827 10.9727 20.0421 11.195 19.5976L12.1863 17.615C12.1917 17.6036 12.1973 17.5924 12.2031 17.5814L13.9146 14.1583C13.6034 14.0667 13.2256 13.9423 12.7988 13.7764C11.7294 13.3605 10.3442 12.6802 8.92538 11.5924C7.79753 12.5167 6.69473 13.0764 5.83285 13.4112C5.33899 13.603 4.92286 13.7216 4.62401 13.7931C4.47449 13.8288 4.35399 13.8529 4.26741 13.8684C4.2241 13.8762 4.18924 13.8818 4.16343 13.8858L4.13156 13.8904L4.12084 13.8919L4.11682 13.8924L4.11514 13.8927C4.11514 13.8927 4.11368 13.8928 4.00001 13L4.11368 13.8928C3.62061 13.9556 3.17 13.6068 3.10722 13.1137C3.0446 12.6219 3.39148 12.1723 3.88256 12.1077L3.94947 12.0967C4.00428 12.0869 4.09114 12.0698 4.20543 12.0424C4.43422 11.9877 4.77156 11.8924 5.18106 11.7334C5.84103 11.477 6.68484 11.0564 7.56458 10.3753C7.15054 9.93496 6.78945 9.48388 6.50421 9.10102C6.26672 8.78224 6.07517 8.50172 5.94227 8.29973C5.87571 8.19858 5.82359 8.11671 5.78748 8.05909C5.76942 8.03027 5.75535 8.00749 5.74545 7.99135L5.73377 7.9722L5.73032 7.96651L5.72864 7.96371C5.71133 7.9349 5.69582 7.9055 5.68208 7.87566C5.49265 7.46416 5.6393 6.96717 6.03659 6.72853C6.09037 6.69623 6.14617 6.6702 6.20315 6.65023C6.59739 6.51205 7.04758 6.66421 7.27129 7.03623L7.27266 7.0385L7.28001 7.05054C7.28695 7.06186 7.29793 7.07964 7.31274 7.10328C7.34239 7.15059 7.38731 7.2212 7.44595 7.31032C7.56343 7.48886 7.73484 7.73997 7.94765 8.02562C8.21085 8.37889 8.52772 8.77187 8.8756 9.14201C9.64226 8.24147 10.0681 7.3133 10.3056 6.55854C10.381 6.3186 10.4372 6.09683 10.4791 5.90005H9.51951C9.50696 5.90031 9.49442 5.90031 9.48191 5.90005H4.00001C3.50296 5.90005 3.10001 5.49711 3.10001 5.00005C3.10001 4.50299 3.50296 4.10005 4.00001 4.10005H8.04378L7.69503 3.40254C7.67314 3.35877 7.65516 3.31407 7.64094 3.26883C7.51078 2.8546 7.69671 2.39547 8.09752 2.19507ZM16.5 13.0125L18.5438 17.1H14.4562L16.5 13.0125Z",fill:"currentColor"},null,-1),C("path",{d:"M15.1 4.00007C15.1 3.50301 15.5029 3.10007 16 3.10007H18C19.6016 3.10007 20.9 4.39844 20.9 6.00007V8.00007C20.9 8.49712 20.497 8.90007 20 8.90007C19.5029 8.90007 19.1 8.49712 19.1 8.00007V6.00007C19.1 5.39255 18.6075 4.90007 18 4.90007H16C15.5029 4.90007 15.1 4.49712 15.1 4.00007Z",fill:"currentColor"},null,-1),C("path",{d:"M3.99998 15.1001C4.49703 15.1001 4.89998 15.503 4.89998 16.0001V18.0001C4.89998 18.6076 5.39246 19.1001 5.99998 19.1001H7.99998C8.49703 19.1001 8.89998 19.503 8.89998 20.0001C8.89998 20.4971 8.49703 20.9001 7.99998 20.9001H5.99998C4.39835 20.9001 3.09998 19.6017 3.09998 18.0001V16.0001C3.09998 15.503 3.50292 15.1001 3.99998 15.1001Z",fill:"currentColor"},null,-1)])])}const Q0e=kt({name:"kimi-translate",render:J0e}),ehe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function the(e,t){return b(),A("svg",ehe,[...t[0]||(t[0]=[C("path",{d:"M8.10001 3C8.10001 2.50294 8.50295 2.1 9.00001 2.1H15C15.4971 2.1 15.9 2.50294 15.9 3C15.9 3.49706 15.4971 3.9 15 3.9H9.00001C8.50295 3.9 8.10001 3.49706 8.10001 3Z",fill:"currentColor"},null,-1),C("path",{d:"M10 15.9C9.50295 15.9 9.10001 15.4971 9.10001 15L9.10001 10C9.10001 9.50294 9.50295 9.1 10 9.1C10.4971 9.1 10.9 9.50294 10.9 10L10.9 15C10.9 15.4971 10.4971 15.9 10 15.9Z",fill:"currentColor"},null,-1),C("path",{d:"M13.1 15C13.1 15.4971 13.5029 15.9 14 15.9C14.4971 15.9 14.9 15.4971 14.9 15L14.9 10C14.9 9.50294 14.4971 9.1 14 9.1C13.5029 9.1 13.1 9.50294 13.1 10V15Z",fill:"currentColor"},null,-1),C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.10001 6C2.10001 5.50294 2.50295 5.1 3.00001 5.1H4.99152C4.99785 5.09993 5.00417 5.09993 5.01048 5.1H18.9895C18.9958 5.09993 19.0021 5.09993 19.0085 5.1H21C21.4971 5.1 21.9 5.50294 21.9 6C21.9 6.49706 21.4971 6.9 21 6.9H19.8281L18.8448 18.6993C18.7412 19.9432 17.7013 20.9 16.4531 20.9H7.54686C6.29865 20.9 5.25881 19.9432 5.15515 18.6993L4.17188 6.9H3.00001C2.50295 6.9 2.10001 6.49706 2.10001 6ZM5.97811 6.9L18.0219 6.9L17.0511 18.5498C17.0251 18.8608 16.7652 19.1 16.4531 19.1H7.54686C7.23481 19.1 6.97485 18.8608 6.94893 18.5498L5.97811 6.9Z",fill:"currentColor"},null,-1)])])}const nhe=kt({name:"kimi-trash",render:the}),ohe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function she(e,t){return b(),A("svg",ohe,[...t[0]||(t[0]=[C("path",{d:"M7.36336 3.3634C7.71483 3.01192 8.28533 3.01192 8.6368 3.3634C8.98817 3.71488 8.98824 4.2854 8.6368 4.63683L6.17391 7.09972H15.0001C18.2585 7.09977 20.9005 9.74166 20.9005 13.0001C20.9004 16.2585 18.2585 18.9005 15.0001 18.9005H7.00008C6.50307 18.9005 6.09976 18.4971 6.09969 18.0001C6.09969 17.5031 6.50302 17.0997 7.00008 17.0997H15.0001C17.2644 17.0997 19.0996 15.2644 19.0997 13.0001C19.0997 10.7358 17.2644 8.90055 15.0001 8.90051H6.17391L8.6368 11.3634L8.69832 11.4318C8.98668 11.7853 8.96632 12.3073 8.6368 12.6368C8.30728 12.9663 7.78521 12.9867 7.43172 12.6984L7.36336 12.6368L3.36336 8.63683C3.33098 8.60445 3.30286 8.56908 3.27645 8.53332C3.25597 8.50559 3.23607 8.47741 3.21883 8.44738C3.20492 8.42311 3.19221 8.39837 3.18074 8.37316C3.1764 8.36365 3.17109 8.35453 3.16707 8.34484C3.1627 8.33427 3.1593 8.32331 3.15535 8.31261C3.12946 8.24274 3.11237 8.16872 3.10457 8.09191C3.09258 7.97426 3.10262 7.85446 3.1368 7.74035C3.14281 7.72035 3.15094 7.70114 3.15828 7.68176C3.16165 7.67283 3.16341 7.66325 3.16707 7.65441C3.17216 7.64216 3.17806 7.63025 3.18367 7.61828C3.19055 7.60356 3.19744 7.58874 3.20516 7.57433C3.24709 7.49624 3.3012 7.42556 3.36336 7.3634L7.36336 3.3634Z",fill:"currentColor"},null,-1)])])}const ihe=kt({name:"kimi-undo",render:she}),rhe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function lhe(e,t){return b(),A("svg",rhe,[...t[0]||(t[0]=[C("path",{d:"M11.9997 12.8779C16.0197 12.878 19.4393 15.3848 20.7048 18.8828C21.0812 19.9234 20.2782 20.8962 19.2038 21.0137L18.9861 21.0264H5.0134L4.79562 21.0137C3.7213 20.8961 2.91743 19.9233 3.29367 18.8828C4.55905 15.3847 7.9797 12.8781 11.9997 12.8779ZM11.9997 14.6777C8.84467 14.6779 6.17462 16.5794 5.09152 19.2256H18.9079C17.8248 16.5793 15.1549 14.6778 11.9997 14.6777ZM12.2312 3.00586C14.6088 3.1264 16.4997 5.09239 16.4997 7.5L16.4939 7.73145C16.3734 10.1091 14.4073 11.9999 11.9997 12C9.59225 11.9998 7.62604 10.109 7.50558 7.73145L7.49973 7.5C7.49973 5.01485 9.51462 3.00021 11.9997 3L12.2312 3.00586ZM11.9997 4.7998C10.5087 4.80001 9.29953 6.00896 9.29953 7.5C9.29953 8.99104 10.5087 10.2 11.9997 10.2002C13.4908 10.2001 14.6999 8.99112 14.6999 7.5C14.6999 6.00888 13.4908 4.79989 11.9997 4.7998Z",fill:"currentColor"},null,-1)])])}const ahe=kt({name:"kimi-user",render:lhe}),uhe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function che(e,t){return b(),A("svg",uhe,[...t[0]||(t[0]=[C("path",{d:"M11.9996 7C11.5026 7 11.0996 7.36985 11.0996 7.82609V14.1739C11.0996 14.6301 11.5026 15 11.9996 15C12.4967 15 12.8996 14.6301 12.8996 14.1739V7.82609C12.8996 7.36985 12.4967 7 11.9996 7Z",fill:"currentColor"},null,-1),C("path",{d:"M12.8996 17.1006C12.8996 17.5974 12.4968 18.001 11.9992 18.001C11.5024 18.001 11.0996 17.5974 11.0996 17.1006C11.0996 16.6038 11.5024 16.2002 11.9992 16.2002C12.4968 16.2002 12.8996 16.6038 12.8996 17.1006Z",fill:"currentColor"},null,-1),C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M14.5108 3.5501C13.3946 1.61676 10.6041 1.61676 9.48786 3.5501L1.69363 17.0501C0.577423 18.9834 1.97269 21.4001 4.20511 21.4001H19.7936C22.026 21.4001 23.4212 18.9834 22.305 17.0501L14.5108 3.5501ZM11.0467 4.4501C11.4701 3.71676 12.5286 3.71676 12.952 4.4501L20.7462 17.9501C21.1696 18.6834 20.6403 19.6001 19.7936 19.6001H4.20511C3.35833 19.6001 2.82909 18.6834 3.25248 17.9501L11.0467 4.4501Z",fill:"currentColor"},null,-1)])])}const dhe=kt({name:"kimi-warning",render:che}),fhe={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function phe(e,t){return b(),A("svg",fhe,[...t[0]||(t[0]=[C("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[C("path",{d:"M4 6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2zm11-2v16"}),C("path",{d:"m9 10l2 2l-2 2"})],-1)])])}const hhe=kt({name:"tabler-layout-sidebar-right-collapse",render:phe}),mhe={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function ghe(e,t){return b(),A("svg",mhe,[...t[0]||(t[0]=[C("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m15 7l-6.5 6.5a1.5 1.5 0 0 0 3 3L18 10a3 3 0 0 0-6-6l-6.5 6.5a4.5 4.5 0 0 0 9 9L21 13"},null,-1)])])}const vhe=kt({name:"tabler-paperclip",render:ghe}),yhe={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function khe(e,t){return b(),A("svg",yhe,[...t[0]||(t[0]=[C("path",{fill:"currentColor",d:"M4 18v-3.7a1.5 1.5 0 0 0-1.5-1.5H2v-1.6h.5A1.5 1.5 0 0 0 4 9.7V6a3 3 0 0 1 3-3h1v2H7a1 1 0 0 0-1 1v4.1A2 2 0 0 1 4.626 12A2 2 0 0 1 6 13.9V18a1 1 0 0 0 1 1h1v2H7a3 3 0 0 1-3-3m16-3.7V18a3 3 0 0 1-3 3h-1v-2h1a1 1 0 0 0 1-1v-4.1a2 2 0 0 1 1.374-1.9A2 2 0 0 1 18 10.1V6a1 1 0 0 0-1-1h-1V3h1a3 3 0 0 1 3 3v3.7a1.5 1.5 0 0 0 1.5 1.5h.5v1.6h-.5a1.5 1.5 0 0 0-1.5 1.5"},null,-1)])])}const bhe=kt({name:"ri-braces-line",render:khe}),Che={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function whe(e,t){return b(),A("svg",Che,[...t[0]||(t[0]=[C("path",{fill:"currentColor",d:"M9 3V1H7v2H3a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1h18a1 1 0 0 0 1-1V4a1 1 0 0 0-1-1h-4V1h-2v2zm-5 7h16v9H4zm0-5h3v1h2V5h6v1h2V5h3v3H4zm5.879 5.964L12 13.086l2.121-2.122l1.415 1.415l-2.122 2.121l2.121 2.121l-1.414 1.414L12 15.915l-2.121 2.12l-1.415-1.414l2.122-2.12l-2.122-2.122z"},null,-1)])])}const _he=kt({name:"ri-calendar-close-line",render:whe}),xhe={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function She(e,t){return b(),A("svg",xhe,[...t[0]||(t[0]=[C("path",{fill:"currentColor",d:"M7 3V1h2v2h6V1h2v2h4a1 1 0 0 1 1 1v5h-2V5h-3v2h-2V5H9v2H7V5H4v14h6v2H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1zm10 9a4 4 0 1 0 0 8a4 4 0 0 0 0-8m-6 4a6 6 0 1 1 12 0a6 6 0 0 1-12 0m5-3v3.414l2.293 2.293l1.414-1.414L18 15.586V13z"},null,-1)])])}const Ahe=kt({name:"ri-calendar-schedule-line",render:She}),Mhe={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function The(e,t){return b(),A("svg",Mhe,[...t[0]||(t[0]=[C("path",{fill:"currentColor",d:"M9 1v2h6V1h2v2h4a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h4V1zm11 10H4v8h16zM8 14v2H6v-2zm10 0v2h-8v-2zM7 5H4v4h16V5h-3v2h-2V5H9v2H7z"},null,-1)])])}const Ehe=kt({name:"ri-calendar-todo-line",render:The}),Ihe={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Lhe(e,t){return b(),A("svg",Ihe,[...t[0]||(t[0]=[C("path",{fill:"currentColor",d:"m23 12l-7.071 7.071l-1.414-1.414L20.172 12l-5.657-5.657l1.414-1.414zM3.828 12l5.657 5.657l-1.414 1.414L1 12l7.071-7.071l1.414 1.414z"},null,-1)])])}const $he=kt({name:"ri-code-line",render:Lhe}),Nhe={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Fhe(e,t){return b(),A("svg",Nhe,[...t[0]||(t[0]=[C("path",{fill:"currentColor",d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10s-4.477 10-10 10m0-2a8 8 0 1 0 0-16a8 8 0 0 0 0 16m-4-7h8a4 4 0 0 1-8 0m0-2a1.5 1.5 0 1 1 0-3a1.5 1.5 0 0 1 0 3m8 0a1.5 1.5 0 1 1 0-3a1.5 1.5 0 0 1 0 3"},null,-1)])])}const Rhe=kt({name:"ri-emotion-line",render:Fhe}),Ohe={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Phe(e,t){return b(),A("svg",Ohe,[...t[0]||(t[0]=[C("path",{fill:"currentColor",d:"M10 6v2H5v11h11v-5h2v6a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1zm11-3v8h-2V6.413l-7.793 7.794l-1.414-1.414L17.585 5H13V3z"},null,-1)])])}const Dhe=kt({name:"ri-external-link-line",render:Phe}),Bhe={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Hhe(e,t){return b(),A("svg",Bhe,[...t[0]||(t[0]=[C("path",{fill:"currentColor",d:"M12 3c5.392 0 9.878 3.88 10.819 9c-.94 5.12-5.427 9-10.819 9s-9.878-3.88-10.818-9C2.122 6.88 6.608 3 12 3m0 16a9.005 9.005 0 0 0 8.778-7a9.005 9.005 0 0 0-17.555 0A9.005 9.005 0 0 0 12 19m0-2.5a4.5 4.5 0 1 1 0-9a4.5 4.5 0 0 1 0 9m0-2a2.5 2.5 0 1 0 0-5a2.5 2.5 0 0 0 0 5"},null,-1)])])}const zhe=kt({name:"ri-eye-line",render:Hhe}),Whe={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Uhe(e,t){return b(),A("svg",Whe,[...t[0]||(t[0]=[C("path",{fill:"currentColor",d:"M17.883 19.297A10.95 10.95 0 0 1 12 21c-5.392 0-9.878-3.88-10.818-9A11 11 0 0 1 4.52 5.935L1.394 2.808l1.414-1.414l19.799 19.798l-1.414 1.415zM5.936 7.35A8.97 8.97 0 0 0 3.223 12a9.005 9.005 0 0 0 13.201 5.838l-2.028-2.028A4.5 4.5 0 0 1 8.19 9.604zm6.978 6.978l-3.242-3.241a2.5 2.5 0 0 0 3.241 3.241m7.893 2.265l-1.431-1.431A8.9 8.9 0 0 0 20.778 12A9.005 9.005 0 0 0 9.552 5.338L7.974 3.76C9.221 3.27 10.58 3 12 3c5.392 0 9.878 3.88 10.819 9a10.95 10.95 0 0 1-2.012 4.593m-9.084-9.084Q11.86 7.5 12 7.5a4.5 4.5 0 0 1 4.492 4.778z"},null,-1)])])}const jhe=kt({name:"ri-eye-off-line",render:Uhe}),Vhe={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function qhe(e,t){return b(),A("svg",Vhe,[...t[0]||(t[0]=[C("path",{fill:"currentColor",d:"M15 4H5v16h14V8h-4zM3 2.992C3 2.444 3.447 2 3.999 2H16l5 5v13.993A1 1 0 0 1 20.007 22H3.993A1 1 0 0 1 3 21.008zM11 11V8h2v3h3v2h-3v3h-2v-3H8v-2z"},null,-1)])])}const Khe=kt({name:"ri-file-add-line",render:qhe}),Zhe={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Ghe(e,t){return b(),A("svg",Zhe,[...t[0]||(t[0]=[C("path",{fill:"currentColor",d:"M13 9h8L11 24v-9H4l9-15zm-2 2V7.22L7.532 13H13v4.394L17.263 11z"},null,-1)])])}const Yhe=kt({name:"ri-flashlight-line",render:Ghe}),Xhe={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Jhe(e,t){return b(),A("svg",Xhe,[...t[0]||(t[0]=[C("path",{fill:"currentColor",d:"M12.414 5H21a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h7.414z"},null,-1)])])}const Qhe=kt({name:"ri-folder-fill",render:Jhe}),eme={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function tme(e,t){return b(),A("svg",eme,[...t[0]||(t[0]=[C("path",{fill:"currentColor",d:"M6 5a1 1 0 1 0 0 2a1 1 0 0 0 0-2M3 6a3 3 0 1 1 4 2.83V9a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2v-.17a3.001 3.001 0 1 1 2 0V9a4 4 0 0 1-4 4h-2v2.17a3.001 3.001 0 1 1-2 0V13H9a4 4 0 0 1-4-4v-.17A3 3 0 0 1 3 6m15-1a1 1 0 1 0 0 2a1 1 0 0 0 0-2m-6 12a1 1 0 1 0 0 2a1 1 0 0 0 0-2"},null,-1)])])}const nme=kt({name:"ri-git-fork-line",render:tme}),ome={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function sme(e,t){return b(),A("svg",ome,[...t[0]||(t[0]=[C("path",{fill:"currentColor",d:"M15 5h2a2 2 0 0 1 2 2v8.17a3.001 3.001 0 1 1-2 0V7h-2v3l-4.5-4L15 2zM5 8.83a3.001 3.001 0 1 1 2 0v6.34a3.001 3.001 0 1 1-2 0zM6 7a1 1 0 1 0 0-2a1 1 0 0 0 0 2m0 12a1 1 0 1 0 0-2a1 1 0 0 0 0 2m12 0a1 1 0 1 0 0-2a1 1 0 0 0 0 2"},null,-1)])])}const ime=kt({name:"ri-git-pull-request-line",render:sme}),rme={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function lme(e,t){return b(),A("svg",rme,[...t[0]||(t[0]=[C("path",{fill:"currentColor",d:"M2 18h7v2H2zm0-7h9v2H2zm0-7h20v2H2zm18.674 9.025l1.156-.391l1 1.732l-.916.805a4 4 0 0 1 0 1.658l.916.805l-1 1.732l-1.156-.391a4 4 0 0 1-1.435.83L19 21h-2l-.24-1.196a4 4 0 0 1-1.434-.83l-1.156.392l-1-1.732l.916-.805a4 4 0 0 1 0-1.658l-.916-.805l1-1.732l1.156.391c.41-.37.898-.655 1.435-.83L17 11h2l.24 1.196a4 4 0 0 1 1.434.83M18 18a2 2 0 1 0 0-4a2 2 0 0 0 0 4"},null,-1)])])}const ame=kt({name:"ri-list-settings-line",render:lme}),ume={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function cme(e,t){return b(),A("svg",ume,[...t[0]||(t[0]=[C("path",{fill:"currentColor",d:"M10 2a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1H8v2h5V9a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1h-6a1 1 0 0 1-1-1v-1H8v6h5v-1a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1h-6a1 1 0 0 1-1-1v-1H7a1 1 0 0 1-1-1V8H4a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1zm9 16h-4v2h4zm0-8h-4v2h4zM9 4H5v2h4z"},null,-1)])])}const dme=kt({name:"ri-node-tree",render:cme}),fme={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function pme(e,t){return b(),A("svg",fme,[...t[0]||(t[0]=[C("path",{fill:"currentColor",d:"m13.827 1.69l8.486 8.485l-1.415 1.414l-.707-.707l-4.242 4.243l-.707 3.536l-1.415 1.414l-4.242-4.243l-4.95 4.95l-1.414-1.414l4.95-4.95l-4.243-4.243l1.414-1.414l3.536-.707l4.242-4.243l-.707-.707zm.707 3.536l-4.67 4.67l-2.822.565l6.5 6.5l.564-2.822l4.671-4.67z"},null,-1)])])}const hme=kt({name:"ri-pushpin-line",render:pme}),mme={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function gme(e,t){return b(),A("svg",mme,[...t[0]||(t[0]=[C("path",{fill:"currentColor",d:"M20 4v12h3l-4 5l-4-5h3V4zm-8 14v2H3v-2zm2-7v2H3v-2zm0-7v2H3V4z"},null,-1)])])}const vme=kt({name:"ri-sort-desc",render:gme}),yme={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function kme(e,t){return b(),A("svg",yme,[...t[0]||(t[0]=[C("path",{fill:"currentColor",d:"m12 18.26l-7.053 3.948l1.575-7.928L.588 8.792l8.027-.952L12 .5l3.385 7.34l8.027.952l-5.934 5.488l1.575 7.928z"},null,-1)])])}const bme=kt({name:"ri-star-fill",render:kme}),Cme={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function wme(e,t){return b(),A("svg",Cme,[...t[0]||(t[0]=[C("path",{fill:"currentColor",d:"m12 18.26l-7.053 3.948l1.575-7.928L.588 8.792l8.027-.952L12 .5l3.385 7.34l8.027.952l-5.934 5.488l1.575 7.928zm0-2.292l4.247 2.377l-.948-4.773l3.573-3.305l-4.833-.573l-2.038-4.419l-2.039 4.42l-4.833.572l3.573 3.305l-.948 4.773z"},null,-1)])])}const _me=kt({name:"ri-star-line",render:wme}),xme={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Sme(e,t){return b(),A("svg",xme,[...t[0]||(t[0]=[C("path",{fill:"currentColor",d:"M5.33 3.272a3.5 3.5 0 0 1 4.254 4.962l10.709 10.71l-1.414 1.414l-10.71-10.71a3.502 3.502 0 0 1-4.962-4.255L5.444 7.63a1.5 1.5 0 0 0 2.121-2.121zm10.367 1.883l3.182-1.768l1.414 1.415l-1.768 3.182l-1.768.353l-2.12 2.121l-1.415-1.414l2.121-2.121zm-6.718 8.132l1.415 1.414l-5.304 5.303a1 1 0 0 1-1.492-1.327l.078-.087z"},null,-1)])])}const Ame=kt({name:"ri-tools-line",render:Sme}),Mme={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Tme(e,t){return b(),A("svg",Mme,[...t[0]||(t[0]=[C("path",{fill:"currentColor",d:"m20.97 17.172l-1.414 1.414l-3.535-3.535l-.073.074l-.707 3.536l-1.415 1.414l-4.242-4.243l-4.95 4.95l-1.414-1.414l4.95-4.95l-4.243-4.243L5.34 8.761l3.536-.707l.073-.074l-3.536-3.536L6.828 3.03zM10.365 9.394l-.502.502l-2.822.565l6.5 6.5l.564-2.822l.502-.502zm8.411.074l-1.34 1.34l1.414 1.415l1.34-1.34l.707.707l1.415-1.415l-8.486-8.485l-1.414 1.414l.707.707l-1.34 1.34l1.414 1.415l1.34-1.34z"},null,-1)])])}const Eme=kt({name:"ri-unpin-line",render:Tme}),Ime=` + + +`,Lme=` + + + +`,$me=` + + + +`,Nme=` + + +`,Fme=` + + +`,Rme=` + + +`,Ome=` + + +`,Pme=` + + +`,Dme=` + + +`,Bme=` + + +`,Hme=` + + +`,zme=` + + + +`,Wme=` + + +`,Ume=` + + + +`,jme=` + + +`,Vme=` + + + +`,qme=` + + +`,Kme=` + + +`,Zme=` + + +`,Gme=` + + +`,J_=` + + + + +`,Yme=` + + + + +`,Xme=` + + +`,Jme=` + + + + +`,Qme=` + + + + + +`,ege=` + + +`,tge=` + + +`,nge=` + + +`,oge=` + + +`,sge=` + + +`,ige=` + + +`,rge=` + + + +`,lge=` + + + +`,age=` + + +`,uge=` + + + + +`,cge=` + + + + +`,dge=` + + + + + + + + + + + + +`,fge=` + + +`,pge=` + + +`,hge=` + + + + +`,mge=` + + +`,gge=` + + +`,vge=` + + + + +`,yge=` + + + + +`,kge=` + + + +`,bge=` + + +`,Cge=` + + +`,wge=` + + + + +`,_ge=` + + +`,xge=` + + +`,Sge=` + + +`,Age=` + + + +`,Mge=` + + + + +`,Tge=` + + +`,Ege=` + + +`,Ige='',Lge=` + + +`,$ge=` + + +`,Nge=` + + + + +`,Fge=` + + + + +`,Rge=` + + +`,Oge=` + + + + + + + +`,Pge=` + + + + +`,Dge=` + + + + + +`,Bge=` + + +`,Hge=` + + +`,zge=` + + + + +`,Wge='',Uge='',jge='',Vge='',qge='',Kge='',Zge='',Gge='',Yge='',Xge='',Jge='',Qge='',e2e='',t2e='',n2e='',o2e='',s2e='',i2e='',r2e='',l2e='',a2e='',u2e='',c2e='',d2e='',f2e={sm:14,md:16,lg:20};function xt(e,t){return{component:e,svg:t}}const m$={plus:xt(Ife,Ime),"chat-new":xt(Nfe,Lme),"calendar-close":xt(_he,Vge),"calendar-schedule":xt(Ahe,qge),"calendar-todo":xt(Ehe,Kge),close:xt(f1e,Wme),check:xt(Xfe,Pme),archive:xt(Ofe,$me),search:xt(h0e,xge),copy:xt(C1e,Vme),link:xt($pe,fge),"external-link":xt(Dhe,Yge),download:xt(M1e,Kme),undo:xt(ihe,Bge),send:xt(v0e,Sge),image:xt(hpe,rge),settings:xt(b0e,Age),sliders:xt($0e,Ige),"light-mode":xt(Epe,dge),"dark-mode":xt(x1e,qme),"follow-system":xt(Y1e,ege),"log-in":xt(A0e,Tge),"log-out":xt(E0e,Ege),hand:xt(ape,sge),"full-access":xt(Q1e,tge),"shield-question":xt(_0e,Mge),"chevron-down":xt(e1e,Dme),"chevron-right":xt(o1e,Bme),"chevron-up":xt(r1e,Hme),"arrow-up":xt(Zfe,Ome),"arrow-down":xt(Bfe,Nme),"arrow-right":xt(Vfe,Rme),"arrow-left":xt(Wfe,Fme),minus:xt(zpe,mge),microscope:xt(jpe,gge),"panel-collapse":xt(_pe,uge),"panel-collapse-right":xt(hhe,Wge),"panel-expand":xt(Ape,cge),expand:xt(N1e,Gme),collapse:xt(m1e,Ume),list:xt(Rpe,pge),"list-settings":xt(ame,s2e),"tree-view":xt(dme,i2e),sort:xt(vme,l2e),grip:xt(ipe,oge),folder:xt(j1e,Jme),"folder-closed":xt(z1e,Xme),"folder-plus":xt(K1e,Qme),"folder-solid":xt(Qhe,t2e),file:xt(X_,J_),"file-text":xt(D1e,Yme),"file-edit":xt(I1e,Zme),"file-plus":xt(Khe,Qge),"file-off":xt(X_,J_),attachment:xt(vhe,Uge),"image-off":xt(vpe,lge),eye:xt(zhe,Xge),"eye-off":xt(jhe,Jge),code:xt($he,Zge),terminal:xt(j0e,Fge),pencil:xt(n0e,bge),tool:xt(Ame,c2e),glob:xt(bhe,jge),globe:xt(npe,nge),translate:xt(Q0e,Pge),"check-list":xt(Y0e,Oge),bolt:xt(Yhe,e2e),trash:xt(nhe,Dge),"git-fork":xt(nme,n2e),"git-pull-request":xt(ime,o2e),message:xt(y1e,jme),mail:xt(Dpe,hge),user:xt(ahe,Hge),info:xt(bpe,age),"help-circle":xt(a0e,wge),"alert-triangle":xt(dhe,zge),clock:xt(u1e,zme),robot:xt(d0e,_ge),sparkles:xt(z0e,Nge),histogram:xt(dpe,ige),music:xt(Ype,yge),emoji:xt(Rhe,Gge),target:xt(D0e,$ge),pause:xt(Qpe,kge),play:xt(i0e,Cge),pin:xt(hme,r2e),stop:xt(R0e,Lge),star:xt(bme,a2e),"star-outline":xt(_me,u2e),unpin:xt(Eme,d2e),"dots-horizontal":xt(Kpe,vge),thinking:xt(K0e,Rge)};function p2e(e){return m$[e]}function h2e(e,t){return e.replace(/]*>/,n=>n.replace(/\s(?:width|height)="[^"]*"/g,"")).replace(/^